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 19:33:41 +0100 Message-ID: <47DAC505.1050008@gmx.at> References: <874pbmjgsy.fsf@gmx.de> <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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040805020009060505090104" X-Trace: ger.gmane.org 1205519856 9810 80.91.229.12 (14 Mar 2008 18:37:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2008 18:37:36 +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 19:38:03 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 1JaEn3-0006VD-Nd for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 19:38:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaEmU-0006A5-Dq for ged-emacs-devel@m.gmane.org; Fri, 14 Mar 2008 14:37:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaEmQ-0006A0-Ik for emacs-devel@gnu.org; Fri, 14 Mar 2008 14:37:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaEmL-00069o-2t for emacs-devel@gnu.org; Fri, 14 Mar 2008 14:37:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaEmK-00069j-Tq for emacs-devel@gnu.org; Fri, 14 Mar 2008 14:37:16 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JaEmK-0000WH-GG for emacs-devel@gnu.org; Fri, 14 Mar 2008 14:37:16 -0400 Original-Received: (qmail invoked by alias); 14 Mar 2008 18:37:13 -0000 Original-Received: from M3141P025.adsl.highway.telekom.at (EHLO [88.117.40.153]) [88.117.40.153] by mail.gmx.net (mp015) with SMTP; 14 Mar 2008 19:37:13 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/ytEN0TGbyOGD251R6OYDuu6ce3Kc7vZs36Sw4l3 aqhQGmgj1nEu8j 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: Genre and OS details not recognized. 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:92599 Archived-At: This is a multi-part message in MIME format. --------------040805020009060505090104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > Yes. (overlays-in (point-min) (point-max)) SHOULD > return all overlays if the buffer is widened. I attached a patch. If you want to apply it, the manual should be modified accordingly. Anyway, most calls of `remove-overlays' are a pain. --------------040805020009060505090104 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 19:23:10 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 and the buffer is ! widened. =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 widened =3D ! NARROWED; =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 the buffer is widened and the overlay is ! empty at the end of the range. */ if ((beg < endpos && startpos < end) ! || (startpos =3D=3D endpos ! && (beg =3D=3D endpos || (widened && 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 the buffer is widened and the overlay is ! empty at the end of the range. */ if ((beg < endpos && startpos < end) ! || (startpos =3D=3D endpos ! && (beg =3D=3D endpos || (widened && 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,4028 ---- 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 and the buffer is widened. */) (beg, end) Lisp_Object beg, end; { --------------040805020009060505090104--