aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2006-04-19 16:23:46 +0000
committerKaroly Lorentey2006-04-19 16:23:46 +0000
commit447b0165acd09060977e05c843f81c0bee4aa4df (patch)
tree70cf2d254760a2cf68a10b67f8a3570c05fff9a5 /lisp
parent4c57cca724993ab1334cc5c0b35c22b06daee0c3 (diff)
parent0fea1d10293b4c6d35c1e55b68cd26e91445213c (diff)
downloademacs-447b0165acd09060977e05c843f81c0bee4aa4df.tar.gz
emacs-447b0165acd09060977e05c843f81c0bee4aa4df.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-216 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-217 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-218 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-219 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-220 Improve tq.el. * emacs@sv.gnu.org/emacs--devo--0--patch-221 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-222 Update from CVS: src/puresize.h (PURESIZE_RATIO): Reduce to 10/6. * emacs@sv.gnu.org/emacs--devo--0--patch-223 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-224 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-225 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-226 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-227 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-228 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-229 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-230 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-231 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-232 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-233 Update from CVS: lisp/progmodes/python.el (python-mode): Fix typo. * emacs@sv.gnu.org/gnus--rel--5.10--patch-84 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-85 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-86 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-550
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog224
-rw-r--r--lisp/abbrev.el15
-rw-r--r--lisp/allout.el1
-rw-r--r--lisp/apropos.el1
-rw-r--r--lisp/calendar/appt.el10
-rw-r--r--lisp/comint.el46
-rw-r--r--lisp/complete.el66
-rw-r--r--lisp/cus-edit.el38
-rw-r--r--lisp/custom.el5
-rw-r--r--lisp/emacs-lisp/edebug.el14
-rw-r--r--lisp/emacs-lisp/find-func.el8
-rw-r--r--lisp/emacs-lisp/tq.el96
-rw-r--r--lisp/env.el24
-rw-r--r--lisp/files.el25
-rw-r--r--lisp/gnus/ChangeLog56
-rw-r--r--lisp/gnus/flow-fill.el2
-rw-r--r--lisp/gnus/gmm-utils.el413
-rw-r--r--lisp/gnus/gnus-art.el1
-rw-r--r--lisp/gnus/gnus-group.el171
-rw-r--r--lisp/gnus/gnus-sum.el197
-rw-r--r--lisp/gnus/message.el161
-rw-r--r--lisp/gnus/mm-bodies.el13
-rw-r--r--lisp/gnus/mm-util.el121
-rw-r--r--lisp/help-mode.el1
-rw-r--r--lisp/image-mode.el6
-rw-r--r--lisp/imenu.el88
-rw-r--r--lisp/mh-e/ChangeLog179
-rw-r--r--lisp/mh-e/mh-acros.el12
-rw-r--r--lisp/mh-e/mh-comp.el7
-rw-r--r--lisp/mh-e/mh-compat.el25
-rw-r--r--lisp/mh-e/mh-e.el670
-rw-r--r--lisp/mh-e/mh-folder.el9
-rw-r--r--lisp/mh-e/mh-funcs.el2
-rw-r--r--lisp/mh-e/mh-gnus.el24
-rw-r--r--lisp/mh-e/mh-letter.el5
-rw-r--r--lisp/mh-e/mh-mime.el15
-rw-r--r--lisp/mh-e/mh-search.el14
-rw-r--r--lisp/mh-e/mh-seq.el4
-rw-r--r--lisp/mh-e/mh-show.el2
-rw-r--r--lisp/mh-e/mh-utils.el65
-rw-r--r--lisp/mh-e/mh-xface.el3
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp.el52
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/newcomment.el14
-rw-r--r--lisp/pcvs-parse.el4
-rw-r--r--lisp/progmodes/cc-langs.el3
-rw-r--r--lisp/progmodes/gdb-ui.el46
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/python.el8
-rw-r--r--lisp/progmodes/tcl.el17
-rw-r--r--lisp/subr.el3
-rw-r--r--lisp/textmodes/org.el394
-rw-r--r--lisp/textmodes/tex-mode.el28
-rw-r--r--lisp/time-stamp.el11
-rw-r--r--lisp/tooltip.el16
-rw-r--r--lisp/vc.el12
57 files changed, 2509 insertions, 947 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 32b8304044f..22690ba2694 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,225 @@
12006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * progmodes/python.el (python-mode): Fix typo.
4
52006-04-18 J.D. Smith <jdsmith@as.arizona.edu>
6
7 * comint.el (comint-previous-input): Don't clobber input line
8 when moving off either end of the input history ring.
9 (comint-delete-input): New function, used by
10 `comint-previous-input' and others.
11 (comint-previous-matching-input): Use
12 `coming-delete-input'. Save the partial input if leaving the
13 edit line. Goto point-max before deleting input to avoid
14 partial input fragments hanging around.
15 (comint-restore-input): New function, used by
16 `comint-previous-input', and bound to "C-c C-j".
17
182006-04-18 Luc Teirlinck <teirllm@auburn.edu>
19
20 * imenu.el (imenu--index-alist): Balance parentheses.
21
222006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
23
24 * progmodes/python.el (python-mode): Add support for
25 hs-minor-mode.
26
272006-04-19 Reiner Steib <Reiner.Steib@gmx.de>
28
29 * abbrev.el (read-abbrev-file): Use abbrev-file-name if optional
30 file is nil.
31
322006-04-18 Richard Stallman <rms@gnu.org>
33
34 * tooltip.el (tooltip-mode, tooltip-use-echo-area): Doc fixes.
35
36 * imenu.el (imenu-create-index-function, imenu--index-alist)
37 (imenu--last-menubar-index-alist, imenu--make-index-alist)
38 (imenu-default-create-index-function, imenu--generic-function):
39 Doc fixes.
40
41 * image-mode.el (image-toggle-display): Handle tar and arc subfiles.
42
43 * help-mode.el (help-mode): Set view-exit-action to delete window.
44
45 * env.el (setenv): Get rid of arg UNSET. Interactive unsetting
46 now works by passing nil as arg.
47
48 * apropos.el (apropos-print): Don't do where-is on self-insert-command.
49
50 * abbrev.el (edit-abbrevs-redefine): Temporarily widen.
51 (read-abbrev-file): Provide default when reading filename.
52
53 * files.el (enable-local-variables): Allow :all as value.
54 (hack-local-variables): Implement that value.
55 (safe-local-variable-values, safe-local-eval-forms)
56 (enable-local-variables): Mark as risky.
57 (find-file-visit-truename, kept-old-versions): Mark safe.
58
59 * time-stamp.el (time-stamp-format, time-stamp-line-limit)
60 (time-stamp-start, time-stamp-end, time-stamp-inserts-lines)
61 (time-stamp-count, time-stamp-pattern): Add safe-local-variable prop.
62
632006-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
64
65 * progmodes/tcl.el (tcl-send-string, tcl-send-region):
66 Use forward-line so as to get to BOL even in the presence of fields.
67 (tcl-eval-region): Strip surrounding space to avoid multiple prompts
68 in return.
69 (inferior-tcl): Tell tclsh to work in interactive mode.
70
71 * complete.el (partial-completion-mode):
72 Use 'choose-completion-string-functions to make sure that
73 choose-completion fills the minibuffer properly.
74
75 * complete.el (PC-old-read-file-name-internal): Remove.
76 (PC-read-include-file-name-internal): Remove. Turn it into an advice
77 of read-file-name-internal.
78 (partial-completion-mode): Enable/disable this advice.
79
802006-04-18 Juanma Barranquero <lekktu@gmail.com>
81
82 * net/tramp.el (tramp-completion-file-name-handler): Revert change
83 of 2006-04-17.
84
852006-04-18 Carsten Dominik <dominik@science.uva.nl>
86
87 * textmodes/org.el (org-insert-heading): Insert heading before
88 current if at beginning of line.
89 (org-todo, org-date): New faces.
90 (org-table-align): Make sure tooltip window contains full text.
91 (org-no-properties): New defsubst.
92 (org-set-font-lock-defaults): Use new faces.
93
942006-04-18 Nick Roberts <nickrob@snap.net.nz>
95
96 * progmodes/gud.el (gud-speedbar-item-info): Display frame address
97 for root variables.
98
99 * progmodes/gdb-ui.el (gdb-pc-address): Rename from gdb-frame-address.
100 (gdb-frame-address): Re-use to identify frame for watch expression.
101 (gdb-var-list, gdb-var-create-handler): Add frame address for root
102 variables.
103 (gdb-init-1, gdb-source, gdb-post-prompt, )
104 (gdb-assembler-custom, gdb-invalidate-assembler): Use gdb-pc-address.
105 (gdb-frame-handler): Get gdb-frame-address.
106
1072006-04-17 Michael Albinus <michael.albinus@gmx.de>
108
109 Sync with Tramp 2.0.53.
110
111 * net/tramp.el (tramp-completion-mode): ?\t has event-modifier
112 'control. Reported by Matthias F,bv(Brste <slashdevslashnull@gmx.net>.
113 (tramp-completion-file-name-handler): Add autoload cookie for
114 adding to `file-name-handler-alist'.
115
116 * net/tramp-smb.el (tramp-smb-wait-for-output): Wait always for
117 the prompt. If it returns earlier (when detecting an error
118 message), the rest of the output will merge accidently with the
119 output of the next command. Reported by M Jared Finder
120 <jared@hpalace.com>.
121
122 * net/tramp-vc.el (vc-user-login-name): Wrap defadvice with a test
123 for `process-file', in order to let it work for older Emacsen too.
124
1252006-04-17 Ralf Angeli <angeli@iwi.uni-sb.de>
126
127 * textmodes/tex-mode.el (tex-font-lock-match-suscript): New function.
128 (tex-font-lock-keywords-3): Use it.
129
1302006-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
131
132 * newcomment.el (comment-add): New function.
133 (comment-region-default, comment-dwim): Use it.
134
1352006-04-15 Michael Olson <mwolson@gnu.org>
136
137 * emacs-lisp/tq.el: Improve comments.
138 (tq-queue-head-question): New accessor function.
139 (tq-queue-head-regexp, tq-queue-head-closure, tq-queue-head-fn):
140 Update for modified queue structure.
141 (tq-queue-add): Accept `question' argument.
142 (tq-queue-pop): If a question is pending, send it.
143 (tq-enqueue): Accept new optional argument `delay-question'.
144 If this is non-nil, and at least one other question is pending a
145 response, queue the question rather than sending it immediately.
146
1472006-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
148
149 * calendar/appt.el (appt-add): Check whether an appointment is
150 already present in appt-time-msg-list. Simplify code.
151
1522006-04-14 Stefan Monnier <monnier@iro.umontreal.ca>
153
154 * progmodes/cc-langs.el (c-mode-menu):
155 Don't presume c-subword-mode is bound.
156
1572006-04-13 Bill Wohler <wohler@newt.com>
158
159 * cus-edit.el (customize-package-emacs-version-alist): Update docstring.
160 (customize-package-emacs-version): Use cdr instead of cadr now
161 that alists use dotted pairs.
162
163 * custom.el (defcustom): Fix docstring for :package-version.
164
1652006-04-13 Michael Albinus <michael.albinus@gmx.de>
166
167 * net/tramp.el (tramp-display-shell-command-buffer): New defvar.
168 (tramp-handle-shell-command): Display output buffer only when
169 `tramp-display-shell-command-buffer' is true.
170 (tramp-handle-process-file): Set `tramp-display-shell-command-buffer'.
171
1722006-04-13 Carsten Dominik <dominik@science.uva.nl>
173
174 * textmodes/org.el (org-set-autofill-regexps): Set only the local
175 values of `adaptive-fill-regexp' and `adaptive-fill-function'.
176
1772006-04-13 Romain Francoise <romain@orebokech.com>
178
179 * pcvs-parse.el (cvs-parse-table): Use `with-temp-buffer' to avoid
180 leaving temporary .cvsignore buffers behind.
181
1822006-04-13 Carsten Dominik <dominik@science.uva.nl>
183
184 * textmodes/org.el: (org-set-regexps-and-options)
185 (org-get-current-options): Better names for the startup folding
186 options.
187
1882006-04-13 Thien-Thi Nguyen <ttn@gnu.org>
189
190 * vc.el (vc-annotate): Arrange for point to end up at the same
191 line number as in the original, but only when using a new buffer.
192
1932006-04-12 Davis Herring <herring@lanl.gov> (tiny change)
194
195 * files.el (hack-one-local-variable-eval-safep):
196 Recognize `edebug-form-spec' for `put', but only if it passes
197 `edebug-basic-spec'. Generalize `put' handling.
198
199 * emacs-lisp/edebug.el (edebug-basic-spec): New function for
200 vetting file-local form specs.
201
202 * allout.el (allout-layout): Autoload its `safe-local-variable'
203 property.
204
2052006-04-13 Carsten Dominik <dominik@science.uva.nl>
206
207 * textmodes/org.el: (org-ctrl-c-ctrl-c): Improve documentation string.
208 (org-agenda-mouse-1-follows-link)
209 (org-mouse-1-follows-link): New options.
210 (org-format-agenda-item): Fix bug if TAGS is nil.
211 (org-agenda-get-scheduled): Quote `priority' symbol in plist.
212
2132006-04-13 Nick Roberts <nickrob@snap.net.nz>
214
215 * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers):
216 GDB 6.1+ gives full filename for "info sources" so use
217 file-name-nondirectory.
218
2192006-04-12 Romain Francoise <romain@orebokech.com>
220
221 * subr.el (read-passwd): Bind `message-log-max' to nil.
222
12006-04-12 Stefan Monnier <monnier@iro.umontreal.ca> 2232006-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 224
3 * progmodes/perl-mode.el (perl-indent-new-calculate): 225 * progmodes/perl-mode.el (perl-indent-new-calculate):
@@ -2835,7 +3057,7 @@
2835 (vc-default-update-changelog): Don't use vc-user-login-name, we 3057 (vc-default-update-changelog): Don't use vc-user-login-name, we
2836 don't need it here. 3058 don't need it here.
2837 3059
2838 * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is 3060 * net/tramp-vc.el (vc-user-login-name): Comment out defadvice, it is
2839 no longer necessary. 3061 no longer necessary.
2840 3062
28412006-01-25 Kenichi Handa <handa@m17n.org> 30632006-01-25 Kenichi Handa <handa@m17n.org>
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index d7bce2b313a..9ba53f6f6f5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -160,8 +160,10 @@ or may be omitted (it is usually omitted)."
160(defun edit-abbrevs-redefine () 160(defun edit-abbrevs-redefine ()
161 "Redefine abbrevs according to current buffer contents." 161 "Redefine abbrevs according to current buffer contents."
162 (interactive) 162 (interactive)
163 (define-abbrevs t) 163 (save-restriction
164 (set-buffer-modified-p nil)) 164 (widen)
165 (define-abbrevs t)
166 (set-buffer-modified-p nil)))
165 167
166(defun define-abbrevs (&optional arg) 168(defun define-abbrevs (&optional arg)
167 "Define abbrevs according to current visible buffer contents. 169 "Define abbrevs according to current visible buffer contents.
@@ -195,9 +197,12 @@ the ones defined from the buffer now."
195Optional argument FILE is the name of the file to read; 197Optional argument FILE is the name of the file to read;
196it defaults to the value of `abbrev-file-name'. 198it defaults to the value of `abbrev-file-name'.
197Optional second argument QUIETLY non-nil means don't display a message." 199Optional second argument QUIETLY non-nil means don't display a message."
198 (interactive "fRead abbrev file: ") 200 (interactive
199 (load (if (and file (> (length file) 0)) file abbrev-file-name) 201 (list
200 nil quietly) 202 (read-file-name (format "Read abbrev file (default %s): "
203 abbrev-file-name)
204 nil abbrev-file-name t)))
205 (load (or file abbrev-file-name) nil quietly)
201 (setq abbrevs-changed nil)) 206 (setq abbrevs-changed nil))
202 207
203(defun quietly-read-abbrev-file (&optional file) 208(defun quietly-read-abbrev-file (&optional file)
diff --git a/lisp/allout.el b/lisp/allout.el
index 31ed3a791ea..66c4b8681db 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -666,6 +666,7 @@ the layout used for the allout.el source file.)
666`allout-layout' can additionally have the value `t', in which 666`allout-layout' can additionally have the value `t', in which
667case the value of `allout-default-layout' is used.") 667case the value of `allout-default-layout' is used.")
668(make-variable-buffer-local 'allout-layout) 668(make-variable-buffer-local 'allout-layout)
669;;;###autoload
669(put 'allout-layout 'safe-local-variable t) 670(put 'allout-layout 'safe-local-variable t)
670 671
671;;;_ : Topic header format 672;;;_ : Topic header format
diff --git a/lisp/apropos.el b/lisp/apropos.el
index b490b8173ba..3889655ff99 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -908,6 +908,7 @@ If non-nil TEXT is a string that will be printed as a heading."
908 ;; Calculate key-bindings if we want them. 908 ;; Calculate key-bindings if we want them.
909 (and do-keys 909 (and do-keys
910 (commandp symbol) 910 (commandp symbol)
911 (not (eq symbol 'self-insert-command))
911 (indent-to 30 1) 912 (indent-to 30 1)
912 (if (let ((keys 913 (if (let ((keys
913 (save-excursion 914 (save-excursion
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index bce30a1de20..36934783b93 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -498,11 +498,11 @@ The time should be in either 24 hour format or am/pm format."
498 (interactive "sTime (hh:mm[am/pm]): \nsMessage: ") 498 (interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
499 (unless (string-match appt-time-regexp new-appt-time) 499 (unless (string-match appt-time-regexp new-appt-time)
500 (error "Unacceptable time-string")) 500 (error "Unacceptable time-string"))
501 (let* ((appt-time-string (concat new-appt-time " " new-appt-msg)) 501 (let ((time-msg (list (list (appt-convert-time new-appt-time))
502 (appt-time (list (appt-convert-time new-appt-time))) 502 (concat new-appt-time " " new-appt-msg) t)))
503 (time-msg (list appt-time appt-time-string t))) 503 (unless (member time-msg appt-time-msg-list)
504 (setq appt-time-msg-list (nconc appt-time-msg-list (list time-msg))) 504 (setq appt-time-msg-list
505 (setq appt-time-msg-list (appt-sort-list appt-time-msg-list)))) 505 (appt-sort-list (nconc appt-time-msg-list (list time-msg)))))))
506 506
507;;;###autoload 507;;;###autoload
508(defun appt-delete () 508(defun appt-delete ()
diff --git a/lisp/comint.el b/lisp/comint.el
index 5ab00354f80..a44e252ca97 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -465,6 +465,7 @@ executed once when the buffer is created."
465 (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring) 465 (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring)
466 (define-key map "\C-c\C-n" 'comint-next-prompt) 466 (define-key map "\C-c\C-n" 'comint-next-prompt)
467 (define-key map "\C-c\C-p" 'comint-previous-prompt) 467 (define-key map "\C-c\C-p" 'comint-previous-prompt)
468 (define-key map "\C-c\C-j" 'comint-restore-input)
468 (define-key map "\C-c\C-d" 'comint-send-eof) 469 (define-key map "\C-c\C-d" 'comint-send-eof)
469 (define-key map "\C-c\C-s" 'comint-write-output) 470 (define-key map "\C-c\C-s" 'comint-write-output)
470 (define-key map "\C-c." 'comint-insert-previous-argument) 471 (define-key map "\C-c." 'comint-insert-previous-argument)
@@ -558,6 +559,9 @@ This is to support the command \\[comint-get-next-from-history].")
558 "Non-nil if you are accumulating input lines to send as input together. 559 "Non-nil if you are accumulating input lines to send as input together.
559The command \\[comint-accumulate] sets this.") 560The command \\[comint-accumulate] sets this.")
560 561
562(defvar comint-stored-incomplete-input nil
563 "Stored input for history cycling.")
564
561(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand) 565(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand)
562(put 'comint-input-ring 'permanent-local t) 566(put 'comint-input-ring 'permanent-local t)
563(put 'comint-input-ring-index 'permanent-local t) 567(put 'comint-input-ring-index 'permanent-local t)
@@ -638,6 +642,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
638 (make-local-variable 'comint-scroll-to-bottom-on-input) 642 (make-local-variable 'comint-scroll-to-bottom-on-input)
639 (make-local-variable 'comint-move-point-for-output) 643 (make-local-variable 'comint-move-point-for-output)
640 (make-local-variable 'comint-scroll-show-maximum-output) 644 (make-local-variable 'comint-scroll-show-maximum-output)
645 (make-local-variable 'comint-stored-incomplete-input)
641 ;; This makes it really work to keep point at the bottom. 646 ;; This makes it really work to keep point at the bottom.
642 (make-local-variable 'scroll-conservatively) 647 (make-local-variable 'scroll-conservatively)
643 (setq scroll-conservatively 10000) 648 (setq scroll-conservatively 10000)
@@ -1015,6 +1020,16 @@ See also `comint-read-input-ring'."
1015 (t 1020 (t
1016 arg))) 1021 arg)))
1017 1022
1023(defun comint-restore-input ()
1024 "Restore unfinished input."
1025 (interactive)
1026 (when comint-input-ring-index
1027 (comint-delete-input)
1028 (when (> (length comint-stored-incomplete-input) 0)
1029 (insert comint-stored-incomplete-input)
1030 (message "Input restored"))
1031 (setq comint-input-ring-index nil)))
1032
1018(defun comint-search-start (arg) 1033(defun comint-search-start (arg)
1019 "Index to start a directional search, starting at `comint-input-ring-index'." 1034 "Index to start a directional search, starting at `comint-input-ring-index'."
1020 (if comint-input-ring-index 1035 (if comint-input-ring-index
@@ -1035,9 +1050,18 @@ Moves relative to `comint-input-ring-index'."
1035 arg))) 1050 arg)))
1036 1051
1037(defun comint-previous-input (arg) 1052(defun comint-previous-input (arg)
1038 "Cycle backwards through input history." 1053 "Cycle backwards through input history, saving input."
1039 (interactive "*p") 1054 (interactive "*p")
1040 (comint-previous-matching-input "." arg)) 1055 (if (and comint-input-ring-index
1056 (or ;; leaving the "end" of the ring
1057 (and (< arg 0) ; going down
1058 (eq comint-input-ring-index 0))
1059 (and (> arg 0) ; going up
1060 (eq comint-input-ring-index
1061 (1- (ring-length comint-input-ring)))))
1062 comint-stored-incomplete-input)
1063 (comint-restore-input)
1064 (comint-previous-matching-input "." arg)))
1041 1065
1042(defun comint-next-input (arg) 1066(defun comint-next-input (arg)
1043 "Cycle forwards through input history." 1067 "Cycle forwards through input history."
@@ -1077,6 +1101,14 @@ Moves relative to START, or `comint-input-ring-index'."
1077 (if (string-match regexp (ring-ref comint-input-ring n)) 1101 (if (string-match regexp (ring-ref comint-input-ring n))
1078 n))) 1102 n)))
1079 1103
1104(defun comint-delete-input ()
1105 "Delete all input between accumulation or process mark and point."
1106 (delete-region
1107 ;; Can't use kill-region as it sets this-command
1108 (or (marker-position comint-accum-marker)
1109 (process-mark (get-buffer-process (current-buffer))))
1110 (point-max)))
1111
1080(defun comint-previous-matching-input (regexp n) 1112(defun comint-previous-matching-input (regexp n)
1081 "Search backwards through input history for match for REGEXP. 1113 "Search backwards through input history for match for REGEXP.
1082\(Previous history elements are earlier commands.) 1114\(Previous history elements are earlier commands.)
@@ -1088,13 +1120,13 @@ If N is negative, find the next or Nth next match."
1088 ;; Has a match been found? 1120 ;; Has a match been found?
1089 (if (null pos) 1121 (if (null pos)
1090 (error "Not found") 1122 (error "Not found")
1123 ;; If leaving the edit line, save partial input
1124 (if (null comint-input-ring-index) ;not yet on ring
1125 (setq comint-stored-incomplete-input
1126 (funcall comint-get-old-input)))
1091 (setq comint-input-ring-index pos) 1127 (setq comint-input-ring-index pos)
1092 (message "History item: %d" (1+ pos)) 1128 (message "History item: %d" (1+ pos))
1093 (delete-region 1129 (comint-delete-input)
1094 ;; Can't use kill-region as it sets this-command
1095 (or (marker-position comint-accum-marker)
1096 (process-mark (get-buffer-process (current-buffer))))
1097 (point))
1098 (insert (ring-ref comint-input-ring pos))))) 1130 (insert (ring-ref comint-input-ring pos)))))
1099 1131
1100(defun comint-next-matching-input (regexp n) 1132(defun comint-next-matching-input (regexp n)
diff --git a/lisp/complete.el b/lisp/complete.el
index a50d02c41f0..6620db860c3 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -141,8 +141,6 @@ If nil, means use the colon-separated path in the variable $INCPATH instead."
141 "A list of the environment variable names and values.") 141 "A list of the environment variable names and values.")
142 142
143 143
144(defvar PC-old-read-file-name-internal nil)
145
146(defun PC-bindings (bind) 144(defun PC-bindings (bind)
147 (let ((completion-map minibuffer-local-completion-map) 145 (let ((completion-map minibuffer-local-completion-map)
148 (must-match-map minibuffer-local-must-match-map)) 146 (must-match-map minibuffer-local-must-match-map))
@@ -219,21 +217,32 @@ second TAB brings up the `*Completions*' buffer."
219 ((not PC-disable-includes) 217 ((not PC-disable-includes)
220 (add-hook 'find-file-not-found-functions 'PC-look-for-include-file))) 218 (add-hook 'find-file-not-found-functions 'PC-look-for-include-file)))
221 ;; ... with some underhand redefining. 219 ;; ... with some underhand redefining.
222 (cond ((and (not partial-completion-mode) 220 (cond ((not partial-completion-mode)
223 (functionp PC-old-read-file-name-internal)) 221 (ad-disable-advice 'read-file-name-internal 'around 'PC-include-file)
224 (fset 'read-file-name-internal PC-old-read-file-name-internal)) 222 (ad-activate 'read-file-name-internal))
225 ((and (not PC-disable-includes) (not PC-old-read-file-name-internal)) 223 ((not PC-disable-includes)
226 (setq PC-old-read-file-name-internal 224 (ad-enable-advice 'read-file-name-internal 'around 'PC-include-file)
227 (symbol-function 'read-file-name-internal)) 225 (ad-activate 'read-file-name-internal)))
228 (fset 'read-file-name-internal 226 ;; Adjust the completion selection in *Completion* buffers to the way
229 'PC-read-include-file-name-internal))) 227 ;; we work. The default minibuffer completion code only completes the
230 (when (and partial-completion-mode (null PC-env-vars-alist)) 228 ;; text before point and leaves the text after point alone (new in
231 (setq PC-env-vars-alist 229 ;; Emacs-22). In contrast we use the whole text and we even sometimes
232 (mapcar (lambda (string) 230 ;; move point to a place before EOB, to indicate the first position where
233 (let ((d (string-match "=" string))) 231 ;; there's a difference, so when the user uses choose-completion, we have
234 (cons (concat "$" (substring string 0 d)) 232 ;; to trick choose-completion into replacing the whole minibuffer text
235 (and d (substring string (1+ d)))))) 233 ;; rather than only the text before point. --Stef
236 process-environment)))) 234 (funcall
235 (if partial-completion-mode 'add-hook 'remove-hook)
236 'choose-completion-string-functions
237 (lambda (&rest x) (goto-char (point-max)) nil))
238 ;; Build the env-completion and mapping table.
239 (when (and partial-completion-mode (null PC-env-vars-alist))
240 (setq PC-env-vars-alist
241 (mapcar (lambda (string)
242 (let ((d (string-match "=" string)))
243 (cons (concat "$" (substring string 0 d))
244 (and d (substring string (1+ d))))))
245 process-environment))))
237 246
238 247
239(defun PC-complete () 248(defun PC-complete ()
@@ -930,20 +939,23 @@ absolute rather than relative to some directory on the SEARCH-PATH."
930 (setq sorted (cdr sorted))) 939 (setq sorted (cdr sorted)))
931 compressed)))) 940 compressed))))
932 941
933(defun PC-read-include-file-name-internal (string dir action) 942(defadvice read-file-name-internal (around PC-include-file disable)
934 (if (string-match "<\\([^\"<>]*\\)>?$" string) 943 (if (string-match "<\\([^\"<>]*\\)>?\\'" (ad-get-arg 0))
935 (let* ((name (substring string (match-beginning 1) (match-end 1))) 944 (let* ((string (ad-get-arg 0))
945 (action (ad-get-arg 2))
946 (name (substring string (match-beginning 1) (match-end 1)))
936 (str2 (substring string (match-beginning 0))) 947 (str2 (substring string (match-beginning 0)))
937 (completion-table 948 (completion-table
938 (mapcar (function (lambda (x) (list (format "<%s>" x)))) 949 (mapcar (lambda (x) (format "<%s>" x))
939 (PC-include-file-all-completions 950 (PC-include-file-all-completions
940 name (PC-include-file-path))))) 951 name (PC-include-file-path)))))
941 (cond 952 (setq ad-return-value
942 ((not completion-table) nil) 953 (cond
943 ((eq action nil) (try-completion str2 completion-table nil)) 954 ((not completion-table) nil)
944 ((eq action t) (all-completions str2 completion-table nil)) 955 ((eq action 'lambda) (test-completion str2 completion-table nil))
945 ((eq action 'lambda) (test-completion str2 completion-table nil)))) 956 ((eq action nil) (try-completion str2 completion-table nil))
946 (funcall PC-old-read-file-name-internal string dir action))) 957 ((eq action t) (all-completions str2 completion-table nil)))))
958 ad-do-it))
947 959
948 960
949(provide 'complete) 961(provide 'complete)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 4de2a431392..e68d2eab293 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1082,14 +1082,29 @@ Show the buffer in another window, but don't select it."
1082;; Packages will update this variable, so make it available. 1082;; Packages will update this variable, so make it available.
1083;;;###autoload 1083;;;###autoload
1084(defvar customize-package-emacs-version-alist nil 1084(defvar customize-package-emacs-version-alist nil
1085 "Alist that maps packages to alists of package to Emacs versions. 1085 "Alist mapping versions of Emacs to versions of a package.
1086The value alists map all package versions used with 1086These package versions are listed in the :package-version
1087the :package-version keyword to Emacs versions. Packages are 1087keyword used in `defcustom', `defgroup', and `defface'. Its
1088symbols and versions are strings. 1088elements look like this:
1089 1089
1090For example: 1090 (PACKAGE (PVERSION . EVERSION)...)
1091 '((MH-E (\"7.4\" \"22.1\") (\"8.0\" \"22.1\")) 1091
1092 (Gnus (\"5.11\" \"22.1\")))") 1092For each PACKAGE, which is a symbol, there are one or more
1093elements that contain a package version PVERSION with an
1094associated Emacs version EVERSION. These versions are strings.
1095For example, the MH-E package updates this alist with the
1096following:
1097
1098 (add-to-list 'customize-package-emacs-version-alist
1099 '(MH-E (\"6.0\" . \"22.1\") (\"6.1\" . \"22.1\")
1100 (\"7.0\" . \"22.1\") (\"7.1\" . \"22.1\")
1101 (\"7.2\" . \"22.1\") (\"7.3\" . \"22.1\")
1102 (\"7.4\" . \"22.1\") (\"8.0\" . \"22.1\")))
1103
1104The value of PACKAGE needs to be unique and it needs to match the
1105PACKAGE value appearing in the :package-version keyword. Since
1106the user might see the value in a error message, a good choice is
1107the official name of the package, such as MH-E or Gnus.")
1093 1108
1094;;;###autoload 1109;;;###autoload
1095(defalias 'customize-changed 'customize-changed-options) 1110(defalias 'customize-changed 'customize-changed-options)
@@ -1154,7 +1169,7 @@ that were added or redefined since that version."
1154 1169
1155(defun customize-package-emacs-version (symbol package-version) 1170(defun customize-package-emacs-version (symbol package-version)
1156 "Return Emacs version of SYMBOL. 1171 "Return Emacs version of SYMBOL.
1157PACKAGE-VERSION has the form (PACKAGE VERSION). The VERSION of 1172PACKAGE-VERSION has the form (PACKAGE . VERSION). The VERSION of
1158PACKAGE is looked up in the associated list 1173PACKAGE is looked up in the associated list
1159`customize-package-emacs-version-alist' to find the version of 1174`customize-package-emacs-version-alist' to find the version of
1160Emacs that is associated with it." 1175Emacs that is associated with it."
@@ -1167,9 +1182,10 @@ Emacs that is associated with it."
1167 ((setq package-versions (assq (car package-version) 1182 ((setq package-versions (assq (car package-version)
1168 customize-package-emacs-version-alist)) 1183 customize-package-emacs-version-alist))
1169 (setq emacs-version 1184 (setq emacs-version
1170 (cadr (assoc (cadr package-version) package-versions))) 1185 (cdr (assoc (cdr package-version) package-versions)))
1171 (unless emacs-version 1186 (unless emacs-version
1172 (message "Package version of %s not found in %s" symbol 1187 (message "%s version %s not found in %s" symbol
1188 (cdr package-version)
1173 "customize-package-emacs-version-alist"))) 1189 "customize-package-emacs-version-alist")))
1174 (t 1190 (t
1175 (message "Package %s neglected to update %s" 1191 (message "Package %s neglected to update %s"
diff --git a/lisp/custom.el b/lisp/custom.el
index cd97b425038..2ac1e23ac49 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -272,11 +272,14 @@ The following common keywords are also meaningful.
272 first introduced, or its default value was changed, in Emacs 272 first introduced, or its default value was changed, in Emacs
273 version VERSION. 273 version VERSION.
274:package-version 274:package-version
275 VALUE should be a list with the form (PACKAGE VERSION) 275 VALUE should be a list with the form (PACKAGE . VERSION)
276 specifying that the variable was first introduced, or its 276 specifying that the variable was first introduced, or its
277 default value was changed, in PACKAGE version VERSION. This 277 default value was changed, in PACKAGE version VERSION. This
278 keyword takes priority over :version. The PACKAGE and VERSION 278 keyword takes priority over :version. The PACKAGE and VERSION
279 must appear in the alist `customize-package-emacs-version-alist'. 279 must appear in the alist `customize-package-emacs-version-alist'.
280 Since PACKAGE must be unique and the user might see it in an
281 error message, a good choice is the official name of the
282 package, such as MH-E or Gnus.
280:tag LABEL 283:tag LABEL
281 Use LABEL, a string, instead of the item's name, to label the item 284 Use LABEL, a string, instead of the item's name, to label the item
282 in customization menus and buffers. 285 in customization menus and buffers.
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 444c310920d..d0be3a02f65 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -258,6 +258,20 @@ Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol
258 edebug-form-spec 258 edebug-form-spec
259 )) 259 ))
260 260
261;;;###autoload
262(defun edebug-basic-spec (spec)
263 "Return t if SPEC uses only extant spec symbols.
264An extant spec symbol is a symbol that is not a function and has a
265`edebug-form-spec' property."
266 (cond ((listp spec)
267 (catch 'basic
268 (while spec
269 (unless (edebug-basic-spec (car spec)) (throw 'basic nil))
270 (setq spec (cdr spec)))
271 t))
272 ((symbolp spec)
273 (unless (functionp spec) (get spec 'edebug-form-spec)))))
274
261;;; Utilities 275;;; Utilities
262 276
263;; Define edebug-gensym - from old cl.el 277;; Define edebug-gensym - from old cl.el
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 754ad9fdf19..5d504586323 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -228,6 +228,14 @@ The search is done in the source for library LIBRARY."
228 (with-syntax-table emacs-lisp-mode-syntax-table 228 (with-syntax-table emacs-lisp-mode-syntax-table
229 (goto-char (point-min)) 229 (goto-char (point-min))
230 (if (or (re-search-forward regexp nil t) 230 (if (or (re-search-forward regexp nil t)
231 ;; `regexp' matches definitions using known forms like
232 ;; `defun', or `defvar'. But some functions/variables
233 ;; are defined using special macros (or functions), so
234 ;; if `regexp' can't find the definition, we look for
235 ;; something of the form "(SOMETHING <symbol> ...)".
236 ;; This fails to distinguish function definitions from
237 ;; variable declarations (or even uses thereof), but is
238 ;; a good pragmatic fallback.
231 (re-search-forward 239 (re-search-forward
232 (concat "^([^ ]+" find-function-space-re "['(]?" 240 (concat "^([^ ]+" find-function-space-re "['(]?"
233 (regexp-quote (symbol-name symbol)) 241 (regexp-quote (symbol-name symbol))
diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el
index a4a22806d09..2126d7663fc 100644
--- a/lisp/emacs-lisp/tq.el
+++ b/lisp/emacs-lisp/tq.el
@@ -27,18 +27,56 @@
27 27
28;;; Commentary: 28;;; Commentary:
29 29
30;; manages receiving a stream asynchronously, 30;; This file manages receiving a stream asynchronously, parsing it
31;; parsing it into transactions, and then calling 31;; into transactions, and then calling the associated handler function
32;; handler functions 32;; upon the completion of each transaction.
33 33
34;; Our basic structure is the queue/process/buffer triple. Each entry 34;; Our basic structure is the queue/process/buffer triple. Each entry
35;; of the queue is a regexp/closure/function triple. We buffer 35;; of the queue part is a list of question, regexp, closure, and
36;; bytes from the process until we see the regexp at the head of the 36;; function that is consed to the last element.
37;; queue. Then we call the function with the closure and the 37
38;; collected bytes. 38;; A transaction queue may be created by calling `tq-create'.
39
40;; A request may be added to the queue by calling `tq-enqueue'. If
41;; the `delay-question' argument is non-nil, we will wait to send the
42;; question to the process until it has finished sending other input.
43;; Otherwise, once a request is enqueued, we send the given question
44;; immediately to the process.
45
46;; We then buffer bytes from the process until we see the regexp that
47;; was provided in the call to `tq-enqueue'. Then we call the
48;; provided function with the closure and the collected bytes. If we
49;; have indicated that the question from the next transaction was not
50;; sent immediately, send it at this point, awaiting the response.
39 51
40;;; Code: 52;;; Code:
41 53
54;;; Accessors
55
56;; This part looks like (queue . (process . buffer))
57(defun tq-queue (tq) (car tq))
58(defun tq-process (tq) (car (cdr tq)))
59(defun tq-buffer (tq) (cdr (cdr tq)))
60
61;; The structure of `queue' is as follows
62;; ((question regexp closure . fn)
63;; <other queue entries>)
64;; question: string to send to the process
65(defun tq-queue-head-question (tq) (car (car (tq-queue tq))))
66;; regexp: regular expression that matches the end of a response from
67;; the process
68(defun tq-queue-head-regexp (tq) (car (cdr (car (tq-queue tq)))))
69;; closure: additional data to pass to function
70(defun tq-queue-head-closure (tq) (car (cdr (cdr (car (tq-queue tq))))))
71;; fn: function to call upon receiving a complete response from the
72;; process
73(defun tq-queue-head-fn (tq) (cdr (cdr (cdr (car (tq-queue tq))))))
74
75;; Determine whether queue is empty
76(defun tq-queue-empty (tq) (not (tq-queue tq)))
77
78;;; Core functionality
79
42;;;###autoload 80;;;###autoload
43(defun tq-create (process) 81(defun tq-create (process)
44 "Create and return a transaction queue communicating with PROCESS. 82 "Create and return a transaction queue communicating with PROCESS.
@@ -54,33 +92,37 @@ to a tcp server on another machine."
54 (tq-filter ',tq string))) 92 (tq-filter ',tq string)))
55 tq)) 93 tq))
56 94
57;;; accessors 95(defun tq-queue-add (tq question re closure fn)
58(defun tq-queue (tq) (car tq))
59(defun tq-process (tq) (car (cdr tq)))
60(defun tq-buffer (tq) (cdr (cdr tq)))
61
62(defun tq-queue-add (tq re closure fn)
63 (setcar tq (nconc (tq-queue tq) 96 (setcar tq (nconc (tq-queue tq)
64 (cons (cons re (cons closure fn)) nil))) 97 (cons (cons question (cons re (cons closure fn))) nil)))
65 'ok) 98 'ok)
66 99
67(defun tq-queue-head-regexp (tq) (car (car (tq-queue tq)))) 100(defun tq-queue-pop (tq)
68(defun tq-queue-head-fn (tq) (cdr (cdr (car (tq-queue tq))))) 101 (setcar tq (cdr (car tq)))
69(defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq))))) 102 (let ((question (tq-queue-head-question tq)))
70(defun tq-queue-empty (tq) (not (tq-queue tq))) 103 (when question
71(defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq))) 104 (process-send-string (tq-process tq) question)))
105 (null (car tq)))
72 106
73 107(defun tq-enqueue (tq question regexp closure fn &optional delay-question)
74;;; must add to queue before sending!
75(defun tq-enqueue (tq question regexp closure fn)
76 "Add a transaction to transaction queue TQ. 108 "Add a transaction to transaction queue TQ.
77This sends the string QUESTION to the process that TQ communicates with. 109This sends the string QUESTION to the process that TQ communicates with.
78When the corresponding answer comes back, we call FN 110
79with two arguments: CLOSURE, and the answer to the question. 111When the corresponding answer comes back, we call FN with two
112arguments: CLOSURE, which may contain additional data that FN
113needs, and the answer to the question.
114
80REGEXP is a regular expression to match the entire answer; 115REGEXP is a regular expression to match the entire answer;
81that's how we tell where the answer ends." 116that's how we tell where the answer ends.
82 (tq-queue-add tq regexp closure fn) 117
83 (process-send-string (tq-process tq) question)) 118If DELAY-QUESTION is non-nil, delay sending this question until
119the process has finished replying to any previous questions.
120This produces more reliable results with some processes."
121 (let ((sendp (or (not delay-question)
122 (not (tq-queue-head-question tq)))))
123 (tq-queue-add tq (unless sendp question) regexp closure fn)
124 (when sendp
125 (process-send-string (tq-process tq) question))))
84 126
85(defun tq-close (tq) 127(defun tq-close (tq)
86 "Shut down transaction queue TQ, terminating the process." 128 "Shut down transaction queue TQ, terminating the process."
diff --git a/lisp/env.el b/lisp/env.el
index 22a86f13f3d..66d505ee011 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -94,15 +94,10 @@ Use `$$' to insert a single dollar sign."
94 94
95;; Fixme: Should the environment be recoded if LC_CTYPE &c is set? 95;; Fixme: Should the environment be recoded if LC_CTYPE &c is set?
96 96
97(defun setenv (variable &optional value unset substitute-env-vars frame) 97(defun setenv (variable &optional value substitute-env-vars frame)
98 "Set the value of the environment variable named VARIABLE to VALUE. 98 "Set the value of the environment variable named VARIABLE to VALUE.
99VARIABLE should be a string. VALUE is optional; if not provided or 99VARIABLE should be a string. VALUE is optional; if not provided or
100nil, the environment variable VARIABLE will be removed. 100nil, the environment variable VARIABLE will be removed.
101UNSET if non-nil means to remove VARIABLE from the environment.
102SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
103variables in VALUE with `substitute-env-vars', where see.
104Value is the new value if VARIABLE, or nil if removed from the
105environment.
106 101
107Interactively, a prefix argument means to unset the variable, and 102Interactively, a prefix argument means to unset the variable, and
108otherwise the current value (if any) of the variable appears at 103otherwise the current value (if any) of the variable appears at
@@ -116,6 +111,13 @@ modifying either `global-environment' or the environment
116belonging to the selected frame, depending on the value of 111belonging to the selected frame, depending on the value of
117`local-environment-variables'. 112`local-environment-variables'.
118 113
114SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
115variables in VALUE with `substitute-env-vars', which see.
116This is normally used only for interactive calls.
117
118The return value is the new value of VARIABLE, or nil if
119it was removed from the environment.
120
119If optional parameter FRAME is non-nil, then it should be a a 121If optional parameter FRAME is non-nil, then it should be a a
120frame. If the specified frame has its own set of environment 122frame. If the specified frame has its own set of environment
121variables, this function will modify VARIABLE in it. Note that 123variables, this function will modify VARIABLE in it. Note that
@@ -127,7 +129,7 @@ As a special case, setting variable `TZ' calls `set-time-zone-rule' as
127a side-effect." 129a side-effect."
128 (interactive 130 (interactive
129 (if current-prefix-arg 131 (if current-prefix-arg
130 (list (read-envvar-name "Clear environment variable: " 'exact) nil t) 132 (list (read-envvar-name "Clear environment variable: " 'exact) nil)
131 (let* ((var (read-envvar-name "Set environment variable: " nil)) 133 (let* ((var (read-envvar-name "Set environment variable: " nil))
132 (value (getenv var))) 134 (value (getenv var)))
133 (when value 135 (when value
@@ -137,7 +139,6 @@ a side-effect."
137 (read-from-minibuffer (format "Set %s to value: " var) 139 (read-from-minibuffer (format "Set %s to value: " var)
138 nil nil nil 'setenv-history 140 nil nil nil 'setenv-history
139 value) 141 value)
140 nil
141 t)))) 142 t))))
142 (if (and (multibyte-string-p variable) locale-coding-system) 143 (if (and (multibyte-string-p variable) locale-coding-system)
143 (let ((codings (find-coding-systems-string (concat variable value)))) 144 (let ((codings (find-coding-systems-string (concat variable value))))
@@ -145,10 +146,9 @@ a side-effect."
145 (memq (coding-system-base locale-coding-system) codings)) 146 (memq (coding-system-base locale-coding-system) codings))
146 (error "Can't encode `%s=%s' with `locale-coding-system'" 147 (error "Can't encode `%s=%s' with `locale-coding-system'"
147 variable (or value ""))))) 148 variable (or value "")))))
148 (if unset 149 (and value
149 (setq value nil) 150 substitute-env-vars
150 (if substitute-env-vars 151 (setq value (substitute-env-vars value)))
151 (setq value (substitute-env-vars value))))
152 (if (multibyte-string-p variable) 152 (if (multibyte-string-p variable)
153 (setq variable (encode-coding-string variable locale-coding-system))) 153 (setq variable (encode-coding-string variable locale-coding-system)))
154 (if (and value (multibyte-string-p value)) 154 (if (and value (multibyte-string-p value))
diff --git a/lisp/files.el b/lisp/files.el
index 440f2ea4f27..10cdb473045 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -452,6 +452,8 @@ not safe, Emacs queries you, once, whether to set them all.
452\(When you say yes to certain values, they are remembered as safe.) 452\(When you say yes to certain values, they are remembered as safe.)
453 453
454:safe means set the safe variables, and ignore the rest. 454:safe means set the safe variables, and ignore the rest.
455:all means set all variables, whether safe or not.
456 (Don't set it permanently to :all.)
455nil means always ignore the file local variables. 457nil means always ignore the file local variables.
456 458
457Any other value means always query you once whether to set them all. 459Any other value means always query you once whether to set them all.
@@ -464,8 +466,9 @@ a -*- line.
464The command \\[normal-mode], when used interactively, 466The command \\[normal-mode], when used interactively,
465always obeys file local variable specifications and the -*- line, 467always obeys file local variable specifications and the -*- line,
466and ignores this variable." 468and ignores this variable."
467 :type '(choice (const :tag "Obey" t) 469 :type '(choice (const :tag "Query Unsafe" t)
468 (const :tag "Safe Only" :safe) 470 (const :tag "Safe Only" :safe)
471 (const :tag "Do all" :all)
469 (const :tag "Ignore" nil) 472 (const :tag "Ignore" nil)
470 (other :tag "Query" other)) 473 (other :tag "Query" other))
471 :group 'find-file) 474 :group 'find-file)
@@ -2283,6 +2286,7 @@ asking you for confirmation."
2283 default-text-properties 2286 default-text-properties
2284 display-time-string 2287 display-time-string
2285 enable-local-eval 2288 enable-local-eval
2289 enable-local-variables
2286 eval 2290 eval
2287 exec-directory 2291 exec-directory
2288 exec-path 2292 exec-path
@@ -2319,6 +2323,8 @@ asking you for confirmation."
2319 parse-time-rules 2323 parse-time-rules
2320 process-environment 2324 process-environment
2321 rmail-output-file-alist 2325 rmail-output-file-alist
2326 safe-local-variable-values
2327 safe-local-eval-forms
2322 save-some-buffers-action-alist 2328 save-some-buffers-action-alist
2323 special-display-buffer-names 2329 special-display-buffer-names
2324 standard-input 2330 standard-input
@@ -2356,9 +2362,11 @@ asking you for confirmation."
2356 (c-indent-level . integerp) 2362 (c-indent-level . integerp)
2357 (comment-column . integerp) 2363 (comment-column . integerp)
2358 (compile-command . string-or-null-p) 2364 (compile-command . string-or-null-p)
2365 (find-file-visit-truename . t)
2359 (fill-column . integerp) 2366 (fill-column . integerp)
2360 (fill-prefix . string-or-null-p) 2367 (fill-prefix . string-or-null-p)
2361 (indent-tabs-mode . t) 2368 (indent-tabs-mode . t)
2369 (kept-old-versions . integerp)
2362 (kept-new-versions . integerp) 2370 (kept-new-versions . integerp)
2363 (left-margin . t) 2371 (left-margin . t)
2364 (no-byte-compile . t) 2372 (no-byte-compile . t)
@@ -2631,6 +2639,7 @@ is specified, returning t if it is specified."
2631 (if (or (and (eq enable-local-variables t) 2639 (if (or (and (eq enable-local-variables t)
2632 (null unsafe-vars) 2640 (null unsafe-vars)
2633 (null risky-vars)) 2641 (null risky-vars))
2642 (eq enable-local-variables :all)
2634 (hack-local-variables-confirm 2643 (hack-local-variables-confirm
2635 result unsafe-vars risky-vars)) 2644 result unsafe-vars risky-vars))
2636 (dolist (elt result) 2645 (dolist (elt result)
@@ -2690,12 +2699,14 @@ It is dangerous if either of these conditions are met:
2690 (and (eq (car exp) 'put) 2699 (and (eq (car exp) 'put)
2691 (hack-one-local-variable-quotep (nth 1 exp)) 2700 (hack-one-local-variable-quotep (nth 1 exp))
2692 (hack-one-local-variable-quotep (nth 2 exp)) 2701 (hack-one-local-variable-quotep (nth 2 exp))
2693 (memq (nth 1 (nth 2 exp)) 2702 (let ((prop (nth 1 (nth 2 exp))) (val (nth 3 exp)))
2694 '(lisp-indent-hook)) 2703 (cond ((eq prop 'lisp-indent-hook)
2695 ;; Only allow safe values of lisp-indent-hook; 2704 ;; Only allow safe values of lisp-indent-hook;
2696 ;; not functions. 2705 ;; not functions.
2697 (or (numberp (nth 3 exp)) 2706 (or (numberp val) (equal val ''defun)))
2698 (equal (nth 3 exp) ''defun))) 2707 ((eq prop 'edebug-form-spec)
2708 ;; Only allow indirect form specs.
2709 (edebug-basic-spec val)))))
2699 ;; Allow expressions that the user requested. 2710 ;; Allow expressions that the user requested.
2700 (member exp safe-local-eval-forms) 2711 (member exp safe-local-eval-forms)
2701 ;; Certain functions can be allowed with safe arguments 2712 ;; Certain functions can be allowed with safe arguments
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 792fb2a5c0d..09dbe9e0027 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,52 @@
12006-04-17 Reiner Steib <Reiner.Steib@gmx.de>
2
3 [ Merge from Gnus trunk. ]
4
5 * mm-util.el (mm-charset-synonym-alist): Improve doc string.
6 (mm-charset-override-alist): New variable.
7 (mm-charset-to-coding-system): Use it.
8 (mm-codepage-setup): New helper function.
9 (mm-charset-eval-alist): New variable.
10 (mm-charset-to-coding-system): Use mm-charset-eval-alist. Warn
11 about unknown charsets. Add allow-override. Use
12 `mm-charset-override-alist' only when decoding.
13 (mm-detect-mime-charset-region): Use :mime-charset.
14
15 * mm-bodies.el (mm-decode-body, mm-decode-string): Call
16 `mm-charset-to-coding-system' with allow-override argument.
17
18 * message.el (message-tool-bar-zap-list, message-tool-bar)
19 (message-tool-bar-gnome, message-tool-bar-retro): New variables.
20 (message-tool-bar-local-item-from-menu): Remove.
21 (message-tool-bar-map): Replace by `message-make-tool-bar'.
22 (message-make-tool-bar): New function.
23 (message-mode): Use `message-make-tool-bar'.
24
25 * gnus-sum.el (gnus-summary-tool-bar)
26 (gnus-summary-tool-bar-gnome, gnus-summary-tool-bar-retro)
27 (gnus-summary-tool-bar-zap-list): New variables.
28 (gnus-summary-make-tool-bar): Complete rewrite using
29 `gmm-tool-bar-from-list'.
30
31 * gnus-group.el (gnus-group-tool-bar, gnus-group-tool-bar-gnome)
32 (gnus-group-tool-bar-retro, gnus-group-tool-bar-zap-list): New
33 variables.
34 (gnus-group-make-tool-bar): Complete rewrite using
35 `gmm-tool-bar-from-list'.
36 (gnus-group-tool-bar-update): New function.
37
38 * gmm-utils.el: New file.
39
402006-04-12 Ralf Angeli <angeli@iwi.uni-sb.de>
41
42 * flow-fill.el (fill-flowed): Remove trailing space from blank
43 quoted lines.
44
452006-04-12 Reiner Steib <Reiner.Steib@gmx.de>
46
47 * gnus-art.el (gnus-article-mode): Set
48 cursor-in-non-selected-windows to nil.
49
12006-04-12 Katsumi Yamaoka <yamaoka@jpl.org> 502006-04-12 Katsumi Yamaoka <yamaoka@jpl.org>
2 51
3 * gnus-art.el (gnus-mime-view-part-as-charset): Ignore charset 52 * gnus-art.el (gnus-mime-view-part-as-charset): Ignore charset
@@ -12,13 +61,6 @@
12 * gnus-uu.el (gnus-uu-save-article): Put mml tags instead of part 61 * gnus-uu.el (gnus-uu-save-article): Put mml tags instead of part
13 tag to summarized topics part in order to encode non-ASCII text. 62 tag to summarized topics part in order to encode non-ASCII text.
14 63
152006-04-12 Kenichi Handa <handa@m17n.org>
16
17 * rfc2231.el (rfc2231-decode-encoded-string): Work on unibyte
18 buffer and then decode the buffer text if necessary.
19 (rfc2231-encode-string): Be sure to work on multibyte buffer at
20 first, and after mm-encode-body, change the buffer to unibyte.
21
222006-04-11 Reiner Steib <Reiner.Steib@gmx.de> 642006-04-11 Reiner Steib <Reiner.Steib@gmx.de>
23 65
24 * gnus-art.el (gnus-button-valid-localpart-regexp): Exclude `@'. 66 * gnus-art.el (gnus-button-valid-localpart-regexp): Exclude `@'.
diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el
index 98697439106..b47e9ba8365 100644
--- a/lisp/gnus/flow-fill.el
+++ b/lisp/gnus/flow-fill.el
@@ -114,7 +114,7 @@ RFC 2646 suggests 66 characters for readability."
114 (set-buffer (or (current-buffer) buffer)) 114 (set-buffer (or (current-buffer) buffer))
115 (goto-char (point-min)) 115 (goto-char (point-min))
116 ;; Remove space stuffing. 116 ;; Remove space stuffing.
117 (while (re-search-forward "^ " nil t) 117 (while (re-search-forward "^\\( \\|>+ $\\)" nil t)
118 (delete-char -1) 118 (delete-char -1)
119 (forward-line 1)) 119 (forward-line 1))
120 (goto-char (point-min)) 120 (goto-char (point-min))
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
new file mode 100644
index 00000000000..4db811053ec
--- /dev/null
+++ b/lisp/gnus/gmm-utils.el
@@ -0,0 +1,413 @@
1;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
2
3;; Copyright (C) 2006 Free Software Foundation, Inc.
4
5;; Author: Reiner Steib <reiner.steib@gmx.de>
6;; Keywords: news
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23;; Boston, MA 02110-1301, USA.
24
25;;; Commentary:
26
27;; This library provides self-contained utility functions. The functions are
28;; used in Gnus, Message and MML, but within this library there are no
29;; dependencies on Gnus, Message, or MML or Gnus.
30
31;;; Code:
32
33;; (require 'wid-edit)
34
35(defgroup gmm nil
36 "Utility functions for Gnus, Message and MML"
37 :prefix "gmm-"
38 :version "23.0" ;; No Gnus
39 :group 'lisp)
40
41;; Helper functions from `gnus-utils.el': gmm-verbose, gmm-message, gmm-error
42
43(defcustom gmm-verbose 7
44 "Integer that says how verbose gmm should be.
45The higher the number, the more messages will flash to say what
46it done. At zero, it will be totally mute; at five, it will
47display most important messages; and at ten, it will keep on
48jabbering all the time."
49 :type 'integer
50 :group 'gmm)
51
52;;;###autoload
53(defun gmm-message (level &rest args)
54 "If LEVEL is lower than `gmm-verbose' print ARGS using `message'.
55
56Guideline for numbers:
571 - error messages, 3 - non-serious error messages, 5 - messages for things
58that take a long time, 7 - not very important messages on stuff, 9 - messages
59inside loops."
60 (if (<= level gmm-verbose)
61 (apply 'message args)
62 ;; We have to do this format thingy here even if the result isn't
63 ;; shown - the return value has to be the same as the return value
64 ;; from `message'.
65 (apply 'format args)))
66
67;;;###autoload
68(defun gmm-error (level &rest args)
69 "Beep an error if LEVEL is equal to or less than `gmm-verbose'.
70ARGS are passed to `message'."
71 (when (<= (floor level) gmm-verbose)
72 (apply 'message args)
73 (ding)
74 (let (duration)
75 (when (and (floatp level)
76 (not (zerop (setq duration (* 10 (- level (floor level)))))))
77 (sit-for duration))))
78 nil)
79
80;;;###autoload
81(defun gmm-widget-p (symbol)
82 "Non-nil iff SYMBOL is a widget."
83 (get symbol 'widget-type))
84
85;; Copy of the `nnmail-lazy' code from `nnmail.el':
86(define-widget 'gmm-lazy 'default
87 "Base widget for recursive datastructures.
88
89This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility."
90 :format "%{%t%}: %v"
91 :convert-widget 'widget-value-convert-widget
92 :value-create (lambda (widget)
93 (let ((value (widget-get widget :value))
94 (type (widget-get widget :type)))
95 (widget-put widget :children
96 (list (widget-create-child-value
97 widget (widget-convert type) value)))))
98 :value-delete 'widget-children-value-delete
99 :value-get (lambda (widget)
100 (widget-value (car (widget-get widget :children))))
101 :value-inline (lambda (widget)
102 (widget-apply (car (widget-get widget :children))
103 :value-inline))
104 :default-get (lambda (widget)
105 (widget-default-get
106 (widget-convert (widget-get widget :type))))
107 :match (lambda (widget value)
108 (widget-apply (widget-convert (widget-get widget :type))
109 :match value))
110 :validate (lambda (widget)
111 (widget-apply (car (widget-get widget :children)) :validate)))
112
113;; Note: The format of `gmm-tool-bar-item' may change if some future Emacs
114;; version will provide customizable tool bar buttons using a different
115;; interface.
116
117;; TODO: Extend API so that the "Command" entry can be a function or a plist.
118;; In case of a list it should have the format...
119;;
120;; (:none command-without-modifier
121;; :shift command-with-shift-pressed
122;; :control command-with-ctrl-pressed
123;; :control-shift command-with-control-and-shift-pressed
124;; ;; mouse-2 and mouse-3 can't be used in Emacs yet.
125;; :mouse-2 command-on-mouse-2-press
126;; :mouse-3 command-on-mouse-3-press) ;; typically a menu of related commands
127;;
128;; Combinations of mouse-[23] plus shift and/or controll might be overkill.
129;;
130;; Then use (plist-get rs-command :none), (plist-get rs-command :shift)
131
132(define-widget 'gmm-tool-bar-item (if (gmm-widget-p 'lazy) 'lazy 'gmm-lazy)
133 "Tool bar list item."
134 :tag "Tool bar item"
135 :type '(choice
136 (list :tag "Command and Icon"
137 (function :tag "Command")
138 (string :tag "Icon file")
139 (choice
140 (const :tag "Default map" nil)
141 ;; Note: Usually we need non-nil attributes if map is t.
142 (const :tag "No menu" t)
143 (sexp :tag "Other map"))
144 (plist :inline t :tag "Properties"))
145 (list :tag "Separator"
146 (const :tag "No command" gmm-ignore)
147 (string :tag "Icon file")
148 (const :tag "No map")
149 (plist :inline t :tag "Properties"))))
150
151(define-widget 'gmm-tool-bar-zap-list (if (gmm-widget-p 'lazy) 'lazy 'gmm-lazy)
152 "Tool bar zap list."
153 :tag "Tool bar zap list"
154 :type '(choice (const :tag "Zap all" t)
155 (const :tag "Keep all" nil)
156 (list
157 ;; :value
158 ;; Work around (bug in customize?), see
159 ;; <news:v9is48jrj1.fsf@marauder.physik.uni-ulm.de>
160 ;; (new-file open-file dired kill-buffer write-file
161 ;; print-buffer customize help)
162 (set :inline t
163 (const new-file)
164 (const open-file)
165 (const dired)
166 (const kill-buffer)
167 (const save-buffer)
168 (const write-file)
169 (const undo)
170 (const cut)
171 (const copy)
172 (const paste)
173 (const search-forward)
174 (const print-buffer)
175 (const customize)
176 (const help))
177 (repeat :inline t
178 :tag "Other"
179 (symbol :tag "Icon item")))))
180
181;; (defun gmm-color-cells (&optional display)
182;; "Return the number of color cells supported by DISPLAY.
183;; Compatibility function."
184;; ;; `display-color-cells' doesn't return more than 256 even if color depth is
185;; ;; > 8 in Emacs 21.
186;; ;;
187;; ;; Feel free to add proper XEmacs support.
188;; (let* ((cells (and (fboundp 'display-color-cells)
189;; (display-color-cells display)))
190;; (plane (and (fboundp 'x-display-planes)
191;; (ash 1 (x-display-planes))))
192;; (none -1))
193;; (max (if (integerp cells) cells none)
194;; (if (integerp plane) plane none))))
195
196(defcustom gmm-tool-bar-style
197 (if (and (boundp 'tool-bar-mode)
198 tool-bar-mode
199 (and (fboundp 'display-visual-class)
200 (not (memq (display-visual-class)
201 (list 'static-gray 'gray-scale
202 'static-color 'pseudo-color)))))
203 'gnome
204 'retro)
205 "Prefered tool bar style."
206 :type '(choice (const :tag "GNOME style" 'gnome)
207 (const :tag "Retro look" 'retro))
208 :group 'gmm)
209
210(defvar tool-bar-map)
211
212;;;###autoload
213(defun gmm-tool-bar-from-list (icon-list zap-list default-map)
214 "Make a tool bar from ICON-LIST.
215
216Within each entry of ICON-LIST, the first element is a menu
217command, the second element is an icon file name and the third
218element is a test function. You can use \\[describe-key]
219<menu-entry> to find out the name of a menu command. The fourth
220and all following elements are passed a the PROPS argument to the
221function `tool-bar-local-item'.
222
223If ZAP-LIST is a list, remove those item from the default
224`tool-bar-map'. If it is t, start with a new sparse map. You
225can use \\[describe-key] <icon> to find out the name of an icon
226item. When \\[describe-key] <icon> shows \"<tool-bar> <new-file>
227runs the command find-file\", then use `new-file' in ZAP-LIST.
228
229DEFAULT-MAP specifies the default key map for ICON-LIST."
230 (let (;; For Emacs 21, we must let-bind `tool-bar-map'. In Emacs 22, we
231 ;; could use some other local variable.
232 (tool-bar-map (if (eq zap-list t)
233 (make-sparse-keymap)
234 (copy-keymap tool-bar-map))))
235 (when (listp zap-list)
236 ;; Zap some items which aren't relevant for this mode and take up space.
237 (dolist (key zap-list)
238 (define-key tool-bar-map (vector key) nil)))
239 (mapc (lambda (el)
240 (let ((command (car el))
241 (icon (nth 1 el))
242 (fmap (or (nth 2 el) default-map))
243 (props (cdr (cdr (cdr el)))) )
244 ;; command may stem from different from-maps:
245 (cond ((eq command 'gmm-ignore)
246 ;; The dummy `gmm-ignore', see `gmm-tool-bar-item'
247 ;; widget. Suppress tooltip by adding `:enable nil'.
248 (if (fboundp 'tool-bar-local-item)
249 (apply 'tool-bar-local-item icon nil nil
250 tool-bar-map :enable nil props)
251 ;; (tool-bar-local-item ICON DEF KEY MAP &rest PROPS)
252 ;; (tool-bar-add-item ICON DEF KEY &rest PROPS)
253 (apply 'tool-bar-add-item icon nil nil :enable nil props)))
254 ((equal fmap t) ;; Not a menu command
255 (if (fboundp 'tool-bar-local-item)
256 (apply 'tool-bar-local-item
257 icon command
258 (intern icon) ;; reuse icon or fmap here?
259 tool-bar-map props)
260 ;; Emacs 21 compatibility:
261 (apply 'tool-bar-add-item
262 icon command
263 (intern icon)
264 props)))
265 (t ;; A menu command
266 (if (fboundp 'tool-bar-local-item-from-menu)
267 (apply 'tool-bar-local-item-from-menu
268 ;; (apply 'tool-bar-local-item icon def key
269 ;; tool-bar-map props)
270 command icon tool-bar-map (symbol-value fmap)
271 props)
272 ;; Emacs 21 compatibility:
273 (apply 'tool-bar-add-item-from-menu
274 command icon (symbol-value fmap)
275 props))))
276 t))
277 (if (symbolp icon-list)
278 (eval icon-list)
279 icon-list))
280 tool-bar-map))
281
282;; WARNING: The following is subject to change. Don't rely on it yet.
283
284;; From MH-E without modifications:
285
286(defmacro gmm-defun-compat (name function arg-list &rest body)
287 "Create function NAME.
288If FUNCTION exists, then NAME becomes an alias for FUNCTION.
289Otherwise, create function NAME with ARG-LIST and BODY."
290 (let ((defined-p (fboundp function)))
291 (if defined-p
292 `(defalias ',name ',function)
293 `(defun ,name ,arg-list ,@body))))
294
295(gmm-defun-compat gmm-image-search-load-path
296 image-search-load-path (file &optional path)
297 "Emacs 21 and XEmacs don't have `image-search-load-path'.
298This function returns nil on those systems."
299 nil)
300
301;; From MH-E with modifications:
302
303;; Don't use `gmm-defun-compat' until API changes in
304;; `image-load-path-for-library' in Emacs CVS are completed.
305
306(defun gmm-image-load-path-for-library (library image &optional path no-error)
307 "Return a suitable search path for images relative to LIBRARY.
308
309First it searches for IMAGE in `image-load-path' (excluding
310\"`data-directory'/images\") and `load-path', followed by a path
311suitable for LIBRARY, which includes \"../../etc/images\" and
312\"../etc/images\" relative to the library file itself, and then
313in \"`data-directory'/images\".
314
315Then this function returns a list of directories which contains
316first the directory in which IMAGE was found, followed by the
317value of `load-path'. If PATH is given, it is used instead of
318`load-path'.
319
320If NO-ERROR is non-nil and a suitable path can't be found, don't
321signal an error. Instead, return a list of directories as before,
322except that nil appears in place of the image directory.
323
324Here is an example that uses a common idiom to provide
325compatibility with versions of Emacs that lack the variable
326`image-load-path':
327
328 ;; Shush compiler.
329 (defvar image-load-path)
330
331 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
332 (image-load-path (cons (car load-path)
333 (when (boundp 'image-load-path)
334 image-load-path))))
335 (mh-tool-bar-folder-buttons-init))"
336 (unless library (error "No library specified"))
337 (unless image (error "No image specified"))
338 (let (image-directory image-directory-load-path)
339 ;; Check for images in image-load-path or load-path.
340 (let ((img image)
341 (dir (or
342 ;; Images in image-load-path.
343 (gmm-image-search-load-path image) ;; "gmm-" prefix!
344 ;; Images in load-path.
345 (locate-library image)))
346 parent)
347 ;; Since the image might be in a nested directory (for
348 ;; example, mail/attach.pbm), adjust `image-directory'
349 ;; accordingly.
350 (when dir
351 (setq dir (file-name-directory dir))
352 (while (setq parent (file-name-directory img))
353 (setq img (directory-file-name parent)
354 dir (expand-file-name "../" dir))))
355 (setq image-directory-load-path dir))
356
357 ;; If `image-directory-load-path' isn't Emacs' image directory,
358 ;; it's probably a user preference, so use it. Then use a
359 ;; relative setting if possible; otherwise, use
360 ;; `image-directory-load-path'.
361 (cond
362 ;; User-modified image-load-path?
363 ((and image-directory-load-path
364 (not (equal image-directory-load-path
365 (file-name-as-directory
366 (expand-file-name "images" data-directory)))))
367 (setq image-directory image-directory-load-path))
368 ;; Try relative setting.
369 ((let (library-name d1ei d2ei)
370 ;; First, find library in the load-path.
371 (setq library-name (locate-library library))
372 (if (not library-name)
373 (error "Cannot find library %s in load-path" library))
374 ;; And then set image-directory relative to that.
375 (setq
376 ;; Go down 2 levels.
377 d2ei (file-name-as-directory
378 (expand-file-name
379 (concat (file-name-directory library-name) "../../etc/images")))
380 ;; Go down 1 level.
381 d1ei (file-name-as-directory
382 (expand-file-name
383 (concat (file-name-directory library-name) "../etc/images"))))
384 (setq image-directory
385 ;; Set it to nil if image is not found.
386 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
387 ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
388 ;; Use Emacs' image directory.
389 (image-directory-load-path
390 (setq image-directory image-directory-load-path))
391 (no-error
392 (message "Could not find image %s for library %s" image library))
393 (t
394 (error "Could not find image %s for library %s" image library)))
395
396 ;; Return an augmented `path' or `load-path'.
397 (nconc (list image-directory)
398 (delete image-directory (copy-sequence (or path load-path))))))
399
400(defun gmm-customize-mode (&optional mode)
401 "Customize customization group for MODE.
402If mode is nil, use `major-mode' of the curent buffer."
403 (interactive)
404 (customize-group
405 (or mode
406 (intern (let ((mode (symbol-name major-mode)))
407 (string-match "^\\(.+\\)-mode$" mode)
408 (match-string 1 mode))))))
409
410(provide 'gmm-utils)
411
412;; arch-tag: e0b60920-2ce6-40c1-bfc0-cadbbe26b602
413;;; gmm-utils.el ends here
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index a4da4ae85f3..7e3b843d500 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3809,6 +3809,7 @@ commands:
3809 (make-local-variable 'gnus-article-ignored-charsets) 3809 (make-local-variable 'gnus-article-ignored-charsets)
3810 ;; Prevent recent Emacsen from displaying non-break space as "\ ". 3810 ;; Prevent recent Emacsen from displaying non-break space as "\ ".
3811 (set (make-local-variable 'nobreak-char-display) nil) 3811 (set (make-local-variable 'nobreak-char-display) nil)
3812 (setq cursor-in-non-selected-windows nil)
3812 (gnus-set-default-directory) 3813 (gnus-set-default-directory)
3813 (buffer-disable-undo) 3814 (buffer-disable-undo)
3814 (setq buffer-read-only t) 3815 (setq buffer-read-only t)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 24e4df14712..51af7d48d9c 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -39,6 +39,7 @@
39(require 'gnus-range) 39(require 'gnus-range)
40(require 'gnus-win) 40(require 'gnus-win)
41(require 'gnus-undo) 41(require 'gnus-undo)
42(require 'gmm-utils)
42(require 'time-date) 43(require 'time-date)
43(require 'gnus-ems) 44(require 'gnus-ems)
44 45
@@ -979,36 +980,135 @@ simple manner.")
979 980
980 (gnus-run-hooks 'gnus-group-menu-hook))) 981 (gnus-run-hooks 'gnus-group-menu-hook)))
981 982
982(defvar gnus-group-toolbar-map nil) 983
983 984(defvar gnus-group-tool-bar-map nil)
984;; Emacs 21 tool bar. Should be no-op otherwise. 985
985(defun gnus-group-make-tool-bar () 986(defun gnus-group-tool-bar-update (&optional symbol value)
986 (if (and 987 "Update group buffer toolbar.
987 (condition-case nil (require 'tool-bar) (error nil)) 988Setter function for custom variables."
988 (fboundp 'tool-bar-add-item-from-menu) 989 (when symbol
989 (default-value 'tool-bar-mode) 990 (set-default symbol value))
990 (not gnus-group-toolbar-map)) 991 ;; (setq-default gnus-group-tool-bar-map nil)
991 (setq gnus-group-toolbar-map 992 ;; (use-local-map gnus-group-mode-map)
992 (let ((tool-bar-map (make-sparse-keymap)) 993 (when (gnus-alive-p)
993 (load-path (mm-image-load-path))) 994 (with-current-buffer gnus-group-buffer
994 (tool-bar-add-item-from-menu 995 (gnus-group-make-tool-bar t))))
995 'gnus-group-get-new-news "get-news" gnus-group-mode-map) 996
996 (tool-bar-add-item-from-menu 997(defcustom gnus-group-tool-bar (if (eq gmm-tool-bar-style 'gnome)
997 'gnus-group-get-new-news-this-group "gnntg" gnus-group-mode-map) 998 'gnus-group-tool-bar-gnome
998 (tool-bar-add-item-from-menu 999 'gnus-group-tool-bar-retro)
999 'gnus-group-catchup-current "catchup" gnus-group-mode-map) 1000 "Specifies the Gnus group tool bar.
1000 (tool-bar-add-item-from-menu 1001
1001 'gnus-group-describe-group "describe-group" gnus-group-mode-map) 1002It can be either a list or a symbol refering to a list. See
1002 (tool-bar-add-item "subscribe" 'gnus-group-subscribe 'subscribe 1003`gmm-tool-bar-from-list' for the format of the list. The
1003 :help "Subscribe to the current group") 1004default key map is `gnus-group-mode-map'.
1004 (tool-bar-add-item "unsubscribe" 'gnus-group-unsubscribe 1005
1005 'unsubscribe 1006Pre-defined symbols include `gnus-group-tool-bar-gnome' and
1006 :help "Unsubscribe from the current group") 1007`gnus-group-tool-bar-retro'."
1007 (tool-bar-add-item-from-menu 1008 :type '(choice (const :tag "GNOME style" gnus-group-tool-bar-gnome)
1008 'gnus-group-exit "exit-gnus" gnus-group-mode-map) 1009 (const :tag "Retro look" gnus-group-tool-bar-retro)
1009 tool-bar-map))) 1010 (repeat :tag "User defined list" gmm-tool-bar-item)
1010 (if gnus-group-toolbar-map 1011 (symbol))
1011 (set (make-local-variable 'tool-bar-map) gnus-group-toolbar-map))) 1012 :version "22.1" ;; Gnus 5.10.9
1013 :initialize 'custom-initialize-default
1014 :set 'gnus-group-tool-bar-update
1015 :group 'gnus-group)
1016
1017(defcustom gnus-group-tool-bar-gnome
1018 '((gnus-group-post-news "mail/compose")
1019 ;; Some useful agent icons? I don't use the agent so agent users should
1020 ;; suggest useful commands:
1021 (gnus-agent-toggle-plugged "connect" t
1022 :visible (and gnus-agent (not gnus-plugged)))
1023 (gnus-agent-toggle-plugged "disconnect" t
1024 :visible (and gnus-agent gnus-plugged))
1025 ;; FIXME: gnus-agent-toggle-plugged (in gnus-agent-group-make-menu-bar)
1026 ;; should have a better help text.
1027 (gnus-group-send-queue "mail/outbox" t
1028 :visible (and gnus-agent gnus-plugged)
1029 :help "Send articles from the queue group")
1030 (gnus-group-get-new-news "mail/inbox" nil
1031 :visible (or (not gnus-agent)
1032 gnus-plugged))
1033 ;; FIXME: gnus-*-read-group should have a better help text.
1034 (gnus-topic-read-group "open" nil
1035 :visible (and (boundp 'gnus-topic-mode)
1036 gnus-topic-mode))
1037 (gnus-group-read-group "open" nil
1038 :visible (not (and (boundp 'gnus-topic-mode)
1039 gnus-topic-mode)))
1040 ;; (gnus-group-find-new-groups "???" nil)
1041 (gnus-group-save-newsrc "save")
1042 (gnus-group-describe-group "describe")
1043 (gnus-group-unsubscribe-current-group "gnus/toggle-subscription")
1044 (gnus-group-prev-unread-group "left-arrow")
1045 (gnus-group-next-unread-group "right-arrow")
1046 (gnus-group-exit "exit")
1047 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
1048 (gnus-info-find-node "help"))
1049 "List of functions for the group tool bar (GNOME style).
1050
1051See `gmm-tool-bar-from-list' for the format of the list."
1052 :type '(repeat gmm-tool-bar-item)
1053 :version "22.1" ;; Gnus 5.10.9
1054 :initialize 'custom-initialize-default
1055 :set 'gnus-group-tool-bar-update
1056 :group 'gnus-group)
1057
1058(defcustom gnus-group-tool-bar-retro
1059 '((gnus-group-get-new-news "gnus/get-news")
1060 (gnus-group-get-new-news-this-group "gnus/gnntg")
1061 (gnus-group-catchup-current "gnus/catchup")
1062 (gnus-group-describe-group "gnus/describe-group")
1063 (gnus-group-subscribe "gnus/subscribe" t
1064 :help "Subscribe to the current group")
1065 (gnus-group-unsubscribe "gnus/unsubscribe" t
1066 :help "Unsubscribe from the current group")
1067 (gnus-group-exit "gnus/exit-gnus" gnus-group-mode-map))
1068 "List of functions for the group tool bar (retro look).
1069
1070See `gmm-tool-bar-from-list' for the format of the list."
1071 :type '(repeat gmm-tool-bar-item)
1072 :version "22.1" ;; Gnus 5.10.9
1073 :initialize 'custom-initialize-default
1074 :set 'gnus-group-tool-bar-update
1075 :group 'gnus-group)
1076
1077(defcustom gnus-group-tool-bar-zap-list t
1078 "List of icon items from the global tool bar.
1079These items are not displayed in the Gnus group mode tool bar.
1080
1081See `gmm-tool-bar-from-list' for the format of the list."
1082 :type 'gmm-tool-bar-zap-list
1083 :version "22.1" ;; Gnus 5.10.9
1084 :initialize 'custom-initialize-default
1085 :set 'gnus-group-tool-bar-update
1086 :group 'gnus-group)
1087
1088(defvar image-load-path)
1089
1090(defun gnus-group-make-tool-bar (&optional force)
1091 "Make a group mode tool bar from `gnus-group-tool-bar'.
1092When FORCE, rebuild the tool bar."
1093 (when (and (not (featurep 'xemacs))
1094 (boundp 'tool-bar-mode)
1095 tool-bar-mode
1096 ;; The Gnus 5.10.6 code checked (default-value 'tool-bar-mode).
1097 ;; Why? --rsteib
1098 (or (not gnus-group-tool-bar-map) force))
1099 (let* ((load-path
1100 (gmm-image-load-path-for-library "gnus"
1101 "gnus/toggle-subscription.xpm"
1102 nil t))
1103 (image-load-path (cons (car load-path)
1104 (when (boundp 'image-load-path)
1105 image-load-path)))
1106 (map (gmm-tool-bar-from-list gnus-group-tool-bar
1107 gnus-group-tool-bar-zap-list
1108 'gnus-group-mode-map)))
1109 (if map
1110 (set (make-local-variable 'tool-bar-map) map))))
1111 gnus-group-tool-bar-map)
1012 1112
1013(defun gnus-group-mode () 1113(defun gnus-group-mode ()
1014 "Major mode for reading news. 1114 "Major mode for reading news.
@@ -1379,6 +1479,17 @@ if it is a string, only list groups matching REGEXP."
1379 (gnus-range-difference (list active) (gnus-info-read info)) 1479 (gnus-range-difference (list active) (gnus-info-read info))
1380 seen)))))) 1480 seen))))))
1381 1481
1482;; Moving through the Group buffer (in topic mode) e.g. with C-n doesn't
1483;; update the state (enabled/disabled) of the icon `gnus-group-describe-group'
1484;; automatically. After `C-l' the state is correct. See the following report
1485;; on emacs-devel
1486;; <http://thread.gmane.org/v9acdmrcse.fsf@marauder.physik.uni-ulm.de>:
1487;; From: Reiner Steib
1488;; Subject: tool bar icons not updated according to :active condition
1489;; Newsgroups: gmane.emacs.devel
1490;; Date: Mon, 23 Jan 2006 19:59:13 +0100
1491;; Message-ID: <v9acdmrcse.fsf@marauder.physik.uni-ulm.de>
1492
1382(defcustom gnus-group-update-tool-bar 1493(defcustom gnus-group-update-tool-bar
1383 (and (not (featurep 'xemacs)) 1494 (and (not (featurep 'xemacs))
1384 (boundp 'tool-bar-mode) 1495 (boundp 'tool-bar-mode)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index bea7cb2445e..0de73bc879a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -38,6 +38,7 @@
38(require 'gnus-int) 38(require 'gnus-int)
39(require 'gnus-undo) 39(require 'gnus-undo)
40(require 'gnus-util) 40(require 'gnus-util)
41(require 'gmm-utils)
41(require 'mm-decode) 42(require 'mm-decode)
42(require 'nnoo) 43(require 'nnoo)
43 44
@@ -2546,47 +2547,161 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
2546 2547
2547(defvar gnus-summary-tool-bar-map nil) 2548(defvar gnus-summary-tool-bar-map nil)
2548 2549
2549;; Emacs 21 tool bar. Should be no-op otherwise. 2550;; Note: The :set function in the `gnus-summary-tool-bar*' variables will only
2550(defun gnus-summary-make-tool-bar () 2551;; affect _new_ message buffers. We might add a function that walks thru all
2551 (if (and (fboundp 'tool-bar-add-item-from-menu) 2552;; summary-mode buffers and force the update.
2552 (default-value 'tool-bar-mode) 2553(defun gnus-summary-tool-bar-update (&optional symbol value)
2553 (not gnus-summary-tool-bar-map)) 2554 "Update summary mode toolbar.
2554 (setq gnus-summary-tool-bar-map 2555Setter function for custom variables."
2555 (let ((tool-bar-map (make-sparse-keymap)) 2556 (setq-default gnus-summary-tool-bar-map nil)
2556 (load-path (mm-image-load-path))) 2557 (when symbol
2557 (tool-bar-add-item-from-menu 2558 ;; When used as ":set" function:
2558 'gnus-summary-prev-unread "prev-ur" gnus-summary-mode-map) 2559 (set-default symbol value))
2559 (tool-bar-add-item-from-menu 2560 (when (gnus-buffer-live-p gnus-summary-buffer)
2560 'gnus-summary-next-unread "next-ur" gnus-summary-mode-map) 2561 (with-current-buffer gnus-summary-buffer
2561 (tool-bar-add-item-from-menu 2562 (gnus-summary-make-tool-bar))))
2562 'gnus-summary-post-news "post" gnus-summary-mode-map) 2563
2563 (tool-bar-add-item-from-menu 2564(defcustom gnus-summary-tool-bar (if (eq gmm-tool-bar-style 'gnome)
2564 'gnus-summary-followup-with-original "fuwo" gnus-summary-mode-map) 2565 'gnus-summary-tool-bar-gnome
2565 (tool-bar-add-item-from-menu 2566 'gnus-summary-tool-bar-retro)
2566 'gnus-summary-followup "followup" gnus-summary-mode-map) 2567 "Specifies the Gnus summary tool bar.
2567 (tool-bar-add-item-from-menu 2568
2568 'gnus-summary-reply-with-original "reply-wo" gnus-summary-mode-map) 2569It can be either a list or a symbol refering to a list. See
2569 (tool-bar-add-item-from-menu 2570`gmm-tool-bar-from-list' for the format of the list. The
2570 'gnus-summary-reply "reply" gnus-summary-mode-map) 2571default key map is `gnus-summary-mode-map'.
2571 (tool-bar-add-item-from-menu 2572
2572 'gnus-summary-caesar-message "rot13" gnus-summary-mode-map) 2573Pre-defined symbols include `gnus-summary-tool-bar-gnome' and
2573 (tool-bar-add-item-from-menu 2574`gnus-summary-tool-bar-retro'."
2574 'gnus-uu-decode-uu "uu-decode" gnus-summary-mode-map) 2575 :type '(choice (const :tag "GNOME style" gnus-summary-tool-bar-gnome)
2575 (tool-bar-add-item-from-menu 2576 (const :tag "Retro look" gnus-summary-tool-bar-retro)
2576 'gnus-summary-save-article-file "save-aif" gnus-summary-mode-map) 2577 (repeat :tag "User defined list" gmm-tool-bar-item)
2577 (tool-bar-add-item-from-menu 2578 (symbol))
2578 'gnus-summary-save-article "save-art" gnus-summary-mode-map) 2579 :version "22.1" ;; Gnus 5.10.9
2579 (tool-bar-add-item-from-menu 2580 :initialize 'custom-initialize-default
2580 'gnus-uu-post-news "uu-post" gnus-summary-mode-map) 2581 :set 'gnus-summary-tool-bar-update
2581 (tool-bar-add-item-from-menu 2582 :group 'gnus-summary)
2582 'gnus-summary-catchup "catchup" gnus-summary-mode-map) 2583
2583 (tool-bar-add-item-from-menu 2584(defcustom gnus-summary-tool-bar-gnome
2584 'gnus-summary-catchup-and-exit "cu-exit" gnus-summary-mode-map) 2585 '((gnus-summary-post-news "mail/compose" nil)
2585 (tool-bar-add-item-from-menu 2586 (gnus-summary-insert-new-articles "mail/inbox" nil
2586 'gnus-summary-exit "exit-summ" gnus-summary-mode-map) 2587 :visible (or (not gnus-agent)
2587 tool-bar-map))) 2588 gnus-plugged))
2588 (if gnus-summary-tool-bar-map 2589 (gnus-summary-reply-with-original "mail/reply")
2589 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))) 2590 (gnus-summary-reply "mail/reply" nil :visible nil)
2591 (gnus-summary-followup-with-original "mail/reply-all")
2592 (gnus-summary-followup "mail/reply-all" nil :visible nil)
2593 (gnus-summary-mail-forward "mail/forward")
2594 (gnus-summary-save-article "mail/save")
2595 (gnus-summary-search-article-forward "search" nil :visible nil)
2596 (gnus-summary-print-article "print")
2597 (gnus-summary-tick-article-forward "flag-followup" nil :visible nil)
2598 ;; Some new commands that may need more suitable icons:
2599 (gnus-summary-save-newsrc "save" nil :visible nil)
2600 ;; (gnus-summary-show-article "stock_message-display" nil :visible nil)
2601 (gnus-summary-prev-article "left-arrow")
2602 (gnus-summary-next-article "right-arrow")
2603 (gnus-summary-next-page "next-page")
2604 ;; (gnus-summary-enter-digest-group "right_arrow" nil :visible nil)
2605 ;;
2606 ;; Maybe some sort-by-... could be added:
2607 ;; (gnus-summary-sort-by-author "sort-a-z" nil :visible nil)
2608 ;; (gnus-summary-sort-by-date "sort-1-9" nil :visible nil)
2609 (gnus-summary-mark-as-expirable
2610 "delete" nil
2611 :visible (gnus-check-backend-function 'request-expire-articles
2612 gnus-newsgroup-name))
2613 (gnus-summary-mark-as-spam
2614 "mail/spam" t
2615 :visible (and (fboundp 'spam-group-ham-contents-p)
2616 (spam-group-ham-contents-p gnus-newsgroup-name))
2617 :help "Mark as spam")
2618 (gnus-summary-mark-as-read-forward
2619 "mail/not-spam" nil
2620 :visible (and (fboundp 'spam-group-spam-contents-p)
2621 (spam-group-spam-contents-p gnus-newsgroup-name)))
2622 ;;
2623 (gnus-summary-exit "exit")
2624 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
2625 (gnus-info-find-node "help"))
2626 "List of functions for the summary tool bar (GNOME style).
2627
2628See `gmm-tool-bar-from-list' for the format of the list."
2629 :type '(repeat gmm-tool-bar-item)
2630 :version "22.1" ;; Gnus 5.10.9
2631 :initialize 'custom-initialize-default
2632 :set 'gnus-summary-tool-bar-update
2633 :group 'gnus-summary)
2634
2635(defcustom gnus-summary-tool-bar-retro
2636 '((gnus-summary-prev-unread-article "gnus/prev-ur")
2637 (gnus-summary-next-unread-article "gnus/next-ur")
2638 (gnus-summary-post-news "gnus/post")
2639 (gnus-summary-followup-with-original "gnus/fuwo")
2640 (gnus-summary-followup "gnus/followup")
2641 (gnus-summary-reply-with-original "gnus/reply-wo")
2642 (gnus-summary-reply "gnus/reply")
2643 (gnus-summary-caesar-message "gnus/rot13")
2644 (gnus-uu-decode-uu "gnus/uu-decode")
2645 (gnus-summary-save-article-file "gnus/save-aif")
2646 (gnus-summary-save-article "gnus/save-art")
2647 (gnus-uu-post-news "gnus/uu-post")
2648 (gnus-summary-catchup "gnus/catchup")
2649 (gnus-summary-catchup-and-exit "gnus/cu-exit")
2650 (gnus-summary-exit "gnus/exit-summ")
2651 ;; Some new command that may need more suitable icons:
2652 (gnus-summary-print-article "gnus/print" nil :visible nil)
2653 (gnus-summary-mark-as-expirable "gnus/close" nil :visible nil)
2654 (gnus-summary-save-newsrc "gnus/save" nil :visible nil)
2655 ;; (gnus-summary-enter-digest-group "gnus/right_arrow" nil :visible nil)
2656 (gnus-summary-search-article-forward "gnus/search" nil :visible nil)
2657 ;; (gnus-summary-insert-new-articles "gnus/paste" nil :visible nil)
2658 ;; (gnus-summary-toggle-threads "gnus/open" nil :visible nil)
2659 ;;
2660 (gnus-info-find-node "gnus/help" nil :visible nil))
2661 "List of functions for the summary tool bar (retro look).
2662
2663See `gmm-tool-bar-from-list' for the format of the list."
2664 :type '(repeat gmm-tool-bar-item)
2665 :version "22.1" ;; Gnus 5.10.9
2666 :initialize 'custom-initialize-default
2667 :set 'gnus-summary-tool-bar-update
2668 :group 'gnus-summary)
2669
2670(defcustom gnus-summary-tool-bar-zap-list t
2671 "List of icon items from the global tool bar.
2672These items are not displayed in the Gnus summary mode tool bar.
2673
2674See `gmm-tool-bar-from-list' for the format of the list."
2675 :type 'gmm-tool-bar-zap-list
2676 :version "22.1" ;; Gnus 5.10.9
2677 :initialize 'custom-initialize-default
2678 :set 'gnus-summary-tool-bar-update
2679 :group 'gnus-summary)
2680
2681(defvar image-load-path)
2682
2683(defun gnus-summary-make-tool-bar (&optional force)
2684 "Make a summary mode tool bar from `gnus-summary-tool-bar'.
2685When FORCE, rebuild the tool bar."
2686 (when (and (not (featurep 'xemacs))
2687 (boundp 'tool-bar-mode)
2688 tool-bar-mode
2689 (or (not gnus-summary-tool-bar-map) force))
2690 (let* ((load-path
2691 (gmm-image-load-path-for-library "gnus"
2692 "mail/save.xpm"
2693 nil t))
2694 (image-load-path (cons (car load-path)
2695 (when (boundp 'image-load-path)
2696 image-load-path)))
2697 (map (gmm-tool-bar-from-list gnus-summary-tool-bar
2698 gnus-summary-tool-bar-zap-list
2699 'gnus-summary-mode-map)))
2700 (when map
2701 ;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode'
2702 ;; uses it's value.
2703 (setq gnus-summary-tool-bar-map map))))
2704 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))
2590 2705
2591(defun gnus-score-set-default (var value) 2706(defun gnus-score-set-default (var value)
2592 "A version of set that updates the GNU Emacs menu-bar." 2707 "A version of set that updates the GNU Emacs menu-bar."
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 741b193f779..472eb2468dd 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -37,6 +37,7 @@
37 (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary 37 (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
38(require 'canlock) 38(require 'canlock)
39(require 'mailheader) 39(require 'mailheader)
40(require 'gmm-utils)
40(require 'nnheader) 41(require 'nnheader)
41;; This is apparently necessary even though things are autoloaded. 42;; This is apparently necessary even though things are autoloaded.
42;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better 43;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
@@ -2529,7 +2530,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)."
2529 (set (make-local-variable 'font-lock-defaults) 2530 (set (make-local-variable 'font-lock-defaults)
2530 '(message-font-lock-keywords t)) 2531 '(message-font-lock-keywords t))
2531 (if (boundp 'tool-bar-map) 2532 (if (boundp 'tool-bar-map)
2532 (set (make-local-variable 'tool-bar-map) (message-tool-bar-map)))) 2533 (set (make-local-variable 'tool-bar-map) (message-make-tool-bar))))
2533 (easy-menu-add message-mode-menu message-mode-map) 2534 (easy-menu-add message-mode-menu message-mode-map)
2534 (easy-menu-add message-mode-field-menu message-mode-map) 2535 (easy-menu-add message-mode-field-menu message-mode-map)
2535 (gnus-make-local-hook 'after-change-functions) 2536 (gnus-make-local-hook 'after-change-functions)
@@ -6586,53 +6587,123 @@ which specify the range to operate on."
6586 6587
6587;; Support for toolbar 6588;; Support for toolbar
6588(eval-when-compile 6589(eval-when-compile
6589 (defvar tool-bar-map)
6590 (defvar tool-bar-mode)) 6590 (defvar tool-bar-mode))
6591 6591
6592(defun message-tool-bar-local-item-from-menu (command icon in-map &optional from-map &rest props) 6592;; Note: The :set function in the `message-tool-bar*' variables will only
6593 ;; We need to make tool bar entries in local keymaps with 6593;; affect _new_ message buffers. We might add a function that walks thru all
6594 ;; `tool-bar-local-item-from-menu' in Emacs >= 22 6594;; message-mode buffers and force the update.
6595 (if (fboundp 'tool-bar-local-item-from-menu) 6595(defun message-tool-bar-update (&optional symbol value)
6596 (tool-bar-local-item-from-menu command icon in-map from-map props) 6596 "Update message mode toolbar.
6597 (tool-bar-add-item-from-menu command icon from-map props))) 6597Setter function for custom variables."
6598 6598 (setq-default message-tool-bar-map nil)
6599(defun message-tool-bar-map () 6599 (when symbol
6600 (or message-tool-bar-map 6600 ;; When used as ":set" function:
6601 (setq message-tool-bar-map 6601 (set-default symbol value)))
6602 (and 6602
6603 (condition-case nil (require 'tool-bar) (error nil)) 6603(defcustom message-tool-bar (if (eq gmm-tool-bar-style 'gnome)
6604 (fboundp 'tool-bar-add-item-from-menu) 6604 'message-tool-bar-gnome
6605 'message-tool-bar-retro)
6606 "Specifies the message mode tool bar.
6607
6608It can be either a list or a symbol refering to a list. See
6609`gmm-tool-bar-from-list' for the format of the list. The
6610default key map is `message-mode-map'.
6611
6612Pre-defined symbols include `message-tool-bar-gnome' and
6613`message-tool-bar-retro'."
6614 :type '(repeat gmm-tool-bar-list-item)
6615 :type '(choice (const :tag "GNOME style" message-tool-bar-gnome)
6616 (const :tag "Retro look" message-tool-bar-retro)
6617 (repeat :tag "User defined list" gmm-tool-bar-item)
6618 (symbol))
6619 :version "22.1" ;; Gnus 5.10.9
6620 :initialize 'custom-initialize-default
6621 :set 'message-tool-bar-update
6622 :group 'message)
6623
6624(defcustom message-tool-bar-gnome
6625 '((ispell-message "spell" nil
6626 :visible (or (not (boundp 'flyspell-mode))
6627 (not flyspell-mode)))
6628 (flyspell-buffer "spell" t
6629 :visible (and (boundp 'flyspell-mode)
6630 flyspell-mode)
6631 :help "Flyspell whole buffer")
6632 (gmm-ignore "separator")
6633 (message-send-and-exit "mail/send")
6634 (message-dont-send "mail/save-draft")
6635 (message-kill-buffer "close") ;; stock_cancel
6636 (mml-attach-file "attach" mml-mode-map)
6637 (mml-preview "mail/preview" mml-mode-map)
6638 ;; (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil)
6639 (message-insert-importance-high "important" nil :visible nil)
6640 (message-insert-importance-low "unimportant" nil :visible nil)
6641 (message-insert-disposition-notification-to "receipt" nil :visible nil)
6642 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
6643 (message-info "help" t :help "Message manual"))
6644 "List of items for the message tool bar (GNOME style).
6645
6646See `gmm-tool-bar-from-list' for details on the format of the list."
6647 :type '(repeat gmm-tool-bar-item)
6648 :version "22.1" ;; Gnus 5.10.9
6649 :initialize 'custom-initialize-default
6650 :set 'message-tool-bar-update
6651 :group 'message)
6652
6653(defcustom message-tool-bar-retro
6654 '(;; Old Emacs 21 icon for consistency.
6655 (message-send-and-exit "gnus/mail_send")
6656 (message-kill-buffer "close")
6657 (message-dont-send "cancel")
6658 (mml-attach-file "attach" mml-mode-map)
6659 (ispell-message "spell")
6660 (mml-preview "preview" mml-mode-map)
6661 (message-insert-importance-high "gnus/important")
6662 (message-insert-importance-low "gnus/unimportant")
6663 (message-insert-disposition-notification-to "gnus/receipt"))
6664 "List of items for the message tool bar (retro style).
6665
6666See `gmm-tool-bar-from-list' for details on the format of the list."
6667 :type '(repeat gmm-tool-bar-item)
6668 :version "22.1" ;; Gnus 5.10.9
6669 :initialize 'custom-initialize-default
6670 :set 'message-tool-bar-update
6671 :group 'message)
6672
6673(defcustom message-tool-bar-zap-list
6674 '(new-file open-file dired kill-buffer write-file
6675 print-buffer customize help)
6676 "List of icon items from the global tool bar.
6677These items are not displayed on the message mode tool bar.
6678
6679See `gmm-tool-bar-from-list' for the format of the list."
6680 :type 'gmm-tool-bar-zap-list
6681 :version "22.1" ;; Gnus 5.10.9
6682 :initialize 'custom-initialize-default
6683 :set 'message-tool-bar-update
6684 :group 'message)
6685
6686(defvar image-load-path)
6687
6688(defun message-make-tool-bar (&optional force)
6689 "Make a message mode tool bar from `message-tool-bar-list'.
6690When FORCE, rebuild the tool bar."
6691 (when (and (not (featurep 'xemacs))
6692 (boundp 'tool-bar-mode)
6605 tool-bar-mode 6693 tool-bar-mode
6606 (let ((tool-bar-map (copy-keymap tool-bar-map)) 6694 (or (not message-tool-bar-map) force))
6607 (load-path (mm-image-load-path))) 6695 (setq message-tool-bar-map
6608 ;; Zap some items which aren't so relevant and take 6696 (let* ((load-path
6609 ;; up space. 6697 (gmm-image-load-path-for-library "message"
6610 (dolist (key '(print-buffer kill-buffer save-buffer 6698 "mail/save-draft.xpm"
6611 write-file dired open-file)) 6699 nil t))
6612 (define-key tool-bar-map (vector key) nil)) 6700 (image-load-path (cons (car load-path)
6613 (message-tool-bar-local-item-from-menu 6701 (when (boundp 'image-load-path)
6614 'message-send-and-exit "mail/send" tool-bar-map message-mode-map) 6702 image-load-path))))
6615 (message-tool-bar-local-item-from-menu 6703 (gmm-tool-bar-from-list message-tool-bar
6616 'message-kill-buffer "close" tool-bar-map message-mode-map) 6704 message-tool-bar-zap-list
6617 (message-tool-bar-local-item-from-menu 6705 'message-mode-map))))
6618 'message-dont-send "cancel" tool-bar-map message-mode-map) 6706 message-tool-bar-map)
6619 (message-tool-bar-local-item-from-menu
6620 'mml-attach-file "attach" tool-bar-map mml-mode-map)
6621 (message-tool-bar-local-item-from-menu
6622 'ispell-message "spell" tool-bar-map message-mode-map)
6623 (message-tool-bar-local-item-from-menu
6624 'mml-preview "preview"
6625 tool-bar-map mml-mode-map)
6626 (message-tool-bar-local-item-from-menu
6627 'message-insert-importance-high "important"
6628 tool-bar-map message-mode-map)
6629 (message-tool-bar-local-item-from-menu
6630 'message-insert-importance-low "unimportant"
6631 tool-bar-map message-mode-map)
6632 (message-tool-bar-local-item-from-menu
6633 'message-insert-disposition-notification-to "receipt"
6634 tool-bar-map message-mode-map)
6635 tool-bar-map)))))
6636 6707
6637;;; Group name completion. 6708;;; Group name completion.
6638 6709
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index c58eb6bd41d..a10b8b28399 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -56,6 +56,8 @@
56 ;; known to break servers. 56 ;; known to break servers.
57 ;; Note: UTF-16 variants are invalid for text parts [RFC 2781], 57 ;; Note: UTF-16 variants are invalid for text parts [RFC 2781],
58 ;; so this can't happen :-/. 58 ;; so this can't happen :-/.
59 ;; PPS: Yes, it can happen if the user specifies UTF-16 in the MML
60 ;; markup. - jh.
59 (utf-16 . base64) 61 (utf-16 . base64)
60 (utf-16be . base64) 62 (utf-16be . base64)
61 (utf-16le . base64)) 63 (utf-16le . base64))
@@ -251,7 +253,10 @@ decoding. If it is nil, default to `mail-parse-charset'."
251 (mm-decode-content-transfer-encoding encoding type)) 253 (mm-decode-content-transfer-encoding encoding type))
252 (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session. 254 (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session.
253 (not (eq charset 'gnus-decoded))) 255 (not (eq charset 'gnus-decoded)))
254 (let ((coding-system (mm-charset-to-coding-system charset))) 256 (let ((coding-system (mm-charset-to-coding-system
257 ;; Allow overwrite using
258 ;; `mm-charset-override-alist'.
259 charset nil t)))
255 (if (and (not coding-system) 260 (if (and (not coding-system)
256 (listp mail-parse-ignored-charsets) 261 (listp mail-parse-ignored-charsets)
257 (memq 'gnus-unknown mail-parse-ignored-charsets)) 262 (memq 'gnus-unknown mail-parse-ignored-charsets))
@@ -282,7 +287,11 @@ decoding. If it is nil, default to `mail-parse-charset'."
282 (setq charset mail-parse-charset)) 287 (setq charset mail-parse-charset))
283 (or 288 (or
284 (when (featurep 'mule) 289 (when (featurep 'mule)
285 (let ((coding-system (mm-charset-to-coding-system charset))) 290 (let ((coding-system (mm-charset-to-coding-system
291 charset
292 ;; Allow overwrite using
293 ;; `mm-charset-override-alist'.
294 nil t)))
286 (if (and (not coding-system) 295 (if (and (not coding-system)
287 (listp mail-parse-ignored-charsets) 296 (listp mail-parse-ignored-charsets)
288 (memq 'gnus-unknown mail-parse-ignored-charsets)) 297 (memq 'gnus-unknown mail-parse-ignored-charsets))
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index a8c1f3a87a1..e16750cfcf6 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -177,6 +177,29 @@ system object in XEmacs."
177 ;; no-MULE XEmacs: 177 ;; no-MULE XEmacs:
178 (car (memq cs (mm-get-coding-system-list)))))) 178 (car (memq cs (mm-get-coding-system-list))))))
179 179
180(defun mm-codepage-setup (number &optional alias)
181 "Create a coding system cpNUMBER.
182The coding system is created using `codepage-setup'. If ALIAS is
183non-nil, an alias is created and added to
184`mm-charset-synonym-alist'. If ALIAS is a string, it's used as
185the alias. Else windows-NUMBER is used."
186 (interactive
187 (let ((completion-ignore-case t)
188 (candidates (cp-supported-codepages)))
189 (list (completing-read "Setup DOS Codepage: (default 437) " candidates
190 nil t nil nil "437"))))
191 (when alias
192 (setq alias (if (stringp alias)
193 (intern alias)
194 (intern (format "windows-%s" number)))))
195 (let* ((cp (intern (format "cp%s" number))))
196 (unless (mm-coding-system-p cp)
197 (codepage-setup number))
198 (when (and alias
199 ;; Don't add alias if setup of cp failed.
200 (mm-coding-system-p cp))
201 (add-to-list 'mm-charset-synonym-alist (cons alias cp)))))
202
180(defvar mm-charset-synonym-alist 203(defvar mm-charset-synonym-alist
181 `( 204 `(
182 ;; Not in XEmacs, but it's not a proper MIME charset anyhow. 205 ;; Not in XEmacs, but it's not a proper MIME charset anyhow.
@@ -200,8 +223,61 @@ system object in XEmacs."
200 ,@(if (and (not (mm-coding-system-p 'windows-1250)) 223 ,@(if (and (not (mm-coding-system-p 'windows-1250))
201 (mm-coding-system-p 'cp1250)) 224 (mm-coding-system-p 'cp1250))
202 '((windows-1250 . cp1250))) 225 '((windows-1250 . cp1250)))
226 ;; A Microsoft misunderstanding.
227 ,@(if (and (not (mm-coding-system-p 'unicode))
228 (mm-coding-system-p 'utf-16-le))
229 '((unicode . utf-16-le)))
230 ;; A Microsoft misunderstanding.
231 ,@(unless (mm-coding-system-p 'ks_c_5601-1987)
232 (if (mm-coding-system-p 'cp949)
233 '((ks_c_5601-1987 . cp949))
234 '((ks_c_5601-1987 . euc-kr))))
203 ) 235 )
204 "A mapping from invalid charset names to the real charset names.") 236 "A mapping from unknown or invalid charset names to the real charset names.")
237
238(defcustom mm-charset-override-alist
239 `((iso-8859-1 . windows-1252))
240 "A mapping from undesired charset names to their replacement.
241
242You may add pairs like (iso-8859-1 . windows-1252) here,
243i.e. treat iso-8859-1 as windows-1252. windows-1252 is a
244superset of iso-8859-1."
245 :type '(list (set :inline t
246 (const (iso-8859-1 . windows-1252))
247 (const (undecided . windows-1252)))
248 (repeat :inline t
249 :tag "Other options"
250 (cons (symbol :tag "From charset")
251 (symbol :tag "To charset"))))
252 :version "23.0" ;; No Gnus
253 :group 'mime)
254
255(defcustom mm-charset-eval-alist
256 (if (featurep 'xemacs)
257 nil ;; I don't know what would be useful for XEmacs.
258 '(;; Emacs 21 offers 1250 1251 1253 1257. Emacs 22 provides autoloads for
259 ;; 1250-1258 (i.e. `mm-codepage-setup' does nothing).
260 (windows-1250 . (mm-codepage-setup 1250 t))
261 (windows-1251 . (mm-codepage-setup 1251 t))
262 (windows-1253 . (mm-codepage-setup 1253 t))
263 (windows-1257 . (mm-codepage-setup 1257 t))))
264 "An alist of (CHARSET . FORM) pairs.
265If an article is encoded in an unknown CHARSET, FORM is
266evaluated. This allows to load additional libraries providing
267charsets on demand. If supported by your Emacs version, you
268could use `autoload-coding-system' here."
269 :version "23.0" ;; No Gnus
270 :type '(list (set :inline t
271 (const (windows-1250 . (mm-codepage-setup 1250 t)))
272 (const (windows-1251 . (mm-codepage-setup 1251 t)))
273 (const (windows-1253 . (mm-codepage-setup 1253 t)))
274 (const (windows-1257 . (mm-codepage-setup 1257 t)))
275 (const (cp850 . (mm-codepage-setup 850 nil))))
276 (repeat :inline t
277 :tag "Other options"
278 (cons (symbol :tag "charset")
279 (symbol :tag "form"))))
280 :group 'mime)
205 281
206(defvar mm-binary-coding-system 282(defvar mm-binary-coding-system
207 (cond 283 (cond
@@ -426,11 +502,17 @@ mail with multiple parts is preferred to sending a Unicode one.")
426 (pop alist)) 502 (pop alist))
427 out))) 503 out)))
428 504
429(defun mm-charset-to-coding-system (charset &optional lbt) 505(defun mm-charset-to-coding-system (charset &optional lbt
506 allow-override)
430 "Return coding-system corresponding to CHARSET. 507 "Return coding-system corresponding to CHARSET.
431CHARSET is a symbol naming a MIME charset. 508CHARSET is a symbol naming a MIME charset.
432If optional argument LBT (`unix', `dos' or `mac') is specified, it is 509If optional argument LBT (`unix', `dos' or `mac') is specified, it is
433used as the line break code type of the coding system." 510used as the line break code type of the coding system.
511
512If ALLOW-OVERRIDE is given, use `mm-charset-override-alist' to
513map undesired charset names to their replacement. This should
514only be used for decoding, not for encoding."
515 ;; OVERRIDE is used (only) in `mm-decode-body' and `mm-decode-string'.
434 (when (stringp charset) 516 (when (stringp charset)
435 (setq charset (intern (downcase charset)))) 517 (setq charset (intern (downcase charset))))
436 (when lbt 518 (when lbt
@@ -442,6 +524,11 @@ used as the line break code type of the coding system."
442 ((or (null (mm-get-coding-system-list)) 524 ((or (null (mm-get-coding-system-list))
443 (not (fboundp 'coding-system-get))) 525 (not (fboundp 'coding-system-get)))
444 charset) 526 charset)
527 ;; Check override list quite early. Should only used for decoding, not for
528 ;; encoding!
529 ((and allow-override
530 (let ((cs (cdr (assq charset mm-charset-override-alist))))
531 (and cs (mm-coding-system-p cs) cs))))
445 ;; ascii 532 ;; ascii
446 ((eq charset 'us-ascii) 533 ((eq charset 'us-ascii)
447 'ascii) 534 'ascii)
@@ -454,9 +541,27 @@ used as the line break code type of the coding system."
454;;; (eq charset (coding-system-get charset 'mime-charset)) 541;;; (eq charset (coding-system-get charset 'mime-charset))
455 ) 542 )
456 charset) 543 charset)
544 ;; Eval expressions from `mm-charset-eval-alist'
545 ((let* ((el (assq charset mm-charset-eval-alist))
546 (cs (car el))
547 (form (cdr el)))
548 (and cs
549 form
550 (prog2
551 ;; Avoid errors...
552 (condition-case nil (eval form) (error nil))
553 ;; (message "Failed to eval `%s'" form))
554 (mm-coding-system-p cs)
555 (message "Added charset `%s' via `mm-charset-eval-alist'" cs))
556 cs)))
457 ;; Translate invalid charsets. 557 ;; Translate invalid charsets.
458 ((let ((cs (cdr (assq charset mm-charset-synonym-alist)))) 558 ((let ((cs (cdr (assq charset mm-charset-synonym-alist))))
459 (and cs (mm-coding-system-p cs) cs))) 559 (and cs
560 (mm-coding-system-p cs)
561 ;; (message
562 ;; "Using synonym `%s' from `mm-charset-synonym-alist' for `%s'"
563 ;; cs charset)
564 cs)))
460 ;; Last resort: search the coding system list for entries which 565 ;; Last resort: search the coding system list for entries which
461 ;; have the right mime-charset in case the canonical name isn't 566 ;; have the right mime-charset in case the canonical name isn't
462 ;; defined (though it should be). 567 ;; defined (though it should be).
@@ -468,6 +573,11 @@ used as the line break code type of the coding system."
468 (eq charset (or (coding-system-get c :mime-charset) 573 (eq charset (or (coding-system-get c :mime-charset)
469 (coding-system-get c 'mime-charset)))) 574 (coding-system-get c 'mime-charset))))
470 (setq cs c))) 575 (setq cs c)))
576 (unless cs
577 ;; Warn the user about unknown charset:
578 (if (fboundp 'gnus-message)
579 (gnus-message 7 "Unknown charset: %s" charset)
580 (message "Unknown charset: %s" charset)))
471 cs)))) 581 cs))))
472 582
473(defsubst mm-replace-chars-in-string (string from to) 583(defsubst mm-replace-chars-in-string (string from to)
@@ -1070,7 +1180,8 @@ If SUFFIX is non-nil, add that at the end of the file name."
1070 (defun mm-detect-mime-charset-region (start end) 1180 (defun mm-detect-mime-charset-region (start end)
1071 "Detect MIME charset of the text in the region between START and END." 1181 "Detect MIME charset of the text in the region between START and END."
1072 (let ((cs (mm-detect-coding-region start end))) 1182 (let ((cs (mm-detect-coding-region start end)))
1073 (coding-system-get cs 'mime-charset))) 1183 (or (coding-system-get cs :mime-charset)
1184 (coding-system-get cs 'mime-charset))))
1074 (defun mm-detect-mime-charset-region (start end) 1185 (defun mm-detect-mime-charset-region (start end)
1075 "Detect MIME charset of the text in the region between START and END." 1186 "Detect MIME charset of the text in the region between START and END."
1076 (let ((cs (mm-detect-coding-region start end))) 1187 (let ((cs (mm-detect-coding-region start end)))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 94621535154..a5cdf1f4d72 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -197,6 +197,7 @@ Commands:
197 (view-mode) 197 (view-mode)
198 (make-local-variable 'view-no-disable-on-exit) 198 (make-local-variable 'view-no-disable-on-exit)
199 (setq view-no-disable-on-exit t) 199 (setq view-no-disable-on-exit t)
200 (setq view-exit-action (lambda (buffer) (delete-window)))
200 (run-mode-hooks 'help-mode-hook)) 201 (run-mode-hooks 'help-mode-hook))
201 202
202;;;###autoload 203;;;###autoload
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 258f852a4d6..1a55676e3c7 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -139,7 +139,11 @@ and showing the image as an image."
139 ;; was inserted 139 ;; was inserted
140 (let* ((image 140 (let* ((image
141 (if (and (buffer-file-name) 141 (if (and (buffer-file-name)
142 (not (buffer-modified-p))) 142 (not (buffer-modified-p))
143 (not (and (boundp 'archive-superior-buffer)
144 archive-superior-buffer))
145 (not (and (boundp 'tar-superior-buffer)
146 tar-superior-buffer)))
143 (progn (clear-image-cache) 147 (progn (clear-image-cache)
144 (create-image (buffer-file-name))) 148 (create-image (buffer-file-name)))
145 (create-image 149 (create-image
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 774903e1092..a609bcbadf9 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -208,18 +208,13 @@ during matching.")
208 208
209;;;###autoload 209;;;###autoload
210(defvar imenu-create-index-function 'imenu-default-create-index-function 210(defvar imenu-create-index-function 'imenu-default-create-index-function
211 "The function to use for creating a buffer index. 211 "The function to use for creating an index alist of the current buffer.
212 212
213It should be a function that takes no arguments and returns an index 213It should be a function that takes no arguments and returns
214of the current buffer as an alist. 214an index alist of the current buffer. The function is
215called within a `save-excursion'.
215 216
216Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 217See `imenu--index-alist' for the format of the buffer index alist.")
217Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...).
218A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
219The function `imenu--subalist-p' tests an element and returns t
220if it is a sub-alist.
221
222This function is called within a `save-excursion'.")
223;;;###autoload 218;;;###autoload
224(make-variable-buffer-local 'imenu-create-index-function) 219(make-variable-buffer-local 'imenu-create-index-function)
225 220
@@ -431,15 +426,27 @@ Don't move point."
431;; The latest buffer index. 426;; The latest buffer index.
432;; Buffer local. 427;; Buffer local.
433(defvar imenu--index-alist nil 428(defvar imenu--index-alist nil
434 "The buffer index computed for this buffer in Imenu. 429 "The buffer index alist computed for this buffer in Imenu.
435Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 430
436Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). 431Simple elements in the alist look like (INDEX-NAME . POSITION).
437A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).") 432POSITION is the buffer position of the item; to go to the item
433is simply to move point to that position.
434
435Special elements look like (INDEX-NAME POSITION FUNCTION ARGUMENTS...).
436To \"go to\" a special element means applying FUNCTION
437to INDEX-NAME, POSITION, and the ARGUMENTS.
438
439A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
440The function `imenu--subalist-p' tests an element and returns t
441if it is a sub-alist.
442
443There is one simple element with negative POSITION; selecting that
444element recalculates the buffer's index alist.")
438 445
439(make-variable-buffer-local 'imenu--index-alist) 446(make-variable-buffer-local 'imenu--index-alist)
440 447
441(defvar imenu--last-menubar-index-alist nil 448(defvar imenu--last-menubar-index-alist nil
442 "The latest buffer index used to update the menu bar menu.") 449 "The latest buffer index alist used to update the menu bar menu.")
443 450
444(make-variable-buffer-local 'imenu--last-menubar-index-alist) 451(make-variable-buffer-local 'imenu--last-menubar-index-alist)
445 452
@@ -547,19 +554,12 @@ A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).")
547 554
548 555
549(defun imenu--make-index-alist (&optional noerror) 556(defun imenu--make-index-alist (&optional noerror)
550 "Create an index-alist for the definitions in the current buffer. 557 "Create an index alist for the definitions in the current buffer.
551 558This works by using the hook function `imenu-create-index-function'.
552Report an error if the list is empty unless NOERROR is supplied and 559Report an error if the list is empty unless NOERROR is supplied and
553non-nil. 560non-nil.
554 561
555Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 562See `imenu--index-alist' for the format of the index alist."
556Special elements look like (INDEX-NAME FUNCTION ARGUMENTS...).
557A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
558The function `imenu--subalist-p' tests an element and returns t
559if it is a sub-alist.
560
561There is one simple element with negative POSITION; that's intended
562as a way for the user to ask to recalculate the buffer's index alist."
563 (or (and imenu--index-alist 563 (or (and imenu--index-alist
564 (or (not imenu-auto-rescan) 564 (or (not imenu-auto-rescan)
565 (and imenu-auto-rescan 565 (and imenu-auto-rescan
@@ -657,11 +657,15 @@ and speed-up matching.")
657(make-variable-buffer-local 'imenu-syntax-alist) 657(make-variable-buffer-local 'imenu-syntax-alist)
658 658
659(defun imenu-default-create-index-function () 659(defun imenu-default-create-index-function ()
660 "*Wrapper for index searching functions. 660 "*Default function to create an index alist of the current buffer.
661 661
662Moves point to end of buffer and then repeatedly calls 662The most general method is to move point to end of buffer, then repeatedly call
663`imenu-prev-index-position-function' and `imenu-extract-index-name-function'. 663`imenu-prev-index-position-function' and `imenu-extract-index-name-function'.
664Their results are gathered into an index alist." 664All the results returned by the latter are gathered into an index alist.
665This method is used if those two variables are non-nil.
666
667The alternate method, which is the one most often used, is to call
668`imenu--generic-function' with `imenu-generic-expression' as argument."
665 ;; These should really be done by setting imenu-create-index-function 669 ;; These should really be done by setting imenu-create-index-function
666 ;; in these major modes. But save that change for later. 670 ;; in these major modes. But save that change for later.
667 (cond ((and imenu-prev-index-position-function 671 (cond ((and imenu-prev-index-position-function
@@ -687,27 +691,6 @@ Their results are gathered into an index alist."
687 (t 691 (t
688 (error "This buffer cannot use `imenu-default-create-index-function'")))) 692 (error "This buffer cannot use `imenu-default-create-index-function'"))))
689 693
690;; Not used and would require cl at run time
691;; (defun imenu--flatten-index-alist (index-alist &optional concat-names prefix)
692;; ;; Takes a nested INDEX-ALIST and returns a flat index alist.
693;; ;; If optional CONCAT-NAMES is non-nil, then a nested index has its
694;; ;; name and a space concatenated to the names of the children.
695;; ;; Third argument PREFIX is for internal use only.
696;; (mapcan
697;; (lambda (item)
698;; (let* ((name (car item))
699;; (pos (cdr item))
700;; (new-prefix (and concat-names
701;; (if prefix
702;; (concat prefix imenu-level-separator name)
703;; name))))
704;; (cond
705;; ((or (markerp pos) (numberp pos))
706;; (list (cons new-prefix pos)))
707;; (t
708;; (imenu--flatten-index-alist pos new-prefix)))))
709;; index-alist))
710
711;;; 694;;;
712;;; Generic index gathering function. 695;;; Generic index gathering function.
713;;; 696;;;
@@ -724,7 +707,7 @@ for modes which use `imenu--generic-function'. If it is not set, but
724;; This function can be called with quitting disabled, 707;; This function can be called with quitting disabled,
725;; so it needs to be careful never to loop! 708;; so it needs to be careful never to loop!
726(defun imenu--generic-function (patterns) 709(defun imenu--generic-function (patterns)
727 "Return an index of the current buffer as an alist. 710 "Return an index alist of the current buffer based on PATTERNS.
728 711
729PATTERNS is an alist with elements that look like this: 712PATTERNS is an alist with elements that look like this:
730 (MENU-TITLE REGEXP INDEX) 713 (MENU-TITLE REGEXP INDEX)
@@ -732,9 +715,8 @@ or like this:
732 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...) 715 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
733with zero or more ARGUMENTS. The former format creates a simple 716with zero or more ARGUMENTS. The former format creates a simple
734element in the index alist when it matches; the latter creates a 717element in the index alist when it matches; the latter creates a
735special element of the form (NAME POSITION-MARKER FUNCTION 718special element of the form (INDEX-NAME POSITION-MARKER FUNCTION
736ARGUMENTS...) with FUNCTION and ARGUMENTS copied from 719ARGUMENTS...) with FUNCTION and ARGUMENTS copied from PATTERNS.
737`imenu-generic-expression'.
738 720
739MENU-TITLE is a string used as the title for the submenu or nil 721MENU-TITLE is a string used as the title for the submenu or nil
740if the entries are not nested. 722if the entries are not nested.
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 6bf84517bde..72c7a87f257 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,172 @@
12006-04-18 Bill Wohler <wohler@newt.com>
2
3 * mh-e.el (defcustom-mh, defface-mh, defgroup-mh, mh-face-data)
4 (mh-strip-package-version, mh-face-data, mh-inherit-face-flag)
5 (mh-min-colors-defined-flag): Do not unbind these macros and
6 variables. Nice idea, but too many nasty side-effects. These
7 macros are needed by [Cc]ustom-make-dependencies when creating the
8 MH-E customization groups in mh-cus-load.el. These disappeared
9 when the macros above were introduced. Besides, if a developer
10 were to try to show the help for a macro or variable they were
11 looking at and got [No match] when they did so, that would be bad.
12
132006-04-17 Bill Wohler <wohler@newt.com>
14
15 * mh-comp.el (mh-insert-x-mailer): Strip build number from
16 version in X-Mailer field (closes SF #1466481).
17
18 * mh-acros.el (mh-defun-compat): Rename to defun-mh in order that
19 variables and functions with the same name are found correctly by
20 find-func (invoked by clicking on the filename link in the *Help*
21 buffer).
22 (mh-defmacro-compat): Rename to defmacro-mh. Ditto.
23 * mh-e.el: (mh-defgroup): Rename to defgroup-mh. Ditto.
24 (mh-defcustom): Rename to defcustom-mh. Ditto.
25 (mh-defface): Rename to defface-mh. Ditto.
26 (mh-font-lock-add-keywords): Make changes according to these
27 renamings.
28
29 * mh-e.el, mh-compat.el, mh-gnus.el: Use the new names (closes SF
30 #1472029).
31
32 * mh-utils.el (mh-sub-folders-actual): Mention that folder must
33 have been processed by mh-normalize-folder-name.
34 (mh-folder-completion-function): Handle completion of folders with
35 absolute names. Also, when flag is t, display complete folder name
36 to provide proper highlighting in Emacs 22 now that
37 minibuffer-completing-file-name is nil (closes SF #1470518).
38 (mh-folder-completing-read): No longer set
39 minibuffer-completing-file-name to t. This was causing "Can't set
40 current directory errors" when browsing absolute file names.
41 Another benefit of this change is that SPC can be used for
42 completion again (closes SF #1470518).
43
442006-04-15 Bill Wohler <wohler@newt.com>
45
46 * mh-compat.el (mh-font-lock-add-keywords): Fix typo in docstring.
47
482006-04-14 Bill Wohler <wohler@newt.com>
49
50 * mh-funcs.el (view-exit-action): No need to wrap defvar with
51 eval-when-compile when shushing compiler.
52
53 * mh-mime.el (mh-identity-pgg-default-user-id): Ditto.
54
55 * mh-seq.el (view-exit-action): Ditto.
56
57 * mh-show.el (font-lock-auto-fontify): Ditto.
58
59 * mh-utils.el (mh-speed-flists-cache): Ditto
60
61 * mh-acros.el (struct, x, y): No need to wrap defvar with
62 eval-when-compile when shushing compiler, even when
63 mh-do-in-xemacs or another construct is used.
64
65 * mh-comp.el (sendmail-coding-system): Ditto.
66
67 * mh-e.el (mark-active): Ditto.
68
69 * mh-folder.el (desktop-save-buffer, font-lock-auto-fontify)
70 (image-load-path, font-lock-defaults): Ditto.
71
72 * mh-letter.el (image-load-path, font-lock-defaults): Ditto.
73
74 * mh-mime.el (dots, type, ov)
75 (mm-verify-function-alist, mm-decrypt-function-alist)
76 (pressed-details): Ditto.
77
78 * mh-search.el (pick-folder, mh-do-in-xemacs)
79 (mh-mairix-folder, mh-flists-search-folders)
80 (which-func-mode, mh-speed-flists-inhibit-flag): Ditto.
81
82 * mh-seq.el (tool-bar-mode): Ditto.
83
84 * mh-utils.el (completion-root-regexp)
85 (minibuffer-completing-file-name): Ditto.
86
87 * mh-xface.el (default-enable-multibyte-characters): Ditto.
88
89 * mh-compat.el (mh-font-lock-add-keywords): New alias for
90 font-lock-add-keywords. Returns nil on XEmacs.
91
92 * mh-e.el: Add MH-E function and variable keywords such as
93 mh-defun-compat and mh-defcustom to font-lock-keywords.
94
952006-04-13 Bill Wohler <wohler@newt.com>
96
97 * mh-e.el (customize-package-emacs-version-alist)
98 (mh-e, mh-alias, mh-folder, mh-folder-selection)
99 (mh-identity, mh-inc, mh-junk, mh-letter, mh-ranges)
100 (mh-scan-line-formats, mh-search, mh-sending-mail, )
101 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar)
102 (mh-hooks, mh-faces, mh-alias-completion-ignore-case-flag)
103 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma)
104 (mh-alias-insert-file, mh-alias-insertion-location)
105 (mh-alias-local-users, mh-alias-local-users-prefix)
106 (mh-alias-passwd-gecos-comma-separator-flag)
107 (mh-new-messages-folders, mh-ticked-messages-folders)
108 (mh-large-folder, mh-recenter-summary-flag)
109 (mh-recursive-folders-flag, mh-sortm-args)
110 (mh-default-folder-for-message-function, )
111 (mh-default-folder-list, mh-default-folder-must-exist-flag)
112 (mh-default-folder-prefix, mh-identity-list)
113 (mh-auto-fields-list, mh-auto-fields-prompt-flag)
114 (mh-identity-default, mh-identity-handlers, mh-inc-prog)
115 (mh-inc-spool-list, mh-junk-background, mh-junk-disposition)
116 (mh-junk-program, mh-compose-insertion)
117 (mh-compose-skipped-header-fields)
118 (mh-compose-space-does-completion-flag)
119 (mh-delete-yanked-msg-window-flag)
120 (mh-extract-from-attribution-verb, mh-ins-buf-prefix)
121 (mh-letter-complete-function, mh-letter-fill-column)
122 (mh-mml-method-default, mh-signature-file-name)
123 (mh-signature-separator-flag, mh-x-face-file, )
124 (mh-yank-behavior, mh-interpret-number-as-range-flag)
125 (mh-adaptive-cmd-note-flag, mh-scan-format-file, mh-scan-prog)
126 (mh-search-program, mh-compose-forward-as-mime-flag)
127 (mh-compose-letter-function, mh-compose-prompt-flag)
128 (mh-forward-subject-format, mh-insert-x-mailer-flag)
129 (mh-redist-full-contents-flag, mh-reply-default-reply-to)
130 (mh-reply-show-message-flag, )
131 (mh-refile-preserves-sequences-flag, mh-tick-seq)
132 (mh-update-sequences-after-mh-show-flag)
133 (mh-bury-show-buffer-flag, mh-clean-message-header-flag)
134 (mh-decode-mime-flag, )
135 (mh-display-buttons-for-alternatives-flag)
136 (mh-display-buttons-for-inline-parts-flag)
137 (mh-do-not-confirm-flag, mh-fetch-x-image-url)
138 (mh-graphical-smileys-flag, mh-graphical-emphasis-flag)
139 (mh-highlight-citation-style, mh-invisible-header-fields)
140 (mh-invisible-header-fields-default, mh-lpr-command-format)
141 (mh-max-inline-image-height, mh-max-inline-image-width)
142 (mh-mhl-format-file, mh-mime-save-parts-default-directory)
143 (mh-print-background-flag, mh-show-maximum-size)
144 (mh-show-use-xface-flag, mh-store-default-directory)
145 (mh-summary-height, mh-speed-update-interval)
146 (mh-show-threads-flag, mh-tool-bar-search-function)
147 (mh-defcustom, mh-after-commands-processed-hook)
148 (mh-alias-reloaded-hook, mh-before-commands-processed-hook)
149 (mh-before-quit-hook, mh-before-send-letter-hook)
150 (mh-delete-msg-hook, mh-find-path-hook, mh-folder-mode-hook)
151 (mh-forward-hook, mh-inc-folder-hook, )
152 (mh-insert-signature-hook, )
153 (mh-kill-folder-suppress-prompt-hooks, mh-letter-mode-hook)
154 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook)
155 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook)
156 (mh-unseen-updated-hook, mh-folder-address, mh-folder-body)
157 (mh-folder-cur-msg-number, mh-folder-date, mh-folder-deleted)
158 (mh-folder-followup, mh-folder-msg-number, mh-folder-refiled)
159 (mh-folder-sent-to-me-hint, mh-folder-sent-to-me-sender)
160 (mh-folder-subject, mh-folder-tick, mh-folder-to)
161 (mh-letter-header-field, mh-search-folder, mh-show-cc)
162 (mh-show-date, mh-show-from, mh-show-header, mh-show-pgg-bad)
163 (mh-show-pgg-good, mh-show-pgg-unknown, mh-show-signature)
164 (mh-show-subject, mh-show-to, mh-show-xface, )
165 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages)
166 (mh-speedbar-selected-folder)
167 (mh-speedbar-selected-folder-with-unseen-messages): Use dotted
168 notation in :package-version keyword.
169
12006-04-07 Bill Wohler <wohler@newt.com> 1702006-04-07 Bill Wohler <wohler@newt.com>
2 171
3 * mh-e.el (mh-path, mh-variant): Define with mh-defcustom and add 172 * mh-e.el (mh-path, mh-variant): Define with mh-defcustom and add
@@ -21,7 +190,7 @@
21 (mh-scan-line-formats, mh-search, mh-sending-mail) 190 (mh-scan-line-formats, mh-search, mh-sending-mail)
22 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar) 191 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar)
23 (mh-hooks, mh-faces): Add :package-version keyword to these 192 (mh-hooks, mh-faces): Add :package-version keyword to these
24 groups. 193 groups (closes SF #1452724).
25 (mh-alias-completion-ignore-case-flag) 194 (mh-alias-completion-ignore-case-flag)
26 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma) 195 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma)
27 (mh-alias-insert-file, mh-alias-insertion-location) 196 (mh-alias-insert-file, mh-alias-insertion-location)
@@ -67,7 +236,7 @@
67 (mh-show-use-xface-flag, mh-store-default-directory) 236 (mh-show-use-xface-flag, mh-store-default-directory)
68 (mh-summary-height, mh-speed-update-interval) 237 (mh-summary-height, mh-speed-update-interval)
69 (mh-show-threads-flag, mh-tool-bar-search-function): Add 238 (mh-show-threads-flag, mh-tool-bar-search-function): Add
70 :package-version keyword to these options. 239 :package-version keyword to these options (closes SF #1452724).
71 (mh-after-commands-processed-hook) 240 (mh-after-commands-processed-hook)
72 (mh-alias-reloaded-hook, mh-before-commands-processed-hook) 241 (mh-alias-reloaded-hook, mh-before-commands-processed-hook)
73 (mh-before-quit-hook, mh-before-send-letter-hook) 242 (mh-before-quit-hook, mh-before-send-letter-hook)
@@ -78,7 +247,7 @@
78 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook) 247 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook)
79 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook) 248 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook)
80 (mh-unseen-updated-hook): Add :package-version keyword to these 249 (mh-unseen-updated-hook): Add :package-version keyword to these
81 hooks. 250 hooks (closes SF #1452724).
82 (mh-min-colors-defined-flag) 251 (mh-min-colors-defined-flag)
83 (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number) 252 (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number)
84 (mh-folder-date, mh-folder-deleted, mh-folder-followup) 253 (mh-folder-date, mh-folder-deleted, mh-folder-followup)
@@ -92,10 +261,10 @@
92 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages) 261 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages)
93 (mh-speedbar-selected-folder) 262 (mh-speedbar-selected-folder)
94 (mh-speedbar-selected-folder-with-unseen-messages): : Add 263 (mh-speedbar-selected-folder-with-unseen-messages): : Add
95 :package-version keyword to these faces. 264 :package-version keyword to these faces (closes SF #1452724).
96 265
97 * mh-tool-bar.el (mh-tool-bar-define): Added commented-out 266 * mh-tool-bar.el (mh-tool-bar-define): Added commented-out
98 :package-version keywords. 267 :package-version keywords (closes SF #1452724).
99 268
1002006-03-28 Bill Wohler <wohler@newt.com> 2692006-03-28 Bill Wohler <wohler@newt.com>
101 270
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 8f38abc56ee..9fa69fae5d9 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -82,7 +82,7 @@ loads \"cl\" appropriately."
82 (funcall ',function ,@args)))) 82 (funcall ',function ,@args))))
83 83
84;;;###mh-autoload 84;;;###mh-autoload
85(defmacro mh-defun-compat (name function arg-list &rest body) 85(defmacro defun-mh (name function arg-list &rest body)
86 "Create function NAME. 86 "Create function NAME.
87If FUNCTION exists, then NAME becomes an alias for FUNCTION. 87If FUNCTION exists, then NAME becomes an alias for FUNCTION.
88Otherwise, create function NAME with ARG-LIST and BODY." 88Otherwise, create function NAME with ARG-LIST and BODY."
@@ -90,10 +90,10 @@ Otherwise, create function NAME with ARG-LIST and BODY."
90 (if defined-p 90 (if defined-p
91 `(defalias ',name ',function) 91 `(defalias ',name ',function)
92 `(defun ,name ,arg-list ,@body)))) 92 `(defun ,name ,arg-list ,@body))))
93(put 'mh-defun-compat 'lisp-indent-function 'defun) 93(put 'defun-mh 'lisp-indent-function 'defun)
94 94
95;;;###mh-autoload 95;;;###mh-autoload
96(defmacro mh-defmacro-compat (name macro arg-list &rest body) 96(defmacro defmacro-mh (name macro arg-list &rest body)
97 "Create macro NAME. 97 "Create macro NAME.
98If MACRO exists, then NAME becomes an alias for MACRO. 98If MACRO exists, then NAME becomes an alias for MACRO.
99Otherwise, create macro NAME with ARG-LIST and BODY." 99Otherwise, create macro NAME with ARG-LIST and BODY."
@@ -101,7 +101,7 @@ Otherwise, create macro NAME with ARG-LIST and BODY."
101 (if defined-p 101 (if defined-p
102 `(defalias ',name ',macro) 102 `(defalias ',name ',macro)
103 `(defmacro ,name ,arg-list ,@body)))) 103 `(defmacro ,name ,arg-list ,@body))))
104(put 'mh-defmacro-compat 'lisp-indent-function 'defun) 104(put 'defmacro-mh 'lisp-indent-function 'defun)
105 105
106 106
107 107
@@ -130,7 +130,9 @@ check if variable `transient-mark-mode' is active."
130 (boundp 'mark-active) mark-active)))) 130 (boundp 'mark-active) mark-active))))
131 131
132;; Shush compiler. 132;; Shush compiler.
133(eval-when-compile (mh-do-in-xemacs (defvar struct) (defvar x) (defvar y))) 133(defvar struct) ; XEmacs
134(defvar x) ; XEmacs
135(defvar y) ; XEmacs
134 136
135;;;###mh-autoload 137;;;###mh-autoload
136(defmacro mh-defstruct (name-spec &rest fields) 138(defmacro mh-defstruct (name-spec &rest fields)
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 27806dc9ab9..ad80e3be838 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -215,7 +215,7 @@ ignored."
215 (setq other-headers (cdr other-headers))))) 215 (setq other-headers (cdr other-headers)))))
216 216
217;; Shush compiler. 217;; Shush compiler.
218(eval-when-compile (mh-do-in-xemacs (defvar sendmail-coding-system))) 218(defvar sendmail-coding-system) ; XEmacs
219 219
220;;;###autoload 220;;;###autoload
221(defun mh-send-letter (&optional arg) 221(defun mh-send-letter (&optional arg)
@@ -912,7 +912,10 @@ The versions of MH-E, Emacs, and MH are shown."
912 (format "MH-E %s; %s; %sEmacs %s" 912 (format "MH-E %s; %s; %sEmacs %s"
913 mh-version mh-variant-in-use 913 mh-version mh-variant-in-use
914 (if mh-xemacs-flag "X" "GNU ") 914 (if mh-xemacs-flag "X" "GNU ")
915 (cond ((not mh-xemacs-flag) emacs-version) 915 (cond ((not mh-xemacs-flag)
916 (string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?"
917 emacs-version)
918 (match-string 0 emacs-version))
916 ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?" 919 ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?"
917 emacs-version) 920 emacs-version)
918 (match-string 0 emacs-version)) 921 (match-string 0 emacs-version))
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 256a8cfe831..b346a41fad7 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -40,7 +40,7 @@
40;; versions of Gnus. 40;; versions of Gnus.
41 41
42;; Items are listed alphabetically (except for mh-require which is 42;; Items are listed alphabetically (except for mh-require which is
43;; needed by a lesser character). 43;; needed sooner it would normally appear).
44 44
45(require 'mh-acros) 45(require 'mh-acros)
46 46
@@ -62,7 +62,7 @@ Simulate NOERROR argument in XEmacs which lacks it."
62 (load filename noerror t) 62 (load filename noerror t)
63 (load (format "%s" feature) noerror t))))) 63 (load (format "%s" feature) noerror t)))))
64 64
65(mh-defun-compat mh-assoc-string assoc-string (key list case-fold) 65(defun-mh mh-assoc-string assoc-string (key list case-fold)
66 "Like `assoc' but specifically for strings. 66 "Like `assoc' but specifically for strings.
67Case is ignored if CASE-FOLD is non-nil. 67Case is ignored if CASE-FOLD is non-nil.
68This function is used by Emacs versions that lack `assoc-string', 68This function is used by Emacs versions that lack `assoc-string',
@@ -77,7 +77,7 @@ introduced in Emacs 22."
77 'cancel-timer 77 'cancel-timer
78 'delete-itimer)) 78 'delete-itimer))
79 79
80(mh-defun-compat mh-display-color-cells display-color-cells (&optional display) 80(defun-mh mh-display-color-cells display-color-cells (&optional display)
81 "Return the number of color cells supported by DISPLAY. 81 "Return the number of color cells supported by DISPLAY.
82This function is used by XEmacs to return 2 when 82This function is used by XEmacs to return 2 when
83`device-color-cells' returns nil. This happens when compiling or 83`device-color-cells' returns nil. This happens when compiling or
@@ -115,7 +115,12 @@ introduced in Emacs 22."
115 `(face-background ,face ,frame) 115 `(face-background ,face ,frame)
116 `(face-background ,face ,frame ,inherit))) 116 `(face-background ,face ,frame ,inherit)))
117 117
118(mh-defun-compat mh-image-load-path-for-library 118(defun-mh mh-font-lock-add-keywords font-lock-add-keywords
119 (mode keywords &optional how)
120 "XEmacs does not have `font-lock-add-keywords'.
121This function returns nil on that system.")
122
123(defun-mh mh-image-load-path-for-library
119 image-load-path-for-library (library image &optional path no-error) 124 image-load-path-for-library (library image &optional path no-error)
120 "Return a suitable search path for images used by LIBRARY. 125 "Return a suitable search path for images used by LIBRARY.
121 126
@@ -210,7 +215,7 @@ compatibility with versions of Emacs that lack the variable
210 (nconc (list image-directory) 215 (nconc (list image-directory)
211 (delete image-directory (copy-sequence (or path load-path)))))) 216 (delete image-directory (copy-sequence (or path load-path))))))
212 217
213(mh-defun-compat mh-image-search-load-path 218(defun-mh mh-image-search-load-path
214 image-search-load-path (file &optional path) 219 image-search-load-path (file &optional path)
215 "Emacs 21 and XEmacs don't have `image-search-load-path'. 220 "Emacs 21 and XEmacs don't have `image-search-load-path'.
216This function returns nil on those systems." 221This function returns nil on those systems."
@@ -229,13 +234,13 @@ This function returns nil on those systems."
229 'point-at-eol)) 234 'point-at-eol))
230 235
231(mh-require 'mailabbrev nil t) 236(mh-require 'mailabbrev nil t)
232(mh-defun-compat mh-mail-abbrev-make-syntax-table 237(defun-mh mh-mail-abbrev-make-syntax-table
233 mail-abbrev-make-syntax-table () 238 mail-abbrev-make-syntax-table ()
234 "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'. 239 "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'.
235This function returns nil on those systems." 240This function returns nil on those systems."
236 nil) 241 nil)
237 242
238(mh-defun-compat mh-match-string-no-properties 243(defun-mh mh-match-string-no-properties
239 match-string-no-properties (num &optional string) 244 match-string-no-properties (num &optional string)
240 "Return string of text matched by last search, without text properties. 245 "Return string of text matched by last search, without text properties.
241This function is used by XEmacs that lacks `match-string-no-properties'. 246This function is used by XEmacs that lacks `match-string-no-properties'.
@@ -244,7 +249,7 @@ The argument STRING is ignored."
244 (buffer-substring-no-properties 249 (buffer-substring-no-properties
245 (match-beginning num) (match-end num))) 250 (match-beginning num) (match-end num)))
246 251
247(mh-defun-compat mh-replace-regexp-in-string replace-regexp-in-string 252(defun-mh mh-replace-regexp-in-string replace-regexp-in-string
248 (regexp rep string &optional fixedcase literal subexp start) 253 (regexp rep string &optional fixedcase literal subexp start)
249 "Replace REGEXP with REP everywhere in STRING and return result. 254 "Replace REGEXP with REP everywhere in STRING and return result.
250This function is used by XEmacs that lacks `replace-regexp-in-string'. 255This function is used by XEmacs that lacks `replace-regexp-in-string'.
@@ -264,7 +269,7 @@ The arguments FIXEDCASE, SUBEXP, and START, used by
264 "A list of characters that are _NOT_ reserved in the URL spec. 269 "A list of characters that are _NOT_ reserved in the URL spec.
265This is taken from RFC 2396.")) 270This is taken from RFC 2396."))
266 271
267(mh-defun-compat mh-url-hexify-string url-hexify-string (str) 272(defun-mh mh-url-hexify-string url-hexify-string (str)
268 "Escape characters in a string. 273 "Escape characters in a string.
269This is a copy of `url-hexify-string' from url-util.el in Emacs 274This is a copy of `url-hexify-string' from url-util.el in Emacs
27022; needed by Emacs 21." 27522; needed by Emacs 21."
@@ -278,7 +283,7 @@ This is a copy of `url-hexify-string' from url-util.el in Emacs
278 (char-to-string char))) 283 (char-to-string char)))
279 str "")) 284 str ""))
280 285
281(mh-defun-compat mh-view-mode-enter 286(defun-mh mh-view-mode-enter
282 view-mode-enter (&optional return-to exit-action) 287 view-mode-enter (&optional return-to exit-action)
283 "Enter View mode. 288 "Enter View mode.
284This function is used by XEmacs that lacks `view-mode-enter'. 289This function is used by XEmacs that lacks `view-mode-enter'.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index a2d0e85841b..9ae686d8950 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -109,6 +109,26 @@
109(require 'mh-buffers) 109(require 'mh-buffers)
110(require 'mh-compat) 110(require 'mh-compat)
111 111
112(mh-font-lock-add-keywords
113 'emacs-lisp-mode
114 (eval-when-compile
115 `((,(concat "(\\("
116 ;; Function declarations (use font-lock-function-name-face).
117 "\\(def\\(un\\|macro\\)-mh\\)\\|"
118 ;; Variable declarations (use font-lock-variable-name-face).
119 "\\(def\\(custom\\|face\\)-mh\\)\\|"
120 ;; Group declarations (use font-lock-type-face).
121 "\\(defgroup-mh\\)"
122 "\\)\\>"
123 ;; Any whitespace and defined object.
124 "[ \t'\(]*"
125 "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
126 (1 font-lock-keyword-face)
127 (7 (cond ((match-beginning 2) font-lock-function-name-face)
128 ((match-beginning 4) font-lock-variable-name-face)
129 (t font-lock-type-face))
130 nil t)))))
131
112 132
113 133
114;;; Global Variables 134;;; Global Variables
@@ -603,7 +623,7 @@ Output is expected to be shown to user, not parsed by MH-E."
603 (mh-exchange-point-and-mark-preserving-active-mark)) 623 (mh-exchange-point-and-mark-preserving-active-mark))
604 624
605;; Shush compiler. 625;; Shush compiler.
606(eval-when-compile (mh-do-in-xemacs (defvar mark-active))) 626(defvar mark-active) ; XEmacs
607 627
608(defun mh-exchange-point-and-mark-preserving-active-mark () 628(defun mh-exchange-point-and-mark-preserving-active-mark ()
609 "Put the mark where point is now, and point where the mark is now. 629 "Put the mark where point is now, and point where the mark is now.
@@ -664,7 +684,7 @@ ARGS is returned unchanged."
664 (t t)) 684 (t t))
665 collect keyword)))) 685 collect keyword))))
666 686
667(defmacro mh-defgroup (symbol members doc &rest args) 687(defmacro defgroup-mh (symbol members doc &rest args)
668 "Declare SYMBOL as a customization group containing MEMBERS. 688 "Declare SYMBOL as a customization group containing MEMBERS.
669See documentation for `defgroup' for a description of the arguments 689See documentation for `defgroup' for a description of the arguments
670SYMBOL, MEMBERS, DOC and ARGS. 690SYMBOL, MEMBERS, DOC and ARGS.
@@ -672,9 +692,9 @@ This macro is used by Emacs versions that lack the :package-version
672keyword, introduced in Emacs 22." 692keyword, introduced in Emacs 22."
673 (declare (doc-string 3)) 693 (declare (doc-string 3))
674 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args))) 694 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
675(put 'mh-defgroup 'lisp-indent-function 'defun) 695(put 'defgroup-mh 'lisp-indent-function 'defun)
676 696
677(defmacro mh-defcustom (symbol value doc &rest args) 697(defmacro defcustom-mh (symbol value doc &rest args)
678 "Declare SYMBOL as a customizable variable that defaults to VALUE. 698 "Declare SYMBOL as a customizable variable that defaults to VALUE.
679See documentation for `defcustom' for a description of the arguments 699See documentation for `defcustom' for a description of the arguments
680SYMBOL, VALUE, DOC and ARGS. 700SYMBOL, VALUE, DOC and ARGS.
@@ -682,9 +702,9 @@ This macro is used by Emacs versions that lack the :package-version
682keyword, introduced in Emacs 22." 702keyword, introduced in Emacs 22."
683 (declare (doc-string 3)) 703 (declare (doc-string 3))
684 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args))) 704 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
685(put 'mh-defcustom 'lisp-indent-function 'defun) 705(put 'defcustom-mh 'lisp-indent-function 'defun)
686 706
687(defmacro mh-defface (face spec doc &rest args) 707(defmacro defface-mh (face spec doc &rest args)
688 "Declare FACE as a customizable face that defaults to SPEC. 708 "Declare FACE as a customizable face that defaults to SPEC.
689See documentation for `defface' for a description of the arguments 709See documentation for `defface' for a description of the arguments
690FACE, SPEC, DOC and ARGS. 710FACE, SPEC, DOC and ARGS.
@@ -692,13 +712,13 @@ This macro is used by Emacs versions that lack the :package-version
692keyword, introduced in Emacs 22." 712keyword, introduced in Emacs 22."
693 (declare (doc-string 3)) 713 (declare (doc-string 3))
694 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args))) 714 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
695(put 'mh-defface 'lisp-indent-function 'defun) 715(put 'defface-mh 'lisp-indent-function 'defun)
696 716
697 717
698 718
699;;; Variant Support 719;;; Variant Support
700 720
701(mh-defcustom mh-path nil 721(defcustom-mh mh-path nil
702 "*Additional list of directories to search for MH. 722 "*Additional list of directories to search for MH.
703See `mh-variant'." 723See `mh-variant'."
704 :group 'mh-e 724 :group 'mh-e
@@ -912,7 +932,7 @@ finally GNU mailutils."
912 (mapconcat '(lambda (x) (format "%s" (car x))) 932 (mapconcat '(lambda (x) (format "%s" (car x)))
913 (mh-variants) " or ")))))) 933 (mh-variants) " or "))))))
914 934
915(mh-defcustom mh-variant 'autodetect 935(defcustom-mh mh-variant 'autodetect
916 "*Specifies the variant used by MH-E. 936 "*Specifies the variant used by MH-E.
917 937
918The default setting of this option is \"Auto-detect\" which means 938The default setting of this option is \"Auto-detect\" which means
@@ -989,148 +1009,148 @@ windows in the frame are removed."
989 1009
990(if (boundp 'customize-package-emacs-version-alist) 1010(if (boundp 'customize-package-emacs-version-alist)
991 (add-to-list 'customize-package-emacs-version-alist 1011 (add-to-list 'customize-package-emacs-version-alist
992 '(MH-E ("6.0" "22.1") ("6.1" "22.1") ("7.0" "22.1") 1012 '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
993 ("7.1" "22.1") ("7.2" "22.1") ("7.3" "22.1") 1013 ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1")
994 ("7.4" "22.1") ("8.0" "22.1")))) 1014 ("7.4" . "22.1") ("8.0" . "22.1"))))
995 1015
996 1016
997 1017
998;;; MH-E Customization Groups 1018;;; MH-E Customization Groups
999 1019
1000(mh-defgroup mh-e nil 1020(defgroup-mh mh-e nil
1001 "Emacs interface to the MH mail system. 1021 "Emacs interface to the MH mail system.
1002MH is the Rand Mail Handler. Other implementations include nmh 1022MH is the Rand Mail Handler. Other implementations include nmh
1003and GNU mailutils." 1023and GNU mailutils."
1004 :link '(custom-manual "(mh-e)Top") 1024 :link '(custom-manual "(mh-e)Top")
1005 :group 'mail 1025 :group 'mail
1006 :package-version '(MH-E "8.0")) 1026 :package-version '(MH-E . "8.0"))
1007 1027
1008(mh-defgroup mh-alias nil 1028(defgroup-mh mh-alias nil
1009 "Aliases." 1029 "Aliases."
1010 :link '(custom-manual "(mh-e)Aliases") 1030 :link '(custom-manual "(mh-e)Aliases")
1011 :prefix "mh-alias-" 1031 :prefix "mh-alias-"
1012 :group 'mh-e 1032 :group 'mh-e
1013 :package-version '(MH-E "7.1")) 1033 :package-version '(MH-E . "7.1"))
1014 1034
1015(mh-defgroup mh-folder nil 1035(defgroup-mh mh-folder nil
1016 "Organizing your mail with folders." 1036 "Organizing your mail with folders."
1017 :prefix "mh-" 1037 :prefix "mh-"
1018 :link '(custom-manual "(mh-e)Folders") 1038 :link '(custom-manual "(mh-e)Folders")
1019 :group 'mh-e 1039 :group 'mh-e
1020 :package-version '(MH-E "7.1")) 1040 :package-version '(MH-E . "7.1"))
1021 1041
1022(mh-defgroup mh-folder-selection nil 1042(defgroup-mh mh-folder-selection nil
1023 "Folder selection." 1043 "Folder selection."
1024 :prefix "mh-" 1044 :prefix "mh-"
1025 :link '(custom-manual "(mh-e)Folder Selection") 1045 :link '(custom-manual "(mh-e)Folder Selection")
1026 :group 'mh-e 1046 :group 'mh-e
1027 :package-version '(MH-E "8.0")) 1047 :package-version '(MH-E . "8.0"))
1028 1048
1029(mh-defgroup mh-identity nil 1049(defgroup-mh mh-identity nil
1030 "Identities." 1050 "Identities."
1031 :link '(custom-manual "(mh-e)Identities") 1051 :link '(custom-manual "(mh-e)Identities")
1032 :prefix "mh-identity-" 1052 :prefix "mh-identity-"
1033 :group 'mh-e 1053 :group 'mh-e
1034 :package-version '(MH-E "7.1")) 1054 :package-version '(MH-E . "7.1"))
1035 1055
1036(mh-defgroup mh-inc nil 1056(defgroup-mh mh-inc nil
1037 "Incorporating your mail." 1057 "Incorporating your mail."
1038 :prefix "mh-inc-" 1058 :prefix "mh-inc-"
1039 :link '(custom-manual "(mh-e)Incorporating Mail") 1059 :link '(custom-manual "(mh-e)Incorporating Mail")
1040 :group 'mh-e 1060 :group 'mh-e
1041 :package-version '(MH-E "8.0")) 1061 :package-version '(MH-E . "8.0"))
1042 1062
1043(mh-defgroup mh-junk nil 1063(defgroup-mh mh-junk nil
1044 "Dealing with junk mail." 1064 "Dealing with junk mail."
1045 :link '(custom-manual "(mh-e)Junk") 1065 :link '(custom-manual "(mh-e)Junk")
1046 :prefix "mh-junk-" 1066 :prefix "mh-junk-"
1047 :group 'mh-e 1067 :group 'mh-e
1048 :package-version '(MH-E "7.3")) 1068 :package-version '(MH-E . "7.3"))
1049 1069
1050(mh-defgroup mh-letter nil 1070(defgroup-mh mh-letter nil
1051 "Editing a draft." 1071 "Editing a draft."
1052 :prefix "mh-" 1072 :prefix "mh-"
1053 :link '(custom-manual "(mh-e)Editing Drafts") 1073 :link '(custom-manual "(mh-e)Editing Drafts")
1054 :group 'mh-e 1074 :group 'mh-e
1055 :package-version '(MH-E "7.1")) 1075 :package-version '(MH-E . "7.1"))
1056 1076
1057(mh-defgroup mh-ranges nil 1077(defgroup-mh mh-ranges nil
1058 "Ranges." 1078 "Ranges."
1059 :prefix "mh-" 1079 :prefix "mh-"
1060 :link '(custom-manual "(mh-e)Ranges") 1080 :link '(custom-manual "(mh-e)Ranges")
1061 :group 'mh-e 1081 :group 'mh-e
1062 :package-version '(MH-E "8.0")) 1082 :package-version '(MH-E . "8.0"))
1063 1083
1064(mh-defgroup mh-scan-line-formats nil 1084(defgroup-mh mh-scan-line-formats nil
1065 "Scan line formats." 1085 "Scan line formats."
1066 :link '(custom-manual "(mh-e)Scan Line Formats") 1086 :link '(custom-manual "(mh-e)Scan Line Formats")
1067 :prefix "mh-" 1087 :prefix "mh-"
1068 :group 'mh-e 1088 :group 'mh-e
1069 :package-version '(MH-E "8.0")) 1089 :package-version '(MH-E . "8.0"))
1070 1090
1071(mh-defgroup mh-search nil 1091(defgroup-mh mh-search nil
1072 "Searching." 1092 "Searching."
1073 :link '(custom-manual "(mh-e)Searching") 1093 :link '(custom-manual "(mh-e)Searching")
1074 :prefix "mh-search-" 1094 :prefix "mh-search-"
1075 :group 'mh-e 1095 :group 'mh-e
1076 :package-version '(MH-E "8.0")) 1096 :package-version '(MH-E . "8.0"))
1077 1097
1078(mh-defgroup mh-sending-mail nil 1098(defgroup-mh mh-sending-mail nil
1079 "Sending mail." 1099 "Sending mail."
1080 :prefix "mh-" 1100 :prefix "mh-"
1081 :link '(custom-manual "(mh-e)Sending Mail") 1101 :link '(custom-manual "(mh-e)Sending Mail")
1082 :group 'mh-e 1102 :group 'mh-e
1083 :package-version '(MH-E "8.0")) 1103 :package-version '(MH-E . "8.0"))
1084 1104
1085(mh-defgroup mh-sequences nil 1105(defgroup-mh mh-sequences nil
1086 "Sequences." 1106 "Sequences."
1087 :prefix "mh-" 1107 :prefix "mh-"
1088 :link '(custom-manual "(mh-e)Sequences") 1108 :link '(custom-manual "(mh-e)Sequences")
1089 :group 'mh-e 1109 :group 'mh-e
1090 :package-version '(MH-E "8.0")) 1110 :package-version '(MH-E . "8.0"))
1091 1111
1092(mh-defgroup mh-show nil 1112(defgroup-mh mh-show nil
1093 "Reading your mail." 1113 "Reading your mail."
1094 :prefix "mh-" 1114 :prefix "mh-"
1095 :link '(custom-manual "(mh-e)Reading Mail") 1115 :link '(custom-manual "(mh-e)Reading Mail")
1096 :group 'mh-e 1116 :group 'mh-e
1097 :package-version '(MH-E "7.1")) 1117 :package-version '(MH-E . "7.1"))
1098 1118
1099(mh-defgroup mh-speedbar nil 1119(defgroup-mh mh-speedbar nil
1100 "The speedbar." 1120 "The speedbar."
1101 :prefix "mh-speed-" 1121 :prefix "mh-speed-"
1102 :link '(custom-manual "(mh-e)Speedbar") 1122 :link '(custom-manual "(mh-e)Speedbar")
1103 :group 'mh-e 1123 :group 'mh-e
1104 :package-version '(MH-E "8.0")) 1124 :package-version '(MH-E . "8.0"))
1105 1125
1106(mh-defgroup mh-thread nil 1126(defgroup-mh mh-thread nil
1107 "Threading." 1127 "Threading."
1108 :prefix "mh-thread-" 1128 :prefix "mh-thread-"
1109 :link '(custom-manual "(mh-e)Threading") 1129 :link '(custom-manual "(mh-e)Threading")
1110 :group 'mh-e 1130 :group 'mh-e
1111 :package-version '(MH-E "8.0")) 1131 :package-version '(MH-E . "8.0"))
1112 1132
1113(mh-defgroup mh-tool-bar nil 1133(defgroup-mh mh-tool-bar nil
1114 "The tool bar" 1134 "The tool bar"
1115 :link '(custom-manual "(mh-e)Tool Bar") 1135 :link '(custom-manual "(mh-e)Tool Bar")
1116 :prefix "mh-" 1136 :prefix "mh-"
1117 :group 'mh-e 1137 :group 'mh-e
1118 :package-version '(MH-E "8.0")) 1138 :package-version '(MH-E . "8.0"))
1119 1139
1120(mh-defgroup mh-hooks nil 1140(defgroup-mh mh-hooks nil
1121 "MH-E hooks." 1141 "MH-E hooks."
1122 :link '(custom-manual "(mh-e)Top") 1142 :link '(custom-manual "(mh-e)Top")
1123 :prefix "mh-" 1143 :prefix "mh-"
1124 :group 'mh-e 1144 :group 'mh-e
1125 :package-version '(MH-E "7.1")) 1145 :package-version '(MH-E . "7.1"))
1126 1146
1127(mh-defgroup mh-faces nil 1147(defgroup-mh mh-faces nil
1128 "Faces used in MH-E." 1148 "Faces used in MH-E."
1129 :link '(custom-manual "(mh-e)Top") 1149 :link '(custom-manual "(mh-e)Top")
1130 :prefix "mh-" 1150 :prefix "mh-"
1131 :group 'faces 1151 :group 'faces
1132 :group 'mh-e 1152 :group 'mh-e
1133 :package-version '(MH-E "7.1")) 1153 :package-version '(MH-E . "7.1"))
1134 1154
1135 1155
1136 1156
@@ -1140,7 +1160,7 @@ and GNU mailutils."
1140 1160
1141;;; Aliases (:group 'mh-alias) 1161;;; Aliases (:group 'mh-alias)
1142 1162
1143(mh-defcustom mh-alias-completion-ignore-case-flag t 1163(defcustom-mh mh-alias-completion-ignore-case-flag t
1144 "*Non-nil means don't consider case significant in MH alias completion. 1164 "*Non-nil means don't consider case significant in MH alias completion.
1145 1165
1146As MH ignores case in the aliases, so too does MH-E. However, you 1166As MH ignores case in the aliases, so too does MH-E. However, you
@@ -1149,9 +1169,9 @@ used to segregate completion of your aliases. You might use
1149lowercase for mailing lists and uppercase for people." 1169lowercase for mailing lists and uppercase for people."
1150 :type 'boolean 1170 :type 'boolean
1151 :group 'mh-alias 1171 :group 'mh-alias
1152 :package-version '(MH-E "7.1")) 1172 :package-version '(MH-E . "7.1"))
1153 1173
1154(mh-defcustom mh-alias-expand-aliases-flag nil 1174(defcustom-mh mh-alias-expand-aliases-flag nil
1155 "*Non-nil means to expand aliases entered in the minibuffer. 1175 "*Non-nil means to expand aliases entered in the minibuffer.
1156 1176
1157In other words, aliases entered in the minibuffer will be 1177In other words, aliases entered in the minibuffer will be
@@ -1159,9 +1179,9 @@ expanded to the full address in the message draft. By default,
1159this expansion is not performed." 1179this expansion is not performed."
1160 :type 'boolean 1180 :type 'boolean
1161 :group 'mh-alias 1181 :group 'mh-alias
1162 :package-version '(MH-E "7.1")) 1182 :package-version '(MH-E . "7.1"))
1163 1183
1164(mh-defcustom mh-alias-flash-on-comma t 1184(defcustom-mh mh-alias-flash-on-comma t
1165 "*Specify whether to flash address or warn on translation. 1185 "*Specify whether to flash address or warn on translation.
1166 1186
1167This option controls the behavior when a [comma] is pressed while 1187This option controls the behavior when a [comma] is pressed while
@@ -1172,9 +1192,9 @@ does not display a warning if the alias is not found."
1172 (const :tag "Flash and Warn If No Alias" 1) 1192 (const :tag "Flash and Warn If No Alias" 1)
1173 (const :tag "Don't Flash Nor Warn If No Alias" nil)) 1193 (const :tag "Don't Flash Nor Warn If No Alias" nil))
1174 :group 'mh-alias 1194 :group 'mh-alias
1175 :package-version '(MH-E "7.1")) 1195 :package-version '(MH-E . "7.1"))
1176 1196
1177(mh-defcustom mh-alias-insert-file nil 1197(defcustom-mh mh-alias-insert-file nil
1178 "*Filename used to store a new MH-E alias. 1198 "*Filename used to store a new MH-E alias.
1179 1199
1180The default setting of this option is \"Use Aliasfile Profile 1200The default setting of this option is \"Use Aliasfile Profile
@@ -1186,9 +1206,9 @@ name, MH-E will prompt for one of them when MH-E adds an alias."
1186 (file :tag "Alias File") 1206 (file :tag "Alias File")
1187 (repeat :tag "List of Alias Files" file)) 1207 (repeat :tag "List of Alias Files" file))
1188 :group 'mh-alias 1208 :group 'mh-alias
1189 :package-version '(MH-E "7.1")) 1209 :package-version '(MH-E . "7.1"))
1190 1210
1191(mh-defcustom mh-alias-insertion-location 'sorted 1211(defcustom-mh mh-alias-insertion-location 'sorted
1192 "Specifies where new aliases are entered in alias files. 1212 "Specifies where new aliases are entered in alias files.
1193 1213
1194This option is set to \"Alphabetical\" by default. If you organize 1214This option is set to \"Alphabetical\" by default. If you organize
@@ -1198,9 +1218,9 @@ or \"Bottom\" of your alias file might be more appropriate."
1198 (const :tag "Top" top) 1218 (const :tag "Top" top)
1199 (const :tag "Bottom" bottom)) 1219 (const :tag "Bottom" bottom))
1200 :group 'mh-alias 1220 :group 'mh-alias
1201 :package-version '(MH-E "7.1")) 1221 :package-version '(MH-E . "7.1"))
1202 1222
1203(mh-defcustom mh-alias-local-users t 1223(defcustom-mh mh-alias-local-users t
1204 "*If on, local users are added to alias completion. 1224 "*If on, local users are added to alias completion.
1205 1225
1206Aliases are created from \"/etc/passwd\" entries with a user ID 1226Aliases are created from \"/etc/passwd\" entries with a user ID
@@ -1219,9 +1239,9 @@ password file. For example, use \"ypcat passwd\" to obtain the
1219NIS password file." 1239NIS password file."
1220 :type '(choice (boolean) (string)) 1240 :type '(choice (boolean) (string))
1221 :group 'mh-alias 1241 :group 'mh-alias
1222 :package-version '(MH-E "7.1")) 1242 :package-version '(MH-E . "7.1"))
1223 1243
1224(mh-defcustom mh-alias-local-users-prefix "local." 1244(defcustom-mh mh-alias-local-users-prefix "local."
1225 "*String prefixed to the real names of users from the password file. 1245 "*String prefixed to the real names of users from the password file.
1226This option can also be set to \"Use Login\". 1246This option can also be set to \"Use Login\".
1227 1247
@@ -1241,9 +1261,9 @@ turned off."
1241 :type '(choice (const :tag "Use Login" nil) 1261 :type '(choice (const :tag "Use Login" nil)
1242 (string)) 1262 (string))
1243 :group 'mh-alias 1263 :group 'mh-alias
1244 :package-version '(MH-E "7.4")) 1264 :package-version '(MH-E . "7.4"))
1245 1265
1246(mh-defcustom mh-alias-passwd-gecos-comma-separator-flag t 1266(defcustom-mh mh-alias-passwd-gecos-comma-separator-flag t
1247 "*Non-nil means the gecos field in the password file uses a comma separator. 1267 "*Non-nil means the gecos field in the password file uses a comma separator.
1248 1268
1249In the example in `mh-alias-local-users-prefix', commas are used 1269In the example in `mh-alias-local-users-prefix', commas are used
@@ -1253,11 +1273,11 @@ gecos field in your password file is not separated by commas and
1253whose contents may contain commas, you can turn this option off." 1273whose contents may contain commas, you can turn this option off."
1254 :type 'boolean 1274 :type 'boolean
1255 :group 'mh-alias 1275 :group 'mh-alias
1256 :package-version '(MH-E "7.4")) 1276 :package-version '(MH-E . "7.4"))
1257 1277
1258;;; Organizing Your Mail with Folders (:group 'mh-folder) 1278;;; Organizing Your Mail with Folders (:group 'mh-folder)
1259 1279
1260(mh-defcustom mh-new-messages-folders t 1280(defcustom-mh mh-new-messages-folders t
1261 "Folders searched for the \"unseen\" sequence. 1281 "Folders searched for the \"unseen\" sequence.
1262 1282
1263Set this option to \"Inbox\" to search the \"+inbox\" folder or 1283Set this option to \"Inbox\" to search the \"+inbox\" folder or
@@ -1270,9 +1290,9 @@ See also `mh-recursive-folders-flag'."
1270 (const :tag "All" nil) 1290 (const :tag "All" nil)
1271 (repeat :tag "Choose Folders" (string :tag "Folder"))) 1291 (repeat :tag "Choose Folders" (string :tag "Folder")))
1272 :group 'mh-folder 1292 :group 'mh-folder
1273 :package-version '(MH-E "8.0")) 1293 :package-version '(MH-E . "8.0"))
1274 1294
1275(mh-defcustom mh-ticked-messages-folders t 1295(defcustom-mh mh-ticked-messages-folders t
1276 "Folders searched for `mh-tick-seq'. 1296 "Folders searched for `mh-tick-seq'.
1277 1297
1278Set this option to \"Inbox\" to search the \"+inbox\" folder or 1298Set this option to \"Inbox\" to search the \"+inbox\" folder or
@@ -1285,9 +1305,9 @@ See also `mh-recursive-folders-flag'."
1285 (const :tag "All" nil) 1305 (const :tag "All" nil)
1286 (repeat :tag "Choose Folders" (string :tag "Folder"))) 1306 (repeat :tag "Choose Folders" (string :tag "Folder")))
1287 :group 'mh-folder 1307 :group 'mh-folder
1288 :package-version '(MH-E "8.0")) 1308 :package-version '(MH-E . "8.0"))
1289 1309
1290(mh-defcustom mh-large-folder 200 1310(defcustom-mh mh-large-folder 200
1291 "The number of messages that indicates a large folder. 1311 "The number of messages that indicates a large folder.
1292 1312
1293If a folder is deemed to be large, that is the number of messages 1313If a folder is deemed to be large, that is the number of messages
@@ -1297,24 +1317,24 @@ is not automatically threaded, if it is large. If set to nil all
1297folders are treated as if they are small." 1317folders are treated as if they are small."
1298 :type '(choice (const :tag "No Limit") integer) 1318 :type '(choice (const :tag "No Limit") integer)
1299 :group 'mh-folder 1319 :group 'mh-folder
1300 :package-version '(MH-E "7.0")) 1320 :package-version '(MH-E . "7.0"))
1301 1321
1302(mh-defcustom mh-recenter-summary-flag nil 1322(defcustom-mh mh-recenter-summary-flag nil
1303 "*Non-nil means to recenter the summary window. 1323 "*Non-nil means to recenter the summary window.
1304 1324
1305If this option is turned on, recenter the summary window when the 1325If this option is turned on, recenter the summary window when the
1306show window is toggled off." 1326show window is toggled off."
1307 :type 'boolean 1327 :type 'boolean
1308 :group 'mh-folder 1328 :group 'mh-folder
1309 :package-version '(MH-E "7.0")) 1329 :package-version '(MH-E . "7.0"))
1310 1330
1311(mh-defcustom mh-recursive-folders-flag nil 1331(defcustom-mh mh-recursive-folders-flag nil
1312 "*Non-nil means that commands which operate on folders do so recursively." 1332 "*Non-nil means that commands which operate on folders do so recursively."
1313 :type 'boolean 1333 :type 'boolean
1314 :group 'mh-folder 1334 :group 'mh-folder
1315 :package-version '(MH-E "7.0")) 1335 :package-version '(MH-E . "7.0"))
1316 1336
1317(mh-defcustom mh-sortm-args nil 1337(defcustom-mh mh-sortm-args nil
1318 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>. 1338 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>.
1319 1339
1320This option is consulted when a prefix argument is used with 1340This option is consulted when a prefix argument is used with
@@ -1324,11 +1344,11 @@ an alternate view. For example, \"'(\"-nolimit\" \"-textfield\"
1324\"subject\")\" is a useful setting." 1344\"subject\")\" is a useful setting."
1325 :type 'string 1345 :type 'string
1326 :group 'mh-folder 1346 :group 'mh-folder
1327 :package-version '(MH-E "8.0")) 1347 :package-version '(MH-E . "8.0"))
1328 1348
1329;;; Folder Selection (:group 'mh-folder-selection) 1349;;; Folder Selection (:group 'mh-folder-selection)
1330 1350
1331(mh-defcustom mh-default-folder-for-message-function nil 1351(defcustom-mh mh-default-folder-for-message-function nil
1332 "Function to select a default folder for refiling or \"Fcc:\". 1352 "Function to select a default folder for refiling or \"Fcc:\".
1333 1353
1334When this function is called, the current buffer contains the message 1354When this function is called, the current buffer contains the message
@@ -1338,9 +1358,9 @@ sign. It can also return nil so that the last folder name is used as
1338the default, or an empty string to suppress the default entirely." 1358the default, or an empty string to suppress the default entirely."
1339 :type 'function 1359 :type 'function
1340 :group 'mh-folder-selection 1360 :group 'mh-folder-selection
1341 :package-version '(MH-E "8.0")) 1361 :package-version '(MH-E . "8.0"))
1342 1362
1343(mh-defcustom mh-default-folder-list nil 1363(defcustom-mh mh-default-folder-list nil
1344 "*List of addresses and folders. 1364 "*List of addresses and folders.
1345 1365
1346The folder name associated with the first address found in this 1366The folder name associated with the first address found in this
@@ -1356,9 +1376,9 @@ for more information."
1356 (string :tag "Folder") 1376 (string :tag "Folder")
1357 (boolean :tag "Check Recipient"))) 1377 (boolean :tag "Check Recipient")))
1358 :group 'mh-folder-selection 1378 :group 'mh-folder-selection
1359 :package-version '(MH-E "7.2")) 1379 :package-version '(MH-E . "7.2"))
1360 1380
1361(mh-defcustom mh-default-folder-must-exist-flag t 1381(defcustom-mh mh-default-folder-must-exist-flag t
1362 "*Non-nil means guessed folder name must exist to be used. 1382 "*Non-nil means guessed folder name must exist to be used.
1363 1383
1364If the derived folder does not exist, and this option is on, then 1384If the derived folder does not exist, and this option is on, then
@@ -1370,9 +1390,9 @@ See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1370for more information." 1390for more information."
1371 :type 'boolean 1391 :type 'boolean
1372 :group 'mh-folder-selection 1392 :group 'mh-folder-selection
1373 :package-version '(MH-E "7.2")) 1393 :package-version '(MH-E . "7.2"))
1374 1394
1375(mh-defcustom mh-default-folder-prefix "" 1395(defcustom-mh mh-default-folder-prefix ""
1376 "*Prefix used for folder names generated from aliases. 1396 "*Prefix used for folder names generated from aliases.
1377The prefix is used to prevent clutter in your mail directory. 1397The prefix is used to prevent clutter in your mail directory.
1378 1398
@@ -1380,7 +1400,7 @@ See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1380for more information." 1400for more information."
1381 :type 'string 1401 :type 'string
1382 :group 'mh-folder-selection 1402 :group 'mh-folder-selection
1383 :package-version '(MH-E "7.2")) 1403 :package-version '(MH-E . "7.2"))
1384 1404
1385;;; Identities (:group 'mh-identity) 1405;;; Identities (:group 'mh-identity)
1386 1406
@@ -1391,7 +1411,7 @@ for more information."
1391Real definition will take effect when mh-identity is loaded." 1411Real definition will take effect when mh-identity is loaded."
1392 nil))) 1412 nil)))
1393 1413
1394(mh-defcustom mh-identity-list nil 1414(defcustom-mh mh-identity-list nil
1395 "*List of identities. 1415 "*List of identities.
1396 1416
1397To customize this option, click on the \"INS\" button and enter a label 1417To customize this option, click on the \"INS\" button and enter a label
@@ -1458,9 +1478,9 @@ fashion."
1458 (set-default symbol value) 1478 (set-default symbol value)
1459 (mh-identity-make-menu-no-autoload)) 1479 (mh-identity-make-menu-no-autoload))
1460 :group 'mh-identity 1480 :group 'mh-identity
1461 :package-version '(MH-E "7.1")) 1481 :package-version '(MH-E . "7.1"))
1462 1482
1463(mh-defcustom mh-auto-fields-list nil 1483(defcustom-mh mh-auto-fields-list nil
1464 "List of recipients for which header lines are automatically inserted. 1484 "List of recipients for which header lines are automatically inserted.
1465 1485
1466This option can be used to set the identity depending on the 1486This option can be used to set the identity depending on the
@@ -1519,16 +1539,16 @@ as the result is undefined."
1519 (string :tag "Field") 1539 (string :tag "Field")
1520 (string :tag "Value")))))) 1540 (string :tag "Value"))))))
1521 :group 'mh-identity 1541 :group 'mh-identity
1522 :package-version '(MH-E "7.3")) 1542 :package-version '(MH-E . "7.3"))
1523 1543
1524(mh-defcustom mh-auto-fields-prompt-flag t 1544(defcustom-mh mh-auto-fields-prompt-flag t
1525 "*Non-nil means to prompt before sending if fields inserted. 1545 "*Non-nil means to prompt before sending if fields inserted.
1526See `mh-auto-fields-list'." 1546See `mh-auto-fields-list'."
1527 :type 'boolean 1547 :type 'boolean
1528 :group 'mh-identity 1548 :group 'mh-identity
1529 :package-version '(MH-E "8.0")) 1549 :package-version '(MH-E . "8.0"))
1530 1550
1531(mh-defcustom mh-identity-default nil 1551(defcustom-mh mh-identity-default nil
1532 "Default identity to use when `mh-letter-mode' is called. 1552 "Default identity to use when `mh-letter-mode' is called.
1533See `mh-identity-list'." 1553See `mh-identity-list'."
1534 :type (append 1554 :type (append
@@ -1537,9 +1557,9 @@ See `mh-identity-list'."
1537 (mapcar (function (lambda (arg) `(const ,arg))) 1557 (mapcar (function (lambda (arg) `(const ,arg)))
1538 (mapcar 'car mh-identity-list)))) 1558 (mapcar 'car mh-identity-list))))
1539 :group 'mh-identity 1559 :group 'mh-identity
1540 :package-version '(MH-E "7.1")) 1560 :package-version '(MH-E . "7.1"))
1541 1561
1542(mh-defcustom mh-identity-handlers 1562(defcustom-mh mh-identity-handlers
1543 '(("From" . mh-identity-handler-top) 1563 '(("From" . mh-identity-handler-top)
1544 (":default" . mh-identity-handler-bottom) 1564 (":default" . mh-identity-handler-bottom)
1545 (":attribution-verb" . mh-identity-handler-attribution-verb) 1565 (":attribution-verb" . mh-identity-handler-attribution-verb)
@@ -1571,11 +1591,11 @@ fields (for example, \":signature\"), and the ACTION 'remove or
1571containing the VALUE for the field is given." 1591containing the VALUE for the field is given."
1572 :type '(repeat (cons (string :tag "Field") function)) 1592 :type '(repeat (cons (string :tag "Field") function))
1573 :group 'mh-identity 1593 :group 'mh-identity
1574 :package-version '(MH-E "8.0")) 1594 :package-version '(MH-E . "8.0"))
1575 1595
1576;;; Incorporating Your Mail (:group 'mh-inc) 1596;;; Incorporating Your Mail (:group 'mh-inc)
1577 1597
1578(mh-defcustom mh-inc-prog "inc" 1598(defcustom-mh mh-inc-prog "inc"
1579 "*Program to incorporate new mail into a folder. 1599 "*Program to incorporate new mail into a folder.
1580 1600
1581This program generates a one-line summary for each of the new 1601This program generates a one-line summary for each of the new
@@ -1585,7 +1605,7 @@ to be in the `mh-progs' directory. You may also link a file to
1585several scan line format variables appropriately." 1605several scan line format variables appropriately."
1586 :type 'string 1606 :type 'string
1587 :group 'mh-inc 1607 :group 'mh-inc
1588 :package-version '(MH-E "6.0")) 1608 :package-version '(MH-E . "6.0"))
1589 1609
1590(eval-and-compile 1610(eval-and-compile
1591 (unless (fboundp 'mh-inc-spool-make-no-autoload) 1611 (unless (fboundp 'mh-inc-spool-make-no-autoload)
@@ -1594,7 +1614,7 @@ several scan line format variables appropriately."
1594Real definition will take effect when mh-inc is loaded." 1614Real definition will take effect when mh-inc is loaded."
1595 nil))) 1615 nil)))
1596 1616
1597(mh-defcustom mh-inc-spool-list nil 1617(defcustom-mh mh-inc-spool-list nil
1598 "*Alternate spool files. 1618 "*Alternate spool files.
1599 1619
1600You can use the `mh-inc-spool-list' variable to direct MH-E to 1620You can use the `mh-inc-spool-list' variable to direct MH-E to
@@ -1635,7 +1655,7 @@ fashion."
1635 (set-default symbol value) 1655 (set-default symbol value)
1636 (mh-inc-spool-make-no-autoload)) 1656 (mh-inc-spool-make-no-autoload))
1637 :group 'mh-inc 1657 :group 'mh-inc
1638 :package-version '(MH-E "7.3")) 1658 :package-version '(MH-E . "7.3"))
1639 1659
1640;;; Dealing with Junk Mail (:group 'mh-junk) 1660;;; Dealing with Junk Mail (:group 'mh-junk)
1641 1661
@@ -1667,7 +1687,7 @@ The function is always called with SYMBOL bound to
1667 until (executable-find (symbol-name (car element))) 1687 until (executable-find (symbol-name (car element)))
1668 finally return (car element))))) 1688 finally return (car element)))))
1669 1689
1670(mh-defcustom mh-junk-background nil 1690(defcustom-mh mh-junk-background nil
1671 "If on, spam programs are run in background. 1691 "If on, spam programs are run in background.
1672 1692
1673By default, the programs are run in the foreground, but this can 1693By default, the programs are run in the foreground, but this can
@@ -1677,16 +1697,16 @@ you might try turning on this option."
1677 :type '(choice (const :tag "Off" nil) 1697 :type '(choice (const :tag "Off" nil)
1678 (const :tag "On" 0)) 1698 (const :tag "On" 0))
1679 :group 'mh-junk 1699 :group 'mh-junk
1680 :package-version '(MH-E "8.0")) 1700 :package-version '(MH-E . "8.0"))
1681 1701
1682(mh-defcustom mh-junk-disposition nil 1702(defcustom-mh mh-junk-disposition nil
1683 "Disposition of junk mail." 1703 "Disposition of junk mail."
1684 :type '(choice (const :tag "Delete Spam" nil) 1704 :type '(choice (const :tag "Delete Spam" nil)
1685 (string :tag "Spam Folder")) 1705 (string :tag "Spam Folder"))
1686 :group 'mh-junk 1706 :group 'mh-junk
1687 :package-version '(MH-E "8.0")) 1707 :package-version '(MH-E . "8.0"))
1688 1708
1689(mh-defcustom mh-junk-program nil 1709(defcustom-mh mh-junk-program nil
1690 "Spam program that MH-E should use. 1710 "Spam program that MH-E should use.
1691 1711
1692The default setting of this option is \"Auto-detect\" which means 1712The default setting of this option is \"Auto-detect\" which means
@@ -1700,11 +1720,11 @@ bogofilter, then you can set this option to \"Bogofilter\"."
1700 (const :tag "SpamProbe" spamprobe)) 1720 (const :tag "SpamProbe" spamprobe))
1701 :set 'mh-junk-choose 1721 :set 'mh-junk-choose
1702 :group 'mh-junk 1722 :group 'mh-junk
1703 :package-version '(MH-E "7.3")) 1723 :package-version '(MH-E . "7.3"))
1704 1724
1705;;; Editing a Draft (:group 'mh-letter) 1725;;; Editing a Draft (:group 'mh-letter)
1706 1726
1707(mh-defcustom mh-compose-insertion (if (locate-library "mml") 'mml 'mh) 1727(defcustom-mh mh-compose-insertion (if (locate-library "mml") 'mml 'mh)
1708 "Type of tags used when composing MIME messages. 1728 "Type of tags used when composing MIME messages.
1709 1729
1710In addition to MH-style directives, MH-E also supports MML (MIME 1730In addition to MH-style directives, MH-E also supports MML (MIME
@@ -1716,23 +1736,23 @@ MH-style directives are preferred."
1716 :type '(choice (const :tag "MML" mml) 1736 :type '(choice (const :tag "MML" mml)
1717 (const :tag "MH" mh)) 1737 (const :tag "MH" mh))
1718 :group 'mh-letter 1738 :group 'mh-letter
1719 :package-version '(MH-E "7.0")) 1739 :package-version '(MH-E . "7.0"))
1720 1740
1721(mh-defcustom mh-compose-skipped-header-fields 1741(defcustom-mh mh-compose-skipped-header-fields
1722 '("From" "Organization" "References" "In-Reply-To" 1742 '("From" "Organization" "References" "In-Reply-To"
1723 "X-Face" "Face" "X-Image-URL" "X-Mailer") 1743 "X-Face" "Face" "X-Image-URL" "X-Mailer")
1724 "List of header fields to skip over when navigating in draft." 1744 "List of header fields to skip over when navigating in draft."
1725 :type '(repeat (string :tag "Field")) 1745 :type '(repeat (string :tag "Field"))
1726 :group 'mh-letter 1746 :group 'mh-letter
1727 :package-version '(MH-E "7.4")) 1747 :package-version '(MH-E . "7.4"))
1728 1748
1729(mh-defcustom mh-compose-space-does-completion-flag nil 1749(defcustom-mh mh-compose-space-does-completion-flag nil
1730 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header." 1750 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header."
1731 :type 'boolean 1751 :type 'boolean
1732 :group 'mh-letter 1752 :group 'mh-letter
1733 :package-version '(MH-E "7.4")) 1753 :package-version '(MH-E . "7.4"))
1734 1754
1735(mh-defcustom mh-delete-yanked-msg-window-flag nil 1755(defcustom-mh mh-delete-yanked-msg-window-flag nil
1736 "*Non-nil means delete any window displaying the message. 1756 "*Non-nil means delete any window displaying the message.
1737 1757
1738This deletes the window containing the original message after 1758This deletes the window containing the original message after
@@ -1740,9 +1760,9 @@ yanking it with \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make
1740more room on your screen for your reply." 1760more room on your screen for your reply."
1741 :type 'boolean 1761 :type 'boolean
1742 :group 'mh-letter 1762 :group 'mh-letter
1743 :package-version '(MH-E "7.0")) 1763 :package-version '(MH-E . "7.0"))
1744 1764
1745(mh-defcustom mh-extract-from-attribution-verb "wrote:" 1765(defcustom-mh mh-extract-from-attribution-verb "wrote:"
1746 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. 1766 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1747 1767
1748The attribution consists of the sender's name and email address 1768The attribution consists of the sender's name and email address
@@ -1754,9 +1774,9 @@ followed by the content of this option. This option can be set to
1754 (const "schrieb:") 1774 (const "schrieb:")
1755 (string :tag "Custom String")) 1775 (string :tag "Custom String"))
1756 :group 'mh-letter 1776 :group 'mh-letter
1757 :package-version '(MH-E "7.0")) 1777 :package-version '(MH-E . "7.0"))
1758 1778
1759(mh-defcustom mh-ins-buf-prefix "> " 1779(defcustom-mh mh-ins-buf-prefix "> "
1760 "*String to put before each line of a yanked or inserted message. 1780 "*String to put before each line of a yanked or inserted message.
1761 1781
1762The prefix \"> \" is the default setting of this option. I 1782The prefix \"> \" is the default setting of this option. I
@@ -1770,9 +1790,9 @@ flavors of `mh-yank-behavior' or you have added a
1770`mail-citation-hook'." 1790`mail-citation-hook'."
1771 :type 'string 1791 :type 'string
1772 :group 'mh-letter 1792 :group 'mh-letter
1773 :package-version '(MH-E "6.0")) 1793 :package-version '(MH-E . "6.0"))
1774 1794
1775(mh-defcustom mh-letter-complete-function 'ispell-complete-word 1795(defcustom-mh mh-letter-complete-function 'ispell-complete-word
1776 "*Function to call when completing outside of address or folder fields. 1796 "*Function to call when completing outside of address or folder fields.
1777 1797
1778In the body of the message, 1798In the body of the message,
@@ -1780,18 +1800,18 @@ In the body of the message,
1780which is set to \"ispell-complete-word\" by default." 1800which is set to \"ispell-complete-word\" by default."
1781 :type '(choice function (const nil)) 1801 :type '(choice function (const nil))
1782 :group 'mh-letter 1802 :group 'mh-letter
1783 :package-version '(MH-E "7.1")) 1803 :package-version '(MH-E . "7.1"))
1784 1804
1785(mh-defcustom mh-letter-fill-column 72 1805(defcustom-mh mh-letter-fill-column 72
1786 "*Fill column to use in MH Letter mode. 1806 "*Fill column to use in MH Letter mode.
1787 1807
1788By default, this option is 72 to allow others to quote your 1808By default, this option is 72 to allow others to quote your
1789message without line wrapping." 1809message without line wrapping."
1790 :type 'integer 1810 :type 'integer
1791 :group 'mh-letter 1811 :group 'mh-letter
1792 :package-version '(MH-E "6.0")) 1812 :package-version '(MH-E . "6.0"))
1793 1813
1794(mh-defcustom mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none") 1814(defcustom-mh mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none")
1795 "Default method to use in security tags. 1815 "Default method to use in security tags.
1796 1816
1797This option is used to select between a variety of mail security 1817This option is used to select between a variety of mail security
@@ -1812,9 +1832,9 @@ you write!"
1812 (const :tag "S/MIME" "smime") 1832 (const :tag "S/MIME" "smime")
1813 (const :tag "None" "none")) 1833 (const :tag "None" "none"))
1814 :group 'mh-letter 1834 :group 'mh-letter
1815 :package-version '(MH-E "8.0")) 1835 :package-version '(MH-E . "8.0"))
1816 1836
1817(mh-defcustom mh-signature-file-name "~/.signature" 1837(defcustom-mh mh-signature-file-name "~/.signature"
1818 "*Source of user's signature. 1838 "*Source of user's signature.
1819 1839
1820By default, the text of your signature is taken from the file 1840By default, the text of your signature is taken from the file
@@ -1835,9 +1855,9 @@ The signature is inserted into your message with the command
1835`mh-identity-list'." 1855`mh-identity-list'."
1836 :type 'file 1856 :type 'file
1837 :group 'mh-letter 1857 :group 'mh-letter
1838 :package-version '(MH-E "6.0")) 1858 :package-version '(MH-E . "6.0"))
1839 1859
1840(mh-defcustom mh-signature-separator-flag t 1860(defcustom-mh mh-signature-separator-flag t
1841 "*Non-nil means a signature separator should be inserted. 1861 "*Non-nil means a signature separator should be inserted.
1842 1862
1843It is not recommended that you change this option since various 1863It is not recommended that you change this option since various
@@ -1846,9 +1866,9 @@ the signature differently, and to suppress the signature when
1846replying or yanking a letter into a draft." 1866replying or yanking a letter into a draft."
1847 :type 'boolean 1867 :type 'boolean
1848 :group 'mh-letter 1868 :group 'mh-letter
1849 :package-version '(MH-E "8.0")) 1869 :package-version '(MH-E . "8.0"))
1850 1870
1851(mh-defcustom mh-x-face-file "~/.face" 1871(defcustom-mh mh-x-face-file "~/.face"
1852 "*File containing face header field to insert in outgoing mail. 1872 "*File containing face header field to insert in outgoing mail.
1853 1873
1854If the file starts with either of the strings \"X-Face:\", \"Face:\" 1874If the file starts with either of the strings \"X-Face:\", \"Face:\"
@@ -1875,9 +1895,9 @@ To prevent the setting of any of these header fields, either set
1875this option doesn't exist." 1895this option doesn't exist."
1876 :type 'file 1896 :type 'file
1877 :group 'mh-letter 1897 :group 'mh-letter
1878 :package-version '(MH-E "7.0")) 1898 :package-version '(MH-E . "7.0"))
1879 1899
1880(mh-defcustom mh-yank-behavior 'attribution 1900(defcustom-mh mh-yank-behavior 'attribution
1881 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. 1901 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1882 1902
1883To include the entire message, including the entire header, use 1903To include the entire message, including the entire header, use
@@ -1920,11 +1940,11 @@ inserted."
1920 (const :tag "Body With Attribution, Automatically" 1940 (const :tag "Body With Attribution, Automatically"
1921 autoattrib)) 1941 autoattrib))
1922 :group 'mh-letter 1942 :group 'mh-letter
1923 :package-version '(MH-E "8.0")) 1943 :package-version '(MH-E . "8.0"))
1924 1944
1925;;; Ranges (:group 'mh-ranges) 1945;;; Ranges (:group 'mh-ranges)
1926 1946
1927(mh-defcustom mh-interpret-number-as-range-flag t 1947(defcustom-mh mh-interpret-number-as-range-flag t
1928 "*Non-nil means interpret a number as a range. 1948 "*Non-nil means interpret a number as a range.
1929 1949
1930Since one of the most frequent ranges used is \"last:N\", MH-E 1950Since one of the most frequent ranges used is \"last:N\", MH-E
@@ -1933,7 +1953,7 @@ option is on (which is the default). If you need to scan just the
1933message 200, then use the range \"200:200\"." 1953message 200, then use the range \"200:200\"."
1934 :type 'boolean 1954 :type 'boolean
1935 :group 'mh-ranges 1955 :group 'mh-ranges
1936 :package-version '(MH-E "7.4")) 1956 :package-version '(MH-E . "7.4"))
1937 1957
1938;;; Scan Line Formats (:group 'mh-scan-line-formats) 1958;;; Scan Line Formats (:group 'mh-scan-line-formats)
1939 1959
@@ -1944,7 +1964,7 @@ message 200, then use the range \"200:200\"."
1944Real definition, below, uses variables that aren't defined yet." 1964Real definition, below, uses variables that aren't defined yet."
1945 (set-default symbol value)))) 1965 (set-default symbol value))))
1946 1966
1947(mh-defcustom mh-adaptive-cmd-note-flag t 1967(defcustom-mh mh-adaptive-cmd-note-flag t
1948 "*Non-nil means that the message number width is determined dynamically. 1968 "*Non-nil means that the message number width is determined dynamically.
1949 1969
1950If you've created your own format to handle long message numbers, 1970If you've created your own format to handle long message numbers,
@@ -1960,7 +1980,7 @@ you would use \"(mh-set-cmd-note 4)\"."
1960 :type 'boolean 1980 :type 'boolean
1961 :group 'mh-scan-line-formats 1981 :group 'mh-scan-line-formats
1962 :set 'mh-adaptive-cmd-note-flag-check 1982 :set 'mh-adaptive-cmd-note-flag-check
1963 :package-version '(MH-E "7.0")) 1983 :package-version '(MH-E . "7.0"))
1964 1984
1965(defun mh-scan-format-file-check (symbol value) 1985(defun mh-scan-format-file-check (symbol value)
1966 "Check if desired setting is legal. 1986 "Check if desired setting is legal.
@@ -1973,7 +1993,7 @@ set SYMBOL to VALUE."
1973 "unless you use \"Use MH-E scan Format\"") 1993 "unless you use \"Use MH-E scan Format\"")
1974 (set-default symbol value))) 1994 (set-default symbol value)))
1975 1995
1976(mh-defcustom mh-scan-format-file t 1996(defcustom-mh mh-scan-format-file t
1977 "Specifies the format file to pass to the scan program. 1997 "Specifies the format file to pass to the scan program.
1978 1998
1979The default setting for this option is \"Use MH-E scan Format\". This 1999The default setting for this option is \"Use MH-E scan Format\". This
@@ -1999,7 +2019,7 @@ Emacs start with 0)."
1999 (file :tag "Specify a scan Format File")) 2019 (file :tag "Specify a scan Format File"))
2000 :group 'mh-scan-line-formats 2020 :group 'mh-scan-line-formats
2001 :set 'mh-scan-format-file-check 2021 :set 'mh-scan-format-file-check
2002 :package-version '(MH-E "6.0")) 2022 :package-version '(MH-E . "6.0"))
2003 2023
2004(defun mh-adaptive-cmd-note-flag-check (symbol value) 2024(defun mh-adaptive-cmd-note-flag-check (symbol value)
2005 "Check if desired setting is legal. 2025 "Check if desired setting is legal.
@@ -2012,7 +2032,7 @@ Otherwise, set SYMBOL to VALUE."
2012 "is set to \"Use MH-E scan Format\"") 2032 "is set to \"Use MH-E scan Format\"")
2013 (set-default symbol value))) 2033 (set-default symbol value)))
2014 2034
2015(mh-defcustom mh-scan-prog "scan" 2035(defcustom-mh mh-scan-prog "scan"
2016 "*Program used to scan messages. 2036 "*Program used to scan messages.
2017 2037
2018The name of the program that generates a listing of one line per 2038The name of the program that generates a listing of one line per
@@ -2022,12 +2042,12 @@ directory. You may link another program to `scan' (see
2022\"mh-profile(5)\") to produce a different type of listing." 2042\"mh-profile(5)\") to produce a different type of listing."
2023 :type 'string 2043 :type 'string
2024 :group 'mh-scan-line-formats 2044 :group 'mh-scan-line-formats
2025 :package-version '(MH-E "6.0")) 2045 :package-version '(MH-E . "6.0"))
2026(make-variable-buffer-local 'mh-scan-prog) 2046(make-variable-buffer-local 'mh-scan-prog)
2027 2047
2028;;; Searching (:group 'mh-search) 2048;;; Searching (:group 'mh-search)
2029 2049
2030(mh-defcustom mh-search-program nil 2050(defcustom-mh mh-search-program nil
2031 "Search program that MH-E shall use. 2051 "Search program that MH-E shall use.
2032 2052
2033The default setting of this option is \"Auto-detect\" which means 2053The default setting of this option is \"Auto-detect\" which means
@@ -2046,11 +2066,11 @@ MH-E can be found in the documentation of `mh-search'."
2046 (const :tag "pick" pick) 2066 (const :tag "pick" pick)
2047 (const :tag "grep" grep)) 2067 (const :tag "grep" grep))
2048 :group 'mh-search 2068 :group 'mh-search
2049 :package-version '(MH-E "8.0")) 2069 :package-version '(MH-E . "8.0"))
2050 2070
2051;;; Sending Mail (:group 'mh-sending-mail) 2071;;; Sending Mail (:group 'mh-sending-mail)
2052 2072
2053(mh-defcustom mh-compose-forward-as-mime-flag t 2073(defcustom-mh mh-compose-forward-as-mime-flag t
2054 "*Non-nil means that messages are forwarded as attachments. 2074 "*Non-nil means that messages are forwarded as attachments.
2055 2075
2056By default, this option is on which means that the forwarded 2076By default, this option is on which means that the forwarded
@@ -2064,9 +2084,9 @@ forwarded messages will always be included as attachments
2064regardless of the settings of this option." 2084regardless of the settings of this option."
2065 :type 'boolean 2085 :type 'boolean
2066 :group 'mh-sending-mail 2086 :group 'mh-sending-mail
2067 :package-version '(MH-E "8.0")) 2087 :package-version '(MH-E . "8.0"))
2068 2088
2069(mh-defcustom mh-compose-letter-function nil 2089(defcustom-mh mh-compose-letter-function nil
2070 "Invoked when starting a new draft. 2090 "Invoked when starting a new draft.
2071 2091
2072However, it is the last function called before you edit your 2092However, it is the last function called before you edit your
@@ -2076,15 +2096,15 @@ three arguments: the contents of the TO, SUBJECT, and CC header
2076fields." 2096fields."
2077 :type '(choice (const nil) function) 2097 :type '(choice (const nil) function)
2078 :group 'mh-sending-mail 2098 :group 'mh-sending-mail
2079 :package-version '(MH-E "6.0")) 2099 :package-version '(MH-E . "6.0"))
2080 2100
2081(mh-defcustom mh-compose-prompt-flag nil 2101(defcustom-mh mh-compose-prompt-flag nil
2082 "*Non-nil means prompt for header fields when composing a new draft." 2102 "*Non-nil means prompt for header fields when composing a new draft."
2083 :type 'boolean 2103 :type 'boolean
2084 :group 'mh-sending-mail 2104 :group 'mh-sending-mail
2085 :package-version '(MH-E "7.4")) 2105 :package-version '(MH-E . "7.4"))
2086 2106
2087(mh-defcustom mh-forward-subject-format "%s: %s" 2107(defcustom-mh mh-forward-subject-format "%s: %s"
2088 "*Format string for forwarded message subject. 2108 "*Format string for forwarded message subject.
2089 2109
2090This option is a string which includes two escapes (\"%s\"). The 2110This option is a string which includes two escapes (\"%s\"). The
@@ -2092,9 +2112,9 @@ first \"%s\" is replaced with the sender of the original message,
2092and the second one is replaced with the original \"Subject:\"." 2112and the second one is replaced with the original \"Subject:\"."
2093 :type 'string 2113 :type 'string
2094 :group 'mh-sending-mail 2114 :group 'mh-sending-mail
2095 :package-version '(MH-E "6.0")) 2115 :package-version '(MH-E . "6.0"))
2096 2116
2097(mh-defcustom mh-insert-x-mailer-flag t 2117(defcustom-mh mh-insert-x-mailer-flag t
2098 "*Non-nil means append an \"X-Mailer:\" header field to the header. 2118 "*Non-nil means append an \"X-Mailer:\" header field to the header.
2099 2119
2100This header field includes the version of MH-E and Emacs that you 2120This header field includes the version of MH-E and Emacs that you
@@ -2102,9 +2122,9 @@ are using. If you don't want to participate in our marketing, you
2102can turn this option off." 2122can turn this option off."
2103 :type 'boolean 2123 :type 'boolean
2104 :group 'mh-sending-mail 2124 :group 'mh-sending-mail
2105 :package-version '(MH-E "7.0")) 2125 :package-version '(MH-E . "7.0"))
2106 2126
2107(mh-defcustom mh-redist-full-contents-flag nil 2127(defcustom-mh mh-redist-full-contents-flag nil
2108 "*Non-nil means the \"dist\" command needs entire letter for redistribution. 2128 "*Non-nil means the \"dist\" command needs entire letter for redistribution.
2109 2129
2110This option must be turned on if \"dist\" requires the whole 2130This option must be turned on if \"dist\" requires the whole
@@ -2114,9 +2134,9 @@ find that MH will not allow you to redistribute a message that
2114has been redistributed before, turn off this option." 2134has been redistributed before, turn off this option."
2115 :type 'boolean 2135 :type 'boolean
2116 :group 'mh-sending-mail 2136 :group 'mh-sending-mail
2117 :package-version '(MH-E "8.0")) 2137 :package-version '(MH-E . "8.0"))
2118 2138
2119(mh-defcustom mh-reply-default-reply-to nil 2139(defcustom-mh mh-reply-default-reply-to nil
2120 "*Sets the person or persons to whom a reply will be sent. 2140 "*Sets the person or persons to whom a reply will be sent.
2121 2141
2122This option is set to \"Prompt\" by default so that you are 2142This option is set to \"Prompt\" by default so that you are
@@ -2130,9 +2150,9 @@ this option to \"cc\". Other choices include \"from\", \"to\", or
2130 (const "cc") 2150 (const "cc")
2131 (const "all")) 2151 (const "all"))
2132 :group 'mh-sending-mail 2152 :group 'mh-sending-mail
2133 :package-version '(MH-E "6.0")) 2153 :package-version '(MH-E . "6.0"))
2134 2154
2135(mh-defcustom mh-reply-show-message-flag t 2155(defcustom-mh mh-reply-show-message-flag t
2136 "*Non-nil means the MH-Show buffer is displayed when replying. 2156 "*Non-nil means the MH-Show buffer is displayed when replying.
2137 2157
2138If you include the message automatically, you can hide the 2158If you include the message automatically, you can hide the
@@ -2141,7 +2161,7 @@ MH-Show buffer by turning off this option.
2141See also `mh-reply'." 2161See also `mh-reply'."
2142 :type 'boolean 2162 :type 'boolean
2143 :group 'mh-sending-mail 2163 :group 'mh-sending-mail
2144 :package-version '(MH-E "7.0")) 2164 :package-version '(MH-E . "7.0"))
2145 2165
2146;;; Sequences (:group 'mh-sequences) 2166;;; Sequences (:group 'mh-sequences)
2147 2167
@@ -2149,7 +2169,7 @@ See also `mh-reply'."
2149;; the docstring: "Additional sequences that should not to be preserved can be 2169;; the docstring: "Additional sequences that should not to be preserved can be
2150;; specified by setting `mh-unpropagated-sequences' appropriately." XXX 2170;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
2151 2171
2152(mh-defcustom mh-refile-preserves-sequences-flag t 2172(defcustom-mh mh-refile-preserves-sequences-flag t
2153 "*Non-nil means that sequences are preserved when messages are refiled. 2173 "*Non-nil means that sequences are preserved when messages are refiled.
2154 2174
2155If a message is in any sequence (except \"Previous-Sequence:\" 2175If a message is in any sequence (except \"Previous-Sequence:\"
@@ -2158,9 +2178,9 @@ sequences in the destination folder. If this behavior is not
2158desired, then turn off this option." 2178desired, then turn off this option."
2159 :type 'boolean 2179 :type 'boolean
2160 :group 'mh-sequences 2180 :group 'mh-sequences
2161 :package-version '(MH-E "7.4")) 2181 :package-version '(MH-E . "7.4"))
2162 2182
2163(mh-defcustom mh-tick-seq 'tick 2183(defcustom-mh mh-tick-seq 'tick
2164 "The name of the MH sequence for ticked messages. 2184 "The name of the MH sequence for ticked messages.
2165 2185
2166You can customize this option if you already use the \"tick\" 2186You can customize this option if you already use the \"tick\"
@@ -2170,9 +2190,9 @@ there isn't much advantage to that."
2170 :type '(choice (const :tag "Disable Ticking" nil) 2190 :type '(choice (const :tag "Disable Ticking" nil)
2171 symbol) 2191 symbol)
2172 :group 'mh-sequences 2192 :group 'mh-sequences
2173 :package-version '(MH-E "7.3")) 2193 :package-version '(MH-E . "7.3"))
2174 2194
2175(mh-defcustom mh-update-sequences-after-mh-show-flag t 2195(defcustom-mh mh-update-sequences-after-mh-show-flag t
2176 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>. 2196 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>.
2177 2197
2178Three sequences are maintained internally by MH-E and pushed out 2198Three sequences are maintained internally by MH-E and pushed out
@@ -2185,11 +2205,11 @@ this option. You can then update the state manually with the
2185commands." 2205commands."
2186 :type 'boolean 2206 :type 'boolean
2187 :group 'mh-sequences 2207 :group 'mh-sequences
2188 :package-version '(MH-E "7.0")) 2208 :package-version '(MH-E . "7.0"))
2189 2209
2190;;; Reading Your Mail (:group 'mh-show) 2210;;; Reading Your Mail (:group 'mh-show)
2191 2211
2192(mh-defcustom mh-bury-show-buffer-flag t 2212(defcustom-mh mh-bury-show-buffer-flag t
2193 "*Non-nil means show buffer is buried. 2213 "*Non-nil means show buffer is buried.
2194 2214
2195One advantage of not burying the show buffer is that one can 2215One advantage of not burying the show buffer is that one can
@@ -2198,18 +2218,18 @@ because of its proximity to its associated MH-Folder buffer. Try
2198running \\[electric-buffer-list] to see what I mean." 2218running \\[electric-buffer-list] to see what I mean."
2199 :type 'boolean 2219 :type 'boolean
2200 :group 'mh-show 2220 :group 'mh-show
2201 :package-version '(MH-E "7.0")) 2221 :package-version '(MH-E . "7.0"))
2202 2222
2203(mh-defcustom mh-clean-message-header-flag t 2223(defcustom-mh mh-clean-message-header-flag t
2204 "*Non-nil means remove extraneous header fields. 2224 "*Non-nil means remove extraneous header fields.
2205 2225
2206See also `mh-invisible-header-fields-default' and 2226See also `mh-invisible-header-fields-default' and
2207`mh-invisible-header-fields'." 2227`mh-invisible-header-fields'."
2208 :type 'boolean 2228 :type 'boolean
2209 :group 'mh-show 2229 :group 'mh-show
2210 :package-version '(MH-E "7.0")) 2230 :package-version '(MH-E . "7.0"))
2211 2231
2212(mh-defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode"))) 2232(defcustom-mh mh-decode-mime-flag (not (not (locate-library "mm-decode")))
2213 "*Non-nil means attachments are handled\\<mh-folder-mode-map>. 2233 "*Non-nil means attachments are handled\\<mh-folder-mode-map>.
2214 2234
2215MH-E can handle attachments as well if the Gnus `mm-decode' 2235MH-E can handle attachments as well if the Gnus `mm-decode'
@@ -2225,9 +2245,9 @@ messages and other graphical widgets. See the options
2225`mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'." 2245`mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'."
2226 :type 'boolean 2246 :type 'boolean
2227 :group 'mh-show 2247 :group 'mh-show
2228 :package-version '(MH-E "7.0")) 2248 :package-version '(MH-E . "7.0"))
2229 2249
2230(mh-defcustom mh-display-buttons-for-alternatives-flag nil 2250(defcustom-mh mh-display-buttons-for-alternatives-flag nil
2231 "*Non-nil means display buttons for all alternative attachments. 2251 "*Non-nil means display buttons for all alternative attachments.
2232 2252
2233Sometimes, a mail program will produce multiple alternatives of 2253Sometimes, a mail program will produce multiple alternatives of
@@ -2237,9 +2257,9 @@ displayed. If this option is on, then the preferred part is shown
2237inline and buttons are shown for each of the other alternatives." 2257inline and buttons are shown for each of the other alternatives."
2238 :type 'boolean 2258 :type 'boolean
2239 :group 'mh-show 2259 :group 'mh-show
2240 :package-version '(MH-E "7.4")) 2260 :package-version '(MH-E . "7.4"))
2241 2261
2242(mh-defcustom mh-display-buttons-for-inline-parts-flag nil 2262(defcustom-mh mh-display-buttons-for-inline-parts-flag nil
2243 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>. 2263 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>.
2244 2264
2245The sender can request that attachments should be viewed inline so 2265The sender can request that attachments should be viewed inline so
@@ -2260,9 +2280,9 @@ MH-E cannot display all attachments inline however. It can display
2260text (including HTML) and images." 2280text (including HTML) and images."
2261 :type 'boolean 2281 :type 'boolean
2262 :group 'mh-show 2282 :group 'mh-show
2263 :package-version '(MH-E "7.0")) 2283 :package-version '(MH-E . "7.0"))
2264 2284
2265(mh-defcustom mh-do-not-confirm-flag nil 2285(defcustom-mh mh-do-not-confirm-flag nil
2266 "*Non-nil means non-reversible commands do not prompt for confirmation. 2286 "*Non-nil means non-reversible commands do not prompt for confirmation.
2267 2287
2268Commands such as `mh-pack-folder' prompt to confirm whether to 2288Commands such as `mh-pack-folder' prompt to confirm whether to
@@ -2272,9 +2292,9 @@ performed--which is usually desired but cannot be
2272retracted--without question." 2292retracted--without question."
2273 :type 'boolean 2293 :type 'boolean
2274 :group 'mh-show 2294 :group 'mh-show
2275 :package-version '(MH-E "7.0")) 2295 :package-version '(MH-E . "7.0"))
2276 2296
2277(mh-defcustom mh-fetch-x-image-url nil 2297(defcustom-mh mh-fetch-x-image-url nil
2278 "*Control fetching of \"X-Image-URL:\" header field image. 2298 "*Control fetching of \"X-Image-URL:\" header field image.
2279 2299
2280Ths option controls the fetching of the \"X-Image-URL:\" header 2300Ths option controls the fetching of the \"X-Image-URL:\" header
@@ -2308,9 +2328,9 @@ turned on."
2308 :type '(choice (const :tag "Ask Before Fetching" ask) 2328 :type '(choice (const :tag "Ask Before Fetching" ask)
2309 (const :tag "Never Fetch" nil)) 2329 (const :tag "Never Fetch" nil))
2310 :group 'mh-show 2330 :group 'mh-show
2311 :package-version '(MH-E "7.3")) 2331 :package-version '(MH-E . "7.3"))
2312 2332
2313(mh-defcustom mh-graphical-smileys-flag t 2333(defcustom-mh mh-graphical-smileys-flag t
2314 "*Non-nil means graphical smileys are displayed. 2334 "*Non-nil means graphical smileys are displayed.
2315 2335
2316It is a long standing custom to inject body language using a 2336It is a long standing custom to inject body language using a
@@ -2323,9 +2343,9 @@ This option is disabled if the option `mh-decode-mime-flag' is
2323turned off." 2343turned off."
2324 :type 'boolean 2344 :type 'boolean
2325 :group 'mh-show 2345 :group 'mh-show
2326 :package-version '(MH-E "7.0")) 2346 :package-version '(MH-E . "7.0"))
2327 2347
2328(mh-defcustom mh-graphical-emphasis-flag t 2348(defcustom-mh mh-graphical-emphasis-flag t
2329 "*Non-nil means graphical emphasis is displayed. 2349 "*Non-nil means graphical emphasis is displayed.
2330 2350
2331A few typesetting features are indicated in ASCII text with 2351A few typesetting features are indicated in ASCII text with
@@ -2340,9 +2360,9 @@ This option is disabled if the option `mh-decode-mime-flag' is
2340turned off." 2360turned off."
2341 :type 'boolean 2361 :type 'boolean
2342 :group 'mh-show 2362 :group 'mh-show
2343 :package-version '(MH-E "7.0")) 2363 :package-version '(MH-E . "7.0"))
2344 2364
2345(mh-defcustom mh-highlight-citation-style 'gnus 2365(defcustom-mh mh-highlight-citation-style 'gnus
2346 "Style for highlighting citations. 2366 "Style for highlighting citations.
2347 2367
2348If the sender of the message has cited other messages in his 2368If the sender of the message has cited other messages in his
@@ -2356,7 +2376,7 @@ of citations entirely, choose \"None\"."
2356 (const :tag "Monochrome" font-lock) 2376 (const :tag "Monochrome" font-lock)
2357 (const :tag "None" nil)) 2377 (const :tag "None" nil))
2358 :group 'mh-show 2378 :group 'mh-show
2359 :package-version '(MH-E "8.0")) 2379 :package-version '(MH-E . "8.0"))
2360 2380
2361;; Keep fields alphabetized. Mention source, if known. 2381;; Keep fields alphabetized. Mention source, if known.
2362(defvar mh-invisible-header-fields-internal 2382(defvar mh-invisible-header-fields-internal
@@ -2569,7 +2589,7 @@ Because the function `mh-invisible-headers' uses both
2569`mh-invisible-header-fields' and `mh-invisible-header-fields', it 2589`mh-invisible-header-fields' and `mh-invisible-header-fields', it
2570cannot be run until both variables have been initialized.") 2590cannot be run until both variables have been initialized.")
2571 2591
2572(mh-defcustom mh-invisible-header-fields nil 2592(defcustom-mh mh-invisible-header-fields nil
2573 "*Additional header fields to hide. 2593 "*Additional header fields to hide.
2574 2594
2575Header fields that you would like to hide that aren't listed in 2595Header fields that you would like to hide that aren't listed in
@@ -2588,9 +2608,9 @@ See also `mh-clean-message-header-flag'."
2588 (set-default symbol value) 2608 (set-default symbol value)
2589 (mh-invisible-headers)) 2609 (mh-invisible-headers))
2590 :group 'mh-show 2610 :group 'mh-show
2591 :package-version '(MH-E "7.1")) 2611 :package-version '(MH-E . "7.1"))
2592 2612
2593(mh-defcustom mh-invisible-header-fields-default nil 2613(defcustom-mh mh-invisible-header-fields-default nil
2594 "*List of hidden header fields. 2614 "*List of hidden header fields.
2595 2615
2596The header fields listed in this option are hidden, although you 2616The header fields listed in this option are hidden, although you
@@ -2606,7 +2626,7 @@ See also `mh-clean-message-header-flag'."
2606 (set-default symbol value) 2626 (set-default symbol value)
2607 (mh-invisible-headers)) 2627 (mh-invisible-headers))
2608 :group 'mh-show 2628 :group 'mh-show
2609 :package-version '(MH-E "8.0")) 2629 :package-version '(MH-E . "8.0"))
2610 2630
2611(defvar mh-invisible-header-fields-compiled nil 2631(defvar mh-invisible-header-fields-compiled nil
2612 "*Regexp matching lines in a message header that are not to be shown. 2632 "*Regexp matching lines in a message header that are not to be shown.
@@ -2643,7 +2663,7 @@ removed and entries from `mh-invisible-header-fields' are added."
2643;; Compile invisible header fields. 2663;; Compile invisible header fields.
2644(mh-invisible-headers) 2664(mh-invisible-headers)
2645 2665
2646(mh-defcustom mh-lpr-command-format "lpr -J '%s'" 2666(defcustom-mh mh-lpr-command-format "lpr -J '%s'"
2647 "*Command used to print\\<mh-folder-mode-map>. 2667 "*Command used to print\\<mh-folder-mode-map>.
2648 2668
2649This option contains the Unix command line which performs the 2669This option contains the Unix command line which performs the
@@ -2658,9 +2678,9 @@ This options is not used by the commands \\[mh-ps-print-msg] or
2658\\[mh-ps-print-msg-file]." 2678\\[mh-ps-print-msg-file]."
2659 :type 'string 2679 :type 'string
2660 :group 'mh-show 2680 :group 'mh-show
2661 :package-version '(MH-E "6.0")) 2681 :package-version '(MH-E . "6.0"))
2662 2682
2663(mh-defcustom mh-max-inline-image-height nil 2683(defcustom-mh mh-max-inline-image-height nil
2664 "*Maximum inline image height if \"Content-Disposition:\" is not present. 2684 "*Maximum inline image height if \"Content-Disposition:\" is not present.
2665 2685
2666Some older mail programs do not insert this needed plumbing to 2686Some older mail programs do not insert this needed plumbing to
@@ -2674,9 +2694,9 @@ a large number. The size of your screen is a good choice for
2674these numbers." 2694these numbers."
2675 :type '(choice (const nil) integer) 2695 :type '(choice (const nil) integer)
2676 :group 'mh-show 2696 :group 'mh-show
2677 :package-version '(MH-E "7.0")) 2697 :package-version '(MH-E . "7.0"))
2678 2698
2679(mh-defcustom mh-max-inline-image-width nil 2699(defcustom-mh mh-max-inline-image-width nil
2680 "*Maximum inline image width if \"Content-Disposition:\" is not present. 2700 "*Maximum inline image width if \"Content-Disposition:\" is not present.
2681 2701
2682Some older mail programs do not insert this needed plumbing to 2702Some older mail programs do not insert this needed plumbing to
@@ -2690,9 +2710,9 @@ a large number. The size of your screen is a good choice for
2690these numbers." 2710these numbers."
2691 :type '(choice (const nil) integer) 2711 :type '(choice (const nil) integer)
2692 :group 'mh-show 2712 :group 'mh-show
2693 :package-version '(MH-E "7.0")) 2713 :package-version '(MH-E . "7.0"))
2694 2714
2695(mh-defcustom mh-mhl-format-file nil 2715(defcustom-mh mh-mhl-format-file nil
2696 "*Specifies the format file to pass to the \"mhl\" program. 2716 "*Specifies the format file to pass to the \"mhl\" program.
2697 2717
2698Normally MH-E takes care of displaying messages itself (rather than 2718Normally MH-E takes care of displaying messages itself (rather than
@@ -2714,9 +2734,9 @@ file."
2714 (const :tag "Use Default mhl Format" t) 2734 (const :tag "Use Default mhl Format" t)
2715 (file :tag "Specify an mhl Format File")) 2735 (file :tag "Specify an mhl Format File"))
2716 :group 'mh-show 2736 :group 'mh-show
2717 :package-version '(MH-E "8.0")) 2737 :package-version '(MH-E . "8.0"))
2718 2738
2719(mh-defcustom mh-mime-save-parts-default-directory t 2739(defcustom-mh mh-mime-save-parts-default-directory t
2720 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts]. 2740 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts].
2721 2741
2722The default value for this option is \"Prompt Always\" so that 2742The default value for this option is \"Prompt Always\" so that
@@ -2730,9 +2750,9 @@ directory's name."
2730 (const :tag "Prompt Always" t) 2750 (const :tag "Prompt Always" t)
2731 directory) 2751 directory)
2732 :group 'mh-show 2752 :group 'mh-show
2733 :package-version '(MH-E "7.0")) 2753 :package-version '(MH-E . "7.0"))
2734 2754
2735(mh-defcustom mh-print-background-flag nil 2755(defcustom-mh mh-print-background-flag nil
2736 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>. 2756 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>.
2737 2757
2738Normally messages are printed in the foreground. If this is slow on 2758Normally messages are printed in the foreground. If this is slow on
@@ -2746,9 +2766,9 @@ This option is not used by the commands \\[mh-ps-print-msg] or
2746\\[mh-ps-print-msg-file]." 2766\\[mh-ps-print-msg-file]."
2747 :type 'boolean 2767 :type 'boolean
2748 :group 'mh-show 2768 :group 'mh-show
2749 :package-version '(MH-E "7.0")) 2769 :package-version '(MH-E . "7.0"))
2750 2770
2751(mh-defcustom mh-show-maximum-size 0 2771(defcustom-mh mh-show-maximum-size 0
2752 "*Maximum size of message (in bytes) to display automatically. 2772 "*Maximum size of message (in bytes) to display automatically.
2753 2773
2754This option provides an opportunity to skip over large messages 2774This option provides an opportunity to skip over large messages
@@ -2756,9 +2776,9 @@ which may be slow to load. The default value of 0 means that all
2756message are shown regardless of size." 2776message are shown regardless of size."
2757 :type 'integer 2777 :type 'integer
2758 :group 'mh-show 2778 :group 'mh-show
2759 :package-version '(MH-E "8.0")) 2779 :package-version '(MH-E . "8.0"))
2760 2780
2761(mh-defcustom mh-show-use-xface-flag (>= emacs-major-version 21) 2781(defcustom-mh mh-show-use-xface-flag (>= emacs-major-version 21)
2762 "*Non-nil means display face images in MH-show buffers. 2782 "*Non-nil means display face images in MH-show buffers.
2763 2783
2764MH-E can display the content of \"Face:\", \"X-Face:\", and 2784MH-E can display the content of \"Face:\", \"X-Face:\", and
@@ -2796,9 +2816,9 @@ The option `mh-fetch-x-image-url' controls the fetching of the
2796\"X-Image-URL:\" header field image." 2816\"X-Image-URL:\" header field image."
2797 :type 'boolean 2817 :type 'boolean
2798 :group 'mh-show 2818 :group 'mh-show
2799 :package-version '(MH-E "7.0")) 2819 :package-version '(MH-E . "7.0"))
2800 2820
2801(mh-defcustom mh-store-default-directory nil 2821(defcustom-mh mh-store-default-directory nil
2802 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg]. 2822 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg].
2803 2823
2804If you would like to change the initial default directory, 2824If you would like to change the initial default directory,
@@ -2808,9 +2828,9 @@ the content of these messages."
2808 :type '(choice (const :tag "Current" nil) 2828 :type '(choice (const :tag "Current" nil)
2809 directory) 2829 directory)
2810 :group 'mh-show 2830 :group 'mh-show
2811 :package-version '(MH-E "6.0")) 2831 :package-version '(MH-E . "6.0"))
2812 2832
2813(mh-defcustom mh-summary-height nil 2833(defcustom-mh mh-summary-height nil
2814 "*Number of lines in MH-Folder buffer (including the mode line). 2834 "*Number of lines in MH-Folder buffer (including the mode line).
2815 2835
2816The default value of this option is \"Automatic\" which means 2836The default value of this option is \"Automatic\" which means
@@ -2821,20 +2841,20 @@ lines you'd like to see."
2821 :type '(choice (const :tag "Automatic" nil) 2841 :type '(choice (const :tag "Automatic" nil)
2822 (integer :tag "Fixed Size")) 2842 (integer :tag "Fixed Size"))
2823 :group 'mh-show 2843 :group 'mh-show
2824 :package-version '(MH-E "7.4")) 2844 :package-version '(MH-E . "7.4"))
2825 2845
2826;;; The Speedbar (:group 'mh-speedbar) 2846;;; The Speedbar (:group 'mh-speedbar)
2827 2847
2828(mh-defcustom mh-speed-update-interval 60 2848(defcustom-mh mh-speed-update-interval 60
2829 "Time between speedbar updates in seconds. 2849 "Time between speedbar updates in seconds.
2830Set to 0 to disable automatic update." 2850Set to 0 to disable automatic update."
2831 :type 'integer 2851 :type 'integer
2832 :group 'mh-speedbar 2852 :group 'mh-speedbar
2833 :package-version '(MH-E "8.0")) 2853 :package-version '(MH-E . "8.0"))
2834 2854
2835;;; Threading (:group 'mh-thread) 2855;;; Threading (:group 'mh-thread)
2836 2856
2837(mh-defcustom mh-show-threads-flag nil 2857(defcustom-mh mh-show-threads-flag nil
2838 "*Non-nil means new folders start in threaded mode. 2858 "*Non-nil means new folders start in threaded mode.
2839 2859
2840Threading large number of messages can be time consuming so this 2860Threading large number of messages can be time consuming so this
@@ -2843,14 +2863,14 @@ threading will be done only if the number of messages being
2843threaded is less than `mh-large-folder'." 2863threaded is less than `mh-large-folder'."
2844 :type 'boolean 2864 :type 'boolean
2845 :group 'mh-thread 2865 :group 'mh-thread
2846 :package-version '(MH-E "7.1")) 2866 :package-version '(MH-E . "7.1"))
2847 2867
2848;;; The Tool Bar (:group 'mh-tool-bar) 2868;;; The Tool Bar (:group 'mh-tool-bar)
2849 2869
2850;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined 2870;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined
2851;; dynamically in mh-tool-bar.el. 2871;; dynamically in mh-tool-bar.el.
2852 2872
2853(mh-defcustom mh-tool-bar-search-function 'mh-search 2873(defcustom-mh mh-tool-bar-search-function 'mh-search
2854 "*Function called by the tool bar search button. 2874 "*Function called by the tool bar search button.
2855 2875
2856By default, this is set to `mh-search'. You can also choose 2876By default, this is set to `mh-search'. You can also choose
@@ -2859,11 +2879,11 @@ of your own choosing."
2859 :type '(choice (const mh-search) 2879 :type '(choice (const mh-search)
2860 (function :tag "Other Function")) 2880 (function :tag "Other Function"))
2861 :group 'mh-tool-bar 2881 :group 'mh-tool-bar
2862 :package-version '(MH-E "7.0")) 2882 :package-version '(MH-E . "7.0"))
2863 2883
2864;; XEmacs has a couple of extra customizations... 2884;; XEmacs has a couple of extra customizations...
2865(mh-do-in-xemacs 2885(mh-do-in-xemacs
2866 (mh-defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag 2886 (defcustom-mh mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
2867 "*If non-nil, use tool bar. 2887 "*If non-nil, use tool bar.
2868 2888
2869This option controls whether to show the MH-E icons at all. By 2889This option controls whether to show the MH-E icons at all. By
@@ -2877,9 +2897,9 @@ won't be able to turn on this option."
2877 (not mh-xemacs-has-tool-bar-flag)) 2897 (not mh-xemacs-has-tool-bar-flag))
2878 (error "Tool bar not supported")) 2898 (error "Tool bar not supported"))
2879 (set-default symbol value)) 2899 (set-default symbol value))
2880 :package-version '(MH-E "7.3")) 2900 :package-version '(MH-E . "7.3"))
2881 2901
2882 (mh-defcustom mh-xemacs-tool-bar-position nil 2902 (defcustom-mh mh-xemacs-tool-bar-position nil
2883 "*Tool bar location. 2903 "*Tool bar location.
2884 2904
2885This option controls the placement of the tool bar along the four 2905This option controls the placement of the tool bar along the four
@@ -2895,13 +2915,13 @@ default tool bar."
2895 (const :tag "Left" :value left) 2915 (const :tag "Left" :value left)
2896 (const :tag "Right" :value right)) 2916 (const :tag "Right" :value right))
2897 :group 'mh-tool-bar 2917 :group 'mh-tool-bar
2898 :package-version '(MH-E "7.3"))) 2918 :package-version '(MH-E . "7.3")))
2899 2919
2900 2920
2901 2921
2902;;; Hooks (:group 'mh-hooks + group where hook described) 2922;;; Hooks (:group 'mh-hooks + group where hook described)
2903 2923
2904(mh-defcustom mh-after-commands-processed-hook nil 2924(defcustom-mh mh-after-commands-processed-hook nil
2905 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests. 2925 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests.
2906 2926
2907Variables that are useful in this hook include 2927Variables that are useful in this hook include
@@ -2911,16 +2931,16 @@ folder, which is also available in `mh-current-folder'."
2911 :type 'hook 2931 :type 'hook
2912 :group 'mh-hooks 2932 :group 'mh-hooks
2913 :group 'mh-folder 2933 :group 'mh-folder
2914 :package-version '(MH-E "8.0")) 2934 :package-version '(MH-E . "8.0"))
2915 2935
2916(mh-defcustom mh-alias-reloaded-hook nil 2936(defcustom-mh mh-alias-reloaded-hook nil
2917 "Hook run by `mh-alias-reload' after loading aliases." 2937 "Hook run by `mh-alias-reload' after loading aliases."
2918 :type 'hook 2938 :type 'hook
2919 :group 'mh-hooks 2939 :group 'mh-hooks
2920 :group 'mh-alias 2940 :group 'mh-alias
2921 :package-version '(MH-E "8.0")) 2941 :package-version '(MH-E . "8.0"))
2922 2942
2923(mh-defcustom mh-before-commands-processed-hook nil 2943(defcustom-mh mh-before-commands-processed-hook nil
2924 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests. 2944 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests.
2925 2945
2926Variables that are useful in this hook include `mh-delete-list' 2946Variables that are useful in this hook include `mh-delete-list'
@@ -2929,9 +2949,9 @@ be made to the current folder, `mh-current-folder'."
2929 :type 'hook 2949 :type 'hook
2930 :group 'mh-hooks 2950 :group 'mh-hooks
2931 :group 'mh-folder 2951 :group 'mh-folder
2932 :package-version '(MH-E "8.0")) 2952 :package-version '(MH-E . "8.0"))
2933 2953
2934(mh-defcustom mh-before-quit-hook nil 2954(defcustom-mh mh-before-quit-hook nil
2935 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E. 2955 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E.
2936 2956
2937This hook is called before the quit occurs, so you might use it 2957This hook is called before the quit occurs, so you might use it
@@ -2942,9 +2962,9 @@ See also `mh-quit-hook'."
2942 :type 'hook 2962 :type 'hook
2943 :group 'mh-hooks 2963 :group 'mh-hooks
2944 :group 'mh-folder 2964 :group 'mh-folder
2945 :package-version '(MH-E "6.0")) 2965 :package-version '(MH-E . "6.0"))
2946 2966
2947(mh-defcustom mh-before-send-letter-hook nil 2967(defcustom-mh mh-before-send-letter-hook nil
2948 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command. 2968 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.
2949 2969
2950For example, if you want to check your spelling in your message 2970For example, if you want to check your spelling in your message
@@ -2953,9 +2973,9 @@ before sending, add the `ispell-message' function."
2953 :options '(ispell-message) 2973 :options '(ispell-message)
2954 :group 'mh-hooks 2974 :group 'mh-hooks
2955 :group 'mh-letter 2975 :group 'mh-letter
2956 :package-version '(MH-E "6.0")) 2976 :package-version '(MH-E . "6.0"))
2957 2977
2958(mh-defcustom mh-delete-msg-hook nil 2978(defcustom-mh mh-delete-msg-hook nil
2959 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion. 2979 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
2960 2980
2961For example, a past maintainer of MH-E used this once when he 2981For example, a past maintainer of MH-E used this once when he
@@ -2963,9 +2983,9 @@ kept statistics on his mail usage."
2963 :type 'hook 2983 :type 'hook
2964 :group 'mh-hooks 2984 :group 'mh-hooks
2965 :group 'mh-show 2985 :group 'mh-show
2966 :package-version '(MH-E "6.0")) 2986 :package-version '(MH-E . "6.0"))
2967 2987
2968(mh-defcustom mh-find-path-hook nil 2988(defcustom-mh mh-find-path-hook nil
2969 "Hook run by `mh-find-path' after reading the user's MH profile. 2989 "Hook run by `mh-find-path' after reading the user's MH profile.
2970 2990
2971This hook can be used the change the value of the variables that 2991This hook can be used the change the value of the variables that
@@ -2974,30 +2994,30 @@ between MH and MH-E."
2974 :type 'hook 2994 :type 'hook
2975 :group 'mh-hooks 2995 :group 'mh-hooks
2976 :group 'mh-e 2996 :group 'mh-e
2977 :package-version '(MH-E "7.0")) 2997 :package-version '(MH-E . "7.0"))
2978 2998
2979(mh-defcustom mh-folder-mode-hook nil 2999(defcustom-mh mh-folder-mode-hook nil
2980 "Hook run by `mh-folder-mode' when visiting a new folder." 3000 "Hook run by `mh-folder-mode' when visiting a new folder."
2981 :type 'hook 3001 :type 'hook
2982 :group 'mh-hooks 3002 :group 'mh-hooks
2983 :group 'mh-folder 3003 :group 'mh-folder
2984 :package-version '(MH-E "6.0")) 3004 :package-version '(MH-E . "6.0"))
2985 3005
2986(mh-defcustom mh-forward-hook nil 3006(defcustom-mh mh-forward-hook nil
2987 "Hook run by `mh-forward' on a forwarded letter." 3007 "Hook run by `mh-forward' on a forwarded letter."
2988 :type 'hook 3008 :type 'hook
2989 :group 'mh-hooks 3009 :group 'mh-hooks
2990 :group 'mh-sending-mail 3010 :group 'mh-sending-mail
2991 :package-version '(MH-E "8.0")) 3011 :package-version '(MH-E . "8.0"))
2992 3012
2993(mh-defcustom mh-inc-folder-hook nil 3013(defcustom-mh mh-inc-folder-hook nil
2994 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder." 3014 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder."
2995 :type 'hook 3015 :type 'hook
2996 :group 'mh-hooks 3016 :group 'mh-hooks
2997 :group 'mh-inc 3017 :group 'mh-inc
2998 :package-version '(MH-E "6.0")) 3018 :package-version '(MH-E . "6.0"))
2999 3019
3000(mh-defcustom mh-insert-signature-hook nil 3020(defcustom-mh mh-insert-signature-hook nil
3001 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted. 3021 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted.
3002 3022
3003Hook functions may access the actual name of the file or the 3023Hook functions may access the actual name of the file or the
@@ -3006,9 +3026,9 @@ function used to insert the signature with
3006 :type 'hook 3026 :type 'hook
3007 :group 'mh-hooks 3027 :group 'mh-hooks
3008 :group 'mh-letter 3028 :group 'mh-letter
3009 :package-version '(MH-E "8.0")) 3029 :package-version '(MH-E . "8.0"))
3010 3030
3011(mh-defcustom mh-kill-folder-suppress-prompt-hooks '(mh-search-p) 3031(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
3012 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder]. 3032 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
3013 3033
3014The hook functions are called with no arguments and should return 3034The hook functions are called with no arguments and should return
@@ -3024,9 +3044,9 @@ accident in the \"+inbox\" folder, you will not be happy."
3024 :type 'hook 3044 :type 'hook
3025 :group 'mh-hooks 3045 :group 'mh-hooks
3026 :group 'mh-folder 3046 :group 'mh-folder
3027 :package-version '(MH-E "7.4")) 3047 :package-version '(MH-E . "7.4"))
3028 3048
3029(mh-defcustom mh-letter-mode-hook nil 3049(defcustom-mh mh-letter-mode-hook nil
3030 "Hook run by `mh-letter-mode' on a new letter. 3050 "Hook run by `mh-letter-mode' on a new letter.
3031 3051
3032This hook allows you to do some processing before editing a 3052This hook allows you to do some processing before editing a
@@ -3037,16 +3057,16 @@ go."
3037 :type 'hook 3057 :type 'hook
3038 :group 'mh-hooks 3058 :group 'mh-hooks
3039 :group 'mh-sending-mail 3059 :group 'mh-sending-mail
3040 :package-version '(MH-E "6.0")) 3060 :package-version '(MH-E . "6.0"))
3041 3061
3042(mh-defcustom mh-mh-to-mime-hook nil 3062(defcustom-mh mh-mh-to-mime-hook nil
3043 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]." 3063 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]."
3044 :type 'hook 3064 :type 'hook
3045 :group 'mh-hooks 3065 :group 'mh-hooks
3046 :group 'mh-letter 3066 :group 'mh-letter
3047 :package-version '(MH-E "8.0")) 3067 :package-version '(MH-E . "8.0"))
3048 3068
3049(mh-defcustom mh-search-mode-hook nil 3069(defcustom-mh mh-search-mode-hook nil
3050 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>. 3070 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>.
3051 3071
3052If you find that you do the same thing over and over when editing 3072If you find that you do the same thing over and over when editing
@@ -3056,9 +3076,9 @@ This can be done with this hook which is called when
3056 :type 'hook 3076 :type 'hook
3057 :group 'mh-hooks 3077 :group 'mh-hooks
3058 :group 'mh-search 3078 :group 'mh-search
3059 :package-version '(MH-E "8.0")) 3079 :package-version '(MH-E . "8.0"))
3060 3080
3061(mh-defcustom mh-quit-hook nil 3081(defcustom-mh mh-quit-hook nil
3062 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E. 3082 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E.
3063 3083
3064This hook is not run in an MH-E context, so you might use it to 3084This hook is not run in an MH-E context, so you might use it to
@@ -3068,16 +3088,16 @@ See also `mh-before-quit-hook'."
3068 :type 'hook 3088 :type 'hook
3069 :group 'mh-hooks 3089 :group 'mh-hooks
3070 :group 'mh-folder 3090 :group 'mh-folder
3071 :package-version '(MH-E "6.0")) 3091 :package-version '(MH-E . "6.0"))
3072 3092
3073(mh-defcustom mh-refile-msg-hook nil 3093(defcustom-mh mh-refile-msg-hook nil
3074 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling." 3094 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling."
3075 :type 'hook 3095 :type 'hook
3076 :group 'mh-hooks 3096 :group 'mh-hooks
3077 :group 'mh-folder 3097 :group 'mh-folder
3078 :package-version '(MH-E "6.0")) 3098 :package-version '(MH-E . "6.0"))
3079 3099
3080(mh-defcustom mh-show-hook nil 3100(defcustom-mh mh-show-hook nil
3081 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message. 3101 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message.
3082 3102
3083It is the last thing called after messages are displayed. It's 3103It is the last thing called after messages are displayed. It's
@@ -3086,9 +3106,9 @@ used to affect the behavior of MH-E in general or when
3086 :type 'hook 3106 :type 'hook
3087 :group 'mh-hooks 3107 :group 'mh-hooks
3088 :group 'mh-show 3108 :group 'mh-show
3089 :package-version '(MH-E "6.0")) 3109 :package-version '(MH-E . "6.0"))
3090 3110
3091(mh-defcustom mh-show-mode-hook nil 3111(defcustom-mh mh-show-mode-hook nil
3092 "Hook run upon entry to `mh-show-mode'. 3112 "Hook run upon entry to `mh-show-mode'.
3093 3113
3094This hook is called early on in the process of the message 3114This hook is called early on in the process of the message
@@ -3097,9 +3117,9 @@ message's content. See `mh-show-hook'."
3097 :type 'hook 3117 :type 'hook
3098 :group 'mh-hooks 3118 :group 'mh-hooks
3099 :group 'mh-show 3119 :group 'mh-show
3100 :package-version '(MH-E "6.0")) 3120 :package-version '(MH-E . "6.0"))
3101 3121
3102(mh-defcustom mh-unseen-updated-hook nil 3122(defcustom-mh mh-unseen-updated-hook nil
3103 "Hook run after the unseen sequence has been updated. 3123 "Hook run after the unseen sequence has been updated.
3104 3124
3105The variable `mh-seen-list' can be used by this hook to obtain 3125The variable `mh-seen-list' can be used by this hook to obtain
@@ -3108,7 +3128,7 @@ sequence."
3108 :type 'hook 3128 :type 'hook
3109 :group 'mh-hooks 3129 :group 'mh-hooks
3110 :group 'mh-sequences 3130 :group 'mh-sequences
3111 :package-version '(MH-E "6.0")) 3131 :package-version '(MH-E . "6.0"))
3112 3132
3113 3133
3114 3134
@@ -3119,7 +3139,7 @@ sequence."
3119 3139
3120;; To add a new face: 3140;; To add a new face:
3121;; 1. Add entry to variable mh-face-data. 3141;; 1. Add entry to variable mh-face-data.
3122;; 2. Create face using mh-defface (which removes min-color spec and 3142;; 2. Create face using defface-mh (which removes min-color spec and
3123;; :package-version keyword where these are not supported), 3143;; :package-version keyword where these are not supported),
3124;; accessing face data with function mh-face-data. 3144;; accessing face data with function mh-face-data.
3125;; 3. Add inherit argument to function mh-face-data if applicable. 3145;; 3. Add inherit argument to function mh-face-data if applicable.
@@ -3268,7 +3288,7 @@ sequence."
3268 (:underline t))))) 3288 (:underline t)))))
3269 "MH-E face data. 3289 "MH-E face data.
3270Used by function `mh-face-data' which returns spec that is 3290Used by function `mh-face-data' which returns spec that is
3271consumed by `mh-defface'.") 3291consumed by `defface-mh'.")
3272 3292
3273(require 'cus-face) 3293(require 'cus-face)
3274 3294
@@ -3321,14 +3341,14 @@ specified colors."
3321 (setq new-spec (cons entry new-spec))))) 3341 (setq new-spec (cons entry new-spec)))))
3322 new-spec)))) 3342 new-spec))))
3323 3343
3324(mh-defface mh-folder-address 3344(defface-mh mh-folder-address
3325 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) 3345 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3326 "Recipient face." 3346 "Recipient face."
3327 :group 'mh-faces 3347 :group 'mh-faces
3328 :group 'mh-folder 3348 :group 'mh-folder
3329 :package-version '(MH-E "8.0")) 3349 :package-version '(MH-E . "8.0"))
3330 3350
3331(mh-defface mh-folder-body 3351(defface-mh mh-folder-body
3332 (mh-face-data 'mh-folder-msg-number 3352 (mh-face-data 'mh-folder-msg-number
3333 '((((class color)) 3353 '((((class color))
3334 (:inherit mh-folder-msg-number)) 3354 (:inherit mh-folder-msg-number))
@@ -3337,49 +3357,49 @@ specified colors."
3337 "Body text face." 3357 "Body text face."
3338 :group 'mh-faces 3358 :group 'mh-faces
3339 :group 'mh-folder 3359 :group 'mh-folder
3340 :package-version '(MH-E "8.0")) 3360 :package-version '(MH-E . "8.0"))
3341 3361
3342(mh-defface mh-folder-cur-msg-number 3362(defface-mh mh-folder-cur-msg-number
3343 (mh-face-data 'mh-folder-msg-number 3363 (mh-face-data 'mh-folder-msg-number
3344 '((t (:inherit mh-folder-msg-number :bold t)))) 3364 '((t (:inherit mh-folder-msg-number :bold t))))
3345 "Current message number face." 3365 "Current message number face."
3346 :group 'mh-faces 3366 :group 'mh-faces
3347 :group 'mh-folder 3367 :group 'mh-folder
3348 :package-version '(MH-E "8.0")) 3368 :package-version '(MH-E . "8.0"))
3349 3369
3350(mh-defface mh-folder-date 3370(defface-mh mh-folder-date
3351 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) 3371 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3352 "Date face." 3372 "Date face."
3353 :group 'mh-faces 3373 :group 'mh-faces
3354 :group 'mh-folder 3374 :group 'mh-folder
3355 :package-version '(MH-E "8.0")) 3375 :package-version '(MH-E . "8.0"))
3356 3376
3357(mh-defface mh-folder-deleted 3377(defface-mh mh-folder-deleted
3358 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) 3378 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3359 "Deleted message face." 3379 "Deleted message face."
3360 :group 'mh-faces 3380 :group 'mh-faces
3361 :group 'mh-folder 3381 :group 'mh-folder
3362 :package-version '(MH-E "8.0")) 3382 :package-version '(MH-E . "8.0"))
3363 3383
3364(mh-defface mh-folder-followup (mh-face-data 'mh-folder-followup) 3384(defface-mh mh-folder-followup (mh-face-data 'mh-folder-followup)
3365 "\"Re:\" face." 3385 "\"Re:\" face."
3366 :group 'mh-faces 3386 :group 'mh-faces
3367 :group 'mh-folder 3387 :group 'mh-folder
3368 :package-version '(MH-E "8.0")) 3388 :package-version '(MH-E . "8.0"))
3369 3389
3370(mh-defface mh-folder-msg-number (mh-face-data 'mh-folder-msg-number) 3390(defface-mh mh-folder-msg-number (mh-face-data 'mh-folder-msg-number)
3371 "Message number face." 3391 "Message number face."
3372 :group 'mh-faces 3392 :group 'mh-faces
3373 :group 'mh-folder 3393 :group 'mh-folder
3374 :package-version '(MH-E "8.0")) 3394 :package-version '(MH-E . "8.0"))
3375 3395
3376(mh-defface mh-folder-refiled (mh-face-data 'mh-folder-refiled) 3396(defface-mh mh-folder-refiled (mh-face-data 'mh-folder-refiled)
3377 "Refiled message face." 3397 "Refiled message face."
3378 :group 'mh-faces 3398 :group 'mh-faces
3379 :group 'mh-folder 3399 :group 'mh-folder
3380 :package-version '(MH-E "8.0")) 3400 :package-version '(MH-E . "8.0"))
3381 3401
3382(mh-defface mh-folder-sent-to-me-hint 3402(defface-mh mh-folder-sent-to-me-hint
3383 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date)))) 3403 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date))))
3384 "Fontification hint face in messages sent directly to us. 3404 "Fontification hint face in messages sent directly to us.
3385The detection of messages sent to us is governed by the scan 3405The detection of messages sent to us is governed by the scan
@@ -3387,9 +3407,9 @@ format `mh-scan-format-nmh' and the regular expression
3387`mh-scan-sent-to-me-sender-regexp'." 3407`mh-scan-sent-to-me-sender-regexp'."
3388 :group 'mh-faces 3408 :group 'mh-faces
3389 :group 'mh-folder 3409 :group 'mh-folder
3390 :package-version '(MH-E "8.0")) 3410 :package-version '(MH-E . "8.0"))
3391 3411
3392(mh-defface mh-folder-sent-to-me-sender 3412(defface-mh mh-folder-sent-to-me-sender
3393 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup)))) 3413 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup))))
3394 "Sender face in messages sent directly to us. 3414 "Sender face in messages sent directly to us.
3395The detection of messages sent to us is governed by the scan 3415The detection of messages sent to us is governed by the scan
@@ -3397,145 +3417,135 @@ format `mh-scan-format-nmh' and the regular expression
3397`mh-scan-sent-to-me-sender-regexp'." 3417`mh-scan-sent-to-me-sender-regexp'."
3398 :group 'mh-faces 3418 :group 'mh-faces
3399 :group 'mh-folder 3419 :group 'mh-folder
3400 :package-version '(MH-E "8.0")) 3420 :package-version '(MH-E . "8.0"))
3401 3421
3402(mh-defface mh-folder-subject (mh-face-data 'mh-folder-subject) 3422(defface-mh mh-folder-subject (mh-face-data 'mh-folder-subject)
3403 "Subject face." 3423 "Subject face."
3404 :group 'mh-faces 3424 :group 'mh-faces
3405 :group 'mh-folder 3425 :group 'mh-folder
3406 :package-version '(MH-E "8.0")) 3426 :package-version '(MH-E . "8.0"))
3407 3427
3408(mh-defface mh-folder-tick (mh-face-data 'mh-folder-tick) 3428(defface-mh mh-folder-tick (mh-face-data 'mh-folder-tick)
3409 "Ticked message face." 3429 "Ticked message face."
3410 :group 'mh-faces 3430 :group 'mh-faces
3411 :group 'mh-folder 3431 :group 'mh-folder
3412 :package-version '(MH-E "8.0")) 3432 :package-version '(MH-E . "8.0"))
3413 3433
3414(mh-defface mh-folder-to (mh-face-data 'mh-folder-to) 3434(defface-mh mh-folder-to (mh-face-data 'mh-folder-to)
3415 "\"To:\" face." 3435 "\"To:\" face."
3416 :group 'mh-faces 3436 :group 'mh-faces
3417 :group 'mh-folder 3437 :group 'mh-folder
3418 :package-version '(MH-E "8.0")) 3438 :package-version '(MH-E . "8.0"))
3419 3439
3420(mh-defface mh-letter-header-field (mh-face-data 'mh-letter-header-field) 3440(defface-mh mh-letter-header-field (mh-face-data 'mh-letter-header-field)
3421 "Editable header field value face in draft buffers." 3441 "Editable header field value face in draft buffers."
3422 :group 'mh-faces 3442 :group 'mh-faces
3423 :group 'mh-letter 3443 :group 'mh-letter
3424 :package-version '(MH-E "8.0")) 3444 :package-version '(MH-E . "8.0"))
3425 3445
3426(mh-defface mh-search-folder (mh-face-data 'mh-search-folder) 3446(defface-mh mh-search-folder (mh-face-data 'mh-search-folder)
3427 "Folder heading face in MH-Folder buffers created by searches." 3447 "Folder heading face in MH-Folder buffers created by searches."
3428 :group 'mh-faces 3448 :group 'mh-faces
3429 :group 'mh-search 3449 :group 'mh-search
3430 :package-version '(MH-E "8.0")) 3450 :package-version '(MH-E . "8.0"))
3431 3451
3432(mh-defface mh-show-cc (mh-face-data 'mh-show-cc) 3452(defface-mh mh-show-cc (mh-face-data 'mh-show-cc)
3433 "Face used to highlight \"cc:\" header fields." 3453 "Face used to highlight \"cc:\" header fields."
3434 :group 'mh-faces 3454 :group 'mh-faces
3435 :group 'mh-show 3455 :group 'mh-show
3436 :package-version '(MH-E "8.0")) 3456 :package-version '(MH-E . "8.0"))
3437 3457
3438(mh-defface mh-show-date (mh-face-data 'mh-show-date) 3458(defface-mh mh-show-date (mh-face-data 'mh-show-date)
3439 "Face used to highlight \"Date:\" header fields." 3459 "Face used to highlight \"Date:\" header fields."
3440 :group 'mh-faces 3460 :group 'mh-faces
3441 :group 'mh-show 3461 :group 'mh-show
3442 :package-version '(MH-E "8.0")) 3462 :package-version '(MH-E . "8.0"))
3443 3463
3444(mh-defface mh-show-from (mh-face-data 'mh-show-from) 3464(defface-mh mh-show-from (mh-face-data 'mh-show-from)
3445 "Face used to highlight \"From:\" header fields." 3465 "Face used to highlight \"From:\" header fields."
3446 :group 'mh-faces 3466 :group 'mh-faces
3447 :group 'mh-show 3467 :group 'mh-show
3448 :package-version '(MH-E "8.0")) 3468 :package-version '(MH-E . "8.0"))
3449 3469
3450(mh-defface mh-show-header (mh-face-data 'mh-show-header) 3470(defface-mh mh-show-header (mh-face-data 'mh-show-header)
3451 "Face used to deemphasize less interesting header fields." 3471 "Face used to deemphasize less interesting header fields."
3452 :group 'mh-faces 3472 :group 'mh-faces
3453 :group 'mh-show 3473 :group 'mh-show
3454 :package-version '(MH-E "8.0")) 3474 :package-version '(MH-E . "8.0"))
3455 3475
3456(mh-defface mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad) 3476(defface-mh mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad)
3457 "Bad PGG signature face." 3477 "Bad PGG signature face."
3458 :group 'mh-faces 3478 :group 'mh-faces
3459 :group 'mh-show 3479 :group 'mh-show
3460 :package-version '(MH-E "8.0")) 3480 :package-version '(MH-E . "8.0"))
3461 3481
3462(mh-defface mh-show-pgg-good (mh-face-data 'mh-show-pgg-good) 3482(defface-mh mh-show-pgg-good (mh-face-data 'mh-show-pgg-good)
3463 "Good PGG signature face." 3483 "Good PGG signature face."
3464 :group 'mh-faces 3484 :group 'mh-faces
3465 :group 'mh-show 3485 :group 'mh-show
3466 :package-version '(MH-E "8.0")) 3486 :package-version '(MH-E . "8.0"))
3467 3487
3468(mh-defface mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown) 3488(defface-mh mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown)
3469 "Unknown or untrusted PGG signature face." 3489 "Unknown or untrusted PGG signature face."
3470 :group 'mh-faces 3490 :group 'mh-faces
3471 :group 'mh-show 3491 :group 'mh-show
3472 :package-version '(MH-E "8.0")) 3492 :package-version '(MH-E . "8.0"))
3473 3493
3474(mh-defface mh-show-signature (mh-face-data 'mh-show-signature) 3494(defface-mh mh-show-signature (mh-face-data 'mh-show-signature)
3475 "Signature face." 3495 "Signature face."
3476 :group 'mh-faces 3496 :group 'mh-faces
3477 :group 'mh-show 3497 :group 'mh-show
3478 :package-version '(MH-E "8.0")) 3498 :package-version '(MH-E . "8.0"))
3479 3499
3480(mh-defface mh-show-subject 3500(defface-mh mh-show-subject
3481 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) 3501 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3482 "Face used to highlight \"Subject:\" header fields." 3502 "Face used to highlight \"Subject:\" header fields."
3483 :group 'mh-faces 3503 :group 'mh-faces
3484 :group 'mh-show 3504 :group 'mh-show
3485 :package-version '(MH-E "8.0")) 3505 :package-version '(MH-E . "8.0"))
3486 3506
3487(mh-defface mh-show-to (mh-face-data 'mh-show-to) 3507(defface-mh mh-show-to (mh-face-data 'mh-show-to)
3488 "Face used to highlight \"To:\" header fields." 3508 "Face used to highlight \"To:\" header fields."
3489 :group 'mh-faces 3509 :group 'mh-faces
3490 :group 'mh-show 3510 :group 'mh-show
3491 :package-version '(MH-E "8.0")) 3511 :package-version '(MH-E . "8.0"))
3492 3512
3493(mh-defface mh-show-xface 3513(defface-mh mh-show-xface
3494 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight))))) 3514 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight)))))
3495"X-Face image face. 3515"X-Face image face.
3496The background and foreground are used in the image." 3516The background and foreground are used in the image."
3497 :group 'mh-faces 3517 :group 'mh-faces
3498 :group 'mh-show 3518 :group 'mh-show
3499 :package-version '(MH-E "8.0")) 3519 :package-version '(MH-E . "8.0"))
3500 3520
3501(mh-defface mh-speedbar-folder (mh-face-data 'mh-speedbar-folder) 3521(defface-mh mh-speedbar-folder (mh-face-data 'mh-speedbar-folder)
3502 "Basic folder face." 3522 "Basic folder face."
3503 :group 'mh-faces 3523 :group 'mh-faces
3504 :group 'mh-speedbar 3524 :group 'mh-speedbar
3505 :package-version '(MH-E "8.0")) 3525 :package-version '(MH-E . "8.0"))
3506 3526
3507(mh-defface mh-speedbar-folder-with-unseen-messages 3527(defface-mh mh-speedbar-folder-with-unseen-messages
3508 (mh-face-data 'mh-speedbar-folder 3528 (mh-face-data 'mh-speedbar-folder
3509 '((t (:inherit mh-speedbar-folder :bold t)))) 3529 '((t (:inherit mh-speedbar-folder :bold t))))
3510 "Folder face when folder contains unread messages." 3530 "Folder face when folder contains unread messages."
3511 :group 'mh-faces 3531 :group 'mh-faces
3512 :group 'mh-speedbar 3532 :group 'mh-speedbar
3513 :package-version '(MH-E "8.0")) 3533 :package-version '(MH-E . "8.0"))
3514 3534
3515(mh-defface mh-speedbar-selected-folder 3535(defface-mh mh-speedbar-selected-folder
3516 (mh-face-data 'mh-speedbar-selected-folder) 3536 (mh-face-data 'mh-speedbar-selected-folder)
3517 "Selected folder face." 3537 "Selected folder face."
3518 :group 'mh-faces 3538 :group 'mh-faces
3519 :group 'mh-speedbar 3539 :group 'mh-speedbar
3520 :package-version '(MH-E "8.0")) 3540 :package-version '(MH-E . "8.0"))
3521 3541
3522(mh-defface mh-speedbar-selected-folder-with-unseen-messages 3542(defface-mh mh-speedbar-selected-folder-with-unseen-messages
3523 (mh-face-data 'mh-speedbar-selected-folder 3543 (mh-face-data 'mh-speedbar-selected-folder
3524 '((t (:inherit mh-speedbar-selected-folder :bold t)))) 3544 '((t (:inherit mh-speedbar-selected-folder :bold t))))
3525 "Selected folder face when folder contains unread messages." 3545 "Selected folder face when folder contains unread messages."
3526 :group 'mh-faces 3546 :group 'mh-faces
3527 :group 'mh-speedbar 3547 :group 'mh-speedbar
3528 :package-version '(MH-E "8.0")) 3548 :package-version '(MH-E . "8.0"))
3529
3530;; Get rid of temporary functions and data structures.
3531(fmakunbound 'mh-defcustom)
3532(fmakunbound 'mh-defface)
3533(fmakunbound 'mh-defgroup)
3534(fmakunbound 'mh-face-data)
3535(fmakunbound 'mh-strip-package-version)
3536(makunbound 'mh-face-data)
3537(makunbound 'mh-inherit-face-flag)
3538(makunbound 'mh-min-colors-defined-flag)
3539 3549
3540(provide 'mh-e) 3550(provide 'mh-e)
3541 3551
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 8fb65051a86..8516856f14e 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -522,11 +522,10 @@ font-lock is done highlighting.")
522 (add-to-list 'which-func-modes 'mh-folder-mode)) 522 (add-to-list 'which-func-modes 'mh-folder-mode))
523 523
524;; Shush compiler. 524;; Shush compiler.
525(eval-when-compile 525(defvar desktop-save-buffer)
526 (defvar desktop-save-buffer) 526(defvar font-lock-auto-fontify)
527 (defvar font-lock-auto-fontify) 527(defvar image-load-path)
528 (defvar image-load-path) 528(defvar font-lock-defaults) ; XEmacs
529 (mh-do-in-xemacs (defvar font-lock-defaults)))
530 529
531(defvar mh-folder-buttons-init-flag nil) 530(defvar mh-folder-buttons-init-flag nil)
532 531
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index 84b04d51c35..e97533e5724 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -138,7 +138,7 @@ Display the results only if something went wrong."
138 (display-buffer mh-temp-buffer))) 138 (display-buffer mh-temp-buffer)))
139 139
140;; Shush compiler. 140;; Shush compiler.
141(eval-when-compile (defvar view-exit-action)) 141(defvar view-exit-action)
142 142
143;;;###mh-autoload 143;;;###mh-autoload
144(defun mh-list-folders () 144(defun mh-list-folders ()
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index 970f98556e2..1e3b385eda7 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -39,19 +39,19 @@
39(mh-require 'mml nil t) 39(mh-require 'mml nil t)
40 40
41;; Copy of function from gnus-util.el. 41;; Copy of function from gnus-util.el.
42(mh-defun-compat mh-gnus-local-map-property gnus-local-map-property (map) 42(defun-mh mh-gnus-local-map-property gnus-local-map-property (map)
43 "Return a list suitable for a text property list specifying keymap MAP." 43 "Return a list suitable for a text property list specifying keymap MAP."
44 (cond (mh-xemacs-flag (list 'keymap map)) 44 (cond (mh-xemacs-flag (list 'keymap map))
45 ((>= emacs-major-version 21) (list 'keymap map)) 45 ((>= emacs-major-version 21) (list 'keymap map))
46 (t (list 'local-map map)))) 46 (t (list 'local-map map))))
47 47
48;; Copy of function from mm-decode.el. 48;; Copy of function from mm-decode.el.
49(mh-defun-compat mh-mm-merge-handles mm-merge-handles (handles1 handles2) 49(defun-mh mh-mm-merge-handles mm-merge-handles (handles1 handles2)
50 (append (if (listp (car handles1)) handles1 (list handles1)) 50 (append (if (listp (car handles1)) handles1 (list handles1))
51 (if (listp (car handles2)) handles2 (list handles2)))) 51 (if (listp (car handles2)) handles2 (list handles2))))
52 52
53;; Copy of function from mm-decode.el. 53;; Copy of function from mm-decode.el.
54(mh-defun-compat mh-mm-set-handle-multipart-parameter 54(defun-mh mh-mm-set-handle-multipart-parameter
55 mm-set-handle-multipart-parameter (handle parameter value) 55 mm-set-handle-multipart-parameter (handle parameter value)
56 ;; HANDLE could be a CTL. 56 ;; HANDLE could be a CTL.
57 (if handle 57 (if handle
@@ -59,7 +59,7 @@
59 (car handle)))) 59 (car handle))))
60 60
61;; Copy of function from mm-view.el. 61;; Copy of function from mm-view.el.
62(mh-defun-compat mh-mm-inline-text-vcard mm-inline-text-vcard (handle) 62(defun-mh mh-mm-inline-text-vcard mm-inline-text-vcard (handle)
63 (let (buffer-read-only) 63 (let (buffer-read-only)
64 (mm-insert-inline 64 (mm-insert-inline
65 handle 65 handle
@@ -73,17 +73,17 @@
73 73
74;; Function from mm-decode.el used in PGP messages. Just define it with older 74;; Function from mm-decode.el used in PGP messages. Just define it with older
75;; Gnus to avoid compiler warning. 75;; Gnus to avoid compiler warning.
76(mh-defun-compat mh-mm-possibly-verify-or-decrypt 76(defun-mh mh-mm-possibly-verify-or-decrypt
77 mm-possibly-verify-or-decrypt (parts ctl) 77 mm-possibly-verify-or-decrypt (parts ctl)
78 nil) 78 nil)
79 79
80;; Copy of macro in mm-decode.el. 80;; Copy of macro in mm-decode.el.
81(mh-defmacro-compat mh-mm-handle-multipart-ctl-parameter 81(defmacro-mh mh-mm-handle-multipart-ctl-parameter
82 mm-handle-multipart-ctl-parameter (handle parameter) 82 mm-handle-multipart-ctl-parameter (handle parameter)
83 `(get-text-property 0 ,parameter (car ,handle))) 83 `(get-text-property 0 ,parameter (car ,handle)))
84 84
85;; Copy of function in mm-decode.el. 85;; Copy of function in mm-decode.el.
86(mh-defun-compat mh-mm-readable-p mm-readable-p (handle) 86(defun-mh mh-mm-readable-p mm-readable-p (handle)
87 "Say whether the content of HANDLE is readable." 87 "Say whether the content of HANDLE is readable."
88 (and (< (with-current-buffer (mm-handle-buffer handle) 88 (and (< (with-current-buffer (mm-handle-buffer handle)
89 (buffer-size)) 10000) 89 (buffer-size)) 10000)
@@ -93,7 +93,7 @@
93 (not (mh-mm-long-lines-p 76)))))) 93 (not (mh-mm-long-lines-p 76))))))
94 94
95;; Copy of function in mm-bodies.el. 95;; Copy of function in mm-bodies.el.
96(mh-defun-compat mh-mm-long-lines-p mm-long-lines-p (length) 96(defun-mh mh-mm-long-lines-p mm-long-lines-p (length)
97 "Say whether any of the lines in the buffer is longer than LENGTH." 97 "Say whether any of the lines in the buffer is longer than LENGTH."
98 (save-excursion 98 (save-excursion
99 (goto-char (point-min)) 99 (goto-char (point-min))
@@ -105,21 +105,21 @@
105 (and (> (current-column) length) 105 (and (> (current-column) length)
106 (current-column)))) 106 (current-column))))
107 107
108(mh-defun-compat mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle) 108(defun-mh mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle)
109 ;; Released Gnus doesn't keep handles associated with externally displayed 109 ;; Released Gnus doesn't keep handles associated with externally displayed
110 ;; MIME parts. So this will always return nil. 110 ;; MIME parts. So this will always return nil.
111 nil) 111 nil)
112 112
113(mh-defun-compat mh-mm-destroy-parts mm-destroy-parts (list) 113(defun-mh mh-mm-destroy-parts mm-destroy-parts (list)
114 "Older versions of Emacs don't have this function." 114 "Older versions of Emacs don't have this function."
115 nil) 115 nil)
116 116
117(mh-defun-compat mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles) 117(defun-mh mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles)
118 "Emacs 21 and XEmacs don't have this function." 118 "Emacs 21 and XEmacs don't have this function."
119 nil) 119 nil)
120 120
121;; Copy of function in mml.el. 121;; Copy of function in mml.el.
122(mh-defun-compat mh-mml-minibuffer-read-disposition 122(defun-mh mh-mml-minibuffer-read-disposition
123 mml-minibuffer-read-disposition (type &optional default) 123 mml-minibuffer-read-disposition (type &optional default)
124 (unless default (setq default 124 (unless default (setq default
125 (if (and (string-match "\\`text/" type) 125 (if (and (string-match "\\`text/" type)
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 024c1875eac..2da824c34c2 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -278,9 +278,8 @@ searching for `mh-mail-header-separator' in the buffer."
278(defvar mh-letter-buttons-init-flag nil) 278(defvar mh-letter-buttons-init-flag nil)
279 279
280;; Shush compiler. 280;; Shush compiler.
281(eval-when-compile 281(defvar image-load-path)
282 (defvar image-load-path) 282(defvar font-lock-defaults) ; XEmacs
283 (mh-do-in-xemacs (defvar font-lock-defaults)))
284 283
285;; Ensure new buffers won't get this mode if default-major-mode is nil. 284;; Ensure new buffers won't get this mode if default-major-mode is nil.
286(put 'mh-letter-mode 'mode-class 'special) 285(put 'mh-letter-mode 'mode-class 'special)
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index d35e759bcd4..c05e867a2b4 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -825,7 +825,9 @@ being used to highlight the signature in a MIME part."
825;;; Button Display 825;;; Button Display
826 826
827;; Shush compiler. 827;; Shush compiler.
828(eval-when-compile (mh-do-in-xemacs (defvar dots) (defvar type) (defvar ov))) 828(defvar dots) ; XEmacs
829(defvar type) ; XEmacs
830(defvar ov) ; XEmacs
829 831
830(defun mh-insert-mime-button (handle index displayed) 832(defun mh-insert-mime-button (handle index displayed)
831 "Insert MIME button for HANDLE. 833 "Insert MIME button for HANDLE.
@@ -870,12 +872,9 @@ by commands like \"K v\" which operate on individual MIME parts."
870 (mh-funcall-if-exists overlay-put ov 'evaporate t)))) 872 (mh-funcall-if-exists overlay-put ov 'evaporate t))))
871 873
872;; Shush compiler. 874;; Shush compiler.
873(eval-when-compile 875(defvar mm-verify-function-alist) ; < Emacs 22
874 (when (< emacs-major-version 22) 876(defvar mm-decrypt-function-alist) ; < Emacs 22
875 (defvar mm-verify-function-alist) 877(defvar pressed-details) ; XEmacs
876 (defvar mm-decrypt-function-alist))
877 (mh-do-in-xemacs
878 (defvar pressed-details)))
879 878
880(defun mh-insert-mime-security-button (handle) 879(defun mh-insert-mime-security-button (handle)
881 "Display buttons for PGP message, HANDLE." 880 "Display buttons for PGP message, HANDLE."
@@ -1537,7 +1536,7 @@ a prefix argument NOCONFIRM."
1537 (after-find-file nil))) 1536 (after-find-file nil)))
1538 1537
1539;; Shush compiler. 1538;; Shush compiler.
1540(eval-when-compile (defvar mh-identity-pgg-default-user-id)) 1539(defvar mh-identity-pgg-default-user-id)
1541 1540
1542;;;###mh-autoload 1541;;;###mh-autoload
1543(defun mh-mml-secure-message-encrypt (method) 1542(defun mh-mml-secure-message-encrypt (method)
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 17b63c91000..14891204fad 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -324,7 +324,7 @@ folder containing the index search results."
324 count (> (hash-table-count msg-hash) 0))))))) 324 count (> (hash-table-count msg-hash) 0)))))))
325 325
326;; Shush compiler. 326;; Shush compiler.
327(eval-when-compile (mh-do-in-xemacs (defvar pick-folder))) 327(defvar pick-folder) ; XEmacs
328 328
329(defun mh-search-folder (folder window-config) 329(defun mh-search-folder (folder window-config)
330 "Search FOLDER for messages matching a pattern. 330 "Search FOLDER for messages matching a pattern.
@@ -404,10 +404,8 @@ or nothing to search all folders."
404 (mh-index-sequenced-messages folders mh-tick-seq)) 404 (mh-index-sequenced-messages folders mh-tick-seq))
405 405
406;; Shush compiler. 406;; Shush compiler.
407(eval-when-compile 407(defvar mh-mairix-folder) ; XEmacs
408 (mh-do-in-xemacs 408(defvar mh-flists-search-folders) ; XEmacs
409 (defvar mh-mairix-folder)
410 (defvar mh-flists-search-folders)))
411 409
412;;;###mh-autoload 410;;;###mh-autoload
413(defun mh-index-sequenced-messages (folders sequence) 411(defun mh-index-sequenced-messages (folders sequence)
@@ -1414,9 +1412,7 @@ being the list of messages originally from that folder."
1414(mh-require 'which-func nil t) 1412(mh-require 'which-func nil t)
1415 1413
1416;; Shush compiler. 1414;; Shush compiler.
1417(eval-when-compile 1415(defvar which-func-mode) ; < Emacs 22, XEmacs
1418 (if (or mh-xemacs-flag (< emacs-major-version 22))
1419 (defvar which-func-mode)))
1420 1416
1421;;;###mh-autoload 1417;;;###mh-autoload
1422(defun mh-index-create-imenu-index () 1418(defun mh-index-create-imenu-index ()
@@ -1441,7 +1437,7 @@ being the list of messages originally from that folder."
1441 mh-index-data) 1437 mh-index-data)
1442 1438
1443;; Shush compiler 1439;; Shush compiler
1444(eval-when-compile (if mh-xemacs-flag (defvar mh-speed-flists-inhibit-flag))) 1440(defvar mh-speed-flists-inhibit-flag) ; XEmacs
1445 1441
1446;;;###mh-autoload 1442;;;###mh-autoload
1447(defun mh-index-execute-commands () 1443(defun mh-index-execute-commands ()
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index a5732d00bc6..ae260692b74 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -134,7 +134,7 @@ you want to delete the messages, use \"\\[universal-argument]
134 (apply #'mh-speed-flists t folders-changed)))) 134 (apply #'mh-speed-flists t folders-changed))))
135 135
136;; Shush compiler. 136;; Shush compiler.
137(eval-when-compile (defvar view-exit-action)) 137(defvar view-exit-action)
138 138
139;;;###mh-autoload 139;;;###mh-autoload
140(defun mh-list-sequences () 140(defun mh-list-sequences ()
@@ -202,7 +202,7 @@ MESSAGE appears."
202 " ")))) 202 " "))))
203 203
204;; Shush compiler. 204;; Shush compiler.
205(eval-when-compile (mh-do-in-xemacs (defvar tool-bar-mode))) 205(defvar tool-bar-mode) ; XEmacs
206 206
207;;;###mh-autoload 207;;;###mh-autoload
208(defun mh-narrow-to-seq (sequence) 208(defun mh-narrow-to-seq (sequence)
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index d7b656d3462..fb6698467da 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -815,7 +815,7 @@ operation."
815(put 'mh-show-mode 'mode-class 'special) 815(put 'mh-show-mode 'mode-class 'special)
816 816
817;; Shush compiler. 817;; Shush compiler.
818(eval-when-compile (defvar font-lock-auto-fontify)) 818(defvar font-lock-auto-fontify)
819 819
820;;;###mh-autoload 820;;;###mh-autoload
821(define-derived-mode mh-show-mode text-mode "MH-Show" 821(define-derived-mode mh-show-mode text-mode "MH-Show"
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index e41ee0bcc4f..73a15583165 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -556,10 +556,18 @@ nested folders within them."
556 sub-folders) 556 sub-folders)
557 sub-folders))) 557 sub-folders)))
558 558
559;; FIXME: This function does not do well if FOLDER does not exist. It
560;; then changes the context to that folder which causes problems down
561;; the line. Since a folder in the cache could later be deleted, it
562;; would be good for mh-sub-folders-actual to return nil in this case
563;; so that mh-sub-folders could delete it from the cache. This
564;; function could protect itself by using a temporary context.
559(defun mh-sub-folders-actual (folder) 565(defun mh-sub-folders-actual (folder)
560 "Execute the command folders to return the sub-folders of FOLDER. 566 "Execute the command folders to return the sub-folders of FOLDER.
561Filters out the folder names that start with \".\" so that 567Filters out the folder names that start with \".\" so that
562directories that aren't usually mail folders are hidden." 568directories that aren't usually mail folders are hidden.
569Expects FOLDER to have already been normalized with
570 (mh-normalize-folder-name folder nil nil t)"
563 (let ((arg-list `(,(expand-file-name "folders" mh-progs) 571 (let ((arg-list `(,(expand-file-name "folders" mh-progs)
564 nil (t nil) nil "-noheader" "-norecurse" "-nototal" 572 nil (t nil) nil "-noheader" "-norecurse" "-nototal"
565 ,@(if (stringp folder) (list folder) ()))) 573 ,@(if (stringp folder) (list folder) ())))
@@ -657,7 +665,7 @@ See `expand-file-name' for description of DEFAULT."
657(defvar mh-folder-hist nil) 665(defvar mh-folder-hist nil)
658 666
659;; Shush compiler. 667;; Shush compiler.
660(eval-when-compile (defvar mh-speed-flists-cache)) 668(defvar mh-speed-flists-cache)
661 669
662(defvar mh-allow-root-folder-flag nil 670(defvar mh-allow-root-folder-flag nil
663 "Non-nil means \"+\" is an acceptable folder name. 671 "Non-nil means \"+\" is an acceptable folder name.
@@ -683,53 +691,58 @@ This variable should never be set.")
683(defun mh-folder-completion-function (name predicate flag) 691(defun mh-folder-completion-function (name predicate flag)
684 "Programmable completion for folder names. 692 "Programmable completion for folder names.
685NAME is the partial folder name that has been input. PREDICATE if 693NAME is the partial folder name that has been input. PREDICATE if
686non-nil is a function that is used to filter the possible choices 694non-nil is a function that is used to filter the possible
687and FLAG determines whether the completion is over." 695choices. FLAG is nil to indicate `try-completion', t for
696`all-completions', or the symbol lambda for `test-completion'.
697See Info node `(elisp) Programmed Completion' for details."
688 (let* ((orig-name name) 698 (let* ((orig-name name)
699 ;; After normalization, name is nil, +, or +something. If a
700 ;; trailing slash is present, it is preserved.
689 (name (mh-normalize-folder-name name nil t)) 701 (name (mh-normalize-folder-name name nil t))
690 (last-slash (mh-search-from-end ?/ name)) 702 (last-slash (mh-search-from-end ?/ name))
691 (last-complete (if last-slash (substring name 0 last-slash) nil)) 703 ;; nil if + or +folder; +folder/ if slash present.
704 (last-complete (if last-slash (substring name 0 (1+ last-slash)) nil))
705 ;; Either +folder/remainder, +remainder, or "".
692 (remainder (cond (last-complete (substring name (1+ last-slash))) 706 (remainder (cond (last-complete (substring name (1+ last-slash)))
693 ((and (> (length name) 0) (equal (aref name 0) ?+)) 707 (name (substring name 1))
694 (substring name 1))
695 (t "")))) 708 (t ""))))
696 (cond ((eq flag nil) 709 (cond ((eq flag nil)
697 (let ((try-res (try-completion 710 (let ((try-res
698 name 711 (try-completion
699 (mapcar (lambda (x) 712 name
700 (cons (if (not last-complete) 713 (mapcar (lambda (x)
701 (concat "+" (car x)) 714 (cons (concat (or last-complete "+") (car x))
702 (concat last-complete "/" (car x))) 715 (cdr x)))
703 (cdr x))) 716 (mh-sub-folders last-complete t))
704 (mh-sub-folders last-complete t)) 717 predicate)))
705 predicate)))
706 (cond ((eq try-res nil) nil) 718 (cond ((eq try-res nil) nil)
707 ((and (eq try-res t) (equal name orig-name)) t) 719 ((and (eq try-res t) (equal name orig-name)) t)
708 ((eq try-res t) name) 720 ((eq try-res t) name)
709 (t try-res)))) 721 (t try-res))))
710 ((eq flag t) 722 ((eq flag t)
711 (all-completions 723 (mapcar (lambda (x)
712 remainder (mh-sub-folders last-complete t) predicate)) 724 (concat (or last-complete "+") x))
725 (all-completions
726 remainder (mh-sub-folders last-complete t) predicate)))
713 ((eq flag 'lambda) 727 ((eq flag 'lambda)
714 (let ((path (concat mh-user-path 728 (let ((path (concat (unless (and (> (length name) 1)
715 (substring (mh-normalize-folder-name name) 1)))) 729 (eq (aref name 1) ?/))
730 mh-user-path)
731 (substring name 1))))
716 (cond (mh-allow-root-folder-flag (file-exists-p path)) 732 (cond (mh-allow-root-folder-flag (file-exists-p path))
717 ((equal path mh-user-path) nil) 733 ((equal path mh-user-path) nil)
718 (t (file-exists-p path)))))))) 734 (t (file-exists-p path))))))))
719 735
720;; Shush compiler. 736;; Shush compiler.
721(eval-when-compile 737(defvar completion-root-regexp) ; XEmacs
722 (mh-do-in-xemacs 738(defvar minibuffer-completing-file-name) ; XEmacs
723 (defvar completion-root-regexp)
724 (defvar minibuffer-completing-file-name)))
725 739
726(defun mh-folder-completing-read (prompt default allow-root-folder-flag) 740(defun mh-folder-completing-read (prompt default allow-root-folder-flag)
727 "Read folder name with PROMPT and default result DEFAULT. 741 "Read folder name with PROMPT and default result DEFAULT.
728If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be 742If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be
729a folder name corresponding to `mh-user-path'." 743a folder name corresponding to `mh-user-path'."
730 (mh-normalize-folder-name 744 (mh-normalize-folder-name
731 (let ((minibuffer-completing-file-name t) 745 (let ((completion-root-regexp "^[+/]")
732 (completion-root-regexp "^[+/]")
733 (minibuffer-local-completion-map mh-folder-completion-map) 746 (minibuffer-local-completion-map mh-folder-completion-map)
734 (mh-allow-root-folder-flag allow-root-folder-flag)) 747 (mh-allow-root-folder-flag allow-root-folder-flag))
735 (completing-read prompt 'mh-folder-completion-function nil nil nil 748 (completing-read prompt 'mh-folder-completion-function nil nil nil
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 58d175f5470..deb2cebad14 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -60,8 +60,7 @@
60 (funcall mh-show-xface-function))) 60 (funcall mh-show-xface-function)))
61 61
62;; Shush compiler. 62;; Shush compiler.
63(eval-when-compile 63(defvar default-enable-multibyte-characters) ; XEmacs
64 (mh-do-in-xemacs (defvar default-enable-multibyte-characters)))
65 64
66(defun mh-face-display-function () 65(defun mh-face-display-function ()
67 "Display a Face, X-Face, or X-Image-URL header field. 66 "Display a Face, X-Face, or X-Image-URL header field.
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 04fbd3636f8..34bb388f855 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -979,7 +979,7 @@ Returns nil if an error message has appeared."
979 ;; Algorithm: get waiting output. See if last line contains 979 ;; Algorithm: get waiting output. See if last line contains
980 ;; tramp-smb-prompt sentinel or tramp-smb-errors strings. 980 ;; tramp-smb-prompt sentinel or tramp-smb-errors strings.
981 ;; If not, wait a bit and again get waiting output. 981 ;; If not, wait a bit and again get waiting output.
982 (while (and (not found) (not err)) 982 (while (not found)
983 983
984 ;; Accept pending output. 984 ;; Accept pending output.
985 (tramp-accept-process-output proc) 985 (tramp-accept-process-output proc)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 58f74133cd5..617e21ebfeb 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3584,6 +3584,10 @@ the result will be a local, non-Tramp, filename."
3584 "Global variable keeping asynchronous process object. 3584 "Global variable keeping asynchronous process object.
3585Used in `tramp-handle-shell-command'") 3585Used in `tramp-handle-shell-command'")
3586 3586
3587(defvar tramp-display-shell-command-buffer t
3588 "Whether to display output buffer of `shell-command'.
3589This is necessary for handling DISPLAY of `process-file'.")
3590
3587(defun tramp-handle-shell-command (command &optional output-buffer error-buffer) 3591(defun tramp-handle-shell-command (command &optional output-buffer error-buffer)
3588 "Like `shell-command' for tramp files. 3592 "Like `shell-command' for tramp files.
3589This will break if COMMAND prints a newline, followed by the value of 3593This will break if COMMAND prints a newline, followed by the value of
@@ -3692,7 +3696,8 @@ This will break if COMMAND prints a newline, followed by the value of
3692 (skip-chars-forward "^ ") 3696 (skip-chars-forward "^ ")
3693 (setq status (read (current-buffer))))) 3697 (setq status (read (current-buffer)))))
3694 (unless (zerop (buffer-size)) 3698 (unless (zerop (buffer-size))
3695 (display-buffer output-buffer)) 3699 (when tramp-display-shell-command-buffer
3700 (display-buffer output-buffer)))
3696 status)) 3701 status))
3697 ;; The following is only executed if something strange was 3702 ;; The following is only executed if something strange was
3698 ;; happening. Emit a helpful message and do it anyway. 3703 ;; happening. Emit a helpful message and do it anyway.
@@ -3707,11 +3712,10 @@ This will break if COMMAND prints a newline, followed by the value of
3707 (when (and (numberp buffer) (zerop buffer)) 3712 (when (and (numberp buffer) (zerop buffer))
3708 (error "Implementation does not handle immediate return")) 3713 (error "Implementation does not handle immediate return"))
3709 (when (consp buffer) (error "Implementation does not handle error files")) 3714 (when (consp buffer) (error "Implementation does not handle error files"))
3710 (shell-command 3715 (let ((tramp-display-shell-command-buffer display))
3711 (mapconcat 'tramp-shell-quote-argument 3716 (shell-command
3712 (cons program args) 3717 (mapconcat 'tramp-shell-quote-argument (cons program args) " ")
3713 " ") 3718 buffer)))
3714 buffer))
3715 3719
3716;; File Editing. 3720;; File Editing.
3717 3721
@@ -4454,24 +4458,28 @@ necessary anymore."
4454 file) 4458 file)
4455 (member (match-string 1 file) (mapcar 'car tramp-methods))) 4459 (member (match-string 1 file) (mapcar 'car tramp-methods)))
4456 ((or (equal last-input-event 'tab) 4460 ((or (equal last-input-event 'tab)
4457 ;; Emacs 4461 ;; Emacs
4458 (and (integerp last-input-event) 4462 (and (integerp last-input-event)
4459 (not (event-modifiers last-input-event)) 4463 (or
4460 (or (char-equal last-input-event ?\?) 4464 ;; ?\t has event-modifier 'control
4461 (char-equal last-input-event ?\t) ; handled by 'tab already? 4465 (char-equal last-input-event ?\t)
4462 (char-equal last-input-event ?\ ))) 4466 (and (not (event-modifiers last-input-event))
4467 (or (char-equal last-input-event ?\?)
4468 (char-equal last-input-event ?\ )))))
4463 ;; XEmacs 4469 ;; XEmacs
4464 (and (featurep 'xemacs) 4470 (and (featurep 'xemacs)
4465 (not (event-modifiers last-input-event)) 4471 (or
4466 (or (char-equal 4472 ;; ?\t has event-modifier 'control
4467 (funcall (symbol-function 'event-to-character) 4473 (char-equal
4468 last-input-event) ?\?) 4474 (funcall (symbol-function 'event-to-character)
4469 (char-equal 4475 last-input-event) ?\t)
4470 (funcall (symbol-function 'event-to-character) 4476 (and (not (event-modifiers last-input-event))
4471 last-input-event) ?\t) 4477 (or (char-equal
4472 (char-equal 4478 (funcall (symbol-function 'event-to-character)
4473 (funcall (symbol-function 'event-to-character) 4479 last-input-event) ?\?)
4474 last-input-event) ?\ )))) 4480 (char-equal
4481 (funcall (symbol-function 'event-to-character)
4482 last-input-event) ?\ ))))))
4475 t))) 4483 t)))
4476 4484
4477(defun tramp-completion-handle-file-exists-p (filename) 4485(defun tramp-completion-handle-file-exists-p (filename)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index a71667291da..c7edf9a4cdc 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,7 +30,7 @@
30;; are auto-frobbed from configure.ac, so you should edit that file and run 30;; are auto-frobbed from configure.ac, so you should edit that file and run
31;; "autoconf && ./configure" to change them. 31;; "autoconf && ./configure" to change them.
32 32
33(defconst tramp-version "2.0.52" 33(defconst tramp-version "2.0.53"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 5fa9ac09b0b..877d5c9f399 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -895,6 +895,11 @@ indentation to be kept as it was before narrowing."
895 (delete-char n) 895 (delete-char n)
896 (setq ,bindent (- ,bindent n))))))))))) 896 (setq ,bindent (- ,bindent n)))))))))))
897 897
898(defun comment-add (arg)
899 (if (and (null arg) (= (string-match "[ \t]*\\'" comment-start) 1))
900 comment-add
901 (1- (prefix-numeric-value arg))))
902
898(defun comment-region-internal (beg end cs ce 903(defun comment-region-internal (beg end cs ce
899 &optional ccs cce block lines indent) 904 &optional ccs cce block lines indent)
900 "Comment region BEG .. END. 905 "Comment region BEG .. END.
@@ -999,7 +1004,6 @@ The strings used as comment starts are built from
999 1004
1000(defun comment-region-default (beg end &optional arg) 1005(defun comment-region-default (beg end &optional arg)
1001 (let* ((numarg (prefix-numeric-value arg)) 1006 (let* ((numarg (prefix-numeric-value arg))
1002 (add comment-add)
1003 (style (cdr (assoc comment-style comment-styles))) 1007 (style (cdr (assoc comment-style comment-styles)))
1004 (lines (nth 2 style)) 1008 (lines (nth 2 style))
1005 (block (nth 1 style)) 1009 (block (nth 1 style))
@@ -1032,8 +1036,7 @@ The strings used as comment starts are built from
1032 ((consp arg) (uncomment-region beg end)) 1036 ((consp arg) (uncomment-region beg end))
1033 ((< numarg 0) (uncomment-region beg end (- numarg))) 1037 ((< numarg 0) (uncomment-region beg end (- numarg)))
1034 (t 1038 (t
1035 (setq numarg (if (and (null arg) (= (length comment-start) 1)) 1039 (setq numarg (comment-add arg))
1036 add (1- numarg)))
1037 (comment-region-internal 1040 (comment-region-internal
1038 beg end 1041 beg end
1039 (let ((s (comment-padright comment-start numarg))) 1042 (let ((s (comment-padright comment-start numarg)))
@@ -1091,9 +1094,8 @@ You can configure `comment-style' to change the way regions are commented."
1091 ;; FIXME: If there's no comment to kill on this line and ARG is 1094 ;; FIXME: If there's no comment to kill on this line and ARG is
1092 ;; specified, calling comment-kill is not very clever. 1095 ;; specified, calling comment-kill is not very clever.
1093 (if arg (comment-kill (and (integerp arg) arg)) (comment-indent)) 1096 (if arg (comment-kill (and (integerp arg) arg)) (comment-indent))
1094 (let ((add (if arg (prefix-numeric-value arg) 1097 (let ((add (comment-add arg)))
1095 (if (= (length comment-start) 1) comment-add 0)))) 1098 ;; Some modes insist on keeping column 0 comment in column 0
1096 ;; Some modes insist on keeping column 0 comment in column 0
1097 ;; so we need to move away from it before inserting the comment. 1099 ;; so we need to move away from it before inserting the comment.
1098 (indent-according-to-mode) 1100 (indent-according-to-mode)
1099 (insert (comment-padright comment-start add)) 1101 (insert (comment-padright comment-start add))
diff --git a/lisp/pcvs-parse.el b/lisp/pcvs-parse.el
index 2053d8f5bd5..892dc962767 100644
--- a/lisp/pcvs-parse.el
+++ b/lisp/pcvs-parse.el
@@ -271,8 +271,8 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
271 ;; on the current branch (either because it only exists in other 271 ;; on the current branch (either because it only exists in other
272 ;; branches, or because it's been removed). 272 ;; branches, or because it's been removed).
273 (if (ignore-errors 273 (if (ignore-errors
274 (with-current-buffer 274 (with-temp-buffer
275 (find-file-noselect (expand-file-name 275 (insert-file-contents (expand-file-name
276 ".cvsignore" (file-name-directory dir))) 276 ".cvsignore" (file-name-directory dir)))
277 (goto-char (point-min)) 277 (goto-char (point-min))
278 (re-search-forward 278 (re-search-forward
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index b02df16b4f5..8120094f606 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -267,7 +267,8 @@ the evaluated constant value at compile time."
267 ["Hungry delete" c-toggle-hungry-state 267 ["Hungry delete" c-toggle-hungry-state
268 :style toggle :selected c-hungry-delete-key] 268 :style toggle :selected c-hungry-delete-key]
269 ["Subword mode" c-subword-mode 269 ["Subword mode" c-subword-mode
270 :style toggle :selected c-subword-mode]))) 270 :style toggle :selected (and (boundp 'c-subword-mode)
271 c-subword-mode)])))
271 272
272 273
273;;; Syntax tables. 274;;; Syntax tables.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 244570170fa..e6325f1de80 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -100,7 +100,9 @@
100(defvar tool-bar-map) 100(defvar tool-bar-map)
101(defvar speedbar-initial-expansion-list-name) 101(defvar speedbar-initial-expansion-list-name)
102 102
103(defvar gdb-frame-address "main" "Initialization for Assembler buffer.") 103(defvar gdb-pc-address nil "Initialization for Assembler buffer.
104Set to \"main\" at start if gdb-show-main is t.")
105(defvar gdb-frame-address nil "Identity of frame for watch expression.")
104(defvar gdb-previous-frame-address nil) 106(defvar gdb-previous-frame-address nil)
105(defvar gdb-memory-address "main") 107(defvar gdb-memory-address "main")
106(defvar gdb-previous-frame nil) 108(defvar gdb-previous-frame nil)
@@ -109,8 +111,9 @@
109(defvar gdb-current-language nil) 111(defvar gdb-current-language nil)
110(defvar gdb-var-list nil 112(defvar gdb-var-list nil
111 "List of variables in watch window. 113 "List of variables in watch window.
112Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS) where 114Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP)
113STATUS is nil (unchanged), `changed' or `out-of-scope'.") 115where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame
116address for root variables.")
114(defvar gdb-force-update t 117(defvar gdb-force-update t
115 "Non-nil means that view of watch expressions will be updated in the speedbar.") 118 "Non-nil means that view of watch expressions will be updated in the speedbar.")
116(defvar gdb-main-file nil "Source file from which program execution begins.") 119(defvar gdb-main-file nil "Source file from which program execution begins.")
@@ -417,7 +420,8 @@ With arg, use separate IO iff arg is positive."
417 (goto-char (point-min)) 420 (goto-char (point-min))
418 (when (search-forward "read in on demand:" nil t) 421 (when (search-forward "read in on demand:" nil t)
419 (while (re-search-forward gdb-source-file-regexp nil t) 422 (while (re-search-forward gdb-source-file-regexp nil t)
420 (push (or (match-string 1) (match-string 2)) gdb-source-file-list)) 423 (push (file-name-nondirectory (or (match-string 1) (match-string 2)))
424 gdb-source-file-list))
421 (dolist (buffer (buffer-list)) 425 (dolist (buffer (buffer-list))
422 (with-current-buffer buffer 426 (with-current-buffer buffer
423 (when (and buffer-file-name 427 (when (and buffer-file-name
@@ -515,7 +519,7 @@ With arg, use separate IO iff arg is positive."
515 (setq comint-input-sender 'gdb-send) 519 (setq comint-input-sender 'gdb-send)
516 520
517 ;; (re-)initialize 521 ;; (re-)initialize
518 (setq gdb-frame-address (if gdb-show-main "main" nil)) 522 (setq gdb-pc-address (if gdb-show-main "main" nil))
519 (setq gdb-previous-frame-address nil 523 (setq gdb-previous-frame-address nil
520 gdb-memory-address "main" 524 gdb-memory-address "main"
521 gdb-previous-frame nil 525 gdb-previous-frame nil
@@ -719,7 +723,7 @@ With arg, enter name of variable to be watched in the minibuffer."
719 expr) 723 expr)
720 (match-string 2) 724 (match-string 2)
721 (match-string 3) 725 (match-string 3)
722 nil nil))) 726 nil nil gdb-frame-address)))
723 (push var gdb-var-list) 727 (push var gdb-var-list)
724 (speedbar 1) 728 (speedbar 1)
725 (unless (string-equal 729 (unless (string-equal
@@ -1205,7 +1209,7 @@ This filter may simply queue input for a later time."
1205 (cons 1209 (cons
1206 (match-string 1 args) 1210 (match-string 1 args)
1207 (string-to-number (match-string 2 args)))) 1211 (string-to-number (match-string 2 args))))
1208 (setq gdb-frame-address (match-string 3 args)) 1212 (setq gdb-pc-address (match-string 3 args))
1209 ;; cover for auto-display output which comes *before* 1213 ;; cover for auto-display output which comes *before*
1210 ;; stopped annotation 1214 ;; stopped annotation
1211 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) 1215 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user)))
@@ -1356,7 +1360,7 @@ happens to be appropriate."
1356 (gdb-get-buffer-create 'gdb-breakpoints-buffer) 1360 (gdb-get-buffer-create 'gdb-breakpoints-buffer)
1357 (gdb-invalidate-breakpoints) 1361 (gdb-invalidate-breakpoints)
1358 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler 1362 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler
1359 ;; so gdb-frame-address is updated. 1363 ;; so gdb-pc-address is updated.
1360 ;; (gdb-invalidate-assembler) 1364 ;; (gdb-invalidate-assembler)
1361 1365
1362 (if (string-equal gdb-version "pre-6.4") 1366 (if (string-equal gdb-version "pre-6.4")
@@ -3003,11 +3007,11 @@ BUFFER nil or omitted means use the current buffer."
3003 (pos 1) (address) (flag) (bptno)) 3007 (pos 1) (address) (flag) (bptno))
3004 (with-current-buffer buffer 3008 (with-current-buffer buffer
3005 (save-excursion 3009 (save-excursion
3006 (if (not (equal gdb-frame-address "main")) 3010 (if (not (equal gdb-pc-address "main"))
3007 (progn 3011 (progn
3008 (goto-char (point-min)) 3012 (goto-char (point-min))
3009 (if (and gdb-frame-address 3013 (if (and gdb-pc-address
3010 (search-forward gdb-frame-address nil t)) 3014 (search-forward gdb-pc-address nil t))
3011 (progn 3015 (progn
3012 (setq pos (point)) 3016 (setq pos (point))
3013 (beginning-of-line) 3017 (beginning-of-line)
@@ -3037,7 +3041,7 @@ BUFFER nil or omitted means use the current buffer."
3037 (goto-char (point-min)) 3041 (goto-char (point-min))
3038 (if (search-forward address nil t) 3042 (if (search-forward address nil t)
3039 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) 3043 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))))
3040 (if (not (equal gdb-frame-address "main")) 3044 (if (not (equal gdb-pc-address "main"))
3041 (with-current-buffer buffer 3045 (with-current-buffer buffer
3042 (set-window-point (get-buffer-window buffer 0) pos))))) 3046 (set-window-point (get-buffer-window buffer 0) pos)))))
3043 3047
@@ -3099,7 +3103,7 @@ BUFFER nil or omitted means use the current buffer."
3099 (special-display-frame-alist gdb-frame-parameters)) 3103 (special-display-frame-alist gdb-frame-parameters))
3100 (display-buffer (gdb-get-buffer-create 'gdb-assembler-buffer)))) 3104 (display-buffer (gdb-get-buffer-create 'gdb-assembler-buffer))))
3101 3105
3102;; modified because if gdb-frame-address has changed value a new command 3106;; modified because if gdb-pc-address has changed value a new command
3103;; must be enqueued to update the buffer with the new output 3107;; must be enqueued to update the buffer with the new output
3104(defun gdb-invalidate-assembler (&optional ignored) 3108(defun gdb-invalidate-assembler (&optional ignored)
3105 (if (gdb-get-buffer 'gdb-assembler-buffer) 3109 (if (gdb-get-buffer 'gdb-assembler-buffer)
@@ -3108,7 +3112,7 @@ BUFFER nil or omitted means use the current buffer."
3108 (string-equal gdb-selected-frame gdb-previous-frame)) 3112 (string-equal gdb-selected-frame gdb-previous-frame))
3109 (if (or (not (member 'gdb-invalidate-assembler 3113 (if (or (not (member 'gdb-invalidate-assembler
3110 gdb-pending-triggers)) 3114 gdb-pending-triggers))
3111 (not (string-equal gdb-frame-address 3115 (not (string-equal gdb-pc-address
3112 gdb-previous-frame-address))) 3116 gdb-previous-frame-address)))
3113 (progn 3117 (progn
3114 ;; take previous disassemble command, if any, off the queue 3118 ;; take previous disassemble command, if any, off the queue
@@ -3121,11 +3125,11 @@ BUFFER nil or omitted means use the current buffer."
3121 (gdb-enqueue-input 3125 (gdb-enqueue-input
3122 (list 3126 (list
3123 (concat gdb-server-prefix "disassemble " 3127 (concat gdb-server-prefix "disassemble "
3124 (if (member gdb-frame-address '(nil "main")) nil "0x") 3128 (if (member gdb-pc-address '(nil "main")) nil "0x")
3125 gdb-frame-address "\n") 3129 gdb-pc-address "\n")
3126 'gdb-assembler-handler)) 3130 'gdb-assembler-handler))
3127 (push 'gdb-invalidate-assembler gdb-pending-triggers) 3131 (push 'gdb-invalidate-assembler gdb-pending-triggers)
3128 (setq gdb-previous-frame-address gdb-frame-address) 3132 (setq gdb-previous-frame-address gdb-pc-address)
3129 (setq gdb-previous-frame gdb-selected-frame))))))) 3133 (setq gdb-previous-frame gdb-selected-frame)))))))
3130 3134
3131(defun gdb-get-selected-frame () 3135(defun gdb-get-selected-frame ()
@@ -3140,8 +3144,10 @@ BUFFER nil or omitted means use the current buffer."
3140 (setq gdb-pending-triggers 3144 (setq gdb-pending-triggers
3141 (delq 'gdb-get-selected-frame gdb-pending-triggers)) 3145 (delq 'gdb-get-selected-frame gdb-pending-triggers))
3142 (goto-char (point-min)) 3146 (goto-char (point-min))
3143 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) 3147 (when (re-search-forward
3144 (setq gdb-frame-number (match-string 1))) 3148 "Stack level \\([0-9]+\\), frame at \\(0x[[:xdigit:]]+\\)" nil t)
3149 (setq gdb-frame-number (match-string 1))
3150 (setq gdb-frame-address (match-string 2)))
3145 (goto-char (point-min)) 3151 (goto-char (point-min))
3146 (when (re-search-forward ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-+?\\)\ 3152 (when (re-search-forward ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-+?\\)\
3147\\(?: (\\(\\S-+?\\):[0-9]+?)\\)*;? " 3153\\(?: (\\(\\S-+?\\):[0-9]+?)\\)*;? "
@@ -3153,7 +3159,7 @@ BUFFER nil or omitted means use the current buffer."
3153 (if (gdb-get-buffer 'gdb-assembler-buffer) 3159 (if (gdb-get-buffer 'gdb-assembler-buffer)
3154 (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer) 3160 (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer)
3155 (setq mode-name (concat "Machine:" gdb-selected-frame)))) 3161 (setq mode-name (concat "Machine:" gdb-selected-frame))))
3156 (setq gdb-frame-address (match-string 1)) 3162 (setq gdb-pc-address (match-string 1))
3157 (if (and (match-string 3) gud-overlay-arrow-position) 3163 (if (and (match-string 3) gud-overlay-arrow-position)
3158 (let ((buffer (marker-buffer gud-overlay-arrow-position)) 3164 (let ((buffer (marker-buffer gud-overlay-arrow-position))
3159 (position (marker-position gud-overlay-arrow-position))) 3165 (position (marker-position gud-overlay-arrow-position)))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 907a2e7c300..e1e2b9e28cd 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -374,8 +374,9 @@ t means that there is no stack, and we are in display-file mode.")
374(defun gud-speedbar-item-info () 374(defun gud-speedbar-item-info ()
375 "Display the data type of the watch expression element." 375 "Display the data type of the watch expression element."
376 (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))) 376 (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)))
377 (if (nth 4 var) 377 (if (nth 6 var)
378 (speedbar-message "%s" (nth 3 var))))) 378 (speedbar-message "%s: %s" (nth 6 var) (nth 3 var))
379 (speedbar-message "%s" (nth 3 var)))))
379 380
380(defun gud-install-speedbar-variables () 381(defun gud-install-speedbar-variables ()
381 "Install those variables used by speedbar to enhance gud/gdb." 382 "Install those variables used by speedbar to enhance gud/gdb."
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f110828d602..5e645535a23 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1744,6 +1744,14 @@ lines count as headers.
1744 #'python-eldoc-function) 1744 #'python-eldoc-function)
1745 (add-hook 'eldoc-mode-hook 1745 (add-hook 'eldoc-mode-hook
1746 '(lambda () (run-python nil t)) nil t) ; need it running 1746 '(lambda () (run-python nil t)) nil t) ; need it running
1747 (unless (assoc 'python-mode hs-special-modes-alist)
1748 (setq
1749 hs-special-modes-alist
1750 (cons (list
1751 'python-mode "^\\s-*def\\>" nil "#"
1752 (lambda (arg)(python-end-of-defun)(skip-chars-backward " \t\n"))
1753 nil)
1754 hs-special-modes-alist)))
1747 (if (featurep 'hippie-exp) 1755 (if (featurep 'hippie-exp)
1748 (set (make-local-variable 'hippie-expand-try-functions-list) 1756 (set (make-local-variable 'hippie-expand-try-functions-list)
1749 (cons 'python-try-complete hippie-expand-try-functions-list))) 1757 (cons 'python-try-complete hippie-expand-try-functions-list)))
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 5c8477ac337..b194bb56727 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -1042,7 +1042,7 @@ Returns nil if line starts inside a string, t if in a comment."
1042(defun tcl-send-string (proc string) 1042(defun tcl-send-string (proc string)
1043 (with-current-buffer (process-buffer proc) 1043 (with-current-buffer (process-buffer proc)
1044 (goto-char (process-mark proc)) 1044 (goto-char (process-mark proc))
1045 (beginning-of-line) 1045 (forward-line 0) ;Not (beginning-of-line) because of fields.
1046 (if (looking-at comint-prompt-regexp) 1046 (if (looking-at comint-prompt-regexp)
1047 (set-marker inferior-tcl-delete-prompt-marker (point)))) 1047 (set-marker inferior-tcl-delete-prompt-marker (point))))
1048 (comint-send-string proc string)) 1048 (comint-send-string proc string))
@@ -1050,7 +1050,7 @@ Returns nil if line starts inside a string, t if in a comment."
1050(defun tcl-send-region (proc start end) 1050(defun tcl-send-region (proc start end)
1051 (with-current-buffer (process-buffer proc) 1051 (with-current-buffer (process-buffer proc)
1052 (goto-char (process-mark proc)) 1052 (goto-char (process-mark proc))
1053 (beginning-of-line) 1053 (forward-line 0) ;Not (beginning-of-line) because of fields.
1054 (if (looking-at comint-prompt-regexp) 1054 (if (looking-at comint-prompt-regexp)
1055 (set-marker inferior-tcl-delete-prompt-marker (point)))) 1055 (set-marker inferior-tcl-delete-prompt-marker (point))))
1056 (comint-send-region proc start end)) 1056 (comint-send-region proc start end))
@@ -1080,7 +1080,11 @@ See variable `inferior-tcl-buffer'."
1080Prefix argument means switch to the Tcl buffer afterwards." 1080Prefix argument means switch to the Tcl buffer afterwards."
1081 (interactive "r\nP") 1081 (interactive "r\nP")
1082 (let ((proc (inferior-tcl-proc))) 1082 (let ((proc (inferior-tcl-proc)))
1083 (tcl-send-region proc start end) 1083 (tcl-send-region
1084 proc
1085 ;; Strip leading and trailing whitespace.
1086 (save-excursion (goto-char start) (skip-chars-forward " \t\n") (point))
1087 (save-excursion (goto-char end) (skip-chars-backward " \t\n") (point)))
1084 (tcl-send-string proc "\n") 1088 (tcl-send-string proc "\n")
1085 (if and-go (switch-to-tcl t)))) 1089 (if and-go (switch-to-tcl t))))
1086 1090
@@ -1149,7 +1153,12 @@ See documentation for function `inferior-tcl-mode' for more information."
1149 (unless (comint-check-proc "*inferior-tcl*") 1153 (unless (comint-check-proc "*inferior-tcl*")
1150 (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil 1154 (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil
1151 tcl-command-switches)) 1155 tcl-command-switches))
1152 (inferior-tcl-mode)) 1156 (inferior-tcl-mode)
1157 ;; Make tclsh display a prompt on ms-windows (or under Unix, when a tty
1158 ;; wasn't used). Doesn't affect wish, unfortunately.
1159 (unless (process-tty-name (inferior-tcl-proc))
1160 (tcl-send-string (inferior-tcl-proc)
1161 "set ::tcl_interactive 1; concat\n")))
1153 (set (make-local-variable 'tcl-application) cmd) 1162 (set (make-local-variable 'tcl-application) cmd)
1154 (setq inferior-tcl-buffer "*inferior-tcl*") 1163 (setq inferior-tcl-buffer "*inferior-tcl*")
1155 (pop-to-buffer "*inferior-tcl*")) 1164 (pop-to-buffer "*inferior-tcl*"))
diff --git a/lisp/subr.el b/lisp/subr.el
index 344eccf816c..574c589448d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1540,7 +1540,8 @@ by doing (clear-string STRING)."
1540 (let ((pass nil) 1540 (let ((pass nil)
1541 (c 0) 1541 (c 0)
1542 (echo-keystrokes 0) 1542 (echo-keystrokes 0)
1543 (cursor-in-echo-area t)) 1543 (cursor-in-echo-area t)
1544 (message-log-max nil))
1544 (add-text-properties 0 (length prompt) 1545 (add-text-properties 0 (length prompt)
1545 minibuffer-prompt-properties prompt) 1546 minibuffer-prompt-properties prompt)
1546 (while (progn (message "%s%s" 1547 (while (progn (message "%s%s"
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 2ef9c60ce7c..936f8619fa2 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar, wp 6;; Keywords: outlines, hypermedia, calendar, wp
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 4.21 8;; Version: 4.24
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -81,9 +81,17 @@
81;; 81;;
82;; Changes since version 4.00: 82;; Changes since version 4.00:
83;; --------------------------- 83;; ---------------------------
84;; Version 4.21 84;; Version 4.24
85;; - Bug fixes. 85;; - Bug fixes.
86;; 86;;
87;; Version 4.23
88;; - Bug fixes.
89;;
90;; Version 4.22
91;; - Bug fixes.
92;; - In agenda buffer, mouse-1 no longer follows link.
93;; See `org-agenda-mouse-1-follows-link' and `org-mouse-1-follows-link'.
94;;
87;; Version 4.20 95;; Version 4.20
88;; - Links use now the [[link][description]] format by default. 96;; - Links use now the [[link][description]] format by default.
89;; When inserting links, the user is prompted for a description. 97;; When inserting links, the user is prompted for a description.
@@ -174,7 +182,7 @@
174 182
175;;; Customization variables 183;;; Customization variables
176 184
177(defvar org-version "4.21" 185(defvar org-version "4.24"
178 "The version number of the file org.el.") 186 "The version number of the file org.el.")
179(defun org-version () 187(defun org-version ()
180 (interactive) 188 (interactive)
@@ -227,7 +235,11 @@ uninteresting. Also tables look terrible when wrapped."
227(defcustom org-startup-align-all-tables nil 235(defcustom org-startup-align-all-tables nil
228 "Non-nil means, align all tables when visiting a file. 236 "Non-nil means, align all tables when visiting a file.
229This is useful when the column width in tables is forced with <N> cookies 237This is useful when the column width in tables is forced with <N> cookies
230in table fields. Such tables will look correct only after the first re-align." 238in table fields. Such tables will look correct only after the first re-align.
239This can also be configured on a per-file basis by adding one of
240the following lines anywhere in the buffer:
241 #+STARTUP: align
242 #+STARTUP: noalign"
231 :group 'org-startup 243 :group 'org-startup
232 :type 'boolean) 244 :type 'boolean)
233 245
@@ -237,7 +249,6 @@ This means, if you start editing an org file, you will get an
237immediate reminder of any due deadlines. 249immediate reminder of any due deadlines.
238This can also be configured on a per-file basis by adding one of 250This can also be configured on a per-file basis by adding one of
239the following lines anywhere in the buffer: 251the following lines anywhere in the buffer:
240
241 #+STARTUP: dlcheck 252 #+STARTUP: dlcheck
242 #+STARTUP: nodlcheck" 253 #+STARTUP: nodlcheck"
243 :group 'org-startup 254 :group 'org-startup
@@ -391,7 +402,12 @@ This has the effect that two stars are being added/taken away in
391promotion/demotion commands. It also influences how levels are 402promotion/demotion commands. It also influences how levels are
392handled by the exporters. 403handled by the exporters.
393Changing it requires restart of `font-lock-mode' to become effective 404Changing it requires restart of `font-lock-mode' to become effective
394for fontification also in regions already fontified." 405for fontification also in regions already fontified.
406You may also set this on a per-file basis by adding one of the following
407lines to the buffer:
408
409 #+STARTUP: odd
410 #+STARTUP: oddeven"
395 :group 'org-edit-structure 411 :group 'org-edit-structure
396 :group 'org-font-lock 412 :group 'org-font-lock
397 :type 'boolean) 413 :type 'boolean)
@@ -870,6 +886,13 @@ Needs to be set before org.el is loaded."
870 :group 'org-link-follow 886 :group 'org-link-follow
871 :type 'boolean) 887 :type 'boolean)
872 888
889(defcustom org-mouse-1-follows-link t
890 "Non-nil means, mouse-1 on a link will follow the link.
891A longer mouse click will still set point. Does not wortk on XEmacs.
892Needs to be set before org.el is loaded."
893 :group 'org-link-follow
894 :type 'boolean)
895
873(defcustom org-mark-ring-length 4 896(defcustom org-mark-ring-length 4
874 "Number of different positions to be recorded in the ring 897 "Number of different positions to be recorded in the ring
875Changing this requires a restart of Emacs to work correctly." 898Changing this requires a restart of Emacs to work correctly."
@@ -1112,7 +1135,7 @@ closing date."
1112 :type 'boolean) 1135 :type 'boolean)
1113 1136
1114(defgroup org-priorities nil 1137(defgroup org-priorities nil
1115 "Keywords in Org-mode." 1138 "Priorities in Org-mode."
1116 :tag "Org Priorities" 1139 :tag "Org Priorities"
1117 :group 'org-todo) 1140 :group 'org-todo)
1118 1141
@@ -1167,7 +1190,7 @@ moved to the new date."
1167 :type 'boolean) 1190 :type 'boolean)
1168 1191
1169(defgroup org-tags nil 1192(defgroup org-tags nil
1170 "Options concerning startup of Org-mode." 1193 "Options concerning tags in Org-mode."
1171 :tag "Org Tags" 1194 :tag "Org Tags"
1172 :group 'org) 1195 :group 'org)
1173 1196
@@ -1301,21 +1324,28 @@ forth between agenda and calendar."
1301 :tag "Org Agenda Window Setup" 1324 :tag "Org Agenda Window Setup"
1302 :group 'org-agenda) 1325 :group 'org-agenda)
1303 1326
1327(defcustom org-agenda-mouse-1-follows-link nil
1328 "Non-nil means, mouse-1 on a link will follow the link in the agenda.
1329A longer mouse click will still set point. Does not wortk on XEmacs.
1330Needs to be set before org.el is loaded."
1331 :group 'org-agenda-setup
1332 :type 'boolean)
1333
1304(defcustom org-select-timeline-window t 1334(defcustom org-select-timeline-window t
1305 "Non-nil means, after creating a timeline, move cursor into Timeline window. 1335 "Non-nil means, after creating a timeline, move cursor into Timeline window.
1306When nil, cursor will remain in the current window." 1336When nil, cursor will remain in the current window."
1307 :group 'org-agenda-window-setup 1337 :group 'org-agenda-setup
1308 :type 'boolean) 1338 :type 'boolean)
1309 1339
1310(defcustom org-select-agenda-window t 1340(defcustom org-select-agenda-window t
1311 "Non-nil means, after creating an agenda, move cursor into Agenda window. 1341 "Non-nil means, after creating an agenda, move cursor into Agenda window.
1312When nil, cursor will remain in the current window." 1342When nil, cursor will remain in the current window."
1313 :group 'org-agenda-window-setup 1343 :group 'org-agenda-setup
1314 :type 'boolean) 1344 :type 'boolean)
1315 1345
1316(defcustom org-fit-agenda-window t 1346(defcustom org-fit-agenda-window t
1317 "Non-nil means, change window size of agenda to fit content." 1347 "Non-nil means, change window size of agenda to fit content."
1318 :group 'org-agenda-window-setup 1348 :group 'org-agenda-setup
1319 :type 'boolean) 1349 :type 'boolean)
1320 1350
1321(defgroup org-agenda-display nil 1351(defgroup org-agenda-display nil
@@ -1884,7 +1914,12 @@ face is white for a light background, and black for a dark
1884background. You may have to customize the face `org-hide' to 1914background. You may have to customize the face `org-hide' to
1885make this work. 1915make this work.
1886Changing it requires restart of `font-lock-mode' to become effective 1916Changing it requires restart of `font-lock-mode' to become effective
1887also in regions already fontified." 1917also in regions already fontified.
1918You may also set this on a per-file basis by adding one of the following
1919lines to the buffer:
1920
1921 #+STARTUP: hidestars
1922 #+STARTUP: showstars"
1888 :group 'org-font-lock 1923 :group 'org-font-lock
1889 :type 'boolean) 1924 :type 'boolean)
1890 1925
@@ -2051,6 +2086,14 @@ Changing this variable requires a restart of Emacs to take effect."
2051 "Face for links." 2086 "Face for links."
2052 :group 'org-faces) 2087 :group 'org-faces)
2053 2088
2089(defface org-date
2090 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
2091 (((class color) (background light)) (:foreground "Purple" :underline t))
2092 (((class color) (background dark)) (:foreground "Cyan" :underline t))
2093 (t (:bold t)))
2094 "Face for links."
2095 :group 'org-faces)
2096
2054(defface org-tag 2097(defface org-tag
2055 '((((type tty) (class color)) (:weight bold)) 2098 '((((type tty) (class color)) (:weight bold))
2056 (((class color) (background light)) (:weight bold)) 2099 (((class color) (background light)) (:weight bold))
@@ -2059,6 +2102,15 @@ Changing this variable requires a restart of Emacs to take effect."
2059 "Face for tags." 2102 "Face for tags."
2060 :group 'org-faces) 2103 :group 'org-faces)
2061 2104
2105(defface org-todo ;; font-lock-warning-face
2106 '((((type tty) (class color)) (:foreground "red"))
2107 (((class color) (background light)) (:foreground "Red" :bold t))
2108 (((class color) (background dark)) (:foreground "Red1" :bold t))
2109; (((class color) (background dark)) (:foreground "Pink" :bold t))
2110 (t (:inverse-video t :bold t)))
2111 "Face for TODO keywords."
2112 :group 'org-faces)
2113
2062(defface org-done ;; font-lock-type-face 2114(defface org-done ;; font-lock-type-face
2063 '((((type tty) (class color)) (:foreground "green")) 2115 '((((type tty) (class color)) (:foreground "green"))
2064 (((class color) (background light)) (:foreground "ForestGreen" :bold t)) 2116 (((class color) (background light)) (:foreground "ForestGreen" :bold t))
@@ -2165,7 +2217,9 @@ Changing this variable requires a restart of Emacs to take effect."
2165 ((equal key "STARTUP") 2217 ((equal key "STARTUP")
2166 (let ((opts (org-split-string value splitre)) 2218 (let ((opts (org-split-string value splitre))
2167 (set '(("fold" org-startup-folded t) 2219 (set '(("fold" org-startup-folded t)
2220 ("overview" org-startup-folded t)
2168 ("nofold" org-startup-folded nil) 2221 ("nofold" org-startup-folded nil)
2222 ("showall" org-startup-folded nil)
2169 ("content" org-startup-folded content) 2223 ("content" org-startup-folded content)
2170 ("hidestars" org-hide-leading-stars t) 2224 ("hidestars" org-hide-leading-stars t)
2171 ("showstars" org-hide-leading-stars nil) 2225 ("showstars" org-hide-leading-stars nil)
@@ -2379,6 +2433,10 @@ The following commands are available:
2379 s) 2433 s)
2380 (match-string-no-properties num string))) 2434 (match-string-no-properties num string)))
2381 2435
2436(defsubst org-no-properties (s)
2437 (remove-text-properties 0 (length s) org-rm-props s)
2438 s)
2439
2382(defun org-current-time () 2440(defun org-current-time ()
2383 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'." 2441 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'."
2384 (if (> org-time-stamp-rounding-minutes 0) 2442 (if (> org-time-stamp-rounding-minutes 0)
@@ -2406,7 +2464,8 @@ that will be added to PLIST. Returns the string that was modified."
2406 (if (featurep 'xemacs) [button2] [mouse-2]) 'org-open-at-mouse) 2464 (if (featurep 'xemacs) [button2] [mouse-2]) 'org-open-at-mouse)
2407(define-key org-mouse-map 2465(define-key org-mouse-map
2408 (if (featurep 'xemacs) [button3] [mouse-3]) 'org-find-file-at-mouse) 2466 (if (featurep 'xemacs) [button3] [mouse-3]) 'org-find-file-at-mouse)
2409(define-key org-mouse-map [follow-link] 'mouse-face) 2467(when org-mouse-1-follows-link
2468 (define-key org-mouse-map [follow-link] 'mouse-face))
2410(when org-tab-follows-link 2469(when org-tab-follows-link
2411 (define-key org-mouse-map [(tab)] 'org-open-at-point) 2470 (define-key org-mouse-map [(tab)] 'org-open-at-point)
2412 (define-key org-mouse-map "\C-i" 'org-open-at-point)) 2471 (define-key org-mouse-map "\C-i" 'org-open-at-point))
@@ -2508,7 +2567,9 @@ that will be added to PLIST. Returns the string that was modified."
2508(defun org-activate-bracket-links (limit) 2567(defun org-activate-bracket-links (limit)
2509 "Run through the buffer and add overlays to bracketed links." 2568 "Run through the buffer and add overlays to bracketed links."
2510 (if (re-search-forward org-bracket-link-regexp limit t) 2569 (if (re-search-forward org-bracket-link-regexp limit t)
2511 (let* ((help (concat "LINK: " (org-match-string-no-properties 1))) 2570 (let* ((help (concat "LINK: "
2571 (org-match-string-no-properties 1)))
2572 ;; FIXME: above we should remove the escapes.
2512 (ip (list 'invisible 'org-link 'intangible t 'rear-nonsticky t 2573 (ip (list 'invisible 'org-link 'intangible t 'rear-nonsticky t
2513 'keymap org-mouse-map 'mouse-face 'highlight 2574 'keymap org-mouse-map 'mouse-face 'highlight
2514 'help-echo help)) 2575 'help-echo help))
@@ -2656,13 +2717,13 @@ between words."
2656 (if (memq 'plain lk) '(org-activate-plain-links (0 'org-link t))) 2717 (if (memq 'plain lk) '(org-activate-plain-links (0 'org-link t)))
2657 (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t))) 2718 (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t)))
2658 (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t))) 2719 (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t)))
2659 (if (memq 'date lk) '(org-activate-dates (0 'org-link t))) 2720 (if (memq 'date lk) '(org-activate-dates (0 'org-date t)))
2660 (if (memq 'camel lk) '(org-activate-camels (0 'org-link t))) 2721 (if (memq 'camel lk) '(org-activate-camels (0 'org-link t)))
2661 (if (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend))) 2722 (if (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend)))
2662 (if org-table-limit-column-width 2723 (if org-table-limit-column-width
2663 '(org-hide-wide-columns (0 nil append))) 2724 '(org-hide-wide-columns (0 nil append)))
2664 (list (concat "^\\*+[ \t]*" org-not-done-regexp) 2725 (list (concat "^\\*+[ \t]*" org-not-done-regexp)
2665 '(1 'org-warning t)) 2726 '(1 'org-todo t))
2666 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t)) 2727 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t))
2667 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) 2728 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t))
2668 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) 2729 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t))
@@ -2683,7 +2744,7 @@ between words."
2683 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) 2744 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t))
2684 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) 2745 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t))
2685 (if org-format-transports-properties-p 2746 (if org-format-transports-properties-p
2686 '("| *\\(<[0-9]+>\\) *|" (1 'org-formula t))) 2747 '("| *\\(<[0-9]+>\\) *" (1 'org-formula t)))
2687 ))) 2748 )))
2688 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords)) 2749 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords))
2689 ;; Now set the full font-lock-keywords 2750 ;; Now set the full font-lock-keywords
@@ -3048,7 +3109,10 @@ or nil."
3048 (error (outline-next-heading))) 3109 (error (outline-next-heading)))
3049 (prog1 (match-string 0) 3110 (prog1 (match-string 0)
3050 (funcall outline-level))))) 3111 (funcall outline-level)))))
3051 (unless (bolp) (newline)) 3112 (if (and (bolp)
3113 (save-excursion (backward-char 1) (not (org-invisible-p))))
3114 (open-line 1)
3115 (newline))
3052 (insert head) 3116 (insert head)
3053 (if (looking-at "[ \t]*") 3117 (if (looking-at "[ \t]*")
3054 (replace-match " ")) 3118 (replace-match " "))
@@ -4249,7 +4313,7 @@ used to insert the time stamp into the buffer to include the time."
4249 ;; the range start. 4313 ;; the range start.
4250 (if (save-excursion 4314 (if (save-excursion
4251 (re-search-backward 4315 (re-search-backward
4252 (concat org-ts-regexp "--\\=") 4316 (concat org-ts-regexp "--\\=") ; FIXME: exactly two minuses?
4253 (- (point) 20) t)) 4317 (- (point) 20) t))
4254 (apply 4318 (apply
4255 'encode-time 4319 'encode-time
@@ -4769,7 +4833,8 @@ The following commands are available:
4769 (if (featurep 'xemacs) [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse) 4833 (if (featurep 'xemacs) [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse)
4770(define-key org-agenda-keymap 4834(define-key org-agenda-keymap
4771 (if (featurep 'xemacs) [(button3)] [(mouse-3)]) 'org-agenda-show-mouse) 4835 (if (featurep 'xemacs) [(button3)] [(mouse-3)]) 'org-agenda-show-mouse)
4772(define-key org-agenda-keymap [follow-link] 'mouse-face) 4836(when org-agenda-mouse-1-follows-link
4837 (define-key org-agenda-keymap [follow-link] 'mouse-face))
4773(easy-menu-define org-agenda-menu org-agenda-mode-map "Agenda menu" 4838(easy-menu-define org-agenda-menu org-agenda-mode-map "Agenda menu"
4774 '("Agenda" 4839 '("Agenda"
4775 ("Agenda Files") 4840 ("Agenda Files")
@@ -5156,7 +5221,7 @@ NDAYS defaults to `org-agenda-ndays'."
5156 (d (- nt n1))) 5221 (d (- nt n1)))
5157 (- sd (+ (if (< d 0) 7 0) d))))) 5222 (- sd (+ (if (< d 0) 7 0) d)))))
5158 (day-numbers (list start)) 5223 (day-numbers (list start))
5159;FIXME (inhibit-redisplay t) 5224 (inhibit-redisplay t)
5160 s e rtn rtnall file date d start-pos end-pos todayp nd) 5225 s e rtn rtnall file date d start-pos end-pos todayp nd)
5161 (setq org-agenda-redo-command 5226 (setq org-agenda-redo-command
5162 (list 'org-agenda-list (list 'quote include-all) start-day ndays t)) 5227 (list 'org-agenda-list (list 'quote include-all) start-day ndays t))
@@ -5522,7 +5587,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
5522 (org-disable-agenda-to-diary t)) 5587 (org-disable-agenda-to-diary t))
5523 (save-excursion 5588 (save-excursion
5524 (save-window-excursion 5589 (save-window-excursion
5525 (list-diary-entries date 1))) 5590 (list-diary-entries date 1))) ;; Keep this name for now, compatibility
5526 (if (not (get-buffer fancy-diary-buffer)) 5591 (if (not (get-buffer fancy-diary-buffer))
5527 (setq entries nil) 5592 (setq entries nil)
5528 (with-current-buffer fancy-diary-buffer 5593 (with-current-buffer fancy-diary-buffer
@@ -5966,7 +6031,7 @@ the documentation of `org-diary'."
5966 (org-add-props txt nil 6031 (org-add-props txt nil
5967 'face 'org-scheduled-today 6032 'face 'org-scheduled-today
5968 'undone-face 'org-scheduled-today 'done-face 'org-done 6033 'undone-face 'org-scheduled-today 'done-face 'org-done
5969 'category category priority (+ 99 priority)) 6034 'category category 'priority (+ 99 priority))
5970 (org-add-props txt nil 'priority priority 'category category))) 6035 (org-add-props txt nil 'priority priority 'category category)))
5971 (push txt ee)) 6036 (push txt ee))
5972 (outline-next-heading)))) 6037 (outline-next-heading))))
@@ -6227,7 +6292,7 @@ only the correctly processes TXT should be returned - this is used by
6227 (file-name-sans-extension 6292 (file-name-sans-extension
6228 (file-name-nondirectory buffer-file-name)) 6293 (file-name-nondirectory buffer-file-name))
6229 ""))) 6294 "")))
6230 (tag (or (nth (1- (or (length tags) 0)) tags) "")) 6295 (tag (if tags (nth (1- (length tags)) tags) ""))
6231 time ;; needed for the eval of the prefix format 6296 time ;; needed for the eval of the prefix format
6232 (ts (if dotime (concat (if (stringp dotime) dotime "") txt))) 6297 (ts (if dotime (concat (if (stringp dotime) dotime "") txt)))
6233 (time-of-day (and dotime (org-get-time-of-day ts))) 6298 (time-of-day (and dotime (org-get-time-of-day ts)))
@@ -7282,7 +7347,10 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
7282 (format "Execute \"%s\" in shell? " 7347 (format "Execute \"%s\" in shell? "
7283 (org-add-props cmd nil 7348 (org-add-props cmd nil
7284 'face 'org-warning)))) 7349 'face 'org-warning))))
7285 (shell-command cmd) 7350 (progn
7351 (message "Executing %s..." cmd)
7352 (shell-command cmd)
7353 (message "Executing %s...done" cmd))
7286 (error "Abort")))) 7354 (error "Abort"))))
7287 7355
7288 (t 7356 (t
@@ -7670,6 +7738,28 @@ folders."
7670 (kill-this-buffer) 7738 (kill-this-buffer)
7671 (error "Message not found")))) 7739 (error "Message not found"))))
7672 7740
7741(defun org-upgrade-old-links (&optional query-description)
7742 "Transfer old <...> style links to new [[...]] style links.
7743With arg query-description, ask at each match for a description text to use
7744for this link."
7745 (interactive (list (y-or-n-p "Would you like to be queried for a description at each link?")))
7746 (save-excursion
7747 (goto-char (point-min))
7748 (let ((re (concat "\\([^[]\\)<\\("
7749 "\\(" (mapconcat 'identity org-link-types "\\|")
7750 "\\):"
7751 "[^" org-non-link-chars "]+\\)>"))
7752 l1 l2 (cnt 0))
7753 (while (re-search-forward re nil t)
7754 (setq cnt (1+ cnt)
7755 l1 (org-match-string-no-properties 2)
7756 l2 (save-match-data (org-link-escape l1)))
7757 (when query-description (setq l1 (read-string "Desc: " l1)))
7758 (if (equal l1 l2)
7759 (replace-match (concat (match-string 1) "[[" l1 "]]") t t)
7760 (replace-match (concat (match-string 1) "[[" l2 "][" l1 "]]") t t)))
7761 (message "%d matches have beed treated" cnt))))
7762
7673(defun org-open-file (path &optional in-emacs line search) 7763(defun org-open-file (path &optional in-emacs line search)
7674 "Open the file at PATH. 7764 "Open the file at PATH.
7675First, this expands any special file name abbreviations. Then the 7765First, this expands any special file name abbreviations. Then the
@@ -8619,7 +8709,7 @@ This is being used to correctly align a single field after TAB or RET.")
8619 (> (org-string-width xx) fmax)) 8709 (> (org-string-width xx) fmax))
8620 (org-add-props xx nil 8710 (org-add-props xx nil
8621 'help-echo 8711 'help-echo
8622 (concat "Clipped table field, use C-c ` to edit. Full value is:\n" (copy-sequence xx))) 8712 (concat "Clipped table field, use C-c ` to edit. Full value is:\n" (org-no-properties (copy-sequence xx))))
8623 (setq f1 (min fmax (or (string-match org-bracket-link-regexp xx) fmax))) 8713 (setq f1 (min fmax (or (string-match org-bracket-link-regexp xx) fmax)))
8624 (unless (> f1 1) 8714 (unless (> f1 1)
8625 (error "Cannot narrow field starting with wide link \"%s\"" 8715 (error "Cannot narrow field starting with wide link \"%s\""
@@ -10153,7 +10243,8 @@ $1-> %s\n" orig formula form))
10153 (org-table-align))))) 10243 (org-table-align)))))
10154 10244
10155(defun org-table-recalculate (&optional all noalign) 10245(defun org-table-recalculate (&optional all noalign)
10156 "Recalculate the current table line by applying all stored formulas." 10246 "Recalculate the current table line by applying all stored formulas.
10247With prefix arg ALL, do this for all lines in the table."
10157 (interactive "P") 10248 (interactive "P")
10158 (or (memq this-command org-recalc-commands) 10249 (or (memq this-command org-recalc-commands)
10159 (setq org-recalc-commands (cons this-command org-recalc-commands))) 10250 (setq org-recalc-commands (cons this-command org-recalc-commands)))
@@ -11376,7 +11467,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
11376 (mapconcat 'identity org-todo-keywords " ") 11467 (mapconcat 'identity org-todo-keywords " ")
11377 "Me Jason Marie DONE") 11468 "Me Jason Marie DONE")
11378 (cdr (assoc org-startup-folded 11469 (cdr (assoc org-startup-folded
11379 '((nil . "nofold")(t . "fold")(content . "content")))) 11470 '((nil . "showall") (t . "overview") (content . "content"))))
11380 (if org-startup-with-deadline-check "dlcheck" "nodlcheck") 11471 (if org-startup-with-deadline-check "dlcheck" "nodlcheck")
11381 (if org-odd-levels-only "odd" "oddeven") 11472 (if org-odd-levels-only "odd" "oddeven")
11382 (if org-hide-leading-stars "hidestars" "showstars") 11473 (if org-hide-leading-stars "hidestars" "showstars")
@@ -11718,8 +11809,9 @@ headlines. The default is 3. Lower levels will become bulleted lists."
11718 (concat "<img src=\"" thefile "\"/>") 11809 (concat "<img src=\"" thefile "\"/>")
11719 (concat "<a href=\"" thefile "\">" desc "</a>"))))) 11810 (concat "<a href=\"" thefile "\">" desc "</a>")))))
11720 ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell")) 11811 ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell"))
11721 (setq rpl (concat "<i>&lt;" type ":" path "&gt;</i>")))) 11812 (setq rpl (concat "<i>&lt;" type ":"
11722 ;; FIXME: We get to see the escaped links!!!!! 11813 (save-match-data (org-link-unescape path))
11814 "&gt;</i>"))))
11723 (setq line (replace-match rpl t t line) 11815 (setq line (replace-match rpl t t line)
11724 start (+ start (length rpl)))) 11816 start (+ start (length rpl))))
11725 ;; TODO items 11817 ;; TODO items
@@ -12196,6 +12288,89 @@ file, but with extension `.ics'."
12196 (interactive) 12288 (interactive)
12197 (org-export-icalendar nil buffer-file-name)) 12289 (org-export-icalendar nil buffer-file-name))
12198 12290
12291(defun org-export-as-xml ()
12292 "Export current buffer as XOXO XML buffer."
12293 (interactive)
12294 (cond ((eq org-export-xml-type 'xoxo)
12295 (org-export-as-xoxo (current-buffer)))))
12296
12297(defun org-export-as-xoxo-insert-into (buffer &rest output)
12298 (with-current-buffer buffer
12299 (apply 'insert output)))
12300
12301(defun org-export-as-xoxo (&optional buffer)
12302 "Export the org buffer as XOXO.
12303The XOXO buffer is named *xoxo-<source buffer name>*"
12304 (interactive (list (current-buffer)))
12305 ;; A quickie abstraction
12306
12307 ;; Output everything as XOXO
12308 (with-current-buffer (get-buffer buffer)
12309 (goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
12310 (let* ((filename (concat (file-name-sans-extension buffer-file-name)
12311 ".xml"))
12312 (out (find-file-noselect filename))
12313 (last-level 1)
12314 (hanging-li nil))
12315 ;; Check the output buffer is empty.
12316 (with-current-buffer out (erase-buffer))
12317 ;; Kick off the output
12318 (org-export-as-xoxo-insert-into out "<ol class='xoxo'>\n")
12319 (while (re-search-forward "^\\(\\*+\\) \\(.+\\)" (point-max) 't)
12320 (let* ((hd (match-string-no-properties 1))
12321 (level (length hd))
12322 (text (concat
12323 (match-string-no-properties 2)
12324 (save-excursion
12325 (goto-char (match-end 0))
12326 (let ((str ""))
12327 (catch 'loop
12328 (while 't
12329 (forward-line)
12330 (if (looking-at "^[ \t]\\(.*\\)")
12331 (setq str (concat str (match-string-no-properties 1)))
12332 (throw 'loop str)))))))))
12333
12334 ;; Handle level rendering
12335 (cond
12336 ((> level last-level)
12337 (org-export-as-xoxo-insert-into out "\n<ol>\n"))
12338
12339 ((< level last-level)
12340 (dotimes (- (- last-level level) 1)
12341 (if hanging-li
12342 (org-export-as-xoxo-insert-into out "</li>\n"))
12343 (org-export-as-xoxo-insert-into out "</ol>\n"))
12344 (when hanging-li
12345 (org-export-as-xoxo-insert-into out "</li>\n")
12346 (setq hanging-li nil)))
12347
12348 ((equal level last-level)
12349 (if hanging-li
12350 (org-export-as-xoxo-insert-into out "</li>\n")))
12351 )
12352
12353 (setq last-level level)
12354
12355 ;; And output the new li
12356 (setq hanging-li 't)
12357 (if (equal ?+ (elt text 0))
12358 (org-export-as-xoxo-insert-into out "<li class='" (substring text 1) "'>")
12359 (org-export-as-xoxo-insert-into out "<li>" text))))
12360
12361 ;; Finally finish off the ol
12362 (dotimes (- last-level 1)
12363 (if hanging-li
12364 (org-export-as-xoxo-insert-into out "</li>\n"))
12365 (org-export-as-xoxo-insert-into out "</ol>\n"))
12366
12367 ;; Finish the buffer off and clean it up.
12368 (switch-to-buffer-other-window out)
12369 (indent-region (point-min) (point-max))
12370 (save-buffer)
12371 (goto-char (point-min))
12372 )))
12373
12199;;;###autoload 12374;;;###autoload
12200(defun org-export-icalendar-all-agenda-files () 12375(defun org-export-icalendar-all-agenda-files ()
12201 "Export all files in `org-agenda-files' to iCalendar .ics files. 12376 "Export all files in `org-agenda-files' to iCalendar .ics files.
@@ -12742,19 +12917,36 @@ See the individual commands for more information."
12742 (org-paste-subtree arg))) 12917 (org-paste-subtree arg)))
12743 12918
12744(defun org-ctrl-c-ctrl-c (&optional arg) 12919(defun org-ctrl-c-ctrl-c (&optional arg)
12745 "Call realign table, or recognize a table.el table, or update keywords. 12920 "Set tags in headline, or update according to changed information at point.
12746When the cursor is inside a table created by the table.el package, 12921
12747activate that table. Otherwise, if the cursor is at a normal table 12922This command does many different things, depending on context:
12748created with org.el, re-align that table. This command works even if 12923
12749the automatic table editor has been turned off. 12924- If the cursor is in a headline, prompt for tags and insert them
12750 12925 into the current line, aligned to `org-tags-column'. When called
12751If the cursor is in a headline, prompt for tags and insert them into 12926 with prefix arg, realign all tags in the current buffer.
12752the current line, aligned to `org-tags-column'. When in a headline and 12927
12753called with prefix arg, realign all tags in the current buffer. 12928- If the cursor is in one of the special #+KEYWORD lines, this
12754 12929 triggers scanning the buffer for these lines and updating the
12755If the cursor is in one of the special #+KEYWORD lines, this triggers 12930 information.
12756scanning the buffer for these lines and updating the information. 12931
12757If the cursor is on a #+TBLFM line, re-apply the formulae to the table." 12932- If the cursor is inside a table, realign the table. This command
12933 works even if the automatic table editor has been turned off.
12934
12935- If the cursor is on a #+TBLFM line, re-apply the formulas to
12936 the entire table.
12937
12938- If the cursor is inside a table created by the table.el package,
12939 activate that table.
12940
12941- If the current buffer is a remember buffer, close note and file it.
12942 with a prefix argument, file it without further interaction to the default
12943 location.
12944
12945- If the cursor is on a <<<target>>>, update radio targets and corresponding
12946 links in this buffer.
12947
12948- If the cursor is on a numbered item in a plain list, renumber the
12949 ordered list."
12758 (interactive "P") 12950 (interactive "P")
12759 (let ((org-enable-table-editor t)) 12951 (let ((org-enable-table-editor t))
12760 (cond 12952 (cond
@@ -13091,9 +13283,10 @@ With optional NODE, go directly to that node."
13091 ;; through to `fill-paragraph' when appropriate. 13283 ;; through to `fill-paragraph' when appropriate.
13092 (set (make-local-variable 'fill-paragraph-function) 'org-fill-paragraph) 13284 (set (make-local-variable 'fill-paragraph-function) 'org-fill-paragraph)
13093 ;; Adaptive filling: To get full control, first make sure that 13285 ;; Adaptive filling: To get full control, first make sure that
13094 ;; `adaptive-fill-regexp' never matches. Then install our won matcher. 13286 ;; `adaptive-fill-regexp' never matches. Then install our own matcher.
13095 (setq adaptive-fill-regexp "\000") 13287 (set (make-local-variable 'adaptive-fill-regexp) "\000")
13096 (setq adaptive-fill-function 'org-adaptive-fill-function)) 13288 (set (make-local-variable 'adaptive-fill-function)
13289 'org-adaptive-fill-function))
13097 13290
13098(defun org-fill-paragraph (&optional justify) 13291(defun org-fill-paragraph (&optional justify)
13099 "Re-align a table, pass through to fill-paragraph if no table." 13292 "Re-align a table, pass through to fill-paragraph if no table."
@@ -13368,7 +13561,6 @@ Show the heading too, if it is currently invisible."
13368 (or (match-beginning 1) (point-max))) 13561 (or (match-beginning 1) (point-max)))
13369 (if org-noutline-p nil ?\n)))) 13562 (if org-noutline-p nil ?\n))))
13370 13563
13371
13372(defun org-make-options-regexp (kwds) 13564(defun org-make-options-regexp (kwds)
13373 "Make a regular expression for keyword lines." 13565 "Make a regular expression for keyword lines."
13374 (concat 13566 (concat
@@ -13402,114 +13594,6 @@ Show the heading too, if it is currently invisible."
13402 13594
13403(run-hooks 'org-load-hook) 13595(run-hooks 'org-load-hook)
13404 13596
13405;; Experimental code
13406;; FIXME: Move this code when it is ready.
13407
13408(defun org-upgrade-old-links (&optional query-description)
13409 "Transfer old <...> style links to new [[...]] style links.
13410With arg query-description, ask at each match for a description text to use
13411for this link."
13412 (interactive (list (y-or-n-p "Would you like to be queried for a description at each link?")))
13413 (save-excursion
13414 (goto-char (point-min))
13415 (let ((re (concat "\\([^[]\\)<\\("
13416 "\\(" (mapconcat 'identity org-link-types "\\|")
13417 "\\):"
13418 "[^" org-non-link-chars "]+\\)>"))
13419 l1 l2 (cnt 0))
13420 (while (re-search-forward re nil t)
13421 (setq cnt (1+ cnt)
13422 l1 (org-match-string-no-properties 2)
13423 l2 (save-match-data (org-link-escape l1)))
13424 (when query-description (setq l1 (read-string "Desc: " l1)))
13425 (if (equal l1 l2)
13426 (replace-match (concat (match-string 1) "[[" l1 "]]") t t)
13427 (replace-match (concat (match-string 1) "[[" l2 "][" l1 "]]") t t)))
13428 (message "%d matches have beed treated" cnt))))
13429
13430(defun org-export-as-xml ()
13431 "Export current buffer as XOXO XML buffer."
13432 (interactive)
13433 (cond ((eq org-export-xml-type 'xoxo)
13434 (org-export-as-xoxo (current-buffer)))))
13435
13436(defun org-export-as-xoxo-insert-into (buffer &rest output)
13437 (with-current-buffer buffer
13438 (apply 'insert output)))
13439
13440(defun org-export-as-xoxo (&optional buffer)
13441 "Export the org buffer as XOXO.
13442The XOXO buffer is named *xoxo-<source buffer name>*"
13443 (interactive (list (current-buffer)))
13444 ;; A quickie abstraction
13445
13446 ;; Output everything as XOXO
13447 (with-current-buffer (get-buffer buffer)
13448 (goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
13449 (let* ((filename (concat (file-name-sans-extension buffer-file-name)
13450 ".xml"))
13451 (out (find-file-noselect filename))
13452 (last-level 1)
13453 (hanging-li nil))
13454 ;; Check the output buffer is empty.
13455 (with-current-buffer out (erase-buffer))
13456 ;; Kick off the output
13457 (org-export-as-xoxo-insert-into out "<ol class='xoxo'>\n")
13458 (while (re-search-forward "^\\(\\*+\\) \\(.+\\)" (point-max) 't)
13459 (let* ((hd (match-string-no-properties 1))
13460 (level (length hd))
13461 (text (concat
13462 (match-string-no-properties 2)
13463 (save-excursion
13464 (goto-char (match-end 0))
13465 (let ((str ""))
13466 (catch 'loop
13467 (while 't
13468 (forward-line)
13469 (if (looking-at "^[ \t]\\(.*\\)")
13470 (setq str (concat str (match-string-no-properties 1)))
13471 (throw 'loop str)))))))))
13472
13473 ;; Handle level rendering
13474 (cond
13475 ((> level last-level)
13476 (org-export-as-xoxo-insert-into out "\n<ol>\n"))
13477
13478 ((< level last-level)
13479 (dotimes (- (- last-level level) 1)
13480 (if hanging-li
13481 (org-export-as-xoxo-insert-into out "</li>\n"))
13482 (org-export-as-xoxo-insert-into out "</ol>\n"))
13483 (when hanging-li
13484 (org-export-as-xoxo-insert-into out "</li>\n")
13485 (setq hanging-li nil)))
13486
13487 ((equal level last-level)
13488 (if hanging-li
13489 (org-export-as-xoxo-insert-into out "</li>\n")))
13490 )
13491
13492 (setq last-level level)
13493
13494 ;; And output the new li
13495 (setq hanging-li 't)
13496 (if (equal ?+ (elt text 0))
13497 (org-export-as-xoxo-insert-into out "<li class='" (substring text 1) "'>")
13498 (org-export-as-xoxo-insert-into out "<li>" text))))
13499
13500 ;; Finally finish off the ol
13501 (dotimes (- last-level 1)
13502 (if hanging-li
13503 (org-export-as-xoxo-insert-into out "</li>\n"))
13504 (org-export-as-xoxo-insert-into out "</ol>\n"))
13505
13506 ;; Finish the buffer off and clean it up.
13507 (switch-to-buffer-other-window out)
13508 (indent-region (point-min) (point-max) nil)
13509 (save-buffer)
13510 (goto-char (point-min))
13511 )))
13512
13513;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd 13597;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
13514;;; org.el ends here 13598;;; org.el ends here
13515 13599
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 97153e31a25..8ca7c3026e8 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -594,20 +594,24 @@ An alternative value is \" . \", if you use a font with a narrow period."
594 '(face subscript display (raise -0.3)) 594 '(face subscript display (raise -0.3))
595 '(face superscript display (raise +0.3))))) 595 '(face superscript display (raise +0.3)))))
596 596
597(defun tex-font-lock-match-suscript (limit)
598 "Match subscript and superscript patterns up to LIMIT."
599 (when (re-search-forward "[_^] *\\([^\n\\{}]\\|\
600\\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|{[^\\{]*}\\|\\({\\)\\)" limit t)
601 (when (match-end 3)
602 (let ((beg (match-beginning 3))
603 (end (save-restriction
604 (narrow-to-region (point-min) limit)
605 (condition-case nil (scan-lists (point) 1 1) (error nil)))))
606 (store-match-data (if end
607 (list (match-beginning 0) end beg end)
608 (list beg beg beg beg)))))
609 t))
610
597(defconst tex-font-lock-keywords-3 611(defconst tex-font-lock-keywords-3
598 (append tex-font-lock-keywords-2 612 (append tex-font-lock-keywords-2
599 (eval-when-compile 613 '((tex-font-lock-match-suscript
600 (let ((general "\\([a-zA-Z@]+\\|[^ \t\n]\\)") 614 (1 (tex-font-lock-suscript (match-beginning 0)) append))))
601 (slash "\\\\")
602 ;; This is not the same regexp as before: it has a `+' removed.
603 ;; The + makes the matching faster in the above cases (where we can
604 ;; exit as soon as the match fails) but would make this matching
605 ;; degenerate to nasty complexity (because we try to match the
606 ;; closing brace, which forces trying all matching combinations).
607 (arg "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*"))
608 `((,(concat "[_^] *\\([^\n\\{}#]\\|" slash general "\\|#[0-9]\\|" arg "}\\)")
609 (1 (tex-font-lock-suscript (match-beginning 0))
610 append))))))
611 "Experimental expressions to highlight in TeX modes.") 615 "Experimental expressions to highlight in TeX modes.")
612 616
613(defvar tex-font-lock-keywords tex-font-lock-keywords-1 617(defvar tex-font-lock-keywords tex-font-lock-keywords-1
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 3e3fcf78ae6..1c51c4c55ab 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -5,7 +5,7 @@
5 5
6;; This file is part of GNU Emacs. 6;; This file is part of GNU Emacs.
7 7
8;; Maintainer's Time-stamp: <2006-02-06 15:11:58 ttn> 8;; Maintainer's Time-stamp: <2006-04-12 20:30:56 rms>
9;; Maintainer: Stephen Gildea <gildea@stop.mail-abuse.org> 9;; Maintainer: Stephen Gildea <gildea@stop.mail-abuse.org>
10;; Keywords: tools 10;; Keywords: tools
11 11
@@ -93,6 +93,7 @@ historical default."
93 :type 'string 93 :type 'string
94 :group 'time-stamp 94 :group 'time-stamp
95 :version "20.1") 95 :version "20.1")
96;;;###autoload(put 'time-stamp-format 'safe-local-variable 'stringp)
96 97
97(defcustom time-stamp-active t 98(defcustom time-stamp-active t
98 "*Non-nil to enable time-stamping of buffers by \\[time-stamp]. 99 "*Non-nil to enable time-stamping of buffers by \\[time-stamp].
@@ -150,7 +151,7 @@ Do not change `time-stamp-line-limit', `time-stamp-start',
150incompatible with other people's files! If you must change them for some 151incompatible with other people's files! If you must change them for some
151application, do so in the local variables section of the time-stamped file 152application, do so in the local variables section of the time-stamped file
152itself.") 153itself.")
153 154;;;###autoload(put 'time-stamp-line-limit 'safe-local-variable 'integerp)
154 155
155(defvar time-stamp-start "Time-stamp:[ \t]+\\\\?[\"<]+" ;Do not change! 156(defvar time-stamp-start "Time-stamp:[ \t]+\\\\?[\"<]+" ;Do not change!
156 "Regexp after which the time stamp is written by \\[time-stamp]. 157 "Regexp after which the time stamp is written by \\[time-stamp].
@@ -163,7 +164,7 @@ Do not change `time-stamp-line-limit', `time-stamp-start',
163incompatible with other people's files! If you must change them for some 164incompatible with other people's files! If you must change them for some
164application, do so in the local variables section of the time-stamped file 165application, do so in the local variables section of the time-stamped file
165itself.") 166itself.")
166 167;;;###autoload(put 'time-stamp-start 'safe-local-variable t)
167 168
168(defvar time-stamp-end "\\\\?[\">]" ;Do not change! 169(defvar time-stamp-end "\\\\?[\">]" ;Do not change!
169 "Regexp marking the text after the time stamp. 170 "Regexp marking the text after the time stamp.
@@ -183,6 +184,7 @@ Do not change `time-stamp-start', `time-stamp-end', `time-stamp-pattern',
183or `time-stamp-inserts-lines' for yourself or you will be incompatible 184or `time-stamp-inserts-lines' for yourself or you will be incompatible
184with other people's files! If you must change them for some application, 185with other people's files! If you must change them for some application,
185do so in the local variables section of the time-stamped file itself.") 186do so in the local variables section of the time-stamped file itself.")
187;;;###autoload(put 'time-stamp-end 'safe-local-variable t)
186 188
187 189
188(defvar time-stamp-inserts-lines nil ;Do not change! 190(defvar time-stamp-inserts-lines nil ;Do not change!
@@ -199,6 +201,7 @@ Do not change `time-stamp-end' or `time-stamp-inserts-lines' for
199yourself or you will be incompatible with other people's files! 201yourself or you will be incompatible with other people's files!
200If you must change them for some application, do so in the local 202If you must change them for some application, do so in the local
201variables section of the time-stamped file itself.") 203variables section of the time-stamped file itself.")
204;;;###autoload(put 'time-stamp-inserts-lines 'safe-local-variable t)
202 205
203 206
204(defvar time-stamp-count 1 ;Do not change! 207(defvar time-stamp-count 1 ;Do not change!
@@ -209,6 +212,7 @@ Do not change `time-stamp-count' for yourself or you will be
209incompatible with other people's files! If you must change it for 212incompatible with other people's files! If you must change it for
210some application, do so in the local variables section of the 213some application, do so in the local variables section of the
211time-stamped file itself.") 214time-stamped file itself.")
215;;;###autoload(put 'time-stamp-count 'safe-local-variable 'integerp)
212 216
213 217
214(defvar time-stamp-pattern nil ;Do not change! 218(defvar time-stamp-pattern nil ;Do not change!
@@ -244,6 +248,7 @@ Do not change `time-stamp-pattern' `time-stamp-line-limit',
244incompatible with other people's files! If you must change them for 248incompatible with other people's files! If you must change them for
245some application, do so only in the local variables section of the 249some application, do so only in the local variables section of the
246time-stamped file itself.") 250time-stamped file itself.")
251;;;###autoload(put 'time-stamp-pattern 'safe-local-variable 'stringp)
247 252
248 253
249 254
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 8dc811c09e6..cacd6f59670 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -47,11 +47,15 @@
47;; would be accompanied by a full redisplay. 47;; would be accompanied by a full redisplay.
48 48
49(define-minor-mode tooltip-mode 49(define-minor-mode tooltip-mode
50 "Toggle Tooltip display. 50 "Toggle Tooltip mode.
51With ARG, turn tooltip mode on if and only if ARG is positive. 51With ARG, turn Tooltip mode on if and only if ARG is positive.
52When this minor mode is enabled, Emacs displays help text 52When this minor mode is enabled, Emacs displays help text
53in a pop-up window on mouse-over. When it is disabled, 53in a pop-up window for buttons and menu items that you put the mouse on.
54Emacs displays the help text in the echo area instead." 54\(However, if `tooltip-use-echo-area' is non-nil, this and
55all pop-up help appears in the echo area.)
56
57When Tooltip mode is disabled, Emacs displays one line of
58the help text in the echo area, and does not make a pop-up window."
55 :global t 59 :global t
56 :init-value (not (or noninteractive 60 :init-value (not (or noninteractive
57 emacs-basic-display 61 emacs-basic-display
@@ -142,7 +146,9 @@ position to pop up the tooltip."
142 :group 'basic-faces) 146 :group 'basic-faces)
143 147
144(defcustom tooltip-use-echo-area nil 148(defcustom tooltip-use-echo-area nil
145 "Use the echo area instead of tooltip frames for help and GUD tooltips." 149 "Use the echo area instead of tooltip frames for help and GUD tooltips.
150To display multi-line help text in the echo area, set this to t
151and enable `tooltip-mode'."
146 :type 'boolean 152 :type 'boolean
147 :group 'tooltip) 153 :group 'tooltip)
148 154
diff --git a/lisp/vc.el b/lisp/vc.el
index 19b2f0f4a72..61b8aa05a4b 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -3107,7 +3107,11 @@ colors. `vc-annotate-background' specifies the background color."
3107 (vc-ensure-vc-buffer) 3107 (vc-ensure-vc-buffer)
3108 (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef 3108 (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef
3109 (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev)) 3109 (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev))
3110 (temp-buffer-show-function 'vc-annotate-display-select)) 3110 (temp-buffer-show-function 'vc-annotate-display-select)
3111 ;; If BUF is specified, we presume the caller maintains current line,
3112 ;; so we don't need to do it here. This implementation may give
3113 ;; strange results occasionally in the case of REV != WORKFILE-REV.
3114 (current-line (unless buf (line-number-at-pos))))
3111 (message "Annotating...") 3115 (message "Annotating...")
3112 ;; If BUF is specified it tells in which buffer we should put the 3116 ;; If BUF is specified it tells in which buffer we should put the
3113 ;; annotations. This is used when switching annotations to another 3117 ;; annotations. This is used when switching annotations to another
@@ -3129,6 +3133,8 @@ colors. `vc-annotate-background' specifies the background color."
3129 (set (make-local-variable 'vc-annotate-parent-rev) rev) 3133 (set (make-local-variable 'vc-annotate-parent-rev) rev)
3130 (set (make-local-variable 'vc-annotate-parent-display-mode) 3134 (set (make-local-variable 'vc-annotate-parent-display-mode)
3131 display-mode))) 3135 display-mode)))
3136 (when current-line
3137 (goto-line current-line temp-buffer-name))
3132 (message "Annotating... done"))) 3138 (message "Annotating... done")))
3133 3139
3134(defun vc-annotate-prev-version (prefix) 3140(defun vc-annotate-prev-version (prefix)
@@ -3310,8 +3316,8 @@ The annotations are relative to the current time, unless overridden by OFFSET."
3310 (let* ((color (or (vc-annotate-compcar difference vc-annotate-color-map) 3316 (let* ((color (or (vc-annotate-compcar difference vc-annotate-color-map)
3311 (cons nil vc-annotate-very-old-color))) 3317 (cons nil vc-annotate-very-old-color)))
3312 ;; substring from index 1 to remove any leading `#' in the name 3318 ;; substring from index 1 to remove any leading `#' in the name
3313 (face-name (concat "vc-annotate-face-" 3319 (face-name (concat "vc-annotate-face-"
3314 (if (string-equal 3320 (if (string-equal
3315 (substring (cdr color) 0 1) "#") 3321 (substring (cdr color) 0 1) "#")
3316 (substring (cdr color) 1) 3322 (substring (cdr color) 1)
3317 (cdr color)))) 3323 (cdr color))))