aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-01-22 15:37:19 +0000
committerKaroly Lorentey2004-01-22 15:37:19 +0000
commit2a36494c42a1963846ea8c2dde48a7450d433c2a (patch)
tree59be675dcc23b117a04a5b16cc82d73bcb6abbc9
parente9cda8277618ce4e2644e852539474b7b67f09e3 (diff)
parente555f8d5a4cfa2a1496ed61795ab6dc143600698 (diff)
downloademacs-2a36494c42a1963846ea8c2dde48a7450d433c2a.tar.gz
emacs-2a36494c42a1963846ea8c2dde48a7450d433c2a.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-33 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-34 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-35 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-36 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-37 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-38 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-39 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-40 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-41 Make fringe-drawing stuff compile without a window-system * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-42 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-43 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-44 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-45 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-46 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-47 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-48 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-49 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-50 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-59
-rw-r--r--etc/NEWS49
-rw-r--r--leim/ChangeLog6
-rw-r--r--leim/quail/cyrillic.el27
-rw-r--r--lib-src/emacsclient.c19
-rw-r--r--lisp/ChangeLog318
-rw-r--r--lisp/calendar/appt.el6
-rw-r--r--lisp/calendar/diary-lib.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el8
-rw-r--r--lisp/emacs-lisp/cl.el7
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/gnus/mm-util.el2
-rw-r--r--lisp/language/cyrillic.el10
-rw-r--r--lisp/loadhist.el4
-rw-r--r--lisp/mail/mail-utils.el55
-rw-r--r--lisp/mail/rmail-spam-filter.el1
-rw-r--r--lisp/mail/rmail.el125
-rw-r--r--lisp/mail/smtpmail.el35
-rw-r--r--lisp/mwheel.el4
-rw-r--r--lisp/outline.el10
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/scheme.el2
-rw-r--r--lisp/progmodes/which-func.el3
-rw-r--r--lisp/subr.el49
-rw-r--r--lisp/term/x-win.el23
-rw-r--r--lisp/textmodes/texinfo.el17
-rw-r--r--lisp/vc-cvs.el10
-rw-r--r--lisp/vc-mcvs.el25
-rw-r--r--lisp/vc.el256
-rw-r--r--lispref/ChangeLog20
-rw-r--r--lispref/compile.texi62
-rw-r--r--lispref/edebug.texi4
-rw-r--r--lispref/files.texi6
-rw-r--r--lispref/lists.texi17
-rw-r--r--lispref/macros.texi25
-rw-r--r--mac/ChangeLog9
-rw-r--r--mac/INSTALL4
-rw-r--r--mac/src/Emacs.r4
-rw-r--r--man/files.texi40
-rw-r--r--src/.gitignore9
-rw-r--r--src/ChangeLog220
-rw-r--r--src/alloc.c35
-rw-r--r--src/buffer.c22
-rw-r--r--src/buffer.h3
-rw-r--r--src/dired.c6
-rw-r--r--src/dispextern.h44
-rw-r--r--src/dispnew.c37
-rw-r--r--src/fontset.c3
-rw-r--r--src/keyboard.c96
-rw-r--r--src/lisp.h81
-rw-r--r--src/lread.c3
-rw-r--r--src/macterm.c40
-rw-r--r--src/process.c8
-rw-r--r--src/s/darwin.h5
-rw-r--r--src/search.c10
-rw-r--r--src/w32term.c34
-rw-r--r--src/xdisp.c644
-rw-r--r--src/xterm.c38
57 files changed, 2030 insertions, 576 deletions
diff --git a/etc/NEWS b/etc/NEWS
index aae7f497103..46e667a47c1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -14,6 +14,9 @@ so we will look at it and add it to the manual.
14 14
15* Installation Changes in Emacs 21.4 15* Installation Changes in Emacs 21.4
16 16
17---
18** A Bulgarian translation of the Emacs Tutorial is available.
19
17** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' 20** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk'
18when you run configure. This requires Gtk+ 2.0 or newer. This port 21when you run configure. This requires Gtk+ 2.0 or newer. This port
19provides a way to display multilingual text in menus (with some caveats). 22provides a way to display multilingual text in menus (with some caveats).
@@ -79,10 +82,32 @@ See the files mac/README and mac/INSTALL for build instructions.
79 82
80--- 83---
81** A French translation of the Emacs Tutorial is available. 84** A French translation of the Emacs Tutorial is available.
85** Building with -DENABLE_CHECKING does not automatically build with union
86types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
82 87
83 88
84* Changes in Emacs 21.4 89* Changes in Emacs 21.4
85 90
91** On window systems, lines which are exactly as wide as the window
92(not counting the final newline character) are no longer broken into
93two lines on the display (with just the newline on the second line).
94Instead, the newline now "overflows" into the right fringe, and the
95cursor will be displayed in the fringe when positioned on that newline.
96
97The new user option 'overflow-newline-into-fringe' may be set to nil to
98revert to the old behaviour of continuing such lines.
99
100** The buffer boundaries (i.e. first and last line in the buffer) may now
101be marked with bitmaps in the fringes. In addition, up and down
102arrow bitmaps may be shown at the top and bottom of the right fringe
103if the window can be scrolled in either direction.
104
105This behavior is activated by setting the buffer-local variable
106`indicate-buffer-boundaries' to a non-nil value. If value is t, both
107boundaries and scrolling arrows are shown; any other non-nil value
108shows only the buffer boundaries. The default value of this variable
109is found in `default-indicate-buffer-boundaries'.
110
86** New command `display-local-help' displays any local help at point 111** New command `display-local-help' displays any local help at point
87in the echo area. It is bound to `C-h .'. It normally displays the 112in the echo area. It is bound to `C-h .'. It normally displays the
88same string that would be displayed on mouse-over using the 113same string that would be displayed on mouse-over using the
@@ -1526,6 +1551,21 @@ use for the modifiers. For example, the following two lines swap
1526Meta and Alt: 1551Meta and Alt:
1527 (setq x-alt-keysym 'meta) 1552 (setq x-alt-keysym 'meta)
1528 (setq x-meta-keysym 'alt) 1553 (setq x-meta-keysym 'alt)
1554
1555+++
1556** vc-annotate-mode enhancements
1557
1558In vc-annotate mode, you can now use the following key bindings for
1559enhanced functionality to browse the annotations of past revisions, or
1560to view diffs or log entries directly from vc-annotate-mode:
1561
1562 P: annotates the previous revision
1563 N: annotates the next revision
1564 J: annotates the revision at line
1565 A: annotates the revision previous to line
1566 D: shows the diff of the revision at line with its previous revision
1567 L: shows the log of the revision at line
1568 W: annotates the workfile (most up to date) version
1529 1569
1530* New modes and packages in 21.4 1570* New modes and packages in 21.4
1531 1571
@@ -1750,6 +1790,15 @@ configuration files.
1750 1790
1751* Lisp Changes in Emacs 21.4 1791* Lisp Changes in Emacs 21.4
1752 1792
1793+++
1794** New function `delete-dups' destructively removes `equal' duplicates
1795from a list. Of several `equal' occurrences of an element in the list,
1796the last one is kept.
1797
1798+++
1799** `declare' is now a macro. This change was made mostly for
1800documentation purposes and should have no real effect on Lisp code.
1801
1753** The new hook `before-save-hook' is invoked by `basic-save-buffer' 1802** The new hook `before-save-hook' is invoked by `basic-save-buffer'
1754before saving buffers. This allows packages to perform various final 1803before saving buffers. This allows packages to perform various final
1755tasks, for example; it can be used by the copyright package to make 1804tasks, for example; it can be used by the copyright package to make
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 2d1e5fefafa..adf72efb696 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,9 @@
12004-01-22 Ognyan Kulev <ogi@fmi.uni-sofia.bg> (tiny change)
2
3 * quail/cyrillic.el ("bulgarian-phonetic"): Docstring fixed.
4 Duplicated entry removed.
5 ("bulgarian-bds"): Docstring fixed.
6
12003-10-06 Dave Love <fx@gnu.org> 72003-10-06 Dave Love <fx@gnu.org>
2 8
3 * quail/latin-ltx.el: Several additions. 9 * quail/latin-ltx.el: Several additions.
diff --git a/leim/quail/cyrillic.el b/leim/quail/cyrillic.el
index ef7a3323a22..4777bf9ba1f 100644
--- a/leim/quail/cyrillic.el
+++ b/leim/quail/cyrillic.el
@@ -1169,12 +1169,15 @@ Unicode based."
1169The layout is similar to `cyrillic-translit', but all Bulgarian 1169The layout is similar to `cyrillic-translit', but all Bulgarian
1170characters are typed with a single key. 1170characters are typed with a single key.
1171 1171
1172Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B." 1172Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B.
1173
1174The letters $,1(G(B, $,1(H(B, $,1(I(B and $,1(N(B are not affected by Caps Lock."
1173 nil t t t t nil nil nil nil nil t) 1175 nil t t t t nil nil nil nil nil t)
1174 1176
1175;; $,1(O(B $,1(2(B $,1(5(B $,1(@(B $,1(B(B $,1(J(B $,1(C(B $,1(8(B $,1(>(B $,1(?(B $,1(H(B $,1(I(B 1177;; $,1(G(B
1176;; $,1(0(B $,1(A(B $,1(4(B $,1(D(B $,1(3(B $,1(E(B $,1(9(B $,1(:(B $,1(;(B $,1(G(B 1178;; $,1(O(B $,1(2(B $,1(5(B $,1(@(B $,1(B(B $,1(J(B $,1(C(B $,1(8(B $,1(>(B $,1(?(B $,1(H(B $,1(I(B
1177;; $,1(N(B $,1(7(B $,1(L(B $,1(F(B $,1(6(B $,1(1(B $,1(=(B $,1(<(B 1179;; $,1(0(B $,1(A(B $,1(4(B $,1(D(B $,1(3(B $,1(E(B $,1(9(B $,1(:(B $,1(;(B $,1(N(B
1180;; $,1(7(B $,1(L(B $,1(F(B $,1(6(B $,1(1(B $,1(=(B $,1(<(B
1178 1181
1179(quail-define-rules 1182(quail-define-rules
1180 ("/&" ?,A'(B) 1183 ("/&" ?,A'(B)
@@ -1238,7 +1241,6 @@ Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B."
1238 ("y" ?$,1(j(B) 1241 ("y" ?$,1(j(B)
1239 ("x" ?$,1(l(B) 1242 ("x" ?$,1(l(B)
1240 ("\\" ?$,1(n(B) 1243 ("\\" ?$,1(n(B)
1241 ("|" ?$,1(N(B)
1242 ("q" ?$,1(o(B)) 1244 ("q" ?$,1(o(B))
1243 1245
1244;; Based on an implementation by Ognyan Kulev <ogi@fmi.uni-sofia.bg>. 1246;; Based on an implementation by Ognyan Kulev <ogi@fmi.uni-sofia.bg>.
@@ -1248,13 +1250,18 @@ Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B."
1248 "bulgarian-bds" "Bulgarian" "$,1(1(4(A(B" nil 1250 "bulgarian-bds" "Bulgarian" "$,1(1(4(A(B" nil
1249 "Bulgarian standard keyboard layout (BDS) 1251 "Bulgarian standard keyboard layout (BDS)
1250 1252
1251This keyboard layout is standard for Bulgarian typewriters." 1253This keyboard layout is standard for Bulgarian typewriters.
1254
1255The letters $,1(F(B, $,1(<(B, $,1(G(B, $,1(@(B, $,1(;(B, $,1(1(B and $,1(K(B are not affected by Caps Lock.
1256
1257In addition to original bulgarian typewriter layout, keys \ and |
1258are transformed into ' and $,1(K(B respectively."
1252 nil t t t t nil nil nil nil nil t) 1259 nil t t t t nil nil nil nil nil t)
1253 1260
1254;; 1! 2? 3+ 4" 5% 6= 7: 8/ 9_ 0$,1uV(B -I .V 1261;; () 1! 2? 3+ 4" 5% 6= 7: 8/ 9_ 0$,1uV(B -I .V
1255;; ,$,1(k(B $,1(C(B $,1(5(B $,1(8(B $,1(H(B $,1(I(B $,1(:(B $,1(A(B $,1(4(B $,1(7(B $,1(F(B ;,A'(B 1262;; ,$,1(k(B $,1(C(B $,1(5(B $,1(8(B $,1(H(B $,1(I(B $,1(:(B $,1(A(B $,1(4(B $,1(7(B $,1(F(B ;,A'(B
1256;; $,1(l(B $,1(O(B $,1(0(B $,1(>(B $,1(6(B $,1(3(B $,1(B(B $,1(=(B $,1(2(B $,1(<(B $,1(G(B () 1263;; $,1(l(B $,1(O(B $,1(0(B $,1(>(B $,1(6(B $,1(3(B $,1(B(B $,1(=(B $,1(2(B $,1(<(B $,1(G(B '$,1(K(B
1257;; $,1(N(B $,1(9(B $,1(J(B $,1(M(B $,1(D(B $,1(E(B $,1(?(B $,1(@(B $,1(;(B $,1(1(B 1264;; $,1(N(B $,1(9(B $,1(J(B $,1(M(B $,1(D(B $,1(E(B $,1(?(B $,1(@(B $,1(;(B $,1(1(B
1258 1265
1259(quail-define-rules 1266(quail-define-rules
1260 1267
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index cfbf73a20c7..6cf07d35e8a 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1,5 +1,5 @@
1/* Client process that communicates with GNU Emacs acting as server. 1/* Client process that communicates with GNU Emacs acting as server.
2 Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003 2 Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -438,9 +438,10 @@ main (argc, argv)
438 438
439 { 439 {
440 int sock_status = 0; 440 int sock_status = 0;
441 int default_sock = !socket_name;
441 int saved_errno = 0; 442 int saved_errno = 0;
442 443
443 if (! socket_name) 444 if (default_sock)
444 { 445 {
445 socket_name = alloca (system_name_length + 100); 446 socket_name = alloca (system_name_length + 100);
446 sprintf (socket_name, "/tmp/emacs%d-%s/server", 447 sprintf (socket_name, "/tmp/emacs%d-%s/server",
@@ -459,7 +460,7 @@ main (argc, argv)
459 /* See if the socket exists, and if it's owned by us. */ 460 /* See if the socket exists, and if it's owned by us. */
460 sock_status = socket_status (server.sun_path); 461 sock_status = socket_status (server.sun_path);
461 saved_errno = errno; 462 saved_errno = errno;
462 if (sock_status) 463 if (sock_status && default_sock)
463 { 464 {
464 /* Failing that, see if LOGNAME or USER exist and differ from 465 /* Failing that, see if LOGNAME or USER exist and differ from
465 our euid. If so, look for a socket based on the UID 466 our euid. If so, look for a socket based on the UID
@@ -476,8 +477,18 @@ main (argc, argv)
476 if (pw && (pw->pw_uid != geteuid ())) 477 if (pw && (pw->pw_uid != geteuid ()))
477 { 478 {
478 /* We're running under su, apparently. */ 479 /* We're running under su, apparently. */
479 sprintf (server.sun_path, "/tmp/emacs%d-%s/server", 480 sprintf (socket_name, "/tmp/emacs%d-%s/server",
480 (int) pw->pw_uid, system_name); 481 (int) pw->pw_uid, system_name);
482
483 if (strlen (socket_name) < sizeof (server.sun_path))
484 strcpy (server.sun_path, socket_name);
485 else
486 {
487 fprintf (stderr, "%s: socket-name %s too long",
488 argv[0], socket_name);
489 exit (1);
490 }
491
481 sock_status = socket_status (server.sun_path); 492 sock_status = socket_status (server.sun_path);
482 saved_errno = errno; 493 saved_errno = errno;
483 } 494 }
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7029193eec9..0073e5143ab 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,22 +1,161 @@
12004-01-22 Kenichi Handa <handa@m17n.org>
2
3 * language/cyrillic.el (ccl-encode-windows-1251-font): Rearrange
4 code point (register r1) only for charset mule-unicode-0100-24ff.
5
62004-01-21 Markus Rost <rost@mathematik.uni-bielefeld.de>
7
8 * mail/rmail.el (rmail-convert-to-babyl-format): Avoid deleting
9 trailing white space and ensure a final newline.
10
11 * mail/rmail-spam-filter.el (rmail-use-spam-filter): Add autoload
12 cookie.
13
142004-01-21 Benjamin Rutt <brutt@bloomington.in.us>
15
16 * vc.el (vc-annotate-mode): Inherit from fundamental-mode and
17 activate view-mode explicitly.
18
192004-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
20
21 * term/x-win.el: Call menu-bar-enable-clipboard and make Paste
22 use clipboard first.
23
242004-01-20 Stefan Monnier <monnier@iro.umontreal.ca>
25
26 * vc-mcvs.el (vc-mcvs-mode-line-string): Remove. Does not work.
27 (vc-mcvs-workfile-version): Manually macro expand vc-mcvs-cvs.
28 (vc-mcvs-cvs): Remove.
29 (vc-mcvs-command): Remove use of assert.
30
31 * outline.el (outline-insert-heading): Tighten up match.
32 (outline-demote, outline-move-subtree-down): Don't assume anything
33 about outline-regexp.
34
35 * textmodes/texinfo.el (texinfo-mode): Remove ^ from outline-regexp.
36 (texinfo-show-structure): Explicitly add ^, and simplify.
37
382004-01-20 Glenn Morris <gmorris@ast.cam.ac.uk>
39
40 * calendar/appt.el (appt-check): Restore usage of
41 appt-issue-message deleted in previous change.
42 (top-level): Activate package when loaded (needed for backwards
43 compatibility).
44
452004-01-20 Jesper Harder <harder@ifa.au.dk>
46
47 * mail/smtpmail.el (smtpmail-via-smtp): No need to add two bytes
48 following previous change to smtpmail-send-data.
49
502004-01-20 Benjamin Rutt <brutt@bloomington.in.us>
51
52 * vc.el (vc-default-previous-version): Doc enhancement.
53 (vc-default-next-version): New function.
54 (vc-print-log): New arg FOCUS-REV.
55 (vc-annotate-mode): Derive from view-mode.
56 (vc-annotate): New args REVISION, DISPLAY-MODE.
57 (vc-annotate-workfile-version, vc-annotate-extract-revision-at-line)
58 (vc-annotate-revision-at-line, vc-annotate-revision-previous-to-line)
59 (vc-annotate-show-log-revision-at-line, vc-annotate-warp-version)
60 (vc-annotate-show-diff-revision-at-line, vc-current-line)
61 (vc-annotate-prev-version, vc-annotate-next-version): New functions.
62
63 * vc-cvs.el (vc-cvs-annotate-extract-revision-at-line): New function.
64
652004-01-19 Karl Berry <karl@gnu.org>
66
67 * textmodes/texinfo.el: Use "Texinfo" consistently, no "TeXinfo"
68 or "TexInfo".
69
702004-01-19 Luc Teirlinck <teirllm@auburn.edu>
71
72 * subr.el (delete-dups): New function.
73
742004-01-19 Karl Berry <karl@gnu.org>
75
76 * textmodes/texinfo.el (texinfo-mode): Define outline-regexp to start
77 with ^, since that's what texinfo-show-structure
78 documentation says (plus it works much better in texinfo.txi).
79
802004-01-18 Jesper Harder <harder@ifa.au.dk>
81
82 * mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline.
83
842004-01-18 David Ponce <david@dponce.com> (tiny change)
85
86 * progmodes/which-func.el (which-function-mode): Don't cancel
87 which-func-update-timer if not set.
88
892004-01-17 Thien-Thi Nguyen <ttn@gnu.org>
90
91 * calendar/diary-lib.el (diary-entry-time): Fix typo/bug:
92 Remove spurious left square bracket in XX:XXam regexp.
93
942004-01-16 Luc Teirlinck <teirllm@auburn.edu>
95
96 * progmodes/cc-defs.el: Do not require cl at run time.
97
982004-01-16 Richard M. Stallman <rms@gnu.org>
99
100 * emacs-lisp/cl.el (cl-cannot-unload): New function.
101 (cl-unload-hook): Defvar this to run cl-cannot-unload.
102
103 * mail/rmail.el (rmail-get-new-mail): New local rsf-number-of-spam.
104 Call rmail-spam-filter. Delete and expunge spam.
105 Print number of spam messages deleted.
106 Save and restore the deletion status of old messages when reading
107 new mail with spam filter, so that expunging spam does not expunge
108 msgs deleted by the user.
109 (rmail-only-expunge): Add an optional argument dont-show to
110 prevent showing message after expunge.
111
1122004-01-15 Luc Teirlinck <teirllm@auburn.edu>
113
114 * emacs-lisp/cl.el (declare): Add `fmakunbound' for `declare'.
115 * subr.el (declare): New macro.
116
1172004-01-15 Thien-Thi Nguyen <ttn@gnu.org>
118
119 * progmodes/scheme.el (scheme-font-lock-keywords-2): Add "force".
120
1212004-01-14 Stefan Monnier <monnier@iro.umontreal.ca>
122
123 * mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event):
124 Test window-system rather than system-type (for X11/Mac).
125
1262004-01-12 Luc Teirlinck <teirllm@auburn.edu>
127
128 * emacs-lisp/bytecomp.el (compile-defun): Doc fix.
129
1302004-01-12 Richard M. Stallman <rms@gnu.org>
131
132 * mail/rmail.el (rmail-convert-to-babyl-format):
133 Use mail-unquote-printable-region.
134 (rmail-hex-string-to-integer, rmail-decode-quoted-printable):
135 (rmail-hex-char-to-integer): Functions deleted.
136
137 * mail/mail-utils.el (mail-unquote-printable-hexdigit): Upcase CHAR.
138 (mail-unquote-printable-region): New arg NOERROR.
139 For invalid encoding, either signal an error to just return nil.
140
12004-01-11 Glenn Morris <gmorris@ast.cam.ac.uk> 1412004-01-11 Glenn Morris <gmorris@ast.cam.ac.uk>
2 142
3 * calendar/appt.el: Update copyright and commentary. 143 * calendar/appt.el: Update copyright and commentary.
4 (appt-issue-message): Delete (see appt-activate). 144 (appt-issue-message): Make obsolete.
5 (appt-visible, appt-msg-window): Make obsolete, in favour of 145 (appt-visible, appt-msg-window): Make obsolete, in favour of
6 appt-display-format. 146 appt-display-format.
7 (appt-display-mode-line, appt-display-duration) 147 (appt-display-mode-line, appt-display-duration)
8 (appt-display-diary, appt-time-msg-list, appt-mode-string) 148 (appt-display-diary, appt-time-msg-list, appt-mode-string)
9 (appt-prev-comp-time, appt-display-count, appt-timer) 149 (appt-prev-comp-time, appt-display-count, appt-timer)
10 (appt-convert-time): Doc change. 150 (appt-convert-time): Doc change.
11 (appt-disp-window-function, appt-delete-window-function): Use 151 (appt-disp-window-function, appt-delete-window-function):
12 defcustom rather than defvar. 152 Use defcustom rather than defvar.
13 (appt-display-format): New variable. 153 (appt-display-format): New variable.
14 (appt-display-message): New function with display code from 154 (appt-display-message): New function with display code from appt-check.
15 appt-check. 155 (appt-check): Add optional FORCE argument. Doc change.
16 (appt-check): Add optional FORCE argument. Doc change. Add 156 Add appt-make-list to diary-hook if displaying diary.
17 appt-make-list to diary-hook if displaying diary. Remove 157 Remove checking of view-diary-entries-initially.
18 checking of view-diary-entries-initially. Message 158 Message display section removed to new function appt-display-message.
19 display section removed to new function appt-display-message.
20 (appt-display-window): Doc change. Remove unused internal var 159 (appt-display-window): Doc change. Remove unused internal var
21 this-buffer. Do not beep, since appt-display-message does that. 160 this-buffer. Do not beep, since appt-display-message does that.
22 (appt-make-list): Doc change. Use caar. 161 (appt-make-list): Doc change. Use caar.
@@ -27,12 +166,10 @@
27 functionality. 166 functionality.
28 167
29 * calendar/cal-x.el: (calendar-one-frame-setup) 168 * calendar/cal-x.el: (calendar-one-frame-setup)
30 (calendar-only-one-frame-setup, calendar-two-frame-setup): Doc 169 (calendar-only-one-frame-setup, calendar-two-frame-setup): Doc change.
31 change.
32 170
33 * calendar/calendar.el: Update copyright. 171 * calendar/calendar.el: Update copyright.
34 (view-diary-entries-initially, european-calendar-style): Doc 172 (view-diary-entries-initially, european-calendar-style): Doc change.
35 change.
36 (calendar-setup): Make defcustom rather than defvar. 173 (calendar-setup): Make defcustom rather than defvar.
37 (mark-visible-calendar-date): Initialize temp-face and faceinfo 174 (mark-visible-calendar-date): Initialize temp-face and faceinfo
38 in let binding so local to function. 175 in let binding so local to function.
@@ -71,8 +208,7 @@
71 208
722004-01-07 Nick Roberts <nick@nick.uklinux.net> 2092004-01-07 Nick Roberts <nick@nick.uklinux.net>
73 210
74 * progmodes/gud.el (gdb-first-prompt): Renamed from 211 * progmodes/gud.el (gdb-first-prompt): Rename from gdb-first-pre-prompt
75 gdb-first-pre-prompt
76 212
77 * gdb-ui.el (gdba): Avoid duplication, use gdb-ann3. 213 * gdb-ui.el (gdba): Avoid duplication, use gdb-ann3.
78 (gdb-ann3): Use GDB command "set width 0" to prevent word wrapping 214 (gdb-ann3): Use GDB command "set width 0" to prevent word wrapping
@@ -140,7 +276,7 @@
140 276
141 * textmodes/tex-mode.el (latex-find-indent): Avoid error at end of buf. 277 * textmodes/tex-mode.el (latex-find-indent): Avoid error at end of buf.
142 278
143 * emacs-lisp/lisp-mnt.el (lm-section-end): require outline. 279 * emacs-lisp/lisp-mnt.el (lm-section-end): Require outline.
144 280
145 * progmodes/grep.el (grep-mode-map): 281 * progmodes/grep.el (grep-mode-map):
146 Don't remap next-line, previous-line. 282 Don't remap next-line, previous-line.
@@ -219,9 +355,9 @@
219 gud-n.*, gud-ni.*, gud-s.*, and gud-si.*, respectively, to avoid 355 gud-n.*, gud-ni.*, gud-s.*, and gud-si.*, respectively, to avoid
220 file-name clashes on 8+3 filesystems. 356 file-name clashes on 8+3 filesystems.
221 357
222 * emacs-lisp/tcover-unsafep.el, emacs-lisp/tcover-ses.el: Renamed 358 * emacs-lisp/tcover-unsafep.el, emacs-lisp/tcover-ses.el:
223 from testcover-unsafep.el and testcover-ses.el to avoid file-name 359 Renamed from testcover-unsafep.el and testcover-ses.el to avoid
224 clashes on 8+3 DOS filesystems. 360 file-name clashes on 8+3 DOS filesystems.
225 361
2262003-12-29 Richard M. Stallman <rms@gnu.org> 3622003-12-29 Richard M. Stallman <rms@gnu.org>
227 363
@@ -334,7 +470,7 @@
334 470
335 * xml.el (xml-get-attribute-or-nil): New function, like 471 * xml.el (xml-get-attribute-or-nil): New function, like
336 xml-get-attribute, but returns nil if the attribute was not found. 472 xml-get-attribute, but returns nil if the attribute was not found.
337 (xml-get-attribute): Converted to defsubst, uses 473 (xml-get-attribute): Convert to defsubst, uses
338 xml-get-attribute-or-nil. 474 xml-get-attribute-or-nil.
339 475
3402003-12-29 Eli Zaretskii <eliz@elta.co.il> 4762003-12-29 Eli Zaretskii <eliz@elta.co.il>
@@ -370,8 +506,8 @@
370 506
3712003-12-29 Kenichi Handa <handa@m17n.org> 5072003-12-29 Kenichi Handa <handa@m17n.org>
372 508
373 * international/mule-cmds.el (reset-language-environment): Call 509 * international/mule-cmds.el (reset-language-environment):
374 set-overriding-fontspec-internal with nil. 510 Call set-overriding-fontspec-internal with nil.
375 (set-language-environment): Call set-overriding-fontspec-internal 511 (set-language-environment): Call set-overriding-fontspec-internal
376 if the language environment specify `overriding-fontspec'. 512 if the language environment specify `overriding-fontspec'.
377 (language-info-alist): Doc added. 513 (language-info-alist): Doc added.
@@ -461,12 +597,12 @@
461 597
4622003-12-24 Kenichi Handa <handa@m17n.org> 5982003-12-24 Kenichi Handa <handa@m17n.org>
463 599
464 * international/mule-cmds.el (set-default-coding-systems): Call 600 * international/mule-cmds.el (set-default-coding-systems):
465 ucs-set-table-for-input for all buffers that don't have local 601 Call ucs-set-table-for-input for all buffers that don't have local
466 value of buffer-file-coding-system. 602 value of buffer-file-coding-system.
467 603
468 * international/ucs-tables.el (ucs-set-table-for-input): If 604 * international/ucs-tables.el (ucs-set-table-for-input):
469 translation-table-for-encode is a symbol, get its 605 If translation-table-for-encode is a symbol, get its
470 translation-table property. 606 translation-table property.
471 607
4722003-12-23 Luc Teirlinck <teirllm@auburn.edu> 6082003-12-23 Luc Teirlinck <teirllm@auburn.edu>
@@ -475,11 +611,11 @@
475 to `completing-read' on a recently fixed bug. 611 to `completing-read' on a recently fixed bug.
476 612
477 * fringe.el (fringe-query-style): Suggest `?' in minibuffer prompt, 613 * fringe.el (fringe-query-style): Suggest `?' in minibuffer prompt,
478 instead of SPACE, to get the list of possible fringe modes. SPACE 614 instead of SPACE, to get the list of possible fringe modes.
479 only works if both `partial-completion-mode' and 615 SPACE only works if both `partial-completion-mode' and
480 `completion-auto-help' are nil. 616 `completion-auto-help' are nil.
481 617
482 * complete.el (PC-is-complete-p): delete. 618 * complete.el (PC-is-complete-p): Delete.
483 (PC-do-completion): Replace all calls to `PC-is-complete-p' with 619 (PC-do-completion): Replace all calls to `PC-is-complete-p' with
484 calls to `test-completion'. 620 calls to `test-completion'.
485 621
@@ -490,17 +626,15 @@
490 626
491 * gdb-ui.el (gdba, gdb-assembler-mode): Call the mode "Machine" as 627 * gdb-ui.el (gdba, gdb-assembler-mode): Call the mode "Machine" as
492 a mode called "Assembler" already exists. 628 a mode called "Assembler" already exists.
493 (gdb-use-colon-colon-notation, gdb-show-changed-values): New 629 (gdb-use-colon-colon-notation, gdb-show-changed-values): New options.
494 options. 630 (gud-watch): Use format option. Remove font properties from string.
495 (gud-watch): Use format option. Remove font properties from 631 (gdb-var-create-handler, gdb-var-list-children-handler):
496 string. 632 Don't bother about properties as there are none.
497 (gdb-var-create-handler, gdb-var-list-children-handler): Don't
498 bother about properties as there are none.
499 (gdb-var-create-handler, gdb-var-list-children-handler) 633 (gdb-var-create-handler, gdb-var-list-children-handler)
500 (gdb-var-update-handler): Call gdb-var-evaluate-expression-handler 634 (gdb-var-update-handler): Call gdb-var-evaluate-expression-handler
501 with two arguments. 635 with two arguments.
502 (gdb-var-evaluate-expression-handler, gdb-post-prompt): Let 636 (gdb-var-evaluate-expression-handler, gdb-post-prompt):
503 speedbar show value changes with a different font. 637 Let speedbar show value changes with a different font.
504 (gdb-edit-value): New defun. 638 (gdb-edit-value): New defun.
505 (gdb-clear-partial-output, gdb-clear-inferior-io) 639 (gdb-clear-partial-output, gdb-clear-inferior-io)
506 (def-gdb-auto-update-handler): Use erase-buffer. 640 (def-gdb-auto-update-handler): Use erase-buffer.
@@ -523,11 +657,10 @@
523 (widget-type-default-get, widget-type-match): New functions. 657 (widget-type-default-get, widget-type-match): New functions.
524 (lazy): New widget. 658 (lazy): New widget.
525 (menu-choice, checklist, radio-button-choice, editable-list) 659 (menu-choice, checklist, radio-button-choice, editable-list)
526 (group, documentation-string): Removed redundant (per 2003-10-25 660 (group, documentation-string): Remove redundant (per 2003-10-25
527 change) calls to `widget-children-value-delete'. 661 change) calls to `widget-children-value-delete'.
528 (widget-choice-value-get, widget-choice-value-inline): Removed 662 (widget-choice-value-get, widget-choice-value-inline): Remove.
529 functions. 663 (menu-choice): Update widget.
530 (menu-choice): Updated widget.
531 664
5322003-12-03 Kenichi Handa <handa@m17n.org> 6652003-12-03 Kenichi Handa <handa@m17n.org>
533 666
@@ -581,19 +714,18 @@
581 parameter for backward compatibility reasons. 714 parameter for backward compatibility reasons.
582 (tramp-perl-file-attributes): Add a new parameter to Perl script 715 (tramp-perl-file-attributes): Add a new parameter to Perl script
583 in order to handle uid/gid as strings, if desired. 716 in order to handle uid/gid as strings, if desired.
584 (tramp-handle-file-truename, tramp-handle-file-symlink-p): Apply 717 (tramp-handle-file-truename, tramp-handle-file-symlink-p):
585 `file-attributes' instead of `tramp-handle-file-attributes' in 718 Apply `file-attributes' instead of `tramp-handle-file-attributes' in
586 order to make the function more general. 719 order to make the function more general.
587 (tramp-handle-file-attributes): Replace proprietary optional 720 (tramp-handle-file-attributes): Replace proprietary optional
588 parameter NONNUMERIC by the recently (Emacs 21.4) introduced 721 parameter NONNUMERIC by the recently (Emacs 21.4) introduced ID-FORMAT.
589 ID-FORMAT.
590 (tramp-handle-file-attributes-with-perl): Handle parameter 722 (tramp-handle-file-attributes-with-perl): Handle parameter
591 NONNUMERIC if set. This wasn't done in the past. 723 NONNUMERIC if set. This wasn't done in the past.
592 (tramp-post-connection): Apply second parameter "$2" if 724 (tramp-post-connection): Apply second parameter "$2" if
593 `tramp-remote-perl' is called. 725 `tramp-remote-perl' is called.
594 726
595 * net/tramp-smb.el (tramp-smb-handle-delete-file): Correct 727 * net/tramp-smb.el (tramp-smb-handle-delete-file):
596 cut'n'waste error (`filename' instead of `directory'). 728 Correct cut'n'waste error (`filename' instead of `directory').
597 (tramp-smb-handle-directory-files-and-attributes) 729 (tramp-smb-handle-directory-files-and-attributes)
598 (tramp-smb-handle-file-attributes): Add recently (Emacs 21.4) 730 (tramp-smb-handle-file-attributes): Add recently (Emacs 21.4)
599 introduced parameter ID-FORMAT. 731 introduced parameter ID-FORMAT.
@@ -616,8 +748,8 @@
616 748
6172003-11-30 Jonathan Yavner <jyavner@member.fsf.org> 7492003-11-30 Jonathan Yavner <jyavner@member.fsf.org>
618 750
619 * subr.el (noreturn, 1value): New macros for test coverage. See 751 * subr.el (noreturn, 1value): New macros for test coverage.
620 `testcover.el'. 752 See `testcover.el'.
621 753
622 * emacs-lisp/edebug.el: Add def-edebug-spec for `noreturn' and `1value'. 754 * emacs-lisp/edebug.el: Add def-edebug-spec for `noreturn' and `1value'.
623 755
@@ -637,10 +769,20 @@
637 769
638 * cus-start.el (all): Add use-file-dialog. 770 * cus-start.el (all): Add use-file-dialog.
639 771
7722003-11-27 Stefan Monnier <monnier@iro.umontreal.ca>
773
774 * textmodes/tex-mode.el (latex-mode): `tex-trailer' is not a regexp.
775
6402003-11-27 Kim F. Storm <storm@cua.dk> 7762003-11-27 Kim F. Storm <storm@cua.dk>
641 777
642 * subr.el (posn-object-x-y): New defun. 778 * subr.el (posn-object-x-y): New defun.
643 779
7802003-11-26 Stefan Monnier <monnier@iro.umontreal.ca>
781
782 * progmodes/make-mode.el (makefile-font-lock-syntactic-keywords):
783 Don't use `space' for \\\n.
784 Be more selective as to which # are comment-starters.
785
6442003-11-26 Luc Teirlinck <teirllm@auburn.edu> 7862003-11-26 Luc Teirlinck <teirllm@auburn.edu>
645 787
646 * subr.el (number-sequence): Improve handling of floating point 788 * subr.el (number-sequence): Improve handling of floating point
@@ -747,14 +889,19 @@
747 (breakpoint-enabled-icon, breakpoint-disabled-icon): Set :ascent 889 (breakpoint-enabled-icon, breakpoint-disabled-icon): Set :ascent
748 to 100 for icons to avoid increasing line height when shown. 890 to 100 for icons to avoid increasing line height when shown.
749 891
8922003-11-17 Jesper Harder <harder@ifa.au.dk> (tiny change)
893
894 * newcomment.el (comment-normalize-vars): Initialize properly if
895 comment-start was nil.
896
7502003-11-19 Andreas Schwab <schwab@suse.de> 8972003-11-19 Andreas Schwab <schwab@suse.de>
751 898
752 * simple.el (set-variable): Fix indentation. 899 * simple.el (set-variable): Fix indentation.
753 900
7542003-11-17 Kenichi Handa <handa@m17n.org> 9012003-11-17 Kenichi Handa <handa@m17n.org>
755 902
756 * international/latin1-disp.el (latin1-display-ucs-per-lynx): Fix 903 * international/latin1-disp.el (latin1-display-ucs-per-lynx):
757 docstring. 904 Fix docstring.
758 905
7592003-11-17 Jesper Harder <harder@ifa.au.dk> (tiny change) 9062003-11-17 Jesper Harder <harder@ifa.au.dk> (tiny change)
760 907
@@ -771,13 +918,13 @@
771 918
7722003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org> 9192003-11-16 Martin Stjernholm <bug-cc-mode@gnu.org>
773 920
774 * cc-engine.el (c-guess-continued-construct, 921 * cc-engine.el (c-guess-continued-construct)
775 c-guess-basic-syntax): Check a little more carefully if it's a 922 (c-guess-basic-syntax): Check a little more carefully if it's a
776 function declaration when an unknown construct followed by a block 923 function declaration when an unknown construct followed by a block
777 is found inside a statement context. This avoids macros followed 924 is found inside a statement context. This avoids macros followed
778 by blocks to be taken as function declarations. 925 by blocks to be taken as function declarations.
779 926
780 (c-guess-continued-construct): Changed the analysis of a statement 927 (c-guess-continued-construct): Change the analysis of a statement
781 continuation with a brace open to `substatement-block', for 928 continuation with a brace open to `substatement-block', for
782 consistency with recognized statements. 929 consistency with recognized statements.
783 930
@@ -785,9 +932,9 @@
785 start is in a position so that `c-beginning-of-statement-1' jumped 932 start is in a position so that `c-beginning-of-statement-1' jumped
786 to the beginning of the same statement. 933 to the beginning of the same statement.
787 934
788 * cc-fonts.el, cc-engine.el (c-forward-<>-arglist-recur): Don't 935 * cc-fonts.el, cc-engine.el (c-forward-<>-arglist-recur):
789 accept binary operators in the arglist if we're in a function call 936 Don't accept binary operators in the arglist if we're in a function
790 context, i.e. if `c-restricted-<>-arglists' is set. That avoids 937 call context, i.e. if `c-restricted-<>-arglists' is set. That avoids
791 template recognition in cases like "if (a < b || c > d)". 938 template recognition in cases like "if (a < b || c > d)".
792 939
793 (c-restricted-<>-arglists): New more appropriate name for 940 (c-restricted-<>-arglists): New more appropriate name for
@@ -805,7 +952,7 @@
805 instead of duplicating parts of it. This fixes bogus label 952 instead of duplicating parts of it. This fixes bogus label
806 recognition. 953 recognition.
807 954
808 * cc-align.el (c-gnu-impose-minimum): Reverted to the old method 955 * cc-align.el (c-gnu-impose-minimum): Revert to the old method
809 of checking the context in which to apply the minimum indentation, 956 of checking the context in which to apply the minimum indentation,
810 so that it isn't enforced in e.g. namespace blocks. 957 so that it isn't enforced in e.g. namespace blocks.
811 958
@@ -813,19 +960,18 @@
813 `c-gnu-impose-minimum'. It's defined close to `c-offsets-alist' 960 `c-gnu-impose-minimum'. It's defined close to `c-offsets-alist'
814 to somewhat reduce the risk of becoming stale. 961 to somewhat reduce the risk of becoming stale.
815 962
816 * cc-cmds.el, cc-engine.el (c-shift-line-indentation): Moved from 963 * cc-cmds.el, cc-engine.el (c-shift-line-indentation): Move from
817 cc-cmds to cc-engine to allow use from cc-align. 964 cc-cmds to cc-engine to allow use from cc-align.
818 965
819 * cc-engine.el (c-beginning-of-inheritance-list): Cope with fully 966 * cc-engine.el (c-beginning-of-inheritance-list): Cope with fully
820 qualified identifiers containing "::". 967 qualified identifiers containing "::".
821 968
822 * cc-defs.el (c-make-keywords-re): Added kludge for bug in 969 * cc-defs.el (c-make-keywords-re): Add kludge for bug in
823 `regexp-opt' in Emacs 20 and XEmacs when strings contain newlines. 970 `regexp-opt' in Emacs 20 and XEmacs when strings contain newlines.
824 971
825 * cc-vars.el (c-emacs-features): Use a space in front of the name 972 * cc-vars.el (c-emacs-features): Use a space in front of the name
826 of the temporary buffer. That also avoids dumping problems in 973 of the temporary buffer. That also avoids dumping problems in
827 XEmacs due to undo info being left around after the buffer is 974 XEmacs due to undo info being left around after the buffer is killed.
828 killed.
829 975
830 * cc-engine.el (c-in-knr-argdecl): Look closer at the function 976 * cc-engine.el (c-in-knr-argdecl): Look closer at the function
831 arglist to see if it's a K&R style declaration. 977 arglist to see if it's a K&R style declaration.
@@ -845,22 +991,21 @@
845 991
8462003-11-14 Thien-Thi Nguyen <ttn@gnu.org> 9922003-11-14 Thien-Thi Nguyen <ttn@gnu.org>
847 993
848 * diff-mode.el (diff-hunk-prev, diff-hunk-next): Support 994 * diff-mode.el (diff-hunk-prev, diff-hunk-next):
849 operation while narrowed, with `diff-restrict-view'. 995 Support operation while narrowed, with `diff-restrict-view'.
850 996
8512003-11-14 Thien-Thi Nguyen <ttn@gnu.org> 9972003-11-14 Thien-Thi Nguyen <ttn@gnu.org>
852 998
853 * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): Take 999 * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
854 additional optional arg NARROWFUN. For the generated functions: Add 1000 Take additional optional arg NARROWFUN. For the generated functions:
855 local var `was-narrowed-p'. Also, if NARROWFUN is specified, include 1001 Add local var `was-narrowed-p'. Also, if NARROWFUN is specified,
856 frags that arrange to check for and save narrowing state before the 1002 include frags that arrange to check for and save narrowing state before
857 move and then conditionally call NARROWFUN after the move. 1003 the move and then conditionally call NARROWFUN after the move.
858 1004
8592003-11-14 John Wiegley <johnw@newartisans.com> 10052003-11-14 John Wiegley <johnw@newartisans.com>
860 1006
861 * eshell/esh-var.el (eshell-parse-variable-ref): Added a backslash 1007 * eshell/esh-var.el (eshell-parse-variable-ref): Add a backslash
862 that was optional, but obviously missing based on surrounding 1008 that was optional, but obviously missing based on surrounding code.
863 code.
864 1009
865 * eshell/esh-cmd.el (eshell-lisp-command): Do not late-convert 1010 * eshell/esh-cmd.el (eshell-lisp-command): Do not late-convert
866 string arguments to numbers unless the whole argument was seen as 1011 string arguments to numbers unless the whole argument was seen as
@@ -868,16 +1013,16 @@
868 1013
8692003-11-14 Kenichi Handa <handa@m17n.org> 10142003-11-14 Kenichi Handa <handa@m17n.org>
870 1015
871 * international/mule.el (ctext-non-standard-encodings-alist): Fix 1016 * international/mule.el (ctext-non-standard-encodings-alist):
872 coding systems. 1017 Fix coding systems.
873 1018
8742003-11-10 Kenichi Handa <handa@m17n.org> 10192003-11-10 Kenichi Handa <handa@m17n.org>
875 1020
876 * language/kannada.el ("Kannada"): Add sample-text. 1021 * language/kannada.el ("Kannada"): Add sample-text.
877 1022
878 * language/knd-util.el (kannada-compose-region) 1023 * language/knd-util.el (kannada-compose-region)
879 (kannada-compose-string, kannada-post-read-conversion): Add 1024 (kannada-compose-string, kannada-post-read-conversion):
880 autoload cookie. 1025 Add autoload cookie.
881 1026
882 * international/quail.el (quail-completion): Change the message 1027 * international/quail.el (quail-completion): Change the message
883 "corresponding translations" to "corresponding characters". 1028 "corresponding translations" to "corresponding characters".
@@ -906,8 +1051,8 @@
906 1051
9072003-11-07 Andreas Schwab <schwab@suse.de> 10522003-11-07 Andreas Schwab <schwab@suse.de>
908 1053
909 * progmodes/autoconf.el (autoconf-font-lock-keywords): Also 1054 * progmodes/autoconf.el (autoconf-font-lock-keywords):
910 highlight AH_*. 1055 Also highlight AH_*.
911 1056
912 * xml.el (xml-parse-dtd): Fix misplaced paren. 1057 * xml.el (xml-parse-dtd): Fix misplaced paren.
913 1058
@@ -926,10 +1071,14 @@
926 1071
927 * files.el (risky-local-variable-p): Make second argument optional. 1072 * files.el (risky-local-variable-p): Make second argument optional.
928 1073
10742003-11-03 Stefan Monnier <monnier@iro.umontreal.ca>
1075
1076 * subr.el (add-hook): Fix last change.
1077
9292003-11-03 Eli Zaretskii <eliz@elta.co.il> 10782003-11-03 Eli Zaretskii <eliz@elta.co.il>
930 1079
931 * mail/rmail.el (rmail-convert-to-babyl-format): If 1080 * mail/rmail.el (rmail-convert-to-babyl-format):
932 base64-decode-region signals an error, catch it and silently 1081 If base64-decode-region signals an error, catch it and silently
933 ignore it. 1082 ignore it.
934 1083
9352003-11-01 Mark A. Hershberger <mah@everybody.org> 10842003-11-01 Mark A. Hershberger <mah@everybody.org>
@@ -938,8 +1087,7 @@
938 topmost element has closed. 1087 topmost element has closed.
939 (xml-ns-parse-ns-attrs, xml-ns-expand-el) 1088 (xml-ns-parse-ns-attrs, xml-ns-expand-el)
940 (xml-ns-expand-attr): New functions to do namespace handling. 1089 (xml-ns-expand-attr): New functions to do namespace handling.
941 (xml-intern-attrlist): Back-compatible handling of attribute 1090 (xml-intern-attrlist): Back-compatible handling of attribute names.
942 names.
943 (xml-parse-tag): Move namespace handling to seperate functions. 1091 (xml-parse-tag): Move namespace handling to seperate functions.
944 Now produces elements in the form ((:ns . "element") (attr-list) 1092 Now produces elements in the form ((:ns . "element") (attr-list)
945 children) instead of ('ns:element (attr-list) children). 1093 children) instead of ('ns:element (attr-list) children).
@@ -979,10 +1127,8 @@
979 (isearch-lazy-highlight-new-loop): Pay attention to the window's 1127 (isearch-lazy-highlight-new-loop): Pay attention to the window's
980 end (thru isearch-lazy-highlight-window-end), not only its start. 1128 end (thru isearch-lazy-highlight-window-end), not only its start.
981 1129
982 * simple.el (overriding-map-is-bound, saved-overriding-map): New 1130 * simple.el (overriding-map-is-bound, saved-overriding-map): New vars.
983 variables. 1131 (ensure-overriding-map-is-bound, restore-overriding-map): New funs.
984 (ensure-overriding-map-is-bound, restore-overriding-map): New
985 functions.
986 (universal-argument, universal-argument-more, negative-argument) 1132 (universal-argument, universal-argument-more, negative-argument)
987 (digit-argument, universal-argument-other-key): Minor changes. 1133 (digit-argument, universal-argument-other-key): Minor changes.
988 1134
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 8a92ef614ce..f6e33aeefe0 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -341,7 +341,7 @@ displayed in a window:
341 ;; get the first time off of the list 341 ;; get the first time off of the list
342 ;; and calculate the number of minutes until the appointment. 342 ;; and calculate the number of minutes until the appointment.
343 343
344 (if appt-time-msg-list 344 (if (and appt-issue-message appt-time-msg-list)
345 (let ((appt-comp-time (car (car (car appt-time-msg-list))))) 345 (let ((appt-comp-time (car (car (car appt-time-msg-list)))))
346 (setq min-to-app (- appt-comp-time cur-comp-time)) 346 (setq min-to-app (- appt-comp-time cur-comp-time))
347 347
@@ -659,6 +659,10 @@ ARG is positive, otherwise off."
659 (appt-check t)))) 659 (appt-check t))))
660 660
661 661
662;; This is needed for backwards compatibility. Feh.
663(appt-activate 1)
664
665
662(provide 'appt) 666(provide 'appt)
663 667
664;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347 668;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 28fcb50ef14..d2a0075fb71 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1118,7 +1118,7 @@ be used instead of a colon (:) to separate the hour and minute parts."
1118 (if (equal ?a (downcase (aref s (match-beginning 2)))) 1118 (if (equal ?a (downcase (aref s (match-beginning 2))))
1119 0 1200))) 1119 0 1200)))
1120 ((string-match ; Hour and minute XX:XXam or XX:XXpm 1120 ((string-match ; Hour and minute XX:XXam or XX:XXpm
1121 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.][\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) 1121 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
1122 (+ (* 100 (% (string-to-int 1122 (+ (* 100 (% (string-to-int
1123 (substring s (match-beginning 1) (match-end 1))) 1123 (substring s (match-beginning 1) (match-end 1)))
1124 12)) 1124 12))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 533e9bee364..24d2329b426 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -10,7 +10,7 @@
10 10
11;;; This version incorporates changes up to version 2.10 of the 11;;; This version incorporates changes up to version 2.10 of the
12;;; Zawinski-Furuseth compiler. 12;;; Zawinski-Furuseth compiler.
13(defconst byte-compile-version "$Revision: 2.139 $") 13(defconst byte-compile-version "$Revision: 2.141 $")
14 14
15;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
16 16
@@ -75,7 +75,7 @@
75;; User customization variables: 75;; User customization variables:
76;; 76;;
77;; byte-compile-verbose Whether to report the function currently being 77;; byte-compile-verbose Whether to report the function currently being
78;; compiled in the minibuffer; 78;; compiled in the echo area;
79;; byte-optimize Whether to do optimizations; this may be 79;; byte-optimize Whether to do optimizations; this may be
80;; t, nil, 'source, or 'byte; 80;; t, nil, 'source, or 'byte;
81;; byte-optimize-log Whether to report (in excruciating detail) 81;; byte-optimize-log Whether to report (in excruciating detail)
@@ -130,7 +130,7 @@
130;; (baz 0)) 130;; (baz 0))
131;; 131;;
132;; o It is possible to open-code a function in the same file it is defined 132;; o It is possible to open-code a function in the same file it is defined
133;; in without having to load that file before compiling it. the 133;; in without having to load that file before compiling it. The
134;; byte-compiler has been modified to remember function definitions in 134;; byte-compiler has been modified to remember function definitions in
135;; the compilation environment in the same way that it remembers macro 135;; the compilation environment in the same way that it remembers macro
136;; definitions. 136;; definitions.
@@ -1658,7 +1658,7 @@ The value is non-nil if there were no errors, nil if errors."
1658;;;###autoload 1658;;;###autoload
1659(defun compile-defun (&optional arg) 1659(defun compile-defun (&optional arg)
1660 "Compile and evaluate the current top-level form. 1660 "Compile and evaluate the current top-level form.
1661Print the result in the minibuffer. 1661Print the result in the echo area.
1662With argument, insert value in current buffer after the form." 1662With argument, insert value in current buffer after the form."
1663 (interactive "P") 1663 (interactive "P")
1664 (save-excursion 1664 (save-excursion
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index dc56262272f..b098a467f9f 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -108,6 +108,10 @@ printer proceeds to the next function on the list.
108This variable is not used at present, but it is defined in hopes that 108This variable is not used at present, but it is defined in hopes that
109a future Emacs interpreter will be able to use it.") 109a future Emacs interpreter will be able to use it.")
110 110
111(defvar cl-unload-hook '(cl-cannot-unload)
112 "Prevent unloading the feature `cl', since it does not work.")
113(defun cl-cannot-unload ()
114 (error "Cannot unload the feature `cl'"))
111 115
112;;; Predicates. 116;;; Predicates.
113 117
@@ -579,9 +583,10 @@ Keywords supported: :test :test-not :key"
579 "Non-nil means don't make CL functions autoload.") 583 "Non-nil means don't make CL functions autoload.")
580 584
581;;; Autoload the other portions of the package. 585;;; Autoload the other portions of the package.
582;; We want to replace the basic versions of dolist, dotimes below. 586;; We want to replace the basic versions of dolist, dotimes, declare below.
583(fmakunbound 'dolist) 587(fmakunbound 'dolist)
584(fmakunbound 'dotimes) 588(fmakunbound 'dotimes)
589(fmakunbound 'declare)
585(mapcar (function 590(mapcar (function
586 (lambda (set) 591 (lambda (set)
587 (let ((file (if cl-fake-autoloads "<none>" (car set)))) 592 (let ((file (if cl-fake-autoloads "<none>" (car set))))
diff --git a/lisp/files.el b/lisp/files.el
index 8519b74e104..d11839f2498 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2429,7 +2429,7 @@ This makes the buffer visit that file, and marks it as not modified.
2429 2429
2430If you specify just a directory name as FILENAME, that means to use 2430If you specify just a directory name as FILENAME, that means to use
2431the default file name but in that directory. You can also yank 2431the default file name but in that directory. You can also yank
2432the default file name into the minibuffer to edit it, using M-n. 2432the default file name into the minibuffer to edit it, using \\<minibuffer-local-map>\\[next-history-element].
2433 2433
2434If the buffer is not already visiting a file, the default file name 2434If the buffer is not already visiting a file, the default file name
2435for the output file is the buffer name. 2435for the output file is the buffer name.
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 0fbf90a8074..435deaaa875 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -454,7 +454,7 @@ If the charset is `composition', return the actual one."
454 (mm-mule-charset-to-mime-charset charset))) 454 (mm-mule-charset-to-mime-charset charset)))
455 455
456(defun mm-delete-duplicates (list) 456(defun mm-delete-duplicates (list)
457 "Simple substitute for CL `delete-duplicates', testing with `equal'." 457 "Simple substitute for CL `delete-duplicates', testing with `equal'."
458 (let (result head) 458 (let (result head)
459 (while list 459 (while list
460 (setq head (car list)) 460 (setq head (car list))
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 60ebf52fe35..dc05f24698a 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -476,11 +476,11 @@ Support for Russian using koi8-r and the russian-computer input method.")
476 (push elt ctext-non-standard-encodings-alist))) 476 (push elt ctext-non-standard-encodings-alist)))
477 477
478(define-ccl-program ccl-encode-windows-1251-font 478(define-ccl-program ccl-encode-windows-1251-font
479 '(0 479 `(0
480 ((r1 <<= 7) 480 ((if (r0 == ,(charset-id 'mule-unicode-0100-24ff))
481 (r1 += r2) 481 ((r1 <<= 7)
482 (translate-character encode-windows-1251 r0 r1) 482 (r1 += r2)))
483 ))) 483 (translate-character encode-windows-1251 r0 r1))))
484 484
485(add-to-list 'font-ccl-encoder-alist 485(add-to-list 'font-ccl-encoder-alist
486 '("microsoft-cp1251" . ccl-encode-windows-1251-font)) 486 '("microsoft-cp1251" . ccl-encode-windows-1251-font))
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index cbeaaa62600..733129fc74f 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -137,8 +137,8 @@ is nil, raise an error."
137 ;; Try to avoid losing badly when hooks installed in critical 137 ;; Try to avoid losing badly when hooks installed in critical
138 ;; places go away. (Some packages install things on 138 ;; places go away. (Some packages install things on
139 ;; `kill-buffer-hook', `activate-menubar-hook' and the like.) 139 ;; `kill-buffer-hook', `activate-menubar-hook' and the like.)
140 ;; First off, provide a clean way for package `foo' to arrange 140 ;; First off, provide a clean way for package FOO to arrange
141 ;; this by defining `foo-unload-hook'. 141 ;; this by adding hooks on the variable `FOO-unload-hook'.
142 (if unload-hook 142 (if unload-hook
143 (run-hooks unload-hook) 143 (run-hooks unload-hook)
144 ;; Otherwise, do our best. Look through the obarray for symbols 144 ;; Otherwise, do our best. Look through the obarray for symbols
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index 628b937529c..e60e8358de9 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -79,6 +79,7 @@ we add the wrapper characters =?ISO-8859-1?Q?....?=."
79 (concat result (substring string i)))))) 79 (concat result (substring string i))))))
80 80
81(defun mail-unquote-printable-hexdigit (char) 81(defun mail-unquote-printable-hexdigit (char)
82 (setq char (upcase char))
82 (if (>= char ?A) 83 (if (>= char ?A)
83 (+ (- char ?A) 10) 84 (+ (- char ?A) 10)
84 (- char ?0))) 85 (- char ?0)))
@@ -107,31 +108,41 @@ we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=."
107 (apply 'concat (nreverse (cons (substring string i) strings)))))) 108 (apply 'concat (nreverse (cons (substring string i) strings))))))
108 109
109;;;###autoload 110;;;###autoload
110(defun mail-unquote-printable-region (beg end &optional wrapper) 111(defun mail-unquote-printable-region (beg end &optional wrapper noerror)
111 "Undo the \"quoted printable\" encoding in buffer from BEG to END. 112 "Undo the \"quoted printable\" encoding in buffer from BEG to END.
112If the optional argument WRAPPER is non-nil, 113If the optional argument WRAPPER is non-nil,
113we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=." 114we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=.
115If NOERROR is non-nil, return t if successful."
114 (interactive "r\nP") 116 (interactive "r\nP")
115 (save-match-data 117 (let (failed)
116 (save-excursion 118 (save-match-data
117 (save-restriction 119 (save-excursion
118 (narrow-to-region beg end) 120 (save-restriction
119 (goto-char (point-min)) 121 (narrow-to-region beg end)
120 (when (and wrapper 122 (goto-char (point-min))
121 (looking-at "\\`=\\?ISO-8859-1\\?Q\\?\\([^?]*\\)\\?")) 123 (when (and wrapper
122 (delete-region (match-end 1) end) 124 (looking-at "\\`=\\?ISO-8859-1\\?Q\\?\\([^?]*\\)\\?"))
123 (delete-region (point) (match-beginning 1))) 125 (delete-region (match-end 1) end)
124 (while (re-search-forward "=\\(..\\|\n\\)" nil t) 126 (delete-region (point) (match-beginning 1)))
125 (goto-char (match-end 0)) 127 (while (re-search-forward "=\\(\\([0-9A-F][0-9A-F]\\)\\|[=\n]\\|..\\)" nil t)
126 (replace-match 128 (goto-char (match-end 0))
127 (if (= (char-after (match-beginning 1)) ?\n) 129 (cond ((= (char-after (match-beginning 1)) ?\n)
128 "" 130 (replace-match ""))
129 (make-string 1 131 ((= (char-after (match-beginning 1)) ?=)
130 (+ (* 16 (mail-unquote-printable-hexdigit 132 (replace-match "="))
131 (char-after (match-beginning 1)))) 133 ((match-beginning 2)
132 (mail-unquote-printable-hexdigit 134 (replace-match
133 (char-after (1+ (match-beginning 1))))))) 135 (make-string 1
134 t t)))))) 136 (+ (* 16 (mail-unquote-printable-hexdigit
137 (char-after (match-beginning 2))))
138 (mail-unquote-printable-hexdigit
139 (char-after (1+ (match-beginning 2))))))
140 t t))
141 (noerror
142 (setq failed t))
143 (t
144 (error "Malformed MIME quoted-printable message"))))
145 (not failed))))))
135 146
136(eval-when-compile (require 'rfc822)) 147(eval-when-compile (require 'rfc822))
137 148
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index c0ccf7f4289..bb13eac55db 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -84,6 +84,7 @@
84 "Spam filter for RMAIL, the mail reader for Emacs." 84 "Spam filter for RMAIL, the mail reader for Emacs."
85 :group 'rmail) 85 :group 'rmail)
86 86
87;;;###autoload
87(defcustom rmail-use-spam-filter nil 88(defcustom rmail-use-spam-filter nil
88 "*Non-nil to activate the rmail spam filter. 89 "*Non-nil to activate the rmail spam filter.
89Specify `rmail-spam-definitions-alist' to define what you consider spam 90Specify `rmail-spam-definitions-alist' to define what you consider spam
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 6185fd12286..462919d36d4 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1364,6 +1364,7 @@ It returns t if it got any new messages."
1364 (while all-files 1364 (while all-files
1365 (let ((opoint (point)) 1365 (let ((opoint (point))
1366 (new-messages 0) 1366 (new-messages 0)
1367 (rsf-number-of-spam 0)
1367 (delete-files ()) 1368 (delete-files ())
1368 ;; If buffer has not changed yet, and has not been saved yet, 1369 ;; If buffer has not changed yet, and has not been saved yet,
1369 ;; don't replace the old backup file now. 1370 ;; don't replace the old backup file now.
@@ -1446,11 +1447,59 @@ It returns t if it got any new messages."
1446 (progn (goto-char opoint) 1447 (progn (goto-char opoint)
1447 (if (or file-name rmail-inbox-list) 1448 (if (or file-name rmail-inbox-list)
1448 (message "(No new mail has arrived)"))) 1449 (message "(No new mail has arrived)")))
1449 (if (rmail-summary-exists) 1450 ;; check new messages to see if any of them is spam:
1451 (if rmail-use-spam-filter
1452 (let*
1453 ((old-messages (- rmail-total-messages new-messages))
1454 (rsf-scanned-message-number (1+ old-messages))
1455 ;; save deletion flags of old messages: vector starts
1456 ;; at zero (is one longer that no of messages),
1457 ;; therefore take 1+ old-messages
1458 (save-deleted
1459 (substring rmail-deleted-vector 0 (1+
1460 old-messages))))
1461 ;; set all messages to undeleted
1462 (setq rmail-deleted-vector
1463 (make-string (1+ rmail-total-messages) ?\ ))
1464 (while (<= rsf-scanned-message-number
1465 rmail-total-messages)
1466 (progn
1467 (if (not (rmail-spam-filter rsf-scanned-message-number))
1468 (progn (setq rsf-number-of-spam (1+ rsf-number-of-spam)))
1469 )
1470 (setq rsf-scanned-message-number (1+ rsf-scanned-message-number))
1471 ))
1472 (if (> rsf-number-of-spam 0)
1473 (progn
1474 (when (rmail-expunge-confirmed)
1475 (rmail-only-expunge t))
1476 ))
1477 (setq rmail-deleted-vector
1478 (concat
1479 save-deleted
1480 (make-string (- rmail-total-messages old-messages)
1481 ?\ )))
1482 ))
1483 (if (rmail-summary-exists)
1450 (rmail-select-summary 1484 (rmail-select-summary
1451 (rmail-update-summary))) 1485 (rmail-update-summary)))
1452 (message "%d new message%s read" 1486 (message "%d new message%s read%s"
1453 new-messages (if (= 1 new-messages) "" "s")) 1487 new-messages (if (= 1 new-messages) "" "s")
1488 ;; print out a message on number of spam messages found:
1489 (if (and rmail-use-spam-filter (> rsf-number-of-spam 0))
1490 (if (= 1 new-messages)
1491 (format ", and found to be a spam message"
1492 rsf-number-of-spam)
1493 (if (> rsf-number-of-spam 1)
1494 (format ", %d of which found to be spam messages"
1495 rsf-number-of-spam)
1496 (format ", one of which found to be a spam message"
1497 rsf-number-of-spam)))
1498 ""))
1499 (if (and rmail-use-spam-filter (> rsf-number-of-spam 0))
1500 (progn (if rmail-spam-filter-beep (beep t))
1501 (sleep-for rmail-spam-sleep-after-message)))
1502
1454 ;; Move to the first new message 1503 ;; Move to the first new message
1455 ;; unless we have other unseen messages before it. 1504 ;; unless we have other unseen messages before it.
1456 (rmail-show-message (rmail-first-unseen-message)) 1505 (rmail-show-message (rmail-first-unseen-message))
@@ -1680,7 +1729,9 @@ It returns t if it got any new messages."
1680 header-end t)))) 1729 header-end t))))
1681 (if quoted-printable-header-field-end 1730 (if quoted-printable-header-field-end
1682 (save-excursion 1731 (save-excursion
1683 (rmail-decode-quoted-printable header-end (point)) 1732 (unless
1733 (mail-unquote-printable-region header-end (point) nil t)
1734 (message "Malformed MIME quoted-printable message"))
1684 ;; Change "quoted-printable" to "8bit", 1735 ;; Change "quoted-printable" to "8bit",
1685 ;; to reflect the decoding we just did. 1736 ;; to reflect the decoding we just did.
1686 (goto-char quoted-printable-header-field-end) 1737 (goto-char quoted-printable-header-field-end)
@@ -1825,7 +1876,10 @@ It returns t if it got any new messages."
1825 (setq count (1+ count)) 1876 (setq count (1+ count))
1826 (if quoted-printable-header-field-end 1877 (if quoted-printable-header-field-end
1827 (save-excursion 1878 (save-excursion
1828 (rmail-decode-quoted-printable header-end (point)) 1879 (unless
1880 (mail-unquote-printable-region header-end (point) nil t)
1881
1882 (message "Malformed MIME quoted-printable message"))
1829 ;; Change "quoted-printable" to "8bit", 1883 ;; Change "quoted-printable" to "8bit",
1830 ;; to reflect the decoding we just did. 1884 ;; to reflect the decoding we just did.
1831 (goto-char quoted-printable-header-field-end) 1885 (goto-char quoted-printable-header-field-end)
@@ -1836,7 +1890,13 @@ It returns t if it got any new messages."
1836 (when 1890 (when
1837 (condition-case nil 1891 (condition-case nil
1838 (progn 1892 (progn
1839 (base64-decode-region (1+ header-end) (point)) 1893 (base64-decode-region
1894 (1+ header-end)
1895 (save-excursion
1896 ;; Prevent base64-decode-region
1897 ;; from removing newline characters.
1898 (skip-chars-backward "\n\t ")
1899 (point)))
1840 t) 1900 t)
1841 (error nil)) 1901 (error nil))
1842 (goto-char header-end) 1902 (goto-char header-end)
@@ -1854,6 +1914,7 @@ It returns t if it got any new messages."
1854 (goto-char (point-min)) 1914 (goto-char (point-min))
1855 (while (search-forward "\n\^_" nil t); single char 1915 (while (search-forward "\n\^_" nil t); single char
1856 (replace-match "\n^_")))); 2 chars: "^" and "_" 1916 (replace-match "\n^_")))); 2 chars: "^" and "_"
1917 (or (bolp) (newline)) ; in case we lost the final newline.
1857 (insert ?\^_) 1918 (insert ?\^_)
1858 (setq last-coding-system-used nil) 1919 (setq last-coding-system-used nil)
1859 (or rmail-enable-mime 1920 (or rmail-enable-mime
@@ -1887,45 +1948,6 @@ It returns t if it got any new messages."
1887 (t (error "Cannot convert to babyl format"))))) 1948 (t (error "Cannot convert to babyl format")))))
1888 count)) 1949 count))
1889 1950
1890(defun rmail-hex-char-to-integer (character)
1891 "Return CHARACTER's value interpreted as a hex digit."
1892 (if (and (>= character ?0) (<= character ?9))
1893 (- character ?0)
1894 (let ((ch (logior character 32)))
1895 (if (and (>= ch ?a) (<= ch ?f))
1896 (- ch (- ?a 10))
1897 (error "Invalid hex digit `%c'" ch)))))
1898
1899(defun rmail-hex-string-to-integer (hex-string)
1900 "Return decimal integer for HEX-STRING."
1901 (let ((hex-num 0)
1902 (index 0))
1903 (while (< index (length hex-string))
1904 (setq hex-num (+ (* hex-num 16)
1905 (rmail-hex-char-to-integer (aref hex-string index))))
1906 (setq index (1+ index)))
1907 hex-num))
1908
1909(defun rmail-decode-quoted-printable (from to)
1910 "Decode Quoted-Printable in the region between FROM and TO."
1911 (interactive "r")
1912 (goto-char from)
1913 (or (markerp to)
1914 (setq to (copy-marker to)))
1915 (while (search-forward "=" to t)
1916 (cond ((eq (following-char) ?\n)
1917 (delete-char -1)
1918 (delete-char 1))
1919 ((looking-at "[0-9A-F][0-9A-F]")
1920 (let ((byte (rmail-hex-string-to-integer
1921 (buffer-substring (point) (+ 2 (point))))))
1922 (delete-region (1- (point)) (+ 2 (point)))
1923 (insert byte)))
1924 ((looking-at "=")
1925 (delete-char 1))
1926 (t
1927 (message "Malformed MIME quoted-printable message")))))
1928
1929;; Delete the "From ..." line, creating various other headers with 1951;; Delete the "From ..." line, creating various other headers with
1930;; information from it if they don't already exist. Now puts the 1952;; information from it if they don't already exist. Now puts the
1931;; original line into a mail-from: header line for debugging and for 1953;; original line into a mail-from: header line for debugging and for
@@ -3033,7 +3055,7 @@ See also user-option `rmail-confirm-expunge'."
3033 (funcall rmail-confirm-expunge 3055 (funcall rmail-confirm-expunge
3034 "Erase deleted messages from Rmail file? "))) 3056 "Erase deleted messages from Rmail file? ")))
3035 3057
3036(defun rmail-only-expunge () 3058(defun rmail-only-expunge (&optional dont-show)
3037 "Actually erase all deleted messages in the file." 3059 "Actually erase all deleted messages in the file."
3038 (interactive) 3060 (interactive)
3039 (set-buffer rmail-buffer) 3061 (set-buffer rmail-buffer)
@@ -3112,11 +3134,12 @@ See also user-option `rmail-confirm-expunge'."
3112 (message "Expunging deleted messages...done") 3134 (message "Expunging deleted messages...done")
3113 (if (not win) 3135 (if (not win)
3114 (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax))) 3136 (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax)))
3115 (rmail-show-message 3137 (if (not dont-show)
3116 (if (zerop rmail-current-message) 1 nil)) 3138 (rmail-show-message
3117 (if rmail-enable-mime 3139 (if (zerop rmail-current-message) 1 nil)
3118 (goto-char (+ (point-min) opoint)) 3140 (if rmail-enable-mime
3119 (goto-char (+ (point) opoint)))))) 3141 (goto-char (+ (point-min) opoint))
3142 (goto-char (+ (point) opoint))))))))
3120 3143
3121(defun rmail-expunge () 3144(defun rmail-expunge ()
3122 "Erase deleted messages from Rmail file and summary buffer." 3145 "Erase deleted messages from Rmail file and summary buffer."
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index c9bfce7f400..bd9d5d7dd39 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -680,13 +680,8 @@ This is relative to `smtpmail-queue-dir'.")
680 ;; size estimate: 680 ;; size estimate:
681 (+ (- (point-max) (point-min)) 681 (+ (- (point-max) (point-min))
682 ;; Add one byte for each change-of-line 682 ;; Add one byte for each change-of-line
683 ;; because or CR-LF representation: 683 ;; because of CR-LF representation:
684 (count-lines (point-min) (point-max)) 684 (count-lines (point-min) (point-max)))))
685 ;; For some reason, an empty line is
686 ;; added to the message. Maybe this
687 ;; is a bug, but it can't hurt to add
688 ;; those two bytes anyway:
689 2)))
690 "")) 685 ""))
691 (body-part 686 (body-part
692 (if (member '8bitmime supported-extensions) 687 (if (member '8bitmime supported-extensions)
@@ -858,31 +853,15 @@ This is relative to `smtpmail-queue-dir'.")
858 ) 853 )
859 854
860(defun smtpmail-send-data (process buffer) 855(defun smtpmail-send-data (process buffer)
861 (let 856 (let ((data-continue t) sending-data)
862 ((data-continue t)
863 (sending-data nil)
864 this-line
865 this-line-end)
866
867 (with-current-buffer buffer 857 (with-current-buffer buffer
868 (goto-char (point-min))) 858 (goto-char (point-min)))
869
870 (while data-continue 859 (while data-continue
871 (with-current-buffer buffer 860 (with-current-buffer buffer
872 (beginning-of-line) 861 (setq sending-data (buffer-substring (point-at-bol) (point-at-eol)))
873 (setq this-line (point)) 862 (end-of-line 2)
874 (end-of-line) 863 (setq data-continue (not (eobp))))
875 (setq this-line-end (point)) 864 (smtpmail-send-data-1 process sending-data))))
876 (setq sending-data nil)
877 (setq sending-data (buffer-substring this-line this-line-end))
878 (if (/= (forward-line 1) 0)
879 (setq data-continue nil)))
880
881 (smtpmail-send-data-1 process sending-data)
882 )
883 )
884 )
885
886 865
887(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end) 866(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end)
888 "Get address list suitable for smtp RCPT TO: <address>." 867 "Get address list suitable for smtp RCPT TO: <address>."
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index de47081b84f..0194160bcf4 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -58,7 +58,7 @@
58 'mouse-wheel-down-event) 58 'mouse-wheel-down-event)
59(defcustom mouse-wheel-down-event 59(defcustom mouse-wheel-down-event
60 ;; In the latest versions of XEmacs, we could just use mouse-%s as well. 60 ;; In the latest versions of XEmacs, we could just use mouse-%s as well.
61 (if (memq system-type '(windows-nt macos darwin)) 61 (if (memq window-system '(w32 mac))
62 'wheel-up 62 'wheel-up
63 (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") 63 (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s")
64 mouse-wheel-down-button))) 64 mouse-wheel-down-button)))
@@ -72,7 +72,7 @@
72 'mouse-wheel-up-event) 72 'mouse-wheel-up-event)
73(defcustom mouse-wheel-up-event 73(defcustom mouse-wheel-up-event
74 ;; In the latest versions of XEmacs, we could just use mouse-%s as well. 74 ;; In the latest versions of XEmacs, we could just use mouse-%s as well.
75 (if (memq system-type '(windows-nt macos darwin)) 75 (if (memq window-system '(w32 mac))
76 'wheel-down 76 'wheel-down
77 (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") 77 (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s")
78 mouse-wheel-up-button))) 78 mouse-wheel-up-button)))
diff --git a/lisp/outline.el b/lisp/outline.el
index fa63fef66a4..59aeb233fdd 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1,6 +1,6 @@
1;;; outline.el --- outline mode commands for Emacs 1;;; outline.el --- outline mode commands for Emacs
2 2
3;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 2001 3;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -410,7 +410,8 @@ If INVISIBLE-OK is non-nil, an invisible heading line is ok too."
410 (or (caar outline-heading-alist) "") 410 (or (caar outline-heading-alist) "")
411 (match-string 0))))) 411 (match-string 0)))))
412 (unless (or (string-match "[ \t]\\'" head) 412 (unless (or (string-match "[ \t]\\'" head)
413 (not (string-match outline-regexp (concat head " ")))) 413 (not (string-match (concat "\\`\\(?:" outline-regexp "\\)")
414 (concat head " "))))
414 (setq head (concat head " "))) 415 (setq head (concat head " ")))
415 (unless (bolp) (end-of-line) (newline)) 416 (unless (bolp) (end-of-line) (newline))
416 (insert head) 417 (insert head)
@@ -486,7 +487,8 @@ in the region."
486 ;; Bummer!! There is no lower heading in the buffer. 487 ;; Bummer!! There is no lower heading in the buffer.
487 ;; Let's try to invent one by repeating the first char. 488 ;; Let's try to invent one by repeating the first char.
488 (let ((new-head (concat (substring head 0 1) head))) 489 (let ((new-head (concat (substring head 0 1) head)))
489 (if (string-match (concat "\\`" outline-regexp) new-head) 490 (if (string-match (concat "\\`\\(?:" outline-regexp "\\)")
491 new-head)
490 ;; Why bother checking that it is indeed lower level ? 492 ;; Why bother checking that it is indeed lower level ?
491 new-head 493 new-head
492 ;; Didn't work: keep it as is so it's still a heading. 494 ;; Didn't work: keep it as is so it's still a heading.
@@ -557,7 +559,7 @@ the match data is set appropriately."
557(defun outline-move-subtree-down (&optional arg) 559(defun outline-move-subtree-down (&optional arg)
558 "Move the currrent subtree down past ARG headlines of the same level." 560 "Move the currrent subtree down past ARG headlines of the same level."
559 (interactive "p") 561 (interactive "p")
560 (let ((re (concat "^" outline-regexp)) 562 (let ((re (concat "^\\(?:" outline-regexp "\\)"))
561 (movfunc (if (> arg 0) 'outline-get-next-sibling 563 (movfunc (if (> arg 0) 'outline-get-next-sibling
562 'outline-get-last-sibling)) 564 'outline-get-last-sibling))
563 (ins-point (make-marker)) 565 (ins-point (make-marker))
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index dca12c67285..ad8b8a92bff 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -100,7 +100,7 @@
100 font-lock-keywords))) 100 font-lock-keywords)))
101 (cc-load "cc-fix"))) 101 (cc-load "cc-fix")))
102 102
103(cc-external-require 'cl) 103(eval-when-compile (require 'cl))
104 104
105 105
106;;; Variables also used at compile time. 106;;; Variables also used at compile time.
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index d85c2ba9db2..13dd790b6a0 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -328,7 +328,7 @@ See `run-hooks'."
328 "do" "else" "for-each" "if" "lambda" 328 "do" "else" "for-each" "if" "lambda"
329 "let" "let*" "let-syntax" "letrec" "letrec-syntax" 329 "let" "let*" "let-syntax" "letrec" "letrec-syntax"
330 ;; Hannes Haug <hannes.haug@student.uni-tuebingen.de> wants: 330 ;; Hannes Haug <hannes.haug@student.uni-tuebingen.de> wants:
331 "and" "or" "delay" 331 "and" "or" "delay" "force"
332 ;; Stefan Monnier <stefan.monnier@epfl.ch> says don't bother: 332 ;; Stefan Monnier <stefan.monnier@epfl.ch> says don't bother:
333 ;;"quasiquote" "quote" "unquote" "unquote-splicing" 333 ;;"quasiquote" "quote" "unquote" "unquote-splicing"
334 "map" "syntax" "syntax-rules") t) 334 "map" "syntax" "syntax-rules") t)
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 4ffcddf48bf..fef159d850f 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -198,7 +198,8 @@ and off otherwise."
198 (or (eq which-func-modes t) 198 (or (eq which-func-modes t)
199 (member major-mode which-func-modes)))))) 199 (member major-mode which-func-modes))))))
200 ;; Turn it off 200 ;; Turn it off
201 (cancel-timer which-func-update-timer) 201 (when (timerp which-func-update-timer)
202 (cancel-timer which-func-update-timer))
202 (setq which-func-update-timer nil) 203 (setq which-func-update-timer nil)
203 (dolist (buf (buffer-list)) 204 (dolist (buf (buffer-list))
204 (with-current-buffer buf (setq which-func-mode nil))))) 205 (with-current-buffer buf (setq which-func-mode nil)))))
diff --git a/lisp/subr.el b/lisp/subr.el
index cd3eefe2520..2e7b2f12ab0 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -65,7 +65,7 @@ The return value of this function is not used."
65(defmacro noreturn (form) 65(defmacro noreturn (form)
66 "Evaluates FORM, with the expectation that the evaluation will signal an error 66 "Evaluates FORM, with the expectation that the evaluation will signal an error
67instead of returning to its caller. If FORM does return, an error is 67instead of returning to its caller. If FORM does return, an error is
68signalled." 68signalled."
69 `(prog1 ,form 69 `(prog1 ,form
70 (error "Form marked with `noreturn' did return"))) 70 (error "Form marked with `noreturn' did return")))
71 71
@@ -158,6 +158,12 @@ the return value (nil if RESULT is omitted).
158 (setq ,(car spec) (1+ ,(car spec)))) 158 (setq ,(car spec) (1+ ,(car spec))))
159 ,@(cdr (cdr spec))))) 159 ,@(cdr (cdr spec)))))
160 160
161(defmacro declare (&rest specs)
162 "Do not evaluate any arguments and return nil.
163Treated as a declaration when used at the right place in a
164`defmacro' form. \(See Info anchor `(elisp)Definition of declare'."
165 nil)
166
161(defsubst caar (x) 167(defsubst caar (x)
162 "Return the car of the car of X." 168 "Return the car of the car of X."
163 (car (car x))) 169 (car (car x)))
@@ -203,6 +209,21 @@ If N is bigger than the length of X, return X."
203 (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil)) 209 (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil))
204 x)))) 210 x))))
205 211
212(defun delete-dups (list)
213 "Destructively return LIST, with `equal' duplicates removed.
214LIST must be a proper list. The value of LIST after a call to
215this function is undefined. Use \(setq LIST (delete-dups LIST))
216if you want to store the return value in LIST. Of several
217`equal' occurrences of an element in LIST, the last one is kept."
218 (while (member (car list) (cdr list))
219 (pop list))
220 (let ((tail list))
221 (while tail
222 (while (member (cadr tail) (cddr tail))
223 (setcdr tail (cddr tail)))
224 (pop tail)))
225 list)
226
206(defun number-sequence (from &optional to inc) 227(defun number-sequence (from &optional to inc)
207 "Return a sequence of numbers from FROM to TO (both inclusive) as a list. 228 "Return a sequence of numbers from FROM to TO (both inclusive) as a list.
208INC is the increment used between numbers in the sequence and defaults to 1. 229INC is the increment used between numbers in the sequence and defaults to 1.
@@ -689,13 +710,13 @@ The return value is a positive integer."
689(defsubst posn-window (position) 710(defsubst posn-window (position)
690 "Return the window in POSITION. 711 "Return the window in POSITION.
691POSITION should be a list of the form returned by the `event-start' 712POSITION should be a list of the form returned by the `event-start'
692and `event-end' functions." 713and `event-end' functions."
693 (nth 0 position)) 714 (nth 0 position))
694 715
695(defsubst posn-area (position) 716(defsubst posn-area (position)
696 "Return the window area recorded in POSITION, or nil for the text area. 717 "Return the window area recorded in POSITION, or nil for the text area.
697POSITION should be a list of the form returned by the `event-start' 718POSITION should be a list of the form returned by the `event-start'
698and `event-end' functions." 719and `event-end' functions."
699 (let ((area (if (consp (nth 1 position)) 720 (let ((area (if (consp (nth 1 position))
700 (car (nth 1 position)) 721 (car (nth 1 position))
701 (nth 1 position)))) 722 (nth 1 position))))
@@ -704,7 +725,7 @@ and `event-end' functions."
704(defsubst posn-point (position) 725(defsubst posn-point (position)
705 "Return the buffer location in POSITION. 726 "Return the buffer location in POSITION.
706POSITION should be a list of the form returned by the `event-start' 727POSITION should be a list of the form returned by the `event-start'
707and `event-end' functions." 728and `event-end' functions."
708 (or (nth 5 position) 729 (or (nth 5 position)
709 (if (consp (nth 1 position)) 730 (if (consp (nth 1 position))
710 (car (nth 1 position)) 731 (car (nth 1 position))
@@ -713,18 +734,18 @@ and `event-end' functions."
713(defsubst posn-x-y (position) 734(defsubst posn-x-y (position)
714 "Return the x and y coordinates in POSITION. 735 "Return the x and y coordinates in POSITION.
715POSITION should be a list of the form returned by the `event-start' 736POSITION should be a list of the form returned by the `event-start'
716and `event-end' functions." 737and `event-end' functions."
717 (nth 2 position)) 738 (nth 2 position))
718 739
719(defun posn-col-row (position) 740(defun posn-col-row (position)
720 "Return the nominal column and row in POSITION, measured in characters. 741 "Return the nominal column and row in POSITION, measured in characters.
721The column and row values are approximations calculated from the x 742The column and row values are approximations calculated from the x
722and y coordinates in POSITION and the frame's default character width 743and y coordinates in POSITION and the frame's default character width
723and height. 744and height.
724For a scroll-bar event, the result column is 0, and the row 745For a scroll-bar event, the result column is 0, and the row
725corresponds to the vertical position of the click in the scroll bar. 746corresponds to the vertical position of the click in the scroll bar.
726POSITION should be a list of the form returned by the `event-start' 747POSITION should be a list of the form returned by the `event-start'
727and `event-end' functions." 748and `event-end' functions."
728 (let* ((pair (posn-x-y position)) 749 (let* ((pair (posn-x-y position))
729 (window (posn-window position)) 750 (window (posn-window position))
730 (area (posn-area position))) 751 (area (posn-area position)))
@@ -750,43 +771,43 @@ These are the actual row number in the window and character number in that row.
750Return nil if POSITION does not contain the actual position; in that case 771Return nil if POSITION does not contain the actual position; in that case
751`posn-col-row' can be used to get approximate values. 772`posn-col-row' can be used to get approximate values.
752POSITION should be a list of the form returned by the `event-start' 773POSITION should be a list of the form returned by the `event-start'
753and `event-end' functions." 774and `event-end' functions."
754 (nth 6 position)) 775 (nth 6 position))
755 776
756(defsubst posn-timestamp (position) 777(defsubst posn-timestamp (position)
757 "Return the timestamp of POSITION. 778 "Return the timestamp of POSITION.
758POSITION should be a list of the form returned by the `event-start' 779POSITION should be a list of the form returned by the `event-start'
759and `event-end' functions." 780and `event-end' functions."
760 (nth 3 position)) 781 (nth 3 position))
761 782
762(defsubst posn-string (position) 783(defsubst posn-string (position)
763 "Return the string object of POSITION, or nil if a buffer position. 784 "Return the string object of POSITION, or nil if a buffer position.
764POSITION should be a list of the form returned by the `event-start' 785POSITION should be a list of the form returned by the `event-start'
765and `event-end' functions." 786and `event-end' functions."
766 (nth 4 position)) 787 (nth 4 position))
767 788
768(defsubst posn-image (position) 789(defsubst posn-image (position)
769 "Return the image object of POSITION, or nil if a not an image. 790 "Return the image object of POSITION, or nil if a not an image.
770POSITION should be a list of the form returned by the `event-start' 791POSITION should be a list of the form returned by the `event-start'
771and `event-end' functions." 792and `event-end' functions."
772 (nth 7 position)) 793 (nth 7 position))
773 794
774(defsubst posn-object (position) 795(defsubst posn-object (position)
775 "Return the object (image or string) of POSITION. 796 "Return the object (image or string) of POSITION.
776POSITION should be a list of the form returned by the `event-start' 797POSITION should be a list of the form returned by the `event-start'
777and `event-end' functions." 798and `event-end' functions."
778 (or (posn-image position) (posn-string position))) 799 (or (posn-image position) (posn-string position)))
779 800
780(defsubst posn-object-x-y (position) 801(defsubst posn-object-x-y (position)
781 "Return the x and y coordinates relative to the object of POSITION. 802 "Return the x and y coordinates relative to the object of POSITION.
782POSITION should be a list of the form returned by the `event-start' 803POSITION should be a list of the form returned by the `event-start'
783and `event-end' functions." 804and `event-end' functions."
784 (nth 8 position)) 805 (nth 8 position))
785 806
786(defsubst posn-object-width-height (position) 807(defsubst posn-object-width-height (position)
787 "Return the pixel width and height of the object of POSITION. 808 "Return the pixel width and height of the object of POSITION.
788POSITION should be a list of the form returned by the `event-start' 809POSITION should be a list of the form returned by the `event-start'
789and `event-end' functions." 810and `event-end' functions."
790 (nth 9 position)) 811 (nth 9 position))
791 812
792 813
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index e0233d64dbd..c69aa01c356 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2330,6 +2330,15 @@ order until succeed.")
2330 (or clip-text primary-text cut-text) 2330 (or clip-text primary-text cut-text)
2331 )) 2331 ))
2332 2332
2333(defun x-clipboard-yank ()
2334 "Insert the clipboard contents, or the last stretch of killed text."
2335 (interactive)
2336 (let ((clipboard-text (x-get-selection 'CLIPBOARD))
2337 (x-select-enable-clipboard t))
2338 (if (and clipboard-text (> (length clipboard-text) 0))
2339 (kill-new clipboard-text))
2340 (yank)))
2341
2333 2342
2334;;; Window system initialization. 2343;;; Window system initialization.
2335 2344
@@ -2392,12 +2401,6 @@ order until succeed.")
2392 ;; generated from FONT. 2401 ;; generated from FONT.
2393 (create-fontset-from-ascii-font font resolved-name "startup")))) 2402 (create-fontset-from-ascii-font font resolved-name "startup"))))
2394 2403
2395 ;; Sun expects the menu bar cut and paste commands to use the clipboard.
2396 ;; This has ,? to match both on Sunos and on Solaris.
2397 (if (string-match "Sun Microsystems,? Inc\\."
2398 (x-server-vendor))
2399 (menu-bar-enable-clipboard))
2400
2401 ;; Apply a geometry resource to the initial frame. Put it at the end 2404 ;; Apply a geometry resource to the initial frame. Put it at the end
2402 ;; of the alist, so that anything specified on the command line takes 2405 ;; of the alist, so that anything specified on the command line takes
2403 ;; precedence. 2406 ;; precedence.
@@ -2463,6 +2466,14 @@ order until succeed.")
2463 ;; Turn on support for mouse wheels. 2466 ;; Turn on support for mouse wheels.
2464 (mouse-wheel-mode 1) 2467 (mouse-wheel-mode 1)
2465 2468
2469 ;; Enable CLIPBOARD copy/paste through menu bar commands.
2470 (menu-bar-enable-clipboard)
2471
2472 ;; Override Paste so it looks at CLIPBOARD first.
2473 (define-key menu-bar-edit-menu [paste]
2474 (cons "Paste" (cons "Paste text from clipboard or kill ring"
2475 'x-clipboard-yank)))
2476
2466 (setq x-initialized t)) 2477 (setq x-initialized t))
2467 2478
2468(add-to-list 'handle-args-function-alist '(x . x-handle-args)) 2479(add-to-list 'handle-args-function-alist '(x . x-handle-args))
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 25670e8c310..3c5559897b4 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -1,6 +1,6 @@
1;;; texinfo.el --- major mode for editing Texinfo files 1;;; texinfo.el --- major mode for editing Texinfo files
2 2
3;; Copyright (C) 1985,88,89,90,91,92,93,96,97,2000,01,03 3;; Copyright (C) 1985,88,89,90,91,92,93,96,97,2000,01,03,04
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Robert J. Chassell 6;; Author: Robert J. Chassell
@@ -316,7 +316,7 @@ chapter."
316(defvar texinfo-imenu-generic-expression 316(defvar texinfo-imenu-generic-expression
317 '((nil "^@\\(node\\|anchor\\)[ \t]+\\([^,\n]*\\)" 2) 317 '((nil "^@\\(node\\|anchor\\)[ \t]+\\([^,\n]*\\)" 2)
318 ("Chapters" "^@chapter[ \t]+\\(.*\\)$" 1)) 318 ("Chapters" "^@chapter[ \t]+\\(.*\\)$" 1))
319 "Imenu generic expression for TexInfo mode. See `imenu-generic-expression'.") 319 "Imenu generic expression for Texinfo mode. See `imenu-generic-expression'.")
320 320
321(defvar texinfo-font-lock-syntactic-keywords 321(defvar texinfo-font-lock-syntactic-keywords
322 '(("\\(@\\)c\\(omment\\)?\\>" (1 "<")) 322 '(("\\(@\\)c\\(omment\\)?\\>" (1 "<"))
@@ -336,11 +336,11 @@ chapter."
336 "macro" "menu" "multitable" "quotation" "smalldisplay" 336 "macro" "menu" "multitable" "quotation" "smalldisplay"
337 "smallexample" "smallformat" "smalllisp" "table" "tex" 337 "smallexample" "smallformat" "smalllisp" "table" "tex"
338 "titlepage" "verbatim" "vtable") 338 "titlepage" "verbatim" "vtable")
339 "List of TeXinfo environments.") 339 "List of Texinfo environments.")
340 340
341(defconst texinfo-environment-regexp 341(defconst texinfo-environment-regexp
342 (concat "^@" (regexp-opt (cons "end" texinfo-environments) t) "\\>") 342 (concat "^@" (regexp-opt (cons "end" texinfo-environments) t) "\\>")
343 "Regexp for environment-like TexInfo list commands. 343 "Regexp for environment-like Texinfo list commands.
344Subexpression 1 is what goes into the corresponding `@end' statement.") 344Subexpression 1 is what goes into the corresponding `@end' statement.")
345 345
346(defface texinfo-heading-face 346(defface texinfo-heading-face
@@ -373,7 +373,7 @@ Subexpression 1 is what goes into the corresponding `@end' statement.")
373 ;; 1 (texinfo-clone-environment (match-beginning 1) (match-end 1)) keep) 373 ;; 1 (texinfo-clone-environment (match-beginning 1) (match-end 1)) keep)
374 (,(concat "^@" (regexp-opt (mapcar 'car texinfo-section-list) t) 374 (,(concat "^@" (regexp-opt (mapcar 'car texinfo-section-list) t)
375 ".*\n") 0 texinfo-heading-face t)) 375 ".*\n") 0 texinfo-heading-face t))
376 "Additional expressions to highlight in TeXinfo mode.") 376 "Additional expressions to highlight in Texinfo mode.")
377 377
378(defun texinfo-clone-environment (start end) 378(defun texinfo-clone-environment (start end)
379 (let ((endp nil)) 379 (let ((endp nil))
@@ -676,7 +676,7 @@ Puts point on a blank line between them."
676(defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>") 676(defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>")
677(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>")) 677(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>"))
678(defun texinfo-insert-quote (&optional arg) 678(defun texinfo-insert-quote (&optional arg)
679 "Insert the appropriate quote mark for TeXinfo. 679 "Insert the appropriate quote mark for Texinfo.
680Usually inserts the value of `texinfo-open-quote' (normally ``) or 680Usually inserts the value of `texinfo-open-quote' (normally ``) or
681`texinfo-close-quote' (normally ''), depending on the context. 681`texinfo-close-quote' (normally ''), depending on the context.
682With prefix argument or inside @code or @example, inserts a plain \"." 682With prefix argument or inside @code or @example, inserts a plain \"."
@@ -904,9 +904,8 @@ to jump to the corresponding spot in the Texinfo source file."
904 ;; Second, create and format an *Occur* buffer 904 ;; Second, create and format an *Occur* buffer
905 (save-excursion 905 (save-excursion
906 (goto-char (point-min)) 906 (goto-char (point-min))
907 (if nodes-too 907 (occur (concat "^\\(?:" (if nodes-too "@node\\>\\|")
908 (occur (concat "^@node\\>\\|" outline-regexp)) 908 outline-regexp "\\)")))
909 (occur outline-regexp)))
910 (pop-to-buffer "*Occur*") 909 (pop-to-buffer "*Occur*")
911 (goto-char (point-min)) 910 (goto-char (point-min))
912 (let ((inhibit-read-only t)) 911 (let ((inhibit-read-only t))
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index 9b37d4976ed..feb73dd5c31 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -5,7 +5,7 @@
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8;; $Id: vc-cvs.el,v 1.66 2003/10/01 13:22:53 fx Exp $ 8;; $Id: vc-cvs.el,v 1.67 2004/01/20 17:41:18 uid65624 Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -625,6 +625,14 @@ systime, or nil if there is none."
625 (beginning-of-line nil) 625 (beginning-of-line nil)
626 (vc-cvs-annotate-time)))))) 626 (vc-cvs-annotate-time))))))
627 627
628(defun vc-cvs-annotate-extract-revision-at-line ()
629 (save-excursion
630 (beginning-of-line)
631 (if (re-search-forward "^\\([0-9]+\\.[0-9]+\\(\\.[0-9]+\\)*\\) +("
632 (line-end-position) t)
633 (match-string-no-properties 1)
634 nil)))
635
628;;; 636;;;
629;;; Snapshot system 637;;; Snapshot system
630;;; 638;;;
diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el
index 033b14e6f10..94beb7eb093 100644
--- a/lisp/vc-mcvs.el
+++ b/lisp/vc-mcvs.el
@@ -1,6 +1,6 @@
1;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system 1;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system
2 2
3;; Copyright (C) 1995,98,99,2000,01,02,2003 Free Software Foundation, Inc. 3;; Copyright (C) 1995,98,99,2000,01,02,03,2004 Free Software Foundation, Inc.
4 4
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Stefan Monnier <monnier@gnu.org> 6;; Maintainer: Stefan Monnier <monnier@gnu.org>
@@ -170,13 +170,6 @@ This is only meaningful if you don't use the implicit checkout model
170 0)) 170 0))
171 t))) 171 t)))
172 172
173(defmacro vc-mcvs-cvs (op file &rest args)
174 (declare (debug t))
175 `(,(intern (concat "vc-cvs-" (symbol-name op)))
176 (expand-file-name (vc-file-getprop ,file 'mcvs-inode)
177 (vc-file-getprop ,file 'mcvs-root))
178 ,@args))
179
180(defun vc-mcvs-state (file) 173(defun vc-mcvs-state (file)
181 ;; This would assume the Meta-CVS sandbox is synchronized. 174 ;; This would assume the Meta-CVS sandbox is synchronized.
182 ;; (vc-mcvs-cvs state file)) 175 ;; (vc-mcvs-cvs state file))
@@ -215,19 +208,13 @@ This is only meaningful if you don't use the implicit checkout model
215 (goto-char (point-max)) 208 (goto-char (point-max))
216 (widen))))))) 209 (widen)))))))
217 210
218(defun vc-mcvs-workfile-version (file) (vc-mcvs-cvs workfile-version file)) 211(defun vc-mcvs-workfile-version (file)
212 (vc-cvs-workfile-version
213 (expand-file-name (vc-file-getprop file 'mcvs-inode)
214 (vc-file-getprop file 'mcvs-root))))
219 215
220(defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model) 216(defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model)
221 217
222(defun vc-mcvs-mode-line-string (file)
223 (let ((s (vc-mcvs-cvs mode-line-string file)))
224 (when s
225 (if (and (not (memq (vc-state file) '(up-to-date needs-patch)))
226 (string-match "\\`CVS-" s))
227 ;; The CVS file is not in sync, so we need to adjust the state.
228 (concat "MCVS:" (substring s 4))
229 (concat "M" s)))))
230
231;;; 218;;;
232;;; State-changing functions 219;;; State-changing functions
233;;; 220;;;
@@ -589,7 +576,7 @@ and that it passes `vc-mcvs-global-switches' to it before FLAGS."
589 ;; We need to filter the output. 576 ;; We need to filter the output.
590 ;; The output of the filter uses filenames relative to the root, 577 ;; The output of the filter uses filenames relative to the root,
591 ;; so we need to change the default-directory. 578 ;; so we need to change the default-directory.
592 (assert (equal default-directory (vc-mcvs-root file))) 579 ;; (assert (equal default-directory (vc-mcvs-root file)))
593 (vc-do-command 580 (vc-do-command
594 buffer okstatus "sh" nil "-c" 581 buffer okstatus "sh" nil "-c"
595 (concat "mcvs " 582 (concat "mcvs "
diff --git a/lisp/vc.el b/lisp/vc.el
index 79ce8594599..383ffa6fae8 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -7,7 +7,7 @@
7;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8;; Keywords: tools 8;; Keywords: tools
9 9
10;; $Id: vc.el,v 1.361 2003/12/24 23:18:10 uid66361 Exp $ 10;; $Id: vc.el,v 1.363 2004/01/21 11:05:51 uid65624 Exp $
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
13 13
@@ -347,6 +347,13 @@
347;; time with hours, minutes, and seconds included. Probably safe to 347;; time with hours, minutes, and seconds included. Probably safe to
348;; ignore. Return the current-time, in units of fractional days. 348;; ignore. Return the current-time, in units of fractional days.
349;; 349;;
350;; - annotate-extract-revision-at-line ()
351;;
352;; Only required if `annotate-command' is defined for the backend.
353;; Invoked from a buffer in vc-annotate-mode, return the revision
354;; corresponding to the current line, or nil if there is no revision
355;; corresponding to the current line.
356;;
350;; SNAPSHOT SYSTEM 357;; SNAPSHOT SYSTEM
351;; 358;;
352;; - create-snapshot (dir name branchp) 359;; - create-snapshot (dir name branchp)
@@ -392,7 +399,13 @@
392;; 399;;
393;; - previous-version (file rev) 400;; - previous-version (file rev)
394;; 401;;
395;; Return the version number that precedes REV for FILE. 402;; Return the version number that precedes REV for FILE, or nil if no such
403;; version exists.
404;;
405;; - next-version (file rev)
406;;
407;; Return the version number that follows REV for FILE, or nil if no such
408;; version exists.
396;; 409;;
397;; - check-headers () 410;; - check-headers ()
398;; 411;;
@@ -631,6 +644,14 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'."
631 m) 644 m)
632 "Local keymap used for VC-Annotate mode.") 645 "Local keymap used for VC-Annotate mode.")
633 646
647(define-key vc-annotate-mode-map "A" 'vc-annotate-revision-previous-to-line)
648(define-key vc-annotate-mode-map "D" 'vc-annotate-show-diff-revision-at-line)
649(define-key vc-annotate-mode-map "J" 'vc-annotate-revision-at-line)
650(define-key vc-annotate-mode-map "L" 'vc-annotate-show-log-revision-at-line)
651(define-key vc-annotate-mode-map "N" 'vc-annotate-next-version)
652(define-key vc-annotate-mode-map "P" 'vc-annotate-prev-version)
653(define-key vc-annotate-mode-map "W" 'vc-annotate-workfile-version)
654
634(defvar vc-annotate-mode-menu nil 655(defvar vc-annotate-mode-menu nil
635 "Local keymap used for VC-Annotate mode's menu bar menu.") 656 "Local keymap used for VC-Annotate mode's menu bar menu.")
636 657
@@ -714,9 +735,10 @@ The keys are \(BUFFER . BACKEND\). See also `vc-annotate-get-backend'.")
714 (substring rev (match-beginning 0) (match-end 0))) 735 (substring rev (match-beginning 0) (match-end 0)))
715 736
716(defun vc-default-previous-version (backend file rev) 737(defun vc-default-previous-version (backend file rev)
717 "Guess the version number immediately preceding REV for FILE. 738 "Return the version number immediately preceding REV for FILE,
718This default implementation works for <major>.<minor>-style version numbers 739or nil if there is no previous version. This default
719as used by RCS and CVS." 740implementation works for <major>.<minor>-style version numbers as
741used by RCS and CVS."
720 (let ((branch (vc-branch-part rev)) 742 (let ((branch (vc-branch-part rev))
721 (minor-num (string-to-number (vc-minor-part rev)))) 743 (minor-num (string-to-number (vc-minor-part rev))))
722 (when branch 744 (when branch
@@ -731,6 +753,16 @@ as used by RCS and CVS."
731 ;; return version of starting point 753 ;; return version of starting point
732 (vc-branch-part branch)))))) 754 (vc-branch-part branch))))))
733 755
756(defun vc-default-next-version (backend file rev)
757 "Return the version number immediately following REV for FILE,
758or nil if there is no next version. This default implementation
759works for <major>.<minor>-style version numbers as used by RCS
760and CVS."
761 (when (not (string= rev (vc-workfile-version file)))
762 (let ((branch (vc-branch-part rev))
763 (minor-num (string-to-number (vc-minor-part rev))))
764 (concat branch "." (number-to-string (1+ minor-num))))))
765
734;; File property caching 766;; File property caching
735 767
736(defun vc-clear-context () 768(defun vc-clear-context ()
@@ -2285,11 +2317,13 @@ allowed and simply skipped)."
2285;; Miscellaneous other entry points 2317;; Miscellaneous other entry points
2286 2318
2287;;;###autoload 2319;;;###autoload
2288(defun vc-print-log () 2320(defun vc-print-log (&optional focus-rev)
2289 "List the change log of the current buffer in a window." 2321 "List the change log of the current buffer in a window. If
2322FOCUS-REV is non-nil, leave the point at that revision."
2290 (interactive) 2323 (interactive)
2291 (vc-ensure-vc-buffer) 2324 (vc-ensure-vc-buffer)
2292 (let ((file buffer-file-name)) 2325 (let ((file buffer-file-name))
2326 (or focus-rev (setq focus-rev (vc-workfile-version file)))
2293 (vc-call print-log file) 2327 (vc-call print-log file)
2294 (set-buffer "*vc*") 2328 (set-buffer "*vc*")
2295 (pop-to-buffer (current-buffer)) 2329 (pop-to-buffer (current-buffer))
@@ -2307,7 +2341,7 @@ allowed and simply skipped)."
2307 ;; move point to the log entry for the current version 2341 ;; move point to the log entry for the current version
2308 (vc-call-backend ',(vc-backend file) 2342 (vc-call-backend ',(vc-backend file)
2309 'show-log-entry 2343 'show-log-entry
2310 ',(vc-workfile-version file)) 2344 ',focus-rev)
2311 (set-buffer-modified-p nil))))) 2345 (set-buffer-modified-p nil)))))
2312 2346
2313(defun vc-default-show-log-entry (backend rev) 2347(defun vc-default-show-log-entry (backend rev)
@@ -2778,6 +2812,14 @@ Uses `rcs2log' which only works for RCS and CVS."
2778(defvar vc-annotate-ratio nil "Global variable.") 2812(defvar vc-annotate-ratio nil "Global variable.")
2779(defvar vc-annotate-backend nil "Global variable.") 2813(defvar vc-annotate-backend nil "Global variable.")
2780 2814
2815;; internal buffer-local variables
2816(defvar vc-annotate-parent-file nil)
2817(defvar vc-annotate-parent-rev nil)
2818(defvar vc-annotate-parent-display-mode nil)
2819(make-local-variable 'vc-annotate-parent-file)
2820(make-local-variable 'vc-annotate-parent-rev)
2821(make-local-variable 'vc-annotate-parent-display-mode)
2822
2781(defconst vc-annotate-font-lock-keywords 2823(defconst vc-annotate-font-lock-keywords
2782 ;; The fontification is done by vc-annotate-lines instead of font-lock. 2824 ;; The fontification is done by vc-annotate-lines instead of font-lock.
2783 '((vc-annotate-lines))) 2825 '((vc-annotate-lines)))
@@ -2797,6 +2839,7 @@ menu items."
2797 (set (make-local-variable 'truncate-lines) t) 2839 (set (make-local-variable 'truncate-lines) t)
2798 (set (make-local-variable 'font-lock-defaults) 2840 (set (make-local-variable 'font-lock-defaults)
2799 '(vc-annotate-font-lock-keywords t)) 2841 '(vc-annotate-font-lock-keywords t))
2842 (view-mode 1)
2800 (vc-annotate-add-menu)) 2843 (vc-annotate-add-menu))
2801 2844
2802(defun vc-annotate-display-default (&optional ratio) 2845(defun vc-annotate-display-default (&optional ratio)
@@ -2885,7 +2928,23 @@ cover the range from the oldest annotation to the newest."
2885 (unless (eq vc-annotate-display-mode 'fullscale) 2928 (unless (eq vc-annotate-display-mode 'fullscale)
2886 (vc-annotate-display-select nil 'fullscale)) 2929 (vc-annotate-display-select nil 'fullscale))
2887 :style toggle :selected 2930 :style toggle :selected
2888 (eq vc-annotate-display-mode 'fullscale)]))) 2931 (eq vc-annotate-display-mode 'fullscale)])
2932 (list "--")
2933 (list ["Annotate previous revision"
2934 (call-interactively 'vc-annotate-prev-version)])
2935 (list ["Annotate next revision"
2936 (call-interactively 'vc-annotate-next-version)])
2937 (list ["Annotate revision at line"
2938 (vc-annotate-revision-at-line)])
2939 (list ["Annotate revision previous to line"
2940 (vc-annotate-revision-previous-to-line)])
2941 (list ["Annotate latest revision"
2942 (vc-annotate-workfile-version)])
2943 (list ["Show log of revision at line"
2944 (vc-annotate-show-log-revision-at-line)])
2945 (list ["Show diff of revision at line"
2946 (vc-annotate-show-diff-revision-at-line)])))
2947
2889 ;; Define the menu 2948 ;; Define the menu
2890 (if (or (featurep 'easymenu) (load "easymenu" t)) 2949 (if (or (featurep 'easymenu) (load "easymenu" t))
2891 (easy-menu-define vc-annotate-mode-menu vc-annotate-mode-map 2950 (easy-menu-define vc-annotate-mode-menu vc-annotate-mode-map
@@ -2922,7 +2981,7 @@ use; you may override this using the second optional arg MODE."
2922;;;; the contents in BUFFER. 2981;;;; the contents in BUFFER.
2923 2982
2924;;;###autoload 2983;;;###autoload
2925(defun vc-annotate (prefix) 2984(defun vc-annotate (prefix &optional revision display-mode)
2926 "Display the edit history of the current file using colours. 2985 "Display the edit history of the current file using colours.
2927 2986
2928This command creates a buffer that shows, for each line of the current 2987This command creates a buffer that shows, for each line of the current
@@ -2949,19 +3008,24 @@ mode-specific menu. `vc-annotate-color-map' and
2949colors. `vc-annotate-background' specifies the background color." 3008colors. `vc-annotate-background' specifies the background color."
2950 (interactive "P") 3009 (interactive "P")
2951 (vc-ensure-vc-buffer) 3010 (vc-ensure-vc-buffer)
2952 (let* ((temp-buffer-name (concat "*Annotate " (buffer-name) "*")) 3011 (let* ((temp-buffer-name nil)
2953 (temp-buffer-show-function 'vc-annotate-display-select) 3012 (temp-buffer-show-function 'vc-annotate-display-select)
2954 (rev (vc-workfile-version buffer-file-name)) 3013 (rev (or revision (vc-workfile-version buffer-file-name)))
3014 (bfn buffer-file-name)
2955 (vc-annotate-version 3015 (vc-annotate-version
2956 (if prefix (read-string 3016 (if prefix (read-string
2957 (format "Annotate from version: (default %s) " rev) 3017 (format "Annotate from version: (default %s) " rev)
2958 nil nil rev) 3018 nil nil rev)
2959 rev))) 3019 rev)))
2960 (if prefix 3020 (if display-mode
2961 (setq vc-annotate-display-mode 3021 (setq vc-annotate-display-mode display-mode)
2962 (float (string-to-number 3022 (if prefix
2963 (read-string "Annotate span days: (default 20) " 3023 (setq vc-annotate-display-mode
2964 nil nil "20"))))) 3024 (float (string-to-number
3025 (read-string "Annotate span days: (default 20) "
3026 nil nil "20"))))))
3027 (setq temp-buffer-name (format "*Annotate %s (rev %s)*"
3028 (buffer-name) vc-annotate-version))
2965 (setq vc-annotate-backend (vc-backend buffer-file-name)) 3029 (setq vc-annotate-backend (vc-backend buffer-file-name))
2966 (message "Annotating...") 3030 (message "Annotating...")
2967 (if (not (vc-find-backend-function vc-annotate-backend 'annotate-command)) 3031 (if (not (vc-find-backend-function vc-annotate-backend 'annotate-command))
@@ -2972,6 +3036,12 @@ colors. `vc-annotate-background' specifies the background color."
2972 buffer-file-name 3036 buffer-file-name
2973 (get-buffer temp-buffer-name) 3037 (get-buffer temp-buffer-name)
2974 vc-annotate-version)) 3038 vc-annotate-version))
3039 (save-excursion
3040 (set-buffer temp-buffer-name)
3041 (setq vc-annotate-parent-file bfn)
3042 (setq vc-annotate-parent-rev vc-annotate-version)
3043 (setq vc-annotate-parent-display-mode vc-annotate-display-mode))
3044
2975 ;; Don't use the temp-buffer-name until the buffer is created 3045 ;; Don't use the temp-buffer-name until the buffer is created
2976 ;; (only after `with-output-to-temp-buffer'.) 3046 ;; (only after `with-output-to-temp-buffer'.)
2977 (setq vc-annotate-buffers 3047 (setq vc-annotate-buffers
@@ -2979,6 +3049,150 @@ colors. `vc-annotate-background' specifies the background color."
2979 (list (cons (get-buffer temp-buffer-name) vc-annotate-backend)))) 3049 (list (cons (get-buffer temp-buffer-name) vc-annotate-backend))))
2980 (message "Annotating... done"))) 3050 (message "Annotating... done")))
2981 3051
3052(defun vc-annotate-prev-version (prefix)
3053 "Visit the annotation of the version previous to this one.
3054
3055With a numeric prefix argument, annotate the version that many
3056versions previous."
3057 (interactive "p")
3058 (vc-annotate-warp-version (- 0 prefix)))
3059
3060(defun vc-annotate-next-version (prefix)
3061 "Visit the annotation of the version after this one.
3062
3063With a numeric prefix argument, annotate the version that many
3064versions after."
3065 (interactive "p")
3066 (vc-annotate-warp-version prefix))
3067
3068(defun vc-annotate-workfile-version ()
3069 "Visit the annotation of the workfile version of this file."
3070 (interactive)
3071 (if (not (equal major-mode 'vc-annotate-mode))
3072 (message "Cannot be invoked outside of a vc annotate buffer")
3073 (let ((warp-rev (vc-workfile-version vc-annotate-parent-file)))
3074 (if (equal warp-rev vc-annotate-parent-rev)
3075 (message "Already at version %s" warp-rev)
3076 (vc-annotate-warp-version warp-rev)))))
3077
3078(defun vc-annotate-extract-revision-at-line ()
3079 "Extract the revision number of the current line."
3080 ;; This function must be invoked from a buffer in vc-annotate-mode
3081 (save-window-excursion
3082 (vc-ensure-vc-buffer)
3083 (setq vc-annotate-backend (vc-backend buffer-file-name)))
3084 (vc-call-backend vc-annotate-backend 'annotate-extract-revision-at-line))
3085
3086(defun vc-annotate-revision-at-line ()
3087 "Visit the annotation of the version identified in the current line."
3088 (interactive)
3089 (if (not (equal major-mode 'vc-annotate-mode))
3090 (message "Cannot be invoked outside of a vc annotate buffer")
3091 (let ((rev-at-line (vc-annotate-extract-revision-at-line)))
3092 (if (not rev-at-line)
3093 (message "Cannot extract revision number from the current line")
3094 (if (equal rev-at-line vc-annotate-parent-rev)
3095 (message "Already at version %s" rev-at-line)
3096 (vc-annotate-warp-version rev-at-line))))))
3097
3098(defun vc-annotate-revision-previous-to-line ()
3099 "Visit the annotation of the version before the version at line."
3100 (interactive)
3101 (if (not (equal major-mode 'vc-annotate-mode))
3102 (message "Cannot be invoked outside of a vc annotate buffer")
3103 (let ((rev-at-line (vc-annotate-extract-revision-at-line))
3104 (prev-rev nil))
3105 (if (not rev-at-line)
3106 (message "Cannot extract revision number from the current line")
3107 (setq prev-rev
3108 (vc-call previous-version vc-annotate-parent-file rev-at-line))
3109 (vc-annotate-warp-version prev-rev)))))
3110
3111(defun vc-annotate-show-log-revision-at-line ()
3112 "Visit the log of the version at line."
3113 (interactive)
3114 (if (not (equal major-mode 'vc-annotate-mode))
3115 (message "Cannot be invoked outside of a vc annotate buffer")
3116 (let ((rev-at-line (vc-annotate-extract-revision-at-line)))
3117 (if (not rev-at-line)
3118 (message "Cannot extract revision number from the current line")
3119 (vc-print-log rev-at-line)))))
3120
3121(defun vc-annotate-show-diff-revision-at-line ()
3122 "Visit the diff of the version at line from its previous version."
3123 (interactive)
3124 (if (not (equal major-mode 'vc-annotate-mode))
3125 (message "Cannot be invoked outside of a vc annotate buffer")
3126 (let ((rev-at-line (vc-annotate-extract-revision-at-line))
3127 (prev-rev nil))
3128 (if (not rev-at-line)
3129 (message "Cannot extract revision number from the current line")
3130 (setq prev-rev
3131 (vc-call previous-version vc-annotate-parent-file rev-at-line))
3132 (if (not prev-rev)
3133 (message "Cannot diff from any version prior to %s" rev-at-line)
3134 (save-window-excursion
3135 (vc-version-diff vc-annotate-parent-file prev-rev rev-at-line))
3136 (switch-to-buffer "*vc-diff*"))))))
3137
3138(defun vc-current-line ()
3139 "Return the current buffer's line number."
3140 (let ((oldpoint (point)) start)
3141 (save-excursion
3142 (save-restriction
3143 (goto-char (point-min))
3144 (widen)
3145 (forward-line 0)
3146 (setq start (point))
3147 (goto-char oldpoint)
3148 (forward-line 0)
3149 (1+ (count-lines (point-min) (point)))))))
3150
3151(defun vc-annotate-warp-version (revspec)
3152 "Annotate the version described by REVSPEC.
3153
3154If REVSPEC is a positive integer, warp that many versions
3155forward, if possible, otherwise echo a warning message. If
3156REVSPEC is a negative integer, warp that many versions backward,
3157if possible, otherwise echo a warning message. If REVSPEC is a
3158string, then it describes a revision number, so warp to that
3159revision."
3160 (if (not (equal major-mode 'vc-annotate-mode))
3161 (message "Cannot be invoked outside of a vc annotate buffer")
3162 (let* ((oldline (vc-current-line))
3163 (revspeccopy revspec)
3164 (newrev nil))
3165 (cond
3166 ((and (integerp revspec) (> revspec 0))
3167 (setq newrev vc-annotate-parent-rev)
3168 (while (and (> revspec 0) newrev)
3169 (setq newrev (vc-call next-version
3170 vc-annotate-parent-file newrev))
3171 (setq revspec (1- revspec)))
3172 (if (not newrev)
3173 (message "Cannot increment %d versions from version %s"
3174 revspeccopy vc-annotate-parent-rev)))
3175 ((and (integerp revspec) (< revspec 0))
3176 (setq newrev vc-annotate-parent-rev)
3177 (while (and (< revspec 0) newrev)
3178 (setq newrev (vc-call previous-version
3179 vc-annotate-parent-file newrev))
3180 (setq revspec (1+ revspec)))
3181 (if (not newrev)
3182 (message "Cannot decrement %d versions from version %s"
3183 (- 0 revspeccopy) vc-annotate-parent-rev)))
3184 ((stringp revspec) (setq newrev revspec))
3185 (t (error "Invalid argument to vc-annotate-warp-version")))
3186 (when newrev
3187 (save-window-excursion
3188 (find-file vc-annotate-parent-file)
3189 (vc-annotate nil newrev vc-annotate-parent-display-mode))
3190 (kill-buffer (current-buffer)) ;; kill the buffer we started from
3191 (switch-to-buffer (car (car (last vc-annotate-buffers))))
3192 (goto-line (min oldline (progn (goto-char (point-max))
3193 (previous-line)
3194 (vc-current-line))))))))
3195
2982(defun vc-annotate-car-last-cons (a-list) 3196(defun vc-annotate-car-last-cons (a-list)
2983 "Return car of last cons in association list A-LIST." 3197 "Return car of last cons in association list A-LIST."
2984 (if (not (eq nil (cdr a-list))) 3198 (if (not (eq nil (cdr a-list)))
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 7e1a96db78d..88ec3ca1338 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,23 @@
12004-01-20 Luc Teirlinck <teirllm@auburn.edu>
2
3 * lists.texi (Sets And Lists): Add delete-dups.
4
52004-01-15 Luc Teirlinck <teirllm@auburn.edu>
6
7 * edebug.texi (Instrumenting Macro Calls): `declare' is not a
8 special form.
9 * macros.texi (Defining Macros): Update description of `declare',
10 which now is a macro.
11 (Wrong Time): Fix typos.
12
132004-01-14 Luc Teirlinck <teirllm@auburn.edu>
14
15 * compile.texi (Compilation Functions): Expand descriptions of
16 `compile-defun', `byte-compile-file', `byte-recompile-directory'
17 and `batch-byte-compile'. In particular, mention and describe
18 all optional arguments.
19 (Disassembly): Correct and clarify the description of `disassemble'.
20
12004-01-11 Luc Teirlinck <teirllm@auburn.edu> 212004-01-11 Luc Teirlinck <teirllm@auburn.edu>
2 22
3 * searching.texi: Various small changes in addition to the 23 * searching.texi: Various small changes in addition to the
diff --git a/lispref/compile.texi b/lispref/compile.texi
index 4d91d2c5883..960b00dd6fc 100644
--- a/lispref/compile.texi
+++ b/lispref/compile.texi
@@ -173,14 +173,18 @@ variable names and function names used by the function, except for
173certain primitives that are coded as special instructions. 173certain primitives that are coded as special instructions.
174@end defun 174@end defun
175 175
176@deffn Command compile-defun 176@deffn Command compile-defun &optional arg
177This command reads the defun containing point, compiles it, and 177This command reads the defun containing point, compiles it, and
178evaluates the result. If you use this on a defun that is actually a 178evaluates the result. If you use this on a defun that is actually a
179function definition, the effect is to install a compiled version of that 179function definition, the effect is to install a compiled version of that
180function. 180function.
181
182@code{compile-defun} normally displays the result of evaluation in the
183echo area, but if @var{arg} is non-@code{nil}, it inserts the result
184in the current buffer after the form it compiled.
181@end deffn 185@end deffn
182 186
183@deffn Command byte-compile-file filename 187@deffn Command byte-compile-file filename &optional load
184This function compiles a file of Lisp code named @var{filename} into a 188This function compiles a file of Lisp code named @var{filename} into a
185file of byte-code. The output file's name is made by changing the 189file of byte-code. The output file's name is made by changing the
186@samp{.el} suffix into @samp{.elc}; if @var{filename} does not end in 190@samp{.el} suffix into @samp{.elc}; if @var{filename} does not end in
@@ -193,8 +197,11 @@ batch is compiled, and written so that its compiled code will be
193executed when the file is read. All comments are discarded when the 197executed when the file is read. All comments are discarded when the
194input file is read. 198input file is read.
195 199
196This command returns @code{t}. When called interactively, it prompts 200This command returns @code{t} if there were no errors and @code{nil}
197for the file name. 201otherwise. When called interactively, it prompts for the file name.
202
203If @var{load} is non-@code{nil}, this command loads the compiled file
204after compiling it. Interactively, @var{load} is the prefix argument.
198 205
199@example 206@example
200@group 207@group
@@ -215,20 +222,28 @@ for the file name.
215@end example 222@end example
216@end deffn 223@end deffn
217 224
218@deffn Command byte-recompile-directory directory flag 225@deffn Command byte-recompile-directory directory &optional flag force
219@cindex library compilation 226@cindex library compilation
220This function recompiles every @samp{.el} file in @var{directory} that 227This command recompiles every @samp{.el} file in @var{directory} (or
221needs recompilation. A file needs recompilation if a @samp{.elc} file 228its subdirectories) that needs recompilation. A file needs
222exists but is older than the @samp{.el} file. 229recompilation if a @samp{.elc} file exists but is older than the
230@samp{.el} file.
231
232When a @samp{.el} file has no corresponding @samp{.elc} file,
233@var{flag} says what to do. If it is @code{nil}, this command ignores
234these files. If @var{flag} is 0, it compiles them. If it is neither
235@code{nil} nor 0, it asks the user whether to compile each such file.
223 236
224When a @samp{.el} file has no corresponding @samp{.elc} file, @var{flag} 237Interactively, @code{byte-recompile-directory} prompts for
225says what to do. If it is @code{nil}, these files are ignored. If it 238@var{directory} and @var{flag} is the prefix argument.
226is non-@code{nil}, the user is asked whether to compile each such file.
227 239
228The returned value of this command is unpredictable. 240If @var{force} is non-@code{nil}, this command recompiles every
241@samp{.el} file that has a @samp{.elc} file.
242
243The returned value is unpredictable.
229@end deffn 244@end deffn
230 245
231@defun batch-byte-compile 246@defun batch-byte-compile &optional noforce
232This function runs @code{byte-compile-file} on files specified on the 247This function runs @code{byte-compile-file} on files specified on the
233command line. This function must be used only in a batch execution of 248command line. This function must be used only in a batch execution of
234Emacs, as it kills Emacs on completion. An error in one file does not 249Emacs, as it kills Emacs on completion. An error in one file does not
@@ -236,6 +251,9 @@ prevent processing of subsequent files, but no output file will be
236generated for it, and the Emacs process will terminate with a nonzero 251generated for it, and the Emacs process will terminate with a nonzero
237status code. 252status code.
238 253
254If @var{noforce} is non-@code{nil}, this function does not recompile
255files that have an up-to-date @samp{.elc} file.
256
239@example 257@example
240% emacs -batch -f batch-byte-compile *.el 258% emacs -batch -f batch-byte-compile *.el
241@end example 259@end example
@@ -420,7 +438,7 @@ these messages.
420defined are always ``located'' at the end of the file, so these 438defined are always ``located'' at the end of the file, so these
421commands won't find the places they are really used. To do that, 439commands won't find the places they are really used. To do that,
422you must search for the function names. 440you must search for the function names.
423 441
424 You can suppress the compiler warning for calling an undefined 442 You can suppress the compiler warning for calling an undefined
425function @var{func} by conditionalizing the function call on a 443function @var{func} by conditionalizing the function call on a
426@code{fboundp} test, like this: 444@code{fboundp} test, like this:
@@ -549,14 +567,16 @@ returns it as the value of the function.
549ordinary Lisp variables, by transferring values between variables and 567ordinary Lisp variables, by transferring values between variables and
550the stack. 568the stack.
551 569
552@deffn Command disassemble object &optional stream 570@deffn Command disassemble object &optional buffer-or-name
553This function prints the disassembled code for @var{object}. If 571This command displays the disassembled code for @var{object}. In
554@var{stream} is supplied, then output goes there. Otherwise, the 572interactive use, or if @var{buffer-or-name} is @code{nil} or omitted,
555disassembled code is printed to the stream @code{standard-output}. The 573the output goes in a buffer named @samp{*Disassemble*}. If
556argument @var{object} can be a function name or a lambda expression. 574@var{buffer-or-name} is non-@code{nil}, it must be a buffer or the
575name of an existing buffer. Then the output goes there, at point, and
576point is left before the output.
557 577
558As a special exception, if this function is used interactively, 578The argument @var{object} can be a function name, a lambda expression
559it outputs to a buffer named @samp{*Disassemble*}. 579or a byte-code object.
560@end deffn 580@end deffn
561 581
562 Here are two examples of using the @code{disassemble} function. We 582 Here are two examples of using the @code{disassemble} function. We
diff --git a/lispref/edebug.texi b/lispref/edebug.texi
index 553d9ab3973..5520852c1a3 100644
--- a/lispref/edebug.texi
+++ b/lispref/edebug.texi
@@ -1091,7 +1091,7 @@ forms to be evaluated. For simple macros, the @var{specification}
1091often looks very similar to the formal argument list of the macro 1091often looks very similar to the formal argument list of the macro
1092definition, but specifications are much more general than macro 1092definition, but specifications are much more general than macro
1093arguments. @xref{Defining Macros}, for more explanation of 1093arguments. @xref{Defining Macros}, for more explanation of
1094the @code{declare} special form. 1094the @code{declare} form.
1095 1095
1096 You can also define an edebug specification for a macro separately 1096 You can also define an edebug specification for a macro separately
1097from the macro definition with @code{def-edebug-spec}. Adding 1097from the macro definition with @code{def-edebug-spec}. Adding
@@ -1381,7 +1381,7 @@ all begin with the same symbol, you can usually work around this
1381constraint by factoring the symbol out of the alternatives, e.g., 1381constraint by factoring the symbol out of the alternatives, e.g.,
1382@code{["foo" &or [first case] [second case] ...]}. 1382@code{["foo" &or [first case] [second case] ...]}.
1383 1383
1384Most needs are satisfied by these two ways that bactracking is 1384Most needs are satisfied by these two ways that backtracking is
1385automatically disabled, but occasionally it is useful to explicitly 1385automatically disabled, but occasionally it is useful to explicitly
1386disable backtracking by using the @code{gate} specification. This is 1386disable backtracking by using the @code{gate} specification. This is
1387useful when you know that no higher alternatives could apply. See the 1387useful when you know that no higher alternatives could apply. See the
diff --git a/lispref/files.texi b/lispref/files.texi
index c1ed45b5dff..04c27971445 100644
--- a/lispref/files.texi
+++ b/lispref/files.texi
@@ -416,9 +416,9 @@ calling @code{set-visited-file-name} does not.
416@defopt before-save-hook 416@defopt before-save-hook
417This normal hook runs before a buffer is saved in its visited file, 417This normal hook runs before a buffer is saved in its visited file,
418regardless of whether that is done normally or by one of the hooks 418regardless of whether that is done normally or by one of the hooks
419described above. One use of this hook is for the Copyright package; 419described above. For instance, the @file{copyright.el} program uses
420it uses this hook to make sure the file has the current year in the 420this hook to make sure the file you are saving has the current year in
421copyright header. 421its copyright notice.
422@end defopt 422@end defopt
423 423
424@c Emacs 19 feature 424@c Emacs 19 feature
diff --git a/lispref/lists.texi b/lispref/lists.texi
index b123de5ab10..cb033118984 100644
--- a/lispref/lists.texi
+++ b/lispref/lists.texi
@@ -1223,7 +1223,8 @@ useful example of @code{sort}.
1223 A list can represent an unordered mathematical set---simply consider a 1223 A list can represent an unordered mathematical set---simply consider a
1224value an element of a set if it appears in the list, and ignore the 1224value an element of a set if it appears in the list, and ignore the
1225order of the list. To form the union of two sets, use @code{append} (as 1225order of the list. To form the union of two sets, use @code{append} (as
1226long as you don't mind having duplicate elements). Other useful 1226long as you don't mind having duplicate elements). You can remove
1227@code{equal} duplicates using @code{delete-dups}. Other useful
1227functions for sets include @code{memq} and @code{delq}, and their 1228functions for sets include @code{memq} and @code{delq}, and their
1228@code{equal} versions, @code{member} and @code{delete}. 1229@code{equal} versions, @code{member} and @code{delete}.
1229 1230
@@ -1433,6 +1434,20 @@ equal, and unibyte strings are converted to multibyte prior to
1433comparison. 1434comparison.
1434@end defun 1435@end defun
1435 1436
1437@defun delete-dups list
1438This function destructively removes all @code{equal} duplicates from
1439@var{list} and returns the result. Of several @code{equal}
1440occurrences of an element in @var{list}, @code{delete-dups} keeps the
1441last one.
1442
1443The value of @var{list} after a call to this function is undefined.
1444Usually, we store the return value back in @var{list}:
1445
1446@example
1447(setq list (delete-dups list))
1448@end example
1449@end defun
1450
1436 See also the function @code{add-to-list}, in @ref{Setting Variables}, 1451 See also the function @code{add-to-list}, in @ref{Setting Variables},
1437for another way to add an element to a list stored in a variable. 1452for another way to add an element to a list stored in a variable.
1438 1453
diff --git a/lispref/macros.texi b/lispref/macros.texi
index b28797b06c9..53f082cf46c 100644
--- a/lispref/macros.texi
+++ b/lispref/macros.texi
@@ -210,10 +210,11 @@ called interactively.
210which can specify how @key{TAB} should indent macro calls, and how to 210which can specify how @key{TAB} should indent macro calls, and how to
211step through them for Edebug. 211step through them for Edebug.
212 212
213@defspec declare @var{specs}... 213@anchor{Definition of declare}
214This special form is used at top level in a macro definition to 214@defmac declare @var{specs}@dots{}
215specify various additional information about it. Two kinds of 215A @code{declare} form is used in a macro definition to specify various
216specification are currently supported: 216additional information about it. Two kinds of specification are
217currently supported:
217 218
218@table @code 219@table @code
219@item (edebug @var{edebug-form-spec}) 220@item (edebug @var{edebug-form-spec})
@@ -224,7 +225,17 @@ Specify how to step through macro calls for Edebug.
224Specify how to indent calls to this macro. @xref{Indenting Macros}, 225Specify how to indent calls to this macro. @xref{Indenting Macros},
225for more details. 226for more details.
226@end table 227@end table
227@end defspec 228
229A @code{declare} form only has its special effect in the body of a
230@code{defmacro} form if it immediately follows the documentation
231string, if present, or the argument list otherwise. (Strictly
232speaking, @emph{several} @code{declare} forms can follow the
233documentation string or argument list, but since a @code{declare} form
234can have several @var{specs}, they can always be combined into a
235single form.) When used at other places in a @code{defmacro} form, or
236outside a @code{defmacro} form, @code{declare} just returns @code{nil}
237without evaluating any @var{specs}.
238@end defmac
228 239
229 No macro absolutely needs a @code{declare} form, because that form 240 No macro absolutely needs a @code{declare} form, because that form
230has no effect on how the macro expands, on what the macro means in the 241has no effect on how the macro expands, on what the macro means in the
@@ -356,9 +367,9 @@ trouble, and rules to follow to avoid trouble.
356@node Wrong Time 367@node Wrong Time
357@subsection Wrong Time 368@subsection Wrong Time
358 369
359 The most common problem in writing macros is doing too some of the 370 The most common problem in writing macros is doing some of the
360real work prematurely---while expanding the macro, rather than in the 371real work prematurely---while expanding the macro, rather than in the
361expansion itself. For instance, one real package had this nmacro 372expansion itself. For instance, one real package had this macro
362definition: 373definition:
363 374
364@example 375@example
diff --git a/mac/ChangeLog b/mac/ChangeLog
index 52c6d0512db..aa6e9844fee 100644
--- a/mac/ChangeLog
+++ b/mac/ChangeLog
@@ -1,13 +1,16 @@
12004-01-14 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * src/Emacs.r: Update TOO_MUCH_RAM error message.
4
12003-11-22 Lars Hansen <larsh@math.ku.dk> 52003-11-22 Lars Hansen <larsh@math.ku.dk>
2 6
3 * inc/grp.h: Added. 7 * inc/grp.h: Added.
4 8
52003-11-02 Andrew Choi <akochoi@shaw.ca> 92003-11-02 Andrew Choi <akochoi@shaw.ca>
6 10
7 * src/Emacs.r [!TARGET_API_MAC_CARBON]: Don't define hfdr 11 * src/Emacs.r [!TARGET_API_MAC_CARBON]: Don't define hfdr resource.
8 resource.
9 * Emacs.app/Contents/Resources/Emacs.rsrc: Remove. 12 * Emacs.app/Contents/Resources/Emacs.rsrc: Remove.
10 13
112003-10-31 Andrew Choi <akochoi@shaw.ca> 142003-10-31 Andrew Choi <akochoi@shaw.ca>
12 15
13 * INSTALL: Add Nozomu Ando's changes to instructions for 16 * INSTALL: Add Nozomu Ando's changes to instructions for
diff --git a/mac/INSTALL b/mac/INSTALL
index 79007f8c324..def7913f83a 100644
--- a/mac/INSTALL
+++ b/mac/INSTALL
@@ -1,6 +1,6 @@
1* BUILDING EMACS ON MAC OS 8/9 AND MAC OS X -*- outline -*- 1* BUILDING EMACS ON MAC OS 8/9 AND MAC OS X -*- outline -*-
2 2
3Copyright (c) 2001, 2002 Free Software Foundation, Inc. 3Copyright (c) 2001, 2002, 2004 Free Software Foundation, Inc.
4 4
5 Permission is granted to anyone to make or distribute verbatim 5 Permission is granted to anyone to make or distribute verbatim
6 copies of this document as received, in any medium, provided that 6 copies of this document as received, in any medium, provided that
@@ -205,7 +205,7 @@ Emacs should build and run on a PowerMac running Mac OS 8.6 - 10.2.
205You will need around 100 MB of disk space for the source files and 205You will need around 100 MB of disk space for the source files and
206intermediate files. 206intermediate files.
207 207
208It will not run on machines running Mac OS 8/9 with more than 256 MB 208It will not run on machines running Mac OS 8/9 with more than 512 MB
209of physical or virtual memory. It does not have this restriction when 209of physical or virtual memory. It does not have this restriction when
210it is run under Mac OS X. But the usual 128MB buffer limit of a 210it is run under Mac OS X. But the usual 128MB buffer limit of a
21132-bit Emacs still exists. 21132-bit Emacs still exists.
diff --git a/mac/src/Emacs.r b/mac/src/Emacs.r
index 01c754127c5..1403a24721c 100644
--- a/mac/src/Emacs.r
+++ b/mac/src/Emacs.r
@@ -1,5 +1,5 @@
1/* Resource definitions for GNU Emacs on the Macintosh. 1/* Resource definitions for GNU Emacs on the Macintosh.
2 Copyright (C) 1999, 2000 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -174,7 +174,7 @@ resource 'DITL' (129, purgeable) {
174 {10, 60, 72, 278}, 174 {10, 60, 72, 278},
175 StaticText { 175 StaticText {
176 disabled, 176 disabled,
177 "Emacs does not run on a Macintosh with more than 256 MB of physical or virtual memory" 177 "Emacs does not run on a Macintosh with more than 512 MB of physical or virtual memory"
178 } 178 }
179 } 179 }
180}; 180};
diff --git a/man/files.texi b/man/files.texi
index 9a4a2042fc4..a7f06619288 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -1536,6 +1536,46 @@ range from red to blue spans the past 36 days instead of 360 days. A
1536stretch factor greater than 1 means the color range spans more than a 1536stretch factor greater than 1 means the color range spans more than a
1537year. 1537year.
1538 1538
1539From the annotate buffer, you can use the following keys to browse the
1540annotations of past revisions, view diffs, or view log entries:
1541
1542@itemize @bullet
1543
1544@item
1545Pressing @kbd{P} annotates the previous revision. It also takes a
1546numeric prefix argument, so for example @kbd{C-u 10 P} would take you
1547back 10 revisions.
1548
1549@item
1550Pressing @kbd{N} annotates the next revision. It also takes a numeric
1551prefix argument, so for example @kbd{C-u 10 N} would take you forward
155210 revisions.
1553
1554@item
1555Pressing @kbd{J} annotates the revision at line (as denoted by the
1556version number on the same line).
1557
1558@item
1559Pressing @kbd{A} annotates the revision previous to line (as denoted
1560by the version number on the same line). This is useful to see the
1561state the file was in before the change on the current line was made.
1562
1563@item
1564Pressing @kbd{D} shows the diff of the revision at line with its
1565previous revision. This is useful to see what actually changed when
1566the revision denoted on the current line was committed.
1567
1568@item
1569Pressing @kbd{L} shows the log of the revision at line. This is
1570useful to see the author's description of the changes that occured
1571when the revision denoted on the current line was committed.
1572
1573@item
1574Pressing @kbd{W} annotates the workfile (most up to date) version. If
1575you used @kbd{P} and @kbd{N} to browse to other revisions, use this
1576key to return to the latest version.
1577@end itemize
1578
1539@node Secondary VC Commands 1579@node Secondary VC Commands
1540@subsection The Secondary Commands of VC 1580@subsection The Secondary Commands of VC
1541 1581
diff --git a/src/.gitignore b/src/.gitignore
index f1a15019c6f..406ff7cd5e2 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,18 +1,19 @@
1*-spd
1*.core 2*.core
3*.pdb
4.gdb_history
2Makefile 5Makefile
3Makefile.c 6Makefile.c
4TAGS-LISP 7TAGS-LISP
8_gdbinit
5bootstrap-emacs 9bootstrap-emacs
6config.h 10config.h
7config.stamp 11config.stamp
8emacs 12emacs
9emacs-* 13emacs-*
10epaths.h 14epaths.h
15gdb.ini
11obj 16obj
12prefix-args 17prefix-args
13stamp-oldxmenu 18stamp-oldxmenu
14temacs 19temacs
15_gdbinit
16gdb.ini
17*-spd
18*.pdb
diff --git a/src/ChangeLog b/src/ChangeLog
index 9c21defd658..4fba5e166b3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,164 @@
12004-01-21 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * lisp.h [USE_LSB_TAG && !DECL_ALIGN]: Signal an error.
4
52004-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
6
7 * lisp.h: Add undef DECL_ALIGN.
8
92004-01-21 Stefan Monnier <monnier@iro.umontreal.ca>
10
11 * process.c (wait_reading_process_input) [SYNC_INPUT]:
12 Check interrupt_input_pending explicitly.
13
14 * lisp.h (QUIT) [SYNC_INPUT]: Check interrupt_input_pending as well.
15
16 * keyboard.c (handle_async_input): New fun,
17 extracted from input_available_signal.
18 (input_available_signal, reinvoke_input_signal): Use it.
19
202004-01-20 Stefan Monnier <monnier@iro.umontreal.ca>
21
22 * buffer.c (buffer_defaults, buffer_local_symbols): Use DECL_ALIGN.
23
24 * lisp.h [USE_LSB_TAG]: Add definitions for Lisp_Object value
25 manipulation macros for when tags are in the lower bits.
26 (struct Lisp_Free) [USE_LSB_TAG]: Add padding.
27 (DECL_ALIGN): New macro.
28 (DEFUN): Use it.
29
30 * lisp.h [ENABLE_CHECKING]: Don't force union type.
31
32 * s/darwin.h (__attribute__): Remove outdated workaround.
33
34 * macterm.c (main) [USE_LSB_TAG]: Don't range check the ram.
35
36 * alloc.c (lisp_malloc, lisp_align_malloc) [USE_LSB_TAG]:
37 Don't check range of malloc address.
38 (pure_alloc) [USE_LSB_TAG]: Enforce alignment.
39
40 * process.c (wait_reading_process_input): Lisp_Object/int mixup.
41
42 * dired.c (Ffile_attributes): Lisp_Object/int mixup.
43
442004-01-19 Kenichi Handa <handa@m17n.org>
45
46 * fontset.c (fontset_font_pattern): Fix previous change.
47
482004-01-16 Miles Bader <miles@gnu.ai.mit.edu>
49
50 * xdisp.c (Voverflow_newline_into_fringe)
51 (move_it_in_display_line_to, redisplay_internal)
52 (update_window_fringes, redisplay_window, display_line, window):
53 Add `#ifdef HAVE_WINDOW_SYSTEM' around fringe-drawing stuff, so
54 that it compiles without a window-system.
55 * dispnew.c (direct_output_for_insert, update_window): Likewise.
56
572004-01-16 Kim F. Storm <storm@cua.dk>
58
59 * buffer.h (struct buffer): New member indicate_buffer_boundaries.
60
61 * buffer.c (init_buffer_once): Set buffer_defaults and
62 buffer_local_flags for indicate_buffer_boundaries.
63 (syms_of_buffer): Defvar_per_buffer it, and defvar_lisp_nopro
64 default- variable for it.
65
66 * dispextern.h (struct glyph_row): New members left_fringe_bitmap,
67 right_fringe_bitmap, redraw_fringe_bitmaps_p for new fringe handling.
68 New members exact_window_width_line_p and cursor_in_fringe_p for
69 overflowing newlines into right fringe.
70 New members indicate_bob_p, indicate_top_line_p, indicate_eob_p,
71 and indicate_bottom_line_p for buffer boundaries and scrolling.
72 (enum fringe_bitmap_type): Add UP_ARROW_BITMAP, DOWN_ARROW_BITMAP,
73 FIRST_LINE_BITMAP, LAST_LINE_BITMAP, FILLED_BOX_CURSOR_BITMAP,
74 HOLLOW_BOX_CURSOR_BITMAP, BAR_CURSOR_BITMAP, HBAR_CURSOR_BITMAP,
75 and HOLLOW_SQUARE_BITMAP.
76 (draw_fringe_bitmap, draw_window_fringes, update_window_fringes):
77 Add prototypes.
78
79 * dispnew.c (row_equal_p, update_window_line): Compare fringe bitmaps
80 instead of related indicator fields.
81 Compare exact_window_width_line_p and cursor_in_mouse_face_p indicators.
82 (direct_output_for_insert): Handle exact width lines like
83 contined lines. Call update_window_fringes.
84 (update_window): Call update_window_fringes.
85 (scrolling_window): Don't skip desired rows with changed bitmaps.
86 Check if fringe bitmaps changes when assigning scrolled rows.
87
88 * xdisp.c (Voverflow_newline_into_fringe): New variable.
89 (IT_OVERFLOW_NEWLINE_INTO_FRINGE): New macro.
90 (move_it_in_display_line_to): Overflow newline into fringe for
91 rows that are exactly as wide as the window.
92 (up_arrow_bits, down_arrow_bits, first_line_bits, last_line_bits)
93 (filled_box_cursor_bits, hollow_box_cursor_bits, bar_cursor_bits)
94 (hbar_cursor_bits, hollow_square_bits): New fringe bitmaps.
95 (fringe_bitmaps): Add new bitmaps.
96 (draw_fringe_bitmap): Make extern. Remove WHICH arg.
97 Select proper bitmap for cursor in fringe when appropriate.
98 Handle alignment of bitmap to top or bottom of row.
99 (draw_row_fringe_bitmaps): Don't select bitmaps here; that is now
100 done by update_window_fringes.
101 (update_window_fringes, draw_window_fringes): New functions.
102 (redisplay_internal): Call update_window_fringes in case only
103 cursor row is updated.
104 (redisplay_window): Call update_window_fringes.
105 Explicitly call draw_window_fringes if redisplay was done using
106 the current matrix or the overlay arrow is in the window.
107 (try_window_reusing_current_matrix): Mark scrolled rows for
108 fringe update (to update buffer-boundaries / scrolling icons).
109 (find_last_unchanged_at_beg_row): Handle exact width lines line
110 continued lines.
111 (display_line): Overflow newline into fringe for rows that are
112 exactly as wide as the window. Don't append space for newline
113 in this case.
114 (notice_overwritten_cursor): Explicitly clear cursor bitmap
115 in fringe as if it had been overwritten.
116 (erase_phys_cursor): Erase cursor bitmap in fringe.
117 (syms_of_xdisp): Mark show-trailing-whitespace and
118 void-text-area-pointer as user options.
119 DEFVAR_LISP Voverflow_newline_into_fringe. Enable by default.
120
121 * xterm.c (x_update_window_end): Call draw_window_fringes.
122 (x_after_update_window_line): Just set redraw_fringe_bitmaps_p
123 in row instead of actually drawing fringe bitmaps.
124 (x_draw_fringe_bitmap): Handle bottom aligned bitmaps.
125 (x_draw_window_cursor): Draw cursor in fringe.
126
127 * w32term.c (x_update_window_end): Call draw_window_fringes.
128 (x_after_update_window_line): Just set redraw_fringe_bitmaps_p
129 in row instead of actually drawing fringe bitmaps.
130 (w32_draw_fringe_bitmap): Handle bottom aligned bitmaps.
131 (w32_draw_window_cursor): Draw cursor in fringe.
132
133 * macterm.c (x_update_window_end): Call draw_window_fringes.
134 (x_after_update_window_line): Just set redraw_fringe_bitmaps_p
135 in row instead of actually drawing fringe bitmaps.
136 (x_draw_fringe_bitmap): Handle bottom aligned bitmaps.
137 (mac_draw_window_cursor): Draw cursor in fringe.
138
1392004-01-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
140
141 * xterm.c (handle_one_xevent): Don't handle characters that are part
142 of an old style (XLookupString) compose sequence.
143
1442004-01-15 Kenichi Handa <handa@m17n.org>
145
146 * search.c (Freplace_match): Use make_multibyte_string or
147 make_unibyte_string according to the buffer multibyteness.
148
1492004-01-14 Stefan Monnier <monnier@iro.umontreal.ca>
150
151 * alloc.c (struct interval_block, struct string_block)
152 (struct symbol_block, struct marker_block, live_string_p)
153 (live_cons_p, live_symbol_p, live_float_p, live_misc_p):
154 Better preserve alignment for objects in blocks.
155 (FLOAT_BLOCK_SIZE): Adjust for possible alignment padding.
156
157 * lread.c (defvar_per_buffer): Remove dead declaration.
158
159 * macterm.c (do_check_ram_size): Don't hardcode the lisp address
160 space size.
161
12004-01-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 1622004-01-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 163
3 * xmenu.c (popup_get_selection): Check new parameter down_on_keypress 164 * xmenu.c (popup_get_selection): Check new parameter down_on_keypress
@@ -61,7 +222,7 @@
61 * xdisp.c (note_mode_line_or_margin_highlight): Use modified 222 * xdisp.c (note_mode_line_or_margin_highlight): Use modified
62 mode_line_string and marginal_area_string functions to handle 223 mode_line_string and marginal_area_string functions to handle
63 both string object and image object properties. 224 both string object and image object properties.
64 225
652004-01-06 Andreas Schwab <schwab@suse.de> 2262004-01-06 Andreas Schwab <schwab@suse.de>
66 227
67 * syntax.c (skip_chars): Treat '-' at end of string as ordinary 228 * syntax.c (skip_chars): Treat '-' at end of string as ordinary
@@ -69,8 +230,8 @@
69 230
702004-01-02 Andreas Schwab <schwab@suse.de> 2312004-01-02 Andreas Schwab <schwab@suse.de>
71 232
72 * macterm.c (emacs_options, x_initialized, same_x_server): Remove 233 * macterm.c (emacs_options, x_initialized, same_x_server):
73 unused (and duplicated) definitions. 234 Remove unused (and duplicated) definitions.
74 235
752004-01-02 Kim F. Storm <storm@cua.dk> 2362004-01-02 Kim F. Storm <storm@cua.dk>
76 237
@@ -100,8 +261,7 @@
100 261
1012004-01-01 Jason Rumney <jasonr@gnu.org> 2622004-01-01 Jason Rumney <jasonr@gnu.org>
102 263
103 * w32term.c (w32_text_out): Use s->font, for consistency with 264 * w32term.c (w32_text_out): Use s->font, for consistency with callers.
104 callers.
105 265
1062003-12-30 Luc Teirlinck <teirllm@auburn.edu> 2662003-12-30 Luc Teirlinck <teirllm@auburn.edu>
107 267
@@ -132,15 +292,13 @@
132 292
133 * fontset.c (Voverriding_fontspec_alist): New variable. 293 * fontset.c (Voverriding_fontspec_alist): New variable.
134 (lookup_overriding_fontspec): New function. 294 (lookup_overriding_fontspec): New function.
135 (fontset_ref_via_base): Call lookup_overriding_fontspec if 295 (fontset_ref_via_base): Call lookup_overriding_fontspec if necessary.
136 necessary.
137 (fontset_font_pattern): Likewise. 296 (fontset_font_pattern): Likewise.
138 (regulalize_fontname): New function. 297 (regulalize_fontname): New function.
139 (Fset_fontset_font): Call regulalize_fontname. 298 (Fset_fontset_font): Call regulalize_fontname.
140 (Fset_overriding_fontspec_internal): New function. 299 (Fset_overriding_fontspec_internal): New function.
141 (syms_of_fontset): Initialize and staticprop 300 (syms_of_fontset): Initialize and staticpro Voverriding_fontspec_alist.
142 Voverriding_fontspec_alist. Defsubr 301 Defsubr Sset_overriding_fontspec_internal.
143 Sset_overriding_fontspec_internal.
144 302
145 * xfaces.c (face_font_available_p): New function. 303 * xfaces.c (face_font_available_p): New function.
146 304
@@ -197,7 +355,7 @@
197 (Vvoid_text_area_pointer): Replace Vshow_text_cursor_in_void. 355 (Vvoid_text_area_pointer): Replace Vshow_text_cursor_in_void.
198 (QCmap, QCpointer, Qrect, Qcircle, Qpoly): New variables for 356 (QCmap, QCpointer, Qrect, Qcircle, Qpoly): New variables for
199 image maps. 357 image maps.
200 (x_y_to_hpos_vpos): Return glyph relative coordinates through 358 (x_y_to_hpos_vpos): Return glyph relative coordinates through
201 new dx and dy args. 359 new dx and dy args.
202 Remove buffer_only_p arg (always 0). Simplify code accordingly. 360 Remove buffer_only_p arg (always 0). Simplify code accordingly.
203 (get_glyph_string_clip_rect): Draw cursor using glyph's rather 361 (get_glyph_string_clip_rect): Draw cursor using glyph's rather
@@ -207,9 +365,9 @@
207 (produce_image_glyph): Adjust it.ascent to minimum row ascent if 365 (produce_image_glyph): Adjust it.ascent to minimum row ascent if
208 image glyph is alone on the last line. 366 image glyph is alone on the last line.
209 (append_glyph, append_composite_glyph, produce_image_glyph) 367 (append_glyph, append_composite_glyph, produce_image_glyph)
210 (append_stretch_glyph): Set glyph's ascent and descent. 368 (append_stretch_glyph): Set glyph's ascent and descent.
211 (on_hot_spot_p): New function to check if position is inside an 369 (on_hot_spot_p): New function to check if position is inside an
212 rectangular, circular, or polygon-shaped image hot-spot, 370 rectangular, circular, or polygon-shaped image hot-spot,
213 (find_hot_spot): New function to search for image hot-spot. 371 (find_hot_spot): New function to search for image hot-spot.
214 (Flookup_image_map): New defun to search for image hot-spot. 372 (Flookup_image_map): New defun to search for image hot-spot.
215 (define_frame_cursor1): New aux function to determine frame pointer. 373 (define_frame_cursor1): New aux function to determine frame pointer.
@@ -277,8 +435,7 @@
277 (Fread_minibuffer, Fread_no_blanks_input): Adapt to changes in 435 (Fread_minibuffer, Fread_no_blanks_input): Adapt to changes in
278 read_minibuf. 436 read_minibuf.
279 (Fcompleting_read): Delete code moved into read_minibuf. 437 (Fcompleting_read): Delete code moved into read_minibuf.
280 (Ftest_completion): Make it handle obarrays and hash tables 438 (Ftest_completion): Make it handle obarrays and hash tables correctly.
281 correctly.
282 439
2832003-12-03 Kenichi Handa <handa@m17n.org> 4402003-12-03 Kenichi Handa <handa@m17n.org>
284 441
@@ -429,10 +586,8 @@
429 586
4302003-11-22 Lars Hansen <larsh@math.ku.dk> 5872003-11-22 Lars Hansen <larsh@math.ku.dk>
431 588
432 * w32.c (struct the_group): Added. 589 * w32.c (struct the_group, getgrgid): Add.
433 (getgrgid): Added. 590 * mac.c (struct my_group, getgrgid): Add.
434 * mac.c (struct my_group): Added.
435 (getgrgid): Added.
436 591
4372003-11-21 Luc Teirlinck <teirllm@auburn.edu> 5922003-11-21 Luc Teirlinck <teirllm@auburn.edu>
438 593
@@ -440,18 +595,19 @@
440 595
4412003-11-21 Lars Hansen <larsh@math.ku.dk> 5962003-11-21 Lars Hansen <larsh@math.ku.dk>
442 597
443 * dired.c (Ffile_attributes): Parameter ID-FORMAT added and 598 * dired.c (Ffile_attributes): Add parameter ID-FORMAT and
444 included in call to file name handler. Numeric UID and GID 599 include in call to file name handler. Optionally translate numeric
445 optionally translated to strings. Docstring updated. 600 UID and GID to strings. Update docstring.
446 (directory_files_internal): Parameter ID-FORMAT added. 601 (directory_files_internal): Add parameter ID-FORMAT.
447 (Fdirectory_files_and_attributes): Parameter ID-FORMAT added and 602 (Fdirectory_files_and_attributes): Add parameter ID-FORMAT and
448 included in call to file name handler and call to 603 include in call to file name handler and call to
449 directory_files_internal. Docstring updated. (Fdirectory_files): 604 directory_files_internal. Update Docstring.
450 Dummy parameter added in call to directory_files_internal. 605 (Fdirectory_files): Add dummy parameter in call to
451 * lisp.h (Qinteger): Added. (Qinteger_or_floatp, 606 directory_files_internal.
452 Qinteger_or_float_or_marker_p): Removed. (Ffile_attributes): 607 * lisp.h (Qinteger): Add.
453 Parameter added. 608 (Qinteger_or_floatp, Qinteger_or_float_or_marker_p): Remove.
454 * data.c (Qinteger): Exported. 609 (Ffile_attributes): Add parameter.
610 * data.c (Qinteger): Export.
455 611
4562003-11-21 Luc Teirlinck <teirllm@auburn.edu> 6122003-11-21 Luc Teirlinck <teirllm@auburn.edu>
457 613
@@ -1788,7 +1944,7 @@
1788 * gtkutil.c: Include keyboard.h, charset.h, coding.h. 1944 * gtkutil.c: Include keyboard.h, charset.h, coding.h.
1789 (xg_create_frame_widgets): Use ENCODE_UTF_8. 1945 (xg_create_frame_widgets): Use ENCODE_UTF_8.
1790 1946
1791 * xterm.c (Qutf_8): Moved to coding.c 1947 * xterm.c (Qutf_8): Move to coding.c
1792 1948
1793 * xmenu.c (ENCODE_MENU_STRING): New. 1949 * xmenu.c (ENCODE_MENU_STRING): New.
1794 (list_of_panes, list_of_items, digest_single_submenu, xmenu_show): 1950 (list_of_panes, list_of_items, digest_single_submenu, xmenu_show):
diff --git a/src/alloc.c b/src/alloc.c
index 616e264fbf1..4afcab2c20a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1,5 +1,5 @@
1/* Storage allocation and gc for GNU Emacs Lisp interpreter. 1/* Storage allocation and gc for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 2001, 2002, 2003 2 Copyright (C) 1985,86,88,93,94,95,97,98,1999,2000,01,02,03,2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -599,6 +599,7 @@ lisp_malloc (nbytes, type)
599 599
600 val = (void *) malloc (nbytes); 600 val = (void *) malloc (nbytes);
601 601
602#ifndef USE_LSB_TAG
602 /* If the memory just allocated cannot be addressed thru a Lisp 603 /* If the memory just allocated cannot be addressed thru a Lisp
603 object's pointer, and it needs to be, 604 object's pointer, and it needs to be,
604 that's equivalent to running out of memory. */ 605 that's equivalent to running out of memory. */
@@ -613,6 +614,7 @@ lisp_malloc (nbytes, type)
613 val = 0; 614 val = 0;
614 } 615 }
615 } 616 }
617#endif
616 618
617#if GC_MARK_STACK && !defined GC_MALLOC_CHECK 619#if GC_MARK_STACK && !defined GC_MALLOC_CHECK
618 if (val && type != MEM_TYPE_NON_LISP) 620 if (val && type != MEM_TYPE_NON_LISP)
@@ -773,6 +775,7 @@ lisp_align_malloc (nbytes, type)
773 mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); 775 mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
774#endif 776#endif
775 777
778#ifndef USE_LSB_TAG
776 /* If the memory just allocated cannot be addressed thru a Lisp 779 /* If the memory just allocated cannot be addressed thru a Lisp
777 object's pointer, and it needs to be, that's equivalent to 780 object's pointer, and it needs to be, that's equivalent to
778 running out of memory. */ 781 running out of memory. */
@@ -789,6 +792,7 @@ lisp_align_malloc (nbytes, type)
789 memory_full (); 792 memory_full ();
790 } 793 }
791 } 794 }
795#endif
792 796
793 /* Initialize the blocks and put them on the free list. 797 /* Initialize the blocks and put them on the free list.
794 Is `base' was not properly aligned, we can't use the last block. */ 798 Is `base' was not properly aligned, we can't use the last block. */
@@ -1105,8 +1109,9 @@ uninterrupt_malloc ()
1105 1109
1106struct interval_block 1110struct interval_block
1107{ 1111{
1108 struct interval_block *next; 1112 /* Place `intervals' first, to preserve alignment. */
1109 struct interval intervals[INTERVAL_BLOCK_SIZE]; 1113 struct interval intervals[INTERVAL_BLOCK_SIZE];
1114 struct interval_block *next;
1110}; 1115};
1111 1116
1112/* Current interval block. Its `next' pointer points to older 1117/* Current interval block. Its `next' pointer points to older
@@ -1344,8 +1349,9 @@ struct sblock
1344 1349
1345struct string_block 1350struct string_block
1346{ 1351{
1347 struct string_block *next; 1352 /* Place `strings' first, to preserve alignment. */
1348 struct Lisp_String strings[STRING_BLOCK_SIZE]; 1353 struct Lisp_String strings[STRING_BLOCK_SIZE];
1354 struct string_block *next;
1349}; 1355};
1350 1356
1351/* Head and tail of the list of sblock structures holding Lisp string 1357/* Head and tail of the list of sblock structures holding Lisp string
@@ -2126,8 +2132,10 @@ make_uninit_multibyte_string (nchars, nbytes)
2126 by GC are put on a free list to be reallocated before allocating 2132 by GC are put on a free list to be reallocated before allocating
2127 any new float cells from the latest float_block. */ 2133 any new float cells from the latest float_block. */
2128 2134
2129#define FLOAT_BLOCK_SIZE \ 2135#define FLOAT_BLOCK_SIZE \
2130 (((BLOCK_BYTES - sizeof (struct float_block *)) * CHAR_BIT) \ 2136 (((BLOCK_BYTES - sizeof (struct float_block *) \
2137 /* The compiler might add padding at the end. */ \
2138 - (sizeof (struct Lisp_Float) - sizeof (int))) * CHAR_BIT) \
2131 / (sizeof (struct Lisp_Float) * CHAR_BIT + 1)) 2139 / (sizeof (struct Lisp_Float) * CHAR_BIT + 1))
2132 2140
2133#define GETMARKBIT(block,n) \ 2141#define GETMARKBIT(block,n) \
@@ -2754,8 +2762,9 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT
2754 2762
2755struct symbol_block 2763struct symbol_block
2756{ 2764{
2757 struct symbol_block *next; 2765 /* Place `symbols' first, to preserve alignment. */
2758 struct Lisp_Symbol symbols[SYMBOL_BLOCK_SIZE]; 2766 struct Lisp_Symbol symbols[SYMBOL_BLOCK_SIZE];
2767 struct symbol_block *next;
2759}; 2768};
2760 2769
2761/* Current symbol block and index of first unused Lisp_Symbol 2770/* Current symbol block and index of first unused Lisp_Symbol
@@ -2846,8 +2855,9 @@ Its value and function definition are void, and its property list is nil. */)
2846 2855
2847struct marker_block 2856struct marker_block
2848{ 2857{
2849 struct marker_block *next; 2858 /* Place `markers' first, to preserve alignment. */
2850 union Lisp_Misc markers[MARKER_BLOCK_SIZE]; 2859 union Lisp_Misc markers[MARKER_BLOCK_SIZE];
2860 struct marker_block *next;
2851}; 2861};
2852 2862
2853struct marker_block *marker_block; 2863struct marker_block *marker_block;
@@ -3428,6 +3438,7 @@ live_string_p (m, p)
3428 must not be on the free-list. */ 3438 must not be on the free-list. */
3429 return (offset >= 0 3439 return (offset >= 0
3430 && offset % sizeof b->strings[0] == 0 3440 && offset % sizeof b->strings[0] == 0
3441 && offset < (STRING_BLOCK_SIZE * sizeof b->strings[0])
3431 && ((struct Lisp_String *) p)->data != NULL); 3442 && ((struct Lisp_String *) p)->data != NULL);
3432 } 3443 }
3433 else 3444 else
@@ -3452,8 +3463,8 @@ live_cons_p (m, p)
3452 one of the unused cells in the current cons block, 3463 one of the unused cells in the current cons block,
3453 and not be on the free-list. */ 3464 and not be on the free-list. */
3454 return (offset >= 0 3465 return (offset >= 0
3455 && offset < (CONS_BLOCK_SIZE * sizeof b->conses[0])
3456 && offset % sizeof b->conses[0] == 0 3466 && offset % sizeof b->conses[0] == 0
3467 && offset < (CONS_BLOCK_SIZE * sizeof b->conses[0])
3457 && (b != cons_block 3468 && (b != cons_block
3458 || offset / sizeof b->conses[0] < cons_block_index) 3469 || offset / sizeof b->conses[0] < cons_block_index)
3459 && !EQ (((struct Lisp_Cons *) p)->car, Vdead)); 3470 && !EQ (((struct Lisp_Cons *) p)->car, Vdead));
@@ -3481,6 +3492,7 @@ live_symbol_p (m, p)
3481 and not be on the free-list. */ 3492 and not be on the free-list. */
3482 return (offset >= 0 3493 return (offset >= 0
3483 && offset % sizeof b->symbols[0] == 0 3494 && offset % sizeof b->symbols[0] == 0
3495 && offset < (SYMBOL_BLOCK_SIZE * sizeof b->symbols[0])
3484 && (b != symbol_block 3496 && (b != symbol_block
3485 || offset / sizeof b->symbols[0] < symbol_block_index) 3497 || offset / sizeof b->symbols[0] < symbol_block_index)
3486 && !EQ (((struct Lisp_Symbol *) p)->function, Vdead)); 3498 && !EQ (((struct Lisp_Symbol *) p)->function, Vdead));
@@ -3506,8 +3518,8 @@ live_float_p (m, p)
3506 /* P must point to the start of a Lisp_Float and not be 3518 /* P must point to the start of a Lisp_Float and not be
3507 one of the unused cells in the current float block. */ 3519 one of the unused cells in the current float block. */
3508 return (offset >= 0 3520 return (offset >= 0
3509 && offset < (FLOAT_BLOCK_SIZE * sizeof b->floats[0])
3510 && offset % sizeof b->floats[0] == 0 3521 && offset % sizeof b->floats[0] == 0
3522 && offset < (FLOAT_BLOCK_SIZE * sizeof b->floats[0])
3511 && (b != float_block 3523 && (b != float_block
3512 || offset / sizeof b->floats[0] < float_block_index)); 3524 || offset / sizeof b->floats[0] < float_block_index));
3513 } 3525 }
@@ -3534,6 +3546,7 @@ live_misc_p (m, p)
3534 and not be on the free-list. */ 3546 and not be on the free-list. */
3535 return (offset >= 0 3547 return (offset >= 0
3536 && offset % sizeof b->markers[0] == 0 3548 && offset % sizeof b->markers[0] == 0
3549 && offset < (MARKER_BLOCK_SIZE * sizeof b->markers[0])
3537 && (b != marker_block 3550 && (b != marker_block
3538 || offset / sizeof b->markers[0] < marker_block_index) 3551 || offset / sizeof b->markers[0] < marker_block_index)
3539 && ((union Lisp_Misc *) p)->u_marker.type != Lisp_Misc_Free); 3552 && ((union Lisp_Misc *) p)->u_marker.type != Lisp_Misc_Free);
@@ -4068,6 +4081,9 @@ pure_alloc (size, type)
4068 int type; 4081 int type;
4069{ 4082{
4070 POINTER_TYPE *result; 4083 POINTER_TYPE *result;
4084#ifdef USE_LSB_TAG
4085 size_t alignment = (1 << GCTYPEBITS);
4086#else
4071 size_t alignment = sizeof (EMACS_INT); 4087 size_t alignment = sizeof (EMACS_INT);
4072 4088
4073 /* Give Lisp_Floats an extra alignment. */ 4089 /* Give Lisp_Floats an extra alignment. */
@@ -4079,6 +4095,7 @@ pure_alloc (size, type)
4079 alignment = sizeof (struct Lisp_Float); 4095 alignment = sizeof (struct Lisp_Float);
4080#endif 4096#endif
4081 } 4097 }
4098#endif
4082 4099
4083 again: 4100 again:
4084 result = ALIGN (purebeg + pure_bytes_used, alignment); 4101 result = ALIGN (purebeg + pure_bytes_used, alignment);
diff --git a/src/buffer.c b/src/buffer.c
index d0830c83a51..d14db61c2a9 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,5 +1,5 @@
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, 2003 2 Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 03, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -67,7 +67,7 @@ struct buffer *all_buffers;
67 Setting the default value also goes through the alist of buffers 67 Setting the default value also goes through the alist of buffers
68 and stores into each buffer that does not say it has a local value. */ 68 and stores into each buffer that does not say it has a local value. */
69 69
70struct buffer buffer_defaults; 70DECL_ALIGN (struct buffer, buffer_defaults);
71 71
72/* A Lisp_Object pointer to the above, used for staticpro */ 72/* A Lisp_Object pointer to the above, used for staticpro */
73 73
@@ -97,7 +97,8 @@ struct buffer buffer_local_flags;
97/* This structure holds the names of symbols whose values may be 97/* This structure holds the names of symbols whose values may be
98 buffer-local. It is indexed and accessed in the same way as the above. */ 98 buffer-local. It is indexed and accessed in the same way as the above. */
99 99
100struct buffer buffer_local_symbols; 100DECL_ALIGN (struct buffer, buffer_local_symbols);
101
101/* A Lisp_Object pointer to the above, used for staticpro */ 102/* A Lisp_Object pointer to the above, used for staticpro */
102static Lisp_Object Vbuffer_local_symbols; 103static Lisp_Object Vbuffer_local_symbols;
103 104
@@ -4959,6 +4960,7 @@ init_buffer_once ()
4959 buffer_defaults.scroll_bar_width = Qnil; 4960 buffer_defaults.scroll_bar_width = Qnil;
4960 buffer_defaults.vertical_scroll_bar_type = Qt; 4961 buffer_defaults.vertical_scroll_bar_type = Qt;
4961 buffer_defaults.indicate_empty_lines = Qnil; 4962 buffer_defaults.indicate_empty_lines = Qnil;
4963 buffer_defaults.indicate_buffer_boundaries = Qnil;
4962 buffer_defaults.scroll_up_aggressively = Qnil; 4964 buffer_defaults.scroll_up_aggressively = Qnil;
4963 buffer_defaults.scroll_down_aggressively = Qnil; 4965 buffer_defaults.scroll_down_aggressively = Qnil;
4964 buffer_defaults.display_time = Qnil; 4966 buffer_defaults.display_time = Qnil;
@@ -5028,6 +5030,7 @@ init_buffer_once ()
5028 XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx; 5030 XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx;
5029 XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx; 5031 XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx;
5030 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; 5032 XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx;
5033 XSETFASTINT (buffer_local_flags.indicate_buffer_boundaries, idx); ++idx;
5031 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx; 5034 XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx;
5032 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx; 5035 XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx;
5033 XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; 5036 XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx;
@@ -5316,6 +5319,11 @@ This is the same as (default-value 'vertical-scroll-bar). */);
5316 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. 5319 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it.
5317This is the same as (default-value 'indicate-empty-lines). */); 5320This is the same as (default-value 'indicate-empty-lines). */);
5318 5321
5322 DEFVAR_LISP_NOPRO ("default-indicate-buffer-boundaries",
5323 &buffer_defaults.indicate_buffer_boundaries,
5324 doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it.
5325This is the same as (default-value 'indicate-buffer-boundaries). */);
5326
5319 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", 5327 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively",
5320 &buffer_defaults.scroll_up_aggressively, 5328 &buffer_defaults.scroll_up_aggressively,
5321 doc: /* Default value of `scroll-up-aggressively'. 5329 doc: /* Default value of `scroll-up-aggressively'.
@@ -5626,6 +5634,14 @@ A value of t means to use the vertical scroll bar type from the window's frame.
5626If non-nil, a bitmap is displayed in the left fringe of a window on 5634If non-nil, a bitmap is displayed in the left fringe of a window on
5627window-systems. */); 5635window-systems. */);
5628 5636
5637 DEFVAR_PER_BUFFER ("indicate-buffer-boundaries",
5638 &current_buffer->indicate_buffer_boundaries, Qnil,
5639 doc: /* *Visually indicate buffer boundaries and scrolling.
5640If non-nil, the first and last line of the buffer are marked in the left and
5641right fringe of a window on window-systems.
5642In addition, if value is t, the top and bottom line of the window are marked
5643with up and down arrow bitmaps in the right fringe if window can be scrolled. */);
5644
5629 DEFVAR_PER_BUFFER ("scroll-up-aggressively", 5645 DEFVAR_PER_BUFFER ("scroll-up-aggressively",
5630 &current_buffer->scroll_up_aggressively, Qnil, 5646 &current_buffer->scroll_up_aggressively, Qnil,
5631 doc: /* How far to scroll windows upward. 5647 doc: /* How far to scroll windows upward.
diff --git a/src/buffer.h b/src/buffer.h
index 930424b0b49..e2205a916e6 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -733,6 +733,9 @@ struct buffer
733 like vi). */ 733 like vi). */
734 Lisp_Object indicate_empty_lines; 734 Lisp_Object indicate_empty_lines;
735 735
736 /* Non-nil means indicate buffer boundaries and scrolling. */
737 Lisp_Object indicate_buffer_boundaries;
738
736 /* Time stamp updated each time this buffer is displayed in a window. */ 739 /* Time stamp updated each time this buffer is displayed in a window. */
737 Lisp_Object display_time; 740 Lisp_Object display_time;
738 741
diff --git a/src/dired.c b/src/dired.c
index 3bcd3051c25..f4102ff6edb 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1,5 +1,5 @@
1/* Lisp functions for making directory listings. 1/* Lisp functions for making directory listings.
2 Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001 2 Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -941,9 +941,9 @@ Elements of the attribute list are:
941 else 941 else
942 { 942 {
943 pw = (struct passwd *) getpwuid (s.st_uid); 943 pw = (struct passwd *) getpwuid (s.st_uid);
944 values[2] = (pw ? build_string (pw->pw_name) : s.st_uid); 944 values[2] = (pw ? build_string (pw->pw_name) : make_number (s.st_uid));
945 gr = (struct group *) getgrgid (s.st_gid); 945 gr = (struct group *) getgrgid (s.st_gid);
946 values[3] = (gr ? build_string (gr->gr_name) : s.st_gid); 946 values[3] = (gr ? build_string (gr->gr_name) : make_number (s.st_gid));
947 } 947 }
948 values[4] = make_time (s.st_atime); 948 values[4] = make_time (s.st_atime);
949 values[5] = make_time (s.st_mtime); 949 values[5] = make_time (s.st_mtime);
diff --git a/src/dispextern.h b/src/dispextern.h
index b93bbd1190d..79b949b6337 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -709,6 +709,15 @@ struct glyph_row
709 position of the next row. */ 709 position of the next row. */
710 struct display_pos end; 710 struct display_pos end;
711 711
712 /* Left fringe bitmap number (enum fringe_bitmap_type). */
713 unsigned left_fringe_bitmap : 4;
714
715 /* Right fringe bitmap number (enum fringe_bitmap_type). */
716 unsigned right_fringe_bitmap : 4;
717
718 /* 1 means that we must draw the bitmaps of this row. */
719 unsigned redraw_fringe_bitmaps_p : 1;
720
712 /* In a desired matrix, 1 means that this row must be updated. In a 721 /* In a desired matrix, 1 means that this row must be updated. In a
713 current matrix, 0 means that the row has been invalidated, i.e. 722 current matrix, 0 means that the row has been invalidated, i.e.
714 the row's contents do not agree with what is visible on the 723 the row's contents do not agree with what is visible on the
@@ -777,6 +786,29 @@ struct glyph_row
777 /* 1 means this row was ended by a newline from a string. */ 786 /* 1 means this row was ended by a newline from a string. */
778 unsigned ends_in_newline_from_string_p : 1; 787 unsigned ends_in_newline_from_string_p : 1;
779 788
789 /* 1 means this row width is exactly the width of the window, and the
790 final newline character is hidden in the right fringe. */
791 unsigned exact_window_width_line_p : 1;
792
793 /* 1 means this row currently shows the cursor in the right fringe. */
794 unsigned cursor_in_fringe_p : 1;
795
796 /* Non-zero means display a bitmap on X frames indicating that this
797 the first line of the buffer. */
798 unsigned indicate_bob_p : 1;
799
800 /* Non-zero means display a bitmap on X frames indicating that this
801 the top line of the window, but not start of the buffer. */
802 unsigned indicate_top_line_p : 1;
803
804 /* Non-zero means display a bitmap on X frames indicating that this
805 the last line of the buffer. */
806 unsigned indicate_eob_p : 1;
807
808 /* Non-zero means display a bitmap on X frames indicating that this
809 the bottom line of the window, but not end of the buffer. */
810 unsigned indicate_bottom_line_p : 1;
811
780 /* Continuation lines width at the start of the row. */ 812 /* Continuation lines width at the start of the row. */
781 int continuation_lines_width; 813 int continuation_lines_width;
782}; 814};
@@ -1582,10 +1614,19 @@ enum fringe_bitmap_type
1582 NO_FRINGE_BITMAP = 0, 1614 NO_FRINGE_BITMAP = 0,
1583 LEFT_TRUNCATION_BITMAP, 1615 LEFT_TRUNCATION_BITMAP,
1584 RIGHT_TRUNCATION_BITMAP, 1616 RIGHT_TRUNCATION_BITMAP,
1617 UP_ARROW_BITMAP,
1618 DOWN_ARROW_BITMAP,
1585 CONTINUED_LINE_BITMAP, 1619 CONTINUED_LINE_BITMAP,
1586 CONTINUATION_LINE_BITMAP, 1620 CONTINUATION_LINE_BITMAP,
1587 OVERLAY_ARROW_BITMAP, 1621 OVERLAY_ARROW_BITMAP,
1622 FIRST_LINE_BITMAP,
1623 LAST_LINE_BITMAP,
1624 FILLED_BOX_CURSOR_BITMAP,
1625 HOLLOW_BOX_CURSOR_BITMAP,
1626 BAR_CURSOR_BITMAP,
1627 HBAR_CURSOR_BITMAP,
1588 ZV_LINE_BITMAP, 1628 ZV_LINE_BITMAP,
1629 HOLLOW_SQUARE_BITMAP,
1589 MAX_FRINGE_BITMAPS 1630 MAX_FRINGE_BITMAPS
1590}; 1631};
1591 1632
@@ -2485,7 +2526,10 @@ void move_it_past_eol P_ ((struct it *));
2485int in_display_vector_p P_ ((struct it *)); 2526int in_display_vector_p P_ ((struct it *));
2486int frame_mode_line_height P_ ((struct frame *)); 2527int frame_mode_line_height P_ ((struct frame *));
2487void highlight_trailing_whitespace P_ ((struct frame *, struct glyph_row *)); 2528void highlight_trailing_whitespace P_ ((struct frame *, struct glyph_row *));
2529void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int));
2488void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); 2530void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *));
2531void draw_window_fringes P_ ((struct window *));
2532int update_window_fringes P_ ((struct window *, int));
2489void compute_fringe_widths P_ ((struct frame *, int)); 2533void compute_fringe_widths P_ ((struct frame *, int));
2490extern Lisp_Object Qtool_bar; 2534extern Lisp_Object Qtool_bar;
2491extern Lisp_Object Vshow_trailing_whitespace; 2535extern Lisp_Object Vshow_trailing_whitespace;
diff --git a/src/dispnew.c b/src/dispnew.c
index 81a0f1f5c8e..b62fd8f8b8f 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1,5 +1,5 @@
1/* Updating of data structures for redisplay. 1/* Updating of data structures for redisplay.
2 Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,2003 2 Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,03,04
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -1500,12 +1500,11 @@ row_equal_p (w, a, b, mouse_face_p)
1500 return 0; 1500 return 0;
1501 } 1501 }
1502 1502
1503 if (a->truncated_on_left_p != b->truncated_on_left_p 1503 if (a->fill_line_p != b->fill_line_p
1504 || a->fill_line_p != b->fill_line_p 1504 || a->cursor_in_fringe_p != b->cursor_in_fringe_p
1505 || a->truncated_on_right_p != b->truncated_on_right_p 1505 || a->left_fringe_bitmap != b->left_fringe_bitmap
1506 || a->overlay_arrow_p != b->overlay_arrow_p 1506 || a->right_fringe_bitmap != b->right_fringe_bitmap
1507 || a->continued_p != b->continued_p 1507 || a->exact_window_width_line_p != b->exact_window_width_line_p
1508 || a->indicate_empty_line_p != b->indicate_empty_line_p
1509 || a->overlapped_p != b->overlapped_p 1508 || a->overlapped_p != b->overlapped_p
1510 || (MATRIX_ROW_CONTINUATION_LINE_P (a) 1509 || (MATRIX_ROW_CONTINUATION_LINE_P (a)
1511 != MATRIX_ROW_CONTINUATION_LINE_P (b)) 1510 != MATRIX_ROW_CONTINUATION_LINE_P (b))
@@ -3442,6 +3441,7 @@ direct_output_for_insert (g)
3442 /* Can't do it in a continued line because continuation 3441 /* Can't do it in a continued line because continuation
3443 lines would change. */ 3442 lines would change. */
3444 (glyph_row->continued_p 3443 (glyph_row->continued_p
3444 || glyph_row->exact_window_width_line_p
3445 /* Can't use this method if the line overlaps others or is 3445 /* Can't use this method if the line overlaps others or is
3446 overlapped by others because these other lines would 3446 overlapped by others because these other lines would
3447 have to be redisplayed. */ 3447 have to be redisplayed. */
@@ -3647,6 +3647,10 @@ direct_output_for_insert (g)
3647 cursor_to (y, x); 3647 cursor_to (y, x);
3648 } 3648 }
3649 3649
3650#ifdef HAVE_WINDOW_SYSTEM
3651 update_window_fringes (w, 0);
3652#endif
3653
3650 if (FRAME_RIF (f)) 3654 if (FRAME_RIF (f))
3651 FRAME_RIF (f)->update_window_end_hook (w, 1, 0); 3655 FRAME_RIF (f)->update_window_end_hook (w, 1, 0);
3652 update_end (f); 3656 update_end (f);
@@ -4194,6 +4198,10 @@ update_window (w, force_p)
4194 strcpy (w->current_matrix->method, w->desired_matrix->method); 4198 strcpy (w->current_matrix->method, w->desired_matrix->method);
4195#endif 4199#endif
4196 4200
4201#ifdef HAVE_WINDOW_SYSTEM
4202 update_window_fringes (w, 0);
4203#endif
4204
4197 /* End the update of window W. Don't set the cursor if we 4205 /* End the update of window W. Don't set the cursor if we
4198 paused updating the display because in this case, 4206 paused updating the display because in this case,
4199 set_window_cursor_after_update hasn't been called, and 4207 set_window_cursor_after_update hasn't been called, and
@@ -4515,13 +4523,10 @@ update_window_line (w, vpos, mouse_face_overwritten_p)
4515 if (!current_row->enabled_p 4523 if (!current_row->enabled_p
4516 || desired_row->y != current_row->y 4524 || desired_row->y != current_row->y
4517 || desired_row->visible_height != current_row->visible_height 4525 || desired_row->visible_height != current_row->visible_height
4518 || desired_row->overlay_arrow_p != current_row->overlay_arrow_p 4526 || desired_row->cursor_in_fringe_p != current_row->cursor_in_fringe_p
4519 || desired_row->truncated_on_left_p != current_row->truncated_on_left_p 4527 || current_row->redraw_fringe_bitmaps_p
4520 || desired_row->truncated_on_right_p != current_row->truncated_on_right_p
4521 || desired_row->continued_p != current_row->continued_p
4522 || desired_row->mode_line_p != current_row->mode_line_p 4528 || desired_row->mode_line_p != current_row->mode_line_p
4523 || (desired_row->indicate_empty_line_p 4529 || desired_row->exact_window_width_line_p != current_row->exact_window_width_line_p
4524 != current_row->indicate_empty_line_p)
4525 || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row) 4530 || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row)
4526 != MATRIX_ROW_CONTINUATION_LINE_P (current_row))) 4531 != MATRIX_ROW_CONTINUATION_LINE_P (current_row)))
4527 rif->after_update_window_line_hook (desired_row); 4532 rif->after_update_window_line_hook (desired_row);
@@ -4776,6 +4781,7 @@ scrolling_window (w, header_line_p)
4776 4781
4777 if (c->enabled_p 4782 if (c->enabled_p
4778 && d->enabled_p 4783 && d->enabled_p
4784 && !d->redraw_fringe_bitmaps_p
4779 && c->y == d->y 4785 && c->y == d->y
4780 && MATRIX_ROW_BOTTOM_Y (c) <= yb 4786 && MATRIX_ROW_BOTTOM_Y (c) <= yb
4781 && MATRIX_ROW_BOTTOM_Y (d) <= yb 4787 && MATRIX_ROW_BOTTOM_Y (d) <= yb
@@ -4831,6 +4837,7 @@ scrolling_window (w, header_line_p)
4831 && MATRIX_ROW (current_matrix, i - 1)->enabled_p 4837 && MATRIX_ROW (current_matrix, i - 1)->enabled_p
4832 && (MATRIX_ROW (current_matrix, i - 1)->y 4838 && (MATRIX_ROW (current_matrix, i - 1)->y
4833 == MATRIX_ROW (desired_matrix, j - 1)->y) 4839 == MATRIX_ROW (desired_matrix, j - 1)->y)
4840 && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p
4834 && row_equal_p (w, 4841 && row_equal_p (w,
4835 MATRIX_ROW (desired_matrix, i - 1), 4842 MATRIX_ROW (desired_matrix, i - 1),
4836 MATRIX_ROW (current_matrix, j - 1), 1)) 4843 MATRIX_ROW (current_matrix, j - 1), 1))
@@ -5023,6 +5030,10 @@ scrolling_window (w, header_line_p)
5023 to = MATRIX_ROW (current_matrix, r->desired_vpos + j); 5030 to = MATRIX_ROW (current_matrix, r->desired_vpos + j);
5024 from = MATRIX_ROW (desired_matrix, r->desired_vpos + j); 5031 from = MATRIX_ROW (desired_matrix, r->desired_vpos + j);
5025 to_overlapped_p = to->overlapped_p; 5032 to_overlapped_p = to->overlapped_p;
5033 if (!from->mode_line_p && !w->pseudo_window_p
5034 && (to->left_fringe_bitmap != from->left_fringe_bitmap
5035 || to->right_fringe_bitmap != from->right_fringe_bitmap))
5036 from->redraw_fringe_bitmaps_p = 1;
5026 assign_row (to, from); 5037 assign_row (to, from);
5027 to->enabled_p = 1, from->enabled_p = 0; 5038 to->enabled_p = 1, from->enabled_p = 0;
5028 to->overlapped_p = to_overlapped_p; 5039 to->overlapped_p = to_overlapped_p;
diff --git a/src/fontset.c b/src/fontset.c
index 3cd76c3af1d..61e05b68c72 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -599,7 +599,8 @@ fontset_font_pattern (f, id, c)
599 fontset = FONTSET_FROM_ID (id); 599 fontset = FONTSET_FROM_ID (id);
600 xassert (!BASE_FONTSET_P (fontset)); 600 xassert (!BASE_FONTSET_P (fontset));
601 fontset = FONTSET_BASE (fontset); 601 fontset = FONTSET_BASE (fontset);
602 elt = FONTSET_REF (fontset, c); 602 if (! EQ (fontset, Vdefault_fontset))
603 elt = FONTSET_REF (fontset, c);
603 } 604 }
604 if (NILP (elt)) 605 if (NILP (elt))
605 { 606 {
diff --git a/src/keyboard.c b/src/keyboard.c
index 1897fb5c0f8..cdf28bd5e66 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1,5 +1,5 @@
1/* Keyboard and mouse input; editor command loop. 1/* Keyboard and mouse input; editor command loop.
2 Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99,2000,01,02,03 2 Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99,2000,01,02,03,04
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -470,36 +470,6 @@ extern char *pending_malloc_warning;
470 470
471static struct input_event kbd_buffer[KBD_BUFFER_SIZE]; 471static struct input_event kbd_buffer[KBD_BUFFER_SIZE];
472 472
473/* Vector to GCPRO the Lisp objects referenced from kbd_buffer.
474
475 The interrupt-level event handlers will never enqueue an event on a
476 frame which is not in Vframe_list, and once an event is dequeued,
477 internal_last_event_frame or the event itself points to the frame.
478 So that's all fine.
479
480 But while the event is sitting in the queue, it's completely
481 unprotected. Suppose the user types one command which will run for
482 a while and then delete a frame, and then types another event at
483 the frame that will be deleted, before the command gets around to
484 it. Suppose there are no references to this frame elsewhere in
485 Emacs, and a GC occurs before the second event is dequeued. Now we
486 have an event referring to a freed frame, which will crash Emacs
487 when it is dequeued.
488
489 Similar things happen when an event on a scroll bar is enqueued; the
490 window may be deleted while the event is in the queue.
491
492 So, we use this vector to protect the Lisp_Objects in the event
493 queue. That way, they'll be dequeued as dead frames or windows,
494 but still valid Lisp objects.
495
496 If kbd_buffer[i].kind != NO_EVENT, then
497
498 AREF (kbd_buffer_gcpro, 2 * i) == kbd_buffer[i].frame_or_window.
499 AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg. */
500
501static Lisp_Object kbd_buffer_gcpro;
502
503/* Pointer to next available character in kbd_buffer. 473/* Pointer to next available character in kbd_buffer.
504 If kbd_fetch_ptr == kbd_store_ptr, the buffer is empty. 474 If kbd_fetch_ptr == kbd_store_ptr, the buffer is empty.
505 This may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the 475 This may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the
@@ -3630,7 +3600,6 @@ kbd_buffer_store_event (event)
3630 Discard the event if it would fill the last slot. */ 3600 Discard the event if it would fill the last slot. */
3631 if (kbd_fetch_ptr - 1 != kbd_store_ptr) 3601 if (kbd_fetch_ptr - 1 != kbd_store_ptr)
3632 { 3602 {
3633 int idx;
3634 3603
3635#if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error 3604#if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error
3636 prone to assign individual members for other events, in case 3605 prone to assign individual members for other events, in case
@@ -3660,9 +3629,6 @@ kbd_buffer_store_event (event)
3660 *kbd_store_ptr = *event; 3629 *kbd_store_ptr = *event;
3661#endif 3630#endif
3662 3631
3663 idx = 2 * (kbd_store_ptr - kbd_buffer);
3664 ASET (kbd_buffer_gcpro, idx, event->frame_or_window);
3665 ASET (kbd_buffer_gcpro, idx + 1, event->arg);
3666 ++kbd_store_ptr; 3632 ++kbd_store_ptr;
3667 } 3633 }
3668} 3634}
@@ -3778,9 +3744,6 @@ static INLINE void
3778clear_event (event) 3744clear_event (event)
3779 struct input_event *event; 3745 struct input_event *event;
3780{ 3746{
3781 int idx = 2 * (event - kbd_buffer);
3782 ASET (kbd_buffer_gcpro, idx, Qnil);
3783 ASET (kbd_buffer_gcpro, idx + 1, Qnil);
3784 event->kind = NO_EVENT; 3747 event->kind = NO_EVENT;
3785} 3748}
3786 3749
@@ -6805,6 +6768,30 @@ tty_read_avail_input (struct display *display,
6805 6768
6806#endif /* not VMS */ 6769#endif /* not VMS */
6807 6770
6771void
6772handle_async_input ()
6773{
6774#ifdef BSD4_1
6775 extern int select_alarmed;
6776#endif
6777 interrupt_input_pending = 0;
6778
6779 while (1)
6780 {
6781 int nread;
6782 nread = read_avail_input (1);
6783 /* -1 means it's not ok to read the input now.
6784 UNBLOCK_INPUT will read it later; now, avoid infinite loop.
6785 0 means there was no keyboard input available. */
6786 if (nread <= 0)
6787 break;
6788
6789#ifdef BSD4_1
6790 select_alarmed = 1; /* Force the select emulator back to life */
6791#endif
6792 }
6793}
6794
6808#ifdef SIGIO /* for entire page */ 6795#ifdef SIGIO /* for entire page */
6809/* Note SIGIO has been undef'd if FIONREAD is missing. */ 6796/* Note SIGIO has been undef'd if FIONREAD is missing. */
6810 6797
@@ -6814,9 +6801,6 @@ input_available_signal (signo)
6814{ 6801{
6815 /* Must preserve main program's value of errno. */ 6802 /* Must preserve main program's value of errno. */
6816 int old_errno = errno; 6803 int old_errno = errno;
6817#ifdef BSD4_1
6818 extern int select_alarmed;
6819#endif
6820 6804
6821#if defined (USG) && !defined (POSIX_SIGNALS) 6805#if defined (USG) && !defined (POSIX_SIGNALS)
6822 /* USG systems forget handlers when they are used; 6806 /* USG systems forget handlers when they are used;
@@ -6831,20 +6815,11 @@ input_available_signal (signo)
6831 if (input_available_clear_time) 6815 if (input_available_clear_time)
6832 EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); 6816 EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0);
6833 6817
6834 while (1) 6818#ifdef SYNC_INPUT
6835 { 6819 interrupt_input_pending = 1;
6836 int nread; 6820#else
6837 nread = read_avail_input (1); 6821 handle_async_input ();
6838 /* -1 means it's not ok to read the input now.
6839 UNBLOCK_INPUT will read it later; now, avoid infinite loop.
6840 0 means there was no keyboard input available. */
6841 if (nread <= 0)
6842 break;
6843
6844#ifdef BSD4_1
6845 select_alarmed = 1; /* Force the select emulator back to life */
6846#endif 6822#endif
6847 }
6848 6823
6849#ifdef BSD4_1 6824#ifdef BSD4_1
6850 sigfree (); 6825 sigfree ();
@@ -6863,7 +6838,7 @@ void
6863reinvoke_input_signal () 6838reinvoke_input_signal ()
6864{ 6839{
6865#ifdef SIGIO 6840#ifdef SIGIO
6866 kill (getpid (), SIGIO); 6841 handle_async_input ();
6867#endif 6842#endif
6868} 6843}
6869 6844
@@ -10123,7 +10098,6 @@ Also end any kbd macro being defined. */)
10123 discard_tty_input (); 10098 discard_tty_input ();
10124 10099
10125 kbd_fetch_ptr = kbd_store_ptr; 10100 kbd_fetch_ptr = kbd_store_ptr;
10126 Ffillarray (kbd_buffer_gcpro, Qnil);
10127 input_pending = 0; 10101 input_pending = 0;
10128 10102
10129 return Qnil; 10103 return Qnil;
@@ -10217,17 +10191,13 @@ stuff_buffered_input (stuffstring)
10217 Should we ignore anything that was typed in at the "wrong" kboard? */ 10191 Should we ignore anything that was typed in at the "wrong" kboard? */
10218 for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++) 10192 for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++)
10219 { 10193 {
10220 int idx;
10221 10194
10222 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE) 10195 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
10223 kbd_fetch_ptr = kbd_buffer; 10196 kbd_fetch_ptr = kbd_buffer;
10224 if (kbd_fetch_ptr->kind == ASCII_KEYSTROKE_EVENT) 10197 if (kbd_fetch_ptr->kind == ASCII_KEYSTROKE_EVENT)
10225 stuff_char (kbd_fetch_ptr->code); 10198 stuff_char (kbd_fetch_ptr->code);
10226 10199
10227 kbd_fetch_ptr->kind = NO_EVENT; 10200 clear_event (kbd_fetch_ptr);
10228 idx = 2 * (kbd_fetch_ptr - kbd_buffer);
10229 ASET (kbd_buffer_gcpro, idx, Qnil);
10230 ASET (kbd_buffer_gcpro, idx + 1, Qnil);
10231 } 10201 }
10232 10202
10233 input_pending = 0; 10203 input_pending = 0;
@@ -10679,7 +10649,6 @@ init_keyboard ()
10679 recent_keys_index = 0; 10649 recent_keys_index = 0;
10680 kbd_fetch_ptr = kbd_buffer; 10650 kbd_fetch_ptr = kbd_buffer;
10681 kbd_store_ptr = kbd_buffer; 10651 kbd_store_ptr = kbd_buffer;
10682 kbd_buffer_gcpro = Fmake_vector (make_number (2 * KBD_BUFFER_SIZE), Qnil);
10683#ifdef HAVE_MOUSE 10652#ifdef HAVE_MOUSE
10684 do_mouse_tracking = Qnil; 10653 do_mouse_tracking = Qnil;
10685#endif 10654#endif
@@ -10976,9 +10945,6 @@ syms_of_keyboard ()
10976 Fset (Qextended_command_history, Qnil); 10945 Fset (Qextended_command_history, Qnil);
10977 staticpro (&Qextended_command_history); 10946 staticpro (&Qextended_command_history);
10978 10947
10979 kbd_buffer_gcpro = Fmake_vector (make_number (2 * KBD_BUFFER_SIZE), Qnil);
10980 staticpro (&kbd_buffer_gcpro);
10981
10982 accent_key_syms = Qnil; 10948 accent_key_syms = Qnil;
10983 staticpro (&accent_key_syms); 10949 staticpro (&accent_key_syms);
10984 10950
diff --git a/src/lisp.h b/src/lisp.h
index 8c6374e6004..570d5ff9757 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1,5 +1,5 @@
1/* Fundamental definitions for GNU Emacs Lisp interpreter. 1/* Fundamental definitions for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985,86,87,93,94,95,97,98,1999,2000, 2001, 2002, 2003 2 Copyright (C) 1985,86,87,93,94,95,97,98,1999,2000,01,02,03,2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -67,10 +67,6 @@ extern void die P_((const char *, const char *, int));
67 ? (void) 0 \ 67 ? (void) 0 \
68 : die ((msg), __FILE__, __LINE__)), \ 68 : die ((msg), __FILE__, __LINE__)), \
69 0) 69 0)
70
71/* Let's get some compile-time checking too. */
72#undef NO_UNION_TYPE
73
74#else 70#else
75 71
76/* Produce same side effects and result, but don't complain. */ 72/* Produce same side effects and result, but don't complain. */
@@ -293,12 +289,55 @@ enum pvec_type
293/* For convenience, we also store the number of elements in these bits. */ 289/* For convenience, we also store the number of elements in these bits. */
294#define PSEUDOVECTOR_SIZE_MASK 0x1ff 290#define PSEUDOVECTOR_SIZE_MASK 0x1ff
295 291
292/***** Select the tagging scheme. *****/
293
294/* First, try and define DECL_ALIGN(type,var) which declares a static
295 variable VAR of type TYPE with the added requirement that it be
296 TYPEBITS-aligned. */
297#if defined USE_LSB_TAG && !defined DECL_ALIGN
298/* What compiler directive should we use for non-gcc compilers? -stef */
299# if defined (__GNUC__)
300# define DECL_ALIGN(type, var) \
301 type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
302# else
303# error "USE_LSB_TAG used without defining DECL_ALIGN"
304# endif
305#endif
306
307#ifndef USE_LSB_TAG
308/* Just remove the alignment annotation if we don't use it. */
309#undef DECL_ALIGN
310#define DECL_ALIGN(type, var) type var
311#endif
312
313
296/* These macros extract various sorts of values from a Lisp_Object. 314/* These macros extract various sorts of values from a Lisp_Object.
297 For example, if tem is a Lisp_Object whose type is Lisp_Cons, 315 For example, if tem is a Lisp_Object whose type is Lisp_Cons,
298 XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */ 316 XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */
299 317
300#ifdef NO_UNION_TYPE 318#ifdef NO_UNION_TYPE
301 319
320#ifdef USE_LSB_TAG
321
322#define TYPEMASK ((((EMACS_INT) 1) << GCTYPEBITS) - 1)
323#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) & TYPEMASK))
324#define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS)
325#define XUINT(a) (((EMACS_UINT) (a)) >> GCTYPEBITS)
326#define XSET(var, type, ptr) \
327 (eassert (XTYPE (ptr) == 0), /* Check alignment. */ \
328 (var) = ((EMACS_INT) (type)) | ((EMACS_INT) (ptr)))
329#define make_number(N) (((EMACS_INT) (N)) << GCTYPEBITS)
330
331/* XFASTINT and XSETFASTINT are for use when the integer is known to be
332 positive, in which case the implementation can sometimes be faster
333 depending on the tagging scheme. With USE_LSB_TAG, there's no benefit. */
334#define XFASTINT(a) XINT (a)
335#define XSETFASTINT(a, b) ((a) = make_number (b))
336
337#define XPNTR(a) ((EMACS_INT) ((a) & ~TYPEMASK))
338
339#else /* not USE_LSB_TAG */
340
302#define VALMASK ((((EMACS_INT) 1) << VALBITS) - 1) 341#define VALMASK ((((EMACS_INT) 1) << VALBITS) - 1)
303 342
304/* One need to override this if there must be high bits set in data space 343/* One need to override this if there must be high bits set in data space
@@ -337,6 +376,8 @@ enum pvec_type
337#define make_number(N) \ 376#define make_number(N) \
338 ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) 377 ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
339 378
379#endif /* not USE_LSB_TAG */
380
340#define EQ(x, y) ((x) == (y)) 381#define EQ(x, y) ((x) == (y))
341 382
342#else /* not NO_UNION_TYPE */ 383#else /* not NO_UNION_TYPE */
@@ -1150,6 +1191,13 @@ struct Lisp_Free
1150 unsigned gcmarkbit : 1; 1191 unsigned gcmarkbit : 1;
1151 int spacer : 15; 1192 int spacer : 15;
1152 union Lisp_Misc *chain; 1193 union Lisp_Misc *chain;
1194#ifdef USE_LSB_TAG
1195 /* Try to make sure that sizeof(Lisp_Misc) preserves TYPEBITS-alignment.
1196 This assumes that Lisp_Marker is the largest of the alternatives and
1197 that Lisp_Intfwd has the same size as "Lisp_Free w/o padding". */
1198 char padding[((((sizeof (struct Lisp_Marker) - 1) >> GCTYPEBITS) + 1)
1199 << GCTYPEBITS) - sizeof (struct Lisp_Intfwd)];
1200#endif
1153 }; 1201 };
1154 1202
1155/* To get the type field of a union Lisp_Misc, use XMISCTYPE. 1203/* To get the type field of a union Lisp_Misc, use XMISCTYPE.
@@ -1517,7 +1565,7 @@ typedef unsigned char UCHAR;
1517 1565
1518#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \ 1566#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \
1519 Lisp_Object fnname (); \ 1567 Lisp_Object fnname (); \
1520 struct Lisp_Subr sname = \ 1568 DECL_ALIGN (struct Lisp_Subr, sname) = \
1521 { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ 1569 { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \
1522 fnname, minargs, maxargs, lname, prompt, 0}; \ 1570 fnname, minargs, maxargs, lname, prompt, 0}; \
1523 Lisp_Object fnname 1571 Lisp_Object fnname
@@ -1528,7 +1576,7 @@ typedef unsigned char UCHAR;
1528 arguments, so we can catch errors with maxargs at compile-time. */ 1576 arguments, so we can catch errors with maxargs at compile-time. */
1529#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \ 1577#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \
1530 Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ 1578 Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \
1531 struct Lisp_Subr sname = \ 1579 DECL_ALIGN (struct Lisp_Subr, sname) = \
1532 { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ 1580 { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \
1533 fnname, minargs, maxargs, lname, prompt, 0}; \ 1581 fnname, minargs, maxargs, lname, prompt, 0}; \
1534 Lisp_Object fnname 1582 Lisp_Object fnname
@@ -1675,6 +1723,9 @@ extern char *stack_bottom;
1675 This is a good thing to do around a loop that has no side effects 1723 This is a good thing to do around a loop that has no side effects
1676 and (in particular) cannot call arbitrary Lisp code. */ 1724 and (in particular) cannot call arbitrary Lisp code. */
1677 1725
1726#ifdef SYNC_INPUT
1727extern void handle_async_input P_ ((void));
1728extern int interrupt_input_pending;
1678#define QUIT \ 1729#define QUIT \
1679 do { \ 1730 do { \
1680 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ 1731 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
@@ -1682,8 +1733,24 @@ extern char *stack_bottom;
1682 Vquit_flag = Qnil; \ 1733 Vquit_flag = Qnil; \
1683 Fsignal (Qquit, Qnil); \ 1734 Fsignal (Qquit, Qnil); \
1684 } \ 1735 } \
1736 else if (interrupt_input_pending) \
1737 handle_async_input (); \
1685 } while (0) 1738 } while (0)
1686 1739
1740#else /* not SYNC_INPUT */
1741
1742#define QUIT \
1743 do { \
1744 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
1745 { \
1746 Vquit_flag = Qnil; \
1747 Fsignal (Qquit, Qnil); \
1748 } \
1749 } while (0)
1750
1751#endif /* not SYNC_INPUT */
1752
1753
1687/* Nonzero if ought to quit now. */ 1754/* Nonzero if ought to quit now. */
1688 1755
1689#define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) 1756#define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit))
diff --git a/src/lread.c b/src/lread.c
index fae47300bd6..ac353c798dc 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1,5 +1,5 @@
1/* Lisp parsing and input streams. 1/* Lisp parsing and input streams.
2 Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, 2000, 01, 2003 2 Copyright (C) 1985,86,87,88,89,93,94,95,97,98,99,2000,01,03,2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -3496,7 +3496,6 @@ defvar_per_buffer (namestring, address, type, doc)
3496{ 3496{
3497 Lisp_Object sym, val; 3497 Lisp_Object sym, val;
3498 int offset; 3498 int offset;
3499 extern struct buffer buffer_local_symbols;
3500 3499
3501 sym = intern (namestring); 3500 sym = intern (namestring);
3502 val = allocate_misc (); 3501 val = allocate_misc ();
diff --git a/src/macterm.c b/src/macterm.c
index 98e9354afe2..a4124a0c7bc 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1143,6 +1143,9 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
1143 output_cursor.x, output_cursor.y); 1143 output_cursor.x, output_cursor.y);
1144 1144
1145 x_draw_vertical_border (w); 1145 x_draw_vertical_border (w);
1146
1147 draw_window_fringes (w);
1148
1146 UNBLOCK_INPUT; 1149 UNBLOCK_INPUT;
1147 } 1150 }
1148 1151
@@ -1239,11 +1242,7 @@ x_after_update_window_line (desired_row)
1239 xassert (w); 1242 xassert (w);
1240 1243
1241 if (!desired_row->mode_line_p && !w->pseudo_window_p) 1244 if (!desired_row->mode_line_p && !w->pseudo_window_p)
1242 { 1245 desired_row->redraw_fringe_bitmaps_p = 1;
1243 BLOCK_INPUT;
1244 draw_row_fringe_bitmaps (w, desired_row);
1245 UNBLOCK_INPUT;
1246 }
1247 1246
1248 /* When a window has disappeared, make sure that no rest of 1247 /* When a window has disappeared, make sure that no rest of
1249 full-width rows stays visible in the internal border. Could 1248 full-width rows stays visible in the internal border. Could
@@ -1295,9 +1294,24 @@ x_draw_fringe_bitmap (w, row, p)
1295 XGCValues gcv; 1294 XGCValues gcv;
1296 GC gc = f->output_data.mac->normal_gc; 1295 GC gc = f->output_data.mac->normal_gc;
1297 struct face *face = p->face; 1296 struct face *face = p->face;
1297 int rowY;
1298 1298
1299 /* Must clip because of partially visible lines. */ 1299 /* Must clip because of partially visible lines. */
1300 x_clip_to_row (w, row, gc); 1300 rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y);
1301 if (p->y < rowY)
1302 {
1303 /* Adjust position of "bottom aligned" bitmap on partially
1304 visible last row. */
1305 int oldY = row->y;
1306 int oldVH = row->visible_height;
1307 row->visible_height = p->h;
1308 row->y -= rowY - p->y;
1309 x_clip_to_row (w, row, gc);
1310 row->y = oldY;
1311 row->visible_height = oldVH;
1312 }
1313 else
1314 x_clip_to_row (w, row, gc);
1301 1315
1302 if (p->bx >= 0) 1316 if (p->bx >= 0)
1303 { 1317 {
@@ -4546,6 +4560,14 @@ mac_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, act
4546 w->phys_cursor_width = cursor_width; 4560 w->phys_cursor_width = cursor_width;
4547 w->phys_cursor_on_p = 1; 4561 w->phys_cursor_on_p = 1;
4548 4562
4563 if (glyph_row->exact_window_width_line_p
4564 && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])
4565 {
4566 glyph_row->cursor_in_fringe_p = 1;
4567 draw_fringe_bitmap (w, glyph_row, 0);
4568 return;
4569 }
4570
4549 switch (cursor_type) 4571 switch (cursor_type)
4550 { 4572 {
4551 case HOLLOW_BOX_CURSOR: 4573 case HOLLOW_BOX_CURSOR:
@@ -6643,8 +6665,8 @@ do_check_ram_size (void)
6643 6665
6644 if (Gestalt (gestaltPhysicalRAMSize, &physical_ram_size) != noErr 6666 if (Gestalt (gestaltPhysicalRAMSize, &physical_ram_size) != noErr
6645 || Gestalt (gestaltLogicalRAMSize, &logical_ram_size) != noErr 6667 || Gestalt (gestaltLogicalRAMSize, &logical_ram_size) != noErr
6646 || physical_ram_size > 256 * 1024 * 1024 6668 || physical_ram_size > (1 << VALBITS)
6647 || logical_ram_size > 256 * 1024 * 1024) 6669 || logical_ram_size > (1 << VALBITS))
6648 { 6670 {
6649 StopAlert (RAM_TOO_LARGE_ALERT_ID, NULL); 6671 StopAlert (RAM_TOO_LARGE_ALERT_ID, NULL);
6650 exit (1); 6672 exit (1);
@@ -7443,7 +7465,9 @@ main (void)
7443 7465
7444 do_get_menus (); 7466 do_get_menus ();
7445 7467
7468#ifndef USE_LSB_TAG
7446 do_check_ram_size (); 7469 do_check_ram_size ();
7470#endif
7447 7471
7448 init_emacs_passwd_dir (); 7472 init_emacs_passwd_dir ();
7449 7473
diff --git a/src/process.c b/src/process.c
index 8181727bb79..22f482476cb 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1,6 +1,6 @@
1/* Asynchronous subprocess control for GNU Emacs. 1/* Asynchronous subprocess control for GNU Emacs.
2 Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 96, 98, 1999, 2 Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 96, 98, 1999,
3 2001, 2002, 2003 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -4080,6 +4080,10 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
4080 Otherwise, do pending quit if requested. */ 4080 Otherwise, do pending quit if requested. */
4081 if (XINT (read_kbd) >= 0) 4081 if (XINT (read_kbd) >= 0)
4082 QUIT; 4082 QUIT;
4083#ifdef SYNC_INPUT
4084 else if (interrupt_input_pending)
4085 handle_async_input ();
4086#endif
4083 4087
4084 /* Exit now if the cell we're waiting for became non-nil. */ 4088 /* Exit now if the cell we're waiting for became non-nil. */
4085 if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) 4089 if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))
@@ -4296,7 +4300,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
4296 proc = chan_process[channel]; 4300 proc = chan_process[channel];
4297 if (NILP (proc)) 4301 if (NILP (proc))
4298 continue; 4302 continue;
4299 if (XPROCESS (proc)->read_output_delay > 0) 4303 if (XINT (XPROCESS (proc)->read_output_delay) > 0)
4300 { 4304 {
4301 check_delay--; 4305 check_delay--;
4302 if (NILP (XPROCESS (proc)->read_output_skip)) 4306 if (NILP (XPROCESS (proc)->read_output_skip))
diff --git a/src/s/darwin.h b/src/s/darwin.h
index 32db3e3364b..abc56901e17 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -1,5 +1,5 @@
1/* System description header file for Darwin (Mac OS X). 1/* System description header file for Darwin (Mac OS X).
2 Copyright (C) 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 2001, 02, 2004 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -203,9 +203,6 @@ Boston, MA 02111-1307, USA. */
203/* Fix compilation problem for regex.c. */ 203/* Fix compilation problem for regex.c. */
204#define __restrict 204#define __restrict
205 205
206/* Fix compilation problem for md5.c. */
207#define __attribute__(x)
208
209/* Used in dispnew.c. Copied from freebsd.h. */ 206/* Used in dispnew.c. Copied from freebsd.h. */
210#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) 207#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
211 208
diff --git a/src/search.c b/src/search.c
index 538cb8dfa64..020573b75a1 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2553,8 +2553,16 @@ since only regular expressions have distinguished subexpressions. */)
2553 } 2553 }
2554 2554
2555 if (really_changed) 2555 if (really_changed)
2556 newtext = make_string (substed, substed_len); 2556 {
2557 if (buf_multibyte)
2558 {
2559 int nchars = multibyte_chars_in_text (substed, substed_len);
2557 2560
2561 newtext = make_multibyte_string (substed, nchars, substed_len);
2562 }
2563 else
2564 newtext = make_unibyte_string (substed, substed_len);
2565 }
2558 xfree (substed); 2566 xfree (substed);
2559 } 2567 }
2560 2568
diff --git a/src/w32term.c b/src/w32term.c
index bee1a1913ff..834df6ef88f 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -540,6 +540,9 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
540 output_cursor.x, output_cursor.y); 540 output_cursor.x, output_cursor.y);
541 541
542 x_draw_vertical_border (w); 542 x_draw_vertical_border (w);
543
544 draw_window_fringes (w);
545
543 UNBLOCK_INPUT; 546 UNBLOCK_INPUT;
544 } 547 }
545 548
@@ -624,11 +627,7 @@ x_after_update_window_line (desired_row)
624 xassert (w); 627 xassert (w);
625 628
626 if (!desired_row->mode_line_p && !w->pseudo_window_p) 629 if (!desired_row->mode_line_p && !w->pseudo_window_p)
627 { 630 desired_row->redraw_fringe_bitmaps_p = 1;
628 BLOCK_INPUT;
629 draw_row_fringe_bitmaps (w, desired_row);
630 UNBLOCK_INPUT;
631 }
632 631
633 /* When a window has disappeared, make sure that no rest of 632 /* When a window has disappeared, make sure that no rest of
634 full-width rows stays visible in the internal border. Could 633 full-width rows stays visible in the internal border. Could
@@ -678,11 +677,26 @@ w32_draw_fringe_bitmap (w, row, p)
678 struct frame *f = XFRAME (WINDOW_FRAME (w)); 677 struct frame *f = XFRAME (WINDOW_FRAME (w));
679 HDC hdc; 678 HDC hdc;
680 struct face *face = p->face; 679 struct face *face = p->face;
680 int rowY;
681 681
682 hdc = get_frame_dc (f); 682 hdc = get_frame_dc (f);
683 683
684 /* Must clip because of partially visible lines. */ 684 /* Must clip because of partially visible lines. */
685 w32_clip_to_row (w, row, hdc); 685 rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y);
686 if (p->y < rowY)
687 {
688 /* Adjust position of "bottom aligned" bitmap on partially
689 visible last row. */
690 int oldY = row->y;
691 int oldVH = row->visible_height;
692 row->visible_height = p->h;
693 row->y -= rowY - p->y;
694 w32_clip_to_row (w, row, hdc);
695 row->y = oldY;
696 row->visible_height = oldVH;
697 }
698 else
699 w32_clip_to_row (w, row, hdc);
686 700
687 if (p->bx >= 0) 701 if (p->bx >= 0)
688 { 702 {
@@ -5120,6 +5134,14 @@ w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, act
5120 PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0); 5134 PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0);
5121 } 5135 }
5122 5136
5137 if (glyph_row->exact_window_width_line_p
5138 && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])
5139 {
5140 glyph_row->cursor_in_fringe_p = 1;
5141 draw_fringe_bitmap (w, glyph_row, 0);
5142 return;
5143 }
5144
5123 switch (cursor_type) 5145 switch (cursor_type)
5124 { 5146 {
5125 case HOLLOW_BOX_CURSOR: 5147 case HOLLOW_BOX_CURSOR:
diff --git a/src/xdisp.c b/src/xdisp.c
index 675aa696a59..fc09df3b49a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1,5 +1,5 @@
1/* Display generation from window structure and buffer text. 1/* Display generation from window structure and buffer text.
2 Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03 2 Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -310,6 +310,21 @@ extern Lisp_Object Qscroll_bar;
310 310
311Lisp_Object Vshow_trailing_whitespace; 311Lisp_Object Vshow_trailing_whitespace;
312 312
313#ifdef HAVE_WINDOW_SYSTEM
314/* Non-nil means that newline may flow into the right fringe. */
315
316Lisp_Object Voverflow_newline_into_fringe;
317#endif /* HAVE_WINDOW_SYSTEM */
318
319/* Test if overflow newline into fringe. Called with iterator IT
320 at or past right window margin, and with IT->current_x set. */
321
322#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) \
323 (!NILP (Voverflow_newline_into_fringe) \
324 && FRAME_WINDOW_P (it->f) \
325 && WINDOW_RIGHT_FRINGE_WIDTH (it->w) > 0 \
326 && it->current_x == it->last_visible_x)
327
313/* Non-nil means show the text cursor in void text areas 328/* Non-nil means show the text cursor in void text areas
314 i.e. in blank areas after eol and eob. This used to be 329 i.e. in blank areas after eol and eob. This used to be
315 the default in 21.3. */ 330 the default in 21.3. */
@@ -5590,7 +5605,20 @@ move_it_in_display_line_to (it, to_charpos, to_x, op)
5590 ++it->hpos; 5605 ++it->hpos;
5591 it->current_x = new_x; 5606 it->current_x = new_x;
5592 if (i == it->nglyphs - 1) 5607 if (i == it->nglyphs - 1)
5593 set_iterator_to_next (it, 1); 5608 {
5609 set_iterator_to_next (it, 1);
5610#ifdef HAVE_WINDOW_SYSTEM
5611 if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
5612 {
5613 get_next_display_element (it);
5614 if (ITERATOR_AT_END_OF_LINE_P (it))
5615 {
5616 result = MOVE_NEWLINE_OR_CR;
5617 break;
5618 }
5619 }
5620#endif /* HAVE_WINDOW_SYSTEM */
5621 }
5594 } 5622 }
5595 else 5623 else
5596 { 5624 {
@@ -5647,6 +5675,17 @@ move_it_in_display_line_to (it, to_charpos, to_x, op)
5647 if (it->truncate_lines_p 5675 if (it->truncate_lines_p
5648 && it->current_x >= it->last_visible_x) 5676 && it->current_x >= it->last_visible_x)
5649 { 5677 {
5678#ifdef HAVE_WINDOW_SYSTEM
5679 if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
5680 {
5681 get_next_display_element (it);
5682 if (ITERATOR_AT_END_OF_LINE_P (it))
5683 {
5684 result = MOVE_NEWLINE_OR_CR;
5685 break;
5686 }
5687 }
5688#endif /* HAVE_WINDOW_SYSTEM */
5650 result = MOVE_LINE_TRUNCATED; 5689 result = MOVE_LINE_TRUNCATED;
5651 break; 5690 break;
5652 } 5691 }
@@ -8895,26 +8934,205 @@ note_tool_bar_highlight (f, x, y)
8895 8934
8896#ifdef HAVE_WINDOW_SYSTEM 8935#ifdef HAVE_WINDOW_SYSTEM
8897 8936
8937/* Notice that all bitmaps bits are "mirrored". */
8938
8898/* An arrow like this: `<-'. */ 8939/* An arrow like this: `<-'. */
8940/*
8941 ...xx...
8942 ....xx..
8943 .....xx.
8944 ..xxxxxx
8945 ..xxxxxx
8946 .....xx.
8947 ....xx..
8948 ...xx...
8949*/
8899static unsigned char left_bits[] = { 8950static unsigned char left_bits[] = {
8900 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18}; 8951 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18};
8901 8952
8953
8902/* Right truncation arrow bitmap `->'. */ 8954/* Right truncation arrow bitmap `->'. */
8955/*
8956 ...xx...
8957 ..xx....
8958 .xx.....
8959 xxxxxx..
8960 xxxxxx..
8961 .xx.....
8962 ..xx....
8963 ...xx...
8964*/
8903static unsigned char right_bits[] = { 8965static unsigned char right_bits[] = {
8904 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18}; 8966 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18};
8905 8967
8968
8969/* Up arrow bitmap. */
8970/*
8971 ...xx...
8972 ..xxxx..
8973 .xxxxxx.
8974 xxxxxxxx
8975 ...xx...
8976 ...xx...
8977 ...xx...
8978 ...xx...
8979*/
8980static unsigned char up_arrow_bits[] = {
8981 0x18, 0x3c, 0x7e, 0xff, 0x18, 0x18, 0x18, 0x18};
8982
8983
8984/* Down arrow bitmap. */
8985/*
8986 ...xx...
8987 ...xx...
8988 ...xx...
8989 ...xx...
8990 xxxxxxxx
8991 .xxxxxx.
8992 ..xxxx..
8993 ...xx...
8994*/
8995static unsigned char down_arrow_bits[] = {
8996 0x18, 0x18, 0x18, 0x18, 0xff, 0x7e, 0x3c, 0x18};
8997
8906/* Marker for continued lines. */ 8998/* Marker for continued lines. */
8999/*
9000 ..xxxx..
9001 .xxxxx..
9002 xx......
9003 xxx..x..
9004 xxxxxx..
9005 .xxxxx..
9006 ..xxxx..
9007 .xxxxx..
9008*/
8907static unsigned char continued_bits[] = { 9009static unsigned char continued_bits[] = {
8908 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c}; 9010 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
8909 9011
8910/* Marker for continuation lines. */ 9012/* Marker for continuation lines. */
9013/*
9014 ..xxxx..
9015 ..xxxxx.
9016 ......xx
9017 ..x..xxx
9018 ..xxxxxx
9019 ..xxxxx.
9020 ..xxxx..
9021 ..xxxxx.
9022*/
8911static unsigned char continuation_bits[] = { 9023static unsigned char continuation_bits[] = {
8912 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e}; 9024 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e};
8913 9025
8914/* Overlay arrow bitmap. A triangular arrow. */ 9026/* Overlay arrow bitmap. A triangular arrow. */
9027/*
9028 ......xx
9029 ....xxxx
9030 ...xxxxx
9031 ..xxxxxx
9032 ..xxxxxx
9033 ...xxxxx
9034 ....xxxx
9035 ......xx
9036*/
8915static unsigned char ov_bits[] = { 9037static unsigned char ov_bits[] = {
8916 0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03}; 9038 0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03};
8917 9039
9040
9041/* First line bitmap. An left-up angle. */
9042/*
9043 ..xxxxxx
9044 ..xxxxxx
9045 ......xx
9046 ......xx
9047 ......xx
9048 ......xx
9049 ......xx
9050 ........
9051*/
9052static unsigned char first_line_bits[] = {
9053 0x3f, 0x3f, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00};
9054
9055
9056/* Last line bitmap. An left-down angle. */
9057/*
9058 ........
9059 xx......
9060 xx......
9061 xx......
9062 xx......
9063 xx......
9064 xxxxxx..
9065 xxxxxx..
9066*/
9067static unsigned char last_line_bits[] = {
9068 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xfc};
9069
9070/* Filled box cursor bitmap. A filled box; max 13 pixels high. */
9071/*
9072 .xxxxxxx
9073 .xxxxxxx
9074 .xxxxxxx
9075 .xxxxxxx
9076 .xxxxxxx
9077 .xxxxxxx
9078 .xxxxxxx
9079 .xxxxxxx
9080 .xxxxxxx
9081 .xxxxxxx
9082 .xxxxxxx
9083 .xxxxxxx
9084 .xxxxxxx
9085*/
9086static unsigned char filled_box_cursor_bits[] = {
9087 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f};
9088
9089/* Hollow box cursor bitmap. A hollow box; max 13 pixels high. */
9090/*
9091 .xxxxxxx
9092 .x.....x
9093 .x.....x
9094 .x.....x
9095 .x.....x
9096 .x.....x
9097 .x.....x
9098 .x.....x
9099 .x.....x
9100 .x.....x
9101 .x.....x
9102 .x.....x
9103 .xxxxxxx
9104*/
9105static unsigned char hollow_box_cursor_bits[] = {
9106 0x7f, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x7f};
9107
9108/* Bar cursor bitmap. A vertical bar; max 13 pixels high. */
9109/*
9110 ......xx
9111 ......xx
9112 ......xx
9113 ......xx
9114 ......xx
9115 ......xx
9116 ......xx
9117 ......xx
9118 ......xx
9119 ......xx
9120 ......xx
9121 ......xx
9122 ......xx
9123*/
9124static unsigned char bar_cursor_bits[] = {
9125 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03};
9126
9127/* HBar cursor bitmap. A horisontal bar; 2 pixels high. */
9128/*
9129 .xxxxxxx
9130 .xxxxxxx
9131*/
9132static unsigned char hbar_cursor_bits[] = {
9133 0x7f, 0x7f};
9134
9135
8918/* Bitmap drawn to indicate lines not displaying text if 9136/* Bitmap drawn to indicate lines not displaying text if
8919 `indicate-empty-lines' is non-nil. */ 9137 `indicate-empty-lines' is non-nil. */
8920static unsigned char zv_bits[] = { 9138static unsigned char zv_bits[] = {
@@ -8927,32 +9145,89 @@ static unsigned char zv_bits[] = {
8927 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 9145 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00,
8928 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00}; 9146 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00};
8929 9147
9148/* Hollow square bitmap. */
9149/*
9150 .xxxxxx.
9151 .x....x.
9152 .x....x.
9153 .x....x.
9154 .x....x.
9155 .xxxxxx.
9156*/
9157static unsigned char hollow_square_bits[] = {
9158 0x7e, 0x42, 0x42, 0x42, 0x42, 0x7e};
9159
9160
8930struct fringe_bitmap fringe_bitmaps[MAX_FRINGE_BITMAPS] = 9161struct fringe_bitmap fringe_bitmaps[MAX_FRINGE_BITMAPS] =
8931{ 9162{
8932 { 0, 0, 0, NULL /* NO_FRINGE_BITMAP */ }, 9163 { 0, 0, 0, NULL /* NO_FRINGE_BITMAP */ },
8933 { 8, sizeof (left_bits), 0, left_bits }, 9164 { 8, sizeof (left_bits), 0, left_bits },
8934 { 8, sizeof (right_bits), 0, right_bits }, 9165 { 8, sizeof (right_bits), 0, right_bits },
9166 { 8, sizeof (up_arrow_bits), -1, up_arrow_bits },
9167 { 8, sizeof (down_arrow_bits), -2, down_arrow_bits },
8935 { 8, sizeof (continued_bits), 0, continued_bits }, 9168 { 8, sizeof (continued_bits), 0, continued_bits },
8936 { 8, sizeof (continuation_bits), 0, continuation_bits }, 9169 { 8, sizeof (continuation_bits), 0, continuation_bits },
8937 { 8, sizeof (ov_bits), 0, ov_bits }, 9170 { 8, sizeof (ov_bits), 0, ov_bits },
8938 { 8, sizeof (zv_bits), 3, zv_bits } 9171 { 8, sizeof (first_line_bits), -1, first_line_bits },
9172 { 8, sizeof (last_line_bits), -2, last_line_bits },
9173 { 8, sizeof (filled_box_cursor_bits), 0, filled_box_cursor_bits },
9174 { 8, sizeof (hollow_box_cursor_bits), 0, hollow_box_cursor_bits },
9175 { 8, sizeof (bar_cursor_bits), 0, bar_cursor_bits },
9176 { 8, sizeof (hbar_cursor_bits), -2, hbar_cursor_bits },
9177 { 8, sizeof (zv_bits), 3, zv_bits },
9178 { 8, sizeof (hollow_square_bits), 0, hollow_square_bits },
8939}; 9179};
8940 9180
8941 9181
8942/* Draw the bitmap WHICH in one of the left or right fringes of 9182/* Draw the bitmap WHICH in one of the left or right fringes of
8943 window W. ROW is the glyph row for which to display the bitmap; it 9183 window W. ROW is the glyph row for which to display the bitmap; it
8944 determines the vertical position at which the bitmap has to be 9184 determines the vertical position at which the bitmap has to be
8945 drawn. */ 9185 drawn.
9186 LEFT_P is 1 for left fringe, 0 for right fringe.
9187*/
8946 9188
8947static void 9189void
8948draw_fringe_bitmap (w, row, which, left_p) 9190draw_fringe_bitmap (w, row, left_p)
8949 struct window *w; 9191 struct window *w;
8950 struct glyph_row *row; 9192 struct glyph_row *row;
8951 enum fringe_bitmap_type which;
8952 int left_p; 9193 int left_p;
8953{ 9194{
8954 struct frame *f = XFRAME (WINDOW_FRAME (w)); 9195 struct frame *f = XFRAME (WINDOW_FRAME (w));
8955 struct draw_fringe_bitmap_params p; 9196 struct draw_fringe_bitmap_params p;
9197 enum fringe_bitmap_type which;
9198 int period;
9199
9200 if (left_p)
9201 which = row->left_fringe_bitmap;
9202 else if (!row->cursor_in_fringe_p)
9203 which = row->right_fringe_bitmap;
9204 else
9205 switch (w->phys_cursor_type)
9206 {
9207 case HOLLOW_BOX_CURSOR:
9208 if (row->visible_height >= sizeof(hollow_box_cursor_bits))
9209 which = HOLLOW_BOX_CURSOR_BITMAP;
9210 else
9211 which = HOLLOW_SQUARE_BITMAP;
9212 break;
9213 case FILLED_BOX_CURSOR:
9214 which = FILLED_BOX_CURSOR_BITMAP;
9215 break;
9216 case BAR_CURSOR:
9217 which = BAR_CURSOR_BITMAP;
9218 break;
9219 case HBAR_CURSOR:
9220 which = HBAR_CURSOR_BITMAP;
9221 break;
9222 case NO_CURSOR:
9223 default:
9224 w->phys_cursor_on_p = 0;
9225 row->cursor_in_fringe_p = 0;
9226 which = row->right_fringe_bitmap;
9227 break;
9228 }
9229
9230 period = fringe_bitmaps[which].period;
8956 9231
8957 /* Convert row to frame coordinates. */ 9232 /* Convert row to frame coordinates. */
8958 p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); 9233 p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y);
@@ -8961,9 +9236,7 @@ draw_fringe_bitmap (w, row, which, left_p)
8961 p.wd = fringe_bitmaps[which].width; 9236 p.wd = fringe_bitmaps[which].width;
8962 9237
8963 p.h = fringe_bitmaps[which].height; 9238 p.h = fringe_bitmaps[which].height;
8964 p.dh = (fringe_bitmaps[which].period 9239 p.dh = (period > 0 ? (p.y % period) : 0);
8965 ? (p.y % fringe_bitmaps[which].period)
8966 : 0);
8967 p.h -= p.dh; 9240 p.h -= p.dh;
8968 /* Clip bitmap if too high. */ 9241 /* Clip bitmap if too high. */
8969 if (p.h > row->height) 9242 if (p.h > row->height)
@@ -9023,7 +9296,13 @@ draw_fringe_bitmap (w, row, which, left_p)
9023 } 9296 }
9024 9297
9025 /* Adjust y to the offset in the row to start drawing the bitmap. */ 9298 /* Adjust y to the offset in the row to start drawing the bitmap. */
9026 p.y += (row->height - p.h) / 2; 9299 if (period == 0)
9300 p.y += (row->height - p.h) / 2;
9301 else if (period == -2)
9302 {
9303 p.h = fringe_bitmaps[which].height;
9304 p.y += (row->visible_height - p.h);
9305 }
9027 9306
9028 FRAME_RIF (f)->draw_fringe_bitmap (w, row, &p); 9307 FRAME_RIF (f)->draw_fringe_bitmap (w, row, &p);
9029} 9308}
@@ -9036,8 +9315,6 @@ draw_row_fringe_bitmaps (w, row)
9036 struct window *w; 9315 struct window *w;
9037 struct glyph_row *row; 9316 struct glyph_row *row;
9038{ 9317{
9039 enum fringe_bitmap_type bitmap;
9040
9041 xassert (interrupt_input_blocked); 9318 xassert (interrupt_input_blocked);
9042 9319
9043 /* If row is completely invisible, because of vscrolling, we 9320 /* If row is completely invisible, because of vscrolling, we
@@ -9046,35 +9323,35 @@ draw_row_fringe_bitmaps (w, row)
9046 return; 9323 return;
9047 9324
9048 if (WINDOW_LEFT_FRINGE_WIDTH (w) != 0) 9325 if (WINDOW_LEFT_FRINGE_WIDTH (w) != 0)
9049 { 9326 draw_fringe_bitmap (w, row, 1);
9050 /* Decide which bitmap to draw in the left fringe. */
9051 if (row->overlay_arrow_p)
9052 bitmap = OVERLAY_ARROW_BITMAP;
9053 else if (row->truncated_on_left_p)
9054 bitmap = LEFT_TRUNCATION_BITMAP;
9055 else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
9056 bitmap = CONTINUATION_LINE_BITMAP;
9057 else if (row->indicate_empty_line_p)
9058 bitmap = ZV_LINE_BITMAP;
9059 else
9060 bitmap = NO_FRINGE_BITMAP;
9061
9062 draw_fringe_bitmap (w, row, bitmap, 1);
9063 }
9064 9327
9065 if (WINDOW_RIGHT_FRINGE_WIDTH (w) != 0) 9328 if (WINDOW_RIGHT_FRINGE_WIDTH (w) != 0)
9066 { 9329 draw_fringe_bitmap (w, row, 0);
9067 /* Decide which bitmap to draw in the right fringe. */ 9330}
9068 if (row->truncated_on_right_p) 9331
9069 bitmap = RIGHT_TRUNCATION_BITMAP; 9332/* Draw the fringes of window W. Only fringes for rows marked for
9070 else if (row->continued_p) 9333 update in redraw_fringe_bitmaps_p are drawn. */
9071 bitmap = CONTINUED_LINE_BITMAP; 9334
9072 else if (row->indicate_empty_line_p && WINDOW_LEFT_FRINGE_WIDTH (w) == 0) 9335void
9073 bitmap = ZV_LINE_BITMAP; 9336draw_window_fringes (w)
9074 else 9337 struct window *w;
9075 bitmap = NO_FRINGE_BITMAP; 9338{
9339 struct glyph_row *row;
9340 int yb = window_text_bottom_y (w);
9341 int nrows = w->current_matrix->nrows;
9342 int y = 0, rn;
9076 9343
9077 draw_fringe_bitmap (w, row, bitmap, 0); 9344 if (w->pseudo_window_p)
9345 return;
9346
9347 for (y = 0, rn = 0, row = w->current_matrix->rows;
9348 y < yb && rn < nrows;
9349 y += row->height, ++row, ++rn)
9350 {
9351 if (!row->redraw_fringe_bitmaps_p)
9352 continue;
9353 draw_row_fringe_bitmaps (w, row);
9354 row->redraw_fringe_bitmaps_p = 0;
9078 } 9355 }
9079} 9356}
9080 9357
@@ -9982,6 +10259,9 @@ redisplay_internal (preserve_echo_area)
9982 *w->desired_matrix->method = 0; 10259 *w->desired_matrix->method = 0;
9983 debug_method_add (w, "optimization 1"); 10260 debug_method_add (w, "optimization 1");
9984#endif 10261#endif
10262#ifdef HAVE_WINDOW_SYSTEM
10263 update_window_fringes (w, 0);
10264#endif
9985 goto update; 10265 goto update;
9986 } 10266 }
9987 else 10267 else
@@ -11394,6 +11674,137 @@ set_vertical_scroll_bar (w)
11394 (w, end - start, whole, start); 11674 (w, end - start, whole, start);
11395} 11675}
11396 11676
11677#ifdef HAVE_WINDOW_SYSTEM
11678
11679/* Recalculate the bitmaps to show in the fringes of window W.
11680 If FORCE_P is 0, only mark rows with modified bitmaps for update in
11681 redraw_fringe_bitmaps_p; else mark all rows for update. */
11682
11683int
11684update_window_fringes (w, force_p)
11685 struct window *w;
11686 int force_p;
11687{
11688 struct glyph_row *row, *cur = 0;
11689 int yb = window_text_bottom_y (w);
11690 int rn, nrows = w->current_matrix->nrows;
11691 int y;
11692 int redraw_p = 0;
11693 Lisp_Object ind;
11694
11695 if (w->pseudo_window_p)
11696 return 0;
11697
11698 if (!MINI_WINDOW_P (w)
11699 && (ind = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind)))
11700 {
11701 int do_eob = 1, do_bob = 1;
11702
11703 for (y = 0, rn = 0;
11704 y < yb && rn < nrows;
11705 y += row->height, ++rn)
11706 {
11707 unsigned indicate_bob_p, indicate_top_line_p;
11708 unsigned indicate_eob_p, indicate_bottom_line_p;
11709
11710 row = w->desired_matrix->rows + rn;
11711 if (!row->enabled_p)
11712 row = w->current_matrix->rows + rn;
11713
11714 indicate_bob_p = row->indicate_bob_p;
11715 indicate_top_line_p = row->indicate_top_line_p;
11716 indicate_eob_p = row->indicate_eob_p;
11717 indicate_bottom_line_p = row->indicate_bottom_line_p;
11718
11719 row->indicate_bob_p = row->indicate_top_line_p = 0;
11720 row->indicate_eob_p = row->indicate_bottom_line_p = 0;
11721
11722 if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)))
11723 row->indicate_bob_p = do_bob, do_bob = 0;
11724 else if (EQ (ind, Qt)
11725 && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn)
11726 row->indicate_top_line_p = 1;
11727
11728 if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)))
11729 row->indicate_eob_p = do_eob, do_eob = 0;
11730 else if (EQ (ind, Qt)
11731 && y + row->height >= yb)
11732 row->indicate_bottom_line_p = 1;
11733
11734 if (indicate_bob_p != row->indicate_bob_p
11735 || indicate_top_line_p != row->indicate_top_line_p
11736 || indicate_eob_p != row->indicate_eob_p
11737 || indicate_bottom_line_p != row->indicate_bottom_line_p)
11738 row->redraw_fringe_bitmaps_p = 1;
11739 }
11740 }
11741
11742 for (y = 0, rn = 0;
11743 y < yb && rn < nrows;
11744 y += row->height, rn++)
11745 {
11746 enum fringe_bitmap_type left, right;
11747
11748 row = w->desired_matrix->rows + rn;
11749 cur = w->current_matrix->rows + rn;
11750 if (!row->enabled_p)
11751 row = cur;
11752
11753 /* Decide which bitmap to draw in the left fringe. */
11754 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
11755 left = NO_FRINGE_BITMAP;
11756 else if (row->overlay_arrow_p)
11757 left = OVERLAY_ARROW_BITMAP;
11758 else if (row->truncated_on_left_p)
11759 left = LEFT_TRUNCATION_BITMAP;
11760 else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
11761 left = CONTINUATION_LINE_BITMAP;
11762 else if (row->indicate_empty_line_p)
11763 left = ZV_LINE_BITMAP;
11764 else if (row->indicate_bob_p)
11765 left = FIRST_LINE_BITMAP;
11766 else
11767 left = NO_FRINGE_BITMAP;
11768
11769 /* Decide which bitmap to draw in the right fringe. */
11770 if (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)
11771 right = NO_FRINGE_BITMAP;
11772 else if (row->truncated_on_right_p)
11773 right = RIGHT_TRUNCATION_BITMAP;
11774 else if (row->continued_p)
11775 right = CONTINUED_LINE_BITMAP;
11776 else if (row->indicate_eob_p)
11777 right = LAST_LINE_BITMAP;
11778 else if (row->indicate_top_line_p)
11779 right = UP_ARROW_BITMAP;
11780 else if (row->indicate_bottom_line_p)
11781 right = DOWN_ARROW_BITMAP;
11782 else if (row->indicate_empty_line_p && WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
11783 right = ZV_LINE_BITMAP;
11784 else
11785 right = NO_FRINGE_BITMAP;
11786
11787 if (force_p
11788 || row->y != cur->y
11789 || row->visible_height != cur->visible_height
11790 || left != cur->left_fringe_bitmap
11791 || right != cur->right_fringe_bitmap
11792 || cur->redraw_fringe_bitmaps_p)
11793 {
11794 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
11795 cur->left_fringe_bitmap = left;
11796 cur->right_fringe_bitmap = right;
11797 }
11798
11799 row->left_fringe_bitmap = left;
11800 row->right_fringe_bitmap = right;
11801 }
11802
11803 return redraw_p;
11804}
11805
11806#endif /* HAVE_WINDOW_SYSTEM */
11807
11397/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only 11808/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only
11398 selected_window is redisplayed. 11809 selected_window is redisplayed.
11399 11810
@@ -11416,6 +11827,7 @@ redisplay_window (window, just_this_one_p)
11416 struct it it; 11827 struct it it;
11417 /* Record it now because it's overwritten. */ 11828 /* Record it now because it's overwritten. */
11418 int current_matrix_up_to_date_p = 0; 11829 int current_matrix_up_to_date_p = 0;
11830 int used_current_matrix_p = 0;
11419 /* This is less strict than current_matrix_up_to_date_p. 11831 /* This is less strict than current_matrix_up_to_date_p.
11420 It indictes that the buffer contents and narrowing are unchanged. */ 11832 It indictes that the buffer contents and narrowing are unchanged. */
11421 int buffer_unchanged_p = 0; 11833 int buffer_unchanged_p = 0;
@@ -11722,6 +12134,7 @@ redisplay_window (window, just_this_one_p)
11722 switch (rc) 12134 switch (rc)
11723 { 12135 {
11724 case CURSOR_MOVEMENT_SUCCESS: 12136 case CURSOR_MOVEMENT_SUCCESS:
12137 used_current_matrix_p = 1;
11725 goto done; 12138 goto done;
11726 12139
11727#if 0 /* try_cursor_movement never returns this value. */ 12140#if 0 /* try_cursor_movement never returns this value. */
@@ -11786,7 +12199,8 @@ redisplay_window (window, just_this_one_p)
11786 buffer. */ 12199 buffer. */
11787 || !NILP (Vwindow_scroll_functions) 12200 || !NILP (Vwindow_scroll_functions)
11788 || MINI_WINDOW_P (w) 12201 || MINI_WINDOW_P (w)
11789 || !try_window_reusing_current_matrix (w)) 12202 || !(used_current_matrix_p =
12203 try_window_reusing_current_matrix (w)))
11790 { 12204 {
11791 IF_DEBUG (debug_method_add (w, "1")); 12205 IF_DEBUG (debug_method_add (w, "1"));
11792 try_window (window, startp); 12206 try_window (window, startp);
@@ -11915,7 +12329,8 @@ redisplay_window (window, just_this_one_p)
11915 || !NILP (Vwindow_scroll_functions) 12329 || !NILP (Vwindow_scroll_functions)
11916 || !just_this_one_p 12330 || !just_this_one_p
11917 || MINI_WINDOW_P (w) 12331 || MINI_WINDOW_P (w)
11918 || !try_window_reusing_current_matrix (w)) 12332 || !(used_current_matrix_p =
12333 try_window_reusing_current_matrix (w)))
11919 try_window (window, startp); 12334 try_window (window, startp);
11920 12335
11921 /* If new fonts have been loaded (due to fontsets), give up. We 12336 /* If new fonts have been loaded (due to fontsets), give up. We
@@ -12077,6 +12492,19 @@ redisplay_window (window, just_this_one_p)
12077#endif 12492#endif
12078 } 12493 }
12079 12494
12495#ifdef HAVE_WINDOW_SYSTEM
12496 if (update_window_fringes (w, 0)
12497 && (used_current_matrix_p || overlay_arrow_seen)
12498 && !w->pseudo_window_p)
12499 {
12500 update_begin (f);
12501 BLOCK_INPUT;
12502 draw_window_fringes (w);
12503 UNBLOCK_INPUT;
12504 update_end (f);
12505 }
12506#endif /* HAVE_WINDOW_SYSTEM */
12507
12080 /* We go to this label, with fonts_changed_p nonzero, 12508 /* We go to this label, with fonts_changed_p nonzero,
12081 if it is necessary to try again using larger glyph matrices. 12509 if it is necessary to try again using larger glyph matrices.
12082 We have to redeem the scroll bar even in this case, 12510 We have to redeem the scroll bar even in this case,
@@ -12334,6 +12762,7 @@ try_window_reusing_current_matrix (w)
12334 row->visible_height -= min_y - row->y; 12762 row->visible_height -= min_y - row->y;
12335 if (row->y + row->height > max_y) 12763 if (row->y + row->height > max_y)
12336 row->visible_height -= row->y + row->height - max_y; 12764 row->visible_height -= row->y + row->height - max_y;
12765 row->redraw_fringe_bitmaps_p = 1;
12337 12766
12338 it.current_y += row->height; 12767 it.current_y += row->height;
12339 12768
@@ -12473,7 +12902,6 @@ try_window_reusing_current_matrix (w)
12473 12902
12474 if (run.height) 12903 if (run.height)
12475 { 12904 {
12476 struct frame *f = XFRAME (WINDOW_FRAME (w));
12477 update_begin (f); 12905 update_begin (f);
12478 FRAME_RIF (f)->update_window_begin_hook (w); 12906 FRAME_RIF (f)->update_window_begin_hook (w);
12479 FRAME_RIF (f)->clear_window_mouse_face (w); 12907 FRAME_RIF (f)->clear_window_mouse_face (w);
@@ -12494,6 +12922,7 @@ try_window_reusing_current_matrix (w)
12494 row->visible_height -= min_y - row->y; 12922 row->visible_height -= min_y - row->y;
12495 if (row->y + row->height > max_y) 12923 if (row->y + row->height > max_y)
12496 row->visible_height -= row->y + row->height - max_y; 12924 row->visible_height -= row->y + row->height - max_y;
12925 row->redraw_fringe_bitmaps_p = 1;
12497 } 12926 }
12498 12927
12499 /* Scroll the current matrix. */ 12928 /* Scroll the current matrix. */
@@ -12616,7 +13045,8 @@ find_last_unchanged_at_beg_row (w)
12616 row is not unchanged because it may be no longer 13045 row is not unchanged because it may be no longer
12617 continued. */ 13046 continued. */
12618 && !(MATRIX_ROW_END_CHARPOS (row) == first_changed_pos 13047 && !(MATRIX_ROW_END_CHARPOS (row) == first_changed_pos
12619 && row->continued_p)) 13048 && (row->continued_p
13049 || row->exact_window_width_line_p)))
12620 row_found = row; 13050 row_found = row;
12621 13051
12622 /* Stop if last visible row. */ 13052 /* Stop if last visible row. */
@@ -14512,7 +14942,20 @@ display_line (it)
14512 it->continuation_lines_width += new_x; 14942 it->continuation_lines_width += new_x;
14513 ++it->hpos; 14943 ++it->hpos;
14514 if (i == nglyphs - 1) 14944 if (i == nglyphs - 1)
14515 set_iterator_to_next (it, 1); 14945 {
14946 set_iterator_to_next (it, 1);
14947#ifdef HAVE_WINDOW_SYSTEM
14948 if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
14949 {
14950 get_next_display_element (it);
14951 if (ITERATOR_AT_END_OF_LINE_P (it))
14952 {
14953 row->continued_p = 0;
14954 row->exact_window_width_line_p = 1;
14955 }
14956 }
14957#endif /* HAVE_WINDOW_SYSTEM */
14958 }
14516 } 14959 }
14517 else if (CHAR_GLYPH_PADDING_P (*glyph) 14960 else if (CHAR_GLYPH_PADDING_P (*glyph)
14518 && !FRAME_WINDOW_P (it->f)) 14961 && !FRAME_WINDOW_P (it->f))
@@ -14614,6 +15057,7 @@ display_line (it)
14614 break; 15057 break;
14615 } 15058 }
14616 15059
15060 at_end_of_line:
14617 /* Is this a line end? If yes, we're also done, after making 15061 /* Is this a line end? If yes, we're also done, after making
14618 sure that a non-default face is extended up to the right 15062 sure that a non-default face is extended up to the right
14619 margin of the window. */ 15063 margin of the window. */
@@ -14623,9 +15067,12 @@ display_line (it)
14623 15067
14624 row->ends_in_newline_from_string_p = STRINGP (it->object); 15068 row->ends_in_newline_from_string_p = STRINGP (it->object);
14625 15069
15070#ifdef HAVE_WINDOW_SYSTEM
14626 /* Add a space at the end of the line that is used to 15071 /* Add a space at the end of the line that is used to
14627 display the cursor there. */ 15072 display the cursor there. */
14628 append_space (it, 0); 15073 if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
15074 append_space (it, 0);
15075#endif /* HAVE_WINDOW_SYSTEM */
14629 15076
14630 /* Extend the face to the end of the line. */ 15077 /* Extend the face to the end of the line. */
14631 extend_face_to_end_of_line (it); 15078 extend_face_to_end_of_line (it);
@@ -14666,6 +15113,21 @@ display_line (it)
14666 produce_special_glyphs (it, IT_TRUNCATION); 15113 produce_special_glyphs (it, IT_TRUNCATION);
14667 } 15114 }
14668 } 15115 }
15116#ifdef HAVE_WINDOW_SYSTEM
15117 else
15118 {
15119 /* Don't truncate if we can overflow newline into fringe. */
15120 if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
15121 {
15122 get_next_display_element (it);
15123 if (ITERATOR_AT_END_OF_LINE_P (it))
15124 {
15125 row->exact_window_width_line_p = 1;
15126 goto at_end_of_line;
15127 }
15128 }
15129 }
15130#endif /* HAVE_WINDOW_SYSTEM */
14669 15131
14670 row->truncated_on_right_p = 1; 15132 row->truncated_on_right_p = 1;
14671 it->continuation_lines_width = 0; 15133 it->continuation_lines_width = 0;
@@ -19213,36 +19675,53 @@ notice_overwritten_cursor (w, area, x0, x1, y0, y1)
19213 enum glyph_row_area area; 19675 enum glyph_row_area area;
19214 int x0, y0, x1, y1; 19676 int x0, y0, x1, y1;
19215{ 19677{
19216 if (area == TEXT_AREA && w->phys_cursor_on_p) 19678 int cx0, cx1, cy0, cy1;
19217 { 19679 struct glyph_row *row;
19218 int cx0 = w->phys_cursor.x;
19219 int cx1 = cx0 + w->phys_cursor_width;
19220 int cy0 = w->phys_cursor.y;
19221 int cy1 = cy0 + w->phys_cursor_height;
19222 19680
19223 if (x0 <= cx0 && (x1 < 0 || x1 >= cx1)) 19681 if (!w->phys_cursor_on_p)
19224 { 19682 return;
19225 /* The cursor image will be completely removed from the 19683 if (area != TEXT_AREA)
19226 screen if the output area intersects the cursor area in 19684 return;
19227 y-direction. When we draw in [y0 y1[, and some part of
19228 the cursor is at y < y0, that part must have been drawn
19229 before. When scrolling, the cursor is erased before
19230 actually scrolling, so we don't come here. When not
19231 scrolling, the rows above the old cursor row must have
19232 changed, and in this case these rows must have written
19233 over the cursor image.
19234 19685
19235 Likewise if part of the cursor is below y1, with the 19686 row = w->current_matrix->rows + w->phys_cursor.vpos;
19236 exception of the cursor being in the first blank row at 19687 if (!row->displays_text_p)
19237 the buffer and window end because update_text_area 19688 return;
19238 doesn't draw that row. (Except when it does, but
19239 that's handled in update_text_area.) */
19240 19689
19241 if (((y0 >= cy0 && y0 < cy1) || (y1 > cy0 && y1 < cy1)) 19690 if (row->cursor_in_fringe_p)
19242 && w->current_matrix->rows[w->phys_cursor.vpos].displays_text_p) 19691 {
19243 w->phys_cursor_on_p = 0; 19692 row->cursor_in_fringe_p = 0;
19244 } 19693 draw_fringe_bitmap (w, row, 0);
19694 w->phys_cursor_on_p = 0;
19695 return;
19245 } 19696 }
19697
19698 cx0 = w->phys_cursor.x;
19699 cx1 = cx0 + w->phys_cursor_width;
19700 if (x0 > cx0 || (x1 >= 0 && x1 < cx1))
19701 return;
19702
19703 /* The cursor image will be completely removed from the
19704 screen if the output area intersects the cursor area in
19705 y-direction. When we draw in [y0 y1[, and some part of
19706 the cursor is at y < y0, that part must have been drawn
19707 before. When scrolling, the cursor is erased before
19708 actually scrolling, so we don't come here. When not
19709 scrolling, the rows above the old cursor row must have
19710 changed, and in this case these rows must have written
19711 over the cursor image.
19712
19713 Likewise if part of the cursor is below y1, with the
19714 exception of the cursor being in the first blank row at
19715 the buffer and window end because update_text_area
19716 doesn't draw that row. (Except when it does, but
19717 that's handled in update_text_area.) */
19718
19719 cy0 = w->phys_cursor.y;
19720 cy1 = cy0 + w->phys_cursor_height;
19721 if ((y0 < cy0 || y0 >= cy1) && (y1 <= cy0 || y1 >= cy1))
19722 return;
19723
19724 w->phys_cursor_on_p = 0;
19246} 19725}
19247 19726
19248#endif /* HAVE_WINDOW_SYSTEM */ 19727#endif /* HAVE_WINDOW_SYSTEM */
@@ -19377,6 +19856,14 @@ erase_phys_cursor (w)
19377 if (cursor_row->visible_height <= 0) 19856 if (cursor_row->visible_height <= 0)
19378 goto mark_cursor_off; 19857 goto mark_cursor_off;
19379 19858
19859 /* If cursor is in the fringe, erase by drawing actual bitmap there. */
19860 if (cursor_row->cursor_in_fringe_p)
19861 {
19862 cursor_row->cursor_in_fringe_p = 0;
19863 draw_fringe_bitmap (w, cursor_row, 0);
19864 goto mark_cursor_off;
19865 }
19866
19380 /* This can happen when the new row is shorter than the old one. 19867 /* This can happen when the new row is shorter than the old one.
19381 In this case, either draw_glyphs or clear_end_of_line 19868 In this case, either draw_glyphs or clear_end_of_line
19382 should have cleared the cursor. Note that we wouldn't be 19869 should have cleared the cursor. Note that we wouldn't be
@@ -21533,12 +22020,23 @@ wide as that tab on the display. */);
21533#endif 22020#endif
21534 22021
21535 DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace, 22022 DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace,
21536 doc: /* Non-nil means highlight trailing whitespace. 22023 doc: /* *Non-nil means highlight trailing whitespace.
21537The face used for trailing whitespace is `trailing-whitespace'. */); 22024The face used for trailing whitespace is `trailing-whitespace'. */);
21538 Vshow_trailing_whitespace = Qnil; 22025 Vshow_trailing_whitespace = Qnil;
21539 22026
22027#ifdef HAVE_WINDOW_SYSTEM
22028 DEFVAR_LISP ("overflow-newline-into-fringe", &Voverflow_newline_into_fringe,
22029 doc: /* *Non-nil means that newline may flow into the right fringe.
22030This means that display lines which are exactly as wide as the window
22031(not counting the final newline) will only occupy one screen line, by
22032showing (or hiding) the final newline in the right fringe; when point
22033is at the final newline, the cursor is shown in the right fringe.
22034If nil, also continue lines which are exactly as wide as the window. */);
22035 Voverflow_newline_into_fringe = Qt;
22036#endif
22037
21540 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, 22038 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer,
21541 doc: /* The pointer shape to show in void text areas. 22039 doc: /* *The pointer shape to show in void text areas.
21542Nil means to show the text pointer. Other options are `arrow', `text', 22040Nil means to show the text pointer. Other options are `arrow', `text',
21543`hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); 22041`hand', `vdrag', `hdrag', `modeline', and `hourglass'. */);
21544 Vvoid_text_area_pointer = Qarrow; 22042 Vvoid_text_area_pointer = Qarrow;
diff --git a/src/xterm.c b/src/xterm.c
index f03f99d0246..8832991156d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -571,6 +571,9 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
571 output_cursor.x, output_cursor.y); 571 output_cursor.x, output_cursor.y);
572 572
573 x_draw_vertical_border (w); 573 x_draw_vertical_border (w);
574
575 draw_window_fringes (w);
576
574 UNBLOCK_INPUT; 577 UNBLOCK_INPUT;
575 } 578 }
576 579
@@ -650,11 +653,7 @@ x_after_update_window_line (desired_row)
650 xassert (w); 653 xassert (w);
651 654
652 if (!desired_row->mode_line_p && !w->pseudo_window_p) 655 if (!desired_row->mode_line_p && !w->pseudo_window_p)
653 { 656 desired_row->redraw_fringe_bitmaps_p = 1;
654 BLOCK_INPUT;
655 draw_row_fringe_bitmaps (w, desired_row);
656 UNBLOCK_INPUT;
657 }
658 657
659 /* When a window has disappeared, make sure that no rest of 658 /* When a window has disappeared, make sure that no rest of
660 full-width rows stays visible in the internal border. Could 659 full-width rows stays visible in the internal border. Could
@@ -698,9 +697,24 @@ x_draw_fringe_bitmap (w, row, p)
698 Window window = FRAME_X_WINDOW (f); 697 Window window = FRAME_X_WINDOW (f);
699 GC gc = f->output_data.x->normal_gc; 698 GC gc = f->output_data.x->normal_gc;
700 struct face *face = p->face; 699 struct face *face = p->face;
700 int rowY;
701 701
702 /* Must clip because of partially visible lines. */ 702 /* Must clip because of partially visible lines. */
703 x_clip_to_row (w, row, gc); 703 rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y);
704 if (p->y < rowY)
705 {
706 /* Adjust position of "bottom aligned" bitmap on partially
707 visible last row. */
708 int oldY = row->y;
709 int oldVH = row->visible_height;
710 row->visible_height = p->h;
711 row->y -= rowY - p->y;
712 x_clip_to_row (w, row, gc);
713 row->y = oldY;
714 row->visible_height = oldVH;
715 }
716 else
717 x_clip_to_row (w, row, gc);
704 718
705 if (p->bx >= 0) 719 if (p->bx >= 0)
706 { 720 {
@@ -6314,6 +6328,11 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish)
6314 &compose_status); 6328 &compose_status);
6315#endif 6329#endif
6316 6330
6331 /* If not using XIM/XIC, and a compose sequence is in progress,
6332 we break here. Otherwise, chars_matched is always 0. */
6333 if (compose_status.chars_matched > 0 && nbytes == 0)
6334 break;
6335
6317 orig_keysym = keysym; 6336 orig_keysym = keysym;
6318 6337
6319 if (numchars > 1) 6338 if (numchars > 1)
@@ -7452,6 +7471,13 @@ x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, activ
7452 w->phys_cursor_type = cursor_type; 7471 w->phys_cursor_type = cursor_type;
7453 w->phys_cursor_on_p = 1; 7472 w->phys_cursor_on_p = 1;
7454 7473
7474 if (glyph_row->exact_window_width_line_p
7475 && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])
7476 {
7477 glyph_row->cursor_in_fringe_p = 1;
7478 draw_fringe_bitmap (w, glyph_row, 0);
7479 }
7480 else
7455 switch (cursor_type) 7481 switch (cursor_type)
7456 { 7482 {
7457 case HOLLOW_BOX_CURSOR: 7483 case HOLLOW_BOX_CURSOR: