emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request : Tab-completion for 'shell-comand'


From: martin rudalics
Subject: Re: Feature request : Tab-completion for 'shell-comand'
Date: Fri, 14 Mar 2008 23:31:17 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> Looks good, except that it checks NARROWED, which depends on the
> position of point-min whereas point-min should have no effect on the
> behavior at `end'.  I.e. it should just check ZV == Z.

I'm afraid there was a double misunderstanding.  Isn't what we really
want check "end == Z"?
*** buffer.c.~1.551.~   Mon Feb 11 18:56:14 2008
--- buffer.c    Fri Mar 14 23:21:30 2008
***************
*** 1634,1640 ****
    Vbuffer_alist = link;
  
    /* Effectively do a delq on buried_buffer_list.  */
!   
    prev = Qnil;
    for (link = XFRAME (frame)->buried_buffer_list; CONSP (link);
         link = XCDR (link))
--- 1634,1640 ----
    Vbuffer_alist = link;
  
    /* Effectively do a delq on buried_buffer_list.  */
! 
    prev = Qnil;
    for (link = XFRAME (frame)->buried_buffer_list; CONSP (link);
         link = XCDR (link))
***************
*** 2715,2722 ****
    return idx;
  }
  
! /* Find all the overlays in the current buffer that overlap the range BEG-END
!    or are empty at BEG.
  
     Return the number found, and store them in a vector in *VEC_PTR.
     Store in *LEN_PTR the size allocated for the vector.
--- 2715,2723 ----
    return idx;
  }
  
! /* Find all the overlays in the current buffer that overlap the range
!    BEG-END, or are empty at BEG, or are empty at END provided END
!    denotes the position at the end of the current buffer.
  
     Return the number found, and store them in a vector in *VEC_PTR.
     Store in *LEN_PTR the size allocated for the vector.
***************
*** 2751,2756 ****
--- 2752,2758 ----
    int next = ZV;
    int prev = BEGV;
    int inhibit_storing = 0;
+   int end_is_Z = end == Z;
  
    for (tail = current_buffer->overlays_before; tail; tail = tail->next)
      {
***************
*** 2768,2777 ****
          break;
        }
        startpos = OVERLAY_POSITION (ostart);
!       /* Count an interval if it either overlaps the range
!        or is empty at the start of the range.  */
        if ((beg < endpos && startpos < end)
!         || (startpos == endpos && beg == endpos))
        {
          if (idx == len)
            {
--- 2770,2781 ----
          break;
        }
        startpos = OVERLAY_POSITION (ostart);
!       /* Count an interval if it overlaps the range, is empty at the
!        start of the range, or is empty at END provided END denotes the
!        end of the buffer.  */
        if ((beg < endpos && startpos < end)
!         || (startpos == endpos
!             && (beg == endpos || (end_is_Z && endpos == end))))
        {
          if (idx == len)
            {
***************
*** 2816,2825 ****
          break;
        }
        endpos = OVERLAY_POSITION (oend);
!       /* Count an interval if it either overlaps the range
!        or is empty at the start of the range.  */
        if ((beg < endpos && startpos < end)
!         || (startpos == endpos && beg == endpos))
        {
          if (idx == len)
            {
--- 2820,2831 ----
          break;
        }
        endpos = OVERLAY_POSITION (oend);
!       /* Count an interval if it overlaps the range, is empty at the
!        start of the range, or is empty at END provided END denotes the
!        end of the buffer.  */
        if ((beg < endpos && startpos < end)
!         || (startpos == endpos
!             && (beg == endpos || (end_is_Z && endpos == end))))
        {
          if (idx == len)
            {
***************
*** 4015,4022 ****
         doc: /* Return a list of the overlays that overlap the region BEG ... 
END.
  Overlap means that at least one character is contained within the overlay
  and also contained within the specified region.
! Empty overlays are included in the result if they are located at BEG
! or between BEG and END.  */)
       (beg, end)
       Lisp_Object beg, end;
  {
--- 4021,4029 ----
         doc: /* Return a list of the overlays that overlap the region BEG ... 
END.
  Overlap means that at least one character is contained within the overlay
  and also contained within the specified region.
! Empty overlays are included in the result if they are located at BEG,
! between BEG and END, or at END provided END denotes the position at the
! end of the buffer.  */)
       (beg, end)
       Lisp_Object beg, end;
  {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]