From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Feature request : Tab-completion for 'shell-comand'
Date: Fri, 14 Mar 2008 19:33:41 +0100 [thread overview]
Message-ID: <47DAC505.1050008@gmx.at> (raw)
In-Reply-To: <jwvfxutny8c.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 246 bytes --]
> 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.
[-- Attachment #2: buffer.patch --]
[-- Type: text/plain, Size: 3855 bytes --]
*** buffer.c.~1.551.~ Mon Feb 11 18:56:14 2008
--- buffer.c Fri Mar 14 19:23:10 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;
}
\f
! /* 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;
}
\f
! /* 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.
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 widened = ! NARROWED;
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 the buffer is widened and the overlay is
! empty at the end of the range. */
if ((beg < endpos && startpos < end)
! || (startpos == endpos
! && (beg == endpos || (widened && 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 the buffer is widened and the overlay is
! empty at the end of the range. */
if ((beg < endpos && startpos < end)
! || (startpos == endpos
! && (beg == endpos || (widened && 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,4028 ----
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 and the buffer is widened. */)
(beg, end)
Lisp_Object beg, end;
{
next prev parent reply other threads:[~2008-03-14 18:33 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 16:42 Feature request : Tab-completion for 'shell-comand' paul r
2008-03-04 21:54 ` Michael Albinus
2008-03-04 23:17 ` Juri Linkov
2008-03-05 1:55 ` Stefan Monnier
2008-03-06 8:40 ` TSUCHIYA Masatoshi
2008-03-06 10:04 ` Juri Linkov
2008-03-06 16:04 ` Stefan Monnier
2008-03-06 16:14 ` Drew Adams
2008-03-06 17:31 ` Miles Bader
2008-03-06 17:46 ` Drew Adams
2008-03-06 18:21 ` Stefan Monnier
2008-03-07 2:14 ` Miles Bader
2008-03-06 23:48 ` Juri Linkov
2008-03-06 17:48 ` Juri Linkov
2008-03-06 23:45 ` Juri Linkov
2008-03-06 23:47 ` Juri Linkov
2008-03-08 17:39 ` Richard Stallman
2008-03-08 22:21 ` Juri Linkov
2008-03-08 22:38 ` Lennart Borgman (gmail)
2008-03-08 22:57 ` Juri Linkov
2008-03-09 0:21 ` Lennart Borgman (gmail)
2008-03-08 23:27 ` Stefan Monnier
2008-03-09 16:39 ` Richard Stallman
2008-03-09 17:45 ` Juri Linkov
2008-03-10 6:12 ` Richard Stallman
2008-03-10 14:44 ` Cannot build the trunk since unicode (was: Feature request : Tab-completion for 'shell-comand') Stefan Monnier
2008-03-11 9:24 ` Richard Stallman
2008-03-11 9:40 ` Andreas Schwab
2008-03-10 22:35 ` Feature request : Tab-completion for 'shell-comand' Juri Linkov
2008-03-11 20:24 ` Richard Stallman
2008-03-12 0:31 ` Juri Linkov
2008-03-12 23:13 ` Johan Bockgård
2008-03-12 23:19 ` David Kastrup
2008-03-12 23:36 ` Johan Bockgård
2008-03-13 2:14 ` Juri Linkov
2008-03-13 9:28 ` Johan Bockgård
2008-03-13 14:54 ` Stefan Monnier
2008-03-13 19:02 ` martin rudalics
2008-03-14 2:54 ` Richard Stallman
2008-03-14 7:46 ` martin rudalics
2008-03-14 15:07 ` Stefan Monnier
2008-03-15 3:23 ` Richard Stallman
2008-03-15 3:24 ` Richard Stallman
2008-03-14 3:21 ` Stefan Monnier
2008-03-14 7:47 ` martin rudalics
2008-03-14 15:05 ` Stefan Monnier
2008-03-14 18:33 ` martin rudalics [this message]
2008-03-14 19:20 ` Stefan Monnier
2008-03-14 22:31 ` martin rudalics
2008-03-15 0:59 ` Stefan Monnier
2008-03-16 14:24 ` martin rudalics
2008-03-16 18:28 ` Stefan Monnier
2008-03-17 7:36 ` martin rudalics
2008-03-17 15:00 ` Stefan Monnier
2008-03-14 1:04 ` Juri Linkov
2008-03-09 14:01 ` TSUCHIYA Masatoshi
2008-03-09 17:48 ` Juri Linkov
2008-03-10 0:08 ` TSUCHIYA Masatoshi
2008-03-10 0:57 ` Drew Adams
2008-03-10 1:29 ` Juri Linkov
2008-03-10 2:20 ` Johan Bockgård
2008-03-10 2:37 ` Lennart Borgman (gmail)
2008-03-10 22:31 ` Juri Linkov
2008-03-12 1:31 ` TSUCHIYA Masatoshi
2008-03-12 2:12 ` Stefan Monnier
2008-03-12 10:42 ` Juri Linkov
2008-03-15 8:29 ` TSUCHIYA Masatoshi
2008-03-15 10:24 ` paul r
2008-03-15 21:35 ` Juri Linkov
2008-03-20 19:58 ` Stefan Monnier
2008-03-20 20:55 ` Juri Linkov
2008-03-21 17:17 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47DAC505.1050008@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.