aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2004-01-22 15:37:19 +0000
committerKaroly Lorentey2004-01-22 15:37:19 +0000
commit2a36494c42a1963846ea8c2dde48a7450d433c2a (patch)
tree59be675dcc23b117a04a5b16cc82d73bcb6abbc9 /lisp
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
Diffstat (limited to 'lisp')
-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
24 files changed, 694 insertions, 282 deletions
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)))