From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Feature request : Tab-completion for 'shell-comand' Date: Fri, 14 Mar 2008 23:31:17 +0100 Message-ID: <47DAFCB5.2010702@gmx.at> References: <874pbknt3j.fsf@tsuchiya.vaj.namazu.org> <87mypccg6r.fsf@jurta.org> <87abl8svpl.fsf@jurta.org> <87iqzves3k.fsf@jurta.org> <87zlt6qnu4.fsf@jurta.org> <8763vs7v08.fsf@jurta.org> <87d4pzz56f.fsf@jurta.org> <47D97A36.5050103@gmx.at> <47DA2D77.2070909@gmx.at> <47DAC505.1050008@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050107050206050709040303" X-Trace: ger.gmane.org 1205533915 25247 80.91.229.12 (14 Mar 2008 22:31:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2008 22:31:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 14 23:32:14 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JaIRh-0005fK-FQ for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 23:32:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaIR8-0000ul-7v for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 18:31:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaIR4-0000ug-Cu for emacs-devel@gnu.org; Fri, 14 Mar 2008 18:31:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaIQz-0000uU-7G for emacs-devel@gnu.org; Fri, 14 Mar 2008 18:31:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaIQz-0000uR-13 for emacs-devel@gnu.org; Fri, 14 Mar 2008 18:31:29 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JaIQy-0003RR-L6 for emacs-devel@gnu.org; Fri, 14 Mar 2008 18:31:29 -0400 Original-Received: (qmail invoked by alias); 14 Mar 2008 22:31:25 -0000 Original-Received: from N912P000.adsl.highway.telekom.at (EHLO [62.47.57.224]) [62.47.57.224] by mail.gmx.net (mp044) with SMTP; 14 Mar 2008 23:31:25 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+8RtkGgKW8LrfDrqoouqZ0QNal6mHaBKCINfFwSm dc/GIvWakr9UsZ User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92627 Archived-At: This is a multi-part message in MIME format. --------------050107050206050709040303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > 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"? --------------050107050206050709040303 Content-Type: text/plain; name="buffer.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="buffer.patch" *** buffer.c.~1.551.~ Mon Feb 11 18:56:14 2008 --- buffer.c Fri Mar 14 23:21:30 2008 *************** *** 1634,1640 **** Vbuffer_alist =3D link; =20 /* Effectively do a delq on buried_buffer_list. */ ! =20 prev =3D Qnil; for (link =3D XFRAME (frame)->buried_buffer_list; CONSP (link); link =3D XCDR (link)) --- 1634,1640 ---- Vbuffer_alist =3D link; =20 /* Effectively do a delq on buried_buffer_list. */ !=20 prev =3D Qnil; for (link =3D XFRAME (frame)->buried_buffer_list; CONSP (link); link =3D XCDR (link)) *************** *** 2715,2722 **** return idx; } =0C ! /* Find all the overlays in the current buffer that overlap the range B= EG-END ! or are empty at BEG. =20 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; } =0C ! /* 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. =20 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 =3D ZV; int prev =3D BEGV; int inhibit_storing =3D 0; + int end_is_Z =3D end =3D=3D Z; =20 for (tail =3D current_buffer->overlays_before; tail; tail =3D tail->n= ext) { *************** *** 2768,2777 **** break; } startpos =3D 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 =3D=3D endpos && beg =3D=3D endpos)) { if (idx =3D=3D len) { --- 2770,2781 ---- break; } startpos =3D 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 =3D=3D endpos ! && (beg =3D=3D endpos || (end_is_Z && endpos =3D=3D end)))) { if (idx =3D=3D len) { *************** *** 2816,2825 **** break; } endpos =3D 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 =3D=3D endpos && beg =3D=3D endpos)) { if (idx =3D=3D len) { --- 2820,2831 ---- break; } endpos =3D 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 =3D=3D endpos ! && (beg =3D=3D endpos || (end_is_Z && endpos =3D=3D end)))) { if (idx =3D=3D len) { *************** *** 4015,4022 **** doc: /* Return a list of the overlays that overlap the region BE= G ... END. Overlap means that at least one character is contained within the overl= ay 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 BE= G ... END. Overlap means that at least one character is contained within the overl= ay 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; { --------------050107050206050709040303--