aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-02-23 11:26:15 +0000
committerKaroly Lorentey2005-02-23 11:26:15 +0000
commit37acc4209655b0a2267ee997cca8ebe42274b877 (patch)
tree819c129d8e1ef704dd6288c80a90b175be6f7853 /src
parente6b2f88783f2c89bedcd2a761c6362fb353dc7a3 (diff)
parentb02c3eedd3a308731c59b048dd3837d132e0cef8 (diff)
downloademacs-37acc4209655b0a2267ee997cca8ebe42274b877.tar.gz
emacs-37acc4209655b0a2267ee997cca8ebe42274b877.zip
Merged from miles@gnu.org--gnu-2005 (patch 27, 120-125)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-120 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-121 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-122 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-123 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-125 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-27 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-300
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/buffer.c7
-rw-r--r--src/minibuf.c24
-rw-r--r--src/window.c25
-rw-r--r--src/xdisp.c6
5 files changed, 57 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4cd7ef4f373..23074668343 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12005-02-23 Lute Kamstra <lute@gnu.org>
2
3 * buffer.c (Foverlay_buffer): Doc fix.
4
52005-02-22 Kim F. Storm <storm@cua.dk>
6
7 * minibuf.c (Ftry_completion, Fall_completions): Allow both string
8 and symbol keys in alists and hash tables.
9
10 * xdisp.c (fast_find_position): Fix search for start of overlay.
11
122005-02-21 Kim F. Storm <storm@cua.dk>
13
14 * window.c (window_scroll_pixel_based): When scrolling backwards,
15 handle partial visible line at end of window even when we hit PT.
16
12005-02-21 Stefan <monnier@iro.umontreal.ca> 172005-02-21 Stefan <monnier@iro.umontreal.ca>
2 18
3 * keymap.h: Declare Fcurrent_active_maps, used in doc.c. 19 * keymap.h: Declare Fcurrent_active_maps, used in doc.c.
diff --git a/src/buffer.c b/src/buffer.c
index ae390ba7500..3394e1dead2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,6 +1,6 @@
1/* Buffer manipulation primitives for GNU Emacs. 1/* Buffer manipulation primitives for GNU Emacs.
2 Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 03, 2004 2 Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99,
3 Free Software Foundation, Inc. 3 2000, 01, 02, 03, 04, 2005 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -3830,7 +3830,8 @@ DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0,
3830} 3830}
3831 3831
3832DEFUN ("overlay-buffer", Foverlay_buffer, Soverlay_buffer, 1, 1, 0, 3832DEFUN ("overlay-buffer", Foverlay_buffer, Soverlay_buffer, 1, 1, 0,
3833 doc: /* Return the buffer OVERLAY belongs to. */) 3833 doc: /* Return the buffer OVERLAY belongs to.
3834Return nil if OVERLAY has been deleted. */)
3834 (overlay) 3835 (overlay)
3835 Lisp_Object overlay; 3836 Lisp_Object overlay;
3836{ 3837{
diff --git a/src/minibuf.c b/src/minibuf.c
index 463c083cb5e..b45e804feb5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1186,13 +1186,16 @@ minibuf_conform_representation (string, basis)
1186DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, 1186DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0,
1187 doc: /* Return common substring of all completions of STRING in ALIST. 1187 doc: /* Return common substring of all completions of STRING in ALIST.
1188Each car of each element of ALIST (or each element if it is not a cons cell) 1188Each car of each element of ALIST (or each element if it is not a cons cell)
1189is tested to see if it begins with STRING. 1189is tested to see if it begins with STRING. The possible matches may be
1190strings or symbols. Symbols are converted to strings before testing,
1191see `symbol-name'.
1190All that match are compared together; the longest initial sequence 1192All that match are compared together; the longest initial sequence
1191common to all matches is returned as a string. 1193common to all matches is returned as a string.
1192If there is no match at all, nil is returned. 1194If there is no match at all, nil is returned.
1193For a unique match which is exact, t is returned. 1195For a unique match which is exact, t is returned.
1194 1196
1195If ALIST is a hash-table, all the string keys are the possible matches. 1197If ALIST is a hash-table, all the string and symbol keys are the
1198possible matches.
1196If ALIST is an obarray, the names of all symbols in the obarray 1199If ALIST is an obarray, the names of all symbols in the obarray
1197are the possible matches. 1200are the possible matches.
1198 1201
@@ -1262,7 +1265,7 @@ is used to further constrain the set of candidates. */)
1262 if (!EQ (bucket, zero)) 1265 if (!EQ (bucket, zero))
1263 { 1266 {
1264 elt = bucket; 1267 elt = bucket;
1265 eltstring = Fsymbol_name (elt); 1268 eltstring = elt;
1266 if (XSYMBOL (bucket)->next) 1269 if (XSYMBOL (bucket)->next)
1267 XSETSYMBOL (bucket, XSYMBOL (bucket)->next); 1270 XSETSYMBOL (bucket, XSYMBOL (bucket)->next);
1268 else 1271 else
@@ -1289,6 +1292,9 @@ is used to further constrain the set of candidates. */)
1289 1292
1290 /* Is this element a possible completion? */ 1293 /* Is this element a possible completion? */
1291 1294
1295 if (SYMBOLP (eltstring))
1296 eltstring = Fsymbol_name (eltstring);
1297
1292 if (STRINGP (eltstring) 1298 if (STRINGP (eltstring)
1293 && SCHARS (string) <= SCHARS (eltstring) 1299 && SCHARS (string) <= SCHARS (eltstring)
1294 && (tem = Fcompare_strings (eltstring, zero, 1300 && (tem = Fcompare_strings (eltstring, zero,
@@ -1445,10 +1451,13 @@ is used to further constrain the set of candidates. */)
1445DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0, 1451DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0,
1446 doc: /* Search for partial matches to STRING in ALIST. 1452 doc: /* Search for partial matches to STRING in ALIST.
1447Each car of each element of ALIST (or each element if it is not a cons cell) 1453Each car of each element of ALIST (or each element if it is not a cons cell)
1448is tested to see if it begins with STRING. 1454is tested to see if it begins with STRING. The possible matches may be
1455strings or symbols. Symbols are converted to strings before testing,
1456see `symbol-name'.
1449The value is a list of all the strings from ALIST that match. 1457The value is a list of all the strings from ALIST that match.
1450 1458
1451If ALIST is a hash-table, all the string keys are the possible matches. 1459If ALIST is a hash-table, all the string and symbol keys are the
1460possible matches.
1452If ALIST is an obarray, the names of all symbols in the obarray 1461If ALIST is an obarray, the names of all symbols in the obarray
1453are the possible matches. 1462are the possible matches.
1454 1463
@@ -1517,7 +1526,7 @@ are ignored unless STRING itself starts with a space. */)
1517 if (!EQ (bucket, zero)) 1526 if (!EQ (bucket, zero))
1518 { 1527 {
1519 elt = bucket; 1528 elt = bucket;
1520 eltstring = Fsymbol_name (elt); 1529 eltstring = elt;
1521 if (XSYMBOL (bucket)->next) 1530 if (XSYMBOL (bucket)->next)
1522 XSETSYMBOL (bucket, XSYMBOL (bucket)->next); 1531 XSETSYMBOL (bucket, XSYMBOL (bucket)->next);
1523 else 1532 else
@@ -1544,6 +1553,9 @@ are ignored unless STRING itself starts with a space. */)
1544 1553
1545 /* Is this element a possible completion? */ 1554 /* Is this element a possible completion? */
1546 1555
1556 if (SYMBOLP (eltstring))
1557 eltstring = Fsymbol_name (eltstring);
1558
1547 if (STRINGP (eltstring) 1559 if (STRINGP (eltstring)
1548 && SCHARS (string) <= SCHARS (eltstring) 1560 && SCHARS (string) <= SCHARS (eltstring)
1549 /* If HIDE_SPACES, reject alternatives that start with space 1561 /* If HIDE_SPACES, reject alternatives that start with space
diff --git a/src/window.c b/src/window.c
index f49e6cccbb7..574c348c460 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4765,6 +4765,7 @@ window_scroll_pixel_based (window, n, whole, noerror)
4765 else if (n < 0) 4765 else if (n < 0)
4766 { 4766 {
4767 int charpos, bytepos; 4767 int charpos, bytepos;
4768 int partial_p;
4768 4769
4769 /* Save our position, for the preserve_y case. */ 4770 /* Save our position, for the preserve_y case. */
4770 charpos = IT_CHARPOS (it); 4771 charpos = IT_CHARPOS (it);
@@ -4776,7 +4777,20 @@ window_scroll_pixel_based (window, n, whole, noerror)
4776 it.last_visible_y - this_scroll_margin - 1, -1, 4777 it.last_visible_y - this_scroll_margin - 1, -1,
4777 MOVE_TO_POS | MOVE_TO_Y); 4778 MOVE_TO_POS | MOVE_TO_Y);
4778 4779
4779 if (IT_CHARPOS (it) == PT) 4780 /* Save our position, in case it's correct. */
4781 charpos = IT_CHARPOS (it);
4782 bytepos = IT_BYTEPOS (it);
4783
4784 /* See if point is on a partially visible line at the end. */
4785 if (it.what == IT_EOB)
4786 partial_p = it.current_y + it.ascent + it.descent > it.last_visible_y;
4787 else
4788 {
4789 move_it_by_lines (&it, 1, 1);
4790 partial_p = it.current_y > it.last_visible_y;
4791 }
4792
4793 if (charpos == PT && !partial_p)
4780 /* We found PT before we found the display margin, so PT is ok. */ 4794 /* We found PT before we found the display margin, so PT is ok. */
4781 ; 4795 ;
4782 else if (preserve_y >= 0) 4796 else if (preserve_y >= 0)
@@ -4797,14 +4811,7 @@ window_scroll_pixel_based (window, n, whole, noerror)
4797 } 4811 }
4798 else 4812 else
4799 { 4813 {
4800 /* Save our position, in case it's correct. */ 4814 if (partial_p)
4801 charpos = IT_CHARPOS (it);
4802 bytepos = IT_BYTEPOS (it);
4803
4804 /* See if point is on a partially visible line at the end. */
4805 move_it_by_lines (&it, 1, 1);
4806
4807 if (it.current_y > it.last_visible_y)
4808 /* The last line was only partially visible, so back up two 4815 /* The last line was only partially visible, so back up two
4809 lines to make sure we're on a fully visible line. */ 4816 lines to make sure we're on a fully visible line. */
4810 { 4817 {
diff --git a/src/xdisp.c b/src/xdisp.c
index c05e57cf7e1..671b20683e8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20776,7 +20776,7 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop)
20776 have a STOP object and previous row's end glyph came from STOP. */ 20776 have a STOP object and previous row's end glyph came from STOP. */
20777 if (!NILP (stop)) 20777 if (!NILP (stop))
20778 { 20778 {
20779 struct glyph_row *prev = row-1; 20779 struct glyph_row *prev;
20780 while ((prev = row - 1, prev >= first) 20780 while ((prev = row - 1, prev >= first)
20781 && MATRIX_ROW_END_CHARPOS (prev) == charpos 20781 && MATRIX_ROW_END_CHARPOS (prev) == charpos
20782 && prev->used[TEXT_AREA] > 0) 20782 && prev->used[TEXT_AREA] > 0)
@@ -20785,8 +20785,8 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop)
20785 glyph = end + prev->used[TEXT_AREA]; 20785 glyph = end + prev->used[TEXT_AREA];
20786 while (--glyph >= end 20786 while (--glyph >= end
20787 && INTEGERP (glyph->object)); 20787 && INTEGERP (glyph->object));
20788 if (glyph >= end 20788 if (glyph < end
20789 && !EQ (stop, glyph->object)) 20789 || !EQ (stop, glyph->object))
20790 break; 20790 break;
20791 row = prev; 20791 row = prev;
20792 } 20792 }