aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2005-09-09 20:52:13 +0000
committerKaroly Lorentey2005-09-09 20:52:13 +0000
commitf0ed0a6c895c49f50c9cbcafe36b1a86a25a8620 (patch)
tree2599e82aa2fadfdc3b4de6039adee9461d14570b /lisp
parentaf520c4a4e04e55c854bb782af8df8412028c481 (diff)
parentb948abc811f0911a02e63ee55ad36504ddd981d6 (diff)
downloademacs-f0ed0a6c895c49f50c9cbcafe36b1a86a25a8620.tar.gz
emacs-f0ed0a6c895c49f50c9cbcafe36b1a86a25a8620.zip
Merged in changes from CVS trunk.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-404
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog204
-rw-r--r--lisp/ChangeLog.92
-rw-r--r--lisp/buff-menu.el55
-rw-r--r--lisp/calc/calc-poly.el45
-rw-r--r--lisp/cus-start.el9
-rw-r--r--lisp/cus-theme.el5
-rw-r--r--lisp/custom.el35
-rw-r--r--lisp/descr-text.el3
-rw-r--r--lisp/disp-table.el6
-rw-r--r--lisp/font-lock.el10
-rw-r--r--lisp/gnus/ChangeLog111
-rw-r--r--lisp/gnus/gnus-art.el15
-rw-r--r--lisp/gnus/gnus-fun.el4
-rw-r--r--lisp/gnus/gnus-msg.el31
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/gnus/gnus-util.el59
-rw-r--r--lisp/gnus/gnus.el52
-rw-r--r--lisp/gnus/message.el3
-rw-r--r--lisp/gnus/mm-bodies.el2
-rw-r--r--lisp/gnus/mm-encode.el2
-rw-r--r--lisp/gnus/mm-view.el18
-rw-r--r--lisp/gnus/mml-smime.el12
-rw-r--r--lisp/gnus/nnweb.el58
-rw-r--r--lisp/gnus/spam-report.el45
-rw-r--r--lisp/mail/sendmail.el5
-rw-r--r--lisp/menu-bar.el67
-rw-r--r--lisp/mouse.el9
-rw-r--r--lisp/msb.el2
-rw-r--r--lisp/net/tramp.el13
-rw-r--r--lisp/progmodes/compile.el12
-rw-r--r--lisp/progmodes/delphi.el1
-rw-r--r--lisp/progmodes/flymake.el3
-rw-r--r--lisp/progmodes/make-mode.el4
-rw-r--r--lisp/progmodes/perl-mode.el4
-rw-r--r--lisp/progmodes/sh-script.el7
-rw-r--r--lisp/recentf.el79
-rw-r--r--lisp/simple.el164
-rw-r--r--lisp/smerge-mode.el2
-rw-r--r--lisp/woman.el83
39 files changed, 876 insertions, 368 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1782616a1c9..fd85c39f3a3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,15 +1,185 @@
12005-09-09 Eli Zaretskii <eliz@gnu.org>
2
3 * cus-start.el (all): Don't complain about fringe-related
4 built-ins if fringes are not supported. Ditto about
5 selection-related built-ins. Fix the test for GTK-related
6 built-ins.
7
8 * menu-bar.el ("Split Window", "Postscript Print Buffer (B+W)")
9 ("Postscript Print Buffer", "Print Region", "Save As...")
10 ("Save", "Insert File...", "Open Directory...")
11 ("Open File...", "Visit New File..."")
12 ("Truncate Long Lines in this Buffer"): Don't look at
13 menu-updating-frame if this display does not support multiple
14 frames.
15
162005-09-09 Frederik Fouvry <fouvry@CoLi.Uni-SB.DE>
17
18 * mail/sendmail.el (default-sendmail-coding-system): Doc fix.
19
202005-09-09 Emilio Lopes <eclig@gmx.net>
21
22 * woman.el: Format- and whitespace-related changes.
23
242005-09-09 Eli Zaretskii <eliz@gnu.org>
25
26 * woman.el: Fix my email address.
27
282005-09-08 Richard M. Stallman <rms@gnu.org>
29
30 * progmodes/sh-script.el (sh-skeleton-pair-default-alist): New var.
31 (sh-mode): Locally set skeleton-pair-default-alist.
32
33 * progmodes/make-mode.el (makefile-add-log-defun): Trim the result.
34
35 * progmodes/flymake.el: Require `compile' unconditionally.
36
37 * mail/sendmail.el (send-mail-function): Add Mailclient alternative.
38
39 * woman.el (woman-file-name): Provide a default, not initial input.
40
41 * smerge-mode.el (smerge-resolve): Pass args to smerge-remove-props.
42
43 * font-lock.el (font-lock-support-mode): Doc fix.
44
45 * descr-text.el (describe-property-list): Handle non-symbol prop names.
46
472005-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
48
49 * net/ange-ftp.el (ange-ftp-process-filter): Revert to ^#+$.
50 Use with-current-buffer.
51 (ange-ftp-gwp-start): Remove unused var `gw-user'.
52 (ange-ftp-guess-hash-mark-size): Remove unused var `result'.
53 (ange-ftp-insert-directory): Remove unused var `short'.
54 (ange-ftp-file-name-sans-versions): Remove unused var `host-type'.
55
562005-08-30 Richard M. Stallman <rms@gnu.org>
57
58 * simple.el (blink-matching-open): Get rid of text props from
59 the string shown in echo area. Don't permanently set point.
60 Some rearrangements.
61
62 * files.el (risky-local-variable-p):
63 Match `-predicates' and `-commands.
64
65 * cus-edit.el (custom-buffer-sort-alphabetically): Default to t.
66 (custom-save-all): Visit the file if necessary;
67 kill the buffer if we created it.
68 (custom-save-delete): Don't visit file or kill buffer here.
69
702005-09-08 Reiner Steib <Reiner.Steib@gmx.de>
71
72 * recentf.el (recentf-filename-handler): Add custom choice
73 `abbreviate-file-name'.
74
75 * msb.el (msb--very-many-menus): Fix typo.
76
77 * disp-table.el (standard-display-european): Don't set
78 enable-multibyte-characters to nil.
79
802005-09-08 David Ponce <david@dponce.com>
81
82 * recentf.el (recentf-show-file-shortcuts-flag): New option.
83 (recentf-expand-file-name): Doc fix.
84 (recentf-dialog-mode-map): Define digit shortcuts.
85 (recentf--files-with-key): New variable.
86 (recentf-show-digit-shortcut-filter): New function.
87 (recentf-open-files-items): New function.
88 (recentf-open-files): Use it.
89 (recentf-open-file-with-key): New command.
90
912005-09-07 Michael Albinus <michael.albinus@gmx.de>
92
93 * woman.el (top): Remap `man' command by `woman' in `woman-mode-map'.
94 (Man-getpage-in-background-advice): Remove defadvice; it isn't
95 necessary any longer with the remapped command.
96 (Man-bgproc-sentinel-advice): Remove defadvice which counts
97 formatting time only.
98
99 * net/tramp.el (tramp-action-password)
100 (tramp-multi-action-password): Compile the password prompt from
101 `method', `user' and `host'. Sometimes it isn't obvious which
102 password to enter, for example with remote files offered by
103 recentf.el, or with multiple steps. Suggested by Robert Marshall
104 <robert@chezmarshall.freeserve.co.uk>.
105
1062005-09-07 Stefan Monnier <monnier@iro.umontreal.ca>
107
108 * progmodes/perl-mode.el (perl-font-lock-syntactic-keywords):
109 Fix regexp for when "s///" is at the beginning of line.
110
1112005-09-07 Jay Belanger <belanger@truman.edu>
112
113 * calc/calc-poly.el (math-expand-term): Multiply out any powers
114 when in matrix mode.
115
1162005-09-08 Chong Yidong <cyd@stupidchicken.com>
117
118 * buff-menu.el (Buffer-menu-sort-by-column): New function.
119 Suggested by Kim F. Storm.
120 (Buffer-menu-sort-button-map): Global keymap for sort buttons.
121 (Buffer-menu-make-sort-button): Use global keymap.
122
1232005-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
124
125 * buff-menu.el (Buffer-menu-make-sort-button): Add docstrings, use
126 non-anonymous functions.
127
1282005-09-06 Chong Yidong <cyd@stupidchicken.com>
129
130 * buff-menu.el (Buffer-menu-make-sort-button): Allow mouse-1 clicks
131 when using a header line. Otherwise, use mouse-1-click-follows-link.
132
133 * mouse.el (mouse-drag-header-line): Do nothing if the header-line
134 can't be moved; don't signal an error.
135
1362005-09-05 Chong Yidong <cyd@stupidchicken.com>
137
138 * cus-theme.el (custom-theme-write-faces): Save the current face
139 spec, not the defface spec.
140
141 * custom.el (custom-known-themes): Clarify meaning of "standard".
142 (custom-push-theme): Save old values in the standard theme.
143 (disable-theme): Correct typo.
144 (custom-face-theme-value) Deleted unused function.
145 (custom-theme-recalc-face): Rewritten to treat enable/disable properly.
146
1472005-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
148
149 * progmodes/compile.el (compilation-goto-locus): Take into account
150 iconified frames when determining whether the buffer is
151 already visible.
152 Don't reset window height if the window already existed.
153
12005-09-04 Chong Yidong <cyd@stupidchicken.com> 1542005-09-04 Chong Yidong <cyd@stupidchicken.com>
2 155
3 * custom.el (load-theme): Renamed from require-theme. 156 * custom.el (load-theme): Rename from require-theme.
4 Add interactive spec. 157 Add interactive spec.
5 (enable-theme): Renamed from custom-enable-theme. 158 (enable-theme): Rename from custom-enable-theme.
6 Add interactive spec. 159 Add interactive spec.
7 (disable-theme): Renamed from custom-disable-theme. 160 (disable-theme): Rename from custom-disable-theme.
8 Add interactive spec. 161 Add interactive spec.
9 (custom-make-theme-feature): Doc fix. 162 (custom-make-theme-feature): Doc fix.
10 (custom-theme-directory): Doc fix. 163 (custom-theme-directory): Doc fix.
11 (provide-theme): Call enable-theme. 164 (provide-theme): Call enable-theme.
12 165
1662005-09-02 Stefan Monnier <monnier@iro.umontreal.ca>
167
168 * obsolete/lazy-lock.el (lazy-lock-mode):
169 * obsolete/fast-lock.el (fast-lock-mode): Don't try to turn on
170 font-lock-mode if it's off. Print a warning instead.
171
172 * progmodes/compile.el (compilation-start): Ignore errors if the
173 process died before we get to send-eof.
174
175 * textmodes/tex-mode.el (tex-send-tex-command, tex-bibtex-file):
176 Undo last change. Enclosing the result in quotes broke things on Unix
177 since tex-send-command passes it through shell-quote-argument.
178 (tex-send-command): Pass `file' through convert-standard-filename
179 when possible.
180 (tex-uptodate-p): Handle the case where TeX hasn't put additional
181 info in a transcript.
182
132005-09-02 Dan Nicolaescu <dann@ics.uci.edu> 1832005-09-02 Dan Nicolaescu <dann@ics.uci.edu>
14 184
15 * term/xterm.el (terminal-init-xterm): Add eval-when-compile to 185 * term/xterm.el (terminal-init-xterm): Add eval-when-compile to
@@ -27,6 +197,8 @@
27 197
282005-09-01 Stefan Monnier <monnier@iro.umontreal.ca> 1982005-09-01 Stefan Monnier <monnier@iro.umontreal.ca>
29 199
200 * international/mule-cmds.el (set-locale-environment): Soothe compiler.
201
30 * obsolete/lazy-lock.el (lazy-lock) <defgroup>: Move from font-lock.el. 202 * obsolete/lazy-lock.el (lazy-lock) <defgroup>: Move from font-lock.el.
31 203
32 * obsolete/fast-lock.el (fast-lock) <defgroup>: Move from font-lock.el. 204 * obsolete/fast-lock.el (fast-lock) <defgroup>: Move from font-lock.el.
@@ -169,6 +341,16 @@
169 (tramp-advice-make-auto-save-file-name): Make defadvice only when 341 (tramp-advice-make-auto-save-file-name): Make defadvice only when
170 `make-auto-save-file-name' is not a magic file name operation. 342 `make-auto-save-file-name' is not a magic file name operation.
171 343
3442005-08-30 Richard M. Stallman <rms@gnu.org>
345
346 * files.el (risky-local-variable-p):
347 Match `-predicates' and `-commands.
348
349 * cus-edit.el (custom-buffer-sort-alphabetically): Default to t.
350 (custom-save-all): Visit the file if necessary;
351 kill the buffer if we created it.
352 (custom-save-delete): Don't visit file or kill buffer here.
353
1722005-08-30 Carsten Dominik <dominik@science.uva.nl> 3542005-08-30 Carsten Dominik <dominik@science.uva.nl>
173 355
174 * textmodes/org.el (org-special-keyword): New face. 356 * textmodes/org.el (org-special-keyword): New face.
@@ -470,6 +652,12 @@
470 New hook. 652 New hook.
471 (add-to-diary-list): Call `diary-modify-entry-list-string-function' 653 (add-to-diary-list): Call `diary-modify-entry-list-string-function'
472 654
6552005-08-24 Stefan Monnier <monnier@iro.umontreal.ca>
656
657 * emacs-lisp/easy-mmode.el (define-minor-mode): Simplify.
658
659 * custom.el (custom-theme-set-variables): Sort minor modes last.
660
4732005-08-24 Vinicius Jose Latorre <viniciusjl@ig.com.br> 6612005-08-24 Vinicius Jose Latorre <viniciusjl@ig.com.br>
474 662
475 * subr.el (version-separator, version-regexp-alist): New vars used by 663 * subr.el (version-separator, version-regexp-alist): New vars used by
@@ -545,18 +733,16 @@
545 (xscheme-allow-output-p, xscheme-prompt, xscheme-mode-string): 733 (xscheme-allow-output-p, xscheme-prompt, xscheme-mode-string):
546 Move to beginning of file. 734 Move to beginning of file.
547 (scheme-interaction-mode-commands-alist) 735 (scheme-interaction-mode-commands-alist)
548 (scheme-interaction-mode-map, scheme-debugger-mode-map): Declare 736 (scheme-interaction-mode-map, scheme-debugger-mode-map):
549 them before use. Note: the initialization code for the variables 737 Declare them before use. Note: the initialization code for the variables
550 has not been moved because it uses functions that reference the 738 has not been moved because it uses functions that reference the variables.
551 variables.
552 (xscheme-control-g-message-string, xscheme-process-filter-alist) 739 (xscheme-control-g-message-string, xscheme-process-filter-alist)
553 (xscheme-prompt-for-expression-map): Declare them before use. 740 (xscheme-prompt-for-expression-map): Declare them before use.
554 (scheme-debugger-mode-commands): "?\ " -> "?\s". 741 (scheme-debugger-mode-commands): "?\ " -> "?\s".
555 742
5562005-08-23 Ed Swarthout <ed.swarthout@gmail.com> (tiny change) 7432005-08-23 Ed Swarthout <ed.swarthout@gmail.com> (tiny change)
557 744
558 * hexl.el (hexl-print-current-point-info): Fix simple spelling 745 * hexl.el (hexl-print-current-point-info): Fix simple spelling error.
559 error.
560 746
5612005-08-22 Juri Linkov <juri@jurta.org> 7472005-08-22 Juri Linkov <juri@jurta.org>
562 748
diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9
index a0688eefe37..6bd0b347c30 100644
--- a/lisp/ChangeLog.9
+++ b/lisp/ChangeLog.9
@@ -1127,7 +1127,7 @@
1127 1127
1128 * isearch.el (isearch-intersects-p): Fix end checks. 1128 * isearch.el (isearch-intersects-p): Fix end checks.
1129 1129
11302001-09-11 Eli Zaretskii <a34785@is.elta.co.il> 11302001-09-11 Eli Zaretskii <eliz@is.elta.co.il>
1131 1131
1132 * gud.el (dbx) <gud-dbx-use-stopformat-p>: Move this case into the 1132 * gud.el (dbx) <gud-dbx-use-stopformat-p>: Move this case into the
1133 `t' branch of `cond', since Irix 6.1 and up is a special case of 1133 `t' branch of `cond', since Irix 6.1 and up is a special case of
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 9418eebe98f..4c45847df0f 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -633,35 +633,40 @@ For more information, see the function `buffer-menu'."
633 (insert m2))) 633 (insert m2)))
634 (forward-line))))) 634 (forward-line)))))
635 635
636(defun Buffer-menu-sort-by-column (&optional e)
637 "Sort the buffer menu by the column clicked on."
638 (interactive (list last-input-event))
639 (if e (mouse-select-window e))
640 (let* ((pos (event-start e))
641 (obj (posn-object pos))
642 (col (if obj
643 (get-text-property (cdr obj) 'column (car obj))
644 (get-text-property (posn-point pos) 'column))))
645 (Buffer-menu-sort col)))
646
647(defvar Buffer-menu-sort-button-map
648 (let ((map (make-sparse-keymap)))
649 ;; This keymap handles both nil and non-nil values for
650 ;; Buffer-menu-use-header-line.
651 (define-key map [header-line mouse-1] 'Buffer-menu-sort-by-column)
652 (define-key map [header-line mouse-2] 'Buffer-menu-sort-by-column)
653 (define-key map [mouse-2] 'Buffer-menu-sort-by-column)
654 (define-key map [follow-link] 'mouse-face)
655 (define-key map "\C-m" 'Buffer-menu-sort-by-column)
656 map)
657 "Local keymap for Buffer menu sort buttons.")
658
636(defun Buffer-menu-make-sort-button (name column) 659(defun Buffer-menu-make-sort-button (name column)
637 (if (equal column Buffer-menu-sort-column) (setq column nil)) 660 (if (equal column Buffer-menu-sort-column) (setq column nil))
638 (propertize name 661 (propertize name
639 'help-echo (if column 662 'column column
640 (if Buffer-menu-use-header-line 663 'help-echo (concat
641 (concat "mouse-2: sort by " (downcase name)) 664 (if Buffer-menu-use-header-line
642 (concat "mouse-2, RET: sort by " 665 "mouse-1, mouse-2: sort by "
643 (downcase name))) 666 "mouse-2, RET: sort by ")
644 (if Buffer-menu-use-header-line 667 (if column (downcase name) "visited order"))
645 "mouse-2: sort by visited order"
646 "mouse-2, RET: sort by visited order"))
647 'mouse-face 'highlight 668 'mouse-face 'highlight
648 'keymap (let ((map (make-sparse-keymap))) 669 'keymap Buffer-menu-sort-button-map))
649 (if Buffer-menu-use-header-line
650 (define-key map [header-line mouse-2]
651 `(lambda (e)
652 (interactive "e")
653 (save-window-excursion
654 (if e (mouse-select-window e))
655 (Buffer-menu-sort ,column))))
656 (define-key map [mouse-2]
657 `(lambda (e)
658 (interactive "e")
659 (if e (mouse-select-window e))
660 (Buffer-menu-sort ,column)))
661 (define-key map "\C-m"
662 `(lambda () (interactive)
663 (Buffer-menu-sort ,column))))
664 map)))
665 670
666(defun list-buffers-noselect (&optional files-only buffer-list) 671(defun list-buffers-noselect (&optional files-only buffer-list)
667 "Create and return a buffer with a list of names of existing buffers. 672 "Create and return a buffer with a list of names of existing buffers.
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 3dd19b6f67a..e27705de98a 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -1069,18 +1069,45 @@
1069 (math-add-or-sub (list '/ (nth 1 (nth 1 expr)) (nth 2 expr)) 1069 (math-add-or-sub (list '/ (nth 1 (nth 1 expr)) (nth 2 expr))
1070 (list '/ (nth 2 (nth 1 expr)) (nth 2 expr)) 1070 (list '/ (nth 2 (nth 1 expr)) (nth 2 expr))
1071 nil (eq (car (nth 1 expr)) '-))) 1071 nil (eq (car (nth 1 expr)) '-)))
1072 ((and (eq calc-matrix-mode 'matrix)
1073 (eq (car-safe expr) '^)
1074 (natnump (nth 2 expr))
1075 (> (nth 2 expr) 1)
1076 (memq (car-safe (nth 1 expr)) '(+ -)))
1077 (if (= (nth 2 expr) 2)
1078 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
1079 (list '* (nth 2 (nth 1 expr)) (nth 1 expr))
1080 nil (eq (car (nth 1 expr)) '-))
1081 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (list '^ (nth 1 expr)
1082 (1- (nth 2 expr))))
1083 (list '* (nth 2 (nth 1 expr)) (list '^ (nth 1 expr)
1084 (1- (nth 2 expr))))
1085 nil (eq (car (nth 1 expr)) '-))))
1072 ((and (eq (car-safe expr) '^) 1086 ((and (eq (car-safe expr) '^)
1073 (memq (car-safe (nth 1 expr)) '(+ -)) 1087 (memq (car-safe (nth 1 expr)) '(+ -))
1074 (integerp (nth 2 expr)) 1088 (integerp (nth 2 expr))
1075 (if (> (nth 2 expr) 0) 1089 (if (and (eq calc-matrix-mode 'matrix)
1076 (or (and (or (> math-mt-many 500000) (< math-mt-many -500000)) 1090 (> (nth 2 expr) 1))
1077 (math-expand-power (nth 1 expr) (nth 2 expr) 1091 (if (= (nth 2 expr) 2)
1078 nil t)) 1092 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
1079 (list '* 1093 (list '* (nth 2 (nth 1 expr)) (nth 1 expr))
1080 (nth 1 expr) 1094 nil (eq (car (nth 1 expr)) '-))
1081 (list '^ (nth 1 expr) (1- (nth 2 expr))))) 1095 (math-add-or-sub (list '* (nth 1 (nth 1 expr))
1082 (if (< (nth 2 expr) 0) 1096 (list '^ (nth 1 expr)
1083 (list '/ 1 (list '^ (nth 1 expr) (- (nth 2 expr)))))))) 1097 (1- (nth 2 expr))))
1098 (list '* (nth 2 (nth 1 expr))
1099 (list '^ (nth 1 expr)
1100 (1- (nth 2 expr))))
1101 nil (eq (car (nth 1 expr)) '-)))
1102 (if (> (nth 2 expr) 0)
1103 (or (and (or (> math-mt-many 500000) (< math-mt-many -500000))
1104 (math-expand-power (nth 1 expr) (nth 2 expr)
1105 nil t))
1106 (list '*
1107 (nth 1 expr)
1108 (list '^ (nth 1 expr) (1- (nth 2 expr)))))
1109 (if (< (nth 2 expr) 0)
1110 (list '/ 1 (list '^ (nth 1 expr) (- (nth 2 expr)))))))))
1084 (t expr))) 1111 (t expr)))
1085 1112
1086(defun calcFunc-expand (expr &optional many) 1113(defun calcFunc-expand (expr &optional many)
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 2f3cd5d0e07..d8ca2a77b58 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -366,9 +366,16 @@ since it could result in memory overflow and make Emacs crash."
366 ((string-match "\\`w32-" (symbol-name symbol)) 366 ((string-match "\\`w32-" (symbol-name symbol))
367 (eq system-type 'windows-nt)) 367 (eq system-type 'windows-nt))
368 ((string-match "\\`x-.*gtk" (symbol-name symbol)) 368 ((string-match "\\`x-.*gtk" (symbol-name symbol))
369 (or (boundp 'gtk) (not (eq system-type 'windows-nt)))) 369 (or (boundp 'gtk)
370 (and window-system
371 (not (eq window-system 'pc))
372 (not (eq system-type 'windows-nt)))))
370 ((string-match "\\`x-" (symbol-name symbol)) 373 ((string-match "\\`x-" (symbol-name symbol))
371 (fboundp 'x-create-frame)) 374 (fboundp 'x-create-frame))
375 ((string-match "selection" (symbol-name symbol))
376 (fboundp 'x-selection-exists-p))
377 ((string-match "fringe" (symbol-name symbol))
378 (fboundp 'define-fringe-bitmap))
372 (t t)))) 379 (t t))))
373 (if (not (boundp symbol)) 380 (if (not (boundp symbol))
374 ;; If variables are removed from C code, give an error here! 381 ;; If variables are removed from C code, give an error here!
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 95a0a4b2896..43cf96e34fa 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -168,8 +168,9 @@ It includes all faces in list FACES."
168 (princ " '(") 168 (princ " '(")
169 (prin1 symbol) 169 (prin1 symbol)
170 (princ " ") 170 (princ " ")
171 (prin1 (or (get symbol 'customized-face) 171 (prin1 (list (append '(t)
172 (get symbol 'face-defface-spec))) 172 (custom-face-attributes-get
173 'font-lock-comment-face nil))))
173 (princ ")"))) 174 (princ ")")))
174 faces) 175 faces)
175 (if (bolp) 176 (if (bolp)
diff --git a/lisp/custom.el b/lisp/custom.el
index c4eae52751b..d634160e534 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -583,7 +583,7 @@ This recursively follows aliases."
583(defvar custom-known-themes '(user standard) 583(defvar custom-known-themes '(user standard)
584 "Themes that have been defined with `deftheme'. 584 "Themes that have been defined with `deftheme'.
585The default value is the list (user standard). The theme `standard' 585The default value is the list (user standard). The theme `standard'
586contains the Emacs standard settings from the original Lisp files. The 586contains the settings before custom themes are applied. The
587theme `user' contains all the settings the user customized and saved. 587theme `user' contains all the settings the user customized and saved.
588Additional themes declared with the `deftheme' macro will be added to 588Additional themes declared with the `deftheme' macro will be added to
589the front of this list.") 589the front of this list.")
@@ -649,6 +649,17 @@ See `custom-known-themes' for a list of known themes."
649 (progn 649 (progn
650 (setcar (cdr setting) mode) 650 (setcar (cdr setting) mode)
651 (setcar (cddr setting) value)) 651 (setcar (cddr setting) value))
652 (if (and (null old)
653 (boundp symbol))
654 (setq old
655 (list
656 (list 'standard 'set
657 (if (eq prop 'theme-value)
658 (symbol-value symbol)
659 (list
660 (append
661 '(t)
662 (custom-face-attributes-get symbol nil))))))))
652 (put symbol prop (cons (list theme mode value) old))) 663 (put symbol prop (cons (list theme mode value) old)))
653 ;; Record, for each theme, all its settings. 664 ;; Record, for each theme, all its settings.
654 (put theme 'theme-settings 665 (put theme 'theme-settings
@@ -1117,7 +1128,7 @@ See `custom-known-themes' for a list of known themes."
1117 (let* ((prop (car s)) 1128 (let* ((prop (car s))
1118 (symbol (cadr s)) 1129 (symbol (cadr s))
1119 (spec-list (get symbol prop))) 1130 (spec-list (get symbol prop)))
1120 (put symbol 'theme-value (assq-delete-all theme spec-list)) 1131 (put symbol prop (assq-delete-all theme spec-list))
1121 (if (eq prop 'theme-value) 1132 (if (eq prop 'theme-value)
1122 (custom-theme-recalc-variable symbol) 1133 (custom-theme-recalc-variable symbol)
1123 (custom-theme-recalc-face symbol))))) 1134 (custom-theme-recalc-face symbol)))))
@@ -1156,13 +1167,6 @@ This function returns nil if no custom theme specifies a value for VARIABLE."
1156 (if theme-value 1167 (if theme-value
1157 (custom-theme-value (car (car theme-value)) theme-value)))) 1168 (custom-theme-value (car (car theme-value)) theme-value))))
1158 1169
1159(defun custom-face-theme-value (face)
1160 "Return the face spec of FACE according to currently enabled custom themes.
1161This function returns nil if no custom theme specifies anything for FACE."
1162 (let* ((theme-value (get face 'theme-face)))
1163 (if theme-value
1164 (custom-theme-value (car (car theme-value)) theme-value))))
1165
1166(defun custom-theme-recalc-variable (variable) 1170(defun custom-theme-recalc-variable (variable)
1167 "Set VARIABLE according to currently enabled custom themes." 1171 "Set VARIABLE according to currently enabled custom themes."
1168 (let ((valspec (custom-variable-theme-value variable))) 1172 (let ((valspec (custom-variable-theme-value variable)))
@@ -1177,16 +1181,9 @@ This function returns nil if no custom theme specifies anything for FACE."
1177 1181
1178(defun custom-theme-recalc-face (face) 1182(defun custom-theme-recalc-face (face)
1179 "Set FACE according to currently enabled custom themes." 1183 "Set FACE according to currently enabled custom themes."
1180 (let ((spec (custom-face-theme-value face))) 1184 (let ((theme-faces (reverse (get face 'theme-face))))
1181 (when spec 1185 (dolist (spec theme-faces)
1182 (put face 'save-face spec)) 1186 (face-spec-set face (car (cddr spec))))))
1183 (unless spec
1184 (setq spec (get face 'face-defface-spec)))
1185 (when spec
1186 (when (or (get face 'force-face) (facep face))
1187 (unless (facep face)
1188 (make-empty-face face))
1189 (face-spec-set face spec)))))
1190 1187
1191(defun custom-theme-reset-variables (theme &rest args) 1188(defun custom-theme-reset-variables (theme &rest args)
1192 "Reset the specs in THEME of some variables to their values in other themes. 1189 "Reset the specs in THEME of some variables to their values in other themes.
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index e25d740b89b..5f410da17a7 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -108,7 +108,8 @@ into widget buttons that call `describe-text-category' or
108 (while properties 108 (while properties
109 (push (list (pop properties) (pop properties)) ret)) 109 (push (list (pop properties) (pop properties)) ret))
110 ret) 110 ret)
111 (lambda (a b) (string< (nth 0 a) (nth 0 b))))) 111 (lambda (a b) (string< (prin1-to-string (nth 0 a) t)
112 (prin1-to-string (nth 0 b) t)))))
112 (let ((key (nth 0 elt)) 113 (let ((key (nth 0 elt))
113 (value (nth 1 elt))) 114 (value (nth 1 elt)))
114 (widget-insert (propertize (format " %-20s " key) 115 (widget-insert (propertize (format " %-20s " key)
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index 8e5fa12bad7..778ea092e43 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -220,8 +220,10 @@ for users who call this function in `.emacs'."
220 (unless (or (memq window-system '(x w32))) 220 (unless (or (memq window-system '(x w32)))
221 (and (terminal-coding-system) 221 (and (terminal-coding-system)
222 (set-terminal-coding-system nil)))) 222 (set-terminal-coding-system nil))))
223 ;; Turn off multibyte chars for more compatibility. 223
224 (setq-default enable-multibyte-characters nil) 224 (display-warning 'i18n
225 "`standard-display-european' is semi-obsolete"
226 :warning)
225 227
226 ;; Switch to Latin-1 language environment 228 ;; Switch to Latin-1 language environment
227 ;; unless some other has been specified. 229 ;; unless some other has been specified.
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 5b421f2b3f8..12b265661ea 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -846,9 +846,13 @@ happens, so the major mode can be corrected."
846(defcustom font-lock-support-mode 'jit-lock-mode 846(defcustom font-lock-support-mode 'jit-lock-mode
847 "*Support mode for Font Lock mode. 847 "*Support mode for Font Lock mode.
848Support modes speed up Font Lock mode by being choosy about when fontification 848Support modes speed up Font Lock mode by being choosy about when fontification
849occurs. Known support modes are Fast Lock mode (symbol `fast-lock-mode'), 849occurs. The default support mode, Just-in-time Lock mode (symbol
850Lazy Lock mode (symbol `lazy-lock-mode'), and Just-in-time Lock mode (symbol 850`jit-lock-mode'), is recommended.
851`jit-lock-mode'. See those modes for more info. 851
852Other, older support modes are Fast Lock mode (symbol `fast-lock-mode') and
853Lazy Lock mode (symbol `lazy-lock-mode'). See those modes for more info.
854However, they are no longer recommended, as Just-in-time Lock mode is better.
855
852If nil, means support for Font Lock mode is never performed. 856If nil, means support for Font Lock mode is never performed.
853If a symbol, use that support mode. 857If a symbol, use that support mode.
854If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE), 858If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE),
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 198e395d260..ac4dc382907 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,112 @@
12005-09-07 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * spam-report.el (spam-report-gmane): Make it work without
4 X-Report-Spam header. Gmane now only provides Archived-At. This
5 is only used if `spam-report-gmane-use-article-number' is nil.
6 (spam-report-gmane-spam-header): Removed. Not used anymore.
7
8 * nnweb.el (nnweb-google-wash-article): Print a message if article
9 is not available.
10
112005-09-07 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
12
13 * gnus-art.el (gnus-mime-display-single): Decode text/* parts
14 content before displaying.
15
162005-09-06 Reiner Steib <Reiner.Steib@gmx.de>
17
18 * mml-smime.el: Remove defvar of gnus-extract-address-components.
19
202005-09-06 Katsumi Yamaoka <yamaoka@jpl.org>
21
22 * mm-view.el (mm-display-inline-fontify): Disable support modes.
23
242005-09-05 Reiner Steib <Reiner.Steib@gmx.de>
25
26 * message.el (message-tab-body-function): Fixed mismatched custom
27 type.
28
29 * gnus.el (gnus-group-change-level-function): Ditto.
30
31 * gnus-msg.el (gnus-outgoing-message-group): Ditto.
32
33 * gnus-art.el (gnus-signature-limit)
34 (gnus-article-mime-part-function): Ditto.
35
362005-09-04 Reiner Steib <Reiner.Steib@gmx.de>
37
38 * nnweb.el (nnweb-type-definition, nnweb-google-wash-article):
39 Make fetching article by MID work again for Google Groups. Added
40 FIXME concerning gnus-group-make-web-group.
41
42 * mml-smime.el (mml-smime-sign-query, mml-smime-get-dns-cert):
43 Don't depend on Gnus by using mail-extract-address-components if
44 gnus-extract-address-components is not bound.
45
46 * gnus.el (gnus-user-agent): Use list of symbols instead of
47 symbols. Display full version number for (S)XEmacs. Optionally
48 display (S)XEmacs codename.
49
50 * gnus-util.el (gnus-emacs-version): Update for new
51 `gnus-user-agent'.
52
53 * gnus-msg.el (gnus-extended-version): Make it possible to omit
54 Gnus version.
55
562005-09-02 Hrvoje Niksic <hniksic@xemacs.org>
57
58 * mm-encode.el (mm-encode-content-transfer-encoding): Likewise
59 when encoding.
60
61 * mm-bodies.el (mm-decode-content-transfer-encoding):
62 De-canonicalize CRLF for all text content types, not just
63 text/plain.
64
652005-09-02 Katsumi Yamaoka <yamaoka@jpl.org>
66
67 * gnus-sum.el (gnus-thread-hide-subtree): Doc fix.
68
69 * gnus-msg.el (gnus-inews-insert-gcc): Fix the mistake of using
70 list, not listp.
71
722005-08-29 Romain Francoise <romain@orebokech.com>
73
74 * gnus-fun.el (gnus-convert-image-to-face-command): Fix typo in
75 docstring.
76 (gnus-face-from-file): Likewise.
77
782005-08-31 Juanma Barranquero <lekktu@gmail.com>
79
80 * gnus-art.el (w3m-minor-mode-map):
81 * gnus-spec.el (gnus-newsrc-file-version):
82 * gnus-util.el (nnmail-active-file-coding-system)
83 (gnus-original-article-buffer, gnus-user-agent):
84 * gnus.el (gnus-ham-process-destinations)
85 (gnus-parameter-ham-marks-alist)
86 (gnus-parameter-spam-marks-alist, gnus-spam-autodetect)
87 (gnus-spam-autodetect-methods, gnus-spam-newsgroup-contents)
88 (gnus-spam-process-destinations, gnus-spam-process-newsgroups):
89 * mm-decode.el (gnus-current-window-configuration):
90 * mm-extern.el (gnus-article-mime-handles):
91 * mm-url.el (url-current-object, url-package-name)
92 (url-package-version):
93 * mm-view.el (gnus-article-mime-handles, gnus-newsgroup-charset)
94 (smime-keys, w3m-cid-retrieve-function-alist)
95 (w3m-current-buffer, w3m-display-inline-images)
96 (w3m-minor-mode-map):
97 * mml-smime.el (gnus-extract-address-components):
98 * mml.el (gnus-article-mime-handles, gnus-mouse-2)
99 (gnus-newsrc-hashtb, message-default-charset)
100 (message-deletable-headers, message-options)
101 (message-posting-charset, message-required-mail-headers)
102 (message-required-news-headers):
103 * mml1991.el (mc-pgp-always-sign):
104 * mml2015.el (mc-pgp-always-sign):
105 * nnheader.el (nnmail-extra-headers):
106 * rfc1843.el (gnus-decode-encoded-word-function)
107 (gnus-decode-header-function, gnus-newsgroup-name):
108 * spam-stat.el (gnus-original-article-buffer): Add defvars.
109
12005-08-31 Juanma Barranquero <lekktu@gmail.com> 1102005-08-31 Juanma Barranquero <lekktu@gmail.com>
2 111
3 * gnus-art.el (w3m-minor-mode-map): 112 * gnus-art.el (w3m-minor-mode-map):
@@ -151,8 +260,6 @@
151 * gnus-util.el (gnus-beginning-of-window): Remove. 260 * gnus-util.el (gnus-beginning-of-window): Remove.
152 (gnus-end-of-window): Remove. 261 (gnus-end-of-window): Remove.
153 262
154 * lpath.el: Don't bind scroll-margin.
155
1562005-07-25 Simon Josefsson <jas@extundo.com> 2632005-07-25 Simon Josefsson <jas@extundo.com>
157 264
158 * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible 265 * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 822448fa460..3bdc93935bc 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -236,7 +236,8 @@ longer (in lines) than that number. If it is a function, the function
236will be called without any parameters, and if it returns nil, there is 236will be called without any parameters, and if it returns nil, there is
237no signature in the buffer. If it is a string, it will be used as a 237no signature in the buffer. If it is a string, it will be used as a
238regexp. If it matches, the text in question is not a signature." 238regexp. If it matches, the text in question is not a signature."
239 :type '(choice (integer :value 200) 239 :type '(choice (const nil)
240 (integer :value 200)
240 (number :value 4.0) 241 (number :value 4.0)
241 (function :value fun) 242 (function :value fun)
242 (regexp :value ".*")) 243 (regexp :value ".*"))
@@ -869,7 +870,8 @@ see http://www.cs.indiana.edu/picons/ftp/index.html"
869This is meant for people who want to do something automatic based 870This is meant for people who want to do something automatic based
870on parts -- for instance, adding Vcard info to a database." 871on parts -- for instance, adding Vcard info to a database."
871 :group 'gnus-article-mime 872 :group 'gnus-article-mime
872 :type 'function) 873 :type '(choice (const nil)
874 function))
873 875
874(defcustom gnus-mime-multipart-functions nil 876(defcustom gnus-mime-multipart-functions nil
875 "An alist of MIME types to functions to display them." 877 "An alist of MIME types to functions to display them."
@@ -4860,7 +4862,14 @@ If displaying \"text/html\" is discouraged \(see
4860 (forward-line -1) 4862 (forward-line -1)
4861 (setq beg (point))) 4863 (setq beg (point)))
4862 (gnus-article-insert-newline) 4864 (gnus-article-insert-newline)
4863 (mm-insert-inline handle (mm-get-part handle)) 4865 (mm-insert-inline handle
4866 (let ((charset
4867 (mail-content-type-get
4868 (mm-handle-type handle) 'charset)))
4869 (if (eq charset 'gnus-decoded)
4870 (mm-get-part handle)
4871 (mm-decode-string (mm-get-part handle)
4872 charset))))
4864 (goto-char (point-max)))) 4873 (goto-char (point-max))))
4865 ;; Do highlighting. 4874 ;; Do highlighting.
4866 (save-excursion 4875 (save-excursion
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 94f42efc360..43cd02c1b5e 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -54,7 +54,7 @@ on stdout."
54 :type 'string) 54 :type 'string)
55 55
56(defcustom gnus-convert-image-to-face-command "djpeg %s | ppmnorm | pnmscale -width 48 -height 48 | ppmquant %d | pnmtopng" 56(defcustom gnus-convert-image-to-face-command "djpeg %s | ppmnorm | pnmscale -width 48 -height 48 | ppmquant %d | pnmtopng"
57 "Command for converting an image to an Face. 57 "Command for converting an image to a Face.
58By default it takes a JPEG filename and output the Face header data 58By default it takes a JPEG filename and output the Face header data
59on stdout." 59on stdout."
60 :version "22.1" 60 :version "22.1"
@@ -110,7 +110,7 @@ Output to the current buffer, replace text, and don't mingle error."
110 110
111;;;###autoload 111;;;###autoload
112(defun gnus-face-from-file (file) 112(defun gnus-face-from-file (file)
113 "Return an Face header based on an image file." 113 "Return a Face header based on an image file."
114 (interactive "fImage file name (by default JPEG): ") 114 (interactive "fImage file name (by default JPEG): ")
115 (when (file-exists-p file) 115 (when (file-exists-p file)
116 (let ((done nil) 116 (let ((done nil)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 0614a2304f7..eced2a8097a 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -67,8 +67,10 @@ message in, you can set this variable to a function that checks the
67current newsgroup name and then returns a suitable group name (or list 67current newsgroup name and then returns a suitable group name (or list
68of names)." 68of names)."
69 :group 'gnus-message 69 :group 'gnus-message
70 :type '(choice (string :tag "Group") 70 :type '(choice (const nil)
71 (function))) 71 (function)
72 (string :tag "Group")
73 (repeat :tag "List of groups" (string :tag "Group"))))
72 74
73(defcustom gnus-mailing-list-groups nil 75(defcustom gnus-mailing-list-groups nil
74 "*If non-nil a regexp matching groups that are really mailing lists. 76 "*If non-nil a regexp matching groups that are really mailing lists.
@@ -1031,17 +1033,18 @@ If SILENT, don't prompt the user."
1031 "Stringified Gnus version and Emacs version. 1033 "Stringified Gnus version and Emacs version.
1032See the variable `gnus-user-agent'." 1034See the variable `gnus-user-agent'."
1033 (interactive) 1035 (interactive)
1034 (let* ((float-output-format nil) 1036 (if (stringp gnus-user-agent)
1035 (gnus-v 1037 gnus-user-agent
1036 (concat "Gnus/" 1038 ;; `gnus-user-agent' is a list:
1037 (prin1-to-string (gnus-continuum-version gnus-version) t) 1039 (let* ((float-output-format nil)
1038 " (" gnus-version ")")) 1040 (gnus-v
1039 (emacs-v (gnus-emacs-version))) 1041 (when (memq 'gnus gnus-user-agent)
1040 (if (stringp gnus-user-agent) 1042 (concat "Gnus/"
1041 gnus-user-agent 1043 (prin1-to-string (gnus-continuum-version gnus-version) t)
1042 (concat gnus-v 1044 " (" gnus-version ")")))
1043 (when emacs-v 1045 (emacs-v (gnus-emacs-version)))
1044 (concat " " emacs-v)))))) 1046 (concat gnus-v (when (and gnus-v emacs-v) " ")
1047 emacs-v))))
1045 1048
1046 1049
1047;;; 1050;;;
@@ -1661,7 +1664,7 @@ this is a reply."
1661 (gcc (cond 1664 (gcc (cond
1662 ((functionp group) 1665 ((functionp group)
1663 (funcall group)) 1666 (funcall group))
1664 ((or (stringp group) (list group)) 1667 ((or (stringp group) (listp group))
1665 group)))) 1668 group))))
1666 (when gcc 1669 (when gcc
1667 (insert "Gcc: " 1670 (insert "Gcc: "
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index c2f7143a9ca..73837e21902 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -257,8 +257,7 @@ simplification is selected."
257 "*If non-nil, hide all threads initially. 257 "*If non-nil, hide all threads initially.
258This can be a predicate specifier which says which threads to hide. 258This can be a predicate specifier which says which threads to hide.
259If threads are hidden, you have to run the command 259If threads are hidden, you have to run the command
260`gnus-summary-show-thread' by hand or use `gnus-select-article-hook' 260`gnus-summary-show-thread' by hand or select an article."
261to expose hidden threads."
262 :group 'gnus-thread 261 :group 'gnus-thread
263 :type '(radio (sexp :format "Non-nil\n" 262 :type '(radio (sexp :format "Non-nil\n"
264 :match (lambda (widget value) 263 :match (lambda (widget value)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 69bcee90110..4c1721029be 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1,7 +1,7 @@
1;;; gnus-util.el --- utility functions for Gnus 1;;; gnus-util.el --- utility functions for Gnus
2 2
3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4;; 2005 Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7;; Keywords: news 7;; Keywords: news
@@ -1517,41 +1517,48 @@ predicate on the elements."
1517 (nconc (nreverse res) list1 list2)))) 1517 (nconc (nreverse res) list1 list2))))
1518 1518
1519(eval-when-compile 1519(eval-when-compile
1520 (defvar xemacs-codename)) 1520 (defvar xemacs-codename)
1521 (defvar sxemacs-codename)
1522 (defvar emacs-program-version))
1521 1523
1522(defun gnus-emacs-version () 1524(defun gnus-emacs-version ()
1523 "Stringified Emacs version." 1525 "Stringified Emacs version."
1524 (let ((system-v 1526 (let* ((lst (if (listp gnus-user-agent)
1525 (cond 1527 gnus-user-agent
1526 ((eq gnus-user-agent 'emacs-gnus-config) 1528 '(gnus emacs type)))
1527 system-configuration) 1529 (system-v (cond ((memq 'config lst)
1528 ((eq gnus-user-agent 'emacs-gnus-type) 1530 system-configuration)
1529 (symbol-name system-type)) 1531 ((memq 'type lst)
1530 (t nil)))) 1532 (symbol-name system-type))
1533 (t nil)))
1534 codename emacsname)
1535 (cond ((featurep 'sxemacs)
1536 (setq emacsname "SXEmacs"
1537 codename sxemacs-codename))
1538 ((featurep 'xemacs)
1539 (setq emacsname "XEmacs"
1540 codename xemacs-codename))
1541 (t
1542 (setq emacsname "Emacs")))
1531 (cond 1543 (cond
1532 ((eq gnus-user-agent 'gnus) 1544 ((not (memq 'emacs lst))
1533 nil) 1545 nil)
1534 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) 1546 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
1547 ;; Emacs:
1535 (concat "Emacs/" (match-string 1 emacs-version) 1548 (concat "Emacs/" (match-string 1 emacs-version)
1536 (if system-v 1549 (if system-v
1537 (concat " (" system-v ")") 1550 (concat " (" system-v ")")
1538 ""))) 1551 "")))
1539 ((string-match 1552 ((or (featurep 'sxemacs) (featurep 'xemacs))
1540 "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?" 1553 ;; XEmacs or SXEmacs:
1541 emacs-version) 1554 (concat emacsname "/" emacs-program-version
1542 (concat 1555 " ("
1543 (match-string 1 emacs-version) 1556 (when (and (memq 'codename lst)
1544 (format "/%d.%d" emacs-major-version emacs-minor-version) 1557 codename)
1545 (if (match-beginning 3) 1558 (concat codename
1546 (match-string 3 emacs-version) 1559 (when system-v ", ")))
1547 "") 1560 (when system-v system-v)
1548 (if (boundp 'xemacs-codename)
1549 (concat
1550 " (" xemacs-codename
1551 (if system-v
1552 (concat ", " system-v ")")
1553 ")")) 1561 ")"))
1554 "")))
1555 (t emacs-version)))) 1562 (t emacs-version))))
1556 1563
1557(defun gnus-rename-file (old-path new-path &optional trim) 1564(defun gnus-rename-file (old-path new-path &optional trim)
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index e1abe07b559..d0e199e2d06 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -2343,7 +2343,8 @@ following hook:
2343 "Function run when a group level is changed. 2343 "Function run when a group level is changed.
2344It is called with three parameters -- GROUP, LEVEL and OLDLEVEL." 2344It is called with three parameters -- GROUP, LEVEL and OLDLEVEL."
2345 :group 'gnus-group-levels 2345 :group 'gnus-group-levels
2346 :type 'function) 2346 :type '(choice (const nil)
2347 function))
2347 2348
2348;;; Face thingies. 2349;;; Face thingies.
2349 2350
@@ -2472,24 +2473,45 @@ This should be an alist for Emacs, or a plist for XEmacs."
2472 (symbol :tag "Parameter") 2473 (symbol :tag "Parameter")
2473 (sexp :tag "Value"))))) 2474 (sexp :tag "Value")))))
2474 2475
2475(defcustom gnus-user-agent 'emacs-gnus-type 2476(defcustom gnus-user-agent '(emacs gnus type)
2476 "Which information should be exposed in the User-Agent header. 2477 "Which information should be exposed in the User-Agent header.
2477 2478
2478It can be one of the symbols `gnus' \(show only Gnus version\), `emacs-gnus' 2479Can be a list of symbols or a string. Valid symbols are `gnus'
2479\(show only Emacs and Gnus versions\), `emacs-gnus-config' \(same as 2480\(show Gnus version\) and `emacs' \(show Emacs version\). In
2480`emacs-gnus' plus system configuration\), `emacs-gnus-type' \(same as 2481addition to the Emacs version, you can add `codename' \(show
2481`emacs-gnus' plus system type\) or a custom string. If you set it to a 2482\(S\)XEmacs codename\) or either `config' \(show system
2482string, be sure to use a valid format, see RFC 2616." 2483configuration\) or `type' \(show system type\). If you set it to
2484a string, be sure to use a valid format, see RFC 2616."
2485
2483 :version "22.1" 2486 :version "22.1"
2484 :group 'gnus-message 2487 :group 'gnus-message
2485 :type '(choice 2488 :type '(choice (list (set :inline t
2486 (item :tag "Show Gnus and Emacs versions and system type" 2489 (const gnus :tag "Gnus version")
2487 emacs-gnus-type) 2490 (const emacs :tag "Emacs version")
2488 (item :tag "Show Gnus and Emacs versions and system configuration" 2491 (choice :tag "system"
2489 emacs-gnus-config) 2492 (const type :tag "system type")
2490 (item :tag "Show Gnus and Emacs versions" emacs-gnus) 2493 (const config :tag "system configuration"))
2491 (item :tag "Show only Gnus version" gnus) 2494 (const codename :tag "Emacs codename")))
2492 (string :tag "Other"))) 2495 (string)))
2496
2497;; Convert old (No Gnus < 2005-01-10, v5-10 < 2005-09-05) symbol type values:
2498(when (symbolp gnus-user-agent)
2499 (setq gnus-user-agent
2500 (cond ((eq gnus-user-agent 'emacs-gnus-config)
2501 '(emacs gnus config))
2502 ((eq gnus-user-agent 'emacs-gnus-type)
2503 '(emacs gnus type))
2504 ((eq gnus-user-agent 'emacs-gnus)
2505 '(emacs gnus))
2506 ((eq gnus-user-agent 'gnus)
2507 '(gnus))
2508 (t gnus-user-agent)))
2509 (gnus-message 1 "Converted `gnus-user-agent' to `%s'." gnus-user-agent)
2510 (sit-for 1)
2511 (if (get 'gnus-user-agent 'saved-value)
2512 (customize-save-variable 'gnus-user-agent gnus-user-agent)
2513 (gnus-message 1 "Edit your init file to make this change permanent.")
2514 (sit-for 2)))
2493 2515
2494 2516
2495;;; Internal variables 2517;;; Internal variables
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 7c55b7cc72f..5995fcbcea0 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -6631,7 +6631,8 @@ If nil, the function bound in `text-mode-map' or `global-map' is executed."
6631 :version "22.1" 6631 :version "22.1"
6632 :group 'message 6632 :group 'message
6633 :link '(custom-manual "(message)Various Commands") 6633 :link '(custom-manual "(message)Various Commands")
6634 :type 'function) 6634 :type '(choice (const nil)
6635 function))
6635 6636
6636(defun message-tab () 6637(defun message-tab ()
6637 "Complete names according to `message-completion-alist'. 6638 "Complete names according to `message-completion-alist'.
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index ffca7da75bf..e9f8f1e9391 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -228,7 +228,7 @@ If TYPE is `text/plain' CRLF->LF translation may occur."
228 nil)) 228 nil))
229 (when (and 229 (when (and
230 (memq encoding '(base64 x-uuencode x-uue x-binhex x-yenc)) 230 (memq encoding '(base64 x-uuencode x-uue x-binhex x-yenc))
231 (equal type "text/plain")) 231 (string-match "\\`text/" type))
232 (goto-char (point-min)) 232 (goto-char (point-min))
233 (while (search-forward "\r\n" nil t) 233 (while (search-forward "\r\n" nil t)
234 (replace-match "\n" t t))))) 234 (replace-match "\n" t t)))))
diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el
index fd6251c37d3..5e149d16ed3 100644
--- a/lisp/gnus/mm-encode.el
+++ b/lisp/gnus/mm-encode.el
@@ -118,7 +118,7 @@ ENCODING can be: nil (do nothing); one of `quoted-printable', `base64';
118 ;; Likewise base64 below. 118 ;; Likewise base64 below.
119 (quoted-printable-encode-region (point-min) (point-max) t)) 119 (quoted-printable-encode-region (point-min) (point-max) t))
120 ((eq encoding 'base64) 120 ((eq encoding 'base64)
121 (when (equal type "text/plain") 121 (when (string-match "\\`text/" type)
122 (goto-char (point-min)) 122 (goto-char (point-min))
123 (while (search-forward "\n" nil t) 123 (while (search-forward "\n" nil t)
124 (replace-match "\r\n" t t))) 124 (replace-match "\r\n" t t)))
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 2d78ccab864..ac408aa179f 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -476,14 +476,16 @@
476 (buffer-disable-undo) 476 (buffer-disable-undo)
477 (mm-insert-part handle) 477 (mm-insert-part handle)
478 (require 'font-lock) 478 (require 'font-lock)
479 ;; Inhibit font-lock this time (*-mode-hook might run 479 (let ((font-lock-maximum-size nil)
480 ;; `turn-on-font-lock') so that jit-lock may not turn off 480 ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
481 ;; font-lock immediately after this. 481 (font-lock-mode-hook nil)
482 (let ((font-lock-mode t)) 482 (font-lock-support-mode nil)
483 (funcall mode)) 483 ;; I find font-lock a bit too verbose.
484 (let ((font-lock-verbose nil)) 484 (font-lock-verbose nil))
485 ;; I find font-lock a bit too verbose. 485 (funcall mode)
486 (font-lock-fontify-buffer)) 486 ;; The mode function might have already turned on font-lock.
487 (unless (symbol-value 'font-lock-mode)
488 (font-lock-fontify-buffer)))
487 ;; By default, XEmacs font-lock uses non-duplicable text 489 ;; By default, XEmacs font-lock uses non-duplicable text
488 ;; properties. This code forces all the text properties 490 ;; properties. This code forces all the text properties
489 ;; to be copied along with the text. 491 ;; to be copied along with the text.
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 8a5ba61d002..2933c14744a 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -29,8 +29,6 @@
29 29
30(eval-when-compile (require 'cl)) 30(eval-when-compile (require 'cl))
31 31
32(defvar gnus-extract-address-components)
33
34(require 'smime) 32(require 'smime)
35(require 'mm-decode) 33(require 'mm-decode)
36(autoload 'message-narrow-to-headers "message") 34(autoload 'message-narrow-to-headers "message")
@@ -81,7 +79,10 @@
81 (list 'keyfile 79 (list 'keyfile
82 (if (= (length smime-keys) 1) 80 (if (= (length smime-keys) 1)
83 (cadar smime-keys) 81 (cadar smime-keys)
84 (or (let ((from (cadr (funcall gnus-extract-address-components 82 (or (let ((from (cadr (funcall (if (boundp
83 'gnus-extract-address-components)
84 gnus-extract-address-components
85 'mail-extract-address-components)
85 (or (save-excursion 86 (or (save-excursion
86 (save-restriction 87 (save-restriction
87 (message-narrow-to-headers) 88 (message-narrow-to-headers)
@@ -107,7 +108,10 @@
107 (while (not result) 108 (while (not result)
108 (setq who (read-from-minibuffer 109 (setq who (read-from-minibuffer
109 (format "%sLookup certificate for: " (or bad "")) 110 (format "%sLookup certificate for: " (or bad ""))
110 (cadr (funcall gnus-extract-address-components 111 (cadr (funcall (if (boundp
112 'gnus-extract-address-components)
113 gnus-extract-address-components
114 'mail-extract-address-components)
111 (or (save-excursion 115 (or (save-excursion
112 (save-restriction 116 (save-restriction
113 (message-narrow-to-headers) 117 (message-narrow-to-headers)
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index d05520ee1dc..d3737cd66fd 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -27,6 +27,12 @@
27 27
28;; Note: You need to have `w3' installed for some functions to work. 28;; Note: You need to have `w3' installed for some functions to work.
29 29
30;; FIXME: Due to changes in the HTML output of Google Groups and Gmane, stuff
31;; related to web groups (gnus-group-make-web-group) doesn't work anymore.
32
33;; Fetching an article by MID (cf. gnus-refer-article-method) over Google
34;; Groups should work.
35
30;;; Code: 36;;; Code:
31 37
32(eval-when-compile (require 'cl)) 38(eval-when-compile (require 'cl))
@@ -54,13 +60,13 @@ Valid types include `google', `dejanews', and `gmane'.")
54 60
55(defvar nnweb-type-definition 61(defvar nnweb-type-definition
56 '((google 62 '((google
57 (article . ignore) 63 (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
58 (id . "http://groups.google.de/groups?selm=%s&output=gplain") 64 (article . nnweb-google-wash-article)
59 (reference . identity) 65 (reference . identity)
60 (map . nnweb-google-create-mapping) 66 (map . nnweb-google-create-mapping)
61 (search . nnweb-google-search) 67 (search . nnweb-google-search)
62 (address . "http://groups.google.de/groups") 68 (address . "http://groups.google.com/groups")
63 (base . "http://groups.google.de") 69 (base . "http://groups.google.com")
64 (identifier . nnweb-google-identity)) 70 (identifier . nnweb-google-identity))
65 (dejanews ;; alias of google 71 (dejanews ;; alias of google
66 (article . ignore) 72 (article . ignore)
@@ -306,35 +312,29 @@ Valid types include `google', `dejanews', and `gmane'.")
306 (current-buffer)))))) 312 (current-buffer))))))
307 313
308;;; 314;;;
309;;; Deja bought by google.com 315;;; groups.google.com
310;;; 316;;;
311 317
312(defun nnweb-google-wash-article () 318(defun nnweb-google-wash-article ()
313 (let ((case-fold-search t) url) 319 ;; We have Google's masked e-mail addresses here. :-/
314 (goto-char (point-min)) 320 (let ((case-fold-search t))
315 (re-search-forward "^<pre>" nil t)
316 (narrow-to-region (point-min) (point))
317 (search-backward "<table " nil t 2)
318 (delete-region (point-min) (point))
319 (if (re-search-forward "Search Result [0-9]+" nil t)
320 (replace-match ""))
321 (if (re-search-forward "View complete thread ([0-9]+ articles?)" nil t)
322 (replace-match ""))
323 (goto-char (point-min))
324 (while (search-forward "<br>" nil t)
325 (replace-match "\n"))
326 (mm-url-remove-markup)
327 (goto-char (point-min)) 321 (goto-char (point-min))
328 (while (re-search-forward "^[ \t]*\n" nil t) 322 (if (save-excursion
329 (replace-match "")) 323 (or (re-search-forward "The requested message.*could not be found."
330 (goto-char (point-max)) 324 nil t)
331 (insert "\n") 325 (not (and (re-search-forward "^<pre>" nil t)
332 (widen) 326 (re-search-forward "^</pre>" nil t)))))
333 (narrow-to-region (point) (point-max)) 327 ;; FIXME: Don't know how to indicate "not found".
334 (search-forward "</pre>" nil t) 328 ;; Should this function throw an error? --rsteib
335 (delete-region (point) (point-max)) 329 (progn
336 (mm-url-remove-markup) 330 (gnus-message 3 "Requested article not found")
337 (widen))) 331 (erase-buffer))
332 (delete-region (point-min)
333 (1+ (re-search-forward "^<pre>" nil t)))
334 (goto-char (point-min))
335 (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>"))
336 (point-max))
337 (mm-url-decode-entities))))
338 338
339(defun nnweb-google-parse-1 (&optional Message-ID) 339(defun nnweb-google-parse-1 (&optional Message-ID)
340 (let ((i 0) 340 (let ((i 0)
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 50a564885bb..302cafbb19b 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -49,12 +49,6 @@ instead."
49 (regexp :value "^nntp\+.*:gmane\.")) 49 (regexp :value "^nntp\+.*:gmane\."))
50 :group 'spam-report) 50 :group 'spam-report)
51 51
52(defcustom spam-report-gmane-spam-header
53 "^X-Report-Spam: http://\\([^/]+\\)\\(.*\\)$"
54 "String matching Gmane spam-reporting header. Two match groups are needed."
55 :type 'regexp
56 :group 'spam-report)
57
58(defcustom spam-report-gmane-use-article-number t 52(defcustom spam-report-gmane-use-article-number t
59 "Whether the article number (faster!) or the header should be used." 53 "Whether the article number (faster!) or the header should be used."
60 :type 'boolean 54 :type 'boolean
@@ -103,19 +97,40 @@ undo that change.")
103 article)) 97 article))
104 (with-current-buffer nntp-server-buffer 98 (with-current-buffer nntp-server-buffer
105 (gnus-request-head article gnus-newsgroup-name) 99 (gnus-request-head article gnus-newsgroup-name)
106 (goto-char (point-min)) 100 (let ((case-fold-search t)
107 (if (re-search-forward spam-report-gmane-spam-header nil t) 101 field host report url)
108 (let* ((host (match-string 1)) 102 ;; First check for X-Report-Spam because it's more specific to
109 (report (match-string 2)) 103 ;; spam reporting than Archived-At. OTOH, all new articles on
110 (url (format "http://%s%s" host report))) 104 ;; Gmane don't have X-Report-Spam anymore (unless Lars changes his
111 (gnus-message 7 "Reporting spam through URL %s..." url) 105 ;; mind :-)).
112 (spam-report-url-ping host report)) 106 ;;
113 (gnus-message 3 "Could not find X-Report-Spam in article %d..." 107 ;; There might be more than one Archived-At header so we need to
114 article))))))) 108 ;; find (and transform) the one related to Gmane.
109 (setq field (or (gnus-fetch-field "X-Report-Spam")
110 (gnus-fetch-field "Archived-At")))
111 (setq host (progn
112 (string-match
113 (concat "http://\\([a-z]+\\.gmane\\.org\\)"
114 "\\(/[^:/]+[:/][0-9]+\\)")
115 field)
116 (match-string 1 field)))
117 (setq report (match-string 2 field))
118 (when (string-equal "permalink.gmane.org" host)
119 (setq host "spam.gmane.org"))
120 (setq url (format "http://%s%s" host report))
121 (if (not (and host report url))
122 (gnus-message
123 3 "Could not find a spam report header in article %d..."
124 article)
125 (gnus-message 7 "Reporting spam through URL %s..." url)
126 (spam-report-url-ping host report))))))))
115 127
116(defun spam-report-url-ping (host report) 128(defun spam-report-url-ping (host report)
117 "Ping a host through HTTP, addressing a specific GET resource using 129 "Ping a host through HTTP, addressing a specific GET resource using
118the function specified by `spam-report-url-ping-function'." 130the function specified by `spam-report-url-ping-function'."
131 ;; Example:
132 ;; host: "spam.gmane.org"
133 ;; report: "/gmane.some.group:123456"
119 (funcall spam-report-url-ping-function host report)) 134 (funcall spam-report-url-ping-function host report))
120 135
121(defun spam-report-url-ping-plain (host report) 136(defun spam-report-url-ping-plain (host report)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index f2dec757520..f5c34ff80ca 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -130,6 +130,7 @@ This is used by the default mail-sending commands. See also
130 :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package") 130 :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package")
131 (function-item smtpmail-send-it :tag "Use SMTPmail package") 131 (function-item smtpmail-send-it :tag "Use SMTPmail package")
132 (function-item feedmail-send-it :tag "Use Feedmail package") 132 (function-item feedmail-send-it :tag "Use Feedmail package")
133 (function-item mailclient-send-it :tag "Use Mailclient package")
133 function) 134 function)
134 :group 'sendmail) 135 :group 'sendmail)
135 136
@@ -886,9 +887,9 @@ See also the function `select-message-coding-system'.")
886 "Default coding system for encoding the outgoing mail. 887 "Default coding system for encoding the outgoing mail.
887This variable is used only when `sendmail-coding-system' is nil. 888This variable is used only when `sendmail-coding-system' is nil.
888 889
889This variable is set/changed by the command set-language-environment. 890This variable is set/changed by the command `set-language-environment'.
890User should not set this variable manually, 891User should not set this variable manually,
891instead use sendmail-coding-system to get a constant encoding 892instead use `sendmail-coding-system' to get a constant encoding
892of outgoing mails regardless of the current language environment. 893of outgoing mails regardless of the current language environment.
893See also the function `select-message-coding-system'.") 894See also the function `select-message-coding-system'.")
894 895
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 302ede8c8ff..efb16807c56 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -105,10 +105,12 @@ A large number or nil slows down menu responsiveness."
105 105
106(define-key menu-bar-file-menu [split-window] 106(define-key menu-bar-file-menu [split-window]
107 '(menu-item "Split Window" split-window-vertically 107 '(menu-item "Split Window" split-window-vertically
108 :enable (and (frame-live-p menu-updating-frame) 108 :enable (or (not (display-multi-frame-p))
109 (frame-visible-p menu-updating-frame ) 109 (and (frame-live-p menu-updating-frame)
110 (not (window-minibuffer-p 110 (frame-visible-p menu-updating-frame )
111 (frame-selected-window menu-updating-frame)))) 111 (not (window-minibuffer-p
112 (frame-selected-window
113 menu-updating-frame)))))
112 :help "Split selected window in two windows")) 114 :help "Split selected window in two windows"))
113 115
114(define-key menu-bar-file-menu [separator-window] 116(define-key menu-bar-file-menu [separator-window]
@@ -120,8 +122,9 @@ A large number or nil slows down menu responsiveness."
120 :help "Pretty-print marked region in black and white to PostScript printer")) 122 :help "Pretty-print marked region in black and white to PostScript printer"))
121(define-key menu-bar-file-menu [ps-print-buffer] 123(define-key menu-bar-file-menu [ps-print-buffer]
122 '(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer 124 '(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer
123 :enable (and (frame-live-p menu-updating-frame) 125 :enable (or (not (display-multi-frame-p))
124 (frame-visible-p menu-updating-frame )) 126 (and (frame-live-p menu-updating-frame)
127 (frame-visible-p menu-updating-frame)))
125 :help "Pretty-print current buffer in black and white to PostScript printer")) 128 :help "Pretty-print current buffer in black and white to PostScript printer"))
126(define-key menu-bar-file-menu [ps-print-region-faces] 129(define-key menu-bar-file-menu [ps-print-region-faces]
127 '(menu-item "Postscript Print Region" ps-print-region-with-faces 130 '(menu-item "Postscript Print Region" ps-print-region-with-faces
@@ -129,8 +132,9 @@ A large number or nil slows down menu responsiveness."
129 :help "Pretty-print marked region to PostScript printer")) 132 :help "Pretty-print marked region to PostScript printer"))
130(define-key menu-bar-file-menu [ps-print-buffer-faces] 133(define-key menu-bar-file-menu [ps-print-buffer-faces]
131 '(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces 134 '(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces
132 :enable (and (frame-live-p menu-updating-frame) 135 :enable (or (not (display-multi-frame-p))
133 (frame-visible-p menu-updating-frame )) 136 (and (frame-live-p menu-updating-frame)
137 (frame-visible-p menu-updating-frame)))
134 :help "Pretty-print current buffer to PostScript printer")) 138 :help "Pretty-print current buffer to PostScript printer"))
135(define-key menu-bar-file-menu [print-region] 139(define-key menu-bar-file-menu [print-region]
136 '(menu-item "Print Region" print-region 140 '(menu-item "Print Region" print-region
@@ -138,8 +142,9 @@ A large number or nil slows down menu responsiveness."
138 :help "Print region between mark and current position")) 142 :help "Print region between mark and current position"))
139(define-key menu-bar-file-menu [print-buffer] 143(define-key menu-bar-file-menu [print-buffer]
140 '(menu-item "Print Buffer" print-buffer 144 '(menu-item "Print Buffer" print-buffer
141 :enable (and (frame-live-p menu-updating-frame) 145 :enable (or (not (display-multi-frame-p))
142 (frame-visible-p menu-updating-frame )) 146 (and (frame-live-p menu-updating-frame)
147 (frame-visible-p menu-updating-frame)))
143 :help "Print current buffer with page headings")) 148 :help "Print current buffer with page headings"))
144 149
145(define-key menu-bar-file-menu [separator-print] 150(define-key menu-bar-file-menu [separator-print]
@@ -170,17 +175,21 @@ A large number or nil slows down menu responsiveness."
170 :help "Re-read current buffer from its file")) 175 :help "Re-read current buffer from its file"))
171(define-key menu-bar-file-menu [write-file] 176(define-key menu-bar-file-menu [write-file]
172 '(menu-item "Save As..." write-file 177 '(menu-item "Save As..." write-file
173 :enable (and (frame-live-p menu-updating-frame) 178 :enable (or (not (display-multi-frame-p))
174 (frame-visible-p menu-updating-frame ) 179 (and (frame-live-p menu-updating-frame)
175 (not (window-minibuffer-p 180 (frame-visible-p menu-updating-frame )
176 (frame-selected-window menu-updating-frame)))) 181 (not (window-minibuffer-p
182 (frame-selected-window
183 menu-updating-frame)))))
177 :help "Write current buffer to another file")) 184 :help "Write current buffer to another file"))
178(define-key menu-bar-file-menu [save-buffer] 185(define-key menu-bar-file-menu [save-buffer]
179 '(menu-item "Save" save-buffer 186 '(menu-item "Save" save-buffer
180 :enable (and (buffer-modified-p) 187 :enable (and (buffer-modified-p)
181 (buffer-file-name) 188 (buffer-file-name)
182 (not (window-minibuffer-p 189 (or (not (display-multi-frame-p))
183 (frame-selected-window menu-updating-frame)))) 190 (not (window-minibuffer-p
191 (frame-selected-window
192 menu-updating-frame)))))
184 :help "Save current buffer to its file")) 193 :help "Save current buffer to its file"))
185 194
186(define-key menu-bar-file-menu [separator-save] 195(define-key menu-bar-file-menu [separator-save]
@@ -192,23 +201,28 @@ A large number or nil slows down menu responsiveness."
192 :help "Discard (kill) current buffer")) 201 :help "Discard (kill) current buffer"))
193(define-key menu-bar-file-menu [insert-file] 202(define-key menu-bar-file-menu [insert-file]
194 '(menu-item "Insert File..." insert-file 203 '(menu-item "Insert File..." insert-file
195 :enable (not (window-minibuffer-p 204 :enable (or (not (display-multi-frame-p))
196 (frame-selected-window menu-updating-frame))) 205 (and (not (window-minibuffer-p
206 (frame-selected-window
207 menu-updating-frame)))))
197 :help "Insert another file into current buffer")) 208 :help "Insert another file into current buffer"))
198(define-key menu-bar-file-menu [dired] 209(define-key menu-bar-file-menu [dired]
199 '(menu-item "Open Directory..." dired 210 '(menu-item "Open Directory..." dired
200 :enable (not (window-minibuffer-p 211 :enable (or (not (display-multi-frame-p))
201 (frame-selected-window menu-updating-frame))) 212 (not (window-minibuffer-p
213 (frame-selected-window menu-updating-frame))))
202 :help "Read a directory, operate on its files")) 214 :help "Read a directory, operate on its files"))
203(define-key menu-bar-file-menu [open-file] 215(define-key menu-bar-file-menu [open-file]
204 '(menu-item "Open File..." find-file-existing 216 '(menu-item "Open File..." find-file-existing
205 :enable (not (window-minibuffer-p 217 :enable (or (not (display-multi-frame-p))
206 (frame-selected-window menu-updating-frame))) 218 (not (window-minibuffer-p
219 (frame-selected-window menu-updating-frame))))
207 :help "Read an existing file into an Emacs buffer")) 220 :help "Read an existing file into an Emacs buffer"))
208(define-key menu-bar-file-menu [new-file] 221(define-key menu-bar-file-menu [new-file]
209 '(menu-item "Visit New File..." find-file 222 '(menu-item "Visit New File..." find-file
210 :enable (not (window-minibuffer-p 223 :enable (or (not (display-multi-frame-p))
211 (frame-selected-window menu-updating-frame))) 224 (not (window-minibuffer-p
225 (frame-selected-window menu-updating-frame))))
212 :help "Read or create a file and edit it")) 226 :help "Read or create a file and edit it"))
213 227
214 228
@@ -1043,8 +1057,9 @@ mail status in mode line"))
1043 toggle-truncate-lines 1057 toggle-truncate-lines
1044 :help "Truncate long lines on the screen" 1058 :help "Truncate long lines on the screen"
1045 :button (:toggle . truncate-lines) 1059 :button (:toggle . truncate-lines)
1046 :enable (and (frame-live-p menu-updating-frame) 1060 :enable (or (not (display-multi-frame-p))
1047 (frame-visible-p menu-updating-frame)))) 1061 (and (frame-live-p menu-updating-frame)
1062 (frame-visible-p menu-updating-frame)))))
1048 1063
1049(define-key menu-bar-options-menu [highlight-separator] 1064(define-key menu-bar-options-menu [highlight-separator]
1050 '("--")) 1065 '("--"))
diff --git a/lisp/mouse.el b/lisp/mouse.el
index c928e04f8ed..1970fbf1eeb 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -538,11 +538,10 @@ resized by dragging their header-line."
538 (window (posn-window start)) 538 (window (posn-window start))
539 (frame (window-frame window)) 539 (frame (window-frame window))
540 (first-window (frame-first-window frame))) 540 (first-window (frame-first-window frame)))
541 (when (or (eq window first-window) 541 (unless (or (eq window first-window)
542 (= (nth 1 (window-edges window)) 542 (= (nth 1 (window-edges window))
543 (nth 1 (window-edges first-window)))) 543 (nth 1 (window-edges first-window))))
544 (error "Cannot move header-line at the top of the frame")) 544 (mouse-drag-mode-line-1 start-event nil))))
545 (mouse-drag-mode-line-1 start-event nil)))
546 545
547 546
548(defun mouse-drag-vertical-line (start-event) 547(defun mouse-drag-vertical-line (start-event)
diff --git a/lisp/msb.el b/lisp/msb.el
index 8fa63d98051..94a1599371f 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -185,7 +185,7 @@
185 "Elisp Files (%d)") 185 "Elisp Files (%d)")
186 ((eq major-mode 'latex-mode) 186 ((eq major-mode 'latex-mode)
187 3030 187 3030
188 "LaTex Files (%d)") 188 "LaTeX Files (%d)")
189 ('no-multi 189 ('no-multi
190 3099 190 3099
191 "Other files (%d)"))) 191 "Other files (%d)")))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e721f3fb016..b8b3fb9068a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -5213,7 +5213,10 @@ Returns nil if none was found, else the command is returned."
5213 5213
5214(defun tramp-action-password (p multi-method method user host) 5214(defun tramp-action-password (p multi-method method user host)
5215 "Query the user for a password." 5215 "Query the user for a password."
5216 (let ((pw-prompt (match-string 0))) 5216 (let ((pw-prompt
5217 (format "Password for %s "
5218 (tramp-make-tramp-file-name
5219 nil method user host ""))))
5217 (tramp-message 9 "Sending password") 5220 (tramp-message 9 "Sending password")
5218 (tramp-enter-password p pw-prompt user host))) 5221 (tramp-enter-password p pw-prompt user host)))
5219 5222
@@ -5300,8 +5303,12 @@ The terminal type can be configured with `tramp-terminal-type'."
5300 5303
5301(defun tramp-multi-action-password (p method user host) 5304(defun tramp-multi-action-password (p method user host)
5302 "Query the user for a password." 5305 "Query the user for a password."
5303 (tramp-message 9 "Sending password") 5306 (let ((pw-prompt
5304 (tramp-enter-password p (match-string 0) user host)) 5307 (format "Password for %s "
5308 (tramp-make-tramp-file-name
5309 nil method user host ""))))
5310 (tramp-message 9 "Sending password")
5311 (tramp-enter-password p pw-prompt user host)))
5305 5312
5306(defun tramp-multi-action-succeed (p method user host) 5313(defun tramp-multi-action-succeed (p method user host)
5307 "Signal success in finding shell prompt." 5314 "Signal success in finding shell prompt."
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 6321216dcce..f0836cbf2b0 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1688,14 +1688,18 @@ and overlay is highlighted between MK and END-MK."
1688 ;; Show compilation buffer in other window, scrolled to this error. 1688 ;; Show compilation buffer in other window, scrolled to this error.
1689 (let* ((pop-up-windows t) 1689 (let* ((pop-up-windows t)
1690 ;; Use an existing window if it is in a visible frame. 1690 ;; Use an existing window if it is in a visible frame.
1691 (w (or (get-buffer-window (marker-buffer msg) 'visible) 1691 (pre-existing (get-buffer-window (marker-buffer msg) 0))
1692 ;; Pop up a window. 1692 (w (let ((display-buffer-reuse-frames t))
1693 (display-buffer (marker-buffer msg)))) 1693 ;; Pop up a window.
1694 (display-buffer (marker-buffer msg))))
1694 (highlight-regexp (with-current-buffer (marker-buffer msg) 1695 (highlight-regexp (with-current-buffer (marker-buffer msg)
1695 ;; also do this while we change buffer 1696 ;; also do this while we change buffer
1696 (compilation-set-window w msg) 1697 (compilation-set-window w msg)
1697 compilation-highlight-regexp))) 1698 compilation-highlight-regexp)))
1698 (compilation-set-window-height w) 1699 ;; Ideally, the window-size should be passed to `display-buffer' (via
1700 ;; something like special-display-buffer) so it's only used when
1701 ;; creating a new window.
1702 (unless pre-existing (compilation-set-window-height w))
1699 1703
1700 (when highlight-regexp 1704 (when highlight-regexp
1701 (if (timerp next-error-highlight-timer) 1705 (if (timerp next-error-highlight-timer)
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 0c94120a0f8..85f7e1339f3 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -4,6 +4,7 @@
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Ray Blaak <blaak@infomatch.com> 6;; Author: Ray Blaak <blaak@infomatch.com>
7;; Maintainer: FSF (Blaak's email addr bounces, Aug 2005)
7;; Keywords: languages 8;; Keywords: languages
8 9
9;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index d137284f795..e5089d84fb0 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -960,8 +960,7 @@ Convert it to flymake internal format."
960 (setq converted-list (cons (list regexp file line col) converted-list))))) 960 (setq converted-list (cons (list regexp file line col) converted-list)))))
961 converted-list)) 961 converted-list))
962 962
963(eval-when-compile 963(require 'compile)
964 (require 'compile))
965 964
966(defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text 965(defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text
967 (append 966 (append
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index b8336691307..11ae1c66aa7 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1833,6 +1833,10 @@ If it isn't in one, return nil."
1833 ;; Don't keep looking across a blank line or comment. 1833 ;; Don't keep looking across a blank line or comment.
1834 (looking-at "$\\|#") 1834 (looking-at "$\\|#")
1835 (not (zerop (forward-line -1)))))) 1835 (not (zerop (forward-line -1))))))
1836 ;; Remove leading and trailing whitespace.
1837 (when found
1838 (setq found (replace-regexp-in-string "[ \t]+\\'" "" found))
1839 (setq found (replace-regexp-in-string "\\`[ \t]+" "" found)))
1836 found))) 1840 found)))
1837 1841
1838(provide 'make-mode) 1842(provide 'make-mode)
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 7991f1fd1b4..e1af8b0f007 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -267,12 +267,12 @@ The expansion is entirely correct because it uses the C preprocessor."
267 ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1)) 267 ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
268 ;; regexp and funny quotes 268 ;; regexp and funny quotes
269 ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7))) 269 ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7)))
270 ("[?:.,;=!~({[ \t\n]\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)" 270 ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)"
271 ;; Nasty cases: 271 ;; Nasty cases:
272 ;; /foo/m $a->m $#m $m @m %m 272 ;; /foo/m $a->m $#m $m @m %m
273 ;; \s (appears often in regexps). 273 ;; \s (appears often in regexps).
274 ;; -s file 274 ;; -s file
275 (2 (if (assoc (char-after (match-beginning 2)) 275 (3 (if (assoc (char-after (match-beginning 3))
276 perl-quote-like-pairs) 276 perl-quote-like-pairs)
277 '(15) '(7)))) 277 '(15) '(7))))
278 ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)") 278 ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)")
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 4f702186685..e37390f5b80 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -490,7 +490,10 @@ This is buffer-local in every such buffer.")
490 map) 490 map)
491 "Keymap used in Shell-Script mode.") 491 "Keymap used in Shell-Script mode.")
492 492
493 493(defvar sh-skeleton-pair-default-alist '((?( _ ?)) (?\))
494 (?[ ?\s _ ?\s ?]) (?\])
495 (?{ _ ?}) (?\}))
496 "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.")
494 497
495(defcustom sh-dynamic-complete-functions 498(defcustom sh-dynamic-complete-functions
496 '(shell-dynamic-complete-environment-variable 499 '(shell-dynamic-complete-environment-variable
@@ -1362,6 +1365,8 @@ with your script for an edit-interpret-debug cycle."
1362 (make-local-variable 'sh-shell-variables-initialized) 1365 (make-local-variable 'sh-shell-variables-initialized)
1363 (make-local-variable 'imenu-generic-expression) 1366 (make-local-variable 'imenu-generic-expression)
1364 (make-local-variable 'sh-indent-supported-here) 1367 (make-local-variable 'sh-indent-supported-here)
1368 (make-local-variable 'skeleton-pair-default-alist)
1369 (setq skeleton-pair-default-alist sh-skeleton-pair-default-alist)
1365 (setq skeleton-end-hook (lambda () 1370 (setq skeleton-end-hook (lambda ()
1366 (or (eolp) (newline) (indent-relative))) 1371 (or (eolp) (newline) (indent-relative)))
1367 paragraph-start (concat page-delimiter "\\|$") 1372 paragraph-start (concat page-delimiter "\\|$")
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 524d00d389d..20251508941 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -5,7 +5,6 @@
5 5
6;; Author: David Ponce <david@dponce.com> 6;; Author: David Ponce <david@dponce.com>
7;; Created: July 19 1999 7;; Created: July 19 1999
8;; Maintainer: FSF
9;; Keywords: files 8;; Keywords: files
10 9
11;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -258,7 +257,16 @@ It is passed a filename to give a chance to transform it.
258If it returns nil, the filename is left unchanged." 257If it returns nil, the filename is left unchanged."
259 :group 'recentf 258 :group 'recentf
260 :type '(choice (const :tag "None" nil) 259 :type '(choice (const :tag "None" nil)
260 (const abbreviate-file-name)
261 function)) 261 function))
262
263(defcustom recentf-show-file-shortcuts-flag t
264 "Whether to show ``[N]'' for the Nth item up to 10.
265If non-nil, `recentf-open-files' will show labels for keys that can be
266used as shortcuts to open the Nth file."
267 :group 'recentf
268 :type 'boolean)
269
262 270
263;;; Utilities 271;;; Utilities
264;; 272;;
@@ -349,7 +357,7 @@ filenames."
349 "Convert filename NAME to absolute, and canonicalize it. 357 "Convert filename NAME to absolute, and canonicalize it.
350See also the function `expand-file-name'. 358See also the function `expand-file-name'.
351If defined, call the function `recentf-filename-handler' 359If defined, call the function `recentf-filename-handler'
352to postprocess the canonical name." 360to post process the canonical name."
353 (let* ((filename (expand-file-name name))) 361 (let* ((filename (expand-file-name name)))
354 (or (and recentf-filename-handler 362 (or (and recentf-filename-handler
355 (funcall recentf-filename-handler filename)) 363 (funcall recentf-filename-handler filename))
@@ -926,6 +934,9 @@ Go to the beginning of buffer if not found."
926 (set-keymap-parent km widget-keymap) 934 (set-keymap-parent km widget-keymap)
927 (define-key km "q" 'recentf-cancel-dialog) 935 (define-key km "q" 'recentf-cancel-dialog)
928 (define-key km [down-mouse-1] 'widget-button-click) 936 (define-key km [down-mouse-1] 'widget-button-click)
937 ;; Keys in reverse order of appearence in help.
938 (dolist (k '("0" "9" "8" "7" "6" "5" "4" "3" "2" "1"))
939 (define-key km k 'recentf-open-file-with-key))
929 km) 940 km)
930 "Keymap used in recentf dialogs.") 941 "Keymap used in recentf dialogs.")
931 942
@@ -1063,6 +1074,18 @@ IGNORE other arguments."
1063 (kill-buffer (current-buffer)) 1074 (kill-buffer (current-buffer))
1064 (funcall recentf-menu-action (widget-value widget))) 1075 (funcall recentf-menu-action (widget-value widget)))
1065 1076
1077;; List of files associated to a digit shortcut key.
1078(defvar recentf--files-with-key nil)
1079
1080(defun recentf-show-digit-shortcut-filter (l)
1081 "Filter the list of menu-elements L to show digit shortcuts."
1082 (let ((i 0))
1083 (dolist (e l)
1084 (setq i (1+ i))
1085 (recentf-set-menu-element-item
1086 e (format "[%d] %s" (% i 10) (recentf-menu-element-item e))))
1087 l))
1088
1066(defun recentf-open-files-item (menu-element) 1089(defun recentf-open-files-item (menu-element)
1067 "Return a widget to display MENU-ELEMENT in a dialog buffer." 1090 "Return a widget to display MENU-ELEMENT in a dialog buffer."
1068 (if (consp (cdr menu-element)) 1091 (if (consp (cdr menu-element))
@@ -1085,6 +1108,26 @@ IGNORE other arguments."
1085 :action recentf-open-files-action 1108 :action recentf-open-files-action
1086 ,(cdr menu-element)))) 1109 ,(cdr menu-element))))
1087 1110
1111(defun recentf-open-files-items (files)
1112 "Return a list of widgets to display FILES in a dialog buffer."
1113 (set (make-local-variable 'recentf--files-with-key)
1114 (recentf-trunc-list files 10))
1115 (mapcar 'recentf-open-files-item
1116 (append
1117 ;; When requested group the files with shortcuts together
1118 ;; at the top of the list.
1119 (when recentf-show-file-shortcuts-flag
1120 (setq files (nthcdr 10 files))
1121 (recentf-apply-menu-filter
1122 'recentf-show-digit-shortcut-filter
1123 (mapcar 'recentf-make-default-menu-element
1124 recentf--files-with-key)))
1125 ;; Then the other files.
1126 (recentf-apply-menu-filter
1127 recentf-menu-filter
1128 (mapcar 'recentf-make-default-menu-element
1129 files)))))
1130
1088(defun recentf-open-files (&optional files buffer-name) 1131(defun recentf-open-files (&optional files buffer-name)
1089 "Show a dialog to open a recent file. 1132 "Show a dialog to open a recent file.
1090If optional argument FILES is non-nil, it is a list of recently-opened 1133If optional argument FILES is non-nil, it is a list of recently-opened
@@ -1093,25 +1136,43 @@ If optional argument BUFFER-NAME is non-nil, it is a buffer name to
1093use for the dialog. It defaults to \"*`recentf-menu-title'*\"." 1136use for the dialog. It defaults to \"*`recentf-menu-title'*\"."
1094 (interactive) 1137 (interactive)
1095 (recentf-dialog (or buffer-name (format "*%s*" recentf-menu-title)) 1138 (recentf-dialog (or buffer-name (format "*%s*" recentf-menu-title))
1096 (widget-insert "Click on a file to open it. 1139 (widget-insert "Click on a file"
1097Click on Cancel or type `q' to cancel.\n" ) 1140 (if recentf-show-file-shortcuts-flag
1141 ", or type the corresponding digit key,"
1142 "")
1143 " to open it.\n"
1144 "Click on Cancel or type `q' to cancel.\n")
1098 ;; Use a L&F that looks like the recentf menu. 1145 ;; Use a L&F that looks like the recentf menu.
1099 (tree-widget-set-theme "folder") 1146 (tree-widget-set-theme "folder")
1100 (apply 'widget-create 1147 (apply 'widget-create
1101 `(group 1148 `(group
1102 :indent 2 1149 :indent 2
1103 :format "\n%v\n" 1150 :format "\n%v\n"
1104 ,@(mapcar 'recentf-open-files-item 1151 ,@(recentf-open-files-items (or files recentf-list))))
1105 (recentf-apply-menu-filter
1106 recentf-menu-filter
1107 (mapcar 'recentf-make-default-menu-element
1108 (or files recentf-list))))))
1109 (widget-create 1152 (widget-create
1110 'push-button 1153 'push-button
1111 :notify 'recentf-cancel-dialog 1154 :notify 'recentf-cancel-dialog
1112 "Cancel") 1155 "Cancel")
1113 (recentf-dialog-goto-first 'link))) 1156 (recentf-dialog-goto-first 'link)))
1114 1157
1158(defun recentf-open-file-with-key (n)
1159 "Open the recent file with the shortcut numeric key N.
1160N must be a valid digit.
1161`1' opens the first file, `2' the second file, ... `9' the ninth file.
1162`0' opens the tenth file."
1163 (interactive
1164 (list
1165 (let ((n (string-to-number (this-command-keys))))
1166 (cond
1167 ((zerop n) 10)
1168 ((and (> n 0) (< n 10)) n)
1169 ((error "Invalid digit key %d" n))))))
1170 (when recentf--files-with-key
1171 (let ((file (nth (1- n) recentf--files-with-key)))
1172 (unless file (error "Not that many recent files"))
1173 (kill-buffer (current-buffer))
1174 (funcall recentf-menu-action file))))
1175
1115(defun recentf-open-more-files () 1176(defun recentf-open-more-files ()
1116 "Show a dialog to open a recent file that is not in the menu." 1177 "Show a dialog to open a recent file that is not in the menu."
1117 (interactive) 1178 (interactive)
diff --git a/lisp/simple.el b/lisp/simple.el
index c6837ecabba..cb8fcc97136 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4231,88 +4231,90 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
4231(defun blink-matching-open () 4231(defun blink-matching-open ()
4232 "Move cursor momentarily to the beginning of the sexp before point." 4232 "Move cursor momentarily to the beginning of the sexp before point."
4233 (interactive) 4233 (interactive)
4234 (and (> (point) (1+ (point-min))) 4234 (when (and (> (point) (1+ (point-min)))
4235 blink-matching-paren 4235 blink-matching-paren
4236 ;; Verify an even number of quoting characters precede the close. 4236 ;; Verify an even number of quoting characters precede the close.
4237 (= 1 (logand 1 (- (point) 4237 (= 1 (logand 1 (- (point)
4238 (save-excursion 4238 (save-excursion
4239 (forward-char -1) 4239 (forward-char -1)
4240 (skip-syntax-backward "/\\") 4240 (skip-syntax-backward "/\\")
4241 (point))))) 4241 (point))))))
4242 (let* ((oldpos (point)) 4242 (let* ((oldpos (point))
4243 (blinkpos) 4243 blinkpos
4244 (mismatch) 4244 message-log-max ; Don't log messages about paren matching.
4245 matching-paren) 4245 matching-paren
4246 (save-excursion 4246 open-paren-line-string)
4247 (save-restriction 4247 (save-excursion
4248 (if blink-matching-paren-distance 4248 (save-restriction
4249 (narrow-to-region (max (point-min) 4249 (if blink-matching-paren-distance
4250 (- (point) blink-matching-paren-distance)) 4250 (narrow-to-region (max (point-min)
4251 oldpos)) 4251 (- (point) blink-matching-paren-distance))
4252 (condition-case () 4252 oldpos))
4253 (let ((parse-sexp-ignore-comments 4253 (condition-case ()
4254 (and parse-sexp-ignore-comments 4254 (let ((parse-sexp-ignore-comments
4255 (not blink-matching-paren-dont-ignore-comments)))) 4255 (and parse-sexp-ignore-comments
4256 (setq blinkpos (scan-sexps oldpos -1))) 4256 (not blink-matching-paren-dont-ignore-comments))))
4257 (error nil))) 4257 (setq blinkpos (scan-sexps oldpos -1)))
4258 (and blinkpos 4258 (error nil)))
4259 ;; Not syntax '$'. 4259 (and blinkpos
4260 (not (eq (syntax-class (syntax-after blinkpos)) 8)) 4260 ;; Not syntax '$'.
4261 (setq matching-paren 4261 (not (eq (syntax-class (syntax-after blinkpos)) 8))
4262 (let ((syntax (syntax-after blinkpos))) 4262 (setq matching-paren
4263 (and (consp syntax) 4263 (let ((syntax (syntax-after blinkpos)))
4264 (eq (syntax-class syntax) 4) 4264 (and (consp syntax)
4265 (cdr syntax))) 4265 (eq (syntax-class syntax) 4)
4266 mismatch 4266 (cdr syntax)))))
4267 (or (null matching-paren) 4267 (cond
4268 (/= (char-after (1- oldpos)) 4268 ((or (null matching-paren)
4269 matching-paren)))) 4269 (/= (char-before oldpos)
4270 (if mismatch (setq blinkpos nil)) 4270 matching-paren))
4271 (if blinkpos 4271 (message "Mismatched parentheses"))
4272 ;; Don't log messages about paren matching. 4272 ((not blinkpos)
4273 (let (message-log-max) 4273 (if (not blink-matching-paren-distance)
4274 (goto-char blinkpos) 4274 (message "Unmatched parenthesis")))
4275 (if (pos-visible-in-window-p) 4275 ((pos-visible-in-window-p blinkpos)
4276 (and blink-matching-paren-on-screen 4276 ;; Matching open within window, temporarily move to blinkpos but only
4277 (sit-for blink-matching-delay)) 4277 ;; if `blink-matching-paren-on-screen' is non-nil.
4278 (goto-char blinkpos) 4278 (when blink-matching-paren-on-screen
4279 (message 4279 (save-excursion
4280 "Matches %s" 4280 (goto-char blinkpos)
4281 ;; Show what precedes the open in its line, if anything. 4281 (sit-for blink-matching-delay))))
4282 (if (save-excursion 4282 (t
4283 (skip-chars-backward " \t") 4283 (save-excursion
4284 (not (bolp))) 4284 (goto-char blinkpos)
4285 (buffer-substring (progn (beginning-of-line) (point)) 4285 (setq open-paren-line-string
4286 (1+ blinkpos)) 4286 ;; Show what precedes the open in its line, if anything.
4287 ;; Show what follows the open in its line, if anything. 4287 (if (save-excursion
4288 (if (save-excursion 4288 (skip-chars-backward " \t")
4289 (forward-char 1) 4289 (not (bolp)))
4290 (skip-chars-forward " \t") 4290 (buffer-substring (line-beginning-position)
4291 (not (eolp))) 4291 (1+ blinkpos))
4292 (buffer-substring blinkpos 4292 ;; Show what follows the open in its line, if anything.
4293 (progn (end-of-line) (point))) 4293 (if (save-excursion
4294 ;; Otherwise show the previous nonblank line, 4294 (forward-char 1)
4295 ;; if there is one. 4295 (skip-chars-forward " \t")
4296 (if (save-excursion 4296 (not (eolp)))
4297 (skip-chars-backward "\n \t") 4297 (buffer-substring blinkpos
4298 (not (bobp))) 4298 (line-end-position))
4299 (concat 4299 ;; Otherwise show the previous nonblank line,
4300 (buffer-substring (progn 4300 ;; if there is one.
4301 (if (save-excursion
4302 (skip-chars-backward "\n \t")
4303 (not (bobp)))
4304 (concat
4305 (buffer-substring (progn
4301 (skip-chars-backward "\n \t") 4306 (skip-chars-backward "\n \t")
4302 (beginning-of-line) 4307 (line-beginning-position))
4303 (point)) 4308 (progn (end-of-line)
4304 (progn (end-of-line) 4309 (skip-chars-backward " \t")
4305 (skip-chars-backward " \t") 4310 (point)))
4306 (point))) 4311 ;; Replace the newline and other whitespace with `...'.
4307 ;; Replace the newline and other whitespace with `...'. 4312 "..."
4308 "..." 4313 (buffer-substring blinkpos (1+ blinkpos)))
4309 (buffer-substring blinkpos (1+ blinkpos))) 4314 ;; There is nothing to show except the char itself.
4310 ;; There is nothing to show except the char itself. 4315 (buffer-substring blinkpos (1+ blinkpos)))))))
4311 (buffer-substring blinkpos (1+ blinkpos)))))))) 4316 (message "Matches %s"
4312 (cond (mismatch 4317 (substring-no-properties open-paren-line-string))))))))
4313 (message "Mismatched parentheses"))
4314 ((not blink-matching-paren-distance)
4315 (message "Unmatched parenthesis"))))))))
4316 4318
4317;Turned off because it makes dbx bomb out. 4319;Turned off because it makes dbx bomb out.
4318(setq blink-paren-function 'blink-matching-open) 4320(setq blink-paren-function 'blink-matching-open)
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el
index 4b677edc36a..31c7c4f2f12 100644
--- a/lisp/smerge-mode.el
+++ b/lisp/smerge-mode.el
@@ -372,7 +372,7 @@ This relies on mode-specific knowledge and thus only works in
372some major modes. Uses `smerge-resolve-function' to do the actual work." 372some major modes. Uses `smerge-resolve-function' to do the actual work."
373 (interactive) 373 (interactive)
374 (smerge-match-conflict) 374 (smerge-match-conflict)
375 (smerge-remove-props) 375 (smerge-remove-props (match-beginning 0) (match-end 0))
376 (cond 376 (cond
377 ;; Trivial diff3 -A non-conflicts. 377 ;; Trivial diff3 -A non-conflicts.
378 ((and (eq (match-end 1) (match-end 3)) 378 ((and (eq (match-end 1) (match-end 3))
diff --git a/lisp/woman.el b/lisp/woman.el
index 5ecc4744305..e5753d746f7 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -3,7 +3,7 @@
3;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> 5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
6;; Maintainer: Francis J. Wright <F.J.Wright@qmul.ac.uk> 6;; Maintainer: FSF
7;; Keywords: help, unix 7;; Keywords: help, unix
8;; Adapted-By: Eli Zaretskii <eliz@gnu.org> 8;; Adapted-By: Eli Zaretskii <eliz@gnu.org>
9;; Version: see `woman-version' 9;; Version: see `woman-version'
@@ -420,10 +420,7 @@
420;; Paul A. Thompson <pat@po.cwru.edu> 420;; Paul A. Thompson <pat@po.cwru.edu>
421;; Arrigo Triulzi <arrigo@maths.qmw.ac.uk> 421;; Arrigo Triulzi <arrigo@maths.qmw.ac.uk>
422;; Geoff Voelker <voelker@cs.washington.edu> 422;; Geoff Voelker <voelker@cs.washington.edu>
423;; Eli Zaretskii <eliz@is.elta.co.il> 423;; Eli Zaretskii <eliz@gnu.org>
424
425;;; History:
426;; For recent change log see end of file.
427 424
428 425
429;;; Code: 426;;; Code:
@@ -956,8 +953,9 @@ This is usually either black or white."
956 :group 'woman-faces) 953 :group 'woman-faces)
957 954
958 (defcustom woman-use-symbol-font nil 955 (defcustom woman-use-symbol-font nil
959 "*If non-nil then may use the symbol font. It is off by default, 956 "*If non-nil then may use the symbol font.
960mainly because it may change the line spacing (in NTEmacs 20.5)." 957It is off by default, mainly because it may change the line spacing
958\(in NTEmacs 20.5)."
961 :type 'boolean 959 :type 'boolean
962 :group 'woman-faces) 960 :group 'woman-faces)
963 961
@@ -1221,7 +1219,8 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read."
1221 ;; completions, but to return only a case-sensitive match. This 1219 ;; completions, but to return only a case-sensitive match. This
1222 ;; does not seem to work properly by default, so I re-do the 1220 ;; does not seem to work properly by default, so I re-do the
1223 ;; completion if necessary. 1221 ;; completion if necessary.
1224 (let (files) 1222 (let (files
1223 (default (current-word)))
1225 (or (stringp topic) 1224 (or (stringp topic)
1226 (and (eq t 1225 (and (eq t
1227 (if (boundp 'woman-topic-at-point) 1226 (if (boundp 'woman-topic-at-point)
@@ -1233,13 +1232,15 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read."
1233 (assoc topic woman-topic-all-completions)) 1232 (assoc topic woman-topic-all-completions))
1234 (setq topic 1233 (setq topic
1235 (completing-read 1234 (completing-read
1236 "Manual entry: " 1235 (if default
1236 (format "Manual entry (default `%s'): " default)
1237 "Manual entry: ")
1237 woman-topic-all-completions nil 1 1238 woman-topic-all-completions nil 1
1238 ;; Initial input suggestion (was nil), with 1239 nil
1239 ;; cursor at left ready to kill suggestion!: 1240 'woman-topic-history
1241 ;; Default topic.
1240 (and woman-topic-at-point 1242 (and woman-topic-at-point
1241 (cons (or (current-word) "") 0)) ; nearest word 1243 default))))
1242 'woman-topic-history)))
1243 ;; Note that completing-read always returns a string. 1244 ;; Note that completing-read always returns a string.
1244 (if (= (length topic) 0) 1245 (if (= (length topic) 0)
1245 nil ; no topic, so no file! 1246 nil ; no topic, so no file!
@@ -1259,10 +1260,9 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read."
1259 ;; Unread the command event (TAB = ?\t = 9) that runs the command 1260 ;; Unread the command event (TAB = ?\t = 9) that runs the command
1260 ;; `minibuffer-complete' in order to automatically complete the 1261 ;; `minibuffer-complete' in order to automatically complete the
1261 ;; minibuffer contents as far as possible. 1262 ;; minibuffer contents as far as possible.
1262 (setq unread-command-events '(9)) ; and delete any type-ahead! 1263 (setq unread-command-events '(9)) ; and delete any type-ahead!
1263 (completing-read "Manual file: " files nil 1 1264 (completing-read "Manual file: " files nil 1
1264 (try-completion "" files) 'woman-file-history))) 1265 (try-completion "" files) 'woman-file-history))))))
1265 )))
1266 1266
1267(defun woman-select (predicate list) 1267(defun woman-select (predicate list)
1268 "Select unique elements for which PREDICATE is true in LIST. 1268 "Select unique elements for which PREDICATE is true in LIST.
@@ -1741,7 +1741,10 @@ Leave point at end of new text. Return length of inserted text."
1741 (define-key woman-mode-map "w" 'woman) 1741 (define-key woman-mode-map "w" 'woman)
1742 (define-key woman-mode-map "\en" 'WoMan-next-manpage) 1742 (define-key woman-mode-map "\en" 'WoMan-next-manpage)
1743 (define-key woman-mode-map "\ep" 'WoMan-previous-manpage) 1743 (define-key woman-mode-map "\ep" 'WoMan-previous-manpage)
1744 (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)) 1744 (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
1745
1746 ;; We don't need to call `man' when we are in `woman-mode'.
1747 (define-key woman-mode-map [remap man] 'woman))
1745 1748
1746(defun woman-follow-word (event) 1749(defun woman-follow-word (event)
1747 "Run WoMan with word under mouse as topic. 1750 "Run WoMan with word under mouse as topic.
@@ -1942,25 +1945,33 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated."
1942(defvar WoMan-Man-start-time nil 1945(defvar WoMan-Man-start-time nil
1943 "Used to record formatting time used by the `man' command.") 1946 "Used to record formatting time used by the `man' command.")
1944 1947
1945(defadvice Man-getpage-in-background 1948;; Both advices are disabled because "a file in Emacs should not put
1946 (around Man-getpage-in-background-advice (topic) activate) 1949;; advice on a function in Emacs" (see Info node "(elisp)Advising
1947 "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly. 1950;; Functions"). Counting the formatting time is useful for
1948Otherwise use Man and record start of formatting time." 1951;; developping, but less applicable for daily use. The advice for
1949 (if (and (eq major-mode 'woman-mode) 1952;; `Man-getpage-in-background' can be discarded, because the
1950 (not (eq (caar command-history) 'man))) 1953;; key-binding in `woman-mode-map' has been remapped to call `woman'
1951 (WoMan-getpage-in-background topic) 1954;; but `man'. Michael Albinus <michael.albinus@gmx.de>
1952 ;; Initiates man processing 1955
1953 (setq WoMan-Man-start-time (current-time)) 1956;; (defadvice Man-getpage-in-background
1954 ad-do-it)) 1957;; (around Man-getpage-in-background-advice (topic) activate)
1955 1958;; "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly.
1956(defadvice Man-bgproc-sentinel 1959;; Otherwise use Man and record start of formatting time."
1957 (after Man-bgproc-sentinel-advice activate) 1960;; (if (and (eq major-mode 'woman-mode)
1958 ;; Terminates man processing 1961;; (not (eq (caar command-history) 'man)))
1959 "Report formatting time." 1962;; (WoMan-getpage-in-background topic)
1960 (let* ((time (current-time)) 1963;; ;; Initiates man processing
1961 (time (+ (* (- (car time) (car WoMan-Man-start-time)) 65536) 1964;; (setq WoMan-Man-start-time (current-time))
1962 (- (cadr time) (cadr WoMan-Man-start-time))))) 1965;; ad-do-it))
1963 (message "Man formatting done in %d seconds" time))) 1966
1967;; (defadvice Man-bgproc-sentinel
1968;; (after Man-bgproc-sentinel-advice activate)
1969;; ;; Terminates man processing
1970;; "Report formatting time."
1971;; (let* ((time (current-time))
1972;; (time (+ (* (- (car time) (car WoMan-Man-start-time)) 65536)
1973;; (- (cadr time) (cadr WoMan-Man-start-time)))))
1974;; (message "Man formatting done in %d seconds" time)))
1964 1975
1965 1976
1966;;; Buffer handling: 1977;;; Buffer handling: