aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2005-06-06 02:39:45 +0000
committerMiles Bader2005-06-06 02:39:45 +0000
commitfdffd346262841cb194225ea0acd8059c57ec2d4 (patch)
treed8b3699131f7d1b94bc46c7d8be62af6b8b5ebfe /lisp
parenta5c508fe3a3f456c987283156315d0384d38fe9e (diff)
parenta9b4333620eb259e974445066a8e64cee0c21d69 (diff)
downloademacs-fdffd346262841cb194225ea0acd8059c57ec2d4.tar.gz
emacs-fdffd346262841cb194225ea0acd8059c57ec2d4.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 324-352) - Merge from gnus--rel--5.10 - Update from CVS - etc/emacs-buffer.gdb: Remove RCS keywords * gnus--rel--5.10 (patch 70-79) - Update from CVS - Merge from emacs--cvs-trunk--0
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog803
-rw-r--r--lisp/add-log.el2
-rw-r--r--lisp/arc-mode.el2
-rw-r--r--lisp/array.el3
-rw-r--r--lisp/autorevert.el81
-rw-r--r--lisp/bookmark.el6
-rw-r--r--lisp/bs.el2
-rw-r--r--lisp/calc/calc-aent.el3
-rw-r--r--lisp/calc/calc-embed.el58
-rw-r--r--lisp/calc/calc-ext.el6
-rw-r--r--lisp/calc/calc-misc.el2
-rw-r--r--lisp/calc/calc-prog.el25
-rw-r--r--lisp/calc/calc-stuff.el1
-rw-r--r--lisp/calc/calc-yank.el2
-rw-r--r--lisp/calc/calc.el79
-rw-r--r--lisp/calc/calcalg2.el2
-rw-r--r--lisp/calculator.el4
-rw-r--r--lisp/calendar/calendar.el5
-rw-r--r--lisp/calendar/diary-lib.el11
-rw-r--r--lisp/calendar/icalendar.el1
-rw-r--r--lisp/calendar/todo-mode.el3
-rw-r--r--lisp/chistory.el2
-rw-r--r--lisp/comint.el2
-rw-r--r--lisp/cus-edit.el2
-rw-r--r--lisp/descr-text.el2
-rw-r--r--lisp/ebuff-menu.el2
-rw-r--r--lisp/ediff-diff.el62
-rw-r--r--lisp/ediff-help.el2
-rw-r--r--lisp/ediff-mult.el10
-rw-r--r--lisp/ediff-util.el3
-rw-r--r--lisp/ediff.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el18
-rw-r--r--lisp/emacs-lisp/cl-macs.el11
-rw-r--r--lisp/emacs-lisp/easy-mmode.el66
-rw-r--r--lisp/emacs-lisp/easymenu.el14
-rw-r--r--lisp/emacs-lisp/find-func.el4
-rw-r--r--lisp/emacs-lisp/re-builder.el2
-rw-r--r--lisp/emulation/tpu-mapper.el2
-rw-r--r--lisp/emulation/vi.el2
-rw-r--r--lisp/emulation/viper-keym.el19
-rw-r--r--lisp/emulation/viper.el7
-rw-r--r--lisp/emulation/ws-mode.el2
-rw-r--r--lisp/eshell/em-cmpl.el8
-rw-r--r--lisp/eshell/em-dirs.el11
-rw-r--r--lisp/eshell/em-glob.el9
-rw-r--r--lisp/eshell/em-unix.el2
-rw-r--r--lisp/eshell/esh-cmd.el9
-rw-r--r--lisp/eshell/esh-ext.el2
-rw-r--r--lisp/eshell/esh-io.el5
-rw-r--r--lisp/eshell/esh-mode.el2
-rw-r--r--lisp/eshell/esh-util.el17
-rw-r--r--lisp/eshell/esh-var.el2
-rw-r--r--lisp/faces.el37
-rw-r--r--lisp/files.el4
-rw-r--r--lisp/filesets.el3
-rw-r--r--lisp/font-core.el16
-rw-r--r--lisp/font-lock.el39
-rw-r--r--lisp/forms.el2
-rw-r--r--lisp/gnus/ChangeLog249
-rw-r--r--lisp/gnus/canlock.el4
-rw-r--r--lisp/gnus/deuglify.el5
-rw-r--r--lisp/gnus/dig.el5
-rw-r--r--lisp/gnus/gnus-agent.el9
-rw-r--r--lisp/gnus/gnus-art.el47
-rw-r--r--lisp/gnus/gnus-cache.el4
-rw-r--r--lisp/gnus/gnus-cite.el40
-rw-r--r--lisp/gnus/gnus-cus.el4
-rw-r--r--lisp/gnus/gnus-diary.el5
-rw-r--r--lisp/gnus/gnus-eform.el4
-rw-r--r--lisp/gnus/gnus-group.el14
-rw-r--r--lisp/gnus/gnus-kill.el4
-rw-r--r--lisp/gnus/gnus-salt.el6
-rw-r--r--lisp/gnus/gnus-score.el8
-rw-r--r--lisp/gnus/gnus-soup.el8
-rw-r--r--lisp/gnus/gnus-spec.el2
-rw-r--r--lisp/gnus/gnus-srvr.el7
-rw-r--r--lisp/gnus/gnus-start.el2
-rw-r--r--lisp/gnus/gnus-sum.el4
-rw-r--r--lisp/gnus/gnus-util.el12
-rw-r--r--lisp/gnus/gnus-uu.el2
-rw-r--r--lisp/gnus/gnus.el120
-rw-r--r--lisp/gnus/html2text.el5
-rw-r--r--lisp/gnus/imap.el8
-rw-r--r--lisp/gnus/message.el3
-rw-r--r--lisp/gnus/mm-util.el38
-rw-r--r--lisp/gnus/mml1991.el9
-rw-r--r--lisp/gnus/mml2015.el4
-rw-r--r--lisp/gnus/nnbabyl.el2
-rw-r--r--lisp/gnus/nndb.el2
-rw-r--r--lisp/gnus/nndiary.el16
-rw-r--r--lisp/gnus/nndoc.el4
-rw-r--r--lisp/gnus/nndraft.el13
-rw-r--r--lisp/gnus/nneething.el2
-rw-r--r--lisp/gnus/nnfolder.el8
-rw-r--r--lisp/gnus/nnheader.el30
-rw-r--r--lisp/gnus/nnkiboze.el2
-rw-r--r--lisp/gnus/nnmail.el4
-rw-r--r--lisp/gnus/nnmbox.el4
-rw-r--r--lisp/gnus/nnmh.el12
-rw-r--r--lisp/gnus/nnml.el4
-rw-r--r--lisp/gnus/nnrss.el2
-rw-r--r--lisp/gnus/nnsoup.el4
-rw-r--r--lisp/gnus/nnspool.el4
-rw-r--r--lisp/gnus/nntp.el12
-rw-r--r--lisp/gnus/pgg-gpg.el2
-rw-r--r--lisp/gnus/pgg-parse.el6
-rw-r--r--lisp/gnus/pgg.el138
-rw-r--r--lisp/gnus/pop3.el48
-rw-r--r--lisp/gnus/qp.el6
-rw-r--r--lisp/gnus/score-mode.el6
-rw-r--r--lisp/gnus/sieve-manage.el27
-rw-r--r--lisp/gnus/sieve-mode.el14
-rw-r--r--lisp/gnus/smime.el3
-rw-r--r--lisp/gnus/spam-report.el10
-rw-r--r--lisp/gnus/spam.el9
-rw-r--r--lisp/gnus/starttls.el14
-rw-r--r--lisp/help-fns.el2
-rw-r--r--lisp/help-mode.el2
-rw-r--r--lisp/hexl.el2
-rw-r--r--lisp/ibuffer.el2
-rw-r--r--lisp/ido.el173
-rw-r--r--lisp/ielm.el5
-rw-r--r--lisp/image.el16
-rw-r--r--lisp/info.el21
-rw-r--r--lisp/international/latexenc.el61
-rw-r--r--lisp/international/swedish.el4
-rw-r--r--lisp/iswitchb.el163
-rw-r--r--lisp/jit-lock.el4
-rw-r--r--lisp/ledit.el2
-rw-r--r--lisp/locate.el2
-rw-r--r--lisp/longlines.el5
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mail/rmailedit.el2
-rw-r--r--lisp/mail/rmailsum.el2
-rw-r--r--lisp/mail/supercite.el11
-rw-r--r--lisp/man.el7
-rw-r--r--lisp/mh-e/ChangeLog362
-rw-r--r--lisp/mh-e/mh-acros.el8
-rw-r--r--lisp/mh-e/mh-alias.el11
-rw-r--r--lisp/mh-e/mh-comp.el23
-rw-r--r--lisp/mh-e/mh-customize.el409
-rw-r--r--lisp/mh-e/mh-e.el69
-rw-r--r--lisp/mh-e/mh-funcs.el7
-rw-r--r--lisp/mh-e/mh-gnus.el2
-rw-r--r--lisp/mh-e/mh-identity.el46
-rw-r--r--lisp/mh-e/mh-inc.el12
-rw-r--r--lisp/mh-e/mh-index.el290
-rw-r--r--lisp/mh-e/mh-init.el2
-rw-r--r--lisp/mh-e/mh-junk.el6
-rw-r--r--lisp/mh-e/mh-loaddefs.el379
-rw-r--r--lisp/mh-e/mh-mime.el19
-rw-r--r--lisp/mh-e/mh-pick.el78
-rw-r--r--lisp/mh-e/mh-print.el2
-rw-r--r--lisp/mh-e/mh-seq.el33
-rw-r--r--lisp/mh-e/mh-speed.el2
-rw-r--r--lisp/mh-e/mh-utils.el13
-rw-r--r--lisp/net/eudc.el3
-rw-r--r--lisp/net/quickurl.el2
-rw-r--r--lisp/net/snmp-mode.el6
-rw-r--r--lisp/obsolete/ooutline.el2
-rw-r--r--lisp/obsolete/options.el2
-rw-r--r--lisp/obsolete/rnews.el2
-rw-r--r--lisp/obsolete/rnewspost.el2
-rw-r--r--lisp/outline.el49
-rw-r--r--lisp/play/5x5.el4
-rw-r--r--lisp/play/decipher.el4
-rw-r--r--lisp/play/gomoku.el2
-rw-r--r--lisp/play/landmark.el3
-rw-r--r--lisp/play/mpuz.el3
-rw-r--r--lisp/play/snake.el2
-rw-r--r--lisp/play/solitaire.el2
-rw-r--r--lisp/play/tetris.el2
-rw-r--r--lisp/printing.el2
-rw-r--r--lisp/progmodes/ada-mode.el2
-rw-r--r--lisp/progmodes/antlr-mode.el2
-rw-r--r--lisp/progmodes/autoconf.el2
-rw-r--r--lisp/progmodes/compile.el26
-rw-r--r--lisp/progmodes/dcl-mode.el2
-rw-r--r--lisp/progmodes/delphi.el2
-rw-r--r--lisp/progmodes/ebrowse.el8
-rw-r--r--lisp/progmodes/f90.el2
-rw-r--r--lisp/progmodes/fortran.el2
-rw-r--r--lisp/progmodes/gdb-ui.el308
-rw-r--r--lisp/progmodes/gud.el53
-rw-r--r--lisp/progmodes/icon.el2
-rw-r--r--lisp/progmodes/idlw-help.el2
-rw-r--r--lisp/progmodes/idlw-shell.el2
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/progmodes/inf-lisp.el5
-rw-r--r--lisp/progmodes/m4-mode.el2
-rw-r--r--lisp/progmodes/make-mode.el41
-rw-r--r--lisp/progmodes/meta-mode.el4
-rw-r--r--lisp/progmodes/modula2.el2
-rw-r--r--lisp/progmodes/octave-inf.el2
-rw-r--r--lisp/progmodes/octave-mod.el2
-rw-r--r--lisp/progmodes/pascal.el2
-rw-r--r--lisp/progmodes/sh-script.el2
-rw-r--r--lisp/progmodes/sql.el4
-rw-r--r--lisp/progmodes/vhdl-mode.el20
-rw-r--r--lisp/progmodes/which-func.el2
-rw-r--r--lisp/progmodes/xscheme.el2
-rw-r--r--lisp/recentf.el2
-rw-r--r--lisp/replace.el2
-rw-r--r--lisp/saveplace.el3
-rw-r--r--lisp/ses.el2
-rw-r--r--lisp/simple.el30
-rw-r--r--lisp/skeleton.el2
-rw-r--r--lisp/speedbar.el2
-rw-r--r--lisp/subr.el32
-rw-r--r--lisp/term.el4
-rw-r--r--lisp/terminal.el4
-rw-r--r--lisp/textmodes/dns-mode.el3
-rw-r--r--lisp/textmodes/flyspell.el781
-rw-r--r--lisp/textmodes/org.el46
-rw-r--r--lisp/textmodes/reftex-index.el4
-rw-r--r--lisp/textmodes/reftex-sel.el4
-rw-r--r--lisp/textmodes/reftex-toc.el2
-rw-r--r--lisp/textmodes/sgml-mode.el3
-rw-r--r--lisp/textmodes/tex-mode.el18
-rw-r--r--lisp/textmodes/texinfo.el3
-rw-r--r--lisp/thumbs.el33
-rw-r--r--lisp/time.el2
-rw-r--r--lisp/tmm.el110
-rw-r--r--lisp/toolbar/gud-break.xpm2
-rw-r--r--lisp/toolbar/gud-cont.xpm2
-rw-r--r--lisp/toolbar/gud-down.xpm2
-rw-r--r--lisp/toolbar/gud-finish.xpm2
-rw-r--r--lisp/toolbar/gud-n.xpm2
-rw-r--r--lisp/toolbar/gud-ni.xpm2
-rw-r--r--lisp/toolbar/gud-print.xpm2
-rw-r--r--lisp/toolbar/gud-pstar.pbmbin0 -> 81 bytes
-rw-r--r--lisp/toolbar/gud-pstar.xpm29
-rw-r--r--lisp/toolbar/gud-remove.xpm2
-rw-r--r--lisp/toolbar/gud-run.xpm2
-rw-r--r--lisp/toolbar/gud-s.xpm2
-rw-r--r--lisp/toolbar/gud-si.xpm2
-rw-r--r--lisp/toolbar/gud-until.xpm2
-rw-r--r--lisp/toolbar/gud-up.xpm2
-rw-r--r--lisp/toolbar/gud-watch.xpm2
-rw-r--r--lisp/url/url-http.el5
-rw-r--r--lisp/wdired.el2
-rw-r--r--lisp/wid-browse.el2
-rw-r--r--lisp/xml.el8
243 files changed, 4372 insertions, 2199 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d1e6655232c..72e02620a50 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,8 +1,612 @@
12005-05-26 Nick Roberts <nickrob@snap.net.nz> 12005-06-05 Nick Roberts <nickrob@snap.net.nz>
2
3 * progmodes/gdb-ui.el (gdb-info-locals-handler): Use window point
4 to preserve point.
5 (gdb-find-file-hook): Add doc string.
6
7 * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate
8 C dereferenced pointer expression.
9 (gud-tool-bar-map): Put it on the tool bar. Re-order icons.
10
11 * toolbar/gud-pstar.xpm, toolbar/gud-pstar.pbm: New files.
12
13 * toolbar/gud-break.xpm, toolbar/gud-cont.xpm, toolbar/gud-down.xpm,
14 toolbar/gud-finish.xpm, toolbar/gud-ni.xpm, toolbar/gud-n.xpm,
15 toolbar/gud-print.xpm, toolbar/gud-remove.xpm, toolbar/gud-run.xpm,
16 toolbar/gud-si.xpm, toolbar/gud-s.xpm, toolbar/gud-until.xpm,
17 toolbar/gud-up.xpm, toolbar/gud-watch.xpm:
18 Make background transparent.
19
202005-06-04 Luc Teirlinck <teirllm@auburn.edu>
21
22 * font-lock.el (font-lock-add-keywords): Doc fix. Comment change.
23 (font-lock-remove-keywords): Doc fix.
24 (font-lock-mode-major-mode): Compiler defvar.
25 (font-lock-set-defaults): Use `font-lock-mode-major-mode'.
26
27 * font-core.el (font-lock-mode-major-mode): Compiler defvar.
28 (font-lock-mode): Update `font-lock-mode-major-mode'.
29 (font-lock-set-defaults): Compiler defvar.
30 (font-lock-default-function): Take `font-lock-mode-major-mode'
31 into account.
32
33 * emacs-lisp/easy-mmode.el (define-global-minor-mode): Make it
34 keep track of which major mode it enabled the minor mode for.
35 Use find-file-hook again. Update docstring.
36
37 * simple.el (eval-expression-print-level)
38 (eval-expression-print-length, eval-expression-debug-on-error):
39 Doc fixes.
40
412005-06-04 Matt Hodges <MPHodges@member.fsf.org>
42
43 * iswitchb.el (iswitchb-single-match-face)
44 (iswitchb-current-match-face, iswitchb-virtual-matches-face)
45 (iswitchb-invalid-regexp-face): New faces.
46 (iswitchb-completions): Use them.
47 (iswitchb-use-faces): Renamed from iswitchb-use-fonts, which is
48 now marked as an obsolete alias.
49 (iswitchb-read-buffer): Remove check for bound font variables.
50 (iswitchb-invalid-regexp): New free variable.
51 (iswitchb-get-matched-buffers): Catch invalid-regexp errors and
52 set iswitchb-invalid-regexp.
53 (iswitchb, iswitchb-complete, iswitchb-completions): Deal with
54 invalid regexps.
55 (iswitchb-completions): Add check for complete match when entering
56 a regexp.
57 (iswitchb-completions): Remove require-match argument.
58 (iswitchb-exhibit): Fix caller.
59 (iswitchb-common-match-inserted): New variable.
60 (iswitchb-complete, iswitchb-completion-help): Use it.
61
622005-06-04 David Reitter <david.reitter@gmail.com> (tiny change)
63
64 * url-http.el (url-http-chunked-encoding-after-change-function):
65 Use `url-http-debug' instead of `message'.
66
672005-06-04 Thierry Emery <thierry.emery@free.fr> (tiny change)
68
69 * url-http.el (url-http-parse-headers): Pass redirected URL as a
70 callback argument.
71
722005-06-04 Kim F. Storm <storm@cua.dk>
73
74 * simple.el (line-move): Only call sit-for when moving backwards.
75
76 * ido.el (ido-make-merged-file-list-1): New defun split from
77 ido-make-merged-file-list.
78 (ido-make-merged-file-list): Bind throw-on-input around call to
79 ido-make-merged-file-list-1. Return input-pending-p if
80 interrupted by more input available.
81 (ido-read-internal): Handle input-pending-p return value from
82 ido-make-merged-file-list.
83
842005-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
85
86 * textmodes/flyspell.el (flyspell-check-word-p): Simplify silly
87 compatibility code.
88
89 * international/latexenc.el (latexenc-find-file-coding-system):
90 Don't inherit the EOL part of the coding-system from the
91 tex-main buffer. Fit within 80 columns.
92
932005-06-03 Matt Hodges <MPHodges@member.fsf.org>
94
95 * tmm.el (tmm-inactive-face): New face.
96 (tmm-remove-inactive-mouse-face): New function.
97 (tmm-prompt, tmm-add-one-shortcut)
98 (tmm-add-prompt, tmm-get-keymap): Make active menu items visible
99 but not selectable.
100
1012005-06-03 Juanma Barranquero <lekktu@gmail.com>
102
103 * faces.el (face-equal): Improve argument/docstring consistency.
104
1052005-06-03 Daniel Pfeiffer <occitan@esperanto.org>
106
107 * progmodes/make-mode.el (makefile-targets-face)
108 (makefile-shell-face, makefile-makepp-perl-face): Add :version.
109 (makefile-bsdmake-dependency-regex)
110 (makefile-makepp-rule-action-regex)
111 (makefile-bsdmake-rule-action-regex): New constants.
112 (makefile-makepp-mode, makefile-bsdmake-mode): Use them.
113
114 * progmodes/compile.el (compilation-error-regexp-alist-alist):
115 Allow (...) within `...' for makepp messages.
116
1172005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
118
119 * ediff-diff.el (ediff-same-contents): Eliminate CL-type functions.
120
121 * ediff-mult.el (ediff-intersect-directories): Make sure that ".." and
122 "." files are deleted from all file lists before comparison.
123
124 * viper-keym.el (viper-toggle-key, viper-quoted-insert-key)
125 (viper-ESC-key): Made them customizable.
126
127 * viper.el (viper-non-hook-settings): Fix the names of defadvices.
128
1292005-06-01 Luc Teirlinck <teirllm@auburn.edu>
130
131 * autorevert.el (auto-revert-buffers): Use save-match-data.
132
1332005-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
134
135 * emacs-lisp/easymenu.el (easy-menu-return-item): Quick fix to find
136 menu items with a nil command binding.
137
1382005-06-01 Juanma Barranquero <lekktu@gmail.com>
139
140 * emacs-lisp/cl-macs.el (defsetf):
141 Improve argument/docstring consistency.
142
143 * faces.el (list-faces-display): Improve the formatting by
144 computing the maximum length required for any face-name (reworked
145 patch of 1999-01-11, accidentally deleted on 1999-07-21).
146 (internal-find-face): Remove redundant info in docstring.
147
1482005-06-01 Nick Roberts <nickrob@snap.net.nz>
149
150 * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-1)
151 (gdb-info-breakpoints-custom, gdb-delete-breakpoint)
152 (gdb-goto-breakpoint, gdb-source-info, gdb-get-location)
153 (gdb-assembler-custom): Improve regexps.
154 (def-gdb-auto-update-handler): Use window point to preserve
155 point.
156
1572005-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
158
159 * thumbs.el (thumbs-mode): Fix misuse of make-variable-buffer-local.
160
1612005-05-31 Jay Belanger <belanger@truman.edu>
162
163 * calc/calc-embed.el (calc-embedded-word): Change argument passed
164 to calc-embedded.
165 (calc-embedded-make-info): Have plain prefix argument select
166 entire line.
167
1682005-05-31 Juanma Barranquero <lekktu@gmail.com>
169
170 * faces.el (list-faces-display): Signal error if passed a regexp
171 that matches no face name.
172
173 * simple.el (filter-buffer-substring): Fix typo in docstring.
174
1752005-05-31 Richard M. Stallman <rms@gnu.org>
176
177 * progmodes/vhdl-mode.el (vhdl-fill-region): Test ARG, not INTERACTIVE.
178 (vhdl-emacs-21): Doc fix.
179 (vhdl-mode): Unconditionally set comment-padding.
180 (vhdl-fixup-whitespace-region): Insert spaces only where
181 there are none.
182 (vhdl-statistics-buffer): Make the Emacs 21 behavior universal.
183
1842005-05-30 John Wiegley <johnw@newartisans.com>
185
186 * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el
187 * eshell/em-unix.el, eshell/esh-ext.el, eshell/esh-io.el
188 * eshell/esh-util.el, eshell/esh-var.el: Change all uses of
189 `directory-sep-char' to ?/, and all uses of `string-to-int' to
190 `string-to-number'.
191
1922005-05-30 Jay Belanger <belanger@truman.edu>
193
194 * calc/calc.el (calc-bug-address): Fix docstring.
195 (calc-window-hook, calc-trail-window-hook): New variables.
196 (calc-trail-display): Restore use of calc-trail-window-hook.
197 (calc): Restore use of calc-window-hook.
198
1992005-05-31 Masatake YAMATO <jet@gyve.org>
200
201 * emacs-lisp/find-func.el (find-function-noselect): Handle subroutines.
202
203 * help-fns.el (help-C-file-name): Add autoload mark for
204 `find-function-noselect'.
205
2062005-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
207
208 * textmodes/tex-mode.el (tex-compile-commands, tex-compile)
209 (tex-start-tex): Undo all but the last part of the 2005-05-28 change.
210
2112005-05-30 Glenn Morris <gmorris@ast.cam.ac.uk>
212
213 * calendar/diary-lib.el (mark-included-diary-files): Only kill
214 included diary buffer if it was not already being visited.
215 Reported by Stephen Berman <Stephen.Berman@gmx.net>.
216
217 * calendar/icalendar.el (top-level): Do not require 'appt.
218
219 * mail/supercite.el (sc-select-attribution): Only use a list
220 element from sc-attrib-selection-list if it returns a string.
221 Reported by Davide G. M. Salvetti <salve@debian.org>.
222
2232005-05-30 Juanma Barranquero <lekktu@gmail.com>
224
225 * thumbs.el (thumbs-thumbname): The resulting thubname now
226 includes a hash value to improve its uniqueness, and has a ".jpg"
227 extension. Also, it is now a valid filename on all systems.
228 (thumbs-make-thumb): Use `let', not `let*'.
229 (thumbs-show-thumbs-list): Check for JPEG availability.
230
2312005-05-30 Richard M. Stallman <rms@gnu.org>
232
233 * filesets.el (filesets-menu-ensure-use-cached):
234 Prevent warning when emacs-version>= is undefined.
235
236 * printing.el (pr-interactive-n-up): Use string-to-number.
237
238 * emulation/tpu-mapper.el: Use eval-buffer, not eval-current-buffer.
239
240 * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn):
241 Warn only when name to be defined is quoted.
242
2432005-05-30 Nick Roberts <nickrob@snap.net.nz>
244
245 * progmodes/gdb-ui.el (gdb-toggle-breakpoint):
246 Make regexp more robust.
247 (gdb-display-assembler-buffer, gdb-frame-assembler-buffer):
248 Force regeneration of disassembly.
249
2502005-05-29 Jay Belanger <belanger@truman.edu>
251
252 * calc/calc.el (calc-user-invocation): Check if
253 calc-invocation-macro is non-nil.
254
2552005-05-29 Juri Linkov <juri@jurta.org>
256
257 * add-log.el (change-log-font-lock-keywords):
258 Add `+' to e-mail regexp to accept mail address with keywords.
259
260 * man.el (Man-name-regexp): Add `:' to accept qualified names.
261
2622005-05-29 Luc Teirlinck <teirllm@auburn.edu>
263
264 * progmodes/inf-lisp.el (inferior-lisp-mode): Use delay-mode-hooks.
265
266 * ielm.el (inferior-emacs-lisp-mode): Ditto.
267
2682005-05-29 Richard M. Stallman <rms@gnu.org>
269
270 * textmodes/flyspell.el (flyspell-auto-correct-previous-word):
271 Undo the change that moves to end of the current word.
272
2732005-05-29 Nick Roberts <nickrob@snap.net.nz>
274
275 * progmodes/gdb-ui.el (gdb-memory-set-repeat-count):
276 Throw error when count <= 0 to ensure input is a number.
277 (gdb-read-memory-custom): Pick up address from buffer.
278 (gdb-memory-mode): Allow user to increment and decrement
279 memory address from header line.
280
2812005-05-29 Richard M. Stallman <rms@gnu.org>
282
283 * flyspell.el (flyspell-version): Function deleted.
284 (flyspell-auto-correct-previous-hook): Doc fix.
285
286 * jit-lock.el (jit-lock-function, jit-lock-after-change):
287 Do nothing if memory is full.
288
289 * font-lock.el (font-lock-fontify-syntactically-region):
290 Pass t for GREEDY to looking-back.
291
292 * saveplace.el (save-place-alist-to-file): Write the file
293 using write-region.
294
295 * subr.el (looking-back): New argument GREEDY.
296
297 * progmodes/compile.el (compilation-start): Set the mode
298 before inserting the initial text.
299
300 * progmodes/which-func.el (which-func-update-1): Turn the mode
301 off in case of error by setting which-func-mode.
302
3032005-05-29 Peter Heslin <p.j.heslin@durham.ac.uk> (tiny change)
304
305 * flyspell.el (flyspell-auto-correct-previous-word):
306 Narrow down to what's on the screen, and recenter overlays
307 at the end of the next word.
308
3092005-05-29 Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
310
311 * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up.
312 (flyspell-default-delayed-commands): Add backward-delete-char-untabify.
313 (flyspell-abbrev-p): Default to nil.
314 (flyspell-use-global-abbrev-table-p): Doc fix.
315 (flyspell-large-region): Allow nil as value.
316 (flyspell-use-meta-tab, flyspell-auto-correct-binding): New variables.
317
318 (mail-mode-flyspell-verify): More robust handling
319 of `mail-header-separator'. More efficient signature detection.
320 Allow for regexp metacharacters in message-header-separator.
321 Adding `To' not to be checked in mail-mode-flyspell-verify.
322
323 (flyspell-prog-mode): Run flyspell-prog-mode-hook.
324 (flyspell-mouse-map): Bind M-TAB only if flyspell-use-meta-tab.
325 Bind flyspell-auto-correct-binding.
326 Bind C-. and C-, .
327 (flyspell-mode-map): Likewise.
328 (flyspell-mode): Doc fix.
329 (flyspell-accept-buffer-local-defs): Preserve current buffer.
330 (flyspell-mode-on): Bind flyspell-mouse-map and flyspell-mode-map.
331 (flyspell-word-cache-result): New var, always local.
332 (flyspell-check-pre-word-p): Doc fix.
333 (flyspell-check-changed-word-p): Handle spc like newline.
334 (flyspell-post-command-hook): Set flyspell-word-cache-result.
335 (flyspell-word-search-backward, flyspell-word-search-forward):
336 New functions.
337 (flyspell-word): Return t if nothing to check.
338 When parsing TeX code, check for after } or \.
339 Use flyspell-word-search-backward to find previous word.
340 Return nil if duplicated word.
341 For word already checked, return same value as last time.
342 Set flyspell-word-cache-result after checking.
343 Don't clobber the return value.
344 (flyspell-get-word): Major rewrite.
345 (flyspell-external-point-words): New locals pword, pcount.
346 Fix size used in progress message.
347 Find the proper corresponding word in flyspell-large-region-buffer.
348 (flyspell-region): Check for flyspell-large-region = nil.
349 (flyspell-highlight-incorrect-region): Clean up overlays in region.
350 (flyspell-auto-correct-word): Check that WORD is a cons.
351 (flyspell-correct-word): Likewise.
352
3532005-05-29 Daniel Pfeiffer <occitan@esperanto.org>
354
355 * progmodes/make-mode.el (makefile-rule-action-regex)
356 (makefile-macroassign-regex, makefile-makepp-mode)
357 (makefile-bsdmake-mode): Continuation lines may be empty.
358 Reported by Joshua Varner.
359 (makefile-makepp-font-lock-keywords): Add $(stem).
360
3612005-05-28 Karl Berry <karl@gnu.org>
362
363 * textmodes/tex-mode.el: Now that tex-send-command calls
364 shell-quote-argument (2005-03-31 change), remove all calls to
365 shell-quote-argument; they all end up invoking tex-send-command.
366 The double quoting loses on filenames with non-safe characters,
367 such as "@". Reported by Frederik Fouvry.
368
3692005-05-29 Nick Roberts <nickrob@snap.net.nz>
370
371 * progmodes/gdb-ui.el (gdb-assembler-custom): Be more careful
372 about preserving point.
373
3742005-05-27 Jay Belanger <belanger@truman.edu>
375
376 * calc/calc-misc.el (calc-info-goto-node): Use info instead of
377 Info-goto-node.
378
379 * calc/calc-embed.el (calc-embed-arg): New variable.
380 (calc-do-embedded-activate, calc-embedded-activate-formula)
381 (calc-embedded-edit, calc-do-embedded-activate): Replace undeclared
382 variable by new variable.
383 (calc-embedded-make-info): Replace undeclared variable by new
384 variable. When selecting region with positive prefix
385 argument, use end of previous line instead of beginning of line.
386
387 * calc/calc-aent.el (calc-arg-values): Declare it.
388
389 * calc/calc-ext.el (calc-help-map, calc-alg-map, calc-alg-esc-map):
390 Declare them.
391
392 * calc/calc-stuff.el (math-decls-cache-tag): Declare it.
393
394 * calc/calc.el (calc-alg-map): Declare it.
395
396 * calc/calcalg2.el (math-decls-cache, math-decls-all): Declare them.
397
3982005-05-28 Nick Roberts <nickrob@snap.net.nz>
399
400 * progmodes/gdb-ui.el (gdb-all-registers): New variable.
401 (gdb-registers-buffer, toggle-gdb-all-registers):
402 Toggle display of floating point registers.
403 (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers.
404
405 * progmodes/gud.el (gud-goto-info): Use info. Don't use require.
406 (toggle-gud-tooltip-dereference):
407 Rename from gud-toggle-tooltip-dereference.
408
4092005-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
410
411 * info.el (Info-goto-node): Revert autoload addition (2004-06-12).
412
4132005-05-27 Jay Belanger <belanger@truman.edu>
414
415 * calc/calc-prog.el (calc-kbd-report): Remove.
416 (calc-kbd-query): Rewrite.
417
4182005-05-27 Juanma Barranquero <lekktu@gmail.com>
419
420 * image.el (image-library-alist): Move to image.c.
421 (image-type-available-p): Doc fix.
422
4232005-05-27 Lute Kamstra <lute@gnu.org>
424
425 * calc/calc.el (calc):
426 * outline.el (outline-1, outline-2, outline-3, outline-4)
427 (outline-5, outline-6, outline-7, outline-8):
428 * textmodes/dns-mode.el (dns-mode):
429 * textmodes/sgml-mode.el (sgml-namespace-face):
430 * textmodes/tex-mode.el (superscript, subscript, tex-math-face)
431 (tex-verbatim-face, tex-use-reftex):
432 * textmodes/texinfo.el (texinfo-heading-face):
433 Specify customization group.
434
435 * longlines.el: Don't require easy-mmode.
436 (longlines-visible-face): Specify customization group.
437
4382005-05-27 Kenichi Handa <handa@m17n.org>
439
440 * language/cyrillic.el: Add cyrillic-iso8859-5 characters in the
441 encoding table of windows-1251.
442
443 * international/ucs-tables.el (ucs-set-table-for-input):
444 If translation-table-for-input of a coding system is a symbol, get
445 its translation-table property.
446
447 * international/code-pages.el: Don't register a coding system into
448 non-iso-charset-alist more than once.
449 (cp-make-coding-system): Likewise.
450
4512005-05-26 John Wiegley <johnw@newartisans.com>
452
453 * eshell/esh-cmd.el (eshell-eval-command): If the return value of
454 `eshell-resume-eval' is wrapped in a list, it indicates that the
455 command was run asynchronously. In that case, unwrap the value
456 before checking the delimiter value.
457
458 * eshell/em-cmpl.el (eshell-complete-parse-arguments): If the
459 character before a space at the end of a line is \, assume the space
460 is part of the last argument rather than a final argument separator.
461
462 * eshell/esh-io.el (eshell-get-target): If `eshell-buffer-shorthand'
463 is in use, and the target is `t' or `nil' (which are the most common
464 values), don't assume that the symbol target is a buffer.
465
4662005-05-26 Luc Teirlinck <teirllm@auburn.edu>
467
468 * calendar/calendar.el (calendar-mode-line-format):
469 Use mode-line-highlight as mouse-face.
470
471 * time.el (display-time-string-forms, display-time-update):
472 Use mode-line-highlight as mouse-face.
473
4742005-05-26 Jay Belanger <belanger@truman.edu>
475
476 * calc/calc.el (calc-language-alist): Remove extra defvar.
477
4782005-05-26 Lute Kamstra <lute@gnu.org>
479
480 * arc-mode.el (archive-mode):
481 * bookmark.el (bookmark-read-annotation-mode)
482 (bookmark-edit-annotation-mode, bookmark-bmenu-mode):
483 * bs.el (bs-mode):
484 * calc/calc-yank.el (calc-edit-mode):
485 * calc/calc.el (calc-mode, calc-trail-mode):
486 * calculator.el (calculator-mode):
487 * chistory.el (command-history-mode):
488 * comint.el:
489 * cus-edit.el (custom-mode):
490 * descr-text.el (describe-text-mode):
491 * ebuff-menu.el (Electric-buffer-menu-mode):
492 * ediff-util.el (ediff-mode):
493 * emacs-lisp/re-builder.el (reb-mode):
494 * emulation/vi.el (vi-mode-setup):
495 * emulation/ws-mode.el (wordstar-mode):
496 * eshell/esh-mode.el (eshell-mode):
497 * forms.el (forms-mode):
498 * help-mode.el (help-mode):
499 * hexl.el (hexl-mode):
500 * ibuffer.el (ibuffer-mode):
501 * ielm.el (inferior-emacs-lisp-mode):
502 * info.el (Info-mode, Info-edit-mode):
503 * international/swedish.el:
504 * ledit.el (ledit-from-lisp-mode):
505 * locate.el (locate-mode):
506 * mail/rmail.el (rmail-mode):
507 * mail/rmailedit.el (rmail-edit-mode):
508 * mail/rmailsum.el (rmail-summary-mode):
509 * mail/supercite.el (sc-electric-mode):
510 * net/eudc.el (eudc-mode):
511 * net/quickurl.el (quickurl-list-mode):
512 * net/snmp-mode.el (snmp-mode, snmpv2-mode):
513 * obsolete/ooutline.el (outline-mode):
514 * obsolete/options.el (Edit-options-mode):
515 * obsolete/rnews.el (news-mode):
516 * obsolete/rnewspost.el (news-reply-mode):
517 * play/5x5.el (5x5-mode):
518 * play/decipher.el (decipher-mode, decipher-stats-mode):
519 * play/gomoku.el (gomoku-mode):
520 * play/snake.el (snake-mode):
521 * play/solitaire.el (solitaire-mode):
522 * play/tetris.el (tetris-mode):
523 * progmodes/ada-mode.el (ada-mode):
524 * progmodes/antlr-mode.el (antlr-mode):
525 * progmodes/autoconf.el (autoconf-mode):
526 * progmodes/dcl-mode.el (dcl-mode):
527 * progmodes/delphi.el (delphi-mode):
528 * progmodes/ebrowse.el (ebrowse-tree-mode)
529 (ebrowse-electric-list-mode, ebrowse-member-mode)
530 (ebrowse-electric-position-mode):
531 * progmodes/f90.el (f90-mode):
532 * progmodes/fortran.el (fortran-mode):
533 * progmodes/icon.el (icon-mode):
534 * progmodes/idlw-help.el (idlwave-help-mode):
535 * progmodes/idlw-shell.el (idlwave-shell-mode):
536 * progmodes/idlwave.el (idlwave-mode):
537 * progmodes/inf-lisp.el (inferior-lisp-mode):
538 * progmodes/m4-mode.el (m4-mode):
539 * progmodes/meta-mode.el (metafont-mode, metapost-mode):
540 * progmodes/modula2.el (modula-2-mode):
541 * progmodes/octave-inf.el (inferior-octave-mode):
542 * progmodes/octave-mod.el (octave-mode):
543 * progmodes/pascal.el (pascal-mode):
544 * progmodes/sh-script.el (sh-mode):
545 * progmodes/sql.el (sql-mode, sql-interactive-mode):
546 * progmodes/vhdl-mode.el (vhdl-mode):
547 * progmodes/xscheme.el (scheme-interaction-mode):
548 * replace.el (occur-mode):
549 * ses.el (ses-mode):
550 * simple.el (completion-list-mode):
551 * skeleton.el:
552 * speedbar.el (speedbar-mode):
553 * term.el (term-mode):
554 * terminal.el (terminal-edit-mode):
555 * textmodes/reftex-index.el (reftex-index-mode)
556 (reftex-index-phrases-mode):
557 * textmodes/reftex-sel.el (reftex-select-label-mode)
558 (reftex-select-bib-mode):
559 * textmodes/reftex-toc.el (reftex-toc-mode):
560 * wdired.el (wdired-change-to-wdired-mode):
561 * wid-browse.el (widget-browse-mode):
562 Use run-mode-hooks.
563
564 * array.el (array-mode):
565 * calendar/todo-mode.el (todo-mode):
566 * man.el (Man-mode):
567 * play/landmark.el (lm-mode):
568 * play/mpuz.el (mpuz-mode):
569 Use kill-all-local-variables and run-mode-hooks.
570
571 * subr.el (delay-mode-hooks): Specify indentation.
572
5732005-05-26 Mark A. Hershberger <mah@everybody.org>
574
575 * xml.el (xml-substitute-special): Don't die for undefined xml entities.
576
5772005-05-26 Jay Belanger <belanger@truman.edu>
578
579 * calc/calc-prog.el (calc-user-define-edit): Don't find substring
580 of nil.
581
5822005-05-27 Nick Roberts <nickrob@snap.net.nz>
583
584 * progmodes/gdb-ui.el (gdb-frame-address):
585 Rename from gdb-current-address.
586 (gdb-previous-frame-address): Rename from gdb-previous-address.
587 (gdb-selected-frame): Rename from gdb-current-frame.
588 (gdb-get-selected-frame): Rename from gdb-get-current-frame.
589 (gdb-frame-number): Rename from gdb-current-stack-level.
590 (gdb-ann3): Match new mode-name for disassembly buffer.
591 Extend initialisation of variables.
592 (gdb-post-prompt): Update disassembly from gdb-frame-handler.
593 (gdb-memory-mode): Use mouse-face in header line.
594 (gdb-assembler-buffer-name): Call it disassembly and give frame
595 in mode line.
596 (gdb-source-spec-regexp, gdb-assembler-custom)
597 (gdb-invalidate-assembler, gdb-frame-handler):
598 Make robust to leading zeroes in address format.
599
6002005-05-26 Carsten Dominik <dominik@science.uva.nl>
601
602 * textmodes/org.el (org-mode): Use `define-derived-mode' to
603 define `org-mode'.
604 (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'.
605
6062005-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 607
3 * log-edit.el (log-edit-changelog-entries): Distinguish between 608 * log-edit.el (log-edit-changelog-entries): Distinguish between
4 filenames like xfns.c and fns.c. 609 filenames like xfns.c and fns.c.
5 Coded by Stefan Monnier <monnier@iro.umontreal.ca>.
6 610
72005-05-25 Luc Teirlinck <teirllm@auburn.edu> 6112005-05-25 Luc Teirlinck <teirllm@auburn.edu>
8 612
@@ -35,7 +639,7 @@
35 639
362005-05-24 Andre Spiegel <spiegel@gnu.org> 6402005-05-24 Andre Spiegel <spiegel@gnu.org>
37 641
38 * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsoleted. 642 * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsolete.
39 (cperl-vc-rcs-header, cperl-vc-sccs-header): New user options. 643 (cperl-vc-rcs-header, cperl-vc-sccs-header): New user options.
40 (cperl-mode): Use them. 644 (cperl-mode): Use them.
41 645
@@ -76,11 +680,11 @@
76 680
77 CC Mode update to 5.30.10: 681 CC Mode update to 5.30.10:
78 682
79 * cc-fonts.el (c-font-lock-declarators): Fixed bug where the point 683 * cc-fonts.el (c-font-lock-declarators): Fix bug where the point
80 could go past the limit in decoration level 2, thereby causing 684 could go past the limit in decoration level 2, thereby causing
81 errors during interactive fontification. 685 errors during interactive fontification.
82 686
83 * cc-mode.el (c-make-inherited-keymap): Fixed cc-bytecomp bug when 687 * cc-mode.el (c-make-inherited-keymap): Fix cc-bytecomp bug when
84 the file is evaluated interactively. 688 the file is evaluated interactively.
85 689
86 * cc-engine.el (c-guess-basic-syntax): Handle operator 690 * cc-engine.el (c-guess-basic-syntax): Handle operator
@@ -98,7 +702,7 @@
98 Compensate for return value from `forward-line' when it has moved 702 Compensate for return value from `forward-line' when it has moved
99 but not to a different line due to eob. 703 but not to a different line due to eob.
100 704
101 * cc-engine.el (c-guess-basic-syntax): Fixed anchoring in 705 * cc-engine.el (c-guess-basic-syntax): Fix anchoring in
102 `objc-method-intro' and `objc-method-args-cont'. 706 `objc-method-intro' and `objc-method-args-cont'.
103 707
1042005-05-23 Alan Mackenzie <bug-cc-mode@gnu.org> 7082005-05-23 Alan Mackenzie <bug-cc-mode@gnu.org>
@@ -127,8 +731,7 @@
127 * subr.el (font-lock-defaults): Remove defvar as it's already 731 * subr.el (font-lock-defaults): Remove defvar as it's already
128 defined in font-core.el. 732 defined in font-core.el.
129 733
130 * font-lock.el (font-lock-beginning-of-syntax-function): Fix 734 * font-lock.el (font-lock-beginning-of-syntax-function): Fix docstring.
131 docstring.
132 735
1332005-05-23 Nick Roberts <nickrob@snap.net.nz> 7362005-05-23 Nick Roberts <nickrob@snap.net.nz>
134 737
@@ -140,8 +743,8 @@
140 743
141 * font-core.el: Update comment. 744 * font-core.el: Update comment.
142 745
143 * emacs-lisp/easy-mmode.el (define-global-minor-mode): Use 746 * emacs-lisp/easy-mmode.el (define-global-minor-mode):
144 `after-change-major-mode-hook' instead of `find-file-hook'. 747 Use `after-change-major-mode-hook' instead of `find-file-hook'.
145 748
146 * buff-menu.el (Buffer-menu-mode): Use `run-mode-hooks'. 749 * buff-menu.el (Buffer-menu-mode): Use `run-mode-hooks'.
147 750
@@ -201,15 +804,14 @@
201 * vc-cvs.el (vc-cvs-checkout-model): Handle the case where FILE 804 * vc-cvs.el (vc-cvs-checkout-model): Handle the case where FILE
202 doesn't exist. 805 doesn't exist.
203 806
204 * vc.el (vc-trunk-p): Add autoload cookie. The function is used 807 * vc.el (vc-trunk-p): Add autoload cookie. The function is used in
205 in vc-rcs.el when vc-mistrust-permissions is t, which is not the 808 vc-rcs.el when vc-mistrust-permissions is t, which is not the default.
206 default.
207 809
2082005-05-22 Nick Roberts <nickrob@snap.net.nz> 8102005-05-22 Nick Roberts <nickrob@snap.net.nz>
209 811
210 * emacs-lisp/bytecomp.el: Remove make-obsolete-variable for 812 * emacs-lisp/bytecomp.el: Remove make-obsolete-variable for
211 already deleted variables: auto-fill-hook, blink-paren-hook, 813 already deleted variables: auto-fill-hook, blink-paren-hook,
212 lisp-indent-hook, inhibit-local-variables, unread-command-event 814 lisp-indent-hook, inhibit-local-variables, unread-command-event,
213 suspend-hooks, comment-indent-hook, meta-flag, 815 suspend-hooks, comment-indent-hook, meta-flag,
214 before-change-function, after-change-function, 816 before-change-function, after-change-function,
215 font-lock-doc-string-face. 817 font-lock-doc-string-face.
@@ -451,7 +1053,7 @@
451 post-command-idle-delay. 1053 post-command-idle-delay.
452 1054
453 * faces.el (list-faces-display): Provide button when describe-face 1055 * faces.el (list-faces-display): Provide button when describe-face
454 is called to take user back to the list of faces. 1056 is called to take user back to the list of faces.
455 1057
456 * help-fns.el (describe-variable): Remove hyperlinks in a 1058 * help-fns.el (describe-variable): Remove hyperlinks in a
457 variable's value as these are quite frequently inappropriate. 1059 variable's value as these are quite frequently inappropriate.
@@ -721,8 +1323,8 @@
721 1323
722 * progmodes/compile.el (compilation-setup): Set local value of 1324 * progmodes/compile.el (compilation-setup): Set local value of
723 overlay-arrow-string to "" always. 1325 overlay-arrow-string to "" always.
724 (compilation-set-window): Left fringe then don't scroll. No left 1326 (compilation-set-window): Left fringe then don't scroll.
725 fringe then no arrow and scroll message to top. 1327 No left fringe then no arrow and scroll message to top.
726 (compilation-context-lines): Adjust doc string accordingly. 1328 (compilation-context-lines): Adjust doc string accordingly.
727 1329
7282005-05-16 Kim F. Storm <storm@cua.dk> 13302005-05-16 Kim F. Storm <storm@cua.dk>
@@ -981,7 +1583,7 @@
981 1583
9822005-05-11 Stefan Monnier <monnier@iro.umontreal.ca> 15842005-05-11 Stefan Monnier <monnier@iro.umontreal.ca>
983 1585
984 * files.el (executable-find): Move from executable.el. Use locate-file. 1586 * files.el (executable-find): Move from executable.el. Use locate-file.
985 * progmodes/executable.el (executable-find): Move to files.el. 1587 * progmodes/executable.el (executable-find): Move to files.el.
986 1588
987 * font-lock.el (font-lock-fontify-keywords-region): Use a marker 1589 * font-lock.el (font-lock-fontify-keywords-region): Use a marker
@@ -1031,10 +1633,10 @@
1031 1633
1032 * progmodes/gdb-ui.el (gdb-macro-info): New variable. 1634 * progmodes/gdb-ui.el (gdb-macro-info): New variable.
1033 (gdb-source-info): Check for preprocessor info. 1635 (gdb-source-info): Check for preprocessor info.
1034 (gdb-tooltip-print-1): New function. Don't print tooltip if it is 1636 (gdb-tooltip-print-1): New function. Don't print tooltip if it is
1035 a macro for a function. 1637 a macro for a function.
1036 found (user might have used GDB dir command).
1037 (gdb-info-breakpoints-custom): Try to find file again if not already 1638 (gdb-info-breakpoints-custom): Try to find file again if not already
1639 found (user might have used GDB dir command).
1038 (gdb-get-location): Update gdb-location-alist correctly for change 1640 (gdb-get-location): Update gdb-location-alist correctly for change
1039 to gdb-info-breakpoints-custom. 1641 to gdb-info-breakpoints-custom.
1040 1642
@@ -1130,7 +1732,7 @@
1130 * tooltip.el: Move code for GUD tooltips into gud.el. 1732 * tooltip.el: Move code for GUD tooltips into gud.el.
1131 (require): CL no longer needed to compile case. 1733 (require): CL no longer needed to compile case.
1132 (tooltip-mode): Do not toggle functions for GUD tooltips. 1734 (tooltip-mode): Do not toggle functions for GUD tooltips.
1133 (tooltip-gud-tips-p): Remove. Replace with minor mode 1735 (tooltip-gud-tips-p): Remove. Replace with minor mode
1134 gud-tooltip-mode in gud.el. 1736 gud-tooltip-mode in gud.el.
1135 (tooltip-gud-modes, tooltip-gud-display, tooltip-gud-echo-area) 1737 (tooltip-gud-modes, tooltip-gud-display, tooltip-gud-echo-area)
1136 (tooltip-gud-toggle-dereference): Rename in gud.el by replacing 1738 (tooltip-gud-toggle-dereference): Rename in gud.el by replacing
@@ -1142,14 +1744,14 @@
1142 (tooltip-gud-original-filter, tooltip-gud-dereference) 1744 (tooltip-gud-original-filter, tooltip-gud-dereference)
1143 (tooltip-gud-event, tooltip-toggle-gud-tips) 1745 (tooltip-gud-event, tooltip-toggle-gud-tips)
1144 (tooltip-gud-process-output, tooltip-gud-print-command) 1746 (tooltip-gud-process-output, tooltip-gud-print-command)
1145 (tooltip-gud-tips): GUD tooltip functions/variables. Rename in 1747 (tooltip-gud-tips): GUD tooltip functions/variables. Rename in
1146 gud.el by replacing tooltip-gud prefix with gud-tooltip. 1748 gud.el by replacing tooltip-gud prefix with gud-tooltip.
1147 (gdb-tooltip-print): Move to gdb-ui.el. 1749 (gdb-tooltip-print): Move to gdb-ui.el.
1148 1750
1149 * progmodes/gud.el: Move code for GUD tooltips from tooltip.el. 1751 * progmodes/gud.el: Move code for GUD tooltips from tooltip.el.
1150 (require): CL needed to compile case. 1752 (require): CL needed to compile case.
1151 (gud-tooltip-mode): Use to toggle GUD tooltips unstead of 1753 (gud-tooltip-mode): Use to toggle GUD tooltips unstead of
1152 tooltip-gud-tips-p. Make it a minor-mode. 1754 tooltip-gud-tips-p. Make it a minor-mode.
1153 (gud-find-file): Only prepare GUD tooltips if gud-tooltip-mode is t. 1755 (gud-find-file): Only prepare GUD tooltips if gud-tooltip-mode is t.
1154 (gud-menu-map): GUD tooltips use gud-tooltip-mode now. 1756 (gud-menu-map): GUD tooltips use gud-tooltip-mode now.
1155 (gud-tooltip-modes, gud-tooltip-display, gud-tooltip-echo-area) 1757 (gud-tooltip-modes, gud-tooltip-display, gud-tooltip-echo-area)
@@ -1245,7 +1847,7 @@
1245 * ido.el (ido-setup-hook): New hook. 1847 * ido.el (ido-setup-hook): New hook.
1246 (ido-define-mode-map-hook): Remove hook; use ido-setup-hook instead. 1848 (ido-define-mode-map-hook): Remove hook; use ido-setup-hook instead.
1247 (ido-input-stack): New var. 1849 (ido-input-stack): New var.
1248 (ido-define-mode-map): Bind M-b to ido-push-dir. Move old 1850 (ido-define-mode-map): Bind M-b to ido-push-dir. Move old
1249 ido-next-work-file binding to M-O. 1851 ido-next-work-file binding to M-O.
1250 Bind M-f to ido-wide-find-file-or-pop-dir. 1852 Bind M-f to ido-wide-find-file-or-pop-dir.
1251 (ido-define-mode-map): Don't run ido-define-mode-map-hook. 1853 (ido-define-mode-map): Don't run ido-define-mode-map-hook.
@@ -1338,7 +1940,7 @@
1338 (gdb-set-gud-minor-mode-1): Handle gdb-define-alist. 1940 (gdb-set-gud-minor-mode-1): Handle gdb-define-alist.
1339 (gdb-source, gdb-memory-set-repeat-count): Replace string-to-int 1941 (gdb-source, gdb-memory-set-repeat-count): Replace string-to-int
1340 with string-to-number. 1942 with string-to-number.
1341 (gdb-reset): Kill gdb-define-alist. Move assignments outside loop. 1943 (gdb-reset): Kill gdb-define-alist. Move assignments outside loop.
1342 1944
1343 * progmodes/gud.el: Replace string-to-int with string-to-number. 1945 * progmodes/gud.el: Replace string-to-int with string-to-number.
1344 (gud-find-file): Handle gdb-define-alist. 1946 (gud-find-file): Handle gdb-define-alist.
@@ -1384,7 +1986,7 @@
1384 move to cc-vars.el. 1986 move to cc-vars.el.
1385 1987
1386 * progmodes/cc-vars.el (cc-define-list-program): 1988 * progmodes/cc-vars.el (cc-define-list-program):
1387 Change to "gcc -E -dM -". Make customizable. 1989 Change to "gcc -E -dM -". Make customizable.
1388 1990
13892005-05-02 Kim F. Storm <storm@cua.dk> 19912005-05-02 Kim F. Storm <storm@cua.dk>
1390 1992
@@ -1435,7 +2037,7 @@
1435 * subr.el (dot, dot-marker, dot-min, dot-max, buffer-flush-undo) 2037 * subr.el (dot, dot-marker, dot-min, dot-max, buffer-flush-undo)
1436 (compiled-function-p, focus-frame, unfocus-frame): 2038 (compiled-function-p, focus-frame, unfocus-frame):
1437 Remove aliases and obsolete declarations. 2039 Remove aliases and obsolete declarations.
1438 Back out inadvertant changes from previous commit. 2040 Back out inadvertent changes from previous commit.
1439 2041
14402005-05-01 Luc Teirlinck <teirllm@auburn.edu> 20422005-05-01 Luc Teirlinck <teirllm@auburn.edu>
1441 2043
@@ -1490,7 +2092,7 @@
14902005-04-30 Nick Roberts <nickrob@snap.net.nz> 20922005-04-30 Nick Roberts <nickrob@snap.net.nz>
1491 2093
1492 * progmodes/cc-mode.el (cc-create-define-alist): Check that file 2094 * progmodes/cc-mode.el (cc-create-define-alist): Check that file
1493 exists. Initialise cc-define-alist. 2095 exists. Initialise cc-define-alist.
1494 (c-mode): Add cc-create-define-alist locally to after-save-hook. 2096 (c-mode): Add cc-create-define-alist locally to after-save-hook.
1495 If there is no file (Macroexpansion) don't create an alist. 2097 If there is no file (Macroexpansion) don't create an alist.
1496 2098
@@ -1580,7 +2182,7 @@
1580 2182
15812005-04-28 Nick Roberts <nickrob@snap.net.nz> 21832005-04-28 Nick Roberts <nickrob@snap.net.nz>
1582 2184
1583 * progmodes/cc-mode.el: (cc-create-define-alist): New function. 2185 * progmodes/cc-mode.el (cc-create-define-alist): New function.
1584 (cc-define-alist): New variable. 2186 (cc-define-alist): New variable.
1585 (c-mode): Make it local and initialise it. 2187 (c-mode): Make it local and initialise it.
1586 2188
@@ -1709,7 +2311,7 @@
17092005-04-25 Dan Nicolaescu <dann@ics.uci.edu> 23112005-04-25 Dan Nicolaescu <dann@ics.uci.edu>
1710 2312
1711 * term.el (ansi-term-color-vector): Use the xterm colors. 2313 * term.el (ansi-term-color-vector): Use the xterm colors.
1712 (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar. 2314 (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar.
1713 2315
17142005-04-25 Lute Kamstra <lute@gnu.org> 23162005-04-25 Lute Kamstra <lute@gnu.org>
1715 2317
@@ -2731,13 +3333,13 @@
2731 * add-log.el (change-log-font-lock-keywords): The manual 3333 * add-log.el (change-log-font-lock-keywords): The manual
2732 describing a Change Log entry, says: (...) "Aside from these 3334 describing a Change Log entry, says: (...) "Aside from these
2733 header lines, every line in the change log starts with a space or 3335 header lines, every line in the change log starts with a space or
2734 a tab.". The font-lock was not highlighting lines started with 3336 a tab.". The font-lock was not highlighting lines started with
2735 spaces, added support for it. 3337 spaces, added support for it.
2736 3338
27372005-04-03 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> 33392005-04-03 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
2738 3340
2739 * textmodes/bibtex.el (bibtex-url): Use format to generate the url. 3341 * textmodes/bibtex.el (bibtex-url): Use format to generate the url.
2740 (bibtex-generate-url-list): Update docstring accordingly. Put the 3342 (bibtex-generate-url-list): Update docstring accordingly. Put the
2741 complex example in the docstring. 3343 complex example in the docstring.
2742 (bibtex-font-lock-url): Use pop. 3344 (bibtex-font-lock-url): Use pop.
2743 3345
@@ -2770,7 +3372,7 @@
2770 3372
27712005-04-02 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change) 33732005-04-02 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change)
2772 3374
2773 * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional 3375 * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional
2774 mailbox specifications as well as URLs. 3376 mailbox specifications as well as URLs.
2775 (rmail-insert-inbox-text): Remove unused conditional branches. 3377 (rmail-insert-inbox-text): Remove unused conditional branches.
2776 3378
@@ -2872,12 +3474,7 @@
2872 (fill-newline): Use fill-text-properties-at instead of 3474 (fill-newline): Use fill-text-properties-at instead of
2873 text-properties-at. 3475 text-properties-at.
2874 3476
28752005-03-31 Karl Berry <karl@freefriends.org> 34772005-03-31 Olive Lin <olive.lin@versateladsl.be> (tiny change)
2876
2877 * textmodes/tex-mode.el (tex-compile): Use shell-quote-argument,
2878 not comint-quote-filename.
2879
28802005-03-31 Olive Lin <olive.lin@versateladsl.be> (tiny change)
2881 3478
2882 * textmodes/tex-mode.el (tex-start-tex) Use shell-quote-argument, 3479 * textmodes/tex-mode.el (tex-start-tex) Use shell-quote-argument,
2883 not comint-quote-filename. 3480 not comint-quote-filename.
@@ -3016,12 +3613,12 @@
3016 (hs-special-modes-alist): Add a Fortran entry. 3613 (hs-special-modes-alist): Add a Fortran entry.
3017 (fortran-mode-map): Bind fortran-end-of-block, 3614 (fortran-mode-map): Bind fortran-end-of-block,
3018 fortran-beginning-of-block to \M-\C-n, \M-\C-p. 3615 fortran-beginning-of-block to \M-\C-n, \M-\C-p.
3019 (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4. 3616 (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4.
3020 (fortran-looking-at-if-then, fortran-end-of-block) 3617 (fortran-looking-at-if-then, fortran-end-of-block)
3021 (fortran-beginning-of-block): New functions, for hideshow. 3618 (fortran-beginning-of-block): New functions, for hideshow.
3022 3619
3023 * progmodes/f90.el (f90-end-block-re, f90-start-block-re): Doc 3620 * progmodes/f90.el (f90-end-block-re, f90-start-block-re):
3024 fix. Tweak regexp. 3621 Doc fix. Tweak regexp.
3025 (f90-beginning-of-block): Push mark first. 3622 (f90-beginning-of-block): Push mark first.
3026 3623
30272005-03-29 Jay Belanger <belanger@truman.edu> 36242005-03-29 Jay Belanger <belanger@truman.edu>
@@ -3039,7 +3636,7 @@
3039 * vc.el (vc-do-command): Use a pipe for async processes, so password 3636 * vc.el (vc-do-command): Use a pipe for async processes, so password
3040 prompts don't show up at places where the user can't reply. 3637 prompts don't show up at places where the user can't reply.
3041 3638
30422005-03-29 Olive Lin <olive.lin@versateladsl.be> (tiny change) 36392005-03-29 Olive Lin <olive.lin@versateladsl.be> (tiny change)
3043 3640
3044 * textmodes/tex-mode.el (tex-send-command): shell-quote-argument 3641 * textmodes/tex-mode.el (tex-send-command): shell-quote-argument
3045 on the file name we pass to the inferior shell. 3642 on the file name we pass to the inferior shell.
@@ -3269,11 +3866,11 @@
3269 * calendar/calendar.el: Replace `legal' with `valid'. 3866 * calendar/calendar.el: Replace `legal' with `valid'.
3270 * emacs-lisp/advice.el: Replace `legal' with `valid'. 3867 * emacs-lisp/advice.el: Replace `legal' with `valid'.
3271 * mail/supercite.el: Replace `legal' with `valid'. 3868 * mail/supercite.el: Replace `legal' with `valid'.
3272 * progmodes/cperl-mode.el, progmodes/idlw-shell.el, 3869 * progmodes/cperl-mode.el, progmodes/idlw-shell.el
3273 progmodes/idlwave.el, progmodes/vhdl-mode.el: Replace `legal' with 3870 * progmodes/idlwave.el, progmodes/vhdl-mode.el:
3274 `valid'. 3871 Replace `legal' with `valid'.
3275 * textmodes/reftex-vars.el, textmodes/reftex.el: Replace `legal' 3872 * textmodes/reftex-vars.el, textmodes/reftex.el:
3276 with `valid'. 3873 Replace `legal' with `valid'.
3277 3874
32782005-03-25 Werner Lemberg <wl@gnu.org> 38752005-03-25 Werner Lemberg <wl@gnu.org>
3279 3876
@@ -3283,15 +3880,15 @@
3283 * emulation/vip.el: Replace `illegal' with `invalid'. 3880 * emulation/vip.el: Replace `illegal' with `invalid'.
3284 * eshell/esh-io.el, eshell/esh-var.el: Replace `illegal' with `invalid'. 3881 * eshell/esh-io.el, eshell/esh-var.el: Replace `illegal' with `invalid'.
3285 * mail/supercite.el: Replace `illegal' with `invalid'. 3882 * mail/supercite.el: Replace `illegal' with `invalid'.
3286 * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el, 3883 * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el
3287 progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el, 3884 * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el
3288 progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el, 3885 * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el
3289 progmodes/sh-script.el, progmodes/xscheme.el: Replace `illegal' with 3886 * progmodes/sh-script.el, progmodes/xscheme.el:
3290 `invalid'. 3887 Replace `illegal' with `invalid'.
3291 * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el, 3888 * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el
3292 textmodes/reftex-index.el, textmodes/reftex-parse.el, 3889 * textmodes/reftex-index.el, textmodes/reftex-parse.el
3293 textmodes/reftex-ref.el, textmodes/reftex-vars.el, 3890 * textmodes/reftex-ref.el, textmodes/reftex-vars.el
3294 textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'. 3891 * textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'.
3295 3892
32962005-03-24 Stefan Monnier <monnier@iro.umontreal.ca> 38932005-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
3297 3894
@@ -3412,11 +4009,11 @@
3412 (recentf-include-p): More robust. 4009 (recentf-include-p): More robust.
3413 (recentf-keep-p): New function. 4010 (recentf-keep-p): New function.
3414 (recentf-remove-if-non-kept): Rename from 4011 (recentf-remove-if-non-kept): Rename from
3415 `recentf-remove-if-non-readable'. Use `recentf-keep-p'. 4012 `recentf-remove-if-non-readable'. Use `recentf-keep-p'.
3416 All callers updated. 4013 All callers updated.
3417 (recentf-menu-items-for-commands): Fix help string. 4014 (recentf-menu-items-for-commands): Fix help string.
3418 (recentf-track-closed-file): Update. Doc fix. 4015 (recentf-track-closed-file): Update. Doc fix.
3419 (recentf-cleanup): Update. Count removed files. Doc fix. 4016 (recentf-cleanup): Update. Count removed files. Doc fix.
3420 4017
34212005-03-23 Kim F. Storm <storm@cua.dk> 40182005-03-23 Kim F. Storm <storm@cua.dk>
3422 4019
@@ -4132,7 +4729,7 @@
4132 4729
4133 * files.el (mode-require-final-newline): Doc fix. 4730 * files.el (mode-require-final-newline): Doc fix.
4134 4731
41352005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change) 47322005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change)
4136 4733
4137 * progmodes/which-func.el (which-function): 4734 * progmodes/which-func.el (which-function):
4138 Specify NOERROR when calling imenu--make-index-alist. 4735 Specify NOERROR when calling imenu--make-index-alist.
@@ -4727,7 +5324,7 @@
4727 * progmodes/gdb-ui.el (gdb-find-file-unhook): New variable. 5324 * progmodes/gdb-ui.el (gdb-find-file-unhook): New variable.
4728 (gdb-set-gud-minor-mode, gdb-set-gud-minor-mode-1) 5325 (gdb-set-gud-minor-mode, gdb-set-gud-minor-mode-1)
4729 (gdb-set-gud-minor-mode-existing-buffers): New functions. 5326 (gdb-set-gud-minor-mode-existing-buffers): New functions.
4730 (gdb-find-file-hook): New hook. Add it to find-file-hook. 5327 (gdb-find-file-hook): New hook. Add it to find-file-hook.
4731 (gdb-info-breakpoints-custom, gdb-source-info): Simplify. 5328 (gdb-info-breakpoints-custom, gdb-source-info): Simplify.
4732 5329
47332005-02-14 Luc Teirlinck <teirllm@auburn.edu> 53302005-02-14 Luc Teirlinck <teirllm@auburn.edu>
@@ -4891,13 +5488,13 @@
4891 5488
48922005-02-05 Nick Roberts <nickrob@snap.net.nz> 54892005-02-05 Nick Roberts <nickrob@snap.net.nz>
4893 5490
4894 * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before 5491 * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before
4895 GDB-Windows on the menu-bar as this works better. 5492 GDB-Windows on the menu-bar as this works better.
4896 5493
48972005-02-04 Jay Belanger <belanger@truman.edu> 54942005-02-04 Jay Belanger <belanger@truman.edu>
4898 5495
4899 * calc/calc-embed.el (calc-embedded-update): Don't put in 5496 * calc/calc-embed.el (calc-embedded-update): Don't put in
4900 unnecessary newlines. Adjust the end of formula marker. 5497 unnecessary newlines. Adjust the end of formula marker.
4901 5498
4902 * calc/calc-lang.el (math-latex-parse-frac): Don't use arguments. 5499 * calc/calc-lang.el (math-latex-parse-frac): Don't use arguments.
4903 (math-latex-parse-two-args): New function. 5500 (math-latex-parse-two-args): New function.
@@ -4959,7 +5556,7 @@
4959 5556
49602005-02-02 Nick Roberts <nickrob@snap.net.nz> 55572005-02-02 Nick Roberts <nickrob@snap.net.nz>
4961 5558
4962 * progmodes/gdb-ui.el: (gdb-goto-info): Delete. 5559 * progmodes/gdb-ui.el (gdb-goto-info): Delete.
4963 5560
4964 * progmodes/gud.el (gud-goto-info): New function. 5561 * progmodes/gud.el (gud-goto-info): New function.
4965 (gud-tool-bar-map): Use correct icon. 5562 (gud-tool-bar-map): Use correct icon.
@@ -5667,8 +6264,8 @@
5667 6264
56682005-01-11 Juri Linkov <juri@jurta.org> 62652005-01-11 Juri Linkov <juri@jurta.org>
5669 6266
5670 * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm, 6267 * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm
5671 * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm, 6268 * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm
5672 * toolbar/fwd_arrow.xpm, toolbar/fwd_arrow.pbm: New icons. 6269 * toolbar/fwd_arrow.xpm, toolbar/fwd_arrow.pbm: New icons.
5673 6270
5674 * info.el (Info-history-forward): New variable. 6271 * info.el (Info-history-forward): New variable.
@@ -6392,7 +6989,7 @@
6392 6989
63932004-12-21 Eli Barzilay <eli@barzilay.org> 69902004-12-21 Eli Barzilay <eli@barzilay.org>
6394 6991
6395 * calculator.el: (calculator-radix-grouping-mode) 6992 * calculator.el (calculator-radix-grouping-mode)
6396 (calculator-radix-grouping-digits) 6993 (calculator-radix-grouping-digits)
6397 (calculator-radix-grouping-separator): 6994 (calculator-radix-grouping-separator):
6398 New defcustoms for the new radix grouping mode functionality. 6995 New defcustoms for the new radix grouping mode functionality.
@@ -6593,11 +7190,11 @@
6593 (zone-replace-char): New defsubst. 7190 (zone-replace-char): New defsubst.
6594 (zone-park/sit-for): Likewise. 7191 (zone-park/sit-for): Likewise.
6595 (zone-fret): Take window-start arg. 7192 (zone-fret): Take window-start arg.
6596 Update callers. Use `zone-park/sit-for'. 7193 Update callers. Use `zone-park/sit-for'.
6597 (zone-fill-out-screen): Rewrite. 7194 (zone-fill-out-screen): Rewrite.
6598 (zone-fall-through-ws): Likewise. Update callers. 7195 (zone-fall-through-ws): Likewise. Update callers.
6599 (zone-pgm-drip): Use `zone-replace-char'. 7196 (zone-pgm-drip): Use `zone-replace-char'.
6600 Move var inits before while-loop. Use `zone-park/sit-for'. 7197 Move var inits before while-loop. Use `zone-park/sit-for'.
6601 (zone-pgm-random-life): Handle empty initial field. 7198 (zone-pgm-random-life): Handle empty initial field.
6602 Use `zone-replace-char' and `zone-park/sit-for'. 7199 Use `zone-replace-char' and `zone-park/sit-for'.
6603 7200
@@ -7438,16 +8035,16 @@
7438 (tramp-file-name-handler-alist): Delete file-directory-files, add 8035 (tramp-file-name-handler-alist): Delete file-directory-files, add
7439 directory-files-and-attributes. 8036 directory-files-and-attributes.
7440 (tramp-perl-file-attributes): Surround uid and gid by double 8037 (tramp-perl-file-attributes): Surround uid and gid by double
7441 quotes. Change parameter id-format from nonnumeric. 8038 quotes. Change parameter id-format from nonnumeric.
7442 (tramp-convert-file-attributes): New function. 8039 (tramp-convert-file-attributes): New function.
7443 (tramp-handle-file-attributes): Use it. 8040 (tramp-handle-file-attributes): Use it.
7444 (tramp-maybe-send-perl-script): New function. 8041 (tramp-maybe-send-perl-script): New function.
7445 (tramp-handle-file-attributes-with-perl): Use it. Don't convert 8042 (tramp-handle-file-attributes-with-perl): Use it. Don't convert
7446 file mode. Change parameter id-format from nonnumeric. 8043 file mode. Change parameter id-format from nonnumeric.
7447 (tramp-handle-file-attributes-with-ls): Change parameter id-format 8044 (tramp-handle-file-attributes-with-ls): Change parameter id-format
7448 from nonnumeric. 8045 from nonnumeric.
7449 (tramp-post-connection): Don't send tramp-perl-file-attributes 8046 (tramp-post-connection): Don't send tramp-perl-file-attributes
7450 script. Reset connection property "perl-scripts". 8047 script. Reset connection property "perl-scripts".
7451 (tramp-handle-insert-directory): Run real handler when ls-lisp is 8048 (tramp-handle-insert-directory): Run real handler when ls-lisp is
7452 in use. 8049 in use.
7453 8050
@@ -7470,7 +8067,7 @@
7470 (gdb-view-source-function, gdb-view-assembler): Delete functions. 8067 (gdb-view-source-function, gdb-view-assembler): Delete functions.
7471 (menu): Delete menu bindings for viewing source/assembler. 8068 (menu): Delete menu bindings for viewing source/assembler.
7472 (gdb-setup-windows, gdb-restore-windows): 8069 (gdb-setup-windows, gdb-restore-windows):
7473 Don't dedicate GUD. No assembler now. 8070 Don't dedicate GUD. No assembler now.
7474 (gdb-reset): No need to undedicate source buffers now. 8071 (gdb-reset): No need to undedicate source buffers now.
7475 (gdb-source-info): No assembler now. 8072 (gdb-source-info): No assembler now.
7476 8073
@@ -7597,7 +8194,7 @@
7597 (gdb-var-evaluate-expression-handler, gdb-put-string): 8194 (gdb-var-evaluate-expression-handler, gdb-put-string):
7598 Remove unused variable bindings. 8195 Remove unused variable bindings.
7599 (gdb-setup-windows, gdb-display-buffer): 8196 (gdb-setup-windows, gdb-display-buffer):
7600 Simplify. Use pop-to-buffer. 8197 Simplify. Use pop-to-buffer.
7601 (gdb-view-source-function): Simplify. 8198 (gdb-view-source-function): Simplify.
7602 (gdb-frame-breakpoints-buffer): 8199 (gdb-frame-breakpoints-buffer):
7603 Use pop-to-buffer, special-display-regexps. 8200 Use pop-to-buffer, special-display-regexps.
@@ -7681,8 +8278,8 @@
7681 * progmodes/gdb-ui.el (dedicated-switch-to-buffer): New function. 8278 * progmodes/gdb-ui.el (dedicated-switch-to-buffer): New function.
7682 (gdb-ann3, gdb-setup-windows, gdb-restore-windows): 8279 (gdb-ann3, gdb-setup-windows, gdb-restore-windows):
7683 Dedicate gdb-related windows. 8280 Dedicate gdb-related windows.
7684 (gdb-display-buffer): Dedicate gdb-related windows. Don't grab 8281 (gdb-display-buffer): Dedicate gdb-related windows.
7685 other frames. 8282 Don't grab other frames.
7686 (gdb-reset): Remove dedicated property after debugging. 8283 (gdb-reset): Remove dedicated property after debugging.
7687 8284
76882004-11-24 Jay Belanger <belanger@truman.edu> 82852004-11-24 Jay Belanger <belanger@truman.edu>
@@ -8548,8 +9145,8 @@
8548 9145
85492004-11-10 Nick Roberts <nickrob@snap.net.nz> 91462004-11-10 Nick Roberts <nickrob@snap.net.nz>
8550 9147
8551 * tooltip.el: Don't require cl, comint, gud, gdb-ui for 9148 * tooltip.el: Don't require cl, comint, gud, gdb-ui for compilation.
8552 compilation. The resulting compiler warnings appear to be harmless. 9149 The resulting compiler warnings appear to be harmless.
8553 9150
85542004-11-10 Daniel Pfeiffer <occitan@esperanto.org> 91512004-11-10 Daniel Pfeiffer <occitan@esperanto.org>
8555 9152
@@ -9772,7 +10369,7 @@
9772 * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and 10369 * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and
9773 reset kmacro-initial-counter-value if set. 10370 reset kmacro-initial-counter-value if set.
9774 (kmacro-set-counter): Only set kmacro-counter if defining or executing 10371 (kmacro-set-counter): Only set kmacro-counter if defining or executing
9775 macro. Set kmacro-initial-counter-value otherwise. Never set both. 10372 macro. Set kmacro-initial-counter-value otherwise. Never set both.
9776 (kmacro-display): Show macro counter if non-zero. 10373 (kmacro-display): Show macro counter if non-zero.
9777 10374
9778 * subr.el (substitute-key-definition): Mention command remapping 10375 * subr.el (substitute-key-definition): Mention command remapping
@@ -9959,8 +10556,8 @@
9959 10556
9960 * term.el (term-adjust-current-row-cache): Don't allow the current 10557 * term.el (term-adjust-current-row-cache): Don't allow the current
9961 row to become negative. 10558 row to become negative.
9962 (term-emulate-terminal): Fix insert mode. Handle tab insertion at 10559 (term-emulate-terminal): Fix insert mode. Handle tab insertion at
9963 the end of the line. Fix scroll down. Add comments. 10560 the end of the line. Fix scroll down. Add comments.
9964 (term-handle-ansi-escape): Don't exceed terminal width when moving 10561 (term-handle-ansi-escape): Don't exceed terminal width when moving
9965 right. 10562 right.
9966 (term-scroll-region): Move the cursor after setting the scroll region. 10563 (term-scroll-region): Move the cursor after setting the scroll region.
@@ -10115,7 +10712,7 @@
10115 * calendar/holidays.el (holiday-advent): Report on a specified day 10712 * calendar/holidays.el (holiday-advent): Report on a specified day
10116 offset from advent, not just advent. 10713 offset from advent, not just advent.
10117 (holiday-easter-etc): Report on one specified day offset from 10714 (holiday-easter-etc): Report on one specified day offset from
10118 easter, not all easter holidays. Various Easter holidays moved to 10715 easter, not all easter holidays. Various Easter holidays moved to
10119 `christian-holidays' variable in calendar.el. 10716 `christian-holidays' variable in calendar.el.
10120 * calendar/calendar.el (christian-holidays): Adapt for new 10717 * calendar/calendar.el (christian-holidays): Adapt for new
10121 behaviour of `holiday-advent' and `holiday-easter-etc' functions. 10718 behaviour of `holiday-advent' and `holiday-easter-etc' functions.
@@ -10130,7 +10727,7 @@
10130 (ido-read-internal): Handle new `list' context. 10727 (ido-read-internal): Handle new `list' context.
10131 Handle insert-buffer and insert-file ido-exit values. 10728 Handle insert-buffer and insert-file ido-exit values.
10132 (ido-buffer-internal): New arg switch-cmd. Use it to setup 10729 (ido-buffer-internal): New arg switch-cmd. Use it to setup
10133 ido-context-switch-command. Handle insert-file ido-exit value. 10730 ido-context-switch-command. Handle insert-file ido-exit value.
10134 (ido-read-buffer): Set ido-context-switch-command to 'ignore 10731 (ido-read-buffer): Set ido-context-switch-command to 'ignore
10135 unless it is already bound by caller. 10732 unless it is already bound by caller.
10136 (ido-file-internal): New arg switch-cmd. Use it to setup 10733 (ido-file-internal): New arg switch-cmd. Use it to setup
@@ -10460,7 +11057,7 @@
10460 Do not call obsolete function compilation-parse-errors. 11057 Do not call obsolete function compilation-parse-errors.
10461 (bibtex-remove-delimiters): Only remove delimiters if present. 11058 (bibtex-remove-delimiters): Only remove delimiters if present.
10462 (bibtex-copy-entry-as-kill): Add docstring. 11059 (bibtex-copy-entry-as-kill): Add docstring.
10463 (bibtex-clean-entry): Use bibtex-string=. Handle empty keys. 11060 (bibtex-clean-entry): Use bibtex-string=. Handle empty keys.
10464 Detect duplicate keys if bibtex-maintain-sorted-entries is nil. 11061 Detect duplicate keys if bibtex-maintain-sorted-entries is nil.
10465 (bibtex-complete): Use bibtex-predefined-month-strings, 11062 (bibtex-complete): Use bibtex-predefined-month-strings,
10466 bibtex-string=, and new function bibtex-complete-key-cleanup. 11063 bibtex-string=, and new function bibtex-complete-key-cleanup.
@@ -11146,8 +11743,8 @@
11146 when `c-opt-type-concat-key' is used (i.e. in Pike). 11743 when `c-opt-type-concat-key' is used (i.e. in Pike).
11147 11744
11148 * progmodes/cc-engine.el (c-looking-at-special-brace-list): 11745 * progmodes/cc-engine.el (c-looking-at-special-brace-list):
11149 Fix bug when the inner char pair doesn't have paren syntax, i.e. "(< 11746 Fix bug when the inner char pair doesn't have paren syntax,
11150 >)". 11747 i.e. "(<>)".
11151 11748
11152 * progmodes/cc-align.el (c-lineup-multi-inher): Made it syntactic 11749 * progmodes/cc-align.el (c-lineup-multi-inher): Made it syntactic
11153 whitespace safe. 11750 whitespace safe.
@@ -11227,7 +11824,7 @@
11227 string. (2) Check that settings to `c-offsets-alist' are not 11824 string. (2) Check that settings to `c-offsets-alist' are not
11228 spuriously quoted. 11825 spuriously quoted.
11229 11826
11230 * progmodes/cc-cmds.el: (c-electric-brace): Don't delete a comment 11827 * progmodes/cc-cmds.el (c-electric-brace): Don't delete a comment
11231 which precedes the newly inserted `{'. 11828 which precedes the newly inserted `{'.
11232 11829
112332004-08-10 Michael Albinus <michael.albinus@gmx.de> 118302004-08-10 Michael Albinus <michael.albinus@gmx.de>
@@ -11880,7 +12477,7 @@
11880 12477
118812004-06-23 Nick Roberts <nickrob@gnu.org> 124782004-06-23 Nick Roberts <nickrob@gnu.org>
11882 12479
11883 * comint.el: (comint-insert-clicked-input, comint-copy-old-input): 12480 * comint.el (comint-insert-clicked-input, comint-copy-old-input):
11884 Remove. 12481 Remove.
11885 (comint-insert-input, comint-mouse-insert-input): New functions 12482 (comint-insert-input, comint-mouse-insert-input): New functions
11886 based on comint-insert-clicked-input for two bindings but just 12483 based on comint-insert-clicked-input for two bindings but just
@@ -12391,7 +12988,7 @@
12391 12988
123922004-06-04 Karl Fogel <kfogel@red-bean.com> 129892004-06-04 Karl Fogel <kfogel@red-bean.com>
12393 12990
12394 * vc-svn.el (vc-svn-checkin): Use 'nconc' instead of 'list*', 12991 * vc-svn.el (vc-svn-checkin): Use `nconc' instead of `list*',
12395 because the latter is a CL-ism. This fixes the bug reported by 12992 because the latter is a CL-ism. This fixes the bug reported by
12396 Shawn Boyette <mdxi@collapsar.net> in 12993 Shawn Boyette <mdxi@collapsar.net> in
12397 http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00442.html. 12994 http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00442.html.
@@ -13331,9 +13928,9 @@
13331 of 19 months of 19 days, with 4 intercalary days. Each year 13928 of 19 months of 19 days, with 4 intercalary days. Each year
13332 begins on March 21, with the calendar starting in 1844. 13929 begins on March 21, with the calendar starting in 1844.
13333 13930
13334 * calendar/cal-menu.el, calendar/calendar.el, 13931 * calendar/cal-menu.el, calendar/calendar.el
13335 calendar/diary-lib.el, calendar/holidays.el: Added support for 13932 * calendar/diary-lib.el, calendar/holidays.el:
13336 using cal-bahai.el. 13933 Added support for using cal-bahai.el.
13337 13934
13338 * eshell/em-glob.el (eshell-glob-initialize): Move initialization 13935 * eshell/em-glob.el (eshell-glob-initialize): Move initialization
13339 of `eshell-glob-chars-regexp' into `eshell-glob-regexp', so that 13936 of `eshell-glob-chars-regexp' into `eshell-glob-regexp', so that
@@ -14157,7 +14754,7 @@
14157 * emacs-lisp/rx.el (rx-syntax): Move sregex style syntax to code. 14754 * emacs-lisp/rx.el (rx-syntax): Move sregex style syntax to code.
14158 (rx-bracket, rx-check-any, rx-any): Clean up name space. 14755 (rx-bracket, rx-check-any, rx-any): Clean up name space.
14159 14756
14160 * wdired.el: (wdired-mode-map): Move init into declaration. 14757 * wdired.el (wdired-mode-map): Move init into declaration.
14161 Fix `return' binding. 14758 Fix `return' binding.
14162 (wdired-change-to-wdired-mode, wdired-change-to-dired-mode): 14759 (wdired-change-to-wdired-mode, wdired-change-to-dired-mode):
14163 Use force-mode-line-update. 14760 Use force-mode-line-update.
@@ -15700,7 +16297,7 @@
15700 16297
157012004-03-15 David Ponce <david@dponce.com> 162982004-03-15 David Ponce <david@dponce.com>
15702 16299
15703 * ruler-mode.el: (ruler-mode-left-fringe-cols) 16300 * ruler-mode.el (ruler-mode-left-fringe-cols)
15704 (ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols) 16301 (ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols)
15705 (ruler-mode-right-scroll-bar-cols): Remove. 16302 (ruler-mode-right-scroll-bar-cols): Remove.
15706 (ruler-mode-window-col, ruler-mode-mouse-set-left-margin) 16303 (ruler-mode-window-col, ruler-mode-mouse-set-left-margin)
@@ -16447,7 +17044,7 @@
16447 17044
164482004-02-16 Eli Tziperman <eli@deas.harvard.edu> 170452004-02-16 Eli Tziperman <eli@deas.harvard.edu>
16449 17046
16450 * rmail-spam-filter.el: (vm-use-spam-filter) 17047 * rmail-spam-filter.el (vm-use-spam-filter)
16451 (rsf-min-region-length-added-to-spam-list): New variables. 17048 (rsf-min-region-length-added-to-spam-list): New variables.
16452 (rsf-bbdb-auto-delete-spam-bbdb-entries): Rename from 17049 (rsf-bbdb-auto-delete-spam-bbdb-entries): Rename from
16453 rmail-bbdb-auto-delete-spam-entries. Add cc: to recipients for 17050 rmail-bbdb-auto-delete-spam-entries. Add cc: to recipients for
@@ -17105,7 +17702,7 @@
17105 17702
17106 * mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline. 17703 * mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline.
17107 17704
171082004-01-18 David Ponce <david@dponce.com> (tiny change) 177052004-01-18 David Ponce <david@dponce.com> (tiny change)
17109 17706
17110 * progmodes/which-func.el (which-function-mode): Don't cancel 17707 * progmodes/which-func.el (which-function-mode): Don't cancel
17111 which-func-update-timer if not set. 17708 which-func-update-timer if not set.
@@ -19619,10 +20216,10 @@
19619 * calendar/cal-tex.el (cal-tex-day-name-format): Doc fix. 20216 * calendar/cal-tex.el (cal-tex-day-name-format): Doc fix.
19620 (cal-tex-LaTeX-hourbox): Move definition before use. 20217 (cal-tex-LaTeX-hourbox): Move definition before use.
19621 20218
19622 * calendar/cal-china.el, cal-hebrew.el, cal-islam.el, 20219 * calendar/cal-china.el, cal-hebrew.el, cal-islam.el
19623 cal-julian.el, cal-menu.el, cal-move.el, holidays.el, 20220 * cal-julian.el, cal-menu.el, cal-move.el, holidays.el
19624 lunar.el, solar.el 20221 * lunar.el, solar.el (displayed-month, displayed-year):
19625 (displayed-month, displayed-year): Define for compiler. 20222 Define for compiler.
19626 20223
196272003-08-03 Martin Stjernholm <bug-cc-mode@gnu.org> 202242003-08-03 Martin Stjernholm <bug-cc-mode@gnu.org>
19628 20225
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 6dcbfca0c26..4131b237e5c 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -220,7 +220,7 @@ Note: The search is conducted only within 10%, at the beginning of the file."
220 ("^\\sw.........[0-9:+ ]*" 220 ("^\\sw.........[0-9:+ ]*"
221 (0 'change-log-date-face) 221 (0 'change-log-date-face)
222 ;; Name and e-mail; some people put e-mail in parens, not angles. 222 ;; Name and e-mail; some people put e-mail in parens, not angles.
223 ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil 223 ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil
224 (1 'change-log-name-face) 224 (1 'change-log-name-face)
225 (2 'change-log-email-face))) 225 (2 'change-log-email-face)))
226 ;; 226 ;;
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index cc8db1e7417..ac2869a301b 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -689,7 +689,7 @@ archive.
689 (setq major-mode 'archive-mode) 689 (setq major-mode 'archive-mode)
690 (setq mode-name (concat typename "-Archive")) 690 (setq mode-name (concat typename "-Archive"))
691 ;; Run archive-foo-mode-hook and archive-mode-hook 691 ;; Run archive-foo-mode-hook and archive-mode-hook
692 (run-hooks (archive-name "mode-hook") 'archive-mode-hook) 692 (run-mode-hooks (archive-name "mode-hook") 'archive-mode-hook)
693 (use-local-map archive-mode-map)) 693 (use-local-map archive-mode-map))
694 694
695 (make-local-variable 'archive-proper-file-start) 695 (make-local-variable 'archive-proper-file-start)
diff --git a/lisp/array.el b/lisp/array.el
index f65f14ac550..2f270d0f086 100644
--- a/lisp/array.el
+++ b/lisp/array.el
@@ -872,6 +872,7 @@ take a numeric prefix argument):
872Entering array mode calls the function `array-mode-hook'." 872Entering array mode calls the function `array-mode-hook'."
873 873
874 (interactive) 874 (interactive)
875 (kill-all-local-variables)
875 ;; Number of rows in the array. 876 ;; Number of rows in the array.
876 (make-local-variable 'array-max-row) 877 (make-local-variable 'array-max-row)
877 ;; Number of columns in the array. 878 ;; Number of columns in the array.
@@ -907,7 +908,7 @@ Entering array mode calls the function `array-mode-hook'."
907 (setq truncate-lines t) 908 (setq truncate-lines t)
908 (setq overwrite-mode 'overwrite-mode-textual) 909 (setq overwrite-mode 'overwrite-mode-textual)
909 (use-local-map array-mode-map) 910 (use-local-map array-mode-map)
910 (run-hooks 'array-mode-hook)) 911 (run-mode-hooks 'array-mode-hook))
911 912
912 913
913 914
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 36b5a6f5a37..1769a992f7b 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -484,46 +484,47 @@ are checked first the next time this function is called.
484This function is also responsible for removing buffers no longer in 484This function is also responsible for removing buffers no longer in
485Auto-Revert mode from `auto-revert-buffer-list', and for canceling 485Auto-Revert mode from `auto-revert-buffer-list', and for canceling
486the timer when no buffers need to be checked." 486the timer when no buffers need to be checked."
487 (let ((bufs (if global-auto-revert-mode 487 (save-match-data
488 (buffer-list) 488 (let ((bufs (if global-auto-revert-mode
489 auto-revert-buffer-list)) 489 (buffer-list)
490 (remaining ()) 490 auto-revert-buffer-list))
491 (new ())) 491 (remaining ())
492 ;; Partition `bufs' into two halves depending on whether or not 492 (new ()))
493 ;; the buffers are in `auto-revert-remaining-buffers'. The two 493 ;; Partition `bufs' into two halves depending on whether or not
494 ;; halves are then re-joined with the "remaining" buffers at the 494 ;; the buffers are in `auto-revert-remaining-buffers'. The two
495 ;; head of the list. 495 ;; halves are then re-joined with the "remaining" buffers at the
496 (dolist (buf auto-revert-remaining-buffers) 496 ;; head of the list.
497 (if (memq buf bufs) 497 (dolist (buf auto-revert-remaining-buffers)
498 (push buf remaining))) 498 (if (memq buf bufs)
499 (dolist (buf bufs) 499 (push buf remaining)))
500 (if (not (memq buf remaining)) 500 (dolist (buf bufs)
501 (push buf new))) 501 (if (not (memq buf remaining))
502 (setq bufs (nreverse (nconc new remaining))) 502 (push buf new)))
503 (while (and bufs 503 (setq bufs (nreverse (nconc new remaining)))
504 (not (and auto-revert-stop-on-user-input 504 (while (and bufs
505 (input-pending-p)))) 505 (not (and auto-revert-stop-on-user-input
506 (let ((buf (car bufs))) 506 (input-pending-p))))
507 (if (buffer-name buf) ; Buffer still alive? 507 (let ((buf (car bufs)))
508 (with-current-buffer buf 508 (if (buffer-name buf) ; Buffer still alive?
509 ;; Test if someone has turned off Auto-Revert Mode in a 509 (with-current-buffer buf
510 ;; non-standard way, for example by changing major mode. 510 ;; Test if someone has turned off Auto-Revert Mode in a
511 (if (and (not auto-revert-mode) 511 ;; non-standard way, for example by changing major mode.
512 (not auto-revert-tail-mode) 512 (if (and (not auto-revert-mode)
513 (memq buf auto-revert-buffer-list)) 513 (not auto-revert-tail-mode)
514 (setq auto-revert-buffer-list 514 (memq buf auto-revert-buffer-list))
515 (delq buf auto-revert-buffer-list))) 515 (setq auto-revert-buffer-list
516 (when (auto-revert-active-p) (auto-revert-handler))) 516 (delq buf auto-revert-buffer-list)))
517 ;; Remove dead buffer from `auto-revert-buffer-list'. 517 (when (auto-revert-active-p) (auto-revert-handler)))
518 (setq auto-revert-buffer-list 518 ;; Remove dead buffer from `auto-revert-buffer-list'.
519 (delq buf auto-revert-buffer-list)))) 519 (setq auto-revert-buffer-list
520 (setq bufs (cdr bufs))) 520 (delq buf auto-revert-buffer-list))))
521 (setq auto-revert-remaining-buffers bufs) 521 (setq bufs (cdr bufs)))
522 ;; Check if we should cancel the timer. 522 (setq auto-revert-remaining-buffers bufs)
523 (when (and (not global-auto-revert-mode) 523 ;; Check if we should cancel the timer.
524 (null auto-revert-buffer-list)) 524 (when (and (not global-auto-revert-mode)
525 (cancel-timer auto-revert-timer) 525 (null auto-revert-buffer-list))
526 (setq auto-revert-timer nil)))) 526 (cancel-timer auto-revert-timer)
527 (setq auto-revert-timer nil)))))
527 528
528 529
529;; The end: 530;; The end:
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 0696f929584..bbf9b3bcce4 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -866,7 +866,7 @@ the annotation.
866 (use-local-map bookmark-read-annotation-mode-map) 866 (use-local-map bookmark-read-annotation-mode-map)
867 (setq major-mode 'bookmark-read-annotation-mode) 867 (setq major-mode 'bookmark-read-annotation-mode)
868 (insert (funcall bookmark-read-annotation-text-func bookmark)) 868 (insert (funcall bookmark-read-annotation-text-func bookmark))
869 (run-hooks 'text-mode-hook)) 869 (run-mode-hooks 'text-mode-hook))
870 870
871 871
872(defun bookmark-read-annotation (parg bookmark) 872(defun bookmark-read-annotation (parg bookmark)
@@ -903,7 +903,7 @@ When you have finished composing, type \\[bookmark-send-annotation].
903 (let ((annotation (bookmark-get-annotation bookmark))) 903 (let ((annotation (bookmark-get-annotation bookmark)))
904 (if (and annotation (not (string-equal annotation ""))) 904 (if (and annotation (not (string-equal annotation "")))
905 (insert annotation))) 905 (insert annotation)))
906 (run-hooks 'text-mode-hook)) 906 (run-mode-hooks 'text-mode-hook))
907 907
908 908
909(defun bookmark-send-edited-annotation () 909(defun bookmark-send-edited-annotation ()
@@ -1618,7 +1618,7 @@ Bookmark names preceded by a \"*\" have annotations.
1618 (setq buffer-read-only t) 1618 (setq buffer-read-only t)
1619 (setq major-mode 'bookmark-bmenu-mode) 1619 (setq major-mode 'bookmark-bmenu-mode)
1620 (setq mode-name "Bookmark Menu") 1620 (setq mode-name "Bookmark Menu")
1621 (run-hooks 'bookmark-bmenu-mode-hook)) 1621 (run-mode-hooks 'bookmark-bmenu-mode-hook))
1622 1622
1623 1623
1624(defun bookmark-bmenu-toggle-filenames (&optional show) 1624(defun bookmark-bmenu-toggle-filenames (&optional show)
diff --git a/lisp/bs.el b/lisp/bs.el
index 76d8d25051f..4c8b74bb59f 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -656,7 +656,7 @@ to show always.
656 truncate-lines t 656 truncate-lines t
657 font-lock-defaults '(bs-mode-font-lock-keywords t) 657 font-lock-defaults '(bs-mode-font-lock-keywords t)
658 font-lock-verbose nil) 658 font-lock-verbose nil)
659 (run-hooks 'bs-mode-hook)) 659 (run-mode-hooks 'bs-mode-hook))
660 660
661(defun bs-kill () 661(defun bs-kill ()
662 "Let buffer disappear and reset window-configuration." 662 "Let buffer disappear and reset window-configuration."
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index b947b597acf..8af03c4d206 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -947,6 +947,9 @@ in Calc algebraic input.")
947 first nil)) 947 first nil))
948 x)) 948 x))
949 949
950;; calc-arg-values is defined in calc-ext.el, but is used here.
951(defvar calc-arg-values)
952
950(defun calc-check-user-syntax (&optional x prec) 953(defun calc-check-user-syntax (&optional x prec)
951 (let ((p calc-user-parse-table) 954 (let ((p calc-user-parse-table)
952 (matches nil) 955 (matches nil)
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index 6b94cd0af0c..c6e0e33e559 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -192,8 +192,15 @@
192(defvar calc-embed-top) 192(defvar calc-embed-top)
193(defvar calc-embed-bot) 193(defvar calc-embed-bot)
194 194
195;; The variable calc-embed-arg is local to calc-do-embedded,
196;; calc-embedded-update-formula, calc-embedded-edit and
197;; calc-do-embedded-activate, but is used by
198;; calc-embedded-make-info, which is called by the above
199;; functions.
200(defvar calc-embed-arg)
201
195(defvar calc-embedded-quiet nil) 202(defvar calc-embedded-quiet nil)
196(defun calc-do-embedded (arg end obeg oend) 203(defun calc-do-embedded (calc-embed-arg end obeg oend)
197 (if calc-embedded-info 204 (if calc-embedded-info
198 205
199 ;; Turn embedded mode off or switch to a new buffer. 206 ;; Turn embedded mode off or switch to a new buffer.
@@ -237,7 +244,7 @@
237 (buffer-name))) 244 (buffer-name)))
238 (keyboard-quit)) 245 (keyboard-quit))
239 (calc-embedded nil))) 246 (calc-embedded nil)))
240 (calc-embedded arg end obeg oend))) 247 (calc-embedded calc-embed-arg end obeg oend)))
241 248
242 ;; Turn embedded mode on. 249 ;; Turn embedded mode on.
243 (calc-plain-buffer-only) 250 (calc-plain-buffer-only)
@@ -250,7 +257,8 @@
250 (calc-embedded-save-original-modes) 257 (calc-embedded-save-original-modes)
251 (or calc-embedded-globals 258 (or calc-embedded-globals
252 (calc-find-globals)) 259 (calc-find-globals))
253 (setq info (calc-embedded-make-info (point) nil t arg end obeg oend)) 260 (setq info
261 (calc-embedded-make-info (point) nil t calc-embed-arg end obeg oend))
254 (if (eq (car-safe (aref info 8)) 'error) 262 (if (eq (car-safe (aref info 8)) 'error)
255 (progn 263 (progn
256 (setq calc-embedded-original-modes nil) 264 (setq calc-embedded-original-modes nil)
@@ -311,13 +319,13 @@
311 (calc-select-part 2))) 319 (calc-select-part 2)))
312 320
313 321
314(defun calc-embedded-update-formula (arg) 322(defun calc-embedded-update-formula (calc-embed-arg)
315 (interactive "P") 323 (interactive "P")
316 (if arg 324 (if calc-embed-arg
317 (let ((entry (assq (current-buffer) calc-embedded-active))) 325 (let ((entry (assq (current-buffer) calc-embedded-active)))
318 (while (setq entry (cdr entry)) 326 (while (setq entry (cdr entry))
319 (and (eq (car-safe (aref (car entry) 8)) 'calcFunc-evalto) 327 (and (eq (car-safe (aref (car entry) 8)) 'calcFunc-evalto)
320 (or (not (consp arg)) 328 (or (not (consp calc-embed-arg))
321 (and (<= (aref (car entry) 2) (region-beginning)) 329 (and (<= (aref (car entry) 2) (region-beginning))
322 (>= (aref (car entry) 3) (region-end)))) 330 (>= (aref (car entry) 3) (region-end))))
323 (save-excursion 331 (save-excursion
@@ -337,9 +345,9 @@
337 (goto-char (+ (aref info 4) pt)))))))) 345 (goto-char (+ (aref info 4) pt))))))))
338 346
339 347
340(defun calc-embedded-edit (arg) 348(defun calc-embedded-edit (calc-embed-arg)
341 (interactive "P") 349 (interactive "P")
342 (let ((info (calc-embedded-make-info (point) nil t arg)) 350 (let ((info (calc-embedded-make-info (point) nil t calc-embed-arg))
343 str) 351 str)
344 (if (eq (car-safe (aref info 8)) 'error) 352 (if (eq (car-safe (aref info 8)) 'error)
345 (progn 353 (progn
@@ -374,12 +382,12 @@
374 (aset info 8 val) 382 (aset info 8 val)
375 (calc-embedded-update info 14 t t)))) 383 (calc-embedded-update info 14 t t))))
376 384
377(defun calc-do-embedded-activate (arg cbuf) 385(defun calc-do-embedded-activate (calc-embed-arg cbuf)
378 (calc-plain-buffer-only) 386 (calc-plain-buffer-only)
379 (if arg 387 (if calc-embed-arg
380 (calc-embedded-forget)) 388 (calc-embedded-forget))
381 (calc-find-globals) 389 (calc-find-globals)
382 (if (< (prefix-numeric-value arg) 0) 390 (if (< (prefix-numeric-value calc-embed-arg) 0)
383 (message "Deactivating %s for Calc Embedded mode" (buffer-name)) 391 (message "Deactivating %s for Calc Embedded mode" (buffer-name))
384 (message "Activating %s for Calc Embedded mode..." (buffer-name)) 392 (message "Activating %s for Calc Embedded mode..." (buffer-name))
385 (save-excursion 393 (save-excursion
@@ -432,7 +440,7 @@
432 440
433(defun calc-embedded-word () 441(defun calc-embedded-word ()
434 (interactive) 442 (interactive)
435 (calc-embedded '(4))) 443 (calc-embedded '(t)))
436 444
437(defun calc-embedded-mark-formula (&optional body-only) 445(defun calc-embedded-mark-formula (&optional body-only)
438 "Put point at the beginning of this Calc formula, mark at the end. 446 "Put point at the beginning of this Calc formula, mark at the end.
@@ -799,16 +807,26 @@ The command \\[yank] can retrieve it from there."
799 (aset info 1 (or cbuf (save-excursion 807 (aset info 1 (or cbuf (save-excursion
800 (calc-create-buffer) 808 (calc-create-buffer)
801 (current-buffer))))) 809 (current-buffer)))))
802 (if (and (integerp calc-embed-top) (not calc-embed-bot)) 810 (if (and
811 (or (integerp calc-embed-top) (equal calc-embed-top '(4)))
812 (not calc-embed-bot))
803 ; started with a user-supplied argument 813 ; started with a user-supplied argument
804 (progn 814 (progn
805 (if (= (setq arg (prefix-numeric-value arg)) 0) 815 (if (equal calc-embed-top '(4))
806 (progn 816 (progn
807 (aset info 2 (copy-marker (region-beginning))) 817 (aset info 2 (copy-marker (line-beginning-position)))
808 (aset info 3 (copy-marker (region-end)))) 818 (aset info 3 (copy-marker (line-end-position))))
809 (aset info (if (> arg 0) 2 3) (point-marker)) 819 (if (= (setq calc-embed-arg (prefix-numeric-value calc-embed-arg)) 0)
810 (forward-line arg) 820 (progn
811 (aset info (if (> arg 0) 3 2) (point-marker))) 821 (aset info 2 (copy-marker (region-beginning)))
822 (aset info 3 (copy-marker (region-end))))
823 (aset info (if (> calc-embed-arg 0) 2 3) (point-marker))
824 (if (> calc-embed-arg 0)
825 (progn
826 (forward-line (1- calc-embed-arg))
827 (end-of-line))
828 (forward-line (1+ calc-embed-arg)))
829 (aset info (if (> calc-embed-arg 0) 3 2) (point-marker))))
812 (aset info 4 (copy-marker (aref info 2))) 830 (aset info 4 (copy-marker (aref info 2)))
813 (aset info 5 (copy-marker (aref info 3)))) 831 (aset info 5 (copy-marker (aref info 3))))
814 (if (aref info 4) 832 (if (aref info 4)
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index adbdf7a96e2..0b177b06dc4 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -43,6 +43,9 @@
43(defvar math-comp-sel-cpos nil) 43(defvar math-comp-sel-cpos nil)
44(defvar math-compose-hash-args nil) 44(defvar math-compose-hash-args nil)
45 45
46(defvar calc-alg-map)
47(defvar calc-alg-esc-map)
48
46;;; The following was made a function so that it could be byte-compiled. 49;;; The following was made a function so that it could be byte-compiled.
47(defun calc-init-extensions () 50(defun calc-init-extensions ()
48 51
@@ -1192,8 +1195,9 @@ calc-kill calc-kill-region calc-yank))))
1192 (math-normalize val))))) 1195 (math-normalize val)))))
1193 1196
1194 1197
1198(defvar calc-help-map nil)
1195 1199
1196(if (boundp 'calc-help-map) 1200(if calc-help-map
1197 nil 1201 nil
1198 (setq calc-help-map (make-keymap)) 1202 (setq calc-help-map (make-keymap))
1199 (define-key calc-help-map "b" 'calc-describe-bindings) 1203 (define-key calc-help-map "b" 'calc-describe-bindings)
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index e8bdfe2fa5a..ce0da11ecaa 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -160,7 +160,7 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
160 "Go to a node in the Calculator info documentation." 160 "Go to a node in the Calculator info documentation."
161 (interactive) 161 (interactive)
162 (select-window (get-largest-window)) 162 (select-window (get-largest-window))
163 (Info-goto-node (concat "(Calc)" node))) 163 (info (concat "(Calc)" node)))
164 164
165(defun calc-tutorial () 165(defun calc-tutorial ()
166 "Run the Emacs Info system on the Calculator Tutorial." 166 "Run the Emacs Info system on the Calculator Tutorial."
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 230b0f6a6c5..8d2fba7fef0 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -702,7 +702,7 @@
702 (get func 'calc-user-defn))) 702 (get func 'calc-user-defn)))
703 (kys (concat "z" (char-to-string (car def)))) 703 (kys (concat "z" (char-to-string (car def))))
704 (intcmd (symbol-name (cdr def))) 704 (intcmd (symbol-name (cdr def)))
705 (algcmd (substring (symbol-name func) 9))) 705 (algcmd (if func (substring (symbol-name func) 9) "")))
706 (if (and defn (calc-valid-formula-func func)) 706 (if (and defn (calc-valid-formula-func func))
707 (let ((niceexpr (math-format-nice-expr defn (frame-width)))) 707 (let ((niceexpr (math-format-nice-expr defn (frame-width))))
708 (calc-wrapper 708 (calc-wrapper
@@ -1446,15 +1446,22 @@ Redefine the corresponding command."
1446 (error "Unbalanced Z' in keyboard macro"))) 1446 (error "Unbalanced Z' in keyboard macro")))
1447 1447
1448 1448
1449(defun calc-kbd-report (msg) 1449;; (defun calc-kbd-report (msg)
1450 (interactive "sMessage: ") 1450;; (interactive "sMessage: ")
1451 (calc-wrapper 1451;; (calc-wrapper
1452 (math-working msg (calc-top-n 1)))) 1452;; (math-working msg (calc-top-n 1))))
1453 1453
1454(defun calc-kbd-query (msg) 1454(defun calc-kbd-query ()
1455 (interactive "sPrompt: ") 1455 (interactive)
1456 (calc-wrapper 1456 (let ((defining-kbd-macro nil)
1457 (calc-alg-entry nil (and (not (equal msg "")) msg)))) 1457 (executing-kbd-macro nil)
1458 (msg (calc-top 1)))
1459 (if (not (eq (car-safe msg) 'vec))
1460 (error "No prompt string provided")
1461 (setq msg (math-vector-to-string msg))
1462 (calc-wrapper
1463 (calc-pop-stack 1)
1464 (calc-alg-entry nil (and (not (equal msg "")) msg))))))
1458 1465
1459;;;; Logical operations. 1466;;;; Logical operations.
1460 1467
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el
index c6e8d8bbf27..0564e39ed57 100644
--- a/lisp/calc/calc-stuff.el
+++ b/lisp/calc/calc-stuff.el
@@ -171,6 +171,7 @@ With a prefix, push that prefix as a number onto the stack."
171(defvar math-max-digits-cache) ; calc-bin.el 171(defvar math-max-digits-cache) ; calc-bin.el
172(defvar math-integral-cache) ; calcalg2.el 172(defvar math-integral-cache) ; calcalg2.el
173(defvar math-units-table) ; calc-units.el 173(defvar math-units-table) ; calc-units.el
174(defvar math-decls-cache-tag) ; calc-arith.el
174(defvar math-format-date-cache) ; calc-forms.el 175(defvar math-format-date-cache) ; calc-forms.el
175(defvar math-holidays-cache-tag) ; calc-forms.el 176(defvar math-holidays-cache-tag) ; calc-forms.el
176 177
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index 84c117a1723..1544e8956c1 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -447,7 +447,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer."
447 (setq truncate-lines nil) 447 (setq truncate-lines nil)
448 (setq major-mode 'calc-edit-mode) 448 (setq major-mode 'calc-edit-mode)
449 (setq mode-name "Calc Edit") 449 (setq mode-name "Calc Edit")
450 (run-hooks 'calc-edit-mode-hook) 450 (run-mode-hooks 'calc-edit-mode-hook)
451 (make-local-variable 'calc-original-buffer) 451 (make-local-variable 'calc-original-buffer)
452 (setq calc-original-buffer oldbuf) 452 (setq calc-original-buffer oldbuf)
453 (make-local-variable 'calc-return-buffer) 453 (make-local-variable 'calc-return-buffer)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 173785dc912..3a99291fdef 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -209,7 +209,8 @@
209(defgroup calc nil 209(defgroup calc nil
210 "GNU Calc" 210 "GNU Calc"
211 :prefix "calc-" 211 :prefix "calc-"
212 :tag "Calc") 212 :tag "Calc"
213 :group 'applications)
213 214
214;;;###autoload 215;;;###autoload
215(defcustom calc-settings-file 216(defcustom calc-settings-file
@@ -324,7 +325,7 @@ This is not required to be present for user-written mode annotations."
324 :type '(choice (string) (sexp))) 325 :type '(choice (string) (sexp)))
325 326
326(defvar calc-bug-address "belanger@truman.edu" 327(defvar calc-bug-address "belanger@truman.edu"
327 "Address of the author of Calc, for use by `report-calc-bug'.") 328 "Address of the maintainer of Calc, for use by `report-calc-bug'.")
328 329
329(defvar calc-scan-for-dels t 330(defvar calc-scan-for-dels t
330 "If t, scan keymaps to find all DEL-like keys. 331 "If t, scan keymaps to find all DEL-like keys.
@@ -719,6 +720,12 @@ If nil, selections displayed but ignored.")
719(defvar calc-load-hook nil 720(defvar calc-load-hook nil
720 "Hook run when calc.el is loaded.") 721 "Hook run when calc.el is loaded.")
721 722
723(defvar calc-window-hook nil
724 "Hook called to create the Calc window.")
725
726(defvar calc-trail-window-hook nil
727 "Hook called to create the Calc trail window.")
728
722;; Verify that Calc is running on the right kind of system. 729;; Verify that Calc is running on the right kind of system.
723(defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version)))) 730(defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version))))
724 731
@@ -830,20 +837,6 @@ If nil, selections displayed but ignored.")
830(defvar var-gamma '(special-const (math-gamma-const))) 837(defvar var-gamma '(special-const (math-gamma-const)))
831(defvar var-Modes '(special-const (math-get-modes-vec))) 838(defvar var-Modes '(special-const (math-get-modes-vec)))
832 839
833(defvar calc-language-alist
834 '((latex-mode . latex)
835 (tex-mode . tex)
836 (plain-tex-mode . tex)
837 (context-mode . tex)
838 (nroff-mode . eqn)
839 (pascal-mode . pascal)
840 (c-mode . c)
841 (c++-mode . c)
842 (fortran-mode . fortran)
843 (f90-mode . fortran))
844 "Alist of major modes with appropriate Calc languages.")
845
846
847(mapcar (lambda (v) (or (boundp v) (set v nil))) 840(mapcar (lambda (v) (or (boundp v) (set v nil)))
848 calc-local-var-list) 841 calc-local-var-list)
849 842
@@ -1066,7 +1059,7 @@ If nil, selections displayed but ignored.")
1066 (use-global-map glob) 1059 (use-global-map glob)
1067 (use-local-map loc))))) 1060 (use-local-map loc)))))
1068 1061
1069 1062(defvar calc-alg-map) ; Defined in calc-ext.el
1070 1063
1071(defun calc-mode () 1064(defun calc-mode ()
1072 "Calculator major mode. 1065 "Calculator major mode.
@@ -1131,7 +1124,7 @@ Notations: 3.14e6 3.14 * 10^6
1131 (string-match "full" (nth 1 p)) 1124 (string-match "full" (nth 1 p))
1132 (setq calc-standalone-flag t)) 1125 (setq calc-standalone-flag t))
1133 (setq p (cdr p)))) 1126 (setq p (cdr p))))
1134 (run-hooks 'calc-mode-hook) 1127 (run-mode-hooks 'calc-mode-hook)
1135 (calc-refresh t) 1128 (calc-refresh t)
1136 (calc-set-mode-line) 1129 (calc-set-mode-line)
1137 (calc-check-defines)) 1130 (calc-check-defines))
@@ -1181,7 +1174,7 @@ commands given here will actually operate on the *Calculator* stack."
1181 (insert (propertize (concat "Emacs Calculator v" calc-version 1174 (insert (propertize (concat "Emacs Calculator v" calc-version
1182 " by Dave Gillespie\n") 1175 " by Dave Gillespie\n")
1183 'font-lock-face 'italic)))) 1176 'font-lock-face 'italic))))
1184 (run-hooks 'calc-trail-mode-hook)) 1177 (run-mode-hooks 'calc-trail-mode-hook))
1185 1178
1186(defun calc-create-buffer () 1179(defun calc-create-buffer ()
1187 (set-buffer (get-buffer-create "*Calculator*")) 1180 (set-buffer (get-buffer-create "*Calculator*"))
@@ -1218,18 +1211,20 @@ commands given here will actually operate on the *Calculator* stack."
1218 (switch-to-buffer (current-buffer) t) 1211 (switch-to-buffer (current-buffer) t)
1219 (if (get-buffer-window (current-buffer)) 1212 (if (get-buffer-window (current-buffer))
1220 (select-window (get-buffer-window (current-buffer))) 1213 (select-window (get-buffer-window (current-buffer)))
1221 (let ((w (get-largest-window))) 1214 (if calc-window-hook
1222 (if (and pop-up-windows 1215 (run-hooks 'calc-window-hook)
1223 (> (window-height w) 1216 (let ((w (get-largest-window)))
1224 (+ window-min-height calc-window-height 2))) 1217 (if (and pop-up-windows
1225 (progn 1218 (> (window-height w)
1226 (setq w (split-window w 1219 (+ window-min-height calc-window-height 2)))
1227 (- (window-height w) 1220 (progn
1228 calc-window-height 2) 1221 (setq w (split-window w
1229 nil)) 1222 (- (window-height w)
1230 (set-window-buffer w (current-buffer)) 1223 calc-window-height 2)
1231 (select-window w)) 1224 nil))
1232 (pop-to-buffer (current-buffer)))))) 1225 (set-window-buffer w (current-buffer))
1226 (select-window w))
1227 (pop-to-buffer (current-buffer)))))))
1233 (save-excursion 1228 (save-excursion
1234 (set-buffer (calc-trail-buffer)) 1229 (set-buffer (calc-trail-buffer))
1235 (and calc-display-trail 1230 (and calc-display-trail
@@ -1836,15 +1831,17 @@ See calc-keypad for details."
1836 (not (if flag (memq flag '(nil 0)) win))) 1831 (not (if flag (memq flag '(nil 0)) win)))
1837 (if (null win) 1832 (if (null win)
1838 (progn 1833 (progn
1839 (let ((w (split-window nil (/ (* (window-width) 2) 3) t))) 1834 (if calc-trail-window-hook
1840 (set-window-buffer w calc-trail-buffer)) 1835 (run-hooks 'calc-trail-window-hook)
1841 (calc-wrapper 1836 (let ((w (split-window nil (/ (* (window-width) 2) 3) t)))
1842 (setq overlay-arrow-string calc-trail-overlay 1837 (set-window-buffer w calc-trail-buffer)))
1843 overlay-arrow-position calc-trail-pointer) 1838 (calc-wrapper
1844 (or no-refresh 1839 (setq overlay-arrow-string calc-trail-overlay
1845 (if interactive 1840 overlay-arrow-position calc-trail-pointer)
1846 (calc-do-refresh) 1841 (or no-refresh
1847 (calc-refresh)))))) 1842 (if interactive
1843 (calc-do-refresh)
1844 (calc-refresh))))))
1848 (if win 1845 (if win
1849 (progn 1846 (progn
1850 (delete-window win) 1847 (delete-window win)
@@ -3444,7 +3441,7 @@ Also looks for the equivalent TeX words, \\gets and \\evalto."
3444 3441
3445(defun calc-user-invocation () 3442(defun calc-user-invocation ()
3446 (interactive) 3443 (interactive)
3447 (unless (stringp calc-invocation-macro) 3444 (unless calc-invocation-macro
3448 (error "Use `Z I' inside Calc to define a `M-# Z' keyboard macro")) 3445 (error "Use `Z I' inside Calc to define a `M-# Z' keyboard macro"))
3449 (execute-kbd-macro calc-invocation-macro nil)) 3446 (execute-kbd-macro calc-invocation-macro nil))
3450 3447
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el
index 7e502aa1a87..d139dcf28ba 100644
--- a/lisp/calc/calcalg2.el
+++ b/lisp/calc/calcalg2.el
@@ -202,6 +202,8 @@
202(defvar math-deriv-var) 202(defvar math-deriv-var)
203(defvar math-deriv-total) 203(defvar math-deriv-total)
204(defvar math-deriv-symb) 204(defvar math-deriv-symb)
205(defvar math-decls-cache)
206(defvar math-decls-all)
205 207
206(defun math-derivative (expr) 208(defun math-derivative (expr)
207 (cond ((equal expr math-deriv-var) 209 (cond ((equal expr math-deriv-var)
diff --git a/lisp/calculator.el b/lisp/calculator.el
index f11be4747b1..0c6ad53dbce 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Eli Barzilay <eli@barzilay.org> 5;; Author: Eli Barzilay <eli@barzilay.org>
6;; Keywords: tools, convenience 6;; Keywords: tools, convenience
7;; Time-stamp: <2002-07-13 01:14:35 eli> 7;; Time-stamp: <26 May 2005, 14:32:34, Lute Kamstra, pijl>
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
10 10
@@ -680,7 +680,7 @@ more information.
680 (setq major-mode 'calculator-mode) 680 (setq major-mode 'calculator-mode)
681 (setq mode-name "Calculator") 681 (setq mode-name "Calculator")
682 (use-local-map calculator-mode-map) 682 (use-local-map calculator-mode-map)
683 (run-hooks 'calculator-mode-hook)) 683 (run-mode-hooks 'calculator-mode-hook))
684 684
685(eval-when-compile (require 'electric) (require 'ehelp)) 685(eval-when-compile (require 'electric) (require 'ehelp))
686 686
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 45754110319..fdf565c7923 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -2335,6 +2335,7 @@ movement commands will not work correctly."
2335 (propertize (substitute-command-keys 2335 (propertize (substitute-command-keys
2336 "\\<calendar-mode-map>\\[scroll-calendar-left]") 2336 "\\<calendar-mode-map>\\[scroll-calendar-left]")
2337 'help-echo "mouse-2: scroll left" 2337 'help-echo "mouse-2: scroll left"
2338 'mouse-face 'mode-line-highlight
2338 'keymap (make-mode-line-mouse-map 'mouse-2 2339 'keymap (make-mode-line-mouse-map 'mouse-2
2339 'mouse-scroll-calendar-left)) 2340 'mouse-scroll-calendar-left))
2340 "Calendar" 2341 "Calendar"
@@ -2343,12 +2344,14 @@ movement commands will not work correctly."
2343 (substitute-command-keys 2344 (substitute-command-keys
2344 "\\<calendar-mode-map>\\[calendar-goto-info-node] info") 2345 "\\<calendar-mode-map>\\[calendar-goto-info-node] info")
2345 'help-echo "mouse-2: read Info on Calendar" 2346 'help-echo "mouse-2: read Info on Calendar"
2347 'mouse-face 'mode-line-highlight
2346 'keymap (make-mode-line-mouse-map 'mouse-2 'calendar-goto-info-node)) 2348 'keymap (make-mode-line-mouse-map 'mouse-2 'calendar-goto-info-node))
2347 "/" 2349 "/"
2348 (propertize 2350 (propertize
2349 (substitute-command-keys 2351 (substitute-command-keys
2350 "\\<calendar-mode-map>\\[calendar-other-month] other") 2352 "\\<calendar-mode-map>\\[calendar-other-month] other")
2351 'help-echo "mouse-2: choose another month" 2353 'help-echo "mouse-2: choose another month"
2354 'mouse-face 'mode-line-highlight
2352 'keymap (make-mode-line-mouse-map 2355 'keymap (make-mode-line-mouse-map
2353 'mouse-2 'mouse-calendar-other-month)) 2356 'mouse-2 'mouse-calendar-other-month))
2354 "/" 2357 "/"
@@ -2356,11 +2359,13 @@ movement commands will not work correctly."
2356 (substitute-command-keys 2359 (substitute-command-keys
2357 "\\<calendar-mode-map>\\[calendar-goto-today] today") 2360 "\\<calendar-mode-map>\\[calendar-goto-today] today")
2358 'help-echo "mouse-2: go to today's date" 2361 'help-echo "mouse-2: go to today's date"
2362 'mouse-face 'mode-line-highlight
2359 'keymap (make-mode-line-mouse-map 'mouse-2 #'calendar-goto-today))) 2363 'keymap (make-mode-line-mouse-map 'mouse-2 #'calendar-goto-today)))
2360 '(calendar-date-string (calendar-current-date) t) 2364 '(calendar-date-string (calendar-current-date) t)
2361 (propertize (substitute-command-keys 2365 (propertize (substitute-command-keys
2362 "\\<calendar-mode-map>\\[scroll-calendar-right]") 2366 "\\<calendar-mode-map>\\[scroll-calendar-right]")
2363 'help-echo "mouse-2: scroll right" 2367 'help-echo "mouse-2: scroll right"
2368 'mouse-face 'mode-line-highlight
2364 'keymap (make-mode-line-mouse-map 2369 'keymap (make-mode-line-mouse-map
2365 'mouse-2 'mouse-scroll-calendar-right))) 2370 'mouse-2 'mouse-scroll-calendar-right)))
2366 "The mode line of the calendar buffer. 2371 "The mode line of the calendar buffer.
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 312b8841cf9..6aec579c107 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1050,15 +1050,16 @@ changing the variable `diary-include-string'."
1050 (regexp-quote diary-include-string) 1050 (regexp-quote diary-include-string)
1051 " \"\\([^\"]*\\)\"") 1051 " \"\\([^\"]*\\)\"")
1052 nil t) 1052 nil t)
1053 (let ((diary-file (substitute-in-file-name 1053 (let* ((diary-file (substitute-in-file-name
1054 (buffer-substring-no-properties 1054 (match-string-no-properties 2)))
1055 (match-beginning 2) (match-end 2)))) 1055 (mark-diary-entries-hook 'mark-included-diary-files)
1056 (mark-diary-entries-hook 'mark-included-diary-files)) 1056 (dbuff (find-buffer-visiting diary-file)))
1057 (if (file-exists-p diary-file) 1057 (if (file-exists-p diary-file)
1058 (if (file-readable-p diary-file) 1058 (if (file-readable-p diary-file)
1059 (progn 1059 (progn
1060 (mark-diary-entries) 1060 (mark-diary-entries)
1061 (kill-buffer (find-buffer-visiting diary-file))) 1061 (unless dbuff
1062 (kill-buffer (find-buffer-visiting diary-file))))
1062 (beep) 1063 (beep)
1063 (message "Can't read included diary file %s" diary-file) 1064 (message "Can't read included diary file %s" diary-file)
1064 (sleep-for 2)) 1065 (sleep-for 2))
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index f37b966a45a..d15a4b78e2f 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -165,7 +165,6 @@ replaced by the organizer."
165;; all the other libs we need 165;; all the other libs we need
166;; ====================================================================== 166;; ======================================================================
167(require 'calendar) 167(require 'calendar)
168(require 'appt)
169 168
170;; ====================================================================== 169;; ======================================================================
171;; misc 170;; misc
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 0caedee7c8a..132f42369c6 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -904,11 +904,12 @@ Number of entries for each category is given by `todo-print-priorities'."
904 904
905\\{todo-mode-map}" 905\\{todo-mode-map}"
906 (interactive) 906 (interactive)
907 (kill-all-local-variables)
907 (setq major-mode 'todo-mode) 908 (setq major-mode 'todo-mode)
908 (setq mode-name "TODO") 909 (setq mode-name "TODO")
909 (use-local-map todo-mode-map) 910 (use-local-map todo-mode-map)
910 (easy-menu-add todo-menu) 911 (easy-menu-add todo-menu)
911 (run-hooks 'todo-mode-hook)) 912 (run-mode-hooks 'todo-mode-hook))
912 913
913(eval-when-compile 914(eval-when-compile
914 (defvar date) 915 (defvar date)
diff --git a/lisp/chistory.el b/lisp/chistory.el
index dde30c75e0e..ddbc0863a0e 100644
--- a/lisp/chistory.el
+++ b/lisp/chistory.el
@@ -145,7 +145,7 @@ Keybindings:
145 (setq major-mode 'command-history-mode) 145 (setq major-mode 'command-history-mode)
146 (setq mode-name "Command History") 146 (setq mode-name "Command History")
147 (use-local-map command-history-map) 147 (use-local-map command-history-map)
148 (run-hooks 'command-history-mode-hook)) 148 (run-mode-hooks 'command-history-mode-hook))
149 149
150(defun Command-history-setup () 150(defun Command-history-setup ()
151 (kill-all-local-variables) 151 (kill-all-local-variables)
diff --git a/lisp/comint.el b/lisp/comint.el
index fbb5810de16..37550b7b6d9 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3437,7 +3437,7 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
3437;; (make-local-variable 'shell-directory-stack) 3437;; (make-local-variable 'shell-directory-stack)
3438;; (setq shell-directory-stack nil) 3438;; (setq shell-directory-stack nil)
3439;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker) 3439;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker)
3440;; (run-hooks 'shell-mode-hook)) 3440;; (run-mode-hooks 'shell-mode-hook))
3441;; 3441;;
3442;; 3442;;
3443;; Completion for comint-mode users 3443;; Completion for comint-mode users
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 50c9accb9ce..82a5e887bed 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4276,7 +4276,7 @@ if that value is non-nil."
4276 (set (make-local-variable 'widget-link-prefix) "") 4276 (set (make-local-variable 'widget-link-prefix) "")
4277 (set (make-local-variable 'widget-link-suffix) "")) 4277 (set (make-local-variable 'widget-link-suffix) ""))
4278 (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t) 4278 (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
4279 (run-hooks 'custom-mode-hook)) 4279 (run-mode-hooks 'custom-mode-hook))
4280 4280
4281(put 'custom-mode 'mode-class 'special) 4281(put 'custom-mode 'mode-class 'special)
4282 4282
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index d8ef9be6f81..03c12a8f7ba 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -61,7 +61,7 @@ if that value is non-nil."
61 (use-local-map describe-text-mode-map) 61 (use-local-map describe-text-mode-map)
62 (widget-setup) 62 (widget-setup)
63 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) 63 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
64 (run-hooks 'describe-text-mode-hook)) 64 (run-mode-hooks 'describe-text-mode-hook))
65 65
66;;; Describe-Text Utilities. 66;;; Describe-Text Utilities.
67 67
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el
index bfac2afe6e9..ec230bc8a62 100644
--- a/lisp/ebuff-menu.el
+++ b/lisp/ebuff-menu.el
@@ -162,7 +162,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of
162 (setq major-mode 'Electric-buffer-menu-mode) 162 (setq major-mode 'Electric-buffer-menu-mode)
163 (goto-char (point-min)) 163 (goto-char (point-min))
164 (if (search-forward "\n." nil t) (forward-char -1)) 164 (if (search-forward "\n." nil t) (forward-char -1))
165 (run-hooks 'electric-buffer-menu-mode-hook)) 165 (run-mode-hooks 'electric-buffer-menu-mode-hook))
166 166
167;; generally the same as Buffer-menu-mode-map 167;; generally the same as Buffer-menu-mode-map
168;; (except we don't indirect to global-map) 168;; (except we don't indirect to global-map)
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el
index 4c13e6fc0e1..ec496301405 100644
--- a/lisp/ediff-diff.el
+++ b/lisp/ediff-diff.el
@@ -1353,7 +1353,7 @@ Symlinks and the likes are not handled.
1353If FILTER-RE is non-nil, recursive checking in directories 1353If FILTER-RE is non-nil, recursive checking in directories
1354affects only files whose names match the expression." 1354affects only files whose names match the expression."
1355 ;; Normalize empty filter RE to nil. 1355 ;; Normalize empty filter RE to nil.
1356 (unless (length filter-re) (setq filter-re nil)) 1356 (unless (> (length filter-re) 0) (setq filter-re nil))
1357 ;; Indicate progress 1357 ;; Indicate progress
1358 (message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re) 1358 (message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re)
1359 (cond 1359 (cond
@@ -1367,27 +1367,11 @@ affects only files whose names match the expression."
1367 (if (eq ediff-recurse-to-subdirectories 'yes) 1367 (if (eq ediff-recurse-to-subdirectories 'yes)
1368 (let* ((all-entries-1 (directory-files d1 t filter-re)) 1368 (let* ((all-entries-1 (directory-files d1 t filter-re))
1369 (all-entries-2 (directory-files d2 t filter-re)) 1369 (all-entries-2 (directory-files d2 t filter-re))
1370 (entries-1 (remove-if (lambda (s) 1370 (entries-1 (ediff-delete-all-matches "^\\.\\.?$" all-entries-1))
1371 (string-match "^\\.\\.?$" 1371 (entries-2 (ediff-delete-all-matches "^\\.\\.?$" all-entries-2))
1372 (file-name-nondirectory s)))
1373 all-entries-1))
1374 (entries-2 (remove-if (lambda (s)
1375 (string-match "^\\.\\.?$"
1376 (file-name-nondirectory s)))
1377 all-entries-2))
1378 ) 1372 )
1379 ;; First, check only the names (works quickly and ensures a 1373
1380 ;; precondition for subsequent code) 1374 (ediff-same-file-contents-lists entries-1 entries-2 filter-re)
1381 (if (and (= (length entries-1) (length entries-2))
1382 (every (lambda (a b) (equal (file-name-nondirectory a)
1383 (file-name-nondirectory b)))
1384 entries-1 entries-2))
1385 ;; With name equality established, compare the entries
1386 ;; through recursion.
1387 (every (lambda (a b)
1388 (ediff-same-contents a b filter-re))
1389 entries-1 entries-2)
1390 )
1391 )) 1375 ))
1392 ) ; end of the directories case 1376 ) ; end of the directories case
1393 ;; D1 & D2 are both files => compare directly 1377 ;; D1 & D2 are both files => compare directly
@@ -1398,6 +1382,42 @@ affects only files whose names match the expression."
1398 ) 1382 )
1399 ) 1383 )
1400 1384
1385;; If lists have the same length and names of files are pairwise equal
1386;; (removing the directories) then compare contents pairwise.
1387;; True if all contents are the same; false otherwise
1388(defun ediff-same-file-contents-lists (entries-1 entries-2 filter-re)
1389 ;; First, check only the names (works quickly and ensures a
1390 ;; precondition for subsequent code)
1391 (if (and (= (length entries-1) (length entries-2))
1392 (equal (mapcar 'file-name-nondirectory entries-1)
1393 (mapcar 'file-name-nondirectory entries-2)))
1394 ;; With name equality established, compare the entries
1395 ;; through recursion.
1396 (let ((continue t))
1397 (while (and entries-1 continue)
1398 (if (ediff-same-contents
1399 (car entries-1) (car entries-2) filter-re)
1400 (setq entries-1 (cdr entries-1)
1401 entries-2 (cdr entries-2))
1402 (setq continue nil))
1403 )
1404 ;; if reached the end then lists are equal
1405 (null entries-1))
1406 )
1407 )
1408
1409
1410;; ARG1 is a regexp, ARG2 is a list of full-filenames
1411;; Delete all entries that match the regexp
1412(defun ediff-delete-all-matches (regex file-list-list)
1413 (let (result elt)
1414 (while file-list-list
1415 (setq elt (car file-list-list))
1416 (or (string-match regex (file-name-nondirectory elt))
1417 (setq result (cons elt result)))
1418 (setq file-list-list (cdr file-list-list)))
1419 (reverse result)))
1420
1401 1421
1402;;; Local Variables: 1422;;; Local Variables:
1403;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) 1423;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
diff --git a/lisp/ediff-help.el b/lisp/ediff-help.el
index bdd92f5c12d..69d170faedf 100644
--- a/lisp/ediff-help.el
+++ b/lisp/ediff-help.el
@@ -132,7 +132,7 @@ Normally, not a user option. See `ediff-help-message' for details.")
132 "Normally, not a user option. See `ediff-help-message' for details.") 132 "Normally, not a user option. See `ediff-help-message' for details.")
133 133
134(defconst ediff-brief-message-string 134(defconst ediff-brief-message-string
135 " ? -quick help " 135 " Type ? for help"
136 "Contents of the brief help message.") 136 "Contents of the brief help message.")
137;; The actual brief help message 137;; The actual brief help message
138(ediff-defvar-local ediff-brief-help-message "" 138(ediff-defvar-local ediff-brief-help-message ""
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el
index 41a7699cfdc..88ab31fe56a 100644
--- a/lisp/ediff-mult.el
+++ b/lisp/ediff-mult.el
@@ -560,17 +560,23 @@ behavior."
560 (ediff-add-slash-if-directory auxdir1 elt)) 560 (ediff-add-slash-if-directory auxdir1 elt))
561 lis1) 561 lis1)
562 auxdir2 (file-name-as-directory dir2) 562 auxdir2 (file-name-as-directory dir2)
563 lis2 (directory-files auxdir2 nil regexp)
564 lis2 (delete "." lis2)
565 lis2 (delete ".." lis2)
563 lis2 (mapcar 566 lis2 (mapcar
564 (lambda (elt) 567 (lambda (elt)
565 (ediff-add-slash-if-directory auxdir2 elt)) 568 (ediff-add-slash-if-directory auxdir2 elt))
566 (directory-files auxdir2 nil regexp))) 569 lis2))
567 570
568 (if (stringp dir3) 571 (if (stringp dir3)
569 (setq auxdir3 (file-name-as-directory dir3) 572 (setq auxdir3 (file-name-as-directory dir3)
573 lis3 (directory-files auxdir3 nil regexp)
574 lis3 (delete "." lis3)
575 lis3 (delete ".." lis3)
570 lis3 (mapcar 576 lis3 (mapcar
571 (lambda (elt) 577 (lambda (elt)
572 (ediff-add-slash-if-directory auxdir3 elt)) 578 (ediff-add-slash-if-directory auxdir3 elt))
573 (directory-files auxdir3 nil regexp)))) 579 lis3)))
574 580
575 (if (ediff-nonempty-string-p merge-autostore-dir) 581 (if (ediff-nonempty-string-p merge-autostore-dir)
576 (setq merge-autostore-dir 582 (setq merge-autostore-dir
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index 79f85cc1896..b952c2fb2bf 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -1,6 +1,7 @@
1;;; ediff-util.el --- the core commands and utilities of ediff 1;;; ediff-util.el --- the core commands and utilities of ediff
2 2
3;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4;; 2004 Free Software Foundation, Inc.
4 5
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 6;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 7
diff --git a/lisp/ediff.el b/lisp/ediff.el
index 2a2b481ec59..00a7e2f512a 100644
--- a/lisp/ediff.el
+++ b/lisp/ediff.el
@@ -7,7 +7,7 @@
7;; Keywords: comparing, merging, patching, tools, unix 7;; Keywords: comparing, merging, patching, tools, unix
8 8
9(defconst ediff-version "2.80" "The current version of Ediff") 9(defconst ediff-version "2.80" "The current version of Ediff")
10(defconst ediff-date "February 19, 2005" "Date of last update") 10(defconst ediff-date "June 3, 2005" "Date of last update")
11 11
12 12
13;; This file is part of GNU Emacs. 13;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index aab4efab9f8..16ade261344 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1248,15 +1248,15 @@ extra args."
1248(defun byte-compile-nogroup-warn (form) 1248(defun byte-compile-nogroup-warn (form)
1249 (let ((keyword-args (cdr (cdr (cdr (cdr form))))) 1249 (let ((keyword-args (cdr (cdr (cdr (cdr form)))))
1250 (name (cadr form))) 1250 (name (cadr form)))
1251 (unless (plist-get keyword-args :group) 1251 (or (plist-get keyword-args :group)
1252 (byte-compile-warn 1252 (not (and (consp name) (eq (car name) 'quote)))
1253 "%s for `%s' fails to specify containing group" 1253 (byte-compile-warn
1254 (cdr (assq (car form) 1254 "%s for `%s' fails to specify containing group"
1255 '((custom-declare-group . defgroup) 1255 (cdr (assq (car form)
1256 (custom-declare-face . defface) 1256 '((custom-declare-group . defgroup)
1257 (custom-declare-variable . defcustom)))) 1257 (custom-declare-face . defface)
1258 (if (and (consp name) (eq (car name) 'quote)) 1258 (custom-declare-variable . defcustom))))
1259 (cadr name) name))))) 1259 (cadr name)))))
1260 1260
1261;; Warn if the function or macro is being redefined with a different 1261;; Warn if the function or macro is being redefined with a different
1262;; number of arguments. 1262;; number of arguments.
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 1be2f9171a6..c47c306e014 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1565,14 +1565,21 @@ form. See `defsetf' for a simpler way to define most setf-methods.
1565This macro is an easy-to-use substitute for `define-setf-method' that works 1565This macro is an easy-to-use substitute for `define-setf-method' that works
1566well for simple place forms. In the simple `defsetf' form, `setf's of 1566well for simple place forms. In the simple `defsetf' form, `setf's of
1567the form (setf (NAME ARGS...) VAL) are transformed to function or macro 1567the form (setf (NAME ARGS...) VAL) are transformed to function or macro
1568calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). 1568calls of the form (FUNC ARGS... VAL). Example:
1569
1570 (defsetf aref aset)
1571
1569Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). 1572Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
1570Here, the above `setf' call is expanded by binding the argument forms ARGS 1573Here, the above `setf' call is expanded by binding the argument forms ARGS
1571according to ARGLIST, binding the value form VAL to STORE, then executing 1574according to ARGLIST, binding the value form VAL to STORE, then executing
1572BODY, which must return a Lisp form that does the necessary `setf' operation. 1575BODY, which must return a Lisp form that does the necessary `setf' operation.
1573Actually, ARGLIST and STORE may be bound to temporary variables which are 1576Actually, ARGLIST and STORE may be bound to temporary variables which are
1574introduced automatically to preserve proper execution order of the arguments. 1577introduced automatically to preserve proper execution order of the arguments.
1575Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." 1578Example:
1579
1580 (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))
1581
1582\(fn NAME [FUNC | ARGLIST (STORE) BODY...])"
1576 (if (listp arg1) 1583 (if (listp arg1)
1577 (let* ((largs nil) (largsr nil) 1584 (let* ((largs nil) (largsr nil)
1578 (temps nil) (tempsr nil) 1585 (temps nil) (tempsr nil)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 188dc172e07..bb0fa666217 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -271,14 +271,26 @@ With zero or negative ARG turn mode off.
271TURN-ON is a function that will be called with no args in every buffer 271TURN-ON is a function that will be called with no args in every buffer
272 and that should try to turn MODE on if applicable for that buffer. 272 and that should try to turn MODE on if applicable for that buffer.
273KEYS is a list of CL-style keyword arguments: 273KEYS is a list of CL-style keyword arguments:
274:group to specify the custom group." 274:group to specify the custom group.
275
276If MODE's set-up depends on the major mode in effect when it was
277enabled, then disabling and reenabling MODE should make MODE work
278correctly with the current major mode. This is important to
279prevent problems with derived modes, that is, major modes that
280call another major mode in their body."
281
275 (let* ((global-mode-name (symbol-name global-mode)) 282 (let* ((global-mode-name (symbol-name global-mode))
276 (pretty-name (easy-mmode-pretty-mode-name mode)) 283 (pretty-name (easy-mmode-pretty-mode-name mode))
277 (pretty-global-name (easy-mmode-pretty-mode-name global-mode)) 284 (pretty-global-name (easy-mmode-pretty-mode-name global-mode))
278 (group nil) 285 (group nil)
279 (extra-args nil) 286 (extra-args nil)
280 (buffers (intern (concat global-mode-name "-buffers"))) 287 (MODE-buffers (intern (concat global-mode-name "-buffers")))
281 (cmmh (intern (concat global-mode-name "-cmmh")))) 288 (MODE-enable-in-buffers
289 (intern (concat global-mode-name "-enable-in-buffers")))
290 (MODE-check-buffers
291 (intern (concat global-mode-name "-check-buffers")))
292 (MODE-cmhh (intern (concat global-mode-name "-cmhh")))
293 (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode"))))
282 294
283 ;; Check keys. 295 ;; Check keys.
284 (while (keywordp (car keys)) 296 (while (keywordp (car keys))
@@ -294,6 +306,8 @@ KEYS is a list of CL-style keyword arguments:
294 "-mode\\'" "" (symbol-name mode)))))) 306 "-mode\\'" "" (symbol-name mode))))))
295 307
296 `(progn 308 `(progn
309 (defvar ,MODE-major-mode nil)
310 (make-variable-buffer-local ',MODE-major-mode)
297 ;; The actual global minor-mode 311 ;; The actual global minor-mode
298 (define-minor-mode ,global-mode 312 (define-minor-mode ,global-mode
299 ,(format "Toggle %s in every buffer. 313 ,(format "Toggle %s in every buffer.
@@ -306,10 +320,13 @@ in which `%s' turns it on."
306 ;; Setup hook to handle future mode changes and new buffers. 320 ;; Setup hook to handle future mode changes and new buffers.
307 (if ,global-mode 321 (if ,global-mode
308 (progn 322 (progn
309 (add-hook 'after-change-major-mode-hook ',buffers) 323 (add-hook 'after-change-major-mode-hook
310 (add-hook 'change-major-mode-hook ',cmmh)) 324 ',MODE-enable-in-buffers)
311 (remove-hook 'after-change-major-mode-hook ',buffers) 325 (add-hook 'find-file-hook ',MODE-check-buffers)
312 (remove-hook 'change-major-mode-hook ',cmmh)) 326 (add-hook 'change-major-mode-hook ',MODE-cmhh))
327 (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers)
328 (remove-hook 'find-file-hook ',MODE-check-buffers)
329 (remove-hook 'change-major-mode-hook ',MODE-cmhh))
313 330
314 ;; Go through existing buffers. 331 ;; Go through existing buffers.
315 (dolist (buf (buffer-list)) 332 (dolist (buf (buffer-list))
@@ -321,22 +338,33 @@ in which `%s' turns it on."
321 :autoload-end 338 :autoload-end
322 339
323 ;; List of buffers left to process. 340 ;; List of buffers left to process.
324 (defvar ,buffers nil) 341 (defvar ,MODE-buffers nil)
325 342
326 ;; The function that calls TURN-ON in each buffer. 343 ;; The function that calls TURN-ON in each buffer.
327 (defun ,buffers () 344 (defun ,MODE-enable-in-buffers ()
328 (remove-hook 'post-command-hook ',buffers) 345 (dolist (buf ,MODE-buffers)
329 (while ,buffers 346 (when (buffer-live-p buf)
330 (let ((buf (pop ,buffers))) 347 (with-current-buffer buf
331 (when (buffer-live-p buf) 348 (if ,mode
332 (with-current-buffer buf (,turn-on)))))) 349 (unless (eq ,MODE-major-mode major-mode)
333 (put ',buffers 'definition-name ',global-mode) 350 (,mode -1)
351 (,turn-on)
352 (setq ,MODE-major-mode major-mode))
353 (,turn-on)
354 (setq ,MODE-major-mode major-mode))))))
355 (put ',MODE-enable-in-buffers 'definition-name ',global-mode)
356
357 (defun ,MODE-check-buffers ()
358 (,MODE-enable-in-buffers)
359 (setq ,MODE-buffers nil)
360 (remove-hook 'post-command-hook ',MODE-check-buffers))
361 (put ',MODE-check-buffers 'definition-name ',global-mode)
334 362
335 ;; The function that catches kill-all-local-variables. 363 ;; The function that catches kill-all-local-variables.
336 (defun ,cmmh () 364 (defun ,MODE-cmhh ()
337 (add-to-list ',buffers (current-buffer)) 365 (add-to-list ',MODE-buffers (current-buffer))
338 (add-hook 'post-command-hook ',buffers)) 366 (add-hook 'post-command-hook ',MODE-check-buffers))
339 (put ',cmmh 'definition-name ',global-mode)))) 367 (put ',MODE-cmhh 'definition-name ',global-mode))))
340 368
341;;; 369;;;
342;;; easy-mmode-defmap 370;;; easy-mmode-defmap
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index b3160c9b752..982570fb348 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -1,6 +1,7 @@
1;;; easymenu.el --- support the easymenu interface for defining a menu 1;;; easymenu.el --- support the easymenu interface for defining a menu
2 2
3;; Copyright (C) 1994,96,98,1999,2000,2004 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 1996, 1998, 1999, 2000, 2004, 2005
4;; Free Software Foundation, Inc.
4 5
5;; Keywords: emulations 6;; Keywords: emulations
6;; Author: Richard Stallman <rms@gnu.org> 7;; Author: Richard Stallman <rms@gnu.org>
@@ -534,7 +535,7 @@ earlier by `easy-menu-define' or `easy-menu-create-menu'."
534 (easy-menu-do-add-item map item before))) 535 (easy-menu-do-add-item map item before)))
535 536
536(defun easy-menu-item-present-p (map path name) 537(defun easy-menu-item-present-p (map path name)
537 "In submenu of MAP with path PATH, return true iff item NAME is present. 538 "In submenu of MAP with path PATH, return non-nil iff item NAME is present.
538MAP and PATH are defined as in `easy-menu-add-item'. 539MAP and PATH are defined as in `easy-menu-add-item'.
539NAME should be a string, the name of the element to be looked for." 540NAME should be a string, the name of the element to be looked for."
540 (easy-menu-return-item (easy-menu-get-map map path) name)) 541 (easy-menu-return-item (easy-menu-get-map map path) name))
@@ -552,7 +553,14 @@ NAME should be a string, the name of the element to be removed."
552 "In menu MENU try to look for menu item with name NAME. 553 "In menu MENU try to look for menu item with name NAME.
553If a menu item is found, return (NAME . item), otherwise return nil. 554If a menu item is found, return (NAME . item), otherwise return nil.
554If item is an old format item, a new format item is returned." 555If item is an old format item, a new format item is returned."
555 (let ((item (lookup-key menu (vector (easy-menu-intern name)))) 556 ;; The call to `lookup-key' also calls the C function `get_keyelt' which
557 ;; looks inside a menu-item to only return the actual command. This is
558 ;; not what we want here. We should either add an arg to lookup-key to be
559 ;; able to turn off this "feature", or else we could use map-keymap here.
560 ;; In the mean time, I just use `assq' which is an OK approximation since
561 ;; menus are rarely built from vectors or char-tables.
562 (let ((item (or (cdr (assq name menu))
563 (lookup-key menu (vector (easy-menu-intern name)))))
556 ret enable cache label) 564 ret enable cache label)
557 (cond 565 (cond
558 ((stringp (car-safe item)) 566 ((stringp (car-safe item))
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index eab957e5671..9a0a1606953 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -246,8 +246,6 @@ searched for in `find-function-source-path' if non nil, otherwise
246in `load-path'." 246in `load-path'."
247 (if (not function) 247 (if (not function)
248 (error "You didn't specify a function")) 248 (error "You didn't specify a function"))
249 (and (subrp (symbol-function function))
250 (error "%s is a primitive function" function))
251 (let ((def (symbol-function function)) 249 (let ((def (symbol-function function))
252 aliases) 250 aliases)
253 (while (symbolp def) 251 (while (symbolp def)
@@ -265,6 +263,8 @@ in `load-path'."
265 (let ((library 263 (let ((library
266 (cond ((eq (car-safe def) 'autoload) 264 (cond ((eq (car-safe def) 'autoload)
267 (nth 1 def)) 265 (nth 1 def))
266 ((subrp def)
267 (help-C-file-name def 'subr))
268 ((symbol-file function 'defun))))) 268 ((symbol-file function 'defun)))))
269 (find-function-search-for-symbol function nil library)))) 269 (find-function-search-for-symbol function nil library))))
270 270
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index a2aed39d00a..8a53c202ed8 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -254,7 +254,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
254 mode-name "RE Builder") 254 mode-name "RE Builder")
255 (use-local-map reb-mode-map) 255 (use-local-map reb-mode-map)
256 (reb-mode-common) 256 (reb-mode-common)
257 (run-hooks 'reb-mode-hook)) 257 (run-mode-hooks 'reb-mode-hook))
258 258
259(define-derived-mode reb-lisp-mode 259(define-derived-mode reb-lisp-mode
260 emacs-lisp-mode "RE Builder Lisp" 260 emacs-lisp-mode "RE Builder Lisp"
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el
index 68a760e2011..db2daf09093 100644
--- a/lisp/emulation/tpu-mapper.el
+++ b/lisp/emulation/tpu-mapper.el
@@ -375,7 +375,7 @@
375;;; 375;;;
376;;; Load the newly defined keys and clean up 376;;; Load the newly defined keys and clean up
377;;; 377;;;
378(eval-current-buffer) 378(eval-buffer)
379(kill-buffer (current-buffer)) 379(kill-buffer (current-buffer))
380(kill-buffer "*scratch*") 380(kill-buffer "*scratch*")
381(kill-buffer "Gold-Keys") 381(kill-buffer "Gold-Keys")
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el
index 70a52617431..cd0092e5e87 100644
--- a/lisp/emulation/vi.el
+++ b/lisp/emulation/vi.el
@@ -403,7 +403,7 @@ form that is ready to be `apply'ed.")
403 (make-local-variable 'vi-mode-old-mode-name) 403 (make-local-variable 'vi-mode-old-mode-name)
404 (make-local-variable 'vi-mode-old-major-mode) 404 (make-local-variable 'vi-mode-old-major-mode)
405 (make-local-variable 'vi-mode-old-case-fold) 405 (make-local-variable 'vi-mode-old-case-fold)
406 (run-hooks 'vi-mode-hook)) 406 (run-mode-hooks 'vi-mode-hook))
407 407
408;;;###autoload 408;;;###autoload
409(defun vi-mode () 409(defun vi-mode ()
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index a74ca05b3df..f14f67d94c8 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -50,16 +50,25 @@
50 50
51;;; Variables 51;;; Variables
52 52
53(defvar viper-toggle-key "\C-z" 53(defcustom viper-toggle-key "\C-z"
54 "The key used to change states from emacs to Vi and back. 54 "The key used to change states from emacs to Vi and back.
55In insert mode, this key also functions as Meta. 55In insert mode, this key also functions as Meta.
56Must be set in .viper file or prior to loading Viper. 56Must be set in .viper file or prior to loading Viper.
57This setting cannot be changed interactively.") 57This setting cannot be changed interactively."
58 :type 'string
59 :group 'viper)
60
61(defcustom viper-quoted-insert-key "\C-v"
62 "The key used to quote special characters when inserting them in Insert state."
63 :type 'string
64 :group 'viper)
58 65
59(defvar viper-ESC-key "\e" 66(defcustom viper-ESC-key "\e"
60 "Key used to ESC. 67 "Key used to ESC.
61Must be set in .viper file or prior to loading Viper. 68Must be set in .viper file or prior to loading Viper.
62This setting cannot be changed interactively.") 69This setting cannot be changed interactively."
70 :type 'string
71 :group 'viper)
63 72
64;;; Emacs keys in other states. 73;;; Emacs keys in other states.
65 74
@@ -242,7 +251,7 @@ viper-insert-basic-map. Not recommended, except for novice users.")
242(define-key viper-insert-basic-map "\C-t" 'viper-forward-indent) 251(define-key viper-insert-basic-map "\C-t" 'viper-forward-indent)
243(define-key viper-insert-basic-map 252(define-key viper-insert-basic-map
244 (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab) 253 (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab)
245(define-key viper-insert-basic-map "\C-v" 'quoted-insert) 254(define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert)
246(define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert) 255(define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert)
247(define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert) 256(define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert)
248(define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key) 257(define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key)
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index e3582f2165a..3fdbccc2957 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -990,12 +990,13 @@ remains buffer-local."
990 (setq global-mode-string 990 (setq global-mode-string
991 (append '("" viper-mode-string) (cdr global-mode-string)))) 991 (append '("" viper-mode-string) (cdr global-mode-string))))
992 992
993 (defadvice describe-key (before viper-read-keyseq-ad protect activate) 993 (defadvice describe-key (before viper-describe-key-ad protect activate)
994 "Force to read key via `viper-read-key-sequence'." 994 "Force to read key via `viper-read-key-sequence'."
995 (interactive (list (viper-read-key-sequence "Describe key: ")))) 995 (interactive (list (viper-read-key-sequence "Describe key: "))
996 ))
996 997
997 (defadvice describe-key-briefly 998 (defadvice describe-key-briefly
998 (before viper-read-keyseq-ad protect activate) 999 (before viper-describe-key-briefly-ad protect activate)
999 "Force to read key via `viper-read-key-sequence'." 1000 "Force to read key via `viper-read-key-sequence'."
1000 (interactive (list (viper-read-key-sequence "Describe key briefly: ")))) 1001 (interactive (list (viper-read-key-sequence "Describe key briefly: "))))
1001 1002
diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el
index 54be36299c5..482753f111e 100644
--- a/lisp/emulation/ws-mode.el
+++ b/lisp/emulation/ws-mode.el
@@ -294,7 +294,7 @@ The key bindings are:
294 (use-local-map wordstar-mode-map) 294 (use-local-map wordstar-mode-map)
295 (setq mode-name "WordStar") 295 (setq mode-name "WordStar")
296 (setq major-mode 'wordstar-mode) 296 (setq major-mode 'wordstar-mode)
297 (run-hooks 'wordstar-mode-hook)) 297 (run-mode-hooks 'wordstar-mode-hook))
298 298
299 299
300(defun wordstar-center-paragraph () 300(defun wordstar-center-paragraph ()
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index 695a9fb4ed8..2b4dbc76ddc 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -136,8 +136,7 @@ to writing a completion function."
136 :type (get 'pcomplete-file-ignore 'custom-type) 136 :type (get 'pcomplete-file-ignore 'custom-type)
137 :group 'eshell-cmpl) 137 :group 'eshell-cmpl)
138 138
139(defcustom eshell-cmpl-dir-ignore 139(defcustom eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\)/\\'"
140 (format "\\`\\(\\.\\.?\\|CVS\\)%c\\'" directory-sep-char)
141 (documentation-property 'pcomplete-dir-ignore 140 (documentation-property 'pcomplete-dir-ignore
142 'variable-documentation) 141 'variable-documentation)
143 :type (get 'pcomplete-dir-ignore 'custom-type) 142 :type (get 'pcomplete-dir-ignore 'custom-type)
@@ -155,7 +154,7 @@ to writing a completion function."
155 :type (get 'pcomplete-autolist 'custom-type) 154 :type (get 'pcomplete-autolist 'custom-type)
156 :group 'eshell-cmpl) 155 :group 'eshell-cmpl)
157 156
158(defcustom eshell-cmpl-suffix-list (list directory-sep-char ?:) 157(defcustom eshell-cmpl-suffix-list (list ?/ ?:)
159 (documentation-property 'pcomplete-suffix-list 158 (documentation-property 'pcomplete-suffix-list
160 'variable-documentation) 159 'variable-documentation)
161 :type (get 'pcomplete-suffix-list 'custom-type) 160 :type (get 'pcomplete-suffix-list 'custom-type)
@@ -370,7 +369,8 @@ to writing a completion function."
370 (setq args (nthcdr (1+ l) args) 369 (setq args (nthcdr (1+ l) args)
371 posns (nthcdr (1+ l) posns)))) 370 posns (nthcdr (1+ l) posns))))
372 (assert (= (length args) (length posns))) 371 (assert (= (length args) (length posns)))
373 (when (and args (eq (char-syntax (char-before end)) ? )) 372 (when (and args (eq (char-syntax (char-before end)) ? )
373 (not (eq (char-before (1- end)) ?\\)))
374 (nconc args (list "")) 374 (nconc args (list ""))
375 (nconc posns (list (point)))) 375 (nconc posns (list (point))))
376 (cons (mapcar 376 (cons (mapcar
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 7b74069454b..6477a546eb8 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -276,8 +276,7 @@ Thus, this does not include the current directory.")
276 (let* ((letter (match-string 1)) 276 (let* ((letter (match-string 1))
277 (regexp (concat "\\`" letter)) 277 (regexp (concat "\\`" letter))
278 (path (eshell-find-previous-directory regexp))) 278 (path (eshell-find-previous-directory regexp)))
279 (concat (or path letter) 279 (concat (or path letter) "/"))))
280 (char-to-string directory-sep-char)))))
281 280
282(defun eshell-complete-user-reference () 281(defun eshell-complete-user-reference ()
283 "If there is a user reference, complete it." 282 "If there is a user reference, complete it."
@@ -300,7 +299,7 @@ Thus, this does not include the current directory.")
300 (let* ((path default-directory) 299 (let* ((path default-directory)
301 (len (length path))) 300 (len (length path)))
302 (if (and (> len 1) 301 (if (and (> len 1)
303 (eq (aref path (1- len)) directory-sep-char) 302 (eq (aref path (1- len)) ?/)
304 (not (and (eshell-under-windows-p) 303 (not (and (eshell-under-windows-p)
305 (string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) 304 (string-match "\\`[A-Za-z]:[\\\\/]\\'" path))))
306 (setq path (substring path 0 (1- (length path))))) 305 (setq path (substring path 0 (1- (length path)))))
@@ -324,9 +323,7 @@ in the minibuffer:
324 (len (length extra-dots)) 323 (len (length extra-dots))
325 replace-text) 324 replace-text)
326 (while (> len 0) 325 (while (> len 0)
327 (setq replace-text 326 (setq replace-text (concat replace-text "/..")
328 (concat replace-text
329 (char-to-string directory-sep-char) "..")
330 len (1- len))) 327 len (1- len)))
331 (setq path 328 (setq path
332 (replace-match replace-text t t path 1)))) 329 (replace-match replace-text t t path 1))))
@@ -371,7 +368,7 @@ in the minibuffer:
371 (setq path 368 (setq path
372 (ring-remove eshell-last-dir-ring 369 (ring-remove eshell-last-dir-ring
373 (if index 370 (if index
374 (string-to-int index) 371 (string-to-number index)
375 0))))) 372 0)))))
376 ((and path (string-match "^=\\(.*\\)$" path)) 373 ((and path (string-match "^=\\(.*\\)$" path))
377 (let ((oldpath (eshell-find-previous-directory 374 (let ((oldpath (eshell-find-previous-directory
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el
index c84962e66b0..74614d78d9c 100644
--- a/lisp/eshell/em-glob.el
+++ b/lisp/eshell/em-glob.el
@@ -265,9 +265,6 @@ the form:
265 (defvar matches) 265 (defvar matches)
266 (defvar message-shown)) 266 (defvar message-shown))
267 267
268;; jww (1999-11-18): this function assumes that directory-sep-char is
269;; a forward slash (/)
270
271(defun eshell-glob-entries (path globs &optional recurse-p) 268(defun eshell-glob-entries (path globs &optional recurse-p)
272 "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." 269 "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil."
273 (let* ((entries (ignore-errors 270 (let* ((entries (ignore-errors
@@ -303,11 +300,11 @@ the form:
303 ;; can't use `directory-file-name' because it strips away text 300 ;; can't use `directory-file-name' because it strips away text
304 ;; properties in the string 301 ;; properties in the string
305 (let ((len (1- (length incl)))) 302 (let ((len (1- (length incl))))
306 (if (eq (aref incl len) directory-sep-char) 303 (if (eq (aref incl len) ?/)
307 (setq incl (substring incl 0 len))) 304 (setq incl (substring incl 0 len)))
308 (when excl 305 (when excl
309 (setq len (1- (length excl))) 306 (setq len (1- (length excl)))
310 (if (eq (aref excl len) directory-sep-char) 307 (if (eq (aref excl len) ?/)
311 (setq excl (substring excl 0 len))))) 308 (setq excl (substring excl 0 len)))))
312 (setq incl (eshell-glob-regexp incl) 309 (setq incl (eshell-glob-regexp incl)
313 excl (and excl (eshell-glob-regexp excl))) 310 excl (and excl (eshell-glob-regexp excl)))
@@ -329,7 +326,7 @@ the form:
329 (while entries 326 (while entries
330 (setq name (car entries) 327 (setq name (car entries)
331 len (length name) 328 len (length name)
332 isdir (eq (aref name (1- len)) directory-sep-char)) 329 isdir (eq (aref name (1- len)) ?/))
333 (if (let ((fname (directory-file-name name))) 330 (if (let ((fname (directory-file-name name)))
334 (and (not (and excl (string-match excl fname))) 331 (and (not (and excl (string-match excl fname)))
335 (string-match incl fname))) 332 (string-match incl fname)))
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index d932916d8c9..62296dde73c 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -877,7 +877,7 @@ Summarize disk usage of each FILE, recursively for directories.")
877 (unless by-bytes 877 (unless by-bytes
878 (setq block-size (or block-size 1024))) 878 (setq block-size (or block-size 1024)))
879 (if (and max-depth (stringp max-depth)) 879 (if (and max-depth (stringp max-depth))
880 (setq max-depth (string-to-int max-depth))) 880 (setq max-depth (string-to-number max-depth)))
881 ;; filesystem support means nothing under Windows 881 ;; filesystem support means nothing under Windows
882 (if (eshell-under-windows-p) 882 (if (eshell-under-windows-p)
883 (setq only-one-filesystem nil)) 883 (setq only-one-filesystem nil))
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index d7c65066ac6..355369d35ae 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -757,7 +757,7 @@ nil)' if none)."
757 757
758(defmacro eshell-do-subjob (object) 758(defmacro eshell-do-subjob (object)
759 "Evaluate a command OBJECT as a subjob. 759 "Evaluate a command OBJECT as a subjob.
760We indicate thet the process was run in the background by returned it 760We indicate that the process was run in the background by returning it
761ensconced in a list." 761ensconced in a list."
762 `(let ((eshell-current-subjob-p t)) 762 `(let ((eshell-current-subjob-p t))
763 ,object)) 763 ,object))
@@ -1006,11 +1006,10 @@ at the moment are:
1006 (eshell-resume-eval)))) 1006 (eshell-resume-eval))))
1007 ;; On systems that don't support async subprocesses, eshell-resume 1007 ;; On systems that don't support async subprocesses, eshell-resume
1008 ;; can return t. Don't treat that as an error. 1008 ;; can return t. Don't treat that as an error.
1009 (if (listp delim)
1010 (setq delim (car delim)))
1009 (if (and delim (not (eq delim t))) 1011 (if (and delim (not (eq delim t)))
1010 (error "Unmatched delimiter: %c" 1012 (error "Unmatched delimiter: %c" delim)))))
1011 (if (listp delim)
1012 (car delim)
1013 delim))))))
1014 1013
1015(defun eshell-resume-command (proc status) 1014(defun eshell-resume-command (proc status)
1016 "Resume the current command when a process ends." 1015 "Resume the current command when a process ends."
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index c16b6113516..11fecee4de0 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -103,7 +103,7 @@ wholly ignored."
103 "Invoke a .BAT or .CMD file on DOS/Windows systems." 103 "Invoke a .BAT or .CMD file on DOS/Windows systems."
104 ;; since CMD.EXE can't handle forward slashes in the initial 104 ;; since CMD.EXE can't handle forward slashes in the initial
105 ;; argument... 105 ;; argument...
106 (setcar args (subst-char-in-string directory-sep-char ?\\ (car args))) 106 (setcar args (subst-char-in-string ?/ ?\\ (car args)))
107 (throw 'eshell-replace-command 107 (throw 'eshell-replace-command
108 (eshell-parse-command eshell-windows-shell-file (cons "/c" args)))) 108 (eshell-parse-command eshell-windows-shell-file (cons "/c" args))))
109 109
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index 6944770dbc9..8f171760ea0 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -192,7 +192,7 @@ not be added to this variable."
192 (eshell-finish-arg 192 (eshell-finish-arg
193 (prog1 193 (prog1
194 (list 'eshell-set-output-handle 194 (list 'eshell-set-output-handle
195 (or (and sh (string-to-int sh)) 1) 195 (or (and sh (string-to-number sh)) 1)
196 (list 'quote 196 (list 'quote
197 (aref [overwrite append insert] 197 (aref [overwrite append insert]
198 (1- (length oper))))) 198 (1- (length oper)))))
@@ -353,7 +353,8 @@ it defaults to `insert'."
353 ((or (bufferp target) 353 ((or (bufferp target)
354 (and (boundp 'eshell-buffer-shorthand) 354 (and (boundp 'eshell-buffer-shorthand)
355 (symbol-value 'eshell-buffer-shorthand) 355 (symbol-value 'eshell-buffer-shorthand)
356 (symbolp target))) 356 (symbolp target)
357 (not (memq target '(t nil)))))
357 (let ((buf (if (bufferp target) 358 (let ((buf (if (bufferp target)
358 target 359 target
359 (get-buffer-create 360 (get-buffer-create
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 050c82cc310..9cb05116b79 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -438,7 +438,7 @@ This is used by `eshell-watch-for-password-prompt'."
438 438
439 (if eshell-first-time-p 439 (if eshell-first-time-p
440 (run-hooks 'eshell-first-time-mode-hook)) 440 (run-hooks 'eshell-first-time-mode-hook))
441 (run-hooks 'eshell-mode-hook) 441 (run-mode-hooks 'eshell-mode-hook)
442 (run-hooks 'eshell-post-command-hook)) 442 (run-hooks 'eshell-post-command-hook))
443 443
444(put 'eshell-mode 'mode-class 'special) 444(put 'eshell-mode 'mode-class 'special)
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index a2fd0915cf4..91317300ca5 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -253,14 +253,13 @@ If N or M is nil, it means the end of the list."
253 parts) 253 parts)
254 (if (and (eshell-under-windows-p) 254 (if (and (eshell-under-windows-p)
255 (> len 2) 255 (> len 2)
256 (eq (aref path 0) directory-sep-char) 256 (eq (aref path 0) ?/)
257 (eq (aref path 1) directory-sep-char)) 257 (eq (aref path 1) ?/))
258 (setq i 2)) 258 (setq i 2))
259 (while (< i len) 259 (while (< i len)
260 (if (and (eq (aref path i) directory-sep-char) 260 (if (and (eq (aref path i) ?/)
261 (not (get-text-property i 'escaped path))) 261 (not (get-text-property i 'escaped path)))
262 (setq parts (cons (if (= li i) 262 (setq parts (cons (if (= li i) "/"
263 (char-to-string directory-sep-char)
264 (substring path li (1+ i))) parts) 263 (substring path li (1+ i))) parts)
265 li (1+ i))) 264 li (1+ i)))
266 (setq i (1+ i))) 265 (setq i (1+ i)))
@@ -268,9 +267,7 @@ If N or M is nil, it means the end of the list."
268 (setq parts (cons (substring path li i) parts))) 267 (setq parts (cons (substring path li i) parts)))
269 (if (and (eshell-under-windows-p) 268 (if (and (eshell-under-windows-p)
270 (string-match "\\`[A-Za-z]:\\'" (car (last parts)))) 269 (string-match "\\`[A-Za-z]:\\'" (car (last parts))))
271 (setcar (last parts) 270 (setcar (last parts) (concat (car (last parts)) "/")))
272 (concat (car (last parts))
273 (char-to-string directory-sep-char))))
274 (nreverse parts))) 271 (nreverse parts)))
275 272
276(defun eshell-to-flat-string (value) 273(defun eshell-to-flat-string (value)
@@ -450,8 +447,8 @@ list."
450 (point) (progn (end-of-line) 447 (point) (progn (end-of-line)
451 (point))) ":"))) 448 (point))) ":")))
452 (if (and (and fields (nth 0 fields) (nth 2 fields)) 449 (if (and (and fields (nth 0 fields) (nth 2 fields))
453 (not (assq (string-to-int (nth 2 fields)) names))) 450 (not (assq (string-to-number (nth 2 fields)) names)))
454 (setq names (cons (cons (string-to-int (nth 2 fields)) 451 (setq names (cons (cons (string-to-number (nth 2 fields))
455 (nth 0 fields)) 452 (nth 0 fields))
456 names)))) 453 names))))
457 (forward-line)))) 454 (forward-line))))
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 9ff9c1898a2..a0294273985 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -631,7 +631,7 @@ For example, to retrieve the second element of a user's record in
631 (if (and value 631 (if (and value
632 (stringp value) 632 (stringp value)
633 (file-directory-p value)) 633 (file-directory-p value))
634 (concat varname (char-to-string directory-sep-char)) 634 (concat varname "/")
635 varname)))) 635 varname))))
636 (eshell-envvar-names (eshell-environment-variables))) 636 (eshell-envvar-names (eshell-environment-variables)))
637 (all-completions argname obarray 'boundp) 637 (all-completions argname obarray 'boundp)
diff --git a/lisp/faces.el b/lisp/faces.el
index 5f19ba7a880..6bbf7da3761 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -183,10 +183,7 @@ Return nil if there is no such face.
183If the optional argument FRAME is given, this gets the face NAME for 183If the optional argument FRAME is given, this gets the face NAME for
184that frame; otherwise, it uses the selected frame. 184that frame; otherwise, it uses the selected frame.
185If FRAME is the symbol t, then the global, non-frame face is returned. 185If FRAME is the symbol t, then the global, non-frame face is returned.
186If NAME is already a face, it is simply returned. 186If NAME is already a face, it is simply returned."
187
188This function is defined for compatibility with Emacs 20.2. It
189should not be used anymore."
190 (facep name)) 187 (facep name))
191(make-obsolete 'internal-find-face 'facep "21.1") 188(make-obsolete 'internal-find-face 'facep "21.1")
192 189
@@ -234,8 +231,8 @@ of a face name is the same for all frames."
234(defun face-equal (face1 face2 &optional frame) 231(defun face-equal (face1 face2 &optional frame)
235 "Non-nil if faces FACE1 and FACE2 are equal. 232 "Non-nil if faces FACE1 and FACE2 are equal.
236Faces are considered equal if all their attributes are equal. 233Faces are considered equal if all their attributes are equal.
237If the optional argument FRAME is given, report on face FACE in that frame. 234If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame.
238If FRAME is t, report on the defaults for face FACE (for new frames). 235If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames).
239If FRAME is omitted or nil, use the selected frame." 236If FRAME is omitted or nil, use the selected frame."
240 (internal-lisp-face-equal-p face1 face2 frame)) 237 (internal-lisp-face-equal-p face1 face2 frame))
241 238
@@ -1154,16 +1151,24 @@ this regular expression. When called interactively with a prefix
1154arg, prompt for a regular expression." 1151arg, prompt for a regular expression."
1155 (interactive (list (and current-prefix-arg 1152 (interactive (list (and current-prefix-arg
1156 (read-string "List faces matching regexp: ")))) 1153 (read-string "List faces matching regexp: "))))
1157 (let ((faces (sort (face-list) #'string-lessp)) 1154 (let ((all-faces (zerop (length regexp)))
1158 (frame (selected-frame)) 1155 (frame (selected-frame))
1156 (max-length 0)
1157 faces line-format
1159 disp-frame window face-name) 1158 disp-frame window face-name)
1160 (when (> (length regexp) 0) 1159 ;; We filter and take the max length in one pass
1161 (setq faces 1160 (setq faces
1162 (delq nil 1161 (delq nil
1163 (mapcar (lambda (f) 1162 (mapcar (lambda (f)
1164 (when (string-match regexp (symbol-name f)) 1163 (let ((s (symbol-name f)))
1165 f)) 1164 (when (or all-faces (string-match regexp s))
1166 faces)))) 1165 (setq max-length (max (length s) max-length))
1166 f)))
1167 (sort (face-list) #'string-lessp))))
1168 (unless faces
1169 (error "No faces matching \"%s\"" regexp))
1170 (setq max-length (1+ max-length)
1171 line-format (format "%%-%ds" max-length))
1167 (with-output-to-temp-buffer "*Faces*" 1172 (with-output-to-temp-buffer "*Faces*"
1168 (save-excursion 1173 (save-excursion
1169 (set-buffer standard-output) 1174 (set-buffer standard-output)
@@ -1178,7 +1183,7 @@ arg, prompt for a regular expression."
1178 (setq help-xref-stack nil) 1183 (setq help-xref-stack nil)
1179 (dolist (face faces) 1184 (dolist (face faces)
1180 (setq face-name (symbol-name face)) 1185 (setq face-name (symbol-name face))
1181 (insert (format "%25s " face-name)) 1186 (insert (format line-format face-name))
1182 ;; Hyperlink to a customization buffer for the face. Using 1187 ;; Hyperlink to a customization buffer for the face. Using
1183 ;; the help xref mechanism may not be the best way. 1188 ;; the help xref mechanism may not be the best way.
1184 (save-excursion 1189 (save-excursion
@@ -1203,7 +1208,7 @@ arg, prompt for a regular expression."
1203 (goto-char beg) 1208 (goto-char beg)
1204 (forward-line 1) 1209 (forward-line 1)
1205 (while (not (eobp)) 1210 (while (not (eobp))
1206 (insert " ") 1211 (insert-char ?\s max-length)
1207 (forward-line 1)))) 1212 (forward-line 1))))
1208 (goto-char (point-min))) 1213 (goto-char (point-min)))
1209 (print-help-return-message)) 1214 (print-help-return-message))
diff --git a/lisp/files.el b/lisp/files.el
index 4602b4e1efa..a75b6b2fc89 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -514,6 +514,10 @@ Runs the usual ange-ftp hook, but only for completion operations."
514This means to guarantee valid names and perhaps to canonicalize 514This means to guarantee valid names and perhaps to canonicalize
515certain patterns. 515certain patterns.
516 516
517FILENAME should be an absolute file name since the conversion rules
518sometimes vary depending on the position in the file name. E.g. c:/foo
519is a valid DOS file name, but c:/bar/c:/foo is not.
520
517This function's standard definition is trivial; it just returns 521This function's standard definition is trivial; it just returns
518the argument. However, on Windows and DOS, replace invalid 522the argument. However, on Windows and DOS, replace invalid
519characters. On DOS, make sure to obey the 8.3 limitations. On 523characters. On DOS, make sure to obey the 8.3 limitations. On
diff --git a/lisp/filesets.el b/lisp/filesets.el
index 9d60f20316f..7bbf55d9823 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -132,7 +132,8 @@ Is buffer local variable.")
132 132
133(defvar filesets-menu-ensure-use-cached 133(defvar filesets-menu-ensure-use-cached
134 (and filesets-running-xemacs 134 (and filesets-running-xemacs
135 (not (emacs-version>= 21 5))) 135 (if (fboundp 'emacs-version>=)
136 (not (emacs-version>= 21 5))))
136 "Make sure (X)Emacs uses filesets' cache. 137 "Make sure (X)Emacs uses filesets' cache.
137 138
138Well, if you use XEmacs (prior to 21.5?) custom.el is loaded after 139Well, if you use XEmacs (prior to 21.5?) custom.el is loaded after
diff --git a/lisp/font-core.el b/lisp/font-core.el
index 056c1b3515b..a78e21a762f 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -88,6 +88,8 @@ settings. See the variable `font-lock-defaults', which takes precedence.")
88It will be passed one argument, which is the current value of 88It will be passed one argument, which is the current value of
89`font-lock-mode'.") 89`font-lock-mode'.")
90 90
91;; The mode for which font-lock was initialized, or nil if none.
92(defvar font-lock-mode-major-mode)
91(define-minor-mode font-lock-mode 93(define-minor-mode font-lock-mode
92 "Toggle Font Lock mode. 94 "Toggle Font Lock mode.
93With arg, turn Font Lock mode off if and only if arg is a non-positive 95With arg, turn Font Lock mode off if and only if arg is a non-positive
@@ -156,7 +158,9 @@ your own function which is called when `font-lock-mode' is toggled via
156 ;; Arrange to unfontify this buffer if we change major mode later. 158 ;; Arrange to unfontify this buffer if we change major mode later.
157 (if font-lock-mode 159 (if font-lock-mode
158 (add-hook 'change-major-mode-hook 'font-lock-change-mode nil t) 160 (add-hook 'change-major-mode-hook 'font-lock-change-mode nil t)
159 (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))) 161 (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))
162 (when font-lock-mode
163 (setq font-lock-mode-major-mode major-mode)))
160 164
161;; Get rid of fontification for the old major mode. 165;; Get rid of fontification for the old major mode.
162;; We do this when changing major modes. 166;; We do this when changing major modes.
@@ -175,6 +179,7 @@ this function onto `change-major-mode-hook'."
175 '(font-lock-face))) 179 '(font-lock-face)))
176 (restore-buffer-modified-p modp))) 180 (restore-buffer-modified-p modp)))
177 181
182(defvar font-lock-set-defaults)
178(defun font-lock-default-function (mode) 183(defun font-lock-default-function (mode)
179 ;; Turn on Font Lock mode. 184 ;; Turn on Font Lock mode.
180 (when mode 185 (when mode
@@ -201,9 +206,14 @@ this function onto `change-major-mode-hook'."
201 ;; Only do hard work if the mode has specified stuff in 206 ;; Only do hard work if the mode has specified stuff in
202 ;; `font-lock-defaults'. 207 ;; `font-lock-defaults'.
203 (when (or font-lock-defaults 208 (when (or font-lock-defaults
204 (and (boundp 'font-lock-keywords) font-lock-keywords) 209 (if (boundp 'font-lock-keywords) font-lock-keywords)
205 (with-no-warnings 210 (with-no-warnings
206 (cdr (assq major-mode font-lock-defaults-alist)))) 211 (cdr (assq major-mode font-lock-defaults-alist)))
212 (and mode
213 (boundp 'font-lock-set-defaults)
214 font-lock-set-defaults
215 font-lock-mode-major-mode
216 (not (eq font-lock-mode-major-mode major-mode))))
207 (font-lock-mode-internal mode))) 217 (font-lock-mode-internal mode)))
208 218
209(defun turn-on-font-lock () 219(defun turn-on-font-lock ()
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 8ef14191a0a..1d07e5a9283 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -683,9 +683,22 @@ For example:
683adds two fontification patterns for C mode, to fontify `FIXME:' words, even in 683adds two fontification patterns for C mode, to fontify `FIXME:' words, even in
684comments, and to fontify `and', `or' and `not' words as keywords. 684comments, and to fontify `and', `or' and `not' words as keywords.
685 685
686When used from a Lisp program (such as a minor mode), it is recommended to 686The above procedure will only add the keywords for C mode, not
687use nil for MODE (and place the call on a hook) to avoid subtle problems 687for modes derived from C mode. To add them for derived modes too,
688due to details of the implementation. 688pass nil for MODE and add the call to c-mode-hook.
689
690For example:
691
692 (add-hook 'c-mode-hook
693 (lambda ()
694 (font-lock-add-keywords 'c-mode
695 '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)
696 (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
697 font-lock-keyword-face)))))
698
699The above procedure may fail to add keywords to derived modes if
700some involved major mode does not follow the standard conventions.
701File a bug report if this happens, so the major mode can be corrected.
689 702
690Note that some modes have specialized support for additional patterns, e.g., 703Note that some modes have specialized support for additional patterns, e.g.,
691see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', 704see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
@@ -704,7 +717,8 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
704 (font-lock-update-removed-keyword-alist mode keywords append)) 717 (font-lock-update-removed-keyword-alist mode keywords append))
705 (t 718 (t
706 ;; Otherwise set or add the keywords now. 719 ;; Otherwise set or add the keywords now.
707 ;; This is a no-op if it has been done already in this buffer. 720 ;; This is a no-op if it has been done already in this buffer
721 ;; for the correct major mode.
708 (font-lock-set-defaults) 722 (font-lock-set-defaults)
709 (let ((was-compiled (eq (car font-lock-keywords) t))) 723 (let ((was-compiled (eq (car font-lock-keywords) t)))
710 ;; Bring back the user-level (uncompiled) keywords. 724 ;; Bring back the user-level (uncompiled) keywords.
@@ -774,9 +788,11 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
774MODE should be a symbol, the major mode command name, such as `c-mode' 788MODE should be a symbol, the major mode command name, such as `c-mode'
775or nil. If nil, highlighting keywords are removed for the current buffer. 789or nil. If nil, highlighting keywords are removed for the current buffer.
776 790
777When used from a Lisp program (such as a minor mode), it is recommended to 791To make the removal apply to modes derived from MODE as well,
778use nil for MODE (and place the call on a hook) to avoid subtle problems 792pass nil for MODE and add the call to MODE-hook. This may fail
779due to details of the implementation." 793for some derived modes if some involved major mode does not
794follow the standard conventions. File a bug report if this
795happens, so the major mode can be corrected."
780 (cond (mode 796 (cond (mode
781 ;; Remove one keyword at the time. 797 ;; Remove one keyword at the time.
782 (dolist (keyword keywords) 798 (dolist (keyword keywords)
@@ -1351,7 +1367,7 @@ START should be at the beginning of a line."
1351 comment-start-skip)) 1367 comment-start-skip))
1352 (put-text-property beg (match-end 0) 'face 1368 (put-text-property beg (match-end 0) 'face
1353 font-lock-comment-delimiter-face))) 1369 font-lock-comment-delimiter-face)))
1354 (if (looking-back comment-end-regexp (point-at-bol)) 1370 (if (looking-back comment-end-regexp (point-at-bol) t)
1355 (put-text-property (match-beginning 0) (point) 'face 1371 (put-text-property (match-beginning 0) (point) 'face
1356 font-lock-comment-delimiter-face)))) 1372 font-lock-comment-delimiter-face))))
1357 (< (point) end)) 1373 (< (point) end))
@@ -1571,12 +1587,15 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
1571 1587
1572(defvar font-lock-set-defaults nil) ; Whether we have set up defaults. 1588(defvar font-lock-set-defaults nil) ; Whether we have set up defaults.
1573 1589
1590(defvar font-lock-mode-major-mode)
1574(defun font-lock-set-defaults () 1591(defun font-lock-set-defaults ()
1575 "Set fontification defaults appropriately for this mode. 1592 "Set fontification defaults appropriately for this mode.
1576Sets various variables using `font-lock-defaults' (or, if nil, using 1593Sets various variables using `font-lock-defaults' (or, if nil, using
1577`font-lock-defaults-alist') and `font-lock-maximum-decoration'." 1594`font-lock-defaults-alist') and `font-lock-maximum-decoration'."
1578 ;; Set fontification defaults iff not previously set. 1595 ;; Set fontification defaults iff not previously set for correct major mode.
1579 (unless font-lock-set-defaults 1596 (unless (and font-lock-set-defaults
1597 (eq font-lock-mode-major-mode major-mode))
1598 (setq font-lock-mode-major-mode major-mode)
1580 (set (make-local-variable 'font-lock-set-defaults) t) 1599 (set (make-local-variable 'font-lock-set-defaults) t)
1581 (make-local-variable 'font-lock-fontified) 1600 (make-local-variable 'font-lock-fontified)
1582 (make-local-variable 'font-lock-multiline) 1601 (make-local-variable 'font-lock-multiline)
diff --git a/lisp/forms.el b/lisp/forms.el
index 61d2441a9ea..57985a7297f 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -713,7 +713,7 @@ Commands: Equivalent keys in read-only mode:
713 713
714 ;; user customising 714 ;; user customising
715 ;;(message "forms: proceeding setup (user hooks)...") 715 ;;(message "forms: proceeding setup (user hooks)...")
716 (run-hooks 'forms-mode-hook 'forms-mode-hooks) 716 (run-mode-hooks 'forms-mode-hook 'forms-mode-hooks)
717 ;;(message "forms: setting up... done.") 717 ;;(message "forms: setting up... done.")
718 718
719 ;; be helpful 719 ;; be helpful
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 14450ee3a14..3681f2fa750 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,241 @@
12005-06-04 Luc Teirlinck <teirllm@auburn.edu>
2
3 * gnus-art.el (article-update-date-lapsed): Use `save-match-data'.
4
52005-06-04 Lute Kamstra <lute@gnu.org>
6
7 * nnfolder.el (nnfolder-read-folder): Make sure that undo
8 information is never recorded.
9
102005-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
11
12 * gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy.
13
142005-06-02 Katsumi Yamaoka <yamaoka@jpl.org>
15
16 * pop3.el (pop3-md5): Run md5 in the binary mode.
17 (pop3-md5-program-args): New variable.
18
19 * starttls.el (starttls-set-process-query-on-exit-flag):
20 Use eval-and-compile.
21
222005-05-31 Katsumi Yamaoka <yamaoka@jpl.org>
23
24 * gnus-art.el (article-display-x-face): Replace
25 process-kill-without-query by gnus-set-process-query-on-exit-flag.
26
27 * gnus-group.el: Bind gnus-cache-active-hashtb when compiling.
28
29 * gnus-util.el (gnus-set-process-query-on-exit-flag): Alias to
30 set-process-query-on-exit-flag or process-kill-without-query.
31
32 * html2text.el (html2text-fix-paragraphs): Use `while - re-search'
33 loop instead of replace-regexp.
34
35 * imap.el (imap-ssl-open): Use set-process-query-on-exit-flag
36 instead of process-kill-without-query if it is available.
37
38 * mm-util.el (mm-insert-file-contents): Bind find-file-hook
39 instead of find-file-hooks if it is available.
40
41 * mml1991.el: Bind pgg-default-user-id when compiling.
42
43 * mml2015.el: Bind pgg-default-user-id when compiling.
44
45 * nndraft.el (nndraft-request-associate-buffer):
46 Use write-contents-functions instead of write-contents-hooks if it is
47 available.
48
49 * nnheader.el (nnheader-find-file-noselect): Bind find-file-hook
50 instead of find-file-hooks if it is available.
51
52 * nntp.el (nntp-open-connection): Replace
53 process-kill-without-query by gnus-set-process-query-on-exit-flag.
54 (nntp-open-ssl-stream): Ditto.
55 (nntp-open-tls-stream): Ditto.
56
57 * pgg.el: Don't bind itimer vars; don't autoload itimer functions.
58 (pgg-run-at-time-1): New macro.
59 (pgg-run-at-time): Use it.
60
61 * starttls.el (starttls-set-process-query-on-exit-flag): Alias to
62 set-process-query-on-exit-flag or process-kill-without-query.
63 (starttls-open-stream-gnutls): Use it instead of
64 process-kill-without-query.
65 (starttls-open-stream): Ditto.
66
672005-05-31 Simon Josefsson <jas@extundo.com>
68
69 * imap.el (imap-ssl-open): Use imap-process-connection-type,
70 instead of hard coding to nil.
71
722005-05-31 Kevin Greiner <kgreiner@xpediantsolutions.com>
73
74 * gnus-group.el (): Require gnus-sum and autoload functions to
75 resolve warnings when gnus-group.el compiled alone.
76
772005-05-30 Reiner Steib <Reiner.Steib@gmx.de>
78
79 * gnus-agent.el (gnus-agent-regenerate-group)
80 (gnus-agent-fetch-articles): Replace `string-to-int' by
81 `string-to-number'.
82 * gnus-art.el (gnus-button-fetch-group): Ditto.
83 * gnus-cache.el (gnus-cache-generate-active)
84 (gnus-cache-articles-in-group): Ditto.
85 * gnus-group.el (gnus-group-set-current-level)
86 (gnus-group-insert-group-line): Ditto.
87 * gnus-score.el (gnus-score-set-expunge-below)
88 (gnus-score-set-mark-below, gnus-summary-score-effect)
89 (gnus-summary-score-entry): Ditto.
90 * gnus-soup.el (gnus-soup-send-packet, gnus-soup-parse-areas)
91 (gnus-soup-pack): Ditto.
92 * gnus-spec.el (gnus-xmas-format): Ditto.
93 * gnus-start.el (gnus-newsrc-to-gnus-format): Ditto.
94 * gnus-sum.el (gnus-create-xref-hashtb): Ditto.
95 * gnus-uu.el (gnus-uu-expand-numbers): Ditto.
96 * nnbabyl.el (nnbabyl-article-group-number): Ditto.
97 * nndb.el (nndb-get-remote-expire-response): Ditto.
98 * nndiary.el (nndiary-parse-schedule-value)
99 (nndiary-string-to-number, nndiary-request-replace-article)
100 (nndiary-request-article): Ditto.
101 * nndoc.el (nndoc-rnews-body-end, nndoc-mbox-body-end): Ditto.
102 * nndraft.el (nndraft-articles, nndraft-request-group): Ditto.
103 * nneething.el (nneething-make-head): Ditto.
104 * nnfolder.el (nnfolder-request-article)
105 (nnfolder-retrieve-headers): Ditto.
106 * nnheader.el (nnheader-file-to-number): Ditto.
107 * nnkiboze.el (nnkiboze-request-article): Ditto.
108 * nnmail.el (nnmail-process-unix-mail-format)
109 (nnmail-process-babyl-mail-format): Ditto.
110 * nnmbox.el (nnmbox-read-mbox, nnmbox-article-group-number): Ditto.
111 * nnmh.el (nnmh-update-gnus-unreads, nnmh-active-number)
112 (nnmh-request-create-group, nnmh-request-list-1)
113 (nnmh-request-group, nnmh-request-article): Ditto.
114 * nnml.el (nnml-request-replace-article, nnml-request-article): Ditto.
115 * nnrss.el (nnrss-find-rss-via-syndic8): Ditto.
116 * nnsoup.el (nnsoup-make-active): Ditto.
117 * nnspool.el (nnspool-find-id, nnspool-request-group): Ditto.
118 * nntp.el (nntp-find-group-and-number)
119 (nntp-retrieve-headers-with-xover): Ditto.
120 * pgg-gpg.el (pgg-gpg-snarf-keys-region): Ditto.
121 * pgg-parse.el (pgg-read-body, pgg-read-bytes)
122 (pgg-format-key-identifier): Ditto.
123 * pop3.el (pop3-last, pop3-stat): Ditto.
124 * qp.el (quoted-printable-decode-region): Ditto.
125
126 * spam-report.el (spam-report-url-ping-mm-url): Use format instead
127 of concat.
128
1292005-05-30 Katsumi Yamaoka <yamaoka@jpl.org>
130
131 * gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks.
132
133 * gnus-art.el (gnus-article-mode): Use gnus-run-mode-hooks.
134
135 * gnus-cus.el (gnus-custom-mode): Use gnus-run-mode-hooks.
136
137 * gnus-eform.el (gnus-edit-form-mode): Use gnus-run-mode-hooks.
138
139 * gnus-group.el (gnus-group-mode): Use gnus-run-mode-hooks.
140
141 * gnus-kill.el (gnus-kill-file-mode): Use gnus-run-mode-hooks.
142
143 * gnus-salt.el (gnus-tree-mode): Use gnus-run-mode-hooks.
144 (gnus-carpal-mode): Ditto.
145
146 * gnus-srvr.el (gnus-server-mode): Use gnus-run-mode-hooks.
147 (gnus-browse-mode): Ditto.
148
149 * gnus-sum.el (gnus-summary-mode): Use gnus-run-mode-hooks.
150
151 * gnus-util.el (gnus-run-mode-hooks): Save current buffer.
152
1532005-05-29 Richard M. Stallman <rms@gnu.org>
154
155 * gnus-cite.el (gnus-cite-add-face): Set overlay's evaporate property.
156
1572005-05-27 Katsumi Yamaoka <yamaoka@jpl.org>
158
159 * gnus-util.el (gnus-run-mode-hooks): New function.
160
161 * score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks.
162
1632005-05-26 Luc Teirlinck <teirllm@auburn.edu>
164
165 * gnus-agent.el (gnus-agent-make-mode-line-string):
166 Use mode-line-highlight as mouse-face.
167
1682005-05-17 Katsumi Yamaoka <yamaoka@jpl.org>
169
170 * canlock.el (canlock): Change the parent group to news.
171
172 * deuglify.el (gnus-outlook-deuglify): Add :group.
173
174 * dig.el (dig): Add :group.
175
176 * gnus-art.el (gnus-inhibit-mime-unbuttonizing): Add :group.
177
178 * gnus-cite.el (gnus-cite-attribution-face): Add :group.
179 (gnus-cite-face-1, gnus-cite-face-2, gnus-cite-face-3): Ditto.
180 (gnus-cite-face-4, gnus-cite-face-5, gnus-cite-face-6): Ditto.
181 (gnus-cite-face-7, gnus-cite-face-8, gnus-cite-face-9): Ditto.
182 (gnus-cite-face-10, gnus-cite-face-11): Ditto.
183
184 * gnus-diary.el (gnus-diary): Add :group.
185
186 * gnus.el (gnus-group-news-1-face): Add :group.
187 (gnus-group-news-1-empty-face): Ditto.
188 (gnus-group-news-2-face, gnus-group-news-2-empty-face): Ditto.
189 (gnus-group-news-3-face, gnus-group-news-3-empty-face): Ditto.
190 (gnus-group-news-4-face, gnus-group-news-4-empty-face): Ditto.
191 (gnus-group-news-5-face, gnus-group-news-5-empty-face): Ditto.
192 (gnus-group-news-6-face, gnus-group-news-6-empty-face): Ditto.
193 (gnus-group-news-low-face, gnus-group-news-low-empty-face): Ditto.
194 (gnus-group-mail-1-face, gnus-group-mail-1-empty-face): Ditto.
195 (gnus-group-mail-2-face, gnus-group-mail-2-empty-face): Ditto.
196 (gnus-group-mail-3-face, gnus-group-mail-3-empty-face): Ditto.
197 (gnus-group-mail-low-face, gnus-group-mail-low-empty-face): Ditto.
198 (gnus-summary-selected-face, gnus-summary-cancelled-face): Ditto.
199 (gnus-summary-high-ticked-face): Ditto.
200 (gnus-summary-low-ticked-face): Ditto.
201 (gnus-summary-normal-ticked-face): Ditto.
202 (gnus-summary-high-ancient-face): Ditto.
203 (gnus-summary-low-ancient-face): Ditto.
204 (gnus-summary-normal-ancient-face): Ditto.
205 (gnus-summary-high-undownloaded-face): Ditto.
206 (gnus-summary-low-undownloaded-face): Ditto.
207 (gnus-summary-normal-undownloaded-face): Ditto.
208 (gnus-summary-high-unread-face): Ditto.
209 (gnus-summary-low-unread-face): Ditto.
210 (gnus-summary-normal-unread-face): Ditto.
211 (gnus-summary-high-read-face, gnus-summary-low-read-face): Ditto.
212 (gnus-summary-normal-read-face, gnus-splash-face): Ditto.
213
214 * message.el (message-minibuffer-local-map): Add :group.
215
216 * sieve-manage.el (sieve-manage-log): Add :group.
217 (sieve-manage-default-user): Diito.
218 (sieve-manage-server-eol, sieve-manage-client-eol): Ditto.
219 (sieve-manage-streams, sieve-manage-stream-alist): Ditto.
220 (sieve-manage-authenticators): Ditto.
221 (sieve-manage-authenticator-alist): Ditto.
222 (sieve-manage-default-port): Ditto.
223
224 * sieve-mode.el (sieve-control-commands-face): Add :group.
225 (sieve-action-commands-face): Ditto.
226 (sieve-test-commands-face): Ditto.
227 (sieve-tagged-arguments-face): Ditto.
228
229 * smime.el (smime): Add :group.
230
231 * spam-report.el (spam-report): Add :group.
232
233 * spam.el (spam, spam-face): Add :group.
234
2352005-05-26 Lute Kamstra <lute@gnu.org>
236
237 * score-mode.el (gnus-score-mode): Use run-mode-hooks.
238
12005-05-16 Katsumi Yamaoka <yamaoka@jpl.org> 2392005-05-16 Katsumi Yamaoka <yamaoka@jpl.org>
2 240
3 * gnus-art.el: Don't autoload mail-extract-address-components. 241 * gnus-art.el: Don't autoload mail-extract-address-components.
@@ -213,11 +451,11 @@
213 451
214 * nnimap.el (nnimap-date-days-ago): Ditto. 452 * nnimap.el (nnimap-date-days-ago): Ditto.
215 453
216 * gnus-demon.el (parse-time-string): Added autoload. 454 * gnus-demon.el (parse-time-string): Add autoload.
217 455
218 * gnus-delay.el (parse-time-string): Added autoload. 456 * gnus-delay.el (parse-time-string): Add autoload.
219 457
220 * gnus-art.el (parse-time-string): Added autoload. 458 * gnus-art.el (parse-time-string): Add autoload.
221 459
222 * nnultimate.el (parse-time): Require for `parse-time-string'. 460 * nnultimate.el (parse-time): Require for `parse-time-string'.
223 461
@@ -271,14 +509,13 @@
271 (rfc2047-encoded-word-regexp): Don't use shy group. 509 (rfc2047-encoded-word-regexp): Don't use shy group.
272 (rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change. 510 (rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change.
273 (rfc2047-parse-and-decode): Ditto. 511 (rfc2047-parse-and-decode): Ditto.
274 (rfc2047-decode): Treat the ascii coding-system as raw-text by 512 (rfc2047-decode): Treat the ascii coding-system as raw-text by default.
275 default.
276 513
2772005-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> 5142005-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
278 515
279 * rfc2047.el (rfc2047-encode-encoded-words): New variable. 516 * rfc2047.el (rfc2047-encode-encoded-words): New variable.
280 (rfc2047-field-value): Strip props. 517 (rfc2047-field-value): Strip props.
281 (rfc2047-encode-message-header): Disabled header folding -- not 518 (rfc2047-encode-message-header): Disable header folding -- not
282 all headers can be folded, and this should be done by the message 519 all headers can be folded, and this should be done by the message
283 composition mode. Probably. I think. 520 composition mode. Probably. I think.
284 (rfc2047-encodable-p): Say that =? needs encoding. 521 (rfc2047-encodable-p): Say that =? needs encoding.
diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el
index 71c7dbe03d8..126ec0c60ca 100644
--- a/lisp/gnus/canlock.el
+++ b/lisp/gnus/canlock.el
@@ -1,6 +1,6 @@
1;;; canlock.el --- functions for Cancel-Lock feature 1;;; canlock.el --- functions for Cancel-Lock feature
2 2
3;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 3;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Katsumi Yamaoka <yamaoka@jpl.org> 6;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
@@ -50,7 +50,7 @@
50 50
51(defgroup canlock nil 51(defgroup canlock nil
52 "The Cancel-Lock feature." 52 "The Cancel-Lock feature."
53 :group 'applications) 53 :group 'news)
54 54
55(defcustom canlock-password nil 55(defcustom canlock-password nil
56 "Password to use when signing a Cancel-Lock or a Cancel-Key header." 56 "Password to use when signing a Cancel-Lock or a Cancel-Key header."
diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el
index 0dc6e6d002a..cae18951f7e 100644
--- a/lisp/gnus/deuglify.el
+++ b/lisp/gnus/deuglify.el
@@ -1,6 +1,6 @@
1;;; deuglify.el --- deuglify broken Outlook (Express) articles 1;;; deuglify.el --- deuglify broken Outlook (Express) articles
2 2
3;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4;; Copyright (C) 2001, 2002 Raymond Scholz 4;; Copyright (C) 2001, 2002 Raymond Scholz
5 5
6;; Author: Raymond Scholz <rscholz@zonix.de> 6;; Author: Raymond Scholz <rscholz@zonix.de>
@@ -231,7 +231,8 @@
231 231
232(defgroup gnus-outlook-deuglify nil 232(defgroup gnus-outlook-deuglify nil
233 "Deuglify articles generated by broken user agents like MS Outlook (Express)." 233 "Deuglify articles generated by broken user agents like MS Outlook (Express)."
234 :version "22.1") 234 :version "22.1"
235 :group 'gnus)
235 236
236;;;###autoload 237;;;###autoload
237(defcustom gnus-outlook-deuglify-unwrap-min 45 238(defcustom gnus-outlook-deuglify-unwrap-min 45
diff --git a/lisp/gnus/dig.el b/lisp/gnus/dig.el
index 08070e985f8..a3d55cbf824 100644
--- a/lisp/gnus/dig.el
+++ b/lisp/gnus/dig.el
@@ -1,5 +1,5 @@
1;;; dig.el --- Domain Name System dig interface 1;;; dig.el --- Domain Name System dig interface
2;; Copyright (c) 2000, 2001, 2003 Free Software Foundation, Inc. 2;; Copyright (c) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
3 3
4;; Author: Simon Josefsson <simon@josefsson.org> 4;; Author: Simon Josefsson <simon@josefsson.org>
5;; Keywords: DNS BIND dig 5;; Keywords: DNS BIND dig
@@ -40,7 +40,8 @@
40(eval-when-compile (require 'cl)) 40(eval-when-compile (require 'cl))
41 41
42(defgroup dig nil 42(defgroup dig nil
43 "Dig configuration.") 43 "Dig configuration."
44 :group 'comm)
44 45
45(defcustom dig-program "dig" 46(defcustom dig-program "dig"
46 "Name of dig (domain information groper) binary." 47 "Name of dig (domain information groper) binary."
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 4236c7958fb..9f4525e1ae2 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -561,7 +561,8 @@ manipulated as follows:
561 (if (and (fboundp 'propertize) 561 (if (and (fboundp 'propertize)
562 (fboundp 'make-mode-line-mouse-map)) 562 (fboundp 'make-mode-line-mouse-map))
563 (propertize string 'local-map 563 (propertize string 'local-map
564 (make-mode-line-mouse-map mouse-button mouse-func)) 564 (make-mode-line-mouse-map mouse-button mouse-func)
565 'mouse-face 'mode-line-highlight)
565 string)) 566 string))
566 567
567(defun gnus-agent-toggle-plugged (set-to) 568(defun gnus-agent-toggle-plugged (set-to)
@@ -1539,7 +1540,7 @@ downloaded into the agent."
1539 (while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *") 1540 (while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *")
1540 (push (cons (buffer-substring (match-beginning 1) 1541 (push (cons (buffer-substring (match-beginning 1)
1541 (match-end 1)) 1542 (match-end 1))
1542 (string-to-int 1543 (string-to-number
1543 (buffer-substring (match-beginning 2) 1544 (buffer-substring (match-beginning 2)
1544 (match-end 2)))) 1545 (match-end 2))))
1545 crosses) 1546 crosses)
@@ -2551,7 +2552,7 @@ The following commands are available:
2551 (buffer-disable-undo) 2552 (buffer-disable-undo)
2552 (setq truncate-lines t) 2553 (setq truncate-lines t)
2553 (setq buffer-read-only t) 2554 (setq buffer-read-only t)
2554 (gnus-run-hooks 'gnus-category-mode-hook)) 2555 (gnus-run-mode-hooks 'gnus-category-mode-hook))
2555 2556
2556(defalias 'gnus-category-position-point 'gnus-goto-colon) 2557(defalias 'gnus-category-position-point 'gnus-goto-colon)
2557 2558
@@ -3702,7 +3703,7 @@ If REREAD is not nil, downloaded articles are marked as unread."
3702 (dir (file-name-directory file)) 3703 (dir (file-name-directory file))
3703 point 3704 point
3704 (downloaded (if (file-exists-p dir) 3705 (downloaded (if (file-exists-p dir)
3705 (sort (mapcar (lambda (name) (string-to-int name)) 3706 (sort (mapcar (lambda (name) (string-to-number name))
3706 (directory-files dir nil "^[0-9]+$" t)) 3707 (directory-files dir nil "^[0-9]+$" t))
3707 '>) 3708 '>)
3708 (progn (gnus-make-directory dir) nil))) 3709 (progn (gnus-make-directory dir) nil)))
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index b1a51d65edd..498596dd63c 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -367,8 +367,12 @@ advertisements. For example:
367 (or (nth 4 spec) 3) 367 (or (nth 4 spec) 3)
368 (intern (format "gnus-emphasis-%s" (nth 2 spec))))) 368 (intern (format "gnus-emphasis-%s" (nth 2 spec)))))
369 types)) 369 types))
370 '(("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)" 370 '(;; I've never seen anyone use this strikethru convention whereas I've
371 2 3 gnus-emphasis-strikethru) 371 ;; several times seen it triggered by normal text. --Stef
372 ;; Miles suggests that this form is sometimes used but for italics,
373 ;; so maybe we should map it to `italic'.
374 ;; ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)"
375 ;; 2 3 gnus-emphasis-strikethru)
372 ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" 376 ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)"
373 2 3 gnus-emphasis-underline)))) 377 2 3 gnus-emphasis-underline))))
374 "*Alist that says how to fontify certain phrases. 378 "*Alist that says how to fontify certain phrases.
@@ -814,6 +818,7 @@ When nil (the default value), then some MIME parts do not get buttons,
814as described by the variables `gnus-buttonized-mime-types' and 818as described by the variables `gnus-buttonized-mime-types' and
815`gnus-unbuttonized-mime-types'." 819`gnus-unbuttonized-mime-types'."
816 :version "22.1" 820 :version "22.1"
821 :group 'gnus-article-mime
817 :type 'boolean) 822 :type 'boolean)
818 823
819(defcustom gnus-body-boundary-delimiter "_" 824(defcustom gnus-body-boundary-delimiter "_"
@@ -2180,10 +2185,11 @@ unfolded."
2180 ;; The command is a string, so we interpret the command 2185 ;; The command is a string, so we interpret the command
2181 ;; as a, well, command, and fork it off. 2186 ;; as a, well, command, and fork it off.
2182 (let ((process-connection-type nil)) 2187 (let ((process-connection-type nil))
2183 (process-kill-without-query 2188 (gnus-set-process-query-on-exit-flag
2184 (start-process 2189 (start-process
2185 "article-x-face" nil shell-file-name 2190 "article-x-face" nil shell-file-name
2186 shell-command-switch gnus-article-x-face-command)) 2191 shell-command-switch gnus-article-x-face-command)
2192 nil)
2187 (with-temp-buffer 2193 (with-temp-buffer
2188 (insert face) 2194 (insert face)
2189 (process-send-region "article-x-face" 2195 (process-send-region "article-x-face"
@@ -3032,20 +3038,21 @@ function and want to see what the date was before converting."
3032 3038
3033(defun article-update-date-lapsed () 3039(defun article-update-date-lapsed ()
3034 "Function to be run from a timer to update the lapsed time line." 3040 "Function to be run from a timer to update the lapsed time line."
3035 (let (deactivate-mark) 3041 (save-match-data
3036 (save-excursion 3042 (let (deactivate-mark)
3037 (ignore-errors 3043 (save-excursion
3038 (walk-windows 3044 (ignore-errors
3039 (lambda (w) 3045 (walk-windows
3040 (set-buffer (window-buffer w)) 3046 (lambda (w)
3041 (when (eq major-mode 'gnus-article-mode) 3047 (set-buffer (window-buffer w))
3042 (let ((mark (point-marker))) 3048 (when (eq major-mode 'gnus-article-mode)
3043 (goto-char (point-min)) 3049 (let ((mark (point-marker)))
3044 (when (re-search-forward "^X-Sent:" nil t) 3050 (goto-char (point-min))
3045 (article-date-lapsed t)) 3051 (when (re-search-forward "^X-Sent:" nil t)
3046 (goto-char (marker-position mark)) 3052 (article-date-lapsed t))
3047 (move-marker mark nil)))) 3053 (goto-char (marker-position mark))
3048 nil 'visible))))) 3054 (move-marker mark nil))))
3055 nil 'visible))))))
3049 3056
3050(defun gnus-start-date-timer (&optional n) 3057(defun gnus-start-date-timer (&optional n)
3051 "Start a timer to update the X-Sent header in the article buffers. 3058 "Start a timer to update the X-Sent header in the article buffers.
@@ -3741,7 +3748,7 @@ commands:
3741 (setq buffer-read-only t) 3748 (setq buffer-read-only t)
3742 (set-syntax-table gnus-article-mode-syntax-table) 3749 (set-syntax-table gnus-article-mode-syntax-table)
3743 (mm-enable-multibyte) 3750 (mm-enable-multibyte)
3744 (gnus-run-hooks 'gnus-article-mode-hook)) 3751 (gnus-run-mode-hooks 'gnus-article-mode-hook))
3745 3752
3746(defun gnus-article-setup-buffer () 3753(defun gnus-article-setup-buffer ()
3747 "Initialize the article buffer." 3754 "Initialize the article buffer."
@@ -6786,7 +6793,7 @@ specified by `gnus-button-alist'."
6786 (match-string 3 address) 6793 (match-string 3 address)
6787 "nntp"))) 6794 "nntp")))
6788 nil nil nil 6795 nil nil nil
6789 (and (match-end 6) (list (string-to-int (match-string 6 address)))))))) 6796 (and (match-end 6) (list (string-to-number (match-string 6 address))))))))
6790 6797
6791(defun gnus-url-parse-query-string (query &optional downcase) 6798(defun gnus-url-parse-query-string (query &optional downcase)
6792 (let (retval pairs cur key val) 6799 (let (retval pairs cur key val)
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el
index 657ade98167..55544d1525c 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -487,7 +487,7 @@ Returns the list of articles removed."
487 articles) 487 articles)
488 (when (file-exists-p dir) 488 (when (file-exists-p dir)
489 (setq articles 489 (setq articles
490 (sort (mapcar (lambda (name) (string-to-int name)) 490 (sort (mapcar (lambda (name) (string-to-number name))
491 (directory-files dir nil "^[0-9]+$" t)) 491 (directory-files dir nil "^[0-9]+$" t))
492 '<)) 492 '<))
493 ;; Update the cache active file, just to synch more. 493 ;; Update the cache active file, just to synch more.
@@ -681,7 +681,7 @@ If LOW, update the lower bound instead."
681 ;; Separate articles from all other files and directories. 681 ;; Separate articles from all other files and directories.
682 (while files 682 (while files
683 (if (string-match "^[0-9]+$" (file-name-nondirectory (car files))) 683 (if (string-match "^[0-9]+$" (file-name-nondirectory (car files)))
684 (push (string-to-int (file-name-nondirectory (pop files))) nums) 684 (push (string-to-number (file-name-nondirectory (pop files))) nums)
685 (push (pop files) alphs))) 685 (push (pop files) alphs)))
686 ;; If we have nums, then this is probably a valid group. 686 ;; If we have nums, then this is probably a valid group.
687 (when (setq nums (sort nums '<)) 687 (when (setq nums (sort nums '<))
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index e60ea32e126..090a365f994 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -1,6 +1,7 @@
1;;; gnus-cite.el --- parse citations in articles for Gnus 1;;; gnus-cite.el --- parse citations in articles for Gnus
2 2
3;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 3;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005
4;; Free Software Foundation, Inc. 5;; Free Software Foundation, Inc.
5 6
6;; Author: Per Abhiddenware 7;; Author: Per Abhiddenware
@@ -138,7 +139,8 @@ the envelope From line."
138 139
139(defface gnus-cite-attribution-face '((t 140(defface gnus-cite-attribution-face '((t
140 (:italic t))) 141 (:italic t)))
141 "Face used for attribution lines.") 142 "Face used for attribution lines."
143 :group 'gnus-cite)
142 144
143(defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face 145(defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face
144 "Face used for attribution lines. 146 "Face used for attribution lines.
@@ -155,7 +157,8 @@ It is merged with the face for the cited text belonging to the attribution."
155 (:foreground "MidnightBlue")) 157 (:foreground "MidnightBlue"))
156 (t 158 (t
157 (:italic t))) 159 (:italic t)))
158 "Citation face.") 160 "Citation face."
161 :group 'gnus-cite)
159 162
160(defface gnus-cite-face-2 '((((class color) 163(defface gnus-cite-face-2 '((((class color)
161 (background dark)) 164 (background dark))
@@ -165,7 +168,8 @@ It is merged with the face for the cited text belonging to the attribution."
165 (:foreground "firebrick")) 168 (:foreground "firebrick"))
166 (t 169 (t
167 (:italic t))) 170 (:italic t)))
168 "Citation face.") 171 "Citation face."
172 :group 'gnus-cite)
169 173
170(defface gnus-cite-face-3 '((((class color) 174(defface gnus-cite-face-3 '((((class color)
171 (background dark)) 175 (background dark))
@@ -175,7 +179,8 @@ It is merged with the face for the cited text belonging to the attribution."
175 (:foreground "dark green")) 179 (:foreground "dark green"))
176 (t 180 (t
177 (:italic t))) 181 (:italic t)))
178 "Citation face.") 182 "Citation face."
183 :group 'gnus-cite)
179 184
180(defface gnus-cite-face-4 '((((class color) 185(defface gnus-cite-face-4 '((((class color)
181 (background dark)) 186 (background dark))
@@ -185,7 +190,8 @@ It is merged with the face for the cited text belonging to the attribution."
185 (:foreground "OrangeRed")) 190 (:foreground "OrangeRed"))
186 (t 191 (t
187 (:italic t))) 192 (:italic t)))
188 "Citation face.") 193 "Citation face."
194 :group 'gnus-cite)
189 195
190(defface gnus-cite-face-5 '((((class color) 196(defface gnus-cite-face-5 '((((class color)
191 (background dark)) 197 (background dark))
@@ -195,7 +201,8 @@ It is merged with the face for the cited text belonging to the attribution."
195 (:foreground "dark khaki")) 201 (:foreground "dark khaki"))
196 (t 202 (t
197 (:italic t))) 203 (:italic t)))
198 "Citation face.") 204 "Citation face."
205 :group 'gnus-cite)
199 206
200(defface gnus-cite-face-6 '((((class color) 207(defface gnus-cite-face-6 '((((class color)
201 (background dark)) 208 (background dark))
@@ -205,7 +212,8 @@ It is merged with the face for the cited text belonging to the attribution."
205 (:foreground "dark violet")) 212 (:foreground "dark violet"))
206 (t 213 (t
207 (:italic t))) 214 (:italic t)))
208 "Citation face.") 215 "Citation face."
216 :group 'gnus-cite)
209 217
210(defface gnus-cite-face-7 '((((class color) 218(defface gnus-cite-face-7 '((((class color)
211 (background dark)) 219 (background dark))
@@ -215,7 +223,8 @@ It is merged with the face for the cited text belonging to the attribution."
215 (:foreground "SteelBlue4")) 223 (:foreground "SteelBlue4"))
216 (t 224 (t
217 (:italic t))) 225 (:italic t)))
218 "Citation face.") 226 "Citation face."
227 :group 'gnus-cite)
219 228
220(defface gnus-cite-face-8 '((((class color) 229(defface gnus-cite-face-8 '((((class color)
221 (background dark)) 230 (background dark))
@@ -225,7 +234,8 @@ It is merged with the face for the cited text belonging to the attribution."
225 (:foreground "magenta")) 234 (:foreground "magenta"))
226 (t 235 (t
227 (:italic t))) 236 (:italic t)))
228 "Citation face.") 237 "Citation face."
238 :group 'gnus-cite)
229 239
230(defface gnus-cite-face-9 '((((class color) 240(defface gnus-cite-face-9 '((((class color)
231 (background dark)) 241 (background dark))
@@ -235,7 +245,8 @@ It is merged with the face for the cited text belonging to the attribution."
235 (:foreground "violet")) 245 (:foreground "violet"))
236 (t 246 (t
237 (:italic t))) 247 (:italic t)))
238 "Citation face.") 248 "Citation face."
249 :group 'gnus-cite)
239 250
240(defface gnus-cite-face-10 '((((class color) 251(defface gnus-cite-face-10 '((((class color)
241 (background dark)) 252 (background dark))
@@ -245,7 +256,8 @@ It is merged with the face for the cited text belonging to the attribution."
245 (:foreground "medium purple")) 256 (:foreground "medium purple"))
246 (t 257 (t
247 (:italic t))) 258 (:italic t)))
248 "Citation face.") 259 "Citation face."
260 :group 'gnus-cite)
249 261
250(defface gnus-cite-face-11 '((((class color) 262(defface gnus-cite-face-11 '((((class color)
251 (background dark)) 263 (background dark))
@@ -255,7 +267,8 @@ It is merged with the face for the cited text belonging to the attribution."
255 (:foreground "turquoise")) 267 (:foreground "turquoise"))
256 (t 268 (t
257 (:italic t))) 269 (:italic t)))
258 "Citation face.") 270 "Citation face."
271 :group 'gnus-cite)
259 272
260(defcustom gnus-cite-face-list 273(defcustom gnus-cite-face-list
261 '(gnus-cite-face-1 gnus-cite-face-2 gnus-cite-face-3 gnus-cite-face-4 274 '(gnus-cite-face-1 gnus-cite-face-2 gnus-cite-face-3 gnus-cite-face-4
@@ -1004,6 +1017,7 @@ See also the documentation for `gnus-article-highlight-citation'."
1004 (when (< from to) 1017 (when (< from to)
1005 (push (setq overlay (gnus-make-overlay from to)) 1018 (push (setq overlay (gnus-make-overlay from to))
1006 gnus-cite-overlay-list) 1019 gnus-cite-overlay-list)
1020 (gnus-overlay-put overlay 'evaporate t)
1007 (gnus-overlay-put overlay 'face face)))))) 1021 (gnus-overlay-put overlay 'face face))))))
1008 1022
1009(defun gnus-cite-toggle (prefix) 1023(defun gnus-cite-toggle (prefix)
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el
index 4388db5c9e5..0c31ea9dd1b 100644
--- a/lisp/gnus/gnus-cus.el
+++ b/lisp/gnus/gnus-cus.el
@@ -1,6 +1,6 @@
1;;; gnus-cus.el --- customization commands for Gnus 1;;; gnus-cus.el --- customization commands for Gnus
2;; 2;;
3;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004 3;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Per Abrahamsen <abraham@dina.kvl.dk> 6;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
@@ -67,7 +67,7 @@ if that value is non-nil."
67 (set (make-local-variable 'widget-push-button-suffix) "") 67 (set (make-local-variable 'widget-push-button-suffix) "")
68 (set (make-local-variable 'widget-link-prefix) "") 68 (set (make-local-variable 'widget-link-prefix) "")
69 (set (make-local-variable 'widget-link-suffix) "")) 69 (set (make-local-variable 'widget-link-suffix) ""))
70 (gnus-run-hooks 'gnus-custom-mode-hook)) 70 (gnus-run-mode-hooks 'gnus-custom-mode-hook))
71 71
72;;; Group Customization: 72;;; Group Customization:
73 73
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el
index 093f4bd7806..c34c3b6df88 100644
--- a/lisp/gnus/gnus-diary.el
+++ b/lisp/gnus/gnus-diary.el
@@ -1,6 +1,6 @@
1;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend 1;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend
2 2
3;; Copyright (c) 2001, 2002, 2003 Free Software Foundation, Inc. 3;; Copyright (c) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4;; Copyright (C) 1999, 2000, 2001 Didier Verna. 4;; Copyright (C) 1999, 2000, 2001 Didier Verna.
5 5
6;; Author: Didier Verna <didier@xemacs.org> 6;; Author: Didier Verna <didier@xemacs.org>
@@ -103,7 +103,8 @@
103 103
104(defgroup gnus-diary nil 104(defgroup gnus-diary nil
105 "Utilities on top of the nndiary backend for Gnus." 105 "Utilities on top of the nndiary backend for Gnus."
106 :version "22.1") 106 :version "22.1"
107 :group 'gnus)
107 108
108(defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n" 109(defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n"
109 "*Summary line format for nndiary groups." 110 "*Summary line format for nndiary groups."
diff --git a/lisp/gnus/gnus-eform.el b/lisp/gnus/gnus-eform.el
index ae5debaff01..b1e83eab7ec 100644
--- a/lisp/gnus/gnus-eform.el
+++ b/lisp/gnus/gnus-eform.el
@@ -1,5 +1,5 @@
1;;; gnus-eform.el --- a mode for editing forms for Gnus 1;;; gnus-eform.el --- a mode for editing forms for Gnus
2;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004 2;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -83,7 +83,7 @@ It is a slightly enhanced emacs-lisp-mode.
83 (use-local-map gnus-edit-form-mode-map) 83 (use-local-map gnus-edit-form-mode-map)
84 (make-local-variable 'gnus-edit-form-done-function) 84 (make-local-variable 'gnus-edit-form-done-function)
85 (make-local-variable 'gnus-prev-winconf) 85 (make-local-variable 'gnus-prev-winconf)
86 (gnus-run-hooks 'gnus-edit-form-mode-hook)) 86 (gnus-run-mode-hooks 'gnus-edit-form-mode-hook))
87 87
88(defun gnus-edit-form (form documentation exit-func) 88(defun gnus-edit-form (form documentation exit-func)
89 "Edit FORM in a new buffer. 89 "Edit FORM in a new buffer.
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 30b7fe68dd1..f1343d9dbd3 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1,5 +1,5 @@
1;;; gnus-group.el --- group mode commands for Gnus 1;;; gnus-group.el --- group mode commands for Gnus
2;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 2;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -41,7 +41,11 @@
41(require 'time-date) 41(require 'time-date)
42(require 'gnus-ems) 42(require 'gnus-ems)
43 43
44(eval-when-compile (require 'mm-url)) 44(eval-when-compile
45 (require 'mm-url)
46 (let ((features (cons 'gnus-group features)))
47 (require 'gnus-sum))
48 (defvar gnus-cache-active-hashtb))
45 49
46(defcustom gnus-group-archive-directory 50(defcustom gnus-group-archive-directory
47 "/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/" 51 "/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/"
@@ -1042,7 +1046,7 @@ The following commands are available:
1042 (gnus-undo-mode 1)) 1046 (gnus-undo-mode 1))
1043 (when gnus-slave 1047 (when gnus-slave
1044 (gnus-slave-mode)) 1048 (gnus-slave-mode))
1045 (gnus-run-hooks 'gnus-group-mode-hook)) 1049 (gnus-run-mode-hooks 'gnus-group-mode-hook))
1046 1050
1047(defun gnus-update-group-mark-positions () 1051(defun gnus-update-group-mark-positions ()
1048 (save-excursion 1052 (save-excursion
@@ -1452,7 +1456,7 @@ if it is a string, only list groups matching REGEXP."
1452 (eval gnus-group-line-format-spec))) 1456 (eval gnus-group-line-format-spec)))
1453 `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb) 1457 `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb)
1454 gnus-unread ,(if (numberp number) 1458 gnus-unread ,(if (numberp number)
1455 (string-to-int gnus-tmp-number-of-unread) 1459 (string-to-number gnus-tmp-number-of-unread)
1456 t) 1460 t)
1457 gnus-marked ,gnus-tmp-marked-mark 1461 gnus-marked ,gnus-tmp-marked-mark
1458 gnus-indentation ,gnus-group-indentation 1462 gnus-indentation ,gnus-group-indentation
@@ -3246,7 +3250,7 @@ Uses the process/prefix convention."
3246 (progn 3250 (progn
3247 (unless (gnus-group-process-prefix current-prefix-arg) 3251 (unless (gnus-group-process-prefix current-prefix-arg)
3248 (error "No group on the current line")) 3252 (error "No group on the current line"))
3249 (string-to-int 3253 (string-to-number
3250 (let ((s (read-string 3254 (let ((s (read-string
3251 (format "Level (default %s): " 3255 (format "Level (default %s): "
3252 (or (gnus-group-group-level) 3256 (or (gnus-group-group-level)
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el
index 7b04422b36c..e35ee0858b4 100644
--- a/lisp/gnus/gnus-kill.el
+++ b/lisp/gnus/gnus-kill.el
@@ -1,5 +1,5 @@
1;;; gnus-kill.el --- kill commands for Gnus 1;;; gnus-kill.el --- kill commands for Gnus
2;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 2;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 5;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -161,7 +161,7 @@ gnus-kill-file-mode-hook with no arguments, if that value is non-nil."
161 (setq major-mode 'gnus-kill-file-mode) 161 (setq major-mode 'gnus-kill-file-mode)
162 (setq mode-name "Kill") 162 (setq mode-name "Kill")
163 (lisp-mode-variables nil) 163 (lisp-mode-variables nil)
164 (gnus-run-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) 164 (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook))
165 165
166(defun gnus-kill-file-edit-file (newsgroup) 166(defun gnus-kill-file-edit-file (newsgroup)
167 "Begin editing a kill file for NEWSGROUP. 167 "Begin editing a kill file for NEWSGROUP.
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index 0f4984112f5..f3ad1546993 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -1,6 +1,6 @@
1;;; gnus-salt.el --- alternate summary mode interfaces for Gnus 1;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
2 2
3;; Copyright (C) 1996, 1997, 1998, 1999, 2001 3;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -496,7 +496,7 @@ Two predefined functions are available:
496 (gnus-set-work-buffer) 496 (gnus-set-work-buffer)
497 (gnus-tree-node-insert (make-mail-header "") nil) 497 (gnus-tree-node-insert (make-mail-header "") nil)
498 (setq gnus-tree-node-length (1- (point)))) 498 (setq gnus-tree-node-length (1- (point))))
499 (gnus-run-hooks 'gnus-tree-mode-hook)) 499 (gnus-run-mode-hooks 'gnus-tree-mode-hook))
500 500
501(defun gnus-tree-read-summary-keys (&optional arg) 501(defun gnus-tree-read-summary-keys (&optional arg)
502 "Read a summary buffer key sequence and execute it." 502 "Read a summary buffer key sequence and execute it."
@@ -1009,7 +1009,7 @@ The following commands are available:
1009 (buffer-disable-undo) 1009 (buffer-disable-undo)
1010 (setq buffer-read-only t) 1010 (setq buffer-read-only t)
1011 (make-local-variable 'gnus-carpal-attached-buffer) 1011 (make-local-variable 'gnus-carpal-attached-buffer)
1012 (gnus-run-hooks 'gnus-carpal-mode-hook)) 1012 (gnus-run-mode-hooks 'gnus-carpal-mode-hook))
1013 1013
1014(defun gnus-carpal-setup-buffer (type) 1014(defun gnus-carpal-setup-buffer (type)
1015 (let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type))))) 1015 (let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type)))))
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index 3a22f9030e5..a2c3b249343 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -826,7 +826,7 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header."
826 ;; If this is an integer comparison, we transform from string to int. 826 ;; If this is an integer comparison, we transform from string to int.
827 (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) 827 (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
828 (if (stringp match) 828 (if (stringp match)
829 (setq match (string-to-int match))) 829 (setq match (string-to-number match)))
830 (set-text-properties 0 (length match) nil match)) 830 (set-text-properties 0 (length match) nil match))
831 831
832 (unless (eq date 'now) 832 (unless (eq date 'now)
@@ -891,7 +891,7 @@ EXTRA is the possible non-standard header."
891 t) 891 t)
892 (read-string "Match: ") 892 (read-string "Match: ")
893 (if (y-or-n-p "Use regexp match? ") 'r 's) 893 (if (y-or-n-p "Use regexp match? ") 'r 's)
894 (string-to-int (read-string "Score: ")))) 894 (string-to-number (read-string "Score: "))))
895 (save-excursion 895 (save-excursion
896 (unless (and (stringp match) (> (length match) 0)) 896 (unless (and (stringp match) (> (length match) 0))
897 (error "No match")) 897 (error "No match"))
@@ -945,7 +945,7 @@ EXTRA is the possible non-standard header."
945 "Automatically mark articles with score below SCORE as read." 945 "Automatically mark articles with score below SCORE as read."
946 (interactive 946 (interactive
947 (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) 947 (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg))
948 (string-to-int (read-string "Mark below: "))))) 948 (string-to-number (read-string "Mark below: ")))))
949 (setq score (or score gnus-summary-default-score 0)) 949 (setq score (or score gnus-summary-default-score 0))
950 (gnus-score-set 'mark (list score)) 950 (gnus-score-set 'mark (list score))
951 (gnus-score-set 'touched '(t)) 951 (gnus-score-set 'touched '(t))
@@ -979,7 +979,7 @@ EXTRA is the possible non-standard header."
979 "Automatically expunge articles with score below SCORE." 979 "Automatically expunge articles with score below SCORE."
980 (interactive 980 (interactive
981 (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) 981 (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg))
982 (string-to-int (read-string "Set expunge below: "))))) 982 (string-to-number (read-string "Set expunge below: ")))))
983 (setq score (or score gnus-summary-default-score 0)) 983 (setq score (or score gnus-summary-default-score 0))
984 (gnus-score-set 'expunge (list score)) 984 (gnus-score-set 'expunge (list score))
985 (gnus-score-set 'touched '(t))) 985 (gnus-score-set 'touched '(t)))
diff --git a/lisp/gnus/gnus-soup.el b/lisp/gnus/gnus-soup.el
index 55dc1635542..48a8fc0c380 100644
--- a/lisp/gnus/gnus-soup.el
+++ b/lisp/gnus/gnus-soup.el
@@ -349,9 +349,9 @@ If NOT-ALL, don't pack ticked articles."
349 (packer (if (< (string-match "%s" packer) 349 (packer (if (< (string-match "%s" packer)
350 (string-match "%d" packer)) 350 (string-match "%d" packer))
351 (format packer files 351 (format packer files
352 (string-to-int (gnus-soup-unique-prefix dir))) 352 (string-to-number (gnus-soup-unique-prefix dir)))
353 (format packer 353 (format packer
354 (string-to-int (gnus-soup-unique-prefix dir)) 354 (string-to-number (gnus-soup-unique-prefix dir))
355 files))) 355 files)))
356 (dir (expand-file-name dir))) 356 (dir (expand-file-name dir)))
357 (gnus-make-directory dir) 357 (gnus-make-directory dir)
@@ -385,7 +385,7 @@ though the two last may be nil if they are missing."
385 (and (eq (preceding-char) ?\t) 385 (and (eq (preceding-char) ?\t)
386 (gnus-soup-field)) 386 (gnus-soup-field))
387 (and (eq (preceding-char) ?\t) 387 (and (eq (preceding-char) ?\t)
388 (string-to-int (gnus-soup-field)))) 388 (string-to-number (gnus-soup-field))))
389 areas) 389 areas)
390 (when (eq (preceding-char) ?\t) 390 (when (eq (preceding-char) ?\t)
391 (beginning-of-line 2))) 391 (beginning-of-line 2)))
@@ -535,7 +535,7 @@ Return whether the unpacking was successful."
535 (error "Bad header")) 535 (error "Bad header"))
536 (forward-line 1) 536 (forward-line 1)
537 (setq beg (point) 537 (setq beg (point)
538 end (+ (point) (string-to-int 538 end (+ (point) (string-to-number
539 (buffer-substring 539 (buffer-substring
540 (match-beginning 1) (match-end 1))))) 540 (match-beginning 1) (match-end 1)))))
541 (switch-to-buffer tmp-buf) 541 (switch-to-buffer tmp-buf)
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index ef1c43167f5..39b87727279 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -509,7 +509,7 @@ are supported for %s."
509 (t 509 (t
510 (if (null args) 510 (if (null args)
511 (error 'wrong-number-of-arguments #'my-format n fstring)) 511 (error 'wrong-number-of-arguments #'my-format n fstring))
512 (let* ((minlen (string-to-int (or (match-string 2) ""))) 512 (let* ((minlen (string-to-number (or (match-string 2) "")))
513 (arg (car args)) 513 (arg (car args))
514 (str (if (stringp arg) arg (format "%s" arg))) 514 (str (if (stringp arg) arg (format "%s" arg)))
515 (lpad (null (match-string 1))) 515 (lpad (null (match-string 1)))
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index 7b3c033fddb..1c2ba9447ff 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -1,5 +1,6 @@
1;;; gnus-srvr.el --- virtual server support for Gnus 1;;; gnus-srvr.el --- virtual server support for Gnus
2;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 2;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3;; 2004, 2005
3;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
4 5
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -269,7 +270,7 @@ The following commands are available:
269 (put 'gnus-server-mode 'font-lock-defaults '(gnus-server-font-lock-keywords t)) 270 (put 'gnus-server-mode 'font-lock-defaults '(gnus-server-font-lock-keywords t))
270 (set (make-local-variable 'font-lock-defaults) 271 (set (make-local-variable 'font-lock-defaults)
271 '(gnus-server-font-lock-keywords t))) 272 '(gnus-server-font-lock-keywords t)))
272 (gnus-run-hooks 'gnus-server-mode-hook)) 273 (gnus-run-mode-hooks 'gnus-server-mode-hook))
273 274
274(defun gnus-server-insert-server-line (gnus-tmp-name method) 275(defun gnus-server-insert-server-line (gnus-tmp-name method)
275 (let* ((gnus-tmp-how (car method)) 276 (let* ((gnus-tmp-how (car method))
@@ -849,7 +850,7 @@ buffer.
849 (setq truncate-lines t) 850 (setq truncate-lines t)
850 (gnus-set-default-directory) 851 (gnus-set-default-directory)
851 (setq buffer-read-only t) 852 (setq buffer-read-only t)
852 (gnus-run-hooks 'gnus-browse-mode-hook)) 853 (gnus-run-mode-hooks 'gnus-browse-mode-hook))
853 854
854(defun gnus-browse-read-group (&optional no-article number) 855(defun gnus-browse-read-group (&optional no-article number)
855 "Enter the group at the current line. 856 "Enter the group at the current line.
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index b125a19be77..7c85409fb31 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2518,7 +2518,7 @@ If FORCE is non-nil, the .newsrc file is read."
2518 (cond 2518 (cond
2519 ((looking-at "[0-9]+") 2519 ((looking-at "[0-9]+")
2520 ;; We narrow and read a number instead of buffer-substring/ 2520 ;; We narrow and read a number instead of buffer-substring/
2521 ;; string-to-int because it's faster. narrow/widen is 2521 ;; string-to-number because it's faster. narrow/widen is
2522 ;; faster than save-restriction/narrow, and save-restriction 2522 ;; faster than save-restriction/narrow, and save-restriction
2523 ;; produces a garbage object. 2523 ;; produces a garbage object.
2524 (setq num1 (progn 2524 (setq num1 (progn
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 17cb1ea2a6b..8d4c536229b 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -2722,7 +2722,7 @@ The following commands are available:
2722 (make-local-variable 'gnus-summary-mark-positions) 2722 (make-local-variable 'gnus-summary-mark-positions)
2723 (gnus-make-local-hook 'pre-command-hook) 2723 (gnus-make-local-hook 'pre-command-hook)
2724 (add-hook 'pre-command-hook 'gnus-set-global-variables nil t) 2724 (add-hook 'pre-command-hook 'gnus-set-global-variables nil t)
2725 (gnus-run-hooks 'gnus-summary-mode-hook) 2725 (gnus-run-mode-hooks 'gnus-summary-mode-hook)
2726 (turn-on-gnus-mailing-list-mode) 2726 (turn-on-gnus-mailing-list-mode)
2727 (mm-enable-multibyte) 2727 (mm-enable-multibyte)
2728 (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy) 2728 (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy)
@@ -5660,7 +5660,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
5660 (match-end 1))) 5660 (match-end 1)))
5661 (substring xrefs (match-beginning 1) (match-end 1)))) 5661 (substring xrefs (match-beginning 1) (match-end 1))))
5662 (setq number 5662 (setq number
5663 (string-to-int (substring xrefs (match-beginning 2) 5663 (string-to-number (substring xrefs (match-beginning 2)
5664 (match-end 2)))) 5664 (match-end 2))))
5665 (if (setq entry (gnus-gethash group xref-hashtb)) 5665 (if (setq entry (gnus-gethash group xref-hashtb))
5666 (setcdr entry (cons number (cdr entry))) 5666 (setcdr entry (cons number (cdr entry)))
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 237e0507775..6171d42834e 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1015,6 +1015,13 @@ ARG is passed to the first function."
1015 (save-current-buffer 1015 (save-current-buffer
1016 (apply 'run-hooks funcs))) 1016 (apply 'run-hooks funcs)))
1017 1017
1018(defun gnus-run-mode-hooks (&rest funcs)
1019 "Run `run-mode-hooks' if it is available, otherwise `run-hooks'.
1020This function saves the current buffer."
1021 (if (fboundp 'run-mode-hooks)
1022 (save-current-buffer (apply 'run-mode-hooks funcs))
1023 (save-current-buffer (apply 'run-hooks funcs))))
1024
1018;;; Various 1025;;; Various
1019 1026
1020(defvar gnus-group-buffer) ; Compiler directive 1027(defvar gnus-group-buffer) ; Compiler directive
@@ -1564,6 +1571,11 @@ empty directories from OLD-PATH."
1564 (file-truename 1571 (file-truename
1565 (concat old-dir ".."))))))))) 1572 (concat old-dir "..")))))))))
1566 1573
1574(if (fboundp 'set-process-query-on-exit-flag)
1575 (defalias 'gnus-set-process-query-on-exit-flag
1576 'set-process-query-on-exit-flag)
1577 (defalias 'gnus-set-process-query-on-exit-flag
1578 'process-kill-without-query))
1567 1579
1568(provide 'gnus-util) 1580(provide 'gnus-util)
1569 1581
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index 3b2a29c238e..a705f230241 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -1185,7 +1185,7 @@ When called interactively, prompt for REGEXP."
1185 (ignore-errors 1185 (ignore-errors
1186 (replace-match 1186 (replace-match
1187 (format "%06d" 1187 (format "%06d"
1188 (string-to-int (buffer-substring 1188 (string-to-number (buffer-substring
1189 (match-beginning 0) (match-end 0))))))) 1189 (match-beginning 0) (match-end 0)))))))
1190 (setq string (buffer-substring 1 (point-max))) 1190 (setq string (buffer-substring 1 (point-max)))
1191 (setcar (car string-list) string) 1191 (setcar (car string-list) string)
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 98c41de45e5..a134ac661ac 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -366,7 +366,8 @@ be set in `.emacs' instead."
366 (:foreground "ForestGreen" :bold t)) 366 (:foreground "ForestGreen" :bold t))
367 (t 367 (t
368 ())) 368 ()))
369 "Level 1 newsgroup face.") 369 "Level 1 newsgroup face."
370 :group 'gnus-group)
370 371
371(defface gnus-group-news-1-empty-face 372(defface gnus-group-news-1-empty-face
372 '((((class color) 373 '((((class color)
@@ -377,7 +378,8 @@ be set in `.emacs' instead."
377 (:foreground "ForestGreen")) 378 (:foreground "ForestGreen"))
378 (t 379 (t
379 ())) 380 ()))
380 "Level 1 empty newsgroup face.") 381 "Level 1 empty newsgroup face."
382 :group 'gnus-group)
381 383
382(defface gnus-group-news-2-face 384(defface gnus-group-news-2-face
383 '((((class color) 385 '((((class color)
@@ -388,7 +390,8 @@ be set in `.emacs' instead."
388 (:foreground "CadetBlue4" :bold t)) 390 (:foreground "CadetBlue4" :bold t))
389 (t 391 (t
390 ())) 392 ()))
391 "Level 2 newsgroup face.") 393 "Level 2 newsgroup face."
394 :group 'gnus-group)
392 395
393(defface gnus-group-news-2-empty-face 396(defface gnus-group-news-2-empty-face
394 '((((class color) 397 '((((class color)
@@ -399,7 +402,8 @@ be set in `.emacs' instead."
399 (:foreground "CadetBlue4")) 402 (:foreground "CadetBlue4"))
400 (t 403 (t
401 ())) 404 ()))
402 "Level 2 empty newsgroup face.") 405 "Level 2 empty newsgroup face."
406 :group 'gnus-group)
403 407
404(defface gnus-group-news-3-face 408(defface gnus-group-news-3-face
405 '((((class color) 409 '((((class color)
@@ -410,7 +414,8 @@ be set in `.emacs' instead."
410 (:bold t)) 414 (:bold t))
411 (t 415 (t
412 ())) 416 ()))
413 "Level 3 newsgroup face.") 417 "Level 3 newsgroup face."
418 :group 'gnus-group)
414 419
415(defface gnus-group-news-3-empty-face 420(defface gnus-group-news-3-empty-face
416 '((((class color) 421 '((((class color)
@@ -421,7 +426,8 @@ be set in `.emacs' instead."
421 ()) 426 ())
422 (t 427 (t
423 ())) 428 ()))
424 "Level 3 empty newsgroup face.") 429 "Level 3 empty newsgroup face."
430 :group 'gnus-group)
425 431
426(defface gnus-group-news-4-face 432(defface gnus-group-news-4-face
427 '((((class color) 433 '((((class color)
@@ -432,7 +438,8 @@ be set in `.emacs' instead."
432 (:bold t)) 438 (:bold t))
433 (t 439 (t
434 ())) 440 ()))
435 "Level 4 newsgroup face.") 441 "Level 4 newsgroup face."
442 :group 'gnus-group)
436 443
437(defface gnus-group-news-4-empty-face 444(defface gnus-group-news-4-empty-face
438 '((((class color) 445 '((((class color)
@@ -443,7 +450,8 @@ be set in `.emacs' instead."
443 ()) 450 ())
444 (t 451 (t
445 ())) 452 ()))
446 "Level 4 empty newsgroup face.") 453 "Level 4 empty newsgroup face."
454 :group 'gnus-group)
447 455
448(defface gnus-group-news-5-face 456(defface gnus-group-news-5-face
449 '((((class color) 457 '((((class color)
@@ -454,7 +462,8 @@ be set in `.emacs' instead."
454 (:bold t)) 462 (:bold t))
455 (t 463 (t
456 ())) 464 ()))
457 "Level 5 newsgroup face.") 465 "Level 5 newsgroup face."
466 :group 'gnus-group)
458 467
459(defface gnus-group-news-5-empty-face 468(defface gnus-group-news-5-empty-face
460 '((((class color) 469 '((((class color)
@@ -465,7 +474,8 @@ be set in `.emacs' instead."
465 ()) 474 ())
466 (t 475 (t
467 ())) 476 ()))
468 "Level 5 empty newsgroup face.") 477 "Level 5 empty newsgroup face."
478 :group 'gnus-group)
469 479
470(defface gnus-group-news-6-face 480(defface gnus-group-news-6-face
471 '((((class color) 481 '((((class color)
@@ -476,7 +486,8 @@ be set in `.emacs' instead."
476 (:bold t)) 486 (:bold t))
477 (t 487 (t
478 ())) 488 ()))
479 "Level 6 newsgroup face.") 489 "Level 6 newsgroup face."
490 :group 'gnus-group)
480 491
481(defface gnus-group-news-6-empty-face 492(defface gnus-group-news-6-empty-face
482 '((((class color) 493 '((((class color)
@@ -487,7 +498,8 @@ be set in `.emacs' instead."
487 ()) 498 ())
488 (t 499 (t
489 ())) 500 ()))
490 "Level 6 empty newsgroup face.") 501 "Level 6 empty newsgroup face."
502 :group 'gnus-group)
491 503
492(defface gnus-group-news-low-face 504(defface gnus-group-news-low-face
493 '((((class color) 505 '((((class color)
@@ -498,7 +510,8 @@ be set in `.emacs' instead."
498 (:foreground "DarkGreen" :bold t)) 510 (:foreground "DarkGreen" :bold t))
499 (t 511 (t
500 ())) 512 ()))
501 "Low level newsgroup face.") 513 "Low level newsgroup face."
514 :group 'gnus-group)
502 515
503(defface gnus-group-news-low-empty-face 516(defface gnus-group-news-low-empty-face
504 '((((class color) 517 '((((class color)
@@ -509,7 +522,8 @@ be set in `.emacs' instead."
509 (:foreground "DarkGreen")) 522 (:foreground "DarkGreen"))
510 (t 523 (t
511 ())) 524 ()))
512 "Low level empty newsgroup face.") 525 "Low level empty newsgroup face."
526 :group 'gnus-group)
513 527
514(defface gnus-group-mail-1-face 528(defface gnus-group-mail-1-face
515 '((((class color) 529 '((((class color)
@@ -520,7 +534,8 @@ be set in `.emacs' instead."
520 (:foreground "DeepPink3" :bold t)) 534 (:foreground "DeepPink3" :bold t))
521 (t 535 (t
522 (:bold t))) 536 (:bold t)))
523 "Level 1 mailgroup face.") 537 "Level 1 mailgroup face."
538 :group 'gnus-group)
524 539
525(defface gnus-group-mail-1-empty-face 540(defface gnus-group-mail-1-empty-face
526 '((((class color) 541 '((((class color)
@@ -531,7 +546,8 @@ be set in `.emacs' instead."
531 (:foreground "DeepPink3")) 546 (:foreground "DeepPink3"))
532 (t 547 (t
533 (:italic t :bold t))) 548 (:italic t :bold t)))
534 "Level 1 empty mailgroup face.") 549 "Level 1 empty mailgroup face."
550 :group 'gnus-group)
535 551
536(defface gnus-group-mail-2-face 552(defface gnus-group-mail-2-face
537 '((((class color) 553 '((((class color)
@@ -542,7 +558,8 @@ be set in `.emacs' instead."
542 (:foreground "HotPink3" :bold t)) 558 (:foreground "HotPink3" :bold t))
543 (t 559 (t
544 (:bold t))) 560 (:bold t)))
545 "Level 2 mailgroup face.") 561 "Level 2 mailgroup face."
562 :group 'gnus-group)
546 563
547(defface gnus-group-mail-2-empty-face 564(defface gnus-group-mail-2-empty-face
548 '((((class color) 565 '((((class color)
@@ -553,7 +570,8 @@ be set in `.emacs' instead."
553 (:foreground "HotPink3")) 570 (:foreground "HotPink3"))
554 (t 571 (t
555 (:bold t))) 572 (:bold t)))
556 "Level 2 empty mailgroup face.") 573 "Level 2 empty mailgroup face."
574 :group 'gnus-group)
557 575
558(defface gnus-group-mail-3-face 576(defface gnus-group-mail-3-face
559 '((((class color) 577 '((((class color)
@@ -564,7 +582,8 @@ be set in `.emacs' instead."
564 (:foreground "magenta4" :bold t)) 582 (:foreground "magenta4" :bold t))
565 (t 583 (t
566 (:bold t))) 584 (:bold t)))
567 "Level 3 mailgroup face.") 585 "Level 3 mailgroup face."
586 :group 'gnus-group)
568 587
569(defface gnus-group-mail-3-empty-face 588(defface gnus-group-mail-3-empty-face
570 '((((class color) 589 '((((class color)
@@ -575,7 +594,8 @@ be set in `.emacs' instead."
575 (:foreground "magenta4")) 594 (:foreground "magenta4"))
576 (t 595 (t
577 ())) 596 ()))
578 "Level 3 empty mailgroup face.") 597 "Level 3 empty mailgroup face."
598 :group 'gnus-group)
579 599
580(defface gnus-group-mail-low-face 600(defface gnus-group-mail-low-face
581 '((((class color) 601 '((((class color)
@@ -586,7 +606,8 @@ be set in `.emacs' instead."
586 (:foreground "DeepPink4" :bold t)) 606 (:foreground "DeepPink4" :bold t))
587 (t 607 (t
588 (:bold t))) 608 (:bold t)))
589 "Low level mailgroup face.") 609 "Low level mailgroup face."
610 :group 'gnus-group)
590 611
591(defface gnus-group-mail-low-empty-face 612(defface gnus-group-mail-low-empty-face
592 '((((class color) 613 '((((class color)
@@ -597,18 +618,21 @@ be set in `.emacs' instead."
597 (:foreground "DeepPink4")) 618 (:foreground "DeepPink4"))
598 (t 619 (t
599 (:bold t))) 620 (:bold t)))
600 "Low level empty mailgroup face.") 621 "Low level empty mailgroup face."
622 :group 'gnus-group)
601 623
602;; Summary mode faces. 624;; Summary mode faces.
603 625
604(defface gnus-summary-selected-face '((t 626(defface gnus-summary-selected-face '((t
605 (:underline t))) 627 (:underline t)))
606 "Face used for selected articles.") 628 "Face used for selected articles."
629 :group 'gnus-summary)
607 630
608(defface gnus-summary-cancelled-face 631(defface gnus-summary-cancelled-face
609 '((((class color)) 632 '((((class color))
610 (:foreground "yellow" :background "black"))) 633 (:foreground "yellow" :background "black")))
611 "Face used for cancelled articles.") 634 "Face used for cancelled articles."
635 :group 'gnus-summary)
612 636
613(defface gnus-summary-high-ticked-face 637(defface gnus-summary-high-ticked-face
614 '((((class color) 638 '((((class color)
@@ -619,7 +643,8 @@ be set in `.emacs' instead."
619 (:foreground "firebrick" :bold t)) 643 (:foreground "firebrick" :bold t))
620 (t 644 (t
621 (:bold t))) 645 (:bold t)))
622 "Face used for high interest ticked articles.") 646 "Face used for high interest ticked articles."
647 :group 'gnus-summary)
623 648
624(defface gnus-summary-low-ticked-face 649(defface gnus-summary-low-ticked-face
625 '((((class color) 650 '((((class color)
@@ -630,7 +655,8 @@ be set in `.emacs' instead."
630 (:foreground "firebrick" :italic t)) 655 (:foreground "firebrick" :italic t))
631 (t 656 (t
632 (:italic t))) 657 (:italic t)))
633 "Face used for low interest ticked articles.") 658 "Face used for low interest ticked articles."
659 :group 'gnus-summary)
634 660
635(defface gnus-summary-normal-ticked-face 661(defface gnus-summary-normal-ticked-face
636 '((((class color) 662 '((((class color)
@@ -641,7 +667,8 @@ be set in `.emacs' instead."
641 (:foreground "firebrick")) 667 (:foreground "firebrick"))
642 (t 668 (t
643 ())) 669 ()))
644 "Face used for normal interest ticked articles.") 670 "Face used for normal interest ticked articles."
671 :group 'gnus-summary)
645 672
646(defface gnus-summary-high-ancient-face 673(defface gnus-summary-high-ancient-face
647 '((((class color) 674 '((((class color)
@@ -652,7 +679,8 @@ be set in `.emacs' instead."
652 (:foreground "RoyalBlue" :bold t)) 679 (:foreground "RoyalBlue" :bold t))
653 (t 680 (t
654 (:bold t))) 681 (:bold t)))
655 "Face used for high interest ancient articles.") 682 "Face used for high interest ancient articles."
683 :group 'gnus-summary)
656 684
657(defface gnus-summary-low-ancient-face 685(defface gnus-summary-low-ancient-face
658 '((((class color) 686 '((((class color)
@@ -663,7 +691,8 @@ be set in `.emacs' instead."
663 (:foreground "RoyalBlue" :italic t)) 691 (:foreground "RoyalBlue" :italic t))
664 (t 692 (t
665 (:italic t))) 693 (:italic t)))
666 "Face used for low interest ancient articles.") 694 "Face used for low interest ancient articles."
695 :group 'gnus-summary)
667 696
668(defface gnus-summary-normal-ancient-face 697(defface gnus-summary-normal-ancient-face
669 '((((class color) 698 '((((class color)
@@ -674,7 +703,8 @@ be set in `.emacs' instead."
674 (:foreground "RoyalBlue")) 703 (:foreground "RoyalBlue"))
675 (t 704 (t
676 ())) 705 ()))
677 "Face used for normal interest ancient articles.") 706 "Face used for normal interest ancient articles."
707 :group 'gnus-summary)
678 708
679(defface gnus-summary-high-undownloaded-face 709(defface gnus-summary-high-undownloaded-face
680 '((((class color) 710 '((((class color)
@@ -683,7 +713,8 @@ be set in `.emacs' instead."
683 (((class color) (background dark)) 713 (((class color) (background dark))
684 (:bold t :foreground "LightGray")) 714 (:bold t :foreground "LightGray"))
685 (t (:inverse-video t :bold t))) 715 (t (:inverse-video t :bold t)))
686 "Face used for high interest uncached articles.") 716 "Face used for high interest uncached articles."
717 :group 'gnus-summary)
687 718
688(defface gnus-summary-low-undownloaded-face 719(defface gnus-summary-low-undownloaded-face
689 '((((class color) 720 '((((class color)
@@ -692,7 +723,8 @@ be set in `.emacs' instead."
692 (((class color) (background dark)) 723 (((class color) (background dark))
693 (:italic t :foreground "LightGray" :bold nil)) 724 (:italic t :foreground "LightGray" :bold nil))
694 (t (:inverse-video t :italic t))) 725 (t (:inverse-video t :italic t)))
695 "Face used for low interest uncached articles.") 726 "Face used for low interest uncached articles."
727 :group 'gnus-summary)
696 728
697(defface gnus-summary-normal-undownloaded-face 729(defface gnus-summary-normal-undownloaded-face
698 '((((class color) 730 '((((class color)
@@ -701,22 +733,26 @@ be set in `.emacs' instead."
701 (((class color) (background dark)) 733 (((class color) (background dark))
702 (:foreground "LightGray" :bold nil)) 734 (:foreground "LightGray" :bold nil))
703 (t (:inverse-video t))) 735 (t (:inverse-video t)))
704 "Face used for normal interest uncached articles.") 736 "Face used for normal interest uncached articles."
737 :group 'gnus-summary)
705 738
706(defface gnus-summary-high-unread-face 739(defface gnus-summary-high-unread-face
707 '((t 740 '((t
708 (:bold t))) 741 (:bold t)))
709 "Face used for high interest unread articles.") 742 "Face used for high interest unread articles."
743 :group 'gnus-summary)
710 744
711(defface gnus-summary-low-unread-face 745(defface gnus-summary-low-unread-face
712 '((t 746 '((t
713 (:italic t))) 747 (:italic t)))
714 "Face used for low interest unread articles.") 748 "Face used for low interest unread articles."
749 :group 'gnus-summary)
715 750
716(defface gnus-summary-normal-unread-face 751(defface gnus-summary-normal-unread-face
717 '((t 752 '((t
718 ())) 753 ()))
719 "Face used for normal interest unread articles.") 754 "Face used for normal interest unread articles."
755 :group 'gnus-summary)
720 756
721(defface gnus-summary-high-read-face 757(defface gnus-summary-high-read-face
722 '((((class color) 758 '((((class color)
@@ -729,7 +765,8 @@ be set in `.emacs' instead."
729 :bold t)) 765 :bold t))
730 (t 766 (t
731 (:bold t))) 767 (:bold t)))
732 "Face used for high interest read articles.") 768 "Face used for high interest read articles."
769 :group 'gnus-summary)
733 770
734(defface gnus-summary-low-read-face 771(defface gnus-summary-low-read-face
735 '((((class color) 772 '((((class color)
@@ -742,7 +779,8 @@ be set in `.emacs' instead."
742 :italic t)) 779 :italic t))
743 (t 780 (t
744 (:italic t))) 781 (:italic t)))
745 "Face used for low interest read articles.") 782 "Face used for low interest read articles."
783 :group 'gnus-summary)
746 784
747(defface gnus-summary-normal-read-face 785(defface gnus-summary-normal-read-face
748 '((((class color) 786 '((((class color)
@@ -753,7 +791,8 @@ be set in `.emacs' instead."
753 (:foreground "DarkGreen")) 791 (:foreground "DarkGreen"))
754 (t 792 (t
755 ())) 793 ()))
756 "Face used for normal interest read articles.") 794 "Face used for normal interest read articles."
795 :group 'gnus-summary)
757 796
758 797
759;;; 798;;;
@@ -806,7 +845,8 @@ be set in `.emacs' instead."
806 (:foreground "#888888")) 845 (:foreground "#888888"))
807 (t 846 (t
808 ())) 847 ()))
809 "Face for the splash screen.") 848 "Face for the splash screen."
849 :group 'gnus)
810 850
811(defun gnus-splash () 851(defun gnus-splash ()
812 (save-excursion 852 (save-excursion
diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el
index ef05af9bae6..81d8f5d8cc3 100644
--- a/lisp/gnus/html2text.el
+++ b/lisp/gnus/html2text.el
@@ -1,5 +1,5 @@
1;;; html2text.el --- a simple html to plain text converter 1;;; html2text.el --- a simple html to plain text converter
2;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 3
4;; Author: Joakim Hove <hove@phys.ntnu.no> 4;; Author: Joakim Hove <hove@phys.ntnu.no>
5 5
@@ -374,7 +374,8 @@ formatting, and then moved afterward.")
374fashion, quite close to pure guess-work. It does work in some cases though." 374fashion, quite close to pure guess-work. It does work in some cases though."
375 (interactive) 375 (interactive)
376 (goto-char (point-min)) 376 (goto-char (point-min))
377 (replace-regexp "^<br>$" "") 377 (while (re-search-forward "^<br>$" nil t)
378 (delete-region (match-beginning 0) (match-end 0)))
378 ;; Removing lonely <br> on a single line, if they are left intact we 379 ;; Removing lonely <br> on a single line, if they are left intact we
379 ;; dont have any paragraphs at all. 380 ;; dont have any paragraphs at all.
380 (goto-char (point-min)) 381 (goto-char (point-min))
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el
index c7f9d60339f..48d7c0f6eb6 100644
--- a/lisp/gnus/imap.el
+++ b/lisp/gnus/imap.el
@@ -640,7 +640,11 @@ sure of changing the value of `foo'."
640 (let* ((port (or port imap-default-ssl-port)) 640 (let* ((port (or port imap-default-ssl-port))
641 (coding-system-for-read imap-coding-system-for-read) 641 (coding-system-for-read imap-coding-system-for-read)
642 (coding-system-for-write imap-coding-system-for-write) 642 (coding-system-for-write imap-coding-system-for-write)
643 (process-connection-type nil) 643 (process-connection-type imap-process-connection-type)
644 (set-process-query-on-exit-flag
645 (if (fboundp 'set-process-query-on-exit-flag)
646 'set-process-query-on-exit-flag
647 'process-kill-without-query))
644 process) 648 process)
645 (when (progn 649 (when (progn
646 (setq process (start-process 650 (setq process (start-process
@@ -650,7 +654,7 @@ sure of changing the value of `foo'."
650 (format-spec-make 654 (format-spec-make
651 ?s server 655 ?s server
652 ?p (number-to-string port))))) 656 ?p (number-to-string port)))))
653 (process-kill-without-query process) 657 (funcall set-process-query-on-exit-flag process nil)
654 process) 658 process)
655 (with-current-buffer buffer 659 (with-current-buffer buffer
656 (goto-char (point-min)) 660 (goto-char (point-min))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index b743417f4f2..f178576da4e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -842,7 +842,8 @@ the signature is inserted."
842 (set-keymap-parent map minibuffer-local-map) 842 (set-keymap-parent map minibuffer-local-map)
843 map) 843 map)
844 "Keymap for `message-read-from-minibuffer'." 844 "Keymap for `message-read-from-minibuffer'."
845 :version "22.1") 845 :version "22.1"
846 :group 'message-various)
846 847
847;;;###autoload 848;;;###autoload
848(defcustom message-citation-line-function 'message-insert-citation-line 849(defcustom message-citation-line-function 'message-insert-citation-line
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 7cb3201f76f..c2e95b5de66 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -831,22 +831,28 @@ to advanced Emacs features, such as file-name-handlers, format decoding,
831`find-file-hooks', etc. 831`find-file-hooks', etc.
832If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. 832If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'.
833 This function ensures that none of these modifications will take place." 833 This function ensures that none of these modifications will take place."
834 (let ((format-alist nil) 834 (let* ((format-alist nil)
835 (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) 835 (auto-mode-alist (if inhibit nil (mm-auto-mode-alist)))
836 (default-major-mode 'fundamental-mode) 836 (default-major-mode 'fundamental-mode)
837 (enable-local-variables nil) 837 (enable-local-variables nil)
838 (after-insert-file-functions nil) 838 (after-insert-file-functions nil)
839 (enable-local-eval nil) 839 (enable-local-eval nil)
840 (find-file-hooks nil) 840 (inhibit-file-name-operation (if inhibit
841 (inhibit-file-name-operation (if inhibit 841 'insert-file-contents
842 'insert-file-contents 842 inhibit-file-name-operation))
843 inhibit-file-name-operation)) 843 (inhibit-file-name-handlers
844 (inhibit-file-name-handlers 844 (if inhibit
845 (if inhibit 845 (append mm-inhibit-file-name-handlers
846 (append mm-inhibit-file-name-handlers 846 inhibit-file-name-handlers)
847 inhibit-file-name-handlers) 847 inhibit-file-name-handlers))
848 inhibit-file-name-handlers))) 848 (ffh (if (boundp 'find-file-hook)
849 (insert-file-contents filename visit beg end replace))) 849 'find-file-hook
850 'find-file-hooks))
851 (val (symbol-value ffh)))
852 (set ffh nil)
853 (unwind-protect
854 (insert-file-contents filename visit beg end replace)
855 (set ffh val))))
850 856
851(defun mm-append-to-file (start end filename &optional codesys inhibit) 857(defun mm-append-to-file (start end filename &optional codesys inhibit)
852 "Append the contents of the region to the end of file FILENAME. 858 "Append the contents of the region to the end of file FILENAME.
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el
index 14d52e45ce4..640348c1387 100644
--- a/lisp/gnus/mml1991.el
+++ b/lisp/gnus/mml1991.el
@@ -1,5 +1,6 @@
1;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML 1;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML
2;; Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. 2;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005
3;; Free Software Foundation, Inc.
3 4
4;; Author: Sascha Lüdecke <sascha@meta-x.de>, 5;; Author: Sascha Lüdecke <sascha@meta-x.de>,
5;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue) 6;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue)
@@ -219,8 +220,10 @@
219 220
220;; pgg wrapper 221;; pgg wrapper
221 222
222(defvar pgg-output-buffer) 223(eval-when-compile
223(defvar pgg-errors-buffer) 224 (defvar pgg-default-user-id)
225 (defvar pgg-errors-buffer)
226 (defvar pgg-output-buffer))
224 227
225(defun mml1991-pgg-sign (cont) 228(defun mml1991-pgg-sign (cont)
226 (let (headers cte) 229 (let (headers cte)
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index a0e47dd2f2c..5f53d87bfef 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -1,5 +1,6 @@
1;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) 1;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP)
2;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 2;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
3;; Free Software Foundation, Inc.
3 4
4;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> 5;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
5;; Keywords: PGP MIME MML 6;; Keywords: PGP MIME MML
@@ -632,6 +633,7 @@
632;;; pgg wrapper 633;;; pgg wrapper
633 634
634(eval-when-compile 635(eval-when-compile
636 (defvar pgg-default-user-id)
635 (defvar pgg-errors-buffer) 637 (defvar pgg-errors-buffer)
636 (defvar pgg-output-buffer)) 638 (defvar pgg-output-buffer))
637 639
diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el
index e69b6a0304a..dae51fca50b 100644
--- a/lisp/gnus/nnbabyl.el
+++ b/lisp/gnus/nnbabyl.el
@@ -493,7 +493,7 @@
493 (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) " 493 (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) "
494 nil t) 494 nil t)
495 (cons (buffer-substring (match-beginning 1) (match-end 1)) 495 (cons (buffer-substring (match-beginning 1) (match-end 1))
496 (string-to-int 496 (string-to-number
497 (buffer-substring (match-beginning 2) (match-end 2))))))) 497 (buffer-substring (match-beginning 2) (match-end 2)))))))
498 498
499(defun nnbabyl-insert-lines () 499(defun nnbabyl-insert-lines ()
diff --git a/lisp/gnus/nndb.el b/lisp/gnus/nndb.el
index 6aaf57c81e1..fe4072c5d35 100644
--- a/lisp/gnus/nndb.el
+++ b/lisp/gnus/nndb.el
@@ -196,7 +196,7 @@ article was posted to nndb")
196 ;; otherwise, pull all of the following numbers into the list 196 ;; otherwise, pull all of the following numbers into the list
197 (re-search-forward "follows\r?\n?" nil t) 197 (re-search-forward "follows\r?\n?" nil t)
198 (while (re-search-forward "^[0-9]+$" nil t) 198 (while (re-search-forward "^[0-9]+$" nil t)
199 (push (string-to-int (match-string 0)) list))) 199 (push (string-to-number (match-string 0)) list)))
200 list)) 200 list))
201 201
202(defun nndb-request-expire-articles-remote 202(defun nndb-request-expire-articles-remote
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index de33cd156c6..e4b087eec2e 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -601,7 +601,7 @@ all. This may very well take some time.")
601 (nnheader-report 'nndiary "Article %s retrieved" id) 601 (nnheader-report 'nndiary "Article %s retrieved" id)
602 ;; We return the article number. 602 ;; We return the article number.
603 (cons (if group-num (car group-num) group) 603 (cons (if group-num (car group-num) group)
604 (string-to-int (file-name-nondirectory path))))))) 604 (string-to-number (file-name-nondirectory path)))))))
605 605
606(deffoo nndiary-request-group (group &optional server dont-check) 606(deffoo nndiary-request-group (group &optional server dont-check)
607 (let ((file-name-coding-system nnmail-pathname-coding-system)) 607 (let ((file-name-coding-system nnmail-pathname-coding-system))
@@ -820,7 +820,7 @@ all. This may very well take some time.")
820 ;; we should insert it. (This situation should never 820 ;; we should insert it. (This situation should never
821 ;; occur, but one likes to make sure...) 821 ;; occur, but one likes to make sure...)
822 (while (and (looking-at "[0-9]+\t") 822 (while (and (looking-at "[0-9]+\t")
823 (< (string-to-int 823 (< (string-to-number
824 (buffer-substring 824 (buffer-substring
825 (match-beginning 0) (match-end 0))) 825 (match-beginning 0) (match-end 0)))
826 article) 826 article)
@@ -1281,14 +1281,14 @@ all. This may very well take some time.")
1281 (nnheader-article-to-file-alist nndiary-current-directory)))) 1281 (nnheader-article-to-file-alist nndiary-current-directory))))
1282 1282
1283 1283
1284(defun nndiary-string-to-int (str min &optional max) 1284(defun nndiary-string-to-number (str min &optional max)
1285 ;; Like `string-to-int' but barf if STR is not exactly an integer, and not 1285 ;; Like `string-to-number' but barf if STR is not exactly an integer, and not
1286 ;; within the specified bounds. 1286 ;; within the specified bounds.
1287 ;; Signals are caught by `nndiary-schedule'. 1287 ;; Signals are caught by `nndiary-schedule'.
1288 (if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str)) 1288 (if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str))
1289 (nndiary-error "not an integer value") 1289 (nndiary-error "not an integer value")
1290 ;; else 1290 ;; else
1291 (let ((val (string-to-int str))) 1291 (let ((val (string-to-number str)))
1292 (and (or (< val min) 1292 (and (or (< val min)
1293 (and max (> val max))) 1293 (and max (> val max)))
1294 (nndiary-error "value out of range")) 1294 (nndiary-error "value out of range"))
@@ -1315,12 +1315,12 @@ all. This may very well take some time.")
1315 (let ((res (split-string val "-"))) 1315 (let ((res (split-string val "-")))
1316 (cond 1316 (cond
1317 ((= (length res) 1) 1317 ((= (length res) 1)
1318 (nndiary-string-to-int (car res) min-or-values max)) 1318 (nndiary-string-to-number (car res) min-or-values max))
1319 ((= (length res) 2) 1319 ((= (length res) 2)
1320 ;; don't know if crontab accepts this, but ensure 1320 ;; don't know if crontab accepts this, but ensure
1321 ;; that BEG is <= END 1321 ;; that BEG is <= END
1322 (let ((beg (nndiary-string-to-int (car res) min-or-values max)) 1322 (let ((beg (nndiary-string-to-number (car res) min-or-values max))
1323 (end (nndiary-string-to-int (cadr res) min-or-values max))) 1323 (end (nndiary-string-to-number (cadr res) min-or-values max)))
1324 (cond ((< beg end) 1324 (cond ((< beg end)
1325 (cons beg end)) 1325 (cons beg end))
1326 ((= beg end) 1326 ((= beg end)
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el
index 47a3cbd0292..a7948365680 100644
--- a/lisp/gnus/nndoc.el
+++ b/lisp/gnus/nndoc.el
@@ -421,7 +421,7 @@ from the document.")
421 (search-forward "\n\n" beg t) 421 (search-forward "\n\n" beg t)
422 (re-search-backward 422 (re-search-backward
423 "^Content-Length:[ \t]*\\([0-9]+\\) *$" end t) 423 "^Content-Length:[ \t]*\\([0-9]+\\) *$" end t)
424 (setq len (string-to-int (match-string 1))) 424 (setq len (string-to-number (match-string 1)))
425 (search-forward "\n\n" beg t) 425 (search-forward "\n\n" beg t)
426 (unless (= (setq len (+ (point) len)) (point-max)) 426 (unless (= (setq len (+ (point) len)) (point-max))
427 (and (< len (point-max)) 427 (and (< len (point-max))
@@ -444,7 +444,7 @@ from the document.")
444(defun nndoc-rnews-body-end () 444(defun nndoc-rnews-body-end ()
445 (and (re-search-backward nndoc-article-begin nil t) 445 (and (re-search-backward nndoc-article-begin nil t)
446 (forward-line 1) 446 (forward-line 1)
447 (goto-char (+ (point) (string-to-int (match-string 1)))))) 447 (goto-char (+ (point) (string-to-number (match-string 1))))))
448 448
449(defun nndoc-babyl-type-p () 449(defun nndoc-babyl-type-p ()
450 (when (re-search-forward "\^_\^L *\n" nil t) 450 (when (re-search-forward "\^_\^L *\n" nil t)
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index 9235bf72a29..2fc65868b9c 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -1,6 +1,6 @@
1;;; nndraft.el --- draft article access for Gnus 1;;; nndraft.el --- draft article access for Gnus
2 2
3;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 3;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -174,8 +174,11 @@
174 (setq buffer-file-name (expand-file-name file) 174 (setq buffer-file-name (expand-file-name file)
175 buffer-auto-save-file-name (make-auto-save-file-name)) 175 buffer-auto-save-file-name (make-auto-save-file-name))
176 (clear-visited-file-modtime) 176 (clear-visited-file-modtime)
177 (make-local-variable 'write-contents-hooks) 177 (let ((hook (if (boundp 'write-contents-functions)
178 (push 'nndraft-generate-headers write-contents-hooks) 178 'write-contents-functions
179 'write-contents-hooks)))
180 (gnus-make-local-hook hook)
181 (add-hook hook 'nndraft-generate-headers nil t))
179 article)) 182 article))
180 183
181(deffoo nndraft-request-group (group &optional server dont-check) 184(deffoo nndraft-request-group (group &optional server dont-check)
@@ -185,7 +188,7 @@
185 (file-name-coding-system nnmail-pathname-coding-system) 188 (file-name-coding-system nnmail-pathname-coding-system)
186 dir file) 189 dir file)
187 (nnheader-re-read-dir pathname) 190 (nnheader-re-read-dir pathname)
188 (setq dir (mapcar (lambda (name) (string-to-int (substring name 1))) 191 (setq dir (mapcar (lambda (name) (string-to-number (substring name 1)))
189 (ignore-errors (directory-files 192 (ignore-errors (directory-files
190 pathname nil "^#[0-9]+#$" t)))) 193 pathname nil "^#[0-9]+#$" t))))
191 (dolist (n dir) 194 (dolist (n dir)
@@ -293,7 +296,7 @@
293 "Return the list of messages in the group." 296 "Return the list of messages in the group."
294 (gnus-make-directory nndraft-current-directory) 297 (gnus-make-directory nndraft-current-directory)
295 (sort 298 (sort
296 (mapcar 'string-to-int 299 (mapcar 'string-to-number
297 (directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t)) 300 (directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t))
298 '<)) 301 '<))
299 302
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index d7698efb845..61f8eefbf17 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -329,7 +329,7 @@ included.")
329 (when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t) 329 (when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t)
330 (concat "From: " (match-string 0) "\n")))) 330 (concat "From: " (match-string 0) "\n"))))
331 (nneething-from-line (nth 2 atts) file)) 331 (nneething-from-line (nth 2 atts) file))
332 (if (> (string-to-int (int-to-string (nth 7 atts))) 0) 332 (if (> (string-to-number (int-to-string (nth 7 atts))) 0)
333 (concat "Chars: " (int-to-string (nth 7 atts)) "\n") 333 (concat "Chars: " (int-to-string (nth 7 atts)) "\n")
334 "") 334 "")
335 (if buffer 335 (if buffer
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index f50530ab459..20cdb3da273 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -200,7 +200,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
200 ((search-backward (concat "\n" nnfolder-article-marker) 200 ((search-backward (concat "\n" nnfolder-article-marker)
201 nil t) 201 nil t)
202 (goto-char (match-end 0)) 202 (goto-char (match-end 0))
203 (setq num (string-to-int 203 (setq num (string-to-number
204 (buffer-substring 204 (buffer-substring
205 (point) (gnus-point-at-eol)))) 205 (point) (gnus-point-at-eol))))
206 (goto-char start) 206 (goto-char start)
@@ -210,7 +210,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
210 (search-forward (concat "\n" nnfolder-article-marker) 210 (search-forward (concat "\n" nnfolder-article-marker)
211 nil t) 211 nil t)
212 (progn 212 (progn
213 (setq num (string-to-int 213 (setq num (string-to-number
214 (buffer-substring 214 (buffer-substring
215 (point) (gnus-point-at-eol)))) 215 (point) (gnus-point-at-eol))))
216 (> num article)) 216 (> num article))
@@ -285,7 +285,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
285 (cons nnfolder-current-group 285 (cons nnfolder-current-group
286 (if (search-forward (concat "\n" nnfolder-article-marker) 286 (if (search-forward (concat "\n" nnfolder-article-marker)
287 nil t) 287 nil t)
288 (string-to-int (buffer-substring 288 (string-to-number (buffer-substring
289 (point) (gnus-point-at-eol))) 289 (point) (gnus-point-at-eol)))
290 -1)))))))) 290 -1))))))))
291 291
@@ -875,6 +875,7 @@ deleted. Point is left where the deleted region was."
875 nnfolder-file-coding-system)) 875 nnfolder-file-coding-system))
876 (nnheader-find-file-noselect file t))))) 876 (nnheader-find-file-noselect file t)))))
877 (mm-enable-multibyte) ;; Use multibyte buffer for future copying. 877 (mm-enable-multibyte) ;; Use multibyte buffer for future copying.
878 (buffer-disable-undo)
878 (if (equal (cadr (assoc group nnfolder-scantime-alist)) 879 (if (equal (cadr (assoc group nnfolder-scantime-alist))
879 (nth 5 (file-attributes file))) 880 (nth 5 (file-attributes file)))
880 ;; This looks up-to-date, so we don't do any scanning. 881 ;; This looks up-to-date, so we don't do any scanning.
@@ -901,7 +902,6 @@ deleted. Point is left where the deleted region was."
901 maxid start end newscantime 902 maxid start end newscantime
902 novbuf articles newnum 903 novbuf articles newnum
903 buffer-read-only) 904 buffer-read-only)
904 (buffer-disable-undo)
905 (setq maxid (cdr active)) 905 (setq maxid (cdr active))
906 906
907 (unless (or gnus-nov-is-evil nnfolder-nov-is-evil 907 (unless (or gnus-nov-is-evil nnfolder-nov-is-evil
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 6224f9718f1..952d936bd0d 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -1,7 +1,7 @@
1;;; nnheader.el --- header access macros for Gnus and its backends 1;;; nnheader.el --- header access macros for Gnus and its backends
2 2
3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
4;; 1997, 1998, 2000, 2001, 2002, 2003, 2004 4;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
5;; Free Software Foundation, Inc. 5;; Free Software Foundation, Inc.
6 6
7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -683,9 +683,9 @@ the line could be found."
683(defsubst nnheader-file-to-number (file) 683(defsubst nnheader-file-to-number (file)
684 "Take a FILE name and return the article number." 684 "Take a FILE name and return the article number."
685 (if (string= nnheader-numerical-short-files "^[0-9]+$") 685 (if (string= nnheader-numerical-short-files "^[0-9]+$")
686 (string-to-int file) 686 (string-to-number file)
687 (string-match nnheader-numerical-short-files file) 687 (string-match nnheader-numerical-short-files file)
688 (string-to-int (match-string 0 file)))) 688 (string-to-number (match-string 0 file))))
689 689
690(defvar nnheader-directory-files-is-safe 690(defvar nnheader-directory-files-is-safe
691 (or (eq system-type 'windows-nt) 691 (or (eq system-type 'windows-nt)
@@ -953,15 +953,21 @@ find-file-hooks, etc.
953(defun nnheader-find-file-noselect (&rest args) 953(defun nnheader-find-file-noselect (&rest args)
954 "Open a file with some variables bound. 954 "Open a file with some variables bound.
955See `find-file-noselect' for the arguments." 955See `find-file-noselect' for the arguments."
956 (let ((format-alist nil) 956 (let* ((format-alist nil)
957 (auto-mode-alist (mm-auto-mode-alist)) 957 (auto-mode-alist (mm-auto-mode-alist))
958 (default-major-mode 'fundamental-mode) 958 (default-major-mode 'fundamental-mode)
959 (enable-local-variables nil) 959 (enable-local-variables nil)
960 (after-insert-file-functions nil) 960 (after-insert-file-functions nil)
961 (enable-local-eval nil) 961 (enable-local-eval nil)
962 (find-file-hooks nil) 962 (coding-system-for-read nnheader-file-coding-system)
963 (coding-system-for-read nnheader-file-coding-system)) 963 (ffh (if (boundp 'find-file-hook)
964 (apply 'find-file-noselect args))) 964 'find-file-hook
965 'find-file-hooks))
966 (val (symbol-value ffh)))
967 (set ffh nil)
968 (unwind-protect
969 (apply 'find-file-noselect args)
970 (set ffh val))))
965 971
966(defun nnheader-directory-regular-files (dir) 972(defun nnheader-directory-regular-files (dir)
967 "Return a list of all regular files in DIR." 973 "Return a list of all regular files in DIR."
diff --git a/lisp/gnus/nnkiboze.el b/lisp/gnus/nnkiboze.el
index f68bb8b5f55..f6766836fe1 100644
--- a/lisp/gnus/nnkiboze.el
+++ b/lisp/gnus/nnkiboze.el
@@ -106,7 +106,7 @@
106 (error "nnkiboze: No xref")) 106 (error "nnkiboze: No xref"))
107 (unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref) 107 (unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref)
108 (error "nnkiboze: Malformed xref")) 108 (error "nnkiboze: Malformed xref"))
109 (setq num (string-to-int (match-string 2 xref)) 109 (setq num (string-to-number (match-string 2 xref))
110 group (match-string 1 xref)) 110 group (match-string 1 xref))
111 (or (with-current-buffer buffer 111 (or (with-current-buffer buffer
112 (or (and gnus-use-cache (gnus-cache-request-article num group)) 112 (or (and gnus-use-cache (gnus-cache-request-article num group))
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index c0689335f67..affe72c75c8 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -769,7 +769,7 @@ If SOURCE is a directory spec, try to return the group name component."
769 (if (not (save-excursion 769 (if (not (save-excursion
770 (and (re-search-backward 770 (and (re-search-backward
771 "^Content-Length:[ \t]*\\([0-9]+\\)" start t) 771 "^Content-Length:[ \t]*\\([0-9]+\\)" start t)
772 (setq content-length (string-to-int 772 (setq content-length (string-to-number
773 (buffer-substring 773 (buffer-substring
774 (match-beginning 1) 774 (match-beginning 1)
775 (match-end 1)))) 775 (match-end 1))))
@@ -906,7 +906,7 @@ If SOURCE is a directory spec, try to return the group name component."
906 (if (not (re-search-forward 906 (if (not (re-search-forward
907 "^Content-Length:[ \t]*\\([0-9]+\\)" nil t)) 907 "^Content-Length:[ \t]*\\([0-9]+\\)" nil t))
908 (setq content-length nil) 908 (setq content-length nil)
909 (setq content-length (string-to-int (match-string 1))) 909 (setq content-length (string-to-number (match-string 1)))
910 ;; We destroy the header, since none of the backends ever 910 ;; We destroy the header, since none of the backends ever
911 ;; use it, and we do not want to confuse other mailers by 911 ;; use it, and we do not want to confuse other mailers by
912 ;; having a (possibly) faulty header. 912 ;; having a (possibly) faulty header.
diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el
index a1957fa0dcd..42721f2e92e 100644
--- a/lisp/gnus/nnmbox.el
+++ b/lisp/gnus/nnmbox.el
@@ -475,7 +475,7 @@
475 (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) " 475 (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) "
476 nil t) 476 nil t)
477 (cons (buffer-substring (match-beginning 1) (match-end 1)) 477 (cons (buffer-substring (match-beginning 1) (match-end 1))
478 (string-to-int 478 (string-to-number
479 (buffer-substring (match-beginning 2) (match-end 2))))))) 479 (buffer-substring (match-beginning 2) (match-end 2)))))))
480 480
481(defun nnmbox-in-header-p (pos) 481(defun nnmbox-in-header-p (pos)
@@ -681,7 +681,7 @@
681 (let (alist) 681 (let (alist)
682 (while (re-search-forward " \\([^:]+\\):\\([0-9]+\\)" end-header t) 682 (while (re-search-forward " \\([^:]+\\):\\([0-9]+\\)" end-header t)
683 (push (cons (match-string 1) 683 (push (cons (match-string 1)
684 (string-to-int (match-string 2))) alist)) 684 (string-to-number (match-string 2))) alist))
685 (nnmbox-insert-newsgroup-line alist)) 685 (nnmbox-insert-newsgroup-line alist))
686 ;; this is really a new article 686 ;; this is really a new article
687 (nnmbox-save-mail 687 (nnmbox-save-mail
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el
index 37f0bb353e8..af99217fe6d 100644
--- a/lisp/gnus/nnmh.el
+++ b/lisp/gnus/nnmh.el
@@ -150,7 +150,7 @@ as unread by Gnus.")
150 (file-exists-p file) 150 (file-exists-p file)
151 (not (file-directory-p file)) 151 (not (file-directory-p file))
152 (save-excursion (nnmail-find-file file)) 152 (save-excursion (nnmail-find-file file))
153 (string-to-int (file-name-nondirectory file))))) 153 (string-to-number (file-name-nondirectory file)))))
154 154
155(deffoo nnmh-request-group (group &optional server dont-check) 155(deffoo nnmh-request-group (group &optional server dont-check)
156 (nnheader-init-server-buffer) 156 (nnheader-init-server-buffer)
@@ -176,7 +176,7 @@ as unread by Gnus.")
176 (nnheader-re-read-dir pathname) 176 (nnheader-re-read-dir pathname)
177 (setq dir 177 (setq dir
178 (sort 178 (sort
179 (mapcar (lambda (name) (string-to-int name)) 179 (mapcar (lambda (name) (string-to-number name))
180 (directory-files pathname nil "^[0-9]+$" t)) 180 (directory-files pathname nil "^[0-9]+$" t))
181 '<)) 181 '<))
182 (cond 182 (cond
@@ -224,7 +224,7 @@ as unread by Gnus.")
224 ;; For each directory, generate an active file line. 224 ;; For each directory, generate an active file line.
225 (unless (string= (expand-file-name nnmh-toplev) dir) 225 (unless (string= (expand-file-name nnmh-toplev) dir)
226 (let ((files (mapcar 226 (let ((files (mapcar
227 (lambda (name) (string-to-int name)) 227 (lambda (name) (string-to-number name))
228 (directory-files dir nil "^[0-9]+$" t)))) 228 (directory-files dir nil "^[0-9]+$" t))))
229 (when files 229 (when files
230 (save-excursion 230 (save-excursion
@@ -358,7 +358,7 @@ as unread by Gnus.")
358 (nnmh-possibly-change-directory group server) 358 (nnmh-possibly-change-directory group server)
359 (let ((articles (mapcar 359 (let ((articles (mapcar
360 (lambda (file) 360 (lambda (file)
361 (string-to-int file)) 361 (string-to-number file))
362 (directory-files 362 (directory-files
363 nnmh-current-directory nil "^[0-9]+$")))) 363 nnmh-current-directory nil "^[0-9]+$"))))
364 (when articles 364 (when articles
@@ -486,7 +486,7 @@ as unread by Gnus.")
486 (let ((files (sort 486 (let ((files (sort
487 (mapcar 487 (mapcar
488 (lambda (f) 488 (lambda (f)
489 (string-to-int f)) 489 (string-to-number f))
490 (directory-files dir nil "^[0-9]+$")) 490 (directory-files dir nil "^[0-9]+$"))
491 '>))) 491 '>)))
492 (when files 492 (when files
@@ -509,7 +509,7 @@ as unread by Gnus.")
509 ;; articles in this folder. The articles that are "new" will be 509 ;; articles in this folder. The articles that are "new" will be
510 ;; marked as unread by Gnus. 510 ;; marked as unread by Gnus.
511 (let* ((dir nnmh-current-directory) 511 (let* ((dir nnmh-current-directory)
512 (files (sort (mapcar (function (lambda (name) (string-to-int name))) 512 (files (sort (mapcar (function (lambda (name) (string-to-number name)))
513 (directory-files nnmh-current-directory 513 (directory-files nnmh-current-directory
514 nil "^[0-9]+$" t)) 514 nil "^[0-9]+$" t))
515 '<)) 515 '<))
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index b82df8f979a..f330fa97a5a 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -212,7 +212,7 @@ marks file will be regenerated properly by Gnus.")
212 (nnheader-report 'nnml "Article %s retrieved" id) 212 (nnheader-report 'nnml "Article %s retrieved" id)
213 ;; We return the article number. 213 ;; We return the article number.
214 (cons (if group-num (car group-num) group) 214 (cons (if group-num (car group-num) group)
215 (string-to-int (file-name-nondirectory path))))))) 215 (string-to-number (file-name-nondirectory path)))))))
216 216
217(deffoo nnml-request-group (group &optional server dont-check) 217(deffoo nnml-request-group (group &optional server dont-check)
218 (let ((file-name-coding-system nnmail-pathname-coding-system)) 218 (let ((file-name-coding-system nnmail-pathname-coding-system))
@@ -426,7 +426,7 @@ marks file will be regenerated properly by Gnus.")
426 ;; we should insert it. (This situation should never 426 ;; we should insert it. (This situation should never
427 ;; occur, but one likes to make sure...) 427 ;; occur, but one likes to make sure...)
428 (while (and (looking-at "[0-9]+\t") 428 (while (and (looking-at "[0-9]+\t")
429 (< (string-to-int 429 (< (string-to-number
430 (buffer-substring 430 (buffer-substring
431 (match-beginning 0) (match-end 0))) 431 (match-beginning 0) (match-end 0)))
432 article) 432 article)
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index 42ab072f438..ee5d6560354 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -899,7 +899,7 @@ whether they are `offsite' or `onsite'."
899 (selection 899 (selection
900 (mapcar (lambda (listinfo) 900 (mapcar (lambda (listinfo)
901 (cons (cdr (assoc "sitename" listinfo)) 901 (cons (cdr (assoc "sitename" listinfo))
902 (string-to-int 902 (string-to-number
903 (cdr (assoc "feedid" listinfo))))) 903 (cdr (assoc "feedid" listinfo)))))
904 feedinfo))) 904 feedinfo)))
905 (cdr (assoc 905 (cdr (assoc
diff --git a/lisp/gnus/nnsoup.el b/lisp/gnus/nnsoup.el
index 9c69b1d3c63..836d97e1e42 100644
--- a/lisp/gnus/nnsoup.el
+++ b/lisp/gnus/nnsoup.el
@@ -752,9 +752,9 @@ backend for the messages.")
752 (let ((files (sort (directory-files nnsoup-directory t "IDX$") 752 (let ((files (sort (directory-files nnsoup-directory t "IDX$")
753 (lambda (f1 f2) 753 (lambda (f1 f2)
754 (< (progn (string-match "/\\([0-9]+\\)\\." f1) 754 (< (progn (string-match "/\\([0-9]+\\)\\." f1)
755 (string-to-int (match-string 1 f1))) 755 (string-to-number (match-string 1 f1)))
756 (progn (string-match "/\\([0-9]+\\)\\." f2) 756 (progn (string-match "/\\([0-9]+\\)\\." f2)
757 (string-to-int (match-string 1 f2))))))) 757 (string-to-number (match-string 1 f2)))))))
758 active group lines ident elem min) 758 active group lines ident elem min)
759 (set-buffer (get-buffer-create " *nnsoup work*")) 759 (set-buffer (get-buffer-create " *nnsoup work*"))
760 (while files 760 (while files
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el
index d54897a7750..6418c96d931 100644
--- a/lisp/gnus/nnspool.el
+++ b/lisp/gnus/nnspool.el
@@ -248,7 +248,7 @@ there.")
248 ;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu> 248 ;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu>
249 (when (setq dir (directory-files pathname nil "^[0-9]+$" t)) 249 (when (setq dir (directory-files pathname nil "^[0-9]+$" t))
250 (setq dir 250 (setq dir
251 (sort (mapcar (lambda (name) (string-to-int name)) dir) '<))) 251 (sort (mapcar (lambda (name) (string-to-number name)) dir) '<)))
252 (if dir 252 (if dir
253 (nnheader-insert 253 (nnheader-insert
254 "211 %d %d %d %s\n" (length dir) (car dir) 254 "211 %d %d %d %s\n" (length dir) (car dir)
@@ -440,7 +440,7 @@ there.")
440 (goto-char (point-min)) 440 (goto-char (point-min))
441 (prog1 441 (prog1
442 (when (looking-at "<[^>]+>[ \t]+[-0-9~]+[ \t]+\\([^ /\t\n]+\\)/\\([0-9]+\\)[ \t\n]") 442 (when (looking-at "<[^>]+>[ \t]+[-0-9~]+[ \t]+\\([^ /\t\n]+\\)/\\([0-9]+\\)[ \t\n]")
443 (cons (match-string 1) (string-to-int (match-string 2)))) 443 (cons (match-string 1) (string-to-number (match-string 2))))
444 (kill-buffer (current-buffer))))) 444 (kill-buffer (current-buffer)))))
445 445
446(defun nnspool-find-file (file) 446(defun nnspool-find-file (file)
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index ab85ad25931..888a6edcfb1 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -1128,7 +1128,7 @@ password contained in '~/.nntp-authinfo'."
1128 (nntp-kill-buffer pbuffer)) 1128 (nntp-kill-buffer pbuffer))
1129 (when (and (buffer-name pbuffer) 1129 (when (and (buffer-name pbuffer)
1130 process) 1130 process)
1131 (process-kill-without-query process) 1131 (gnus-set-process-query-on-exit-flag process nil)
1132 (if (and (nntp-wait-for process "^2.*\n" buffer nil t) 1132 (if (and (nntp-wait-for process "^2.*\n" buffer nil t)
1133 (memq (process-status process) '(open run))) 1133 (memq (process-status process) '(open run)))
1134 (prog1 1134 (prog1
@@ -1162,7 +1162,7 @@ password contained in '~/.nntp-authinfo'."
1162 (format-spec-make 1162 (format-spec-make
1163 ?s nntp-address 1163 ?s nntp-address
1164 ?p nntp-port-number))))) 1164 ?p nntp-port-number)))))
1165 (process-kill-without-query proc) 1165 (gnus-set-process-query-on-exit-flag proc nil)
1166 (save-excursion 1166 (save-excursion
1167 (set-buffer buffer) 1167 (set-buffer buffer)
1168 (let ((nntp-connection-alist (list proc buffer nil))) 1168 (let ((nntp-connection-alist (list proc buffer nil)))
@@ -1173,7 +1173,7 @@ password contained in '~/.nntp-authinfo'."
1173 1173
1174(defun nntp-open-tls-stream (buffer) 1174(defun nntp-open-tls-stream (buffer)
1175 (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number))) 1175 (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number)))
1176 (process-kill-without-query proc) 1176 (gnus-set-process-query-on-exit-flag proc nil)
1177 (save-excursion 1177 (save-excursion
1178 (set-buffer buffer) 1178 (set-buffer buffer)
1179 (let ((nntp-connection-alist (list proc buffer nil))) 1179 (let ((nntp-connection-alist (list proc buffer nil)))
@@ -1499,7 +1499,7 @@ password contained in '~/.nntp-authinfo'."
1499 (when (<= count 1) 1499 (when (<= count 1)
1500 (goto-char (point-min)) 1500 (goto-char (point-min))
1501 (when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t) 1501 (when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t)
1502 (let ((low-limit (string-to-int 1502 (let ((low-limit (string-to-number
1503 (buffer-substring (match-beginning 1) 1503 (buffer-substring (match-beginning 1)
1504 (match-end 1))))) 1504 (match-end 1)))))
1505 (while (and articles (<= (car articles) low-limit)) 1505 (while (and articles (<= (car articles) low-limit))
@@ -1571,7 +1571,7 @@ password contained in '~/.nntp-authinfo'."
1571 (goto-char (point-min)) 1571 (goto-char (point-min))
1572 ;; We first find the number by looking at the status line. 1572 ;; We first find the number by looking at the status line.
1573 (let ((number (and (looking-at "2[0-9][0-9] +\\([0-9]+\\) ") 1573 (let ((number (and (looking-at "2[0-9][0-9] +\\([0-9]+\\) ")
1574 (string-to-int 1574 (string-to-number
1575 (buffer-substring (match-beginning 1) 1575 (buffer-substring (match-beginning 1)
1576 (match-end 1))))) 1576 (match-end 1)))))
1577 newsgroups xref) 1577 newsgroups xref)
@@ -1609,7 +1609,7 @@ password contained in '~/.nntp-authinfo'."
1609 "\\([^ :]+\\):\\([0-9]+\\)") 1609 "\\([^ :]+\\):\\([0-9]+\\)")
1610 xref)) 1610 xref))
1611 (setq group (match-string 1 xref) 1611 (setq group (match-string 1 xref)
1612 number (string-to-int (match-string 2 xref)))) 1612 number (string-to-number (match-string 2 xref))))
1613 ((and (setq newsgroups 1613 ((and (setq newsgroups
1614 (mail-fetch-field "newsgroups")) 1614 (mail-fetch-field "newsgroups"))
1615 (not (string-match "," newsgroups))) 1615 (not (string-match "," newsgroups)))
diff --git a/lisp/gnus/pgg-gpg.el b/lisp/gnus/pgg-gpg.el
index 2b3e521c60f..463020838c9 100644
--- a/lisp/gnus/pgg-gpg.el
+++ b/lisp/gnus/pgg-gpg.el
@@ -252,7 +252,7 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt."
252 (when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t) 252 (when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t)
253 (setq status (buffer-substring (match-end 0) 253 (setq status (buffer-substring (match-end 0)
254 (progn (end-of-line)(point))) 254 (progn (end-of-line)(point)))
255 status (vconcat (mapcar #'string-to-int (split-string status)))) 255 status (vconcat (mapcar #'string-to-number (split-string status))))
256 (erase-buffer) 256 (erase-buffer)
257 (insert (format "Imported %d key(s). 257 (insert (format "Imported %d key(s).
258\tArmor contains %d key(s) [%d bad, %d old].\n" 258\tArmor contains %d key(s) [%d bad, %d old].\n"
diff --git a/lisp/gnus/pgg-parse.el b/lisp/gnus/pgg-parse.el
index bf04ca914a8..7929b54010d 100644
--- a/lisp/gnus/pgg-parse.el
+++ b/lisp/gnus/pgg-parse.el
@@ -113,7 +113,7 @@
113 `(mapconcat (lambda (c) (format "%02X" (pgg-char-int c))) 113 `(mapconcat (lambda (c) (format "%02X" (pgg-char-int c)))
114 ,string "") 114 ,string "")
115 ;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x" 115 ;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x"
116 ;; (string-to-int-list ,string))) 116 ;; (string-to-number-list ,string)))
117 ) 117 )
118 118
119(defmacro pgg-parse-time-field (bytes) 119(defmacro pgg-parse-time-field (bytes)
@@ -136,7 +136,7 @@
136 136
137(defmacro pgg-read-bytes (nbytes) 137(defmacro pgg-read-bytes (nbytes)
138 `(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes)) 138 `(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes))
139 ;; `(string-to-int-list (pgg-read-bytes-string ,nbytes)) 139 ;; `(string-to-number-list (pgg-read-bytes-string ,nbytes))
140 ) 140 )
141 141
142(defmacro pgg-read-body-string (ptag) 142(defmacro pgg-read-body-string (ptag)
@@ -146,7 +146,7 @@
146 146
147(defmacro pgg-read-body (ptag) 147(defmacro pgg-read-body (ptag)
148 `(mapcar #'pgg-char-int (pgg-read-body-string ,ptag)) 148 `(mapcar #'pgg-char-int (pgg-read-body-string ,ptag))
149 ;; `(string-to-int-list (pgg-read-body-string ,ptag)) 149 ;; `(string-to-number-list (pgg-read-body-string ,ptag))
150 ) 150 )
151 151
152(defalias 'pgg-skip-bytes 'forward-char) 152(defalias 'pgg-skip-bytes 'forward-char)
diff --git a/lisp/gnus/pgg.el b/lisp/gnus/pgg.el
index 888219a8c57..eff02a1c32a 100644
--- a/lisp/gnus/pgg.el
+++ b/lisp/gnus/pgg.el
@@ -1,6 +1,6 @@
1;;; pgg.el --- glue for the various PGP implementations. 1;;; pgg.el --- glue for the various PGP implementations.
2 2
3;; Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Daiki Ueno <ueno@unixuser.org> 5;; Author: Daiki Ueno <ueno@unixuser.org>
6;; Created: 1999/10/28 6;; Created: 1999/10/28
@@ -97,82 +97,76 @@
97 (read-passwd prompt))) 97 (read-passwd prompt)))
98 98
99(eval-when-compile 99(eval-when-compile
100 (defvar itimer-process) 100 (defmacro pgg-run-at-time-1 (time repeat function args)
101 (defvar itimer-timer) 101 (when (featurep 'xemacs)
102 (autoload 'delete-itimer "itimer") 102 (if (condition-case nil
103 (autoload 'itimer-driver-start "itimer") 103 (let ((delete-itimer 'delete-itimer)
104 (autoload 'itimer-value "itimer") 104 (itimer-driver-start 'itimer-driver-start)
105 (autoload 'set-itimer-function "itimer") 105 (itimer-value 'itimer-value)
106 (autoload 'set-itimer-function-arguments "itimer") 106 (start-itimer 'start-itimer))
107 (autoload 'set-itimer-restart "itimer") 107 (unless (or (symbol-value 'itimer-process)
108 (autoload 'start-itimer "itimer")) 108 (symbol-value 'itimer-timer))
109 (funcall itimer-driver-start))
110 ;; Check whether there is a bug to which the difference of
111 ;; the present time and the time when the itimer driver was
112 ;; woken up is subtracted from the initial itimer value.
113 (let* ((inhibit-quit t)
114 (ctime (current-time))
115 (itimer-timer-last-wakeup
116 (prog1
117 ctime
118 (setcar ctime (1- (car ctime)))))
119 (itimer-list nil)
120 (itimer (funcall start-itimer "pgg-run-at-time"
121 'ignore 5)))
122 (sleep-for 0.1) ;; Accept the timeout interrupt.
123 (prog1
124 (> (funcall itimer-value itimer) 0)
125 (funcall delete-itimer itimer))))
126 (error nil))
127 `(let ((time ,time))
128 (apply #'start-itimer "pgg-run-at-time"
129 ,function (if time (max time 1e-9) 1e-9)
130 ,repeat nil t ,args)))
131 `(let ((time ,time)
132 (itimers (list nil)))
133 (setcar
134 itimers
135 (apply #'start-itimer "pgg-run-at-time"
136 (lambda (itimers repeat function &rest args)
137 (let ((itimer (car itimers)))
138 (if repeat
139 (progn
140 (set-itimer-function
141 itimer
142 (lambda (itimer repeat function &rest args)
143 (set-itimer-restart itimer repeat)
144 (set-itimer-function itimer function)
145 (set-itimer-function-arguments itimer args)
146 (apply function args)))
147 (set-itimer-function-arguments
148 itimer
149 (append (list itimer repeat function) args)))
150 (set-itimer-function
151 itimer
152 (lambda (itimer function &rest args)
153 (delete-itimer itimer)
154 (apply function args)))
155 (set-itimer-function-arguments
156 itimer
157 (append (list itimer function) args)))))
158 1e-9 (if time (max time 1e-9) 1e-9)
159 nil t itimers ,repeat ,function ,args))))))
109 160
110(eval-and-compile 161(eval-and-compile
111 (defalias 162 (if (featurep 'xemacs)
112 'pgg-run-at-time 163 (defun pgg-run-at-time (time repeat function &rest args)
113 (if (featurep 'xemacs) 164 "Emulating function run as `run-at-time'.
114 (if (condition-case nil
115 (progn
116 (unless (or itimer-process itimer-timer)
117 (itimer-driver-start))
118 ;; Check whether there is a bug to which the difference of
119 ;; the present time and the time when the itimer driver was
120 ;; woken up is subtracted from the initial itimer value.
121 (let* ((inhibit-quit t)
122 (ctime (current-time))
123 (itimer-timer-last-wakeup
124 (prog1
125 ctime
126 (setcar ctime (1- (car ctime)))))
127 (itimer-list nil)
128 (itimer (start-itimer "pgg-run-at-time" 'ignore 5)))
129 (sleep-for 0.1) ;; Accept the timeout interrupt.
130 (prog1
131 (> (itimer-value itimer) 0)
132 (delete-itimer itimer))))
133 (error nil))
134 (lambda (time repeat function &rest args)
135 "Emulating function run as `run-at-time'.
136TIME should be nil meaning now, or a number of seconds from now. 165TIME should be nil meaning now, or a number of seconds from now.
137Return an itimer object which can be used in either `delete-itimer' 166Return an itimer object which can be used in either `delete-itimer'
138or `cancel-timer'." 167or `cancel-timer'."
139 (apply #'start-itimer "pgg-run-at-time" 168 (pgg-run-at-time-1 time repeat function args))
140 function (if time (max time 1e-9) 1e-9) 169 (defalias 'pgg-run-at-time 'run-at-time)))
141 repeat nil t args))
142 (lambda (time repeat function &rest args)
143 "Emulating function run as `run-at-time' in the right way.
144TIME should be nil meaning now, or a number of seconds from now.
145Return an itimer object which can be used in either `delete-itimer'
146or `cancel-timer'."
147 (let ((itimers (list nil)))
148 (setcar
149 itimers
150 (apply #'start-itimer "pgg-run-at-time"
151 (lambda (itimers repeat function &rest args)
152 (let ((itimer (car itimers)))
153 (if repeat
154 (progn
155 (set-itimer-function
156 itimer
157 (lambda (itimer repeat function &rest args)
158 (set-itimer-restart itimer repeat)
159 (set-itimer-function itimer function)
160 (set-itimer-function-arguments itimer args)
161 (apply function args)))
162 (set-itimer-function-arguments
163 itimer
164 (append (list itimer repeat function) args)))
165 (set-itimer-function
166 itimer
167 (lambda (itimer function &rest args)
168 (delete-itimer itimer)
169 (apply function args)))
170 (set-itimer-function-arguments
171 itimer
172 (append (list itimer function) args)))))
173 1e-9 (if time (max time 1e-9) 1e-9)
174 nil t itimers repeat function args)))))
175 'run-at-time)))
176 170
177(defun pgg-add-passphrase-cache (key passphrase) 171(defun pgg-add-passphrase-cache (key passphrase)
178 (setq key (pgg-truncate-key-identifier key)) 172 (setq key (pgg-truncate-key-identifier key))
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index b21b3dcd5ae..637421c46d9 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -1,6 +1,7 @@
1;;; pop3.el --- Post Office Protocol (RFC 1460) interface 1;;; pop3.el --- Post Office Protocol (RFC 1460) interface
2 2
3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005
4;; Free Software Foundation, Inc. 5;; Free Software Foundation, Inc.
5 6
6;; Author: Richard L. Pieri <ratinox@peorth.gweep.net> 7;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
@@ -348,21 +349,36 @@ If NOW, use that time instead."
348 349
349;; AUTHORIZATION STATE 350;; AUTHORIZATION STATE
350 351
352(eval-when-compile
353 (if (not (fboundp 'md5)) ;; Emacs 20
354 (defalias 'md5 'ignore)))
355
351(eval-and-compile 356(eval-and-compile
352 (if (fboundp 'md5) 357 (if (and (fboundp 'md5)
353 (defalias 'pop3-md5 'md5) 358 ;; There might be an incompatible implementation.
359 (condition-case nil
360 (md5 "Check whether the 4th argument is allowed"
361 nil nil 'binary)
362 (error nil)))
363 (defun pop3-md5 (string)
364 (md5 string nil nil 'binary))
354 (defvar pop3-md5-program "md5" 365 (defvar pop3-md5-program "md5"
355 "*Program to encode its input in MD5.") 366 "*Program to encode its input in MD5.
356 367\"openssl\" is a popular alternative; set `pop3-md5-program-args' to
368'(\"md5\") if you use it.")
369 (defvar pop3-md5-program-args nil
370 "*List of arguments passed to `pop3-md5-program'.")
357 (defun pop3-md5 (string) 371 (defun pop3-md5 (string)
358 (with-temp-buffer 372 (let ((default-enable-multibyte-characters t)
359 (insert string) 373 (coding-system-for-write 'binary))
360 (call-process-region (point-min) (point-max) 374 (with-temp-buffer
361 pop3-md5-program 375 (insert string)
362 t (current-buffer) nil) 376 (apply 'call-process-region (point-min) (point-max)
363 ;; The meaningful output is the first 32 characters. 377 pop3-md5-program t (current-buffer) nil
364 ;; Don't return the newline that follows them! 378 pop3-md5-program-args)
365 (buffer-substring (point-min) (+ 32 (point-min))))))) 379 ;; The meaningful output is the first 32 characters.
380 ;; Don't return the newline that follows them!
381 (buffer-substring (point-min) (+ 32 (point-min))))))))
366 382
367(defun pop3-user (process user) 383(defun pop3-user (process user)
368 "Send USER information to POP3 server." 384 "Send USER information to POP3 server."
@@ -398,8 +414,8 @@ If NOW, use that time instead."
398 "Return the number of messages in the maildrop and the maildrop's size." 414 "Return the number of messages in the maildrop and the maildrop's size."
399 (pop3-send-command process "STAT") 415 (pop3-send-command process "STAT")
400 (let ((response (pop3-read-response process t))) 416 (let ((response (pop3-read-response process t)))
401 (list (string-to-int (nth 1 (split-string response " "))) 417 (list (string-to-number (nth 1 (split-string response " ")))
402 (string-to-int (nth 2 (split-string response " ")))) 418 (string-to-number (nth 2 (split-string response " "))))
403 )) 419 ))
404 420
405(defun pop3-list (process &optional msg) 421(defun pop3-list (process &optional msg)
@@ -449,7 +465,7 @@ This function currently does nothing.")
449 "Return highest accessed message-id number for the session." 465 "Return highest accessed message-id number for the session."
450 (pop3-send-command process "LAST") 466 (pop3-send-command process "LAST")
451 (let ((response (pop3-read-response process t))) 467 (let ((response (pop3-read-response process t)))
452 (string-to-int (nth 1 (split-string response " "))) 468 (string-to-number (nth 1 (split-string response " ")))
453 )) 469 ))
454 470
455(defun pop3-rset (process) 471(defun pop3-rset (process)
diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el
index 79810bc18a4..0d140e03fca 100644
--- a/lisp/gnus/qp.el
+++ b/lisp/gnus/qp.el
@@ -69,9 +69,9 @@ them into characters should be done separately."
69 (cond ((eq (char-after (1+ (point))) ?\n) 69 (cond ((eq (char-after (1+ (point))) ?\n)
70 (delete-char 2)) 70 (delete-char 2))
71 ((looking-at "=[0-9A-F][0-9A-F]") 71 ((looking-at "=[0-9A-F][0-9A-F]")
72 (let ((byte (string-to-int (buffer-substring (1+ (point)) 72 (let ((byte (string-to-number (buffer-substring (1+ (point))
73 (+ 3 (point))) 73 (+ 3 (point)))
74 16))) 74 16)))
75 (mm-insert-byte byte 1) 75 (mm-insert-byte byte 1)
76 (delete-char 3))) 76 (delete-char 3)))
77 (t 77 (t
diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el
index a54b57f6fa4..c537012a422 100644
--- a/lisp/gnus/score-mode.el
+++ b/lisp/gnus/score-mode.el
@@ -1,6 +1,6 @@
1;;; score-mode.el --- mode for editing Gnus score files 1;;; score-mode.el --- mode for editing Gnus score files
2 2
3;; Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1996, 2001, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
6;; Keywords: news, mail 6;; Keywords: news, mail
@@ -28,7 +28,7 @@
28 28
29(eval-when-compile (require 'cl)) 29(eval-when-compile (require 'cl))
30(require 'mm-util) ; for mm-universal-coding-system 30(require 'mm-util) ; for mm-universal-coding-system
31(require 'gnus-util) ; for gnus-pp 31(require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks
32 32
33(defvar gnus-score-mode-hook nil 33(defvar gnus-score-mode-hook nil
34 "*Hook run in score mode buffers.") 34 "*Hook run in score mode buffers.")
@@ -71,7 +71,7 @@ This mode is an extended emacs-lisp mode.
71 (setq mode-name "Score") 71 (setq mode-name "Score")
72 (lisp-mode-variables nil) 72 (lisp-mode-variables nil)
73 (make-local-variable 'gnus-score-edit-exit-function) 73 (make-local-variable 'gnus-score-edit-exit-function)
74 (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) 74 (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook))
75 75
76(defun gnus-score-make-menu-bar () 76(defun gnus-score-make-menu-bar ()
77 (unless (boundp 'gnus-score-menu) 77 (unless (boundp 'gnus-score-menu)
diff --git a/lisp/gnus/sieve-manage.el b/lisp/gnus/sieve-manage.el
index 5b7ef9a99fb..d43808d788a 100644
--- a/lisp/gnus/sieve-manage.el
+++ b/lisp/gnus/sieve-manage.el
@@ -86,22 +86,27 @@
86 86
87(defcustom sieve-manage-log "*sieve-manage-log*" 87(defcustom sieve-manage-log "*sieve-manage-log*"
88 "Name of buffer for managesieve session trace." 88 "Name of buffer for managesieve session trace."
89 :type 'string) 89 :type 'string
90 :group 'sieve-manage)
90 91
91(defcustom sieve-manage-default-user (user-login-name) 92(defcustom sieve-manage-default-user (user-login-name)
92 "Default username to use." 93 "Default username to use."
93 :type 'string) 94 :type 'string
95 :group 'sieve-manage)
94 96
95(defcustom sieve-manage-server-eol "\r\n" 97(defcustom sieve-manage-server-eol "\r\n"
96 "The EOL string sent from the server." 98 "The EOL string sent from the server."
97 :type 'string) 99 :type 'string
100 :group 'sieve-manage)
98 101
99(defcustom sieve-manage-client-eol "\r\n" 102(defcustom sieve-manage-client-eol "\r\n"
100 "The EOL string we send to the server." 103 "The EOL string we send to the server."
101 :type 'string) 104 :type 'string
105 :group 'sieve-manage)
102 106
103(defcustom sieve-manage-streams '(network starttls shell) 107(defcustom sieve-manage-streams '(network starttls shell)
104 "Priority of streams to consider when opening connection to server.") 108 "Priority of streams to consider when opening connection to server."
109 :group 'sieve-manage)
105 110
106(defcustom sieve-manage-stream-alist 111(defcustom sieve-manage-stream-alist
107 '((network sieve-manage-network-p sieve-manage-network-open) 112 '((network sieve-manage-network-p sieve-manage-network-open)
@@ -113,10 +118,12 @@
113 118
114NAME names the stream, CHECK is a function returning non-nil if the 119NAME names the stream, CHECK is a function returning non-nil if the
115server support the stream and OPEN is a function for opening the 120server support the stream and OPEN is a function for opening the
116stream.") 121stream."
122 :group 'sieve-manage)
117 123
118(defcustom sieve-manage-authenticators '(cram-md5 plain) 124(defcustom sieve-manage-authenticators '(cram-md5 plain)
119 "Priority of authenticators to consider when authenticating to server.") 125 "Priority of authenticators to consider when authenticating to server."
126 :group 'sieve-manage)
120 127
121(defcustom sieve-manage-authenticator-alist 128(defcustom sieve-manage-authenticator-alist
122 '((cram-md5 sieve-manage-cram-md5-p sieve-manage-cram-md5-auth) 129 '((cram-md5 sieve-manage-cram-md5-p sieve-manage-cram-md5-auth)
@@ -127,11 +134,13 @@ stream.")
127 134
128NAME names the authenticator. CHECK is a function returning non-nil if 135NAME names the authenticator. CHECK is a function returning non-nil if
129the server support the authenticator and AUTHENTICATE is a function 136the server support the authenticator and AUTHENTICATE is a function
130for doing the actual authentication.") 137for doing the actual authentication."
138 :group 'sieve-manage)
131 139
132(defcustom sieve-manage-default-port 2000 140(defcustom sieve-manage-default-port 2000
133 "Default port number for managesieve protocol." 141 "Default port number for managesieve protocol."
134 :type 'integer) 142 :type 'integer
143 :group 'sieve-manage)
135 144
136;; Internal variables: 145;; Internal variables:
137 146
diff --git a/lisp/gnus/sieve-mode.el b/lisp/gnus/sieve-mode.el
index e303e8e70b5..c4d019da6df 100644
--- a/lisp/gnus/sieve-mode.el
+++ b/lisp/gnus/sieve-mode.el
@@ -1,5 +1,5 @@
1;;; sieve-mode.el --- Sieve code editing commands for Emacs 1;;; sieve-mode.el --- Sieve code editing commands for Emacs
2;; Copyright (C) 2001, 2003 Free Software Foundation, Inc. 2;; Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
3 3
4;; Author: Simon Josefsson <simon@josefsson.org> 4;; Author: Simon Josefsson <simon@josefsson.org>
5 5
@@ -75,7 +75,8 @@
75 (((class color) (background light)) (:foreground "Orchid")) 75 (((class color) (background light)) (:foreground "Orchid"))
76 (((class color) (background dark)) (:foreground "LightSteelBlue")) 76 (((class color) (background dark)) (:foreground "LightSteelBlue"))
77 (t (:bold t))) 77 (t (:bold t)))
78 "Face used for Sieve Control Commands.") 78 "Face used for Sieve Control Commands."
79 :group 'sieve)
79 80
80(defvar sieve-action-commands-face 'sieve-action-commands-face 81(defvar sieve-action-commands-face 'sieve-action-commands-face
81 "Face name used for Sieve Action Commands.") 82 "Face name used for Sieve Action Commands.")
@@ -85,7 +86,8 @@
85 (((class color) (background light)) (:foreground "Blue")) 86 (((class color) (background light)) (:foreground "Blue"))
86 (((class color) (background dark)) (:foreground "LightSkyBlue")) 87 (((class color) (background dark)) (:foreground "LightSkyBlue"))
87 (t (:inverse-video t :bold t))) 88 (t (:inverse-video t :bold t)))
88 "Face used for Sieve Action Commands.") 89 "Face used for Sieve Action Commands."
90 :group 'sieve)
89 91
90(defvar sieve-test-commands-face 'sieve-test-commands-face 92(defvar sieve-test-commands-face 'sieve-test-commands-face
91 "Face name used for Sieve Test Commands.") 93 "Face name used for Sieve Test Commands.")
@@ -99,7 +101,8 @@
99 (((class color) (background light)) (:foreground "CadetBlue")) 101 (((class color) (background light)) (:foreground "CadetBlue"))
100 (((class color) (background dark)) (:foreground "Aquamarine")) 102 (((class color) (background dark)) (:foreground "Aquamarine"))
101 (t (:bold t :underline t))) 103 (t (:bold t :underline t)))
102 "Face used for Sieve Test Commands.") 104 "Face used for Sieve Test Commands."
105 :group 'sieve)
103 106
104(defvar sieve-tagged-arguments-face 'sieve-tagged-arguments-face 107(defvar sieve-tagged-arguments-face 'sieve-tagged-arguments-face
105 "Face name used for Sieve Tagged Arguments.") 108 "Face name used for Sieve Tagged Arguments.")
@@ -111,7 +114,8 @@
111 (((class color) (background light)) (:foreground "Purple")) 114 (((class color) (background light)) (:foreground "Purple"))
112 (((class color) (background dark)) (:foreground "Cyan")) 115 (((class color) (background dark)) (:foreground "Cyan"))
113 (t (:bold t))) 116 (t (:bold t)))
114 "Face used for Sieve Tagged Arguments.") 117 "Face used for Sieve Tagged Arguments."
118 :group 'sieve)
115 119
116 120
117(defconst sieve-font-lock-keywords 121(defconst sieve-font-lock-keywords
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el
index cd921719045..399c0678c41 100644
--- a/lisp/gnus/smime.el
+++ b/lisp/gnus/smime.el
@@ -122,7 +122,8 @@
122(eval-when-compile (require 'cl)) 122(eval-when-compile (require 'cl))
123 123
124(defgroup smime nil 124(defgroup smime nil
125 "S/MIME configuration.") 125 "S/MIME configuration."
126 :group 'mime)
126 127
127(defcustom smime-keys nil 128(defcustom smime-keys nil
128 "*Map mail addresses to a file containing Certificate (and private key). 129 "*Map mail addresses to a file containing Certificate (and private key).
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 59119dc5438..ded68aba4ed 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -1,5 +1,5 @@
1;;; spam-report.el --- Reporting spam 1;;; spam-report.el --- Reporting spam
2;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 3
4;; Author: Teodor Zlatanov <tzz@lifelogs.com> 4;; Author: Teodor Zlatanov <tzz@lifelogs.com>
5;; Keywords: network 5;; Keywords: network
@@ -35,7 +35,9 @@
35 (autoload 'mm-url-insert "mm-url")) 35 (autoload 'mm-url-insert "mm-url"))
36 36
37(defgroup spam-report nil 37(defgroup spam-report nil
38 "Spam reporting configuration.") 38 "Spam reporting configuration."
39 :group 'mail
40 :group 'news)
39 41
40(defcustom spam-report-gmane-regex nil 42(defcustom spam-report-gmane-regex nil
41 "Regexp matching Gmane newsgroups, e.g. \"^nntp\\+.*:gmane\\.\" 43 "Regexp matching Gmane newsgroups, e.g. \"^nntp\\+.*:gmane\\.\"
@@ -181,14 +183,14 @@ symbol `ask', query before flushing the queue file."
181the external program specified in `mm-url-program' to connect to 183the external program specified in `mm-url-program' to connect to
182server." 184server."
183 (with-temp-buffer 185 (with-temp-buffer
184 (let ((url (concat "http://" host report))) 186 (let ((url (format "http://%s%s" host report)))
185 (mm-url-insert url t)))) 187 (mm-url-insert url t))))
186 188
187;;;###autoload 189;;;###autoload
188(defun spam-report-url-to-file (host report) 190(defun spam-report-url-to-file (host report)
189 "Collect spam report requests in `spam-report-requests-file'. 191 "Collect spam report requests in `spam-report-requests-file'.
190Customize `spam-report-url-ping-function' to use this function." 192Customize `spam-report-url-ping-function' to use this function."
191 (let ((url (concat "http://" host report)) 193 (let ((url (format "http://%s%s" host report))
192 (file spam-report-requests-file)) 194 (file spam-report-requests-file))
193 (gnus-make-directory (file-name-directory file)) 195 (gnus-make-directory (file-name-directory file))
194 (gnus-message 9 "Writing URL `%s' to file `%s'" url file) 196 (gnus-message 9 "Writing URL `%s' to file `%s'" url file)
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index e36bf8b26c8..5e73c2deb2e 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -1,5 +1,5 @@
1;;; spam.el --- Identifying spam 1;;; spam.el --- Identifying spam
2;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 3
4;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 4;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
5;; Keywords: network 5;; Keywords: network
@@ -77,7 +77,9 @@
77 77
78(defgroup spam nil 78(defgroup spam nil
79 "Spam configuration." 79 "Spam configuration."
80 :version "22.1") 80 :version "22.1"
81 :group 'mail
82 :group 'news)
81 83
82(defcustom spam-directory (nnheader-concat gnus-directory "spam/") 84(defcustom spam-directory (nnheader-concat gnus-directory "spam/")
83 "Directory for spam whitelists and blacklists." 85 "Directory for spam whitelists and blacklists."
@@ -308,7 +310,8 @@ All unmarked article in such group receive the spam mark on group entry."
308 (((class color) (background light)) 310 (((class color) (background light))
309 (:foreground "ivory4")) 311 (:foreground "ivory4"))
310 (t :inverse-video t)) 312 (t :inverse-video t))
311 "Face for spam-marked articles.") 313 "Face for spam-marked articles."
314 :group 'spam)
312 315
313(defcustom spam-face 'spam-face 316(defcustom spam-face 'spam-face
314 "Face for spam-marked articles." 317 "Face for spam-marked articles."
diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el
index f2b72fbef1c..ddc91d90d25 100644
--- a/lisp/gnus/starttls.el
+++ b/lisp/gnus/starttls.el
@@ -1,6 +1,7 @@
1;;; starttls.el --- STARTTLS functions 1;;; starttls.el --- STARTTLS functions
2 2
3;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1999, 2000, 2003, 2004, 2005
4;; Free Software Foundation, Inc.
4 5
5;; Author: Daiki Ueno <ueno@unixuser.org> 6;; Author: Daiki Ueno <ueno@unixuser.org>
6;; Author: Simon Josefsson <simon@josefsson.org> 7;; Author: Simon Josefsson <simon@josefsson.org>
@@ -235,6 +236,13 @@ handshake, or NIL on failure."
235 (starttls-negotiate-gnutls process) 236 (starttls-negotiate-gnutls process)
236 (signal-process (process-id process) 'SIGALRM))) 237 (signal-process (process-id process) 'SIGALRM)))
237 238
239(eval-and-compile
240 (if (fboundp 'set-process-query-on-exit-flag)
241 (defalias 'starttls-set-process-query-on-exit-flag
242 'set-process-query-on-exit-flag)
243 (defalias 'starttls-set-process-query-on-exit-flag
244 'process-kill-without-query)))
245
238(defun starttls-open-stream-gnutls (name buffer host service) 246(defun starttls-open-stream-gnutls (name buffer host service)
239 (message "Opening STARTTLS connection to `%s'..." host) 247 (message "Opening STARTTLS connection to `%s'..." host)
240 (let* (done 248 (let* (done
@@ -246,7 +254,7 @@ handshake, or NIL on failure."
246 (int-to-string service) 254 (int-to-string service)
247 service) 255 service)
248 starttls-extra-arguments))) 256 starttls-extra-arguments)))
249 (process-kill-without-query process) 257 (starttls-set-process-query-on-exit-flag process nil)
250 (while (and (processp process) 258 (while (and (processp process)
251 (eq (process-status process) 'run) 259 (eq (process-status process) 'run)
252 (save-excursion 260 (save-excursion
@@ -286,7 +294,7 @@ specifying a port number to connect to."
286 name buffer starttls-program 294 name buffer starttls-program
287 host (format "%s" service) 295 host (format "%s" service)
288 starttls-extra-args))) 296 starttls-extra-args)))
289 (process-kill-without-query process) 297 (starttls-set-process-query-on-exit-flag process nil)
290 process))) 298 process)))
291 299
292(provide 'starttls) 300(provide 'starttls)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index c11aaf6da76..b5e22bf1855 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -224,7 +224,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
224;;; (symbol-file (if (symbolp subr-or-var) subr-or-var 224;;; (symbol-file (if (symbolp subr-or-var) subr-or-var
225;;; (subr-name subr-or-var)) 225;;; (subr-name subr-or-var))
226;;; (if (eq kind 'var) 'defvar 'defun))) 226;;; (if (eq kind 'var) 'defvar 'defun)))
227 227;;;###autoload
228(defun help-C-file-name (subr-or-var kind) 228(defun help-C-file-name (subr-or-var kind)
229 "Return the name of the C file where SUBR-OR-VAR is defined. 229 "Return the name of the C file where SUBR-OR-VAR is defined.
230KIND should be `var' for a variable or `subr' for a subroutine." 230KIND should be `var' for a variable or `subr' for a subroutine."
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index d94f03200dc..1c516930c3b 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -196,7 +196,7 @@ Commands:
196 (view-mode) 196 (view-mode)
197 (make-local-variable 'view-no-disable-on-exit) 197 (make-local-variable 'view-no-disable-on-exit)
198 (setq view-no-disable-on-exit t) 198 (setq view-no-disable-on-exit t)
199 (run-hooks 'help-mode-hook)) 199 (run-mode-hooks 'help-mode-hook))
200 200
201;;;###autoload 201;;;###autoload
202(defun help-mode-setup () 202(defun help-mode-setup ()
diff --git a/lisp/hexl.el b/lisp/hexl.el
index db6edfa48c1..b67ab7876b4 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -291,7 +291,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
291 "hexl-current-address") 291 "hexl-current-address")
292 292
293 (if hexl-follow-ascii (hexl-follow-ascii 1))) 293 (if hexl-follow-ascii (hexl-follow-ascii 1)))
294 (run-hooks 'hexl-mode-hook)) 294 (run-mode-hooks 'hexl-mode-hook))
295 295
296 296
297(defun hexl-isearch-search-function () 297(defun hexl-isearch-search-function ()
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 213160b6f37..217696cb4aa 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2511,7 +2511,7 @@ will be inserted before the group at point."
2511 (when ibuffer-default-directory 2511 (when ibuffer-default-directory
2512 (setq default-directory ibuffer-default-directory)) 2512 (setq default-directory ibuffer-default-directory))
2513 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) 2513 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
2514 (run-hooks 'ibuffer-mode-hook) 2514 (run-mode-hooks 'ibuffer-mode-hook)
2515 ;; called after mode hooks to allow the user to add filters 2515 ;; called after mode hooks to allow the user to add filters
2516 (ibuffer-update-mode-name)) 2516 (ibuffer-update-mode-name))
2517 2517
diff --git a/lisp/ido.el b/lisp/ido.el
index 24b8ba34b75..b01e9e35c37 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1646,6 +1646,7 @@ If INITIAL is non-nil, it specifies the initial input string."
1646 (l (ido-make-merged-file-list ido-text-init 1646 (l (ido-make-merged-file-list ido-text-init
1647 (eq ido-use-merged-list 'auto) 1647 (eq ido-use-merged-list 'auto)
1648 (eq ido-try-merged-list 'wide)))) 1648 (eq ido-try-merged-list 'wide))))
1649 (ido-trace "merged" l)
1649 (cond 1650 (cond
1650 ((not l) 1651 ((not l)
1651 (if (eq ido-try-merged-list 'wide) 1652 (if (eq ido-try-merged-list 'wide)
@@ -1665,6 +1666,9 @@ If INITIAL is non-nil, it specifies the initial input string."
1665 ido-use-merged-list nil))) 1666 ido-use-merged-list nil)))
1666 ((eq l t) 1667 ((eq l t)
1667 (setq ido-use-merged-list nil)) 1668 (setq ido-use-merged-list nil))
1669 ((eq l 'input-pending-p)
1670 (setq ido-try-merged-list t
1671 ido-use-merged-list nil))
1668 (t 1672 (t
1669 (setq ido-pre-merge-state 1673 (setq ido-pre-merge-state
1670 (list ido-text-init ido-current-directory olist oign omat)) 1674 (list ido-text-init ido-current-directory olist oign omat))
@@ -2493,10 +2497,10 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2493 (file-directory-p dir) 2497 (file-directory-p dir)
2494 (or (not must-match) 2498 (or (not must-match)
2495 ;; TODO. check for nonreadable and too-big. 2499 ;; TODO. check for nonreadable and too-big.
2496 (ido-set-matches1 2500 (ido-set-matches-1
2497 (if (eq ido-cur-item 'file) 2501 (if (eq ido-cur-item 'file)
2498 (ido-make-file-list1 dir) 2502 (ido-make-file-list-1 dir)
2499 (ido-make-dir-list1 dir))))) 2503 (ido-make-dir-list-1 dir)))))
2500 (setq j n) 2504 (setq j n)
2501 (setq dir nil))) 2505 (setq dir nil)))
2502 (if dir 2506 (if dir
@@ -2786,11 +2790,11 @@ for first matching file."
2786 (ido-directory-too-big nil)) 2790 (ido-directory-too-big nil))
2787 (cond 2791 (cond
2788 ((eq ido-cur-item 'file) 2792 ((eq ido-cur-item 'file)
2789 (ido-make-file-list1 ido-current-directory)) 2793 (ido-make-file-list-1 ido-current-directory))
2790 ((eq ido-cur-item 'dir) 2794 ((eq ido-cur-item 'dir)
2791 (ido-make-dir-list1 ido-current-directory)) 2795 (ido-make-dir-list-1 ido-current-directory))
2792 ((eq ido-cur-item 'buffer) 2796 ((eq ido-cur-item 'buffer)
2793 (ido-make-buffer-list1)) 2797 (ido-make-buffer-list-1))
2794 ((eq ido-cur-item 'list) 2798 ((eq ido-cur-item 'list)
2795 ido-choice-list) 2799 ido-choice-list)
2796 (t nil)))) 2800 (t nil))))
@@ -2908,74 +2912,87 @@ for first matching file."
2908 (setq items (cdr items))) 2912 (setq items (cdr items)))
2909 res)) 2913 res))
2910 2914
2911(defun ido-make-merged-file-list (text auto wide) 2915
2916(defun ido-make-merged-file-list-1 (text auto wide)
2912 (let (res) 2917 (let (res)
2913 (message "Searching for `%s'...." text) 2918 (if (and (ido-final-slash text) ido-dir-file-cache)
2914 (condition-case nil 2919 (if wide
2915 (if (and (ido-final-slash text) ido-dir-file-cache) 2920 (setq res (ido-wide-find-dirs-or-files
2916 (if wide 2921 ido-current-directory (substring text 0 -1) ido-enable-prefix t))
2917 (setq res (ido-wide-find-dirs-or-files 2922 ;; Use list of cached directories
2918 ido-current-directory (substring text 0 -1) ido-enable-prefix t)) 2923 (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'"))
2919 ;; Use list of cached directories 2924 (dirs ido-dir-file-cache)
2920 (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) 2925 dir b d f)
2921 (dirs ido-dir-file-cache) 2926 (if nil ;; simple
2922 dir b d f) 2927 (while dirs
2923 (if nil ;; simple 2928 (setq dir (car (car dirs))
2924 (while dirs 2929 dirs (cdr dirs))
2925 (setq dir (car (car dirs)) 2930 (when (and (string-match re dir)
2926 dirs (cdr dirs)) 2931 (not (ido-ignore-item-p dir ido-ignore-directories-merge))
2927 (when (and (string-match re dir) 2932 (file-directory-p dir))
2928 (not (ido-ignore-item-p dir ido-ignore-directories-merge)) 2933 (setq b (substring dir 0 -1)
2929 (file-directory-p dir)) 2934 f (concat (file-name-nondirectory b) "/")
2930 (setq b (substring dir 0 -1) 2935 d (file-name-directory b)
2931 f (concat (file-name-nondirectory b) "/") 2936 res (cons (cons f d) res))))
2932 d (file-name-directory b)
2933 res (cons (cons f d) res))))
2934 (while dirs
2935 (setq dir (car dirs)
2936 d (car dir)
2937 dirs (cdr dirs))
2938 (when (not (ido-ignore-item-p d ido-ignore-directories-merge))
2939 (setq dir (cdr (cdr dir)))
2940 (while dir
2941 (setq f (car dir)
2942 dir (cdr dir))
2943 (if (and (string-match re f)
2944 (not (ido-ignore-item-p f ido-ignore-directories)))
2945 (setq res (cons (cons f d) res)))))
2946 (if (and auto (input-pending-p))
2947 (setq dirs nil
2948 res t))))))
2949 (if wide
2950 (setq res (ido-wide-find-dirs-or-files
2951 ido-current-directory text ido-enable-prefix nil))
2952 (let ((ido-text text)
2953 (dirs ido-work-directory-list)
2954 (must-match (and text (> (length text) 0)))
2955 dir fl)
2956 (if (and auto (not (member ido-current-directory dirs)))
2957 (setq dirs (cons ido-current-directory dirs)))
2958 (while dirs 2937 (while dirs
2959 (setq dir (car dirs) 2938 (setq dir (car dirs)
2939 d (car dir)
2960 dirs (cdr dirs)) 2940 dirs (cdr dirs))
2961 (when (and dir (stringp dir) 2941 (when (not (ido-ignore-item-p d ido-ignore-directories-merge))
2962 (or ido-merge-ftp-work-directories 2942 (setq dir (cdr (cdr dir)))
2963 (not (ido-is-ftp-directory dir))) 2943 (while dir
2964 (file-directory-p dir) 2944 (setq f (car dir)
2965 ;; TODO. check for nonreadable and too-big. 2945 dir (cdr dir))
2966 (setq fl (if (eq ido-cur-item 'file) 2946 (if (and (string-match re f)
2967 (ido-make-file-list1 dir t) 2947 (not (ido-ignore-item-p f ido-ignore-directories)))
2968 (ido-make-dir-list1 dir t)))) 2948 (setq res (cons (cons f d) res)))))
2969 (if must-match
2970 (setq fl (ido-set-matches1 fl)))
2971 (if fl
2972 (setq res (nconc fl res))))
2973 (if (and auto (input-pending-p)) 2949 (if (and auto (input-pending-p))
2974 (setq dirs nil 2950 (setq dirs nil
2975 res t)))))) 2951 res t))))))
2976 (quit (setq res t))) 2952 (if wide
2977 (if (and res (not (eq res t))) 2953 (setq res (ido-wide-find-dirs-or-files
2978 (setq res (ido-sort-merged-list res auto))) 2954 ido-current-directory text ido-enable-prefix nil))
2955 (let ((ido-text text)
2956 (dirs ido-work-directory-list)
2957 (must-match (and text (> (length text) 0)))
2958 dir fl)
2959 (if (and auto (not (member ido-current-directory dirs)))
2960 (setq dirs (cons ido-current-directory dirs)))
2961 (while dirs
2962 (setq dir (car dirs)
2963 dirs (cdr dirs))
2964 (when (and dir (stringp dir)
2965 (or ido-merge-ftp-work-directories
2966 (not (ido-is-ftp-directory dir)))
2967 (file-directory-p dir)
2968 ;; TODO. check for nonreadable and too-big.
2969 (setq fl (if (eq ido-cur-item 'file)
2970 (ido-make-file-list-1 dir t)
2971 (ido-make-dir-list-1 dir t))))
2972 (if must-match
2973 (setq fl (ido-set-matches-1 fl)))
2974 (if fl
2975 (setq res (nconc fl res))))
2976 (if (and auto (input-pending-p))
2977 (setq dirs nil
2978 res t))))))
2979 res))
2980
2981(defun ido-make-merged-file-list (text auto wide)
2982 (let (res)
2983 (message "Searching for `%s'...." text)
2984 (condition-case nil
2985 (unless (catch 'input-pending-p
2986 (let ((throw-on-input 'input-pending-p))
2987 (setq res (ido-make-merged-file-list-1 text auto wide))
2988 t))
2989 (setq res 'input-pending-p))
2990 (quit
2991 (setq res t
2992 ido-try-merged-list nil
2993 ido-use-merged-list nil)))
2994 (when (and res (listp res))
2995 (setq res (ido-sort-merged-list res auto)))
2979 (when (and (or ido-rotate-temp ido-rotate-file-list-default) 2996 (when (and (or ido-rotate-temp ido-rotate-file-list-default)
2980 (listp res) 2997 (listp res)
2981 (> (length text) 0)) 2998 (> (length text) 0))
@@ -2986,7 +3003,7 @@ for first matching file."
2986 (message nil) 3003 (message nil)
2987 res)) 3004 res))
2988 3005
2989(defun ido-make-buffer-list1 (&optional frame visible) 3006(defun ido-make-buffer-list-1 (&optional frame visible)
2990 ;; Return list of non-ignored buffer names 3007 ;; Return list of non-ignored buffer names
2991 (delq nil 3008 (delq nil
2992 (mapcar 3009 (mapcar
@@ -3004,7 +3021,7 @@ for first matching file."
3004 ;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, 3021 ;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer,
3005 ;; it is put to the start of the list. 3022 ;; it is put to the start of the list.
3006 (let* ((ido-current-buffers (ido-get-buffers-in-frames 'current)) 3023 (let* ((ido-current-buffers (ido-get-buffers-in-frames 'current))
3007 (ido-temp-list (ido-make-buffer-list1 (selected-frame) ido-current-buffers))) 3024 (ido-temp-list (ido-make-buffer-list-1 (selected-frame) ido-current-buffers)))
3008 (if ido-temp-list 3025 (if ido-temp-list
3009 (nconc ido-temp-list ido-current-buffers) 3026 (nconc ido-temp-list ido-current-buffers)
3010 (setq ido-temp-list ido-current-buffers)) 3027 (setq ido-temp-list ido-current-buffers))
@@ -3041,7 +3058,7 @@ for first matching file."
3041 (nconc ido-temp-list items) 3058 (nconc ido-temp-list items)
3042 (setq ido-temp-list items))) 3059 (setq ido-temp-list items)))
3043 3060
3044(defun ido-file-name-all-completions1 (dir) 3061(defun ido-file-name-all-completions-1 (dir)
3045 (cond 3062 (cond
3046 ((ido-nonreadable-directory-p dir) '()) 3063 ((ido-nonreadable-directory-p dir) '())
3047 ;; do not check (ido-directory-too-big-p dir) here. 3064 ;; do not check (ido-directory-too-big-p dir) here.
@@ -3098,13 +3115,13 @@ for first matching file."
3098 (if (and ftp (file-readable-p dir)) 3115 (if (and ftp (file-readable-p dir))
3099 (setq mtime (cons 'ftp (ido-time-stamp)))) 3116 (setq mtime (cons 'ftp (ido-time-stamp))))
3100 (if mtime 3117 (if mtime
3101 (setq cached (cons dir (cons mtime (ido-file-name-all-completions1 dir))) 3118 (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir)))
3102 ido-dir-file-cache (cons cached ido-dir-file-cache))) 3119 ido-dir-file-cache (cons cached ido-dir-file-cache)))
3103 (if (> (length ido-dir-file-cache) ido-max-dir-file-cache) 3120 (if (> (length ido-dir-file-cache) ido-max-dir-file-cache)
3104 (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil))) 3121 (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil)))
3105 (and cached 3122 (and cached
3106 (cdr (cdr cached)))) 3123 (cdr (cdr cached))))
3107 (ido-file-name-all-completions1 dir))) 3124 (ido-file-name-all-completions-1 dir)))
3108 3125
3109(defun ido-remove-cached-dir (dir) 3126(defun ido-remove-cached-dir (dir)
3110 ;; Remove dir from ido-dir-file-cache 3127 ;; Remove dir from ido-dir-file-cache
@@ -3115,7 +3132,7 @@ for first matching file."
3115 (setq ido-dir-file-cache (delq cached ido-dir-file-cache)))))) 3132 (setq ido-dir-file-cache (delq cached ido-dir-file-cache))))))
3116 3133
3117 3134
3118(defun ido-make-file-list1 (dir &optional merged) 3135(defun ido-make-file-list-1 (dir &optional merged)
3119 ;; Return list of non-ignored files in DIR 3136 ;; Return list of non-ignored files in DIR
3120 ;; If MERGED is non-nil, each file is cons'ed with DIR 3137 ;; If MERGED is non-nil, each file is cons'ed with DIR
3121 (and (or (ido-is-tramp-root dir) (file-directory-p dir)) 3138 (and (or (ido-is-tramp-root dir) (file-directory-p dir))
@@ -3132,7 +3149,7 @@ for first matching file."
3132 ;; The hook `ido-make-file-list-hook' is run after the list has been 3149 ;; The hook `ido-make-file-list-hook' is run after the list has been
3133 ;; created to allow the user to further modify the order of the file names 3150 ;; created to allow the user to further modify the order of the file names
3134 ;; in this list. 3151 ;; in this list.
3135 (let ((ido-temp-list (ido-make-file-list1 ido-current-directory))) 3152 (let ((ido-temp-list (ido-make-file-list-1 ido-current-directory)))
3136 (setq ido-temp-list (sort ido-temp-list 3153 (setq ido-temp-list (sort ido-temp-list
3137 (if ido-file-extensions-order 3154 (if ido-file-extensions-order
3138 #'ido-file-extension-lessp 3155 #'ido-file-extension-lessp
@@ -3168,7 +3185,7 @@ for first matching file."
3168 (run-hooks 'ido-make-file-list-hook) 3185 (run-hooks 'ido-make-file-list-hook)
3169 ido-temp-list)) 3186 ido-temp-list))
3170 3187
3171(defun ido-make-dir-list1 (dir &optional merged) 3188(defun ido-make-dir-list-1 (dir &optional merged)
3172 ;; Return list of non-ignored subdirs in DIR 3189 ;; Return list of non-ignored subdirs in DIR
3173 ;; If MERGED is non-nil, each subdir is cons'ed with DIR 3190 ;; If MERGED is non-nil, each subdir is cons'ed with DIR
3174 (and (or (ido-is-tramp-root dir) (file-directory-p dir)) 3191 (and (or (ido-is-tramp-root dir) (file-directory-p dir))
@@ -3184,7 +3201,7 @@ for first matching file."
3184 ;; The hook `ido-make-dir-list-hook' is run after the list has been 3201 ;; The hook `ido-make-dir-list-hook' is run after the list has been
3185 ;; created to allow the user to further modify the order of the 3202 ;; created to allow the user to further modify the order of the
3186 ;; directory names in this list. 3203 ;; directory names in this list.
3187 (let ((ido-temp-list (ido-make-dir-list1 ido-current-directory))) 3204 (let ((ido-temp-list (ido-make-dir-list-1 ido-current-directory)))
3188 (setq ido-temp-list (sort ido-temp-list #'ido-file-lessp)) 3205 (setq ido-temp-list (sort ido-temp-list #'ido-file-lessp))
3189 (ido-to-end ;; move . files to end 3206 (ido-to-end ;; move . files to end
3190 (delq nil (mapcar 3207 (delq nil (mapcar
@@ -3238,7 +3255,7 @@ for first matching file."
3238 3255
3239;;; FIND MATCHING ITEMS 3256;;; FIND MATCHING ITEMS
3240 3257
3241(defun ido-set-matches1 (items &optional do-full) 3258(defun ido-set-matches-1 (items &optional do-full)
3242 ;; Return list of matches in items 3259 ;; Return list of matches in items
3243 (let* ((case-fold-search ido-case-fold) 3260 (let* ((case-fold-search ido-case-fold)
3244 (slash (and (not ido-enable-prefix) (ido-final-slash ido-text))) 3261 (slash (and (not ido-enable-prefix) (ido-final-slash ido-text)))
@@ -3296,7 +3313,7 @@ for first matching file."
3296(defun ido-set-matches () 3313(defun ido-set-matches ()
3297 ;; Set `ido-matches' to the list of items matching prompt 3314 ;; Set `ido-matches' to the list of items matching prompt
3298 (when ido-rescan 3315 (when ido-rescan
3299 (setq ido-matches (ido-set-matches1 (reverse ido-cur-list) (not ido-rotate)) 3316 (setq ido-matches (ido-set-matches-1 (reverse ido-cur-list) (not ido-rotate))
3300 ido-rotate nil))) 3317 ido-rotate nil)))
3301 3318
3302(defun ido-ignore-item-p (name re-list &optional ignore-ext) 3319(defun ido-ignore-item-p (name re-list &optional ignore-ext)
diff --git a/lisp/ielm.el b/lisp/ielm.el
index 65654ca2c7a..5a91361f2d2 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -480,7 +480,8 @@ The behaviour of IELM may be customized with the following variables:
480Customized bindings may be defined in `ielm-map', which currently contains: 480Customized bindings may be defined in `ielm-map', which currently contains:
481\\{ielm-map}" 481\\{ielm-map}"
482 (interactive) 482 (interactive)
483 (comint-mode) 483 (delay-mode-hooks
484 (comint-mode))
484 (setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt))) 485 (setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt)))
485 (set (make-local-variable 'paragraph-separate) "\\'") 486 (set (make-local-variable 'paragraph-separate) "\\'")
486 (make-local-variable 'paragraph-start) 487 (make-local-variable 'paragraph-start)
@@ -548,7 +549,7 @@ Customized bindings may be defined in `ielm-map', which currently contains:
548 (set-marker comint-last-input-start (ielm-pm)) 549 (set-marker comint-last-input-start (ielm-pm))
549 (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)) 550 (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter))
550 551
551 (run-hooks 'ielm-mode-hook)) 552 (run-mode-hooks 'ielm-mode-hook))
552 553
553(defun ielm-get-old-input nil 554(defun ielm-get-old-input nil
554 ;; Return the previous input surrounding point 555 ;; Return the previous input surrounding point
diff --git a/lisp/image.el b/lisp/image.el
index ced73c8fb3a..b7b2d9988a8 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -48,20 +48,6 @@ IMAGE-TYPE must be a pair (PREDICATE . TYPE). PREDICATE is called
48with one argument, a string containing the image data. If PREDICATE returns 48with one argument, a string containing the image data. If PREDICATE returns
49a non-nil value, TYPE is the image's type.") 49a non-nil value, TYPE is the image's type.")
50 50
51;;;###autoload
52(defvar image-library-alist nil
53 "Alist of image types vs external libraries needed to display them.
54
55Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
56representing a supported image type, and the rest are strings giving
57alternate filenames for the corresponding external libraries.
58
59Emacs tries to load the libraries in the order they appear on the
60list; if none is loaded, the running session of Emacs won't
61support the image type. Types 'pbm and 'xbm don't need to be
62listed; they're always supported.")
63;;;###autoload (put 'image-library-alist 'risky-local-variable t)
64
65(defun image-jpeg-p (data) 51(defun image-jpeg-p (data)
66 "Value is non-nil if DATA, a string, consists of JFIF image data. 52 "Value is non-nil if DATA, a string, consists of JFIF image data.
67We accept the tag Exif because that is the same format." 53We accept the tag Exif because that is the same format."
@@ -122,7 +108,7 @@ be determined."
122 108
123;;;###autoload 109;;;###autoload
124(defun image-type-available-p (type) 110(defun image-type-available-p (type)
125 "Value is non-nil if image type TYPE is available. 111 "Return non-nil if image type TYPE is available.
126Image types are symbols like `xbm' or `jpeg'." 112Image types are symbols like `xbm' or `jpeg'."
127 (and (fboundp 'init-image-library) 113 (and (fboundp 'init-image-library)
128 (init-image-library type image-library-alist))) 114 (init-image-library type image-library-alist)))
diff --git a/lisp/info.el b/lisp/info.el
index cfb44cb18f1..c36554e6a7a 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1,7 +1,7 @@
1;;; info.el --- info package for Emacs 1;;; info.el --- info package for Emacs
2 2
3;; Copyright (C) 1985,86,92,93,94,95,96,97,98,99,2000,01,02,03,04,2005 3;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4;; Free Software Foundation, Inc. 4;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
7;; Keywords: help 7;; Keywords: help
@@ -515,9 +515,10 @@ in all the directories in that path."
515 ;; since the argument will then be parsed improperly. This also 515 ;; since the argument will then be parsed improperly. This also
516 ;; has the added benefit of allowing node names to be included 516 ;; has the added benefit of allowing node names to be included
517 ;; following the parenthesized filename. 517 ;; following the parenthesized filename.
518 (if (and (stringp file) (string-match "(.*)" file)) 518 (Info-goto-node
519 (Info-goto-node file) 519 (if (and (stringp file) (string-match "(.*)" file))
520 (Info-goto-node (concat "(" file ")"))) 520 file
521 (concat "(" file ")")))
521 (if (zerop (buffer-size)) 522 (if (zerop (buffer-size))
522 (Info-directory)))) 523 (Info-directory))))
523 524
@@ -1344,7 +1345,9 @@ any double quotes or backslashes must be escaped (\\\",\\\\)."
1344;; Go to an info node specified with a filename-and-nodename string 1345;; Go to an info node specified with a filename-and-nodename string
1345;; of the sort that is found in pointers in nodes. 1346;; of the sort that is found in pointers in nodes.
1346 1347
1347;;;###autoload 1348;; Don't autoload this function: the correct entry point for other packages
1349;; to use is `info'. --Stef
1350;; ;;;###autoload
1348(defun Info-goto-node (nodename &optional fork) 1351(defun Info-goto-node (nodename &optional fork)
1349 "Go to info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME. 1352 "Go to info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME.
1350If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file 1353If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
@@ -3259,7 +3262,7 @@ Advanced commands:
3259 (set (make-local-variable 'search-whitespace-regexp) 3262 (set (make-local-variable 'search-whitespace-regexp)
3260 Info-search-whitespace-regexp) 3263 Info-search-whitespace-regexp)
3261 (Info-set-mode-line) 3264 (Info-set-mode-line)
3262 (run-hooks 'Info-mode-hook)) 3265 (run-mode-hooks 'Info-mode-hook))
3263 3266
3264;; When an Info buffer is killed, make sure the associated tags buffer 3267;; When an Info buffer is killed, make sure the associated tags buffer
3265;; is killed too. 3268;; is killed too.
@@ -3301,7 +3304,7 @@ which returns to Info mode for browsing.
3301 (setq buffer-read-only nil) 3304 (setq buffer-read-only nil)
3302 (force-mode-line-update) 3305 (force-mode-line-update)
3303 (buffer-enable-undo (current-buffer)) 3306 (buffer-enable-undo (current-buffer))
3304 (run-hooks 'Info-edit-mode-hook)) 3307 (run-mode-hooks 'Info-edit-mode-hook))
3305 3308
3306(defun Info-edit () 3309(defun Info-edit ()
3307 "Edit the contents of this Info node. 3310 "Edit the contents of this Info node.
@@ -4127,5 +4130,5 @@ BUFFER is the buffer speedbar is requesting buttons for."
4127 4130
4128(provide 'info) 4131(provide 'info)
4129 4132
4130;;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac 4133;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac
4131;;; info.el ends here 4134;;; info.el ends here
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 88da8ffed79..24f7ebc6000 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -130,46 +130,49 @@ coding system names is determined from `latex-inputenc-coding-alist'."
130 (throw 'cs t) 130 (throw 'cs t)
131 (goto-char (match-end 0)))))) 131 (goto-char (match-end 0))))))
132 (let* ((match (match-string 1)) 132 (let* ((match (match-string 1))
133 (sym (intern match))) 133 (sym (or (latexenc-inputenc-to-coding-system match)
134 (when (latexenc-inputenc-to-coding-system match) 134 (intern match))))
135 (setq sym (latexenc-inputenc-to-coding-system match))) 135 (cond
136 (when (coding-system-p sym) 136 ((coding-system-p sym) sym)
137 sym 137 ((and (require 'code-pages nil t) (coding-system-p sym)) sym)
138 (if (and (require 'code-pages nil t) (coding-system-p sym)) 138 (t 'undecided)))
139 sym
140 'undecided)))
141 ;; else try to find it in the master/main file 139 ;; else try to find it in the master/main file
142 (let (latexenc-main-file) 140 (let ((default-directory (file-name-directory (nth 1 arg-list)))
143 ;; is there a TeX-master or tex-main-file in the local variable section 141 latexenc-main-file)
142 ;; Is there a TeX-master or tex-main-file in the local variables
143 ;; section?
144 (unless latexenc-dont-use-TeX-master-flag 144 (unless latexenc-dont-use-TeX-master-flag
145 (goto-char (point-max)) 145 (goto-char (point-max))
146 (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) 146 (search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
147 'move)
147 (search-forward "Local Variables:" nil t) 148 (search-forward "Local Variables:" nil t)
148 (when (re-search-forward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t) 149 (when (re-search-forward
149 (let ((file (concat (file-name-directory (nth 1 arg-list)) (match-string 2)))) 150 "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
150 (if (file-exists-p file) 151 nil t)
151 (setq latexenc-main-file file) 152 (let ((file (match-string 2)))
152 (if (boundp 'TeX-default-extension) 153 (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
153 (when (file-exists-p (concat file "." TeX-default-extension)) 154 (concat "." TeX-default-extension)
154 (setq latexenc-main-file (concat file "." TeX-default-extension))) 155 "")
155 (dolist (ext '("drv" "dtx" "ltx" "tex")) 156 ".tex" ".ltx" ".dtx" ".drv"))
156 (if (file-exists-p (concat file "." ext)) 157 (if (and (null latexenc-main-file) ;Stop at first.
157 (setq latexenc-main-file (concat file "." ext))))))))) 158 (file-exists-p (concat file ext)))
159 (setq latexenc-main-file (concat file ext)))))))
158 ;; try tex-modes tex-guess-main-file 160 ;; try tex-modes tex-guess-main-file
159 (when (and (not latexenc-dont-use-tex-guess-main-file-flag) 161 (when (and (not latexenc-dont-use-tex-guess-main-file-flag)
160 (not latexenc-main-file)) 162 (not latexenc-main-file)
161 (when (fboundp 'tex-guess-main-file) 163 (fboundp 'tex-guess-main-file))
162 (let ((tex-start-of-header "\\\\document\\(style\\|class\\)") 164 (let ((tex-start-of-header "\\\\document\\(style\\|class\\)"))
163 (default-directory (file-name-directory (nth 1 arg-list)))) 165 (setq latexenc-main-file (tex-guess-main-file))))
164 (setq latexenc-main-file (tex-guess-main-file)))))
165 ;; if we found a master/main file get the coding system from it 166 ;; if we found a master/main file get the coding system from it
166 (if (and latexenc-main-file 167 (if (and latexenc-main-file
167 (file-readable-p latexenc-main-file)) 168 (file-readable-p latexenc-main-file))
168 (let* ((latexenc-dont-use-tex-guess-main-file-flag t) 169 (let* ((latexenc-dont-use-tex-guess-main-file-flag t)
169 (latexenc-dont-use-TeX-master-flag t) 170 (latexenc-dont-use-TeX-master-flag t)
170 (latexenc-main-buffer (find-file-noselect latexenc-main-file t))) 171 (latexenc-main-buffer
171 (or (buffer-local-value 'coding-system-for-write latexenc-main-buffer) 172 (find-file-noselect latexenc-main-file t)))
172 (buffer-local-value 'buffer-file-coding-system latexenc-main-buffer))) 173 (coding-system-base ;Disregard the EOL part of the CS.
174 (with-current-buffer latexenc-main-buffer
175 (or coding-system-for-write buffer-file-coding-system))))
173 'undecided)))) 176 'undecided))))
174 'undecided)) 177 'undecided))
175 178
diff --git a/lisp/international/swedish.el b/lisp/international/swedish.el
index bf9fce5de65..783fe2400e9 100644
--- a/lisp/international/swedish.el
+++ b/lisp/international/swedish.el
@@ -133,7 +133,7 @@ Leaves point just after the word that looks Swedish."
133; (setq major-mode 'swedish-mode) 133; (setq major-mode 'swedish-mode)
134; (setq local-abbrev-table swedish-mode-abbrev-table) 134; (setq local-abbrev-table swedish-mode-abbrev-table)
135; (set-syntax-table text-mode-syntax-table) 135; (set-syntax-table text-mode-syntax-table)
136; (run-hooks 'text-mode-hook)) 136; (run-mode-hooks 'text-mode-hook))
137 137
138;(defun indented-swedish-mode () 138;(defun indented-swedish-mode ()
139; "Major mode for editing indented Swedish text intended for 139; "Major mode for editing indented Swedish text intended for
@@ -151,7 +151,7 @@ Leaves point just after the word that looks Swedish."
151; (use-local-map indented-text-mode-map) 151; (use-local-map indented-text-mode-map)
152; (setq mode-name "Indented Swedish") 152; (setq mode-name "Indented Swedish")
153; (setq major-mode 'indented-swedish-mode) 153; (setq major-mode 'indented-swedish-mode)
154; (run-hooks 'text-mode-hook)) 154; (run-mode-hooks 'text-mode-hook))
155 155
156(provide 'swedish) 156(provide 'swedish)
157 157
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 52915c46950..2943be851a0 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -1,6 +1,6 @@
1;;; iswitchb.el --- switch between buffers using substrings 1;;; iswitchb.el --- switch between buffers using substrings
2 2
3;; Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Stephen Eglen <stephen@gnu.org> 5;; Author: Stephen Eglen <stephen@gnu.org>
6;; Maintainer: Stephen Eglen <stephen@gnu.org> 6;; Maintainer: Stephen Eglen <stephen@gnu.org>
@@ -165,11 +165,10 @@
165 165
166;; Font-Lock 166;; Font-Lock
167 167
168;; If you have font-lock loaded, the first matching buffer is 168;; font-lock is used to highlight the first matching buffer. To
169;; highlighted. To switch this off, set (setq iswitchb-use-fonts nil) 169;; switch this off, set (setq iswitchb-use-faces nil). Colouring of
170;; I don't use font-lock that much, so I've hardcoded the faces. If 170;; the matching buffer name was suggested by Carsten Dominik
171;; this is too harsh, let me know. Colouring of the matching buffer 171;; (dominik@strw.leidenuniv.nl)
172;; name was suggested by Carsten Dominik (dominik@strw.leidenuniv.nl)
173 172
174;; Replacement for read-buffer 173;; Replacement for read-buffer
175 174
@@ -230,16 +229,10 @@
230 229
231;; Regexp matching 230;; Regexp matching
232 231
233;; There is limited provision for regexp matching within iswitchb, 232;; There is provision for regexp matching within iswitchb, enabled
234;; enabled through `iswitchb-regexp'. This allows you to type `c$' 233;; through `iswitchb-regexp'. This allows you to type `c$' for
235;; for example and see all buffer names ending in `c'. This facility 234;; example and see all buffer names ending in `c'. No completion
236;; is quite limited though in two respects. First, you can't 235;; mechanism is currently offered when regexp searching.
237;; currently type in expressions like `[0-9]' directly -- you have to
238;; type them in when iswitchb-regexp is nil and then toggle on the
239;; regexp functionality. Likewise, don't enter an expression
240;; containing `\' in regexp mode. If you try, iswitchb gets confused,
241;; so just hit C-g and try again. Secondly, no completion mechanism
242;; is currently offered when regexp searching.
243 236
244;;; TODO 237;;; TODO
245 238
@@ -256,6 +249,8 @@
256 (fboundp 'last))) 249 (fboundp 'last)))
257 (require 'cl)) 250 (require 'cl))
258 251
252(require 'font-lock)
253
259;; Set up the custom library. 254;; Set up the custom library.
260;; taken from http://www.dina.kvl.dk/~abraham/custom/ 255;; taken from http://www.dina.kvl.dk/~abraham/custom/
261(eval-and-compile 256(eval-and-compile
@@ -377,10 +372,11 @@ See also `iswitchb-newbuffer'."
377 :type 'boolean 372 :type 'boolean
378 :group 'iswitchb) 373 :group 'iswitchb)
379 374
380(defcustom iswitchb-use-fonts t 375(defcustom iswitchb-use-faces t
381 "*Non-nil means use font-lock fonts for showing first match." 376 "*Non-nil means use font-lock fonts for showing first match."
382 :type 'boolean 377 :type 'boolean
383 :group 'iswitchb) 378 :group 'iswitchb)
379(define-obsolete-variable-alias 'iswitchb-use-fonts 'iswitchb-use-faces "22.1")
384 380
385(defcustom iswitchb-use-frame-buffer-list nil 381(defcustom iswitchb-use-frame-buffer-list nil
386 "*Non-nil means use the currently selected frame's buffer list." 382 "*Non-nil means use the currently selected frame's buffer list."
@@ -408,6 +404,35 @@ iswitchb is running."
408 :type 'hook 404 :type 'hook
409 :group 'iswitchb) 405 :group 'iswitchb)
410 406
407(defface iswitchb-single-match-face
408 '((t
409 (:inherit font-lock-comment-face)))
410 "Iswitchb face for single matching buffer name."
411 :version "22.1"
412 :group 'iswitchb)
413
414(defface iswitchb-current-match-face
415 '((t
416 (:inherit font-lock-function-name-face)))
417 "Iswitchb face for current matching buffer name."
418 :version "22.1"
419 :group 'iswitchb)
420
421(defface iswitchb-virtual-matches-face
422 '((t
423 (:inherit font-lock-builtin-face)))
424 "Iswitchb face for matching virtual buffer names.
425See also `iswitchb-use-virtual-buffers'."
426 :version "22.1"
427 :group 'iswitchb)
428
429(defface iswitchb-invalid-regexp-face
430 '((t
431 (:inherit font-lock-warning-face)))
432 "Iswitchb face for indicating invalid regexp. "
433 :version "22.1"
434 :group 'iswitchb)
435
411;; Do we need the variable iswitchb-use-mycompletion? 436;; Do we need the variable iswitchb-use-mycompletion?
412 437
413;;; Internal Variables 438;;; Internal Variables
@@ -507,6 +532,11 @@ selected.")
507(defvar iswitchb-minibuf-depth nil 532(defvar iswitchb-minibuf-depth nil
508 "Value we expect to be returned by `minibuffer-depth' in the minibuffer.") 533 "Value we expect to be returned by `minibuffer-depth' in the minibuffer.")
509 534
535(defvar iswitchb-common-match-inserted nil
536 "Non-nil if we have just inserted a common match in the minibuffer.")
537
538(defvar iswitchb-invalid-regexp)
539
510;;; FUNCTIONS 540;;; FUNCTIONS
511 541
512;;; ISWITCHB KEYMAP 542;;; ISWITCHB KEYMAP
@@ -564,6 +594,7 @@ in a separate window.
564 ;;`iswitchb-buffer-ignore') 594 ;;`iswitchb-buffer-ignore')
565 595
566 (let* ((prompt "iswitch ") 596 (let* ((prompt "iswitch ")
597 iswitchb-invalid-regexp
567 (buf (iswitchb-read-buffer prompt))) 598 (buf (iswitchb-read-buffer prompt)))
568 599
569 ;;(message "chosen text %s" iswitchb-final-text) 600 ;;(message "chosen text %s" iswitchb-final-text)
@@ -572,7 +603,8 @@ in a separate window.
572 603
573 (cond ( (eq iswitchb-exit 'findfile) 604 (cond ( (eq iswitchb-exit 'findfile)
574 (call-interactively 'find-file)) 605 (call-interactively 'find-file))
575 606 (iswitchb-invalid-regexp
607 (message "Won't make invalid regexp named buffer"))
576 (t 608 (t
577 ;; View the buffer 609 ;; View the buffer
578 ;;(message "go to buf %s" buf) 610 ;;(message "go to buf %s" buf)
@@ -602,10 +634,7 @@ the selection process begins. Used by isearchb.el."
602 buf-sel 634 buf-sel
603 iswitchb-final-text 635 iswitchb-final-text
604 (icomplete-mode nil) ;; prevent icomplete starting up 636 (icomplete-mode nil) ;; prevent icomplete starting up
605 ;; can only use fonts if they have been bound. 637 )
606 (iswitchb-use-fonts (and iswitchb-use-fonts
607 (boundp 'font-lock-comment-face)
608 (boundp 'font-lock-function-name-face))))
609 638
610 (iswitchb-define-mode-map) 639 (iswitchb-define-mode-map)
611 (setq iswitchb-exit nil) 640 (setq iswitchb-exit nil)
@@ -691,7 +720,9 @@ The result is stored in `iswitchb-common-match-string'."
691 (let (res) 720 (let (res)
692 (cond ((not iswitchb-matches) 721 (cond ((not iswitchb-matches)
693 (run-hooks 'iswitchb-cannot-complete-hook)) 722 (run-hooks 'iswitchb-cannot-complete-hook))
694 723 (iswitchb-invalid-regexp
724 ;; Do nothing
725 )
695 ((= 1 (length iswitchb-matches)) 726 ((= 1 (length iswitchb-matches))
696 ;; only one choice, so select it. 727 ;; only one choice, so select it.
697 (exit-minibuffer)) 728 (exit-minibuffer))
@@ -703,7 +734,8 @@ The result is stored in `iswitchb-common-match-string'."
703 (not (equal res iswitchb-text))) 734 (not (equal res iswitchb-text)))
704 ;; found something to complete, so put it in the minibuffer. 735 ;; found something to complete, so put it in the minibuffer.
705 (progn 736 (progn
706 (setq iswitchb-rescan nil) 737 (setq iswitchb-rescan nil
738 iswitchb-common-match-inserted t)
707 (delete-region (minibuffer-prompt-end) (point)) 739 (delete-region (minibuffer-prompt-end) (point))
708 (insert res)) 740 (insert res))
709 ;; else nothing to complete 741 ;; else nothing to complete
@@ -889,22 +921,26 @@ BUFFER-LIST can be list of buffers or list of strings."
889 (do-string (stringp (car list))) 921 (do-string (stringp (car list)))
890 name 922 name
891 ret) 923 ret)
892 (mapcar 924 (setq iswitchb-invalid-regexp nil)
893 (lambda (x) 925 (catch 'invalid-regexp
894 926 (mapcar
895 (if do-string 927 (lambda (x)
896 (setq name x) ;We already have the name 928
897 (setq name (buffer-name x))) 929 (if do-string
898 930 (setq name x) ;We already have the name
899 (cond 931 (setq name (buffer-name x)))
900 ((and (or (and string-format (string-match regexp name)) 932
901 (and (null string-format) 933 (cond
902 (string-match (regexp-quote regexp) name))) 934 ((and (if (not string-format)
903 935 (string-match (regexp-quote regexp) name)
904 (not (iswitchb-ignore-buffername-p name))) 936 (condition-case error
905 (setq ret (cons name ret)) 937 (string-match regexp name)
906 ))) 938 (invalid-regexp
907 list) 939 (setq iswitchb-invalid-regexp t)
940 (throw 'invalid-regexp (setq ret (cdr error))))))
941 (not (iswitchb-ignore-buffername-p name)))
942 (setq ret (cons name ret)))))
943 list))
908 ret)) 944 ret))
909 945
910(defun iswitchb-ignore-buffername-p (bufname) 946(defun iswitchb-ignore-buffername-p (bufname)
@@ -989,7 +1025,8 @@ Return the modified list with the last element prepended to it."
989 (temp-buf "*Completions*") 1025 (temp-buf "*Completions*")
990 (win)) 1026 (win))
991 1027
992 (if (eq last-command this-command) 1028 (if (and (eq last-command this-command)
1029 (not iswitchb-common-match-inserted))
993 ;; scroll buffer 1030 ;; scroll buffer
994 (progn 1031 (progn
995 (set-buffer temp-buf) 1032 (set-buffer temp-buf)
@@ -1016,8 +1053,8 @@ Return the modified list with the last element prepended to it."
1016 (fundamental-mode)) 1053 (fundamental-mode))
1017 (display-completion-list (if iswitchb-matches 1054 (display-completion-list (if iswitchb-matches
1018 iswitchb-matches 1055 iswitchb-matches
1019 iswitchb-buflist)) 1056 iswitchb-buflist))))
1020 ))))) 1057 (setq iswitchb-common-match-inserted nil))))
1021 1058
1022;;; KILL CURRENT BUFFER 1059;;; KILL CURRENT BUFFER
1023 1060
@@ -1227,8 +1264,7 @@ Copied from `icomplete-exhibit' with two changes:
1227 1264
1228 ;; Insert the match-status information: 1265 ;; Insert the match-status information:
1229 (insert (iswitchb-completions 1266 (insert (iswitchb-completions
1230 contents 1267 contents))))))
1231 (not minibuffer-completion-confirm)))))))
1232 1268
1233(eval-when-compile 1269(eval-when-compile
1234 (defvar most-len) 1270 (defvar most-len)
@@ -1243,27 +1279,29 @@ Copied from `icomplete-exhibit' with two changes:
1243 (setq most-is-exact t)) 1279 (setq most-is-exact t))
1244 (substring com most-len))) 1280 (substring com most-len)))
1245 1281
1246(defun iswitchb-completions (name require-match) 1282(defun iswitchb-completions (name)
1247 "Return the string that is displayed after the user's text. 1283 "Return the string that is displayed after the user's text.
1248Modified from `icomplete-completions'." 1284Modified from `icomplete-completions'."
1249 1285
1250 (let ((comps iswitchb-matches) 1286 (let ((comps iswitchb-matches)
1251 ; "-determined" - only one candidate 1287 ; "-determined" - only one candidate
1252 (open-bracket-determined (if require-match "(" "[")) 1288 (open-bracket-determined "[")
1253 (close-bracket-determined (if require-match ")" "]")) 1289 (close-bracket-determined "]")
1254 ;"-prospects" - more than one candidate 1290 ;"-prospects" - more than one candidate
1255 (open-bracket-prospects "{") 1291 (open-bracket-prospects "{")
1256 (close-bracket-prospects "}") 1292 (close-bracket-prospects "}")
1257 first) 1293 first)
1258 1294
1259 (if (and iswitchb-use-fonts comps) 1295 (if (and iswitchb-use-faces comps)
1260 (progn 1296 (progn
1261 (setq first (car comps)) 1297 (setq first (car comps))
1262 (setq first (format "%s" first)) 1298 (setq first (format "%s" first))
1263 (put-text-property 0 (length first) 'face 1299 (put-text-property 0 (length first) 'face
1264 (if (= (length comps) 1) 1300 (if (= (length comps) 1)
1265 'font-lock-comment-face 1301 (if iswitchb-invalid-regexp
1266 'font-lock-function-name-face) 1302 'iswitchb-invalid-regexp-face
1303 'iswitchb-single-match-face)
1304 'iswitchb-current-match-face)
1267 first) 1305 first)
1268 (setq comps (cons first (cdr comps))))) 1306 (setq comps (cons first (cdr comps)))))
1269 1307
@@ -1292,7 +1330,7 @@ Modified from `icomplete-completions'."
1292 (let ((comp comps)) 1330 (let ((comp comps))
1293 (while comp 1331 (while comp
1294 (put-text-property 0 (length (car comp)) 1332 (put-text-property 0 (length (car comp))
1295 'face 'font-lock-builtin-face 1333 'face 'iswitchb-virtual-matches-face
1296 (car comp)) 1334 (car comp))
1297 (setq comp (cdr comp)))))) 1335 (setq comp (cdr comp))))))
1298 1336
@@ -1300,16 +1338,23 @@ Modified from `icomplete-completions'."
1300 open-bracket-determined 1338 open-bracket-determined
1301 close-bracket-determined)) 1339 close-bracket-determined))
1302 1340
1303 ((null (cdr comps)) ;one match 1341 (iswitchb-invalid-regexp
1304 (concat (if (and (> (length (car comps)) 1342 (concat " " (car comps)))
1305 (length name))) 1343 ((null (cdr comps)) ;one match
1306 (concat open-bracket-determined 1344 (concat
1345 (if (if (not iswitchb-regexp)
1346 (= (length name)
1347 (length (car comps)))
1348 (string-match name (car comps))
1349 (string-equal (match-string 0 (car comps))
1350 (car comps)))
1351 ""
1352 (concat open-bracket-determined
1307 ;; when there is one match, show the 1353 ;; when there is one match, show the
1308 ;; matching buffer name in full 1354 ;; matching buffer name in full
1309 (car comps) 1355 (car comps)
1310 close-bracket-determined) 1356 close-bracket-determined))
1311 "") 1357 (if (not iswitchb-use-faces) " [Matched]")))
1312 (if (not iswitchb-use-fonts) " [Matched]")))
1313 (t ;multiple matches 1358 (t ;multiple matches
1314 (if (and iswitchb-max-to-show 1359 (if (and iswitchb-max-to-show
1315 (> (length comps) iswitchb-max-to-show)) 1360 (> (length comps) iswitchb-max-to-show))
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index b34e26f74d4..ba2eed9f17e 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -298,7 +298,7 @@ Only applies to the current buffer."
298 "Fontify current buffer starting at position START. 298 "Fontify current buffer starting at position START.
299This function is added to `fontification-functions' when `jit-lock-mode' 299This function is added to `fontification-functions' when `jit-lock-mode'
300is active." 300is active."
301 (when jit-lock-mode 301 (when (and jit-lock-mode (not (memory-full-p)))
302 (if (null jit-lock-defer-time) 302 (if (null jit-lock-defer-time)
303 ;; No deferral. 303 ;; No deferral.
304 (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) 304 (jit-lock-fontify-now start (+ start jit-lock-chunk-size))
@@ -540,7 +540,7 @@ is the pre-change length.
540This function ensures that lines following the change will be refontified 540This function ensures that lines following the change will be refontified
541in case the syntax of those lines has changed. Refontification 541in case the syntax of those lines has changed. Refontification
542will take place when text is fontified stealthily." 542will take place when text is fontified stealthily."
543 (when jit-lock-mode 543 (when (and jit-lock-mode (not (memory-full-p)))
544 (save-excursion 544 (save-excursion
545 (with-buffer-prepared-for-jit-lock 545 (with-buffer-prepared-for-jit-lock
546 ;; It's important that the `fontified' property be set from the 546 ;; It's important that the `fontified' property be set from the
diff --git a/lisp/ledit.el b/lisp/ledit.el
index 8568740fd0b..38e03ca60cc 100644
--- a/lisp/ledit.el
+++ b/lisp/ledit.el
@@ -152,7 +152,7 @@ do (setq lisp-mode-hook 'ledit-from-lisp-mode)"
152 (use-local-map ledit-mode-map) 152 (use-local-map ledit-mode-map)
153 (setq mode-name "Ledit") 153 (setq mode-name "Ledit")
154 (setq major-mode 'ledit-mode) 154 (setq major-mode 'ledit-mode)
155 (run-hooks 'ledit-mode-hook)) 155 (run-mode-hooks 'ledit-mode-hook))
156 156
157(provide 'ledit) 157(provide 'ledit)
158 158
diff --git a/lisp/locate.el b/lisp/locate.el
index 42463a160fa..30a6ff41df3 100644
--- a/lisp/locate.el
+++ b/lisp/locate.el
@@ -393,7 +393,7 @@ do not work in subdirectories.
393 (make-local-variable 'revert-buffer-function) 393 (make-local-variable 'revert-buffer-function)
394 (setq revert-buffer-function 'locate-update) 394 (setq revert-buffer-function 'locate-update)
395 (set (make-local-variable 'page-delimiter) "\n\n") 395 (set (make-local-variable 'page-delimiter) "\n\n")
396 (run-hooks 'locate-mode-hook)) 396 (run-mode-hooks 'locate-mode-hook))
397 397
398(defun locate-do-setup (search-string) 398(defun locate-do-setup (search-string)
399 (goto-char (point-min)) 399 (goto-char (point-min))
diff --git a/lisp/longlines.el b/lisp/longlines.el
index ebfb7a660b0..e9c300fdbec 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -39,8 +39,6 @@
39 39
40;;; Code: 40;;; Code:
41 41
42(require 'easy-mmode)
43
44(defgroup longlines nil 42(defgroup longlines nil
45 "Automatic wrapping of long lines when loading files." 43 "Automatic wrapping of long lines when loading files."
46 :group 'fill) 44 :group 'fill)
@@ -157,7 +155,8 @@ major mode changes."
157 155
158(defface longlines-visible-face 156(defface longlines-visible-face
159 '((t (:background "red"))) 157 '((t (:background "red")))
160 "Face used to make hard newlines visible in `longlines-mode'.") 158 "Face used to make hard newlines visible in `longlines-mode'."
159 :group 'longlines)
161 160
162(defun longlines-show-hard-newlines (&optional arg) 161(defun longlines-show-hard-newlines (&optional arg)
163 "Make hard newlines visible by adding a face. 162 "Make hard newlines visible by adding a face.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 3fa8b3df3cd..e97f7d77cae 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1156,7 +1156,7 @@ Instead, these commands are available:
1156 (when rmail-display-summary 1156 (when rmail-display-summary
1157 (rmail-summary)) 1157 (rmail-summary))
1158 (rmail-construct-io-menu)) 1158 (rmail-construct-io-menu))
1159 (run-hooks 'rmail-mode-hook))) 1159 (run-mode-hooks 'rmail-mode-hook)))
1160 1160
1161(defun rmail-mode-2 () 1161(defun rmail-mode-2 ()
1162 (kill-all-local-variables) 1162 (kill-all-local-variables)
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index a057c019b82..ceea389cea1 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -68,7 +68,7 @@ This functions runs the normal hook `rmail-edit-mode-hook'.
68 (save-excursion 68 (save-excursion
69 (set-buffer rmail-summary-buffer) 69 (set-buffer rmail-summary-buffer)
70 (rmail-summary-disable))) 70 (rmail-summary-disable)))
71 (run-hooks 'rmail-edit-mode-hook)) 71 (run-mode-hooks 'rmail-edit-mode-hook))
72 72
73(defvar rmail-old-pruned nil) 73(defvar rmail-old-pruned nil)
74(put 'rmail-old-pruned 'permanent-local t) 74(put 'rmail-old-pruned 'permanent-local t)
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index f551239907d..9c647126d5c 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -760,7 +760,7 @@ Commands for sorting the summary:
760 (make-local-variable 'font-lock-defaults) 760 (make-local-variable 'font-lock-defaults)
761 (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) 761 (setq font-lock-defaults '(rmail-summary-font-lock-keywords t))
762 (rmail-summary-enable) 762 (rmail-summary-enable)
763 (run-hooks 'rmail-summary-mode-hook)) 763 (run-mode-hooks 'rmail-summary-mode-hook))
764 764
765;; Summary features need to be disabled during edit mode. 765;; Summary features need to be disabled during edit mode.
766(defun rmail-summary-disable () 766(defun rmail-summary-disable ()
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index d9a9d78d0b9..ba4aca881ef 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -3,7 +3,7 @@
3;; Copyright (C) 1993, 1997, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1997, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org> 5;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org>
6;; Maintainer: FSF 6;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
7;; Created: February 1993 7;; Created: February 1993
8;; Last Modified: 1993/09/22 18:58:46 8;; Last Modified: 1993/09/22 18:58:46
9;; Keywords: mail, news 9;; Keywords: mail, news
@@ -1182,8 +1182,11 @@ to the auto-selected attribution string."
1182 (setq attribution attrib 1182 (setq attribution attrib
1183 attriblist nil)) 1183 attriblist nil))
1184 ((listp attrib) 1184 ((listp attrib)
1185 (setq attribution (eval attrib) 1185 (setq attribution (eval attrib))
1186 attriblist nil)) 1186 (if (stringp attribution)
1187 (setq attriblist nil)
1188 (setq attribution nil
1189 attriblist (cdr attriblist))))
1187 (t (error "%s did not evaluate to a string or list!" 1190 (t (error "%s did not evaluate to a string or list!"
1188 "sc-attrib-selection-list")) 1191 "sc-attrib-selection-list"))
1189 ))) 1192 )))
@@ -1667,7 +1670,7 @@ header style to use, unless not supplied or invalid, in which case
1667 (major-mode 'sc-electric-mode)) 1670 (major-mode 'sc-electric-mode))
1668 (use-local-map sc-electric-mode-map) 1671 (use-local-map sc-electric-mode-map)
1669 (sc-eref-show sc-eref-style) 1672 (sc-eref-show sc-eref-style)
1670 (run-hooks 'sc-electric-mode-hook) 1673 (run-mode-hooks 'sc-electric-mode-hook)
1671 (recursive-edit) 1674 (recursive-edit)
1672 ))) 1675 )))
1673 1676
diff --git a/lisp/man.el b/lisp/man.el
index 712b1f30e7f..d7344ed2f7a 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -259,7 +259,7 @@ the associated section number."
259(defvar Man-cooked-hook nil 259(defvar Man-cooked-hook nil
260 "Hook run after removing backspaces but before `Man-mode' processing.") 260 "Hook run after removing backspaces but before `Man-mode' processing.")
261 261
262(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.­+]*" 262(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.:­+]*"
263 "Regular expression describing the name of a manpage (without section).") 263 "Regular expression describing the name of a manpage (without section).")
264 264
265(defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" 265(defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]"
@@ -1061,6 +1061,7 @@ The following variables may be of some use. Try
1061The following key bindings are currently in effect in the buffer: 1061The following key bindings are currently in effect in the buffer:
1062\\{Man-mode-map}" 1062\\{Man-mode-map}"
1063 (interactive) 1063 (interactive)
1064 (kill-all-local-variables)
1064 (setq major-mode 'Man-mode 1065 (setq major-mode 'Man-mode
1065 mode-name "Man" 1066 mode-name "Man"
1066 buffer-auto-save-file-name nil 1067 buffer-auto-save-file-name nil
@@ -1069,7 +1070,7 @@ The following key bindings are currently in effect in the buffer:
1069 " {" 'Man-page-mode-string "}") 1070 " {" 'Man-page-mode-string "}")
1070 truncate-lines t 1071 truncate-lines t
1071 buffer-read-only t) 1072 buffer-read-only t)
1072 (buffer-disable-undo (current-buffer)) 1073 (buffer-disable-undo)
1073 (auto-fill-mode -1) 1074 (auto-fill-mode -1)
1074 (use-local-map Man-mode-map) 1075 (use-local-map Man-mode-map)
1075 (set-syntax-table man-mode-syntax-table) 1076 (set-syntax-table man-mode-syntax-table)
@@ -1080,7 +1081,7 @@ The following key bindings are currently in effect in the buffer:
1080 (Man-strip-page-headers) 1081 (Man-strip-page-headers)
1081 (Man-unindent) 1082 (Man-unindent)
1082 (Man-goto-page 1) 1083 (Man-goto-page 1)
1083 (run-hooks 'Man-mode-hook)) 1084 (run-mode-hooks 'Man-mode-hook))
1084 1085
1085(defsubst Man-build-section-alist () 1086(defsubst Man-build-section-alist ()
1086 "Build the association list of manpage sections." 1087 "Build the association list of manpage sections."
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 92f997d7b4a..23e7c6d44cb 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,27 +1,305 @@
12005-04-08 Dan Nicolaescu <dann@ics.uci.edu> 12005-05-28 Bill Wohler <wohler@newt.com>
2
3 Released MH-E version 7.84.
4
5 * MH-E-NEWS, README: Updated for release 7.84.
6
7 * mh-e.el (Version, mh-version): Updated for release 7.84.
8
92005-05-28 Bill Wohler <wohler@newt.com>
10
11 * mh-e.el, mh-comp.el: Don't autoload Info-goto-node. It's not
12 used, and if it were, the code should use the info function
13 instead.
14
15 Use full year in copyright notices (for example, 2005, not 05).
16
17 * Makefile (mh-loaddefs.el, mh-e-autoloads.el): Added 2005 to
18 copyright notice.
19
20 * mh-inc.el: Use three ;;; to precede Local Variables to be
21 consistent with other files. Will have to ask Stefan Monnier why
22 he changed it.
23
24 * README: This version of MH-E to appear in GNU Emacs 22.1, not
25 21.5.
26
27 * ChangeLog: The * in a ChangeLog entry must only be used before a
28 filename.
29
30 Fixed compilation warnings in CVS Emacs. This included using
31 "public" functions instead of "private" ones (info instead of
32 Info-goto-node, view-mode-enter instead of view-mode), and
33 removing a customization group that didn't have a parent group. In
34 addition, string-to-int was recently deprecated; use
35 string-to-number instead.
36
37 * mh-customize.el (Info-goto-node): Deleted autoload.
38 (mh-e): Deleted mh group. Use single mh-e group instead.
39 (mh-tool-bar-folder-help, mh-tool-bar-letter-help): Use info
40 instead of Info-goto-node.
41
42 * mh-e.el (mh-read-msg-list): string-to-int deprecated; use
43 string-to-number.
44
45 * mh-funcs.el (mh-list-folders): Use view-mode-enter instead of
46 view-mode.
47
48 * mh-seq.el (mh-list-sequences): Use view-mode-enter instead of
49 view-mode.
50
51 * mh-utils.el (mh-get-msg-num): string-to-int deprecated; use
52 string-to-number.
53
54 Merged in changes from CVS Emacs including:
55
56 * mh-utils.el (mh-show-mode):
57 * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. Lute
58 Kamstra <lute@gnu.org> 2005-05-26.
59
602005-05-25 Bill Wohler <wohler@newt.com>
61
62 Merged in changes from CVS Emacs including:
2 63
3 * mh-customize.el (mh-speedbar-selected-folder-face): Special case 64 * mh-customize.el (mh-speedbar-selected-folder-face): Special case
4 high number of colors displays. 65 high number of colors displays. Dan Nicolaescu <dann@ics.uci.edu>
66 2005-04-08.
67
68 * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with
69 `valid'. Replace `illegal' with `invalid'. Werner Lemberg
70 <wl@gnu.org> 2005-03-25.
5 71
62005-03-25 Werner Lemberg <wl@gnu.org> 72 * mh-inc.el (mh-inc-spool-list): Correctly declare the external
73 var. Stefan <monnier@iro.umontreal.ca> 2004-09-07.
7 74
8 * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'. 752005-05-18 Bill Wohler <wohler@newt.com>
9 76
102005-03-25 Werner Lemberg <wl@gnu.org> 77 * mh-comp.el (mh-reply): Mention use of mh-repl-group-formfile in
78 docstring.
11 79
12 * mh-e.el: Replace `illegal' with `invalid'. 802005-05-05 Bill Wohler <wohler@newt.com>
13 81
142004-09-07 Stefan <monnier@iro.umontreal.ca> 82 * mh-e.el (Version, mh-version): Added +cvs to release number.
15 83
16 * mh-inc.el (mh-inc-spool-list): Correctly declare the external var. 842005-05-05 Bill Wohler <wohler@newt.com>
17 85
182004-08-21 Bill Wohler <wohler@newt.com> 86 Released MH-E version 7.83.
87
88 * MH-E-NEWS, README: Updated for release 7.83.
89
90 * mh-e.el (Version, mh-version): Updated for release 7.83.
91
922005-05-05 Bill Wohler <wohler@newt.com>
93
94 * README: To appear in Emacs 21.5, since 21.4 was released (but
95 without the latest MH-E).
96
97 * release-utils (usage): Added --variable-changes.
98
992005-05-04 Bill Wohler <wohler@newt.com>
100
101 * mh-customize.el (*-face): Made docstrings consistent.
102
103 * mh-seq.el (mh-pick-args-list): Extracted function for turning
104 string of pick arguments to list. Fixed list so that multi-word
105 arguments were put in a single string (closes SF #1122655).
106 (mh-edit-pick-expr): Use it.
107
108 * mh-unit.el (mh-unit): Since 21.4 snuck out but didn't contain
109 updated lm-verify, don't run lm-verify on versions before 21.5.
110 (mh-unit-test-pick-args-list): Added.
111
112 * mh-customize.el (mh-yank-from-start-of-msg): Use headline
113 capitalization. Changed wording of some choices to be more consistent.
114 (mh-invisible-header-fields-internal): Added fields from usa.net.
115
1162005-04-24 Satyaki Das <satyaki@theforce.stanford.edu>
117
118 * mh-mime.el (mh-mime-security-button-face): New function which
119 determines the face to use to colorize encrypted or signed emails.
120 (mh-insert-mime-security-button): Modified to colorize the button
121 differently based on whether the signature was valid or not,
122 whether the decryption was successful or not, etc.
123
124 * mh-customize.el (mh-show-pgg-good-face)
125 (mh-show-pgg-unknown-face, mh-show-pgg-bad-face): Faces added to
126 highlight buttons introduced for encrpted or signed MIME parts.
127
1282005-03-19 Bill Wohler <wohler@newt.com>
129
130 * mh-customize.el (mh-mml-method-default): Sorted alphabetically.
131 (mh-insert-x-mailer-flag, mh-reply-show-message-flag): Moved from
132 mh-letter group to mh-sending-mail group. The writing of the
133 documentation revealed that these options were misplaced.
134
1352005-03-17 Bill Wohler <wohler@newt.com>
136
137 * mh-customize.el (mh-junk-background): Put in alphabetical order.
138 Synced with manual.
139 (mh-junk-program): Use double-quotes on non-symbols.
140
141 * mh-pick.el: (mh-search-folder): Synced docstrings with manual.
142
143 * mh-index.el: (mh-index-search, mh-pick-execute-search)
144 (mh-grep-execute-search, mh-mairix-execute-search)
145 (mh-swish-execute-search, mh-swish++-execute-search)
146 (mh-namazu-execute-search): Synced docstrings with manual. Note
147 that I'm now grabbing the output of an Info buffer which is why
148 the indents on the examples has changed a bit. If we all use that
149 methodology in the future, we shouldn't produce as many gratuitous
150 diffs. I also noticed that `grep' and `search' became links to
151 unrelated things, so let's use double-quotes for quoting
152 non-symbols in the docstrings.
153
154 * mh-customize.el (mh-index-new-messages-folders)
155 (mh-index-ticked-messages-folders): Synced docstrings with manual.
156
1572005-02-16 Satyaki Das <satyaki@theforce.stanford.edu>
158
159 * mh-index.el (mh-swish-execute-search): Simplify the indexing
160 recipe for swish. Thanks to Eric Jensen for the suggestion.
161
1622005-02-11 Satyaki Das <satyaki@theforce.stanford.edu>
163
164 * mh-index.el (mh-swish-execute-search)
165 (mh-swish++-execute-search): Make the indexing recipes better.
166 (mh-swish-next-result): The indexer might find matches in files
167 that aren't messages. Make the function handle that case
168 gracefully.
19 169
20 * Released MH-E version 7.82. 1702005-02-07 Bill Wohler <wohler@newt.com>
171
172 * mh-customize.el (mh-inc-prog, mh-inc-spool-list): Synced
173 docstrings with manual.
174
1752005-02-06 Bill Wohler <wohler@newt.com>
176
177 * mh-junk.el (mh-spamassassin-blacklist): Removed trailing
178 whitespace.
179
180 * mh-e.el (mh-refile-or-write-again): Checkdoc fix.
181
182 * mh-identity.el (mh-identity-list-set)
183 (mh-identity-field-handler, mh-identity-handler-gpg-identity)
184 (mh-identity-handler-signature)
185 (mh-identity-handler-attribution-verb)
186 (mh-identity-handler-default, mh-identity-handler-top): Docstring
187 editing.
188
189 * mh-customize.el (mh-identity-list, mh-auto-fields-list)
190 (mh-identity-default, mh-identity-handlers): Synced docstrings
191 with manual.
192
1932005-02-03 Bill Wohler <wohler@newt.com>
194
195 * mh-xemacs.el (define-behavior 'mh): Moved Ben's code here from
196 mh-e.el and added standard documentation.
197
198 * mh-e.el: Received patch from Ben Wing <ben@666.com> to add
199 define-behavior on XEmacs.
200
2012005-01-28 Jeffrey C Honig <jch@honig.net>
202
203 * mh-customize.el (mh-invisible-header-fields-internal): Added
204 X-Evolution header added by Evolution mai client.
205
2062005-01-18 Bill Wohler <wohler@newt.com>
207
208 * mh-customize.el (mh-invisible-header-fields-internal): Added
209 DomainKey-Signature (http://antispam.yahoo.com/domainkeys/).
210 There's a Comment field that goes with it, but I thought it was
211 too general to add.
212
2132005-01-06 Bill Wohler <wohler@newt.com>
214
215 * mh-junk.el (mh-spamassassin-blacklist): Fixed typo to fix an
216 error when junking spamassassin mail when mh-junk-background is
217 turned on.
218
2192004-12-25 Satyaki Das <satyaki@theforce.stanford.edu>
220
221 * mh-utils.el (mh-show-unquote-From): Make the buffer writable
222 before trying to change it (closes SF #1089870).
223
224 * mh-comp.el (mh-complete-word): Fix a typo in a variable
225 name (closes SF #1089870)
226
2272004-11-28 Jeffrey C Honig <jch@honig.net>
228
229 * mh-comp.el (mh-complete-word): Kill the *Completions* buffer in
230 any cases where we belive we are done with it. Not perfect, but
231 better than just leaving it around.
232
2332004-11-08 Satyaki Das <satyaki@theforce.stanford.edu>
234
235 * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a
236 function at compile time doesn't guarantee it's existence at run
237 time. So make the macro handle that situation better.
238
2392004-11-05 Satyaki Das <satyaki@theforce.stanford.edu>
240
241 * mh-acros.el (advice): Load advice, since it isn't loaded in
242 XEmacs causing compilation problems.
243
2442004-10-24 Satyaki Das <satyaki@theforce.stanford.edu>
245
246 * mh-index.el (mh-mairix-execute-search)
247 (mh-mairix-regexp-builder): Update the interface to mairix so that
248 it will work with versions of mairix 0.12 and later.
249
250 * mh-funcs.el (mh-rmf-daemon): Avoid using
251 beginning-of-buffer since it clobbers the mark and it was pointed
252 out on the Emacs developers list to be the wrong thing to do.
253
254 * mh-e.el (mh-inc-folder): Only remove the window on the show
255 buffer. This means if the user has BBDB enabled then the window
256 displaying BBDB information isn't clobbered.
257 (mh-refile-or-write-again): Don't use the function
258 interactive-p. There was a long thread on the Emacs developers
259 list where it was pointed out that it is incorrect to use this
260 function most of the time.
261
262 * mh-comp.el (autoload): Don't set auto-mode-alist. This could
263 screw things up for users that don't use MH-E (closes SF #1032353).
264
2652004-10-13 Satyaki Das <satyaki@theforce.stanford.edu>
266
267 * mh-e.el (mh-refile-or-write-again): Generalize the function to
268 work on a range of messages (closes SF #1046330).
269
2702004-09-02 Satyaki Das <satyaki@theforce.stanford.edu>
271
272 * mh-e.el (mh-process-commands): The concurrent execution of mark
273 and refile can cause problems since both the commands change the
274 current folder. This change avoids that by getting rid of the
275 concurrency. Another change covers the corner case where we refile
276 messages to a previously empty folder. Before the modification
277 sequences weren't preserved even if the appropriate flag was
278 set. That is no longer the case.
279
2802004-08-26 Satyaki Das <satyaki@theforce.stanford.edu>
281
282 * mh-e.el (mh-get-new-mail): Also, update the unseen sequence from
283 disk. Otherwise, the new messages aren't highlighted.
284
285 * mh-seq.el (mh-thread-inc): Fix a bug which appears when inc is
286 run in a narrowed folder. The user sequence notation was getting
287 lost. The change fixes that.
288
289 * mh-e.el (mh-get-new-mail): Make inc more efficient by reusing
290 the existing user sequence notation and deleted/refiled notation.
291
2922004-08-24 Bill Wohler <wohler@newt.com>
293
294 * mh-e.el (Version, mh-version): Added +cvs to release number.
295
2962004-08-24 Bill Wohler <wohler@newt.com>
297
298 Released MH-E version 7.82.
21 299
22 * MH-E-NEWS, README: Updated for release 7.82. 300 * MH-E-NEWS, README: Updated for release 7.82.
23 301
24 * mh-e.el (Version, mh-version): Update for release 7.82. 302 * mh-e.el (Version, mh-version): Updated for release 7.82.
25 303
262004-08-24 Bill Wohler <wohler@newt.com> 3042004-08-24 Bill Wohler <wohler@newt.com>
27 305
@@ -52,11 +330,11 @@
52 330
532004-08-21 Bill Wohler <wohler@newt.com> 3312004-08-21 Bill Wohler <wohler@newt.com>
54 332
55 * Released MH-E version 7.81. 333 Released MH-E version 7.81.
56 334
57 * MH-E-NEWS, README: Updated for release 7.81. 335 * MH-E-NEWS, README: Updated for release 7.81.
58 336
59 * mh-e.el (Version, mh-version): Update for release 7.81. 337 * mh-e.el (Version, mh-version): Updated for release 7.81.
60 338
612004-08-21 Bill Wohler <wohler@newt.com> 3392004-08-21 Bill Wohler <wohler@newt.com>
62 340
@@ -89,7 +367,7 @@
89 367
902004-08-15 Bill Wohler <wohler@newt.com> 3682004-08-15 Bill Wohler <wohler@newt.com>
91 369
92 * Released MH-E version 7.4.80. 370 Released MH-E version 7.4.80.
93 371
94 * MH-E-NEWS, README: Updated for release 7.4.80. 372 * MH-E-NEWS, README: Updated for release 7.4.80.
95 373
@@ -319,13 +597,13 @@
319 are more useful than a key sequence in these cases. Use "See also" 597 are more useful than a key sequence in these cases. Use "See also"
320 instead of "See also documentation for". 598 instead of "See also documentation for".
321 599
322 * Merged in 7.4.4 changes, described below. 600 Merged in 7.4.4 changes, described below.
323 601
324 * mh-e.el (Version, mh-version): Set to 7.4.4+cvs. 602 * mh-e.el (Version, mh-version): Set to 7.4.4+cvs.
325 603
3262004-07-10 Bill Wohler <wohler@newt.com> 6042004-07-10 Bill Wohler <wohler@newt.com>
327 605
328 * Released MH-E version 7.4.4. 606 Released MH-E version 7.4.4.
329 607
330 * MH-E-NEWS, README: Updated for release 7.4.4. 608 * MH-E-NEWS, README: Updated for release 7.4.4.
331 609
@@ -394,9 +672,9 @@
394 routines in the best way possible (closes SF #930012). 672 routines in the best way possible (closes SF #930012).
395 (require 'mouse): To shush compiler. 673 (require 'mouse): To shush compiler.
396 674
397 * Use new function mh-require-cl throughout. 675 Use new function mh-require-cl throughout.
398 676
399 * Add arch taglines (courtesy Miles Bader). 677 Add arch taglines (courtesy Miles Bader).
400 678
401 * mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and 679 * mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and
402 mh-xemacs-icons.el with mh-xemacs.el. 680 mh-xemacs-icons.el with mh-xemacs.el.
@@ -536,7 +814,7 @@
536 814
5372003-11-18 Bill Wohler <wohler@newt.com> 8152003-11-18 Bill Wohler <wohler@newt.com>
538 816
539 * Released MH-E version 7.4.3. 817 Released MH-E version 7.4.3.
540 818
541 * MH-E-NEWS, README: Updated for release 7.4.3. 819 * MH-E-NEWS, README: Updated for release 7.4.3.
542 820
@@ -679,8 +957,8 @@
679 957
6802003-11-04 Steve Youngs <sryoungs@bigpond.net.au> 9582003-11-04 Steve Youngs <sryoungs@bigpond.net.au>
681 959
682 * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate mh-loaddefs.el 960 * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate
683 in XEmacs. 961 mh-loaddefs.el in XEmacs.
684 (XEMACS_LOADDEFS_COOKIE): Ditto. 962 (XEMACS_LOADDEFS_COOKIE): Ditto.
685 (XEMACS_LOADDEFS_PKG_NAME): Ditto. 963 (XEMACS_LOADDEFS_PKG_NAME): Ditto.
686 (xemacs): Add target to build mh-loaddefs.el in XEmacs 964 (xemacs): Add target to build mh-loaddefs.el in XEmacs
@@ -1358,7 +1636,7 @@
1358 1636
13592003-08-19 Bill Wohler <wohler@newt.com> 16372003-08-19 Bill Wohler <wohler@newt.com>
1360 1638
1361 * Released MH-E version 7.4.2. 1639 Released MH-E version 7.4.2.
1362 1640
1363 * MH-E-NEWS, README: Updated for release 7.4.2. 1641 * MH-E-NEWS, README: Updated for release 7.4.2.
1364 1642
@@ -2228,7 +2506,7 @@
2228 2506
22292003-06-25 Bill Wohler <wohler@newt.com> 25072003-06-25 Bill Wohler <wohler@newt.com>
2230 2508
2231 * Released MH-E version 7.4.1. 2509 Released MH-E version 7.4.1.
2232 2510
2233 * MH-E-NEWS, README: Updated for release 7.4.1. 2511 * MH-E-NEWS, README: Updated for release 7.4.1.
2234 2512
@@ -2250,7 +2528,7 @@
2250 2528
22512003-06-24 Bill Wohler <wohler@newt.com> 25292003-06-24 Bill Wohler <wohler@newt.com>
2252 2530
2253 * Released MH-E version 7.4. 2531 Released MH-E version 7.4.
2254 2532
2255 * MH-E-NEWS, README: Updated for release 7.4. 2533 * MH-E-NEWS, README: Updated for release 7.4.
2256 2534
@@ -3357,7 +3635,7 @@
3357 3635
33582003-04-24 Bill Wohler <wohler@newt.com> 36362003-04-24 Bill Wohler <wohler@newt.com>
3359 3637
3360 * Released MH-E version 7.3. 3638 Released MH-E version 7.3.
3361 3639
3362 * MH-E-NEWS, README: Updated for release 7.3. 3640 * MH-E-NEWS, README: Updated for release 7.3.
3363 3641
@@ -4915,7 +5193,7 @@
4915 5193
49162003-02-03 Bill Wohler <wohler@newt.com> 51942003-02-03 Bill Wohler <wohler@newt.com>
4917 5195
4918 * Released MH-E version 7.2. 5196 Released MH-E version 7.2.
4919 5197
4920 * MH-E-NEWS, README: Updated for release 7.2. 5198 * MH-E-NEWS, README: Updated for release 7.2.
4921 5199
@@ -5579,7 +5857,7 @@
5579 5857
55802003-01-07 Bill Wohler <wohler@newt.com> 58582003-01-07 Bill Wohler <wohler@newt.com>
5581 5859
5582 * Released MH-E version 7.1. 5860 Released MH-E version 7.1.
5583 5861
5584 * MH-E-NEWS, README: Updated for release 7.1. 5862 * MH-E-NEWS, README: Updated for release 7.1.
5585 5863
@@ -6673,7 +6951,7 @@
6673 6951
66742002-11-29 Bill Wohler <wohler@newt.com> 69522002-11-29 Bill Wohler <wohler@newt.com>
6675 6953
6676 * Released MH-E version 7.0. 6954 Released MH-E version 7.0.
6677 6955
6678 * mh-e.el (Version, mh-version): Updated for release 7.0. 6956 * mh-e.el (Version, mh-version): Updated for release 7.0.
6679 6957
@@ -6698,7 +6976,7 @@
6698 6976
66992002-11-21 Bill Wohler <wohler@newt.com> 69772002-11-21 Bill Wohler <wohler@newt.com>
6700 6978
6701 * Released MH-E version 6.1.91. 6979 Released MH-E version 6.1.91.
6702 6980
6703 * mh-e.el (Version, mh-version): Updated for release 6.1.91. 6981 * mh-e.el (Version, mh-version): Updated for release 6.1.91.
6704 6982
@@ -6722,7 +7000,7 @@
6722 7000
67232002-11-15 Bill Wohler <wohler@newt.com> 70012002-11-15 Bill Wohler <wohler@newt.com>
6724 7002
6725 * Released MH-E version 6.1.90. 7003 Released MH-E version 6.1.90.
6726 7004
6727 * README (Compile): New section. Users must now compile MH-E due 7005 * README (Compile): New section. Users must now compile MH-E due
6728 to the vagaries of the various versions of gnus. 7006 to the vagaries of the various versions of gnus.
@@ -9683,7 +9961,7 @@
9683 9961
96842002-04-08 Bill Wohler <wohler@newt.com> 99622002-04-08 Bill Wohler <wohler@newt.com>
9685 9963
9686 * Released mh-e version 6.1. 9964 Released mh-e version 6.1.
9687 9965
9688 * mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component 9966 * mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component
9689 Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp 9967 Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp
@@ -9787,7 +10065,7 @@
9787 10065
97882001-12-16 Bill Wohler <wohler@newt.com> 100662001-12-16 Bill Wohler <wohler@newt.com>
9789 10067
9790 * Released mh-e version 6.0. 10068 Released mh-e version 6.0.
9791 10069
9792 * MH-E-NEWS: Be a little more specific about incompatible changes. 10070 * MH-E-NEWS: Be a little more specific about incompatible changes.
9793 Added info about outdated manual. 10071 Added info about outdated manual.
@@ -9810,7 +10088,7 @@
9810 10088
98112001-12-14 Bill Wohler <wohler@newt.com> 100892001-12-14 Bill Wohler <wohler@newt.com>
9812 10090
9813 * Released mh-e version 5.0.93. 10091 Released mh-e version 5.0.93.
9814 10092
9815 * Makefile (MH-E-SRC): Added mh-xemacs-compat.el. 10093 * Makefile (MH-E-SRC): Added mh-xemacs-compat.el.
9816 (MH-E-IMG): Added .pbm images for all. Removed mail_ prefix from 10094 (MH-E-IMG): Added .pbm images for all. Removed mail_ prefix from
@@ -9995,7 +10273,7 @@
9995 10273
99962001-12-04 Bill Wohler <wohler@newt.com> 102742001-12-04 Bill Wohler <wohler@newt.com>
9997 10275
9998 * Released mh-e version 5.0.92. 10276 Released mh-e version 5.0.92.
9999 10277
10000 * mh-utils.el (gnus-cite-face-list) 10278 * mh-utils.el (gnus-cite-face-list)
10001 (mh-gnus-article-highlight-citation): Don't autoload. Revert to 10279 (mh-gnus-article-highlight-citation): Don't autoload. Revert to
@@ -10005,7 +10283,7 @@
10005 10283
100062001-12-03 Bill Wohler <wohler@newt.com> 102842001-12-03 Bill Wohler <wohler@newt.com>
10007 10285
10008 * Released mh-e version 5.0.91. 10286 Released mh-e version 5.0.91.
10009 10287
10010 * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now 10288 * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now
10011 that workaround has been implemented. 10289 that workaround has been implemented.
@@ -10911,17 +11189,17 @@
10911 11189
109122001-04-14 chad brown <y@mit.edu> 111902001-04-14 chad brown <y@mit.edu>
10913 11191
10914 * rearrange the font-lock keywords a bit 11192 Rearrange the font-lock keywords a bit.
10915 11193
109162001-04-12 chad brown <y@mit.edu> 111942001-04-12 chad brown <y@mit.edu>
10917 11195
10918 * preliminary (somewhat boring) font-lock support for mh-e. More 11196 Preliminary (somewhat boring) font-lock support for mh-e. More
10919 interesting font-lock support probably wants to have better 11197 interesting font-lock support probably wants to have better
10920 support for multiple format files 11198 support for multiple format files
10921 11199
109222001-02-24 chad brown <y@mit.edu> 112002001-02-24 chad brown <y@mit.edu>
10923 11201
10924 * add default nmh paths to mh-find-prog in mh-utils.el. 11202 Add default nmh paths to mh-find-prog in mh-utils.el.
10925 change to mh-kill-folder in mh-funcs.el to make it more general. 11203 change to mh-kill-folder in mh-funcs.el to make it more general.
10926 11204
109272001-02-19 Bill Wohler <wohler@newt.com> 112052001-02-19 Bill Wohler <wohler@newt.com>
@@ -10934,10 +11212,10 @@
10934 (dist): Leave release in current directory. 11212 (dist): Leave release in current directory.
10935 11213
10936 11214
10937Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 11215 Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
10938 11216
10939Copying and distribution of this file, with or without modification, 11217 Copying and distribution of this file, with or without modification,
10940are permitted in any medium without royalty provided the copyright 11218 are permitted in any medium without royalty provided the copyright
10941notice and this notice are preserved. 11219 notice and this notice are preserved.
10942 11220
10943;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51 11221;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index e4921b047df..455daf687a3 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -1,6 +1,6 @@
1;;; mh-acros.el --- Macros used in MH-E 1;;; mh-acros.el --- Macros used in MH-E
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2004 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -40,6 +40,7 @@
40;;; Code: 40;;; Code:
41 41
42(require 'cl) 42(require 'cl)
43(require 'advice)
43 44
44;; The Emacs coding conventions require that the cl package not be required at 45;; The Emacs coding conventions require that the cl package not be required at
45;; runtime. However, the cl package in versions of Emacs prior to 21.4 left cl 46;; runtime. However, the cl package in versions of Emacs prior to 21.4 left cl
@@ -68,8 +69,9 @@ recognizes that and loads `cl' where appropriate."
68 69
69(defmacro mh-funcall-if-exists (function &rest args) 70(defmacro mh-funcall-if-exists (function &rest args)
70 "Call FUNCTION with ARGS as parameters if it exists." 71 "Call FUNCTION with ARGS as parameters if it exists."
71 (if (fboundp function) 72 (when (fboundp function)
72 `(funcall ',function ,@args))) 73 `(when (fboundp ',function)
74 (funcall ',function ,@args))))
73 75
74(defmacro mh-make-local-hook (hook) 76(defmacro mh-make-local-hook (hook)
75 "Make HOOK local if needed. 77 "Make HOOK local if needed.
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 7f2cd2f5266..0819c0a7925 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -1,6 +1,7 @@
1;;; mh-alias.el --- MH-E mail alias completion and expansion 1;;; mh-alias.el --- MH-E mail alias completion and expansion
2;; 2;;
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 1995, 1996, 1997,
4;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 5
5;; Author: Peter S. Galbraith <psg@debian.org> 6;; Author: Peter S. Galbraith <psg@debian.org>
6;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -162,16 +163,16 @@ Exclude all aliases already in `mh-alias-alist' from `ali'"
162 (while (< (point) (point-max)) 163 (while (< (point) (point-max))
163 (cond 164 (cond
164 ((looking-at "\\([^:]*\\):[^:]*:\\([^:]*\\):[^:]*:\\([^:]*\\):") 165 ((looking-at "\\([^:]*\\):[^:]*:\\([^:]*\\):[^:]*:\\([^:]*\\):")
165 (when (> (string-to-int (match-string 2)) 200) 166 (when (> (string-to-number (match-string 2)) 200)
166 (let* ((username (match-string 1)) 167 (let* ((username (match-string 1))
167 (gecos-name (match-string 3)) 168 (gecos-name (match-string 3))
168 (realname (mh-alias-gecos-name 169 (realname (mh-alias-gecos-name
169 gecos-name username 170 gecos-name username
170 mh-alias-passwd-gecos-comma-separator-flag)) 171 mh-alias-passwd-gecos-comma-separator-flag))
171 (alias-name (if mh-alias-local-users-prefix 172 (alias-name (if mh-alias-local-users-prefix
172 (concat mh-alias-local-users-prefix 173 (concat mh-alias-local-users-prefix
173 (mh-alias-suggest-alias realname t)) 174 (mh-alias-suggest-alias realname t))
174 username)) 175 username))
175 (alias-translation 176 (alias-translation
176 (if (string-equal username realname) 177 (if (string-equal username realname)
177 (concat "<" username ">") 178 (concat "<" username ">")
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 4f7e413d464..82d0f5b7fd7 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -1,6 +1,7 @@
1;;; mh-comp.el --- MH-E functions for composing messages 1;;; mh-comp.el --- MH-E functions for composing messages
2 2
3;; Copyright (C) 1993, 95, 1997, 2000, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995, 1997,
4;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 5
5;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -52,7 +53,6 @@
52(defvar mh-identity-menu) 53(defvar mh-identity-menu)
53 54
54;;; Autoloads 55;;; Autoloads
55(autoload 'Info-goto-node "info")
56(autoload 'mail-mode-fill-paragraph "sendmail") 56(autoload 'mail-mode-fill-paragraph "sendmail")
57(autoload 'mm-handle-displayed-p "mm-decode") 57(autoload 'mm-handle-displayed-p "mm-decode")
58 58
@@ -490,8 +490,10 @@ to reply to:
490 cc/all sender and all recipients. 490 cc/all sender and all recipients.
491If optional prefix argument INCLUDEP provided, then include the message 491If optional prefix argument INCLUDEP provided, then include the message
492in the reply using filter `mhl.reply' in your MH directory. 492in the reply using filter `mhl.reply' in your MH directory.
493If the file named by `mh-repl-formfile' exists, it is used as a skeleton 493If the file named by `mh-repl-formfile' exists, it is used as a skeleton for
494for the reply. 494the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU
495mailutils variants and the file names by `mh-repl-group-formfile' exists, it
496is used instead.
495 497
496See also `mh-send'." 498See also `mh-send'."
497 (interactive (list 499 (interactive (list
@@ -1629,15 +1631,22 @@ This is useful in breaking up paragraphs in replies."
1629(defun mh-complete-word (word choices begin end) 1631(defun mh-complete-word (word choices begin end)
1630 "Complete WORD at from CHOICES. 1632 "Complete WORD at from CHOICES.
1631Any match found replaces the text from BEGIN to END." 1633Any match found replaces the text from BEGIN to END."
1632 (let ((completion (try-completion word choices))) 1634 (let ((completion (try-completion word choices))
1635 (completions-buffer "*Completions*"))
1633 (cond ((eq completion t) 1636 (cond ((eq completion t)
1637 (ignore-errors
1638 (kill-buffer completions-buffer))
1634 (message "Completed: %s" word)) 1639 (message "Completed: %s" word))
1635 ((null completion) 1640 ((null completion)
1641 (ignore-errors
1642 (kill-buffer completions-buffer))
1636 (message "No completion for `%s'" word)) 1643 (message "No completion for `%s'" word))
1637 ((stringp completion) 1644 ((stringp completion)
1638 (if (equal word completion) 1645 (if (equal word completion)
1639 (with-output-to-temp-buffer "*Completions*" 1646 (with-output-to-temp-buffer completions-buffer
1640 (display-completion-list (all-completions word choices))) 1647 (display-completion-list (all-completions word choices)))
1648 (ignore-errors
1649 (kill-buffer completions-buffer))
1641 (delete-region begin end) 1650 (delete-region begin end)
1642 (insert completion)))))) 1651 (insert completion))))))
1643 1652
@@ -1965,8 +1974,6 @@ Otherwise return the empty string."
1965 1974
1966;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el. 1975;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el.
1967 1976
1968;;;###autoload(add-to-list 'auto-mode-alist '("/drafts/[0-9]+\\'" . mh-letter-mode))
1969
1970(provide 'mh-comp) 1977(provide 'mh-comp)
1971 1978
1972;;; Local Variables: 1979;;; Local Variables:
diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el
index c5689afc13e..54141164391 100644
--- a/lisp/mh-e/mh-customize.el
+++ b/lisp/mh-e/mh-customize.el
@@ -1,6 +1,6 @@
1;;; mh-customize.el --- MH-E customization 1;;; mh-customize.el --- MH-E customization
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -69,8 +69,6 @@
69(mh-require-cl) 69(mh-require-cl)
70(require 'mh-loaddefs) 70(require 'mh-loaddefs)
71 71
72(autoload 'Info-goto-node "info")
73
74(eval-and-compile 72(eval-and-compile
75 (defvar mh-xemacs-flag (featurep 'xemacs) 73 (defvar mh-xemacs-flag (featurep 'xemacs)
76 "Non-nil means the current Emacs is XEmacs.")) 74 "Non-nil means the current Emacs is XEmacs."))
@@ -102,121 +100,115 @@ the frame are removed."
102 100
103;;; MH-E Customization Groups 101;;; MH-E Customization Groups
104 102
105(defgroup mh nil 103(defgroup mh-e nil
106 "Emacs interface to the MH mail system. 104 "Emacs interface to the MH mail system.
107MH is the Rand Mail Handler. Other implementations include nmh and GNU 105MH is the Rand Mail Handler. Other implementations include nmh and GNU
108mailutils." 106mailutils."
109 :link '(custom-manual "(mh-e)Top") 107 :link '(custom-manual "(mh-e)Top")
110 :group 'mail) 108 :group 'mail)
111 109
112(defgroup mh-e '((mh custom-group)) ; Sort of an alias for 'mh group
113 "Emacs interface to the MH mail system.
114MH is the Rand Mail Handler. Other implementations include nmh and GNU
115mailutils."
116 :link '(custom-manual "(mh-e)Top"))
117
118(defgroup mh-alias nil 110(defgroup mh-alias nil
119 "Aliases." 111 "Aliases."
120 :link '(custom-manual "(mh-e)Aliases") 112 :link '(custom-manual "(mh-e)Aliases")
121 :prefix "mh-alias-" 113 :prefix "mh-alias-"
122 :group 'mh) 114 :group 'mh-e)
123 115
124(defgroup mh-folder nil 116(defgroup mh-folder nil
125 "Organizing your mail with folders." 117 "Organizing your mail with folders."
126 :prefix "mh-" 118 :prefix "mh-"
127 :link '(custom-manual "(mh-e)Organizing") 119 :link '(custom-manual "(mh-e)Organizing")
128 :group 'mh) 120 :group 'mh-e)
129 121
130(defgroup mh-folder-selection nil 122(defgroup mh-folder-selection nil
131 "Folder selection." 123 "Folder selection."
132 :prefix "mh-" 124 :prefix "mh-"
133 :link '(custom-manual "(mh-e)Folder Selection") 125 :link '(custom-manual "(mh-e)Folder Selection")
134 :group 'mh) 126 :group 'mh-e)
135 127
136(defgroup mh-identity nil 128(defgroup mh-identity nil
137 "Identities." 129 "Identities."
138 :link '(custom-manual "(mh-e)Identities") 130 :link '(custom-manual "(mh-e)Identities")
139 :prefix "mh-identity-" 131 :prefix "mh-identity-"
140 :group 'mh) 132 :group 'mh-e)
141 133
142(defgroup mh-inc nil 134(defgroup mh-inc nil
143 "Incorporating your mail." 135 "Incorporating your mail."
144 :prefix "mh-inc-" 136 :prefix "mh-inc-"
145 :link '(custom-manual "(mh-e)Incorporating Mail") 137 :link '(custom-manual "(mh-e)Incorporating Mail")
146 :group 'mh) 138 :group 'mh-e)
147 139
148(defgroup mh-index nil 140(defgroup mh-index nil
149 "Searching." 141 "Searching."
150 :link '(custom-manual "(mh-e)Searching") 142 :link '(custom-manual "(mh-e)Searching")
151 :prefix "mh-index-" 143 :prefix "mh-index-"
152 :group 'mh) 144 :group 'mh-e)
153 145
154(defgroup mh-junk nil 146(defgroup mh-junk nil
155 "Dealing with junk mail." 147 "Dealing with junk mail."
156 :link '(custom-manual "(mh-e)Junk") 148 :link '(custom-manual "(mh-e)Junk")
157 :prefix "mh-junk-" 149 :prefix "mh-junk-"
158 :group 'mh) 150 :group 'mh-e)
159 151
160(defgroup mh-letter nil 152(defgroup mh-letter nil
161 "Editing a draft." 153 "Editing a draft."
162 :prefix "mh-" 154 :prefix "mh-"
163 :link '(custom-manual "(mh-e)Editing Drafts") 155 :link '(custom-manual "(mh-e)Editing Drafts")
164 :group 'mh) 156 :group 'mh-e)
165 157
166(defgroup mh-ranges nil 158(defgroup mh-ranges nil
167 "Ranges." 159 "Ranges."
168 :prefix "mh-" 160 :prefix "mh-"
169 :link '(custom-manual "(mh-e)Ranges") 161 :link '(custom-manual "(mh-e)Ranges")
170 :group 'mh) 162 :group 'mh-e)
171 163
172(defgroup mh-scan-line-formats nil 164(defgroup mh-scan-line-formats nil
173 "Scan line formats." 165 "Scan line formats."
174 :link '(custom-manual "(mh-e)Scan Line Formats") 166 :link '(custom-manual "(mh-e)Scan Line Formats")
175 :prefix "mh-" 167 :prefix "mh-"
176 :group 'mh) 168 :group 'mh-e)
177 169
178(defgroup mh-sending-mail nil 170(defgroup mh-sending-mail nil
179 "Sending mail." 171 "Sending mail."
180 :prefix "mh-" 172 :prefix "mh-"
181 :link '(custom-manual "(mh-e)Sending Mail") 173 :link '(custom-manual "(mh-e)Sending Mail")
182 :group 'mh) 174 :group 'mh-e)
183 175
184(defgroup mh-sequences nil 176(defgroup mh-sequences nil
185 "Sequences." 177 "Sequences."
186 :prefix "mh-" 178 :prefix "mh-"
187 :link '(custom-manual "(mh-e)Sequences") 179 :link '(custom-manual "(mh-e)Sequences")
188 :group 'mh) 180 :group 'mh-e)
189 181
190(defgroup mh-show nil 182(defgroup mh-show nil
191 "Reading your mail." 183 "Reading your mail."
192 :prefix "mh-" 184 :prefix "mh-"
193 :link '(custom-manual "(mh-e)Reading Mail") 185 :link '(custom-manual "(mh-e)Reading Mail")
194 :group 'mh) 186 :group 'mh-e)
195 187
196(defgroup mh-speed nil 188(defgroup mh-speed nil
197 "The speedbar." 189 "The speedbar."
198 :prefix "mh-speed-" 190 :prefix "mh-speed-"
199 :link '(custom-manual "(mh-e)Speedbar") 191 :link '(custom-manual "(mh-e)Speedbar")
200 :group 'mh) 192 :group 'mh-e)
201 193
202(defgroup mh-toolbar nil 194(defgroup mh-toolbar nil
203 "The toolbar" 195 "The toolbar"
204 :link '(custom-manual "(mh-e)Toolbar") 196 :link '(custom-manual "(mh-e)Toolbar")
205 :prefix "mh-" 197 :prefix "mh-"
206 :group 'mh) 198 :group 'mh-e)
207 199
208(defgroup mh-faces nil 200(defgroup mh-faces nil
209 "Faces used in MH-E." 201 "Faces used in MH-E."
210 :link '(custom-manual "(mh-e)Top") 202 :link '(custom-manual "(mh-e)Top")
211 :prefix "mh-" 203 :prefix "mh-"
212 :group 'faces 204 :group 'faces
213 :group 'mh) 205 :group 'mh-e)
214 206
215(defgroup mh-hooks nil 207(defgroup mh-hooks nil
216 "MH-E hooks." 208 "MH-E hooks."
217 :link '(custom-manual "(mh-e)Top") 209 :link '(custom-manual "(mh-e)Top")
218 :prefix "mh-" 210 :prefix "mh-"
219 :group 'mh) 211 :group 'mh-e)
220 212
221;;; Faces 213;;; Faces
222 214
@@ -280,7 +272,7 @@ accordingly."
280 :set (lambda (symbol value) 272 :set (lambda (symbol value)
281 (set-default symbol value) ;Done in mh-variant-set-variant! 273 (set-default symbol value) ;Done in mh-variant-set-variant!
282 (mh-variant-set value)) 274 (mh-variant-set value))
283 :group 'mh) 275 :group 'mh-e)
284 276
285 277
286 278
@@ -448,14 +440,34 @@ information."
448(defcustom mh-identity-list nil 440(defcustom mh-identity-list nil
449 "*List of identities. 441 "*List of identities.
450 442
451Each element consists of an identity label, and a collection of header fields 443To customize this option, click on the `INS' button and enter a label such as
452and a signature to insert if the identity is selected (see 444`Home' or `Work'. Then click on the `INS' button with the label `Add at least
453`mh-identity-default', `mh-insert-identity' and the `Identity' menu in a 445one item below'. Then choose one of the items in the `Value Menu'.
454MH-Letter buffer). The `Value Menu' contains the common header fields `From' 446
455and `Organization'. Other header fields may be added using the `Other Field' 447You can specify an alternate `From:' header field using the `From Field' menu
456menu item. The `Signature' menu item is used to insert a signature with 448item. You must include a valid email address. A standard format is `First Last
457`mh-insert-signature'. The `GPG Key ID' menu item is used to specify a 449<login@@host.domain>'. If you use an initial with a period, then you must
458different key to sign or encrypt messages." 450quote your name as in `\"First I. Last\" <login@@host.domain>'. People usually
451list the name of the company where they work using the `Organization Field'
452menu item. Set any arbitrary header field and value in the `Other Field' menu
453item. Unless the header field is a standard one, precede the name of your
454field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of
455`Attribution Verb' overrides the setting of
456`mh-extract-from-attribution-verb'. Set your signature with the `Signature'
457menu item. You can specify the contents of `mh-signature-file-name', a file,
458or a function. Specify a different key to sign or encrypt messages with the
459`GPG Key ID' menu item.
460
461You can select the identities you have added via the menu called `Identity' in
462the MH-Letter buffer. You can also use \\[mh-insert-identity]. To clear the
463fields and signature added by the identity, select the `None' identity.
464
465The `Identity' menu contains two other items to save you from having to set
466the identity on every message. The menu item `Set Default for Session' can be
467used to set the default identity to the current identity until you exit Emacs.
468The menu item `Save as Default' sets the option `mh-identity-default' to the
469current identity setting. You can also customize the `mh-identity-default'
470option in the usual fashion."
459 :type '(repeat (list :tag "" 471 :type '(repeat (list :tag ""
460 (string :tag "Label") 472 (string :tag "Label")
461 (repeat :tag "Add at least one item below" 473 (repeat :tag "Add at least one item below"
@@ -489,12 +501,38 @@ different key to sign or encrypt messages."
489 501
490(defcustom mh-auto-fields-list nil 502(defcustom mh-auto-fields-list nil
491 "List of recipients for which header lines are automatically inserted. 503 "List of recipients for which header lines are automatically inserted.
492Each element consists of the recipient, which is a regular expression, and a 504
493collection of header fields and identities to insert if the message is sent to 505This option can be used to set the identity depending on the recipient. To
494this recipient. The `Value Menu' contains the common header fields `Fcc' and 506customize this option, click on the `INS' button and enter a regular
495`Mail-Followup-To'. Other header fields may be added using the `Other Field' 507expression for the recipient's address. Click on the `INS' button with the
496menu item. The `Identity' menu item is used to insert entire identities with 508`Add at least one item below' label. Then choose one of the items in the
497`mh-insert-identity'." 509`Value Menu'.
510
511The `Identity' menu item is used to select an identity from those configured
512in `mh-identity-list'. All of the information for that identity will be added
513if the recipient matches. The `Fcc Field' menu item is used to select a folder
514that is used in the `Fcc:' header. When you send the message, MH will put a
515copy of your message in this folder. The `Mail-Followup-To Field' menu item is
516used to insert an `Mail-Followup-To:' header field with the recipients you
517provide. If the recipient's mail user agent supports this header field (as nmh
518does), then their replies will go to the addresses listed. This is useful if
519their replies go both to the list and to you and you don't have a mechanism to
520suppress duplicates. If you reply to someone not on the list, you must either
521remove the `Mail-Followup-To:' field, or ensure the recipient is also listed
522there so that he receives replies to your reply. Other header fields may be
523added using the `Other Field' menu item.
524
525These fields can only be added after the recipient is known. Once the header
526contains one or more recipients, run the \\[mh-insert-auto-fields] command or
527choose the `Identity -> Insert Auto Fields' menu item to insert these fields
528manually. However, you can just send the message and the fields will be added
529automatically. You are given a chance to see these fields and to confirm them
530before the message is actually sent. You can do away with this confirmation by
531turning off the option `mh-auto-fields-prompt-flag'.
532
533You should avoid using the same header field in `mh-auto-fields-list' and
534`mh-identity-list' definitions that may apply to the same message as the
535result is undefined."
498 :type `(repeat 536 :type `(repeat
499 (list :tag "" 537 (list :tag ""
500 (string :tag "Recipient") 538 (string :tag "Recipient")
@@ -525,7 +563,8 @@ See `mh-auto-fields-list'."
525 :group 'mh-identity) 563 :group 'mh-identity)
526 564
527(defcustom mh-identity-default nil 565(defcustom mh-identity-default nil
528 "Default identity to use when `mh-letter-mode' is called." 566 "Default identity to use when `mh-letter-mode' is called.
567See `mh-identity-list'."
529 :type (append 568 :type (append
530 '(radio) 569 '(radio)
531 (cons '(const :tag "None" nil) 570 (cons '(const :tag "None" nil)
@@ -534,16 +573,32 @@ See `mh-auto-fields-list'."
534 :group 'mh-identity) 573 :group 'mh-identity)
535 574
536(defcustom mh-identity-handlers 575(defcustom mh-identity-handlers
537 '((":default" . mh-identity-handler-bottom) 576 '(("From" . mh-identity-handler-top)
538 ("from" . mh-identity-handler-top) 577 (":default" . mh-identity-handler-bottom)
539 (":attribution-verb" . mh-identity-handler-attribution-verb) 578 (":attribution-verb" . mh-identity-handler-attribution-verb)
540 (":signature" . mh-identity-handler-signature) 579 (":signature" . mh-identity-handler-signature)
541 (":pgg-default-user-id" . mh-identity-handler-gpg-identity)) 580 (":pgg-default-user-id" . mh-identity-handler-gpg-identity))
542 "Handler functions for fields in `mh-identity-list'. 581 "Handler functions for fields in `mh-identity-list'.
543This is an alist of fields (strings) and handlers (functions). Strings are 582
544lowercase. Use \":signature\" for Signature and \":pgg-default-user-id\" for 583This option is used to change the way that fields, signatures, and
545GPG Key ID. The function associated with the string \":default\" is used if no 584attributions in `mh-identity-list' are added. To customize
546other functions are appropriate." 585`mh-identity-handlers', replace the name of an existing handler function
586associated with the field you want to change with the name of a function you
587have written. You can also click on an `INS' button and insert a field of your
588choice and the name of the function you have written to handle it.
589
590The `Field' field can be any field that you've used in your
591`mh-identity-list'. The special fields `:attribution-verb', `:signature', or
592`:pgg-default-user-id' are used for the `mh-identity-list' choices
593`Attribution Verb', `Signature', and `GPG Key ID' respectively.
594
595The handler associated with the `:default' field is used when no other field
596matches.
597
598The handler functions are passed two or three arguments: the FIELD itself (for
599example, `From'), or one of the special fields (for example, `:signature'),
600and the ACTION `'remove' or `'add'. If the action is `'add', an additional
601argument containing the VALUE for the field is given."
547 :type '(repeat (cons (string :tag "Field") function)) 602 :type '(repeat (cons (string :tag "Field") function))
548 :group 'mh-identity) 603 :group 'mh-identity)
549 604
@@ -552,45 +607,45 @@ other functions are appropriate."
552;;; Incorporating Your Mail (:group 'mh-inc) 607;;; Incorporating Your Mail (:group 'mh-inc)
553 608
554(defcustom mh-inc-prog "inc" 609(defcustom mh-inc-prog "inc"
555 "*Program to run to incorporate new mail into a folder. 610 "*Program to incorporate new mail into a folder.
556Normally \"inc\". This program is relative to the `mh-progs' directory unless 611
557it is an absolute pathname." 612This program generates a one-line summary for each of the new messages. Unless
613it is an absolute pathname, the file is assumed to be in the `mh-progs'
614directory. You may also link a file to `inc' that uses a different format.
615You'll then need to modify several scan line format variables appropriately."
558 :type 'string 616 :type 'string
559 :group 'mh-inc) 617 :group 'mh-inc)
560 618
561(defcustom mh-inc-spool-list nil 619(defcustom mh-inc-spool-list nil
562 "*Alist of alternate spool files, corresponding folders and keybindings. 620 "*Alternate spool files.
563This option will be described by example. 621
622You can use the `mh-inc-spool-list' variable to direct MH-E to retrieve mail
623from arbitrary spool files other than your system mailbox, file it in folders
624other than your `+inbox', and assign key bindings to incorporate this mail.
564 625
565Suppose you have subscribed to the mh-e-devel mailing list and you use 626Suppose you are subscribed to the `mh-e-devel' mailing list and you use
566procmail to filter its mail into `~/mail/mh-e' with the following 627`procmail' to filter this mail into `~/mail/mh-e' with the following recipe in
567`.procmailrc' recipe: 628`.procmailrc':
568 629
569 MAILDIR=$HOME/mail 630 MAILDIR=$HOME/mail
570 :0: 631 :0:
571 * ^From mh-e-devel-admin@lists.sourceforge.net 632 * ^From mh-e-devel-admin@stop.mail-abuse.org
572 mh-e 633 mh-e
573 634
574If you wanted to incorporate that spool file into an MH folder called mh-e 635In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m'
575with the \"I m\" or \\[mh-inc-spool-mh-e] commands, you would use the 636\(`mh-inc-spool-mh-e'\) command, customize this option, and click on the `INS'
576following: 637button. Enter a `Spool File' of `~/mail/mh-e', a `Folder' of `mh-e', and a
638`Key Binding' of `m'.
577 639
578 Spool File: ~/mail/mh-e 640You can use `xbuffy' to automate the incorporation of this mail using the
579 Folder: mh-e 641`gnudoit' command in the `gnuserv' package as follows:
580 Key Binding: m
581
582Then, you could also install `xbuffy' and configure an extra mailbox using the
583gnuserv package to run the `mh-inc-spool-mh-e' command in Emacs:
584 642
585 box ~/mail/mh-e 643 box ~/mail/mh-e
586 title mh-e 644 title mh-e
587 origMode 645 origMode
588 polltime 10 646 polltime 10
589 headertime 0 647 headertime 0
590 command gnudoit -q '(mh-inc-spool-mh-e)' 648 command gnudoit -q '(mh-inc-spool-mh-e)'"
591
592To incorporate the spool file, click the xbuffy box with the middle mouse
593button."
594 :type '(repeat (list (file :tag "Spool File") 649 :type '(repeat (list (file :tag "Spool File")
595 (string :tag "Folder") 650 (string :tag "Folder")
596 (character :tag "Key Binding"))) 651 (character :tag "Key Binding")))
@@ -602,10 +657,10 @@ button."
602;;; Searching (:group 'mh-index) 657;;; Searching (:group 'mh-index)
603 658
604(defcustom mh-index-new-messages-folders t 659(defcustom mh-index-new-messages-folders t
605 "Folders searched for the `unseen' sequence. 660 "Folders searched for the \"unseen\" sequence.
606This option can be set to `Inbox' to search the `+inbox' folder or `All' to 661Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to
607search all of the top level folders. Otherwise, list the folders that should 662search all of the top level folders. Otherwise, list the folders that should
608be searched with the `Choose Folders' menu item. 663be searched with the \"Choose Folders\" menu item.
609 664
610See also `mh-recursive-folders-flag'." 665See also `mh-recursive-folders-flag'."
611 :group 'mh-index 666 :group 'mh-index
@@ -633,9 +688,9 @@ found in the documentation of `mh-index-search'."
633 688
634(defcustom mh-index-ticked-messages-folders t 689(defcustom mh-index-ticked-messages-folders t
635 "Folders searched for `mh-tick-seq'. 690 "Folders searched for `mh-tick-seq'.
636This option can be set to `Inbox' to search the `+inbox' folder or `All' to 691Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to
637search all of the top level folders. Otherwise, list the folders that should 692search all of the top level folders. Otherwise, list the folders that should
638be searched with the `Choose Folders' menu item. 693be searched with the \"Choose Folders\" menu item.
639 694
640See also `mh-recursive-folders-flag'." 695See also `mh-recursive-folders-flag'."
641 :group 'mh-index 696 :group 'mh-index
@@ -672,6 +727,15 @@ bound to the new value of `mh-junk-program'. The function sets the variable
672 finally return (car element))))) 727 finally return (car element)))))
673 728
674;; User customizable variables 729;; User customizable variables
730(defcustom mh-junk-background nil
731 "If on, spam programs are run in background.
732By default, the programs are run in the foreground, but this can be slow when
733junking large numbers of messages. If you have enough memory or don't junk
734that many messages at the same time, you might try turning on this option."
735 :type '(choice (const :tag "Off" nil)
736 (const :tag "On" 0))
737 :group 'mh-junk)
738
675(defcustom mh-junk-disposition nil 739(defcustom mh-junk-disposition nil
676 "Disposition of junk mail." 740 "Disposition of junk mail."
677 :type '(choice (const :tag "Delete Spam" nil) 741 :type '(choice (const :tag "Delete Spam" nil)
@@ -680,10 +744,12 @@ bound to the new value of `mh-junk-program'. The function sets the variable
680 744
681(defcustom mh-junk-program nil 745(defcustom mh-junk-program nil
682 "Spam program that MH-E should use. 746 "Spam program that MH-E should use.
683The default setting of this option is `Auto-detect' which means that MH-E will 747
684automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in that 748The default setting of this option is \"Auto-detect\" which means that MH-E
685order. If, for example, you have both SpamAssassin and Bogofilter installed 749will automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in
686and you want to use BogoFilter, then you can set this option to `Bogofilter'." 750that order. If, for example, you have both SpamAssassin and Bogofilter
751installed and you want to use BogoFilter, then you can set this option to
752\"Bogofilter\"."
687 :type '(choice (const :tag "Auto-detect" nil) 753 :type '(choice (const :tag "Auto-detect" nil)
688 (const :tag "SpamAssassin" spamassassin) 754 (const :tag "SpamAssassin" spamassassin)
689 (const :tag "Bogofilter" bogofilter) 755 (const :tag "Bogofilter" bogofilter)
@@ -691,32 +757,10 @@ and you want to use BogoFilter, then you can set this option to `Bogofilter'."
691 :set 'mh-junk-choose 757 :set 'mh-junk-choose
692 :group 'mh-junk) 758 :group 'mh-junk)
693 759
694(defcustom mh-junk-background nil
695 "If on, spam programs are run in background.
696By default, the programs are run in the foreground, but this can be slow when
697junking large numbers of messages. If you have enough memory or don't junk
698that many messages at the same time, you might try turning on this option."
699 :type '(choice (const :tag "Off" nil)
700 (const :tag "On" 0))
701 :group 'mh-junk)
702
703 760
704 761
705;;; Editing a Draft (:group 'mh-letter) 762;;; Editing a Draft (:group 'mh-letter)
706 763
707(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none")
708 "Default method to use in security directives."
709 :type '(choice (const :tag "PGP (MIME)" "pgpmime")
710 (const :tag "PGP" "pgp")
711 (const :tag "S/MIME" "smime")
712 (const :tag "None" "none"))
713 :group 'mh-letter)
714
715(defcustom mh-compose-forward-as-mime-flag t
716 "Non-nil means that messages are forwarded as a MIME part."
717 :type 'boolean
718 :group 'mh-letter)
719
720(defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn) 764(defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn)
721 "Type of MIME message directives in messages. 765 "Type of MIME message directives in messages.
722 766
@@ -761,11 +805,6 @@ by \\<mh-letter-mode-map>\\[mh-insert-letter] or \\[mh-yank-cur-msg]."
761 :type 'string 805 :type 'string
762 :group 'mh-letter) 806 :group 'mh-letter)
763 807
764(defcustom mh-insert-x-mailer-flag t
765 "*Non-nil means append an X-Mailer field to the header."
766 :type 'boolean
767 :group 'mh-letter)
768
769(defcustom mh-letter-complete-function 'ispell-complete-word 808(defcustom mh-letter-complete-function 'ispell-complete-word
770 "*Function to call when completing outside of address or folder fields. 809 "*Function to call when completing outside of address or folder fields.
771By default, this is set to `ispell-complete-word'." 810By default, this is set to `ispell-complete-word'."
@@ -780,16 +819,12 @@ and it's best to avoid quoted lines that span more than 80 columns."
780 :type 'integer 819 :type 'integer
781 :group 'mh-letter) 820 :group 'mh-letter)
782 821
783(defcustom mh-reply-show-message-flag t 822(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none")
784 "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply]. 823 "Default method to use in security directives."
785 824 :type '(choice (const :tag "PGP (MIME)" "pgpmime")
786The setting of this variable determines whether the MH `show-buffer' is 825 (const :tag "PGP" "pgp")
787displayed with the current message when using `mh-reply' without a prefix 826 (const :tag "S/MIME" "smime")
788argument. Set it to nil if you already include the message automatically 827 (const :tag "None" "none"))
789in your draft using
790 repl: -filter repl.filter
791in your ~/.mh_profile file."
792 :type 'boolean
793 :group 'mh-letter) 828 :group 'mh-letter)
794 829
795(defcustom mh-signature-file-name "~/.signature" 830(defcustom mh-signature-file-name "~/.signature"
@@ -881,14 +916,14 @@ If nil, yank only the portion of the message following the point.
881If the show buffer has a region, this variable is ignored unless its value is 916If the show buffer has a region, this variable is ignored unless its value is
882one of `attribution' or `autoattrib' in which case the attribution is added 917one of `attribution' or `autoattrib' in which case the attribution is added
883to the yanked region." 918to the yanked region."
884 :type '(choice (const :tag "Below point" nil) 919 :type '(choice (const :tag "Body and Header" t)
885 (const :tag "Without header" body) 920 (const :tag "Body" body)
921 (const :tag "Below Point" nil)
886 (const :tag "Invoke supercite" supercite) 922 (const :tag "Invoke supercite" supercite)
887 (const :tag "Invoke supercite, automatically" autosupercite) 923 (const :tag "Invoke supercite, Automatically" autosupercite)
888 (const :tag "Without header, with attribution" attribution) 924 (const :tag "Body With Attribution" attribution)
889 (const :tag "Without header, with attribution, automatically" 925 (const :tag "Body With Attribution, Automatically"
890 autoattrib) 926 autoattrib))
891 (const :tag "Entire message with headers" t))
892 :group 'mh-letter) 927 :group 'mh-letter)
893 928
894 929
@@ -947,6 +982,11 @@ for relative to the `mh-progs' directory unless it is an absolute pathname."
947 982
948;;; Sending Mail (:group 'mh-sending-mail) 983;;; Sending Mail (:group 'mh-sending-mail)
949 984
985(defcustom mh-compose-forward-as-mime-flag t
986 "Non-nil means that messages are forwarded as a MIME part."
987 :type 'boolean
988 :group 'mh-sending-mail)
989
950(defcustom mh-compose-letter-function nil 990(defcustom mh-compose-letter-function nil
951 "Invoked when setting up a letter draft. 991 "Invoked when setting up a letter draft.
952It is passed three arguments: TO recipients, SUBJECT, and CC recipients." 992It is passed three arguments: TO recipients, SUBJECT, and CC recipients."
@@ -965,6 +1005,11 @@ message and the original subject line."
965 :type 'string 1005 :type 'string
966 :group 'mh-sending-mail) 1006 :group 'mh-sending-mail)
967 1007
1008(defcustom mh-insert-x-mailer-flag t
1009 "*Non-nil means append an X-Mailer field to the header."
1010 :type 'boolean
1011 :group 'mh-sending-mail)
1012
968(defcustom mh-reply-default-reply-to nil 1013(defcustom mh-reply-default-reply-to nil
969 "*Sets the person or persons to whom a reply will be sent. 1014 "*Sets the person or persons to whom a reply will be sent.
970If nil, prompt for recipient. If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this 1015If nil, prompt for recipient. If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this
@@ -975,6 +1020,18 @@ The values \"cc\" and \"all\" do the same thing."
975 (const "cc") (const "all")) 1020 (const "cc") (const "all"))
976 :group 'mh-sending-mail) 1021 :group 'mh-sending-mail)
977 1022
1023(defcustom mh-reply-show-message-flag t
1024 "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply].
1025
1026The setting of this variable determines whether the MH `show-buffer' is
1027displayed with the current message when using `mh-reply' without a prefix
1028argument. Set it to nil if you already include the message automatically
1029in your draft using
1030 repl: -filter repl.filter
1031in your ~/.mh_profile file."
1032 :type 'boolean
1033 :group 'mh-sending-mail)
1034
978 1035
979 1036
980;;; Sequences (:group 'mh-sequences) 1037;;; Sequences (:group 'mh-sequences)
@@ -1120,6 +1177,7 @@ The gnus method uses a different color for each indentation."
1120 "Delivered-To:" ; Egroups/yahoogroups mailing list manager 1177 "Delivered-To:" ; Egroups/yahoogroups mailing list manager
1121 "Delivery-Date:" ; MH 1178 "Delivery-Date:" ; MH
1122 "Delivery:" 1179 "Delivery:"
1180 "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys
1123 "Encoding:" 1181 "Encoding:"
1124 "Envelope-to:" 1182 "Envelope-to:"
1125 "Errors-To:" 1183 "Errors-To:"
@@ -1188,6 +1246,7 @@ The gnus method uses a different color for each indentation."
1188 "X-Envelope-From:" 1246 "X-Envelope-From:"
1189 "X-Envelope-Sender:" 1247 "X-Envelope-Sender:"
1190 "X-Envelope-To:" 1248 "X-Envelope-To:"
1249 "X-Evolution:" ; Evolution mail client
1191 "X-Face:" 1250 "X-Face:"
1192 "X-Folder:" ; Spam 1251 "X-Folder:" ; Spam
1193 "X-From-Line" 1252 "X-From-Line"
@@ -1264,6 +1323,7 @@ The gnus method uses a different color for each indentation."
1264 "X-Trace:" 1323 "X-Trace:"
1265 "X-UID" 1324 "X-UID"
1266 "X-UIDL:" 1325 "X-UIDL:"
1326 "X-USANET-" ; usa.net
1267 "X-UserInfo1:" 1327 "X-UserInfo1:"
1268 "X-VSMLoop:" ; NTMail 1328 "X-VSMLoop:" ; NTMail
1269 "X-Vms-To:" 1329 "X-Vms-To:"
@@ -1527,13 +1587,13 @@ Optional argument ARG is not used."
1527(defun mh-tool-bar-folder-help () 1587(defun mh-tool-bar-folder-help ()
1528 "Visit \"(mh-e)Top\"." 1588 "Visit \"(mh-e)Top\"."
1529 (interactive) 1589 (interactive)
1530 (Info-goto-node "(mh-e)Top") 1590 (info "(mh-e)Top")
1531 (delete-other-windows)) 1591 (delete-other-windows))
1532 1592
1533(defun mh-tool-bar-letter-help () 1593(defun mh-tool-bar-letter-help ()
1534 "Visit \"(mh-e)Draft Editing\"." 1594 "Visit \"(mh-e)Draft Editing\"."
1535 (interactive) 1595 (interactive)
1536 (Info-goto-node "(mh-e)Draft Editing") 1596 (info "(mh-e)Draft Editing")
1537 (delete-other-windows)) 1597 (delete-other-windows))
1538 1598
1539(defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) 1599(defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag)
@@ -1907,9 +1967,9 @@ This button runs `mh-previous-undeleted-msg'")
1907 ;; Common buttons 1967 ;; Common buttons
1908 (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences") 1968 (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences")
1909 (mh-tool-bar-folder-help (folder) "help" 1969 (mh-tool-bar-folder-help (folder) "help"
1910 "Help! (general help)\nThis button runs `Info-goto-node'") 1970 "Help! (general help)\nThis button runs `info'")
1911 (mh-tool-bar-letter-help (letter) "help" 1971 (mh-tool-bar-letter-help (letter) "help"
1912 "Help! (general help)\nThis button runs `Info-goto-node'") 1972 "Help! (general help)\nThis button runs `info'")
1913 ;; Folder narrowed to sequence buttons 1973 ;; Folder narrowed to sequence buttons
1914 (mh-widen (sequence) "widen" 1974 (mh-widen (sequence) "widen"
1915 "Widen from the sequence\nThis button runs `mh-widen'")) 1975 "Widen from the sequence\nThis button runs `mh-widen'"))
@@ -2085,7 +2145,7 @@ will be removed from the unseen sequence."
2085;;; Faces Used in Scan Listing (:group 'mh-folder-faces) 2145;;; Faces Used in Scan Listing (:group 'mh-folder-faces)
2086 2146
2087(defvar mh-folder-body-face 'mh-folder-body-face 2147(defvar mh-folder-body-face 'mh-folder-body-face
2088 "Face for highlighting body text in MH-Folder buffers.") 2148 "Face used to highlight body text in MH-Folder buffers.")
2089(defface mh-folder-body-face 2149(defface mh-folder-body-face
2090 '((((type tty) (class color)) (:foreground "green")) 2150 '((((type tty) (class color)) (:foreground "green"))
2091 (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) 2151 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
@@ -2093,11 +2153,11 @@ will be removed from the unseen sequence."
2093 (((class color) (background light)) (:foreground "RosyBrown")) 2153 (((class color) (background light)) (:foreground "RosyBrown"))
2094 (((class color) (background dark)) (:foreground "LightSalmon")) 2154 (((class color) (background dark)) (:foreground "LightSalmon"))
2095 (t (:italic t))) 2155 (t (:italic t)))
2096 "Face for highlighting body text in MH-Folder buffers." 2156 "Face used to highlight body text in MH-Folder buffers."
2097 :group 'mh-folder-faces) 2157 :group 'mh-folder-faces)
2098 2158
2099(defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face 2159(defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face
2100 "Face for the current message line in MH-Folder buffers.") 2160 "Face used for the current message line in MH-Folder buffers.")
2101(defface mh-folder-cur-msg-face 2161(defface mh-folder-cur-msg-face
2102 '((((type tty pc) (class color)) 2162 '((((type tty pc) (class color))
2103 (:background "LightGreen")) 2163 (:background "LightGreen"))
@@ -2108,11 +2168,11 @@ will be removed from the unseen sequence."
2108 (((class color) (background dark)) 2168 (((class color) (background dark))
2109 (:background "DarkOliveGreen4")) 2169 (:background "DarkOliveGreen4"))
2110 (t (:underline t))) 2170 (t (:underline t)))
2111 "Face for the current message line in MH-Folder buffers." 2171 "Face used for the current message line in MH-Folder buffers."
2112 :group 'mh-folder-faces) 2172 :group 'mh-folder-faces)
2113 2173
2114(defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face 2174(defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face
2115 "Face for highlighting the current message in MH-Folder buffers.") 2175 "Face used to highlight the current message in MH-Folder buffers.")
2116(defface mh-folder-cur-msg-number-face 2176(defface mh-folder-cur-msg-number-face
2117 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) 2177 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
2118 (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) 2178 (((class grayscale) (background light)) (:foreground "LightGray" :bold t))
@@ -2120,11 +2180,11 @@ will be removed from the unseen sequence."
2120 (((class color) (background light)) (:foreground "Purple")) 2180 (((class color) (background light)) (:foreground "Purple"))
2121 (((class color) (background dark)) (:foreground "Cyan")) 2181 (((class color) (background dark)) (:foreground "Cyan"))
2122 (t (:bold t))) 2182 (t (:bold t)))
2123 "Face for highlighting the current message in MH-Folder buffers." 2183 "Face used to highlight the current message in MH-Folder buffers."
2124 :group 'mh-folder-faces) 2184 :group 'mh-folder-faces)
2125 2185
2126(defvar mh-folder-date-face 'mh-folder-date-face 2186(defvar mh-folder-date-face 'mh-folder-date-face
2127 "Face for highlighting the date in MH-Folder buffers.") 2187 "Face used to highlight the date in MH-Folder buffers.")
2128(defface mh-folder-date-face 2188(defface mh-folder-date-face
2129 '((((class color) (background light)) 2189 '((((class color) (background light))
2130 (:foreground "snow4")) 2190 (:foreground "snow4"))
@@ -2132,11 +2192,11 @@ will be removed from the unseen sequence."
2132 (:foreground "snow3")) 2192 (:foreground "snow3"))
2133 (t 2193 (t
2134 (:bold t))) 2194 (:bold t)))
2135 "Face for highlighting the date in MH-Folder buffers." 2195 "Face used to highlight the date in MH-Folder buffers."
2136 :group 'mh-folder-faces) 2196 :group 'mh-folder-faces)
2137 2197
2138(defvar mh-folder-followup-face 'mh-folder-followup-face 2198(defvar mh-folder-followup-face 'mh-folder-followup-face
2139 "Face for highlighting Re: (followup) subject text in MH-Folder buffers.") 2199 "Face used to highlight Re: subject text in MH-Folder buffers.")
2140(defface mh-folder-followup-face 2200(defface mh-folder-followup-face
2141 '((((class color) (background light)) 2201 '((((class color) (background light))
2142 (:foreground "blue3")) 2202 (:foreground "blue3"))
@@ -2144,11 +2204,11 @@ will be removed from the unseen sequence."
2144 (:foreground "LightGoldenRod")) 2204 (:foreground "LightGoldenRod"))
2145 (t 2205 (t
2146 (:bold t))) 2206 (:bold t)))
2147 "Face for highlighting Re: (followup) subject text in MH-Folder buffers." 2207 "Face used to highlight Re: subject text in MH-Folder buffers."
2148 :group 'mh-folder-faces) 2208 :group 'mh-folder-faces)
2149 2209
2150(defvar mh-folder-msg-number-face 'mh-folder-msg-number-face 2210(defvar mh-folder-msg-number-face 'mh-folder-msg-number-face
2151 "Face for highlighting the message number in MH-Folder buffers.") 2211 "Face used to highlight the message number in MH-Folder buffers.")
2152(defface mh-folder-msg-number-face 2212(defface mh-folder-msg-number-face
2153 '((((class color) (background light)) 2213 '((((class color) (background light))
2154 (:foreground "snow4")) 2214 (:foreground "snow4"))
@@ -2156,15 +2216,15 @@ will be removed from the unseen sequence."
2156 (:foreground "snow3")) 2216 (:foreground "snow3"))
2157 (t 2217 (t
2158 (:bold t))) 2218 (:bold t)))
2159 "Face for highlighting the message number in MH-Folder buffers." 2219 "Face used to highlight the message number in MH-Folder buffers."
2160 :group 'mh-folder-faces) 2220 :group 'mh-folder-faces)
2161 2221
2162(defvar mh-folder-deleted-face 'mh-folder-deleted-face 2222(defvar mh-folder-deleted-face 'mh-folder-deleted-face
2163 "Face for highlighting deleted messages in MH-Folder buffers.") 2223 "Face used to highlight deleted messages in MH-Folder buffers.")
2164(copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face) 2224(copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face)
2165 2225
2166(defvar mh-folder-refiled-face 'mh-folder-refiled-face 2226(defvar mh-folder-refiled-face 'mh-folder-refiled-face
2167 "Face for highlighting refiled messages in MH-Folder buffers.") 2227 "Face used to highlight refiled messages in MH-Folder buffers.")
2168(defface mh-folder-refiled-face 2228(defface mh-folder-refiled-face
2169 '((((type tty) (class color)) (:foreground "yellow" :weight light)) 2229 '((((type tty) (class color)) (:foreground "yellow" :weight light))
2170 (((class grayscale) (background light)) 2230 (((class grayscale) (background light))
@@ -2174,11 +2234,11 @@ will be removed from the unseen sequence."
2174 (((class color) (background light)) (:foreground "DarkGoldenrod")) 2234 (((class color) (background light)) (:foreground "DarkGoldenrod"))
2175 (((class color) (background dark)) (:foreground "LightGoldenrod")) 2235 (((class color) (background dark)) (:foreground "LightGoldenrod"))
2176 (t (:bold t :italic t))) 2236 (t (:bold t :italic t)))
2177 "Face for highlighting refiled messages in MH-Folder buffers." 2237 "Face used to highlight refiled messages in MH-Folder buffers."
2178 :group 'mh-folder-faces) 2238 :group 'mh-folder-faces)
2179 2239
2180(defvar mh-folder-subject-face 'mh-folder-subject-face 2240(defvar mh-folder-subject-face 'mh-folder-subject-face
2181 "Face for highlighting subject text in MH-Folder buffers.") 2241 "Face used to highlight subject text in MH-Folder buffers.")
2182(if (boundp 'facemenu-unlisted-faces) 2242(if (boundp 'facemenu-unlisted-faces)
2183 (add-to-list 'facemenu-unlisted-faces "^mh-folder")) 2243 (add-to-list 'facemenu-unlisted-faces "^mh-folder"))
2184(defface mh-folder-subject-face 2244(defface mh-folder-subject-face
@@ -2188,7 +2248,7 @@ will be removed from the unseen sequence."
2188 (:foreground "yellow")) 2248 (:foreground "yellow"))
2189 (t 2249 (t
2190 (:bold t))) 2250 (:bold t)))
2191 "Face for highlighting subject text in MH-Folder buffers." 2251 "Face used to highlight subject text in MH-Folder buffers."
2192 :group 'mh-folder-faces) 2252 :group 'mh-folder-faces)
2193 2253
2194(defface mh-folder-tick-face 2254(defface mh-folder-tick-face
@@ -2199,15 +2259,15 @@ will be removed from the unseen sequence."
2199 :group 'mh-folder-faces) 2259 :group 'mh-folder-faces)
2200 2260
2201(defvar mh-folder-address-face 'mh-folder-address-face 2261(defvar mh-folder-address-face 'mh-folder-address-face
2202 "Face for highlighting the address in MH-Folder buffers.") 2262 "Face used to highlight the address in MH-Folder buffers.")
2203(copy-face 'mh-folder-subject-face 'mh-folder-address-face) 2263(copy-face 'mh-folder-subject-face 'mh-folder-address-face)
2204 2264
2205(defvar mh-folder-scan-format-face 'mh-folder-scan-format-face 2265(defvar mh-folder-scan-format-face 'mh-folder-scan-format-face
2206 "Face for highlighting `mh-scan-format-regexp' matches in MH-Folder buffers.") 2266 "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.")
2207(copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face) 2267(copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face)
2208 2268
2209(defvar mh-folder-to-face 'mh-folder-to-face 2269(defvar mh-folder-to-face 'mh-folder-to-face
2210 "Face for highlighting the To: string in MH-Folder buffers.") 2270 "Face used to highlight the To: string in MH-Folder buffers.")
2211(defface mh-folder-to-face 2271(defface mh-folder-to-face
2212 '((((type tty) (class color)) (:foreground "green")) 2272 '((((type tty) (class color)) (:foreground "green"))
2213 (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) 2273 (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
@@ -2215,7 +2275,7 @@ will be removed from the unseen sequence."
2215 (((class color) (background light)) (:foreground "RosyBrown")) 2275 (((class color) (background light)) (:foreground "RosyBrown"))
2216 (((class color) (background dark)) (:foreground "LightSalmon")) 2276 (((class color) (background dark)) (:foreground "LightSalmon"))
2217 (t (:italic t))) 2277 (t (:italic t)))
2218 "Face for highlighting the To: string in MH-Folder buffers." 2278 "Face used to highlight the To: string in MH-Folder buffers."
2219 :group 'mh-folder-faces) 2279 :group 'mh-folder-faces)
2220 2280
2221 2281
@@ -2223,7 +2283,7 @@ will be removed from the unseen sequence."
2223;;; Faces Used in Searching (:group 'mh-index-faces) 2283;;; Faces Used in Searching (:group 'mh-index-faces)
2224 2284
2225(defvar mh-index-folder-face 'mh-index-folder-face 2285(defvar mh-index-folder-face 'mh-index-folder-face
2226 "Face for highlighting folders in MH-Index buffers.") 2286 "Face used to highlight folders in MH-Index buffers.")
2227(defface mh-index-folder-face 2287(defface mh-index-folder-face
2228 '((((class color) (background light)) 2288 '((((class color) (background light))
2229 (:foreground "dark green" :bold t)) 2289 (:foreground "dark green" :bold t))
@@ -2231,7 +2291,7 @@ will be removed from the unseen sequence."
2231 (:foreground "indian red" :bold t)) 2291 (:foreground "indian red" :bold t))
2232 (t 2292 (t
2233 (:bold t))) 2293 (:bold t)))
2234 "Face for highlighting folders in MH-Index buffers." 2294 "Face used to highlight folders in MH-Index buffers."
2235 :group 'mh-index-faces) 2295 :group 'mh-index-faces)
2236 2296
2237 2297
@@ -2244,7 +2304,7 @@ will be removed from the unseen sequence."
2244 (((class color) (background dark)) 2304 (((class color) (background dark))
2245 (:background "gray10")) 2305 (:background "gray10"))
2246 (t (:bold t))) 2306 (t (:bold t)))
2247 "Face for displaying header fields in draft buffers." 2307 "Face used to display header fields in draft buffers."
2248 :group 'mh-letter-faces) 2308 :group 'mh-letter-faces)
2249 2309
2250 2310
@@ -2252,7 +2312,7 @@ will be removed from the unseen sequence."
2252;;; Faces Used in Message Display (:group 'mh-show-faces) 2312;;; Faces Used in Message Display (:group 'mh-show-faces)
2253 2313
2254(defvar mh-show-cc-face 'mh-show-cc-face 2314(defvar mh-show-cc-face 'mh-show-cc-face
2255 "Face for highlighting cc header fields.") 2315 "Face used to highlight cc: header fields.")
2256(defface mh-show-cc-face 2316(defface mh-show-cc-face
2257 '((((type tty) (class color)) (:foreground "yellow" :weight light)) 2317 '((((type tty) (class color)) (:foreground "yellow" :weight light))
2258 (((class grayscale) (background light)) 2318 (((class grayscale) (background light))
@@ -2262,11 +2322,11 @@ will be removed from the unseen sequence."
2262 (((class color) (background light)) (:foreground "DarkGoldenrod")) 2322 (((class color) (background light)) (:foreground "DarkGoldenrod"))
2263 (((class color) (background dark)) (:foreground "LightGoldenrod")) 2323 (((class color) (background dark)) (:foreground "LightGoldenrod"))
2264 (t (:bold t :italic t))) 2324 (t (:bold t :italic t)))
2265 "Face for highlighting cc header fields." 2325 "Face used to highlight cc: header fields."
2266 :group 'mh-show-faces) 2326 :group 'mh-show-faces)
2267 2327
2268(defvar mh-show-date-face 'mh-show-date-face 2328(defvar mh-show-date-face 'mh-show-date-face
2269 "Face for highlighting the Date header field.") 2329 "Face used to highlight the Date: header field.")
2270(defface mh-show-date-face 2330(defface mh-show-date-face
2271 '((((type tty) (class color)) (:foreground "green")) 2331 '((((type tty) (class color)) (:foreground "green"))
2272 (((class grayscale) (background light)) (:foreground "Gray90" :bold t)) 2332 (((class grayscale) (background light)) (:foreground "Gray90" :bold t))
@@ -2274,7 +2334,7 @@ will be removed from the unseen sequence."
2274 (((class color) (background light)) (:foreground "ForestGreen")) 2334 (((class color) (background light)) (:foreground "ForestGreen"))
2275 (((class color) (background dark)) (:foreground "PaleGreen")) 2335 (((class color) (background dark)) (:foreground "PaleGreen"))
2276 (t (:bold t :underline t))) 2336 (t (:bold t :underline t)))
2277 "Face for highlighting the Date header field." 2337 "Face used to highlight the Date: header field."
2278 :group 'mh-show-faces) 2338 :group 'mh-show-faces)
2279 2339
2280(defvar mh-show-header-face 'mh-show-header-face 2340(defvar mh-show-header-face 'mh-show-header-face
@@ -2289,13 +2349,36 @@ will be removed from the unseen sequence."
2289 "Face used to deemphasize unspecified header fields." 2349 "Face used to deemphasize unspecified header fields."
2290 :group 'mh-show-faces) 2350 :group 'mh-show-faces)
2291 2351
2352(defvar mh-show-pgg-good-face 'mh-show-pgg-good-face
2353 "Face used to highlight a good PGG signature.")
2354(defface mh-show-pgg-good-face
2355 '((t (:bold t :foreground "LimeGreen")))
2356 "Face used to highlight a good PGG signature."
2357 :group 'mh-show-faces)
2358
2359(defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown-face
2360 "Face used to highlight a PGG signature whose status is unknown.
2361This face is also used for a signature when the signer is untrusted.")
2362(defface mh-show-pgg-unknown-face
2363 '((t (:bold t :foreground "DarkGoldenrod2")))
2364 "Face used to highlight a PGG signature whose status is unknown.
2365This face is also used for a signature when the signer is untrusted."
2366 :group 'mh-show-faces)
2367
2368(defvar mh-show-pgg-bad-face 'mh-show-pgg-bad-face
2369 "Face used to highlight a bad PGG signature.")
2370(defface mh-show-pgg-bad-face
2371 '((t (:bold t :foreground "DeepPink1")))
2372 "Face used to highlight a bad PGG signature."
2373 :group 'mh-show-faces)
2374
2292(defface mh-show-signature-face 2375(defface mh-show-signature-face
2293 '((t (:italic t))) 2376 '((t (:italic t)))
2294 "Face for highlighting message signature." 2377 "Face used to highlight the message signature."
2295 :group 'mh-show-faces) 2378 :group 'mh-show-faces)
2296 2379
2297(defvar mh-show-to-face 'mh-show-to-face 2380(defvar mh-show-to-face 'mh-show-to-face
2298 "Face for highlighting the To: header field.") 2381 "Face used to highlight the To: header field.")
2299(if (boundp 'facemenu-unlisted-faces) 2382(if (boundp 'facemenu-unlisted-faces)
2300 (add-to-list 'facemenu-unlisted-faces "^mh-show")) 2383 (add-to-list 'facemenu-unlisted-faces "^mh-show"))
2301(defface mh-show-to-face 2384(defface mh-show-to-face
@@ -2306,11 +2389,11 @@ will be removed from the unseen sequence."
2306 (((class color) (background light)) (:foreground "SaddleBrown")) 2389 (((class color) (background light)) (:foreground "SaddleBrown"))
2307 (((class color) (background dark)) (:foreground "burlywood")) 2390 (((class color) (background dark)) (:foreground "burlywood"))
2308 (t (:underline t))) 2391 (t (:underline t)))
2309 "Face for highlighting the To: header field." 2392 "Face used to highlight the To: header field."
2310 :group 'mh-show-faces) 2393 :group 'mh-show-faces)
2311 2394
2312(defvar mh-show-from-face 'mh-show-from-face 2395(defvar mh-show-from-face 'mh-show-from-face
2313 "Face for highlighting the From: header field.") 2396 "Face used to highlight the From: header field.")
2314(defface mh-show-from-face 2397(defface mh-show-from-face
2315 '((((class color) (background light)) 2398 '((((class color) (background light))
2316 (:foreground "red3")) 2399 (:foreground "red3"))
@@ -2318,17 +2401,17 @@ will be removed from the unseen sequence."
2318 (:foreground "cyan")) 2401 (:foreground "cyan"))
2319 (t 2402 (t
2320 (:bold t))) 2403 (:bold t)))
2321 "Face for highlighting the From: header field." 2404 "Face used to highlight the From: header field."
2322 :group 'mh-show-faces) 2405 :group 'mh-show-faces)
2323 2406
2324(defface mh-show-xface-face 2407(defface mh-show-xface-face
2325 '((t (:foreground "black" :background "white"))) 2408 '((t (:foreground "black" :background "white")))
2326 "Face for displaying the X-Face image. 2409 "Face used to display the X-Face image.
2327The background and foreground is used in the image." 2410The background and foreground is used in the image."
2328 :group 'mh-show-faces) 2411 :group 'mh-show-faces)
2329 2412
2330(defvar mh-show-subject-face 'mh-show-subject-face 2413(defvar mh-show-subject-face 'mh-show-subject-face
2331 "Face for highlighting the Subject header field.") 2414 "Face used to highlight the Subject: header field.")
2332(copy-face 'mh-folder-subject-face 'mh-show-subject-face) 2415(copy-face 'mh-folder-subject-face 'mh-show-subject-face)
2333 2416
2334 2417
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index b5eea79ae1e..0cfb053c887 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -1,11 +1,12 @@
1;;; mh-e.el --- GNU Emacs interface to the MH mail system 1;;; mh-e.el --- GNU Emacs interface to the MH mail system
2 2
3;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999, 3;; Copyright (C) 1985, 1986, 1987, 1988,
4;; 2000, 2005 Free Software Foundation, Inc. 4;; 1990, 1992, 1993, 1994, 1995, 1997, 1999,
5;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 6
6;; Author: Bill Wohler <wohler@newt.com> 7;; Author: Bill Wohler <wohler@newt.com>
7;; Maintainer: Bill Wohler <wohler@newt.com> 8;; Maintainer: Bill Wohler <wohler@newt.com>
8;; Version: 7.82 9;; Version: 7.84
9;; Keywords: mail 10;; Keywords: mail
10 11
11;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -97,10 +98,7 @@
97(defvar font-lock-auto-fontify) 98(defvar font-lock-auto-fontify)
98(defvar font-lock-defaults) 99(defvar font-lock-defaults)
99 100
100(defconst mh-version "7.82" "Version number of MH-E.") 101(defconst mh-version "7.84" "Version number of MH-E.")
101
102;;; Autoloads
103(autoload 'Info-goto-node "info")
104 102
105(defvar mh-partial-folder-mode-line-annotation "select" 103(defvar mh-partial-folder-mode-line-annotation "select"
106 "Annotation when displaying part of a folder. 104 "Annotation when displaying part of a folder.
@@ -578,7 +576,8 @@ Do not call this function from outside MH-E; use \\[mh-rmail] instead."
578 (setq folder mh-inbox)) 576 (setq folder mh-inbox))
579 (let ((threading-needed-flag nil)) 577 (let ((threading-needed-flag nil))
580 (let ((config (current-window-configuration))) 578 (let ((config (current-window-configuration)))
581 (delete-other-windows) 579 (when (and mh-show-buffer (get-buffer mh-show-buffer))
580 (delete-windows-on mh-show-buffer))
582 (cond ((not (get-buffer folder)) 581 (cond ((not (get-buffer folder))
583 (mh-make-folder folder) 582 (mh-make-folder folder)
584 (setq threading-needed-flag mh-show-threads-flag) 583 (setq threading-needed-flag mh-show-threads-flag)
@@ -717,22 +716,24 @@ updated."
717 (mh-refile-a-msg nil folder)) 716 (mh-refile-a-msg nil folder))
718 (when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg))) 717 (when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg)))
719 718
720(defun mh-refile-or-write-again (message) 719(defun mh-refile-or-write-again (range &optional interactive-flag)
721 "Re-execute the last refile or write command on the given MESSAGE. 720 "Re-execute the last refile or write command on the given RANGE.
722Default is the displayed message. Use the same folder or file as the previous 721Default is the displayed message. Use the same folder or file as the previous
723refile or write command." 722refile or write command.
724 (interactive (list (mh-get-msg-num t))) 723If INTERACTIVE-FLAG is non-nil then the function was called interactively."
724 (interactive (list (mh-interactive-range "Redo") t))
725 (if (null mh-last-destination) 725 (if (null mh-last-destination)
726 (error "No previous refile or write")) 726 (error "No previous refile or write"))
727 (let (output) 727 (let (output)
728 (setq output 728 (setq output
729 (cond ((eq (car mh-last-destination) 'refile) 729 (cond ((eq (car mh-last-destination) 'refile)
730 (mh-refile-a-msg message (cdr mh-last-destination)) 730 (mh-refile-msg range (cdr mh-last-destination))
731 (format "Destination folder: %s" (cdr mh-last-destination))) 731 (format "Destination folder: %s" (cdr mh-last-destination)))
732 (t 732 (t
733 (apply 'mh-write-msg-to-file message (cdr mh-last-destination)) 733 (mh-iterate-on-range msg range
734 (apply 'mh-write-msg-to-file msg (cdr mh-last-destination)))
735 (mh-next-msg interactive-flag)
734 (format "Destination: %s" (cdr mh-last-destination))))) 736 (format "Destination: %s" (cdr mh-last-destination)))))
735 (mh-next-msg (interactive-p))
736 (message output))) 737 (message output)))
737 738
738(defun mh-quit () 739(defun mh-quit ()
@@ -1801,7 +1802,7 @@ Return in the current buffer."
1801 (message "inc %s..." folder)) 1802 (message "inc %s..." folder))
1802 (setq mh-next-direction 'forward) 1803 (setq mh-next-direction 'forward)
1803 (goto-char (point-max)) 1804 (goto-char (point-max))
1804 (mh-remove-all-notation) 1805 (mh-remove-cur-notation)
1805 (let ((start-of-inc (point))) 1806 (let ((start-of-inc (point)))
1806 (if maildrop-name 1807 (if maildrop-name
1807 ;; I think MH 5 used "-ms-file" instead of "-file", 1808 ;; I think MH 5 used "-ms-file" instead of "-file",
@@ -1827,7 +1828,7 @@ Return in the current buffer."
1827 start-of-inc (point-max)))) 1828 start-of-inc (point-max))))
1828 (delete-region start-of-inc (point-max)) 1829 (delete-region start-of-inc (point-max))
1829 (unwind-protect (mh-widen t) 1830 (unwind-protect (mh-widen t)
1830 (mh-remove-all-notation) 1831 (mh-remove-cur-notation)
1831 (goto-char (point-max)) 1832 (goto-char (point-max))
1832 (setq start-of-inc (point)) 1833 (setq start-of-inc (point))
1833 (insert saved-text) 1834 (insert saved-text)
@@ -1846,7 +1847,15 @@ Return in the current buffer."
1846 (t 1847 (t
1847 (setq new-mail-flag t))) 1848 (setq new-mail-flag t)))
1848 (keep-lines mh-scan-valid-regexp) ; Flush random scan lines 1849 (keep-lines mh-scan-valid-regexp) ; Flush random scan lines
1849 (setq mh-seq-list (mh-read-folder-sequences folder t)) 1850 (let* ((sequences (mh-read-folder-sequences folder t))
1851 (new-cur (assoc 'cur sequences))
1852 (new-unseen (assoc mh-unseen-seq sequences)))
1853 (unless (assoc 'cur mh-seq-list)
1854 (push (list 'cur) mh-seq-list))
1855 (unless (assoc mh-unseen-seq mh-seq-list)
1856 (push (list mh-unseen-seq) mh-seq-list))
1857 (setcdr (assoc 'cur mh-seq-list) (cdr new-cur))
1858 (setcdr (assoc mh-unseen-seq mh-seq-list) (cdr new-unseen)))
1850 (when (equal (point-max) start-of-inc) 1859 (when (equal (point-max) start-of-inc)
1851 (mh-notate-cur)) 1860 (mh-notate-cur))
1852 (if new-mail-flag 1861 (if new-mail-flag
@@ -1858,8 +1867,7 @@ Return in the current buffer."
1858 (mh-thread-inc folder start-of-inc)) 1867 (mh-thread-inc folder start-of-inc))
1859 (mh-goto-cur-msg)) 1868 (mh-goto-cur-msg))
1860 (goto-char point-before-inc)) 1869 (goto-char point-before-inc))
1861 (mh-notate-user-sequences) 1870 (mh-notate-user-sequences (cons start-of-inc (point-max)))))))
1862 (mh-notate-deleted-and-refiled)))))
1863 1871
1864(defun mh-make-folder-mode-line (&optional ignored) 1872(defun mh-make-folder-mode-line (&optional ignored)
1865 "Set the fields of the mode line for a folder buffer. 1873 "Set the fields of the mode line for a folder buffer.
@@ -2033,18 +2041,18 @@ with no arguments, before the commands are processed."
2033 (mh-coalesce-msg-list msgs)) 2041 (mh-coalesce-msg-list msgs))
2034 (mh-delete-scan-msgs msgs) 2042 (mh-delete-scan-msgs msgs)
2035 ;; Preserve sequences in destination folder... 2043 ;; Preserve sequences in destination folder...
2036 (when (and mh-refile-preserves-sequences-flag 2044 (when mh-refile-preserves-sequences-flag
2037 (numberp last))
2038 (clrhash dest-map) 2045 (clrhash dest-map)
2039 (loop for i from (1+ last) 2046 (loop for i from (1+ (or last 0))
2040 for msg in (sort (copy-sequence msgs) #'<) 2047 for msg in (sort (copy-sequence msgs) #'<)
2041 do (loop for seq-name in (gethash msg seq-map) 2048 do (loop for seq-name in (gethash msg seq-map)
2042 do (push i (gethash seq-name dest-map)))) 2049 do (push i (gethash seq-name dest-map))))
2043 (maphash 2050 (maphash
2044 #'(lambda (seq msgs) 2051 #'(lambda (seq msgs)
2045 ;; Run it in the background, since we don't care 2052 ;; Can't be run in the background, since the
2046 ;; about the results. 2053 ;; current folder is changed by mark this could
2047 (apply #'mh-exec-cmd-daemon "mark" #'ignore 2054 ;; lead to a race condition with the next refile.
2055 (apply #'mh-exec-cmd "mark"
2048 "-sequence" (symbol-name seq) dest-folder 2056 "-sequence" (symbol-name seq) dest-folder
2049 "-add" (mapcar #'(lambda (x) (format "%s" x)) 2057 "-add" (mapcar #'(lambda (x) (format "%s" x))
2050 (mh-coalesce-msg-list msgs)))) 2058 (mh-coalesce-msg-list msgs))))
@@ -2201,13 +2209,14 @@ Expands ranges into set of individual numbers."
2201 (end-of-line (save-excursion (end-of-line) (point))) 2209 (end-of-line (save-excursion (end-of-line) (point)))
2202 num) 2210 num)
2203 (while (re-search-forward "[0-9]+" end-of-line t) 2211 (while (re-search-forward "[0-9]+" end-of-line t)
2204 (setq num (string-to-int (buffer-substring (match-beginning 0) 2212 (setq num (string-to-number (buffer-substring (match-beginning 0)
2205 (match-end 0)))) 2213 (match-end 0))))
2206 (cond ((looking-at "-") ; Message range 2214 (cond ((looking-at "-") ; Message range
2207 (forward-char 1) 2215 (forward-char 1)
2208 (re-search-forward "[0-9]+" end-of-line t) 2216 (re-search-forward "[0-9]+" end-of-line t)
2209 (let ((num2 (string-to-int (buffer-substring (match-beginning 0) 2217 (let ((num2 (string-to-number
2210 (match-end 0))))) 2218 (buffer-substring (match-beginning 0)
2219 (match-end 0)))))
2211 (if (< num2 num) 2220 (if (< num2 num)
2212 (error "Bad message range: %d-%d" num num2)) 2221 (error "Bad message range: %d-%d" num num2))
2213 (while (<= num num2) 2222 (while (<= num num2)
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index a632efc7856..126fd84ce9b 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -1,6 +1,7 @@
1;;; mh-funcs.el --- MH-E functions not everyone will use right away 1;;; mh-funcs.el --- MH-E functions not everyone will use right away
2 2
3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995,
4;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 5
5;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -127,7 +128,7 @@ Display the results only if something went wrong."
127 (set-buffer (get-buffer-create mh-temp-buffer)) 128 (set-buffer (get-buffer-create mh-temp-buffer))
128 (insert-before-markers output) 129 (insert-before-markers output)
129 (when (save-excursion 130 (when (save-excursion
130 (beginning-of-buffer) 131 (goto-char (point-min))
131 (re-search-forward "^rmf: " (point-max) t)) 132 (re-search-forward "^rmf: " (point-max) t))
132 (display-buffer mh-temp-buffer))) 133 (display-buffer mh-temp-buffer)))
133 134
@@ -148,7 +149,7 @@ Display the results only if something went wrong."
148 "-recurse" 149 "-recurse"
149 "-norecurse")) 150 "-norecurse"))
150 (goto-char (point-min)) 151 (goto-char (point-min))
151 (view-mode 1) 152 (view-mode-enter)
152 (setq view-exit-action 'kill-buffer) 153 (setq view-exit-action 'kill-buffer)
153 (message "Listing folders...done"))))) 154 (message "Listing folders...done")))))
154 155
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index e4b4a5b0d54..b850c8fdc43 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -1,6 +1,6 @@
1;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus. 1;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus.
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el
index 7b44dae1d06..dc076751865 100644
--- a/lisp/mh-e/mh-identity.el
+++ b/lisp/mh-e/mh-identity.el
@@ -1,6 +1,6 @@
1;;; mh-identity.el --- Multiple identify support for MH-E. 1;;; mh-identity.el --- Multiple identify support for MH-E.
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Peter S. Galbraith <psg@debian.org> 5;; Author: Peter S. Galbraith <psg@debian.org>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -87,18 +87,18 @@ change."
87;;;###mh-autoload 87;;;###mh-autoload
88(defun mh-identity-list-set (symbol value) 88(defun mh-identity-list-set (symbol value)
89 "Update the `mh-identity-list' variable, and rebuild the menu. 89 "Update the `mh-identity-list' variable, and rebuild the menu.
90Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in 90Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set
91customization). This is called after 'customize is used to alter 91in customization). This is called after 'customize is used to alter
92`mh-identity-list'." 92`mh-identity-list'."
93 (set-default symbol value) 93 (set-default symbol value)
94 (mh-identity-make-menu)) 94 (mh-identity-make-menu))
95 95
96(defvar mh-identity-local nil 96(defvar mh-identity-local nil
97 "Buffer-local variable holding the identity currently in use.") 97 "Buffer-local variable that holds the identity currently in use.")
98(make-variable-buffer-local 'mh-identity-local) 98(make-variable-buffer-local 'mh-identity-local)
99 99
100(defun mh-header-field-delete (field value-only) 100(defun mh-header-field-delete (field value-only)
101 "Delete FIELD in the mail header, or only its value if VALUE-ONLY is t. 101 "Delete header FIELD, or only its value if VALUE-ONLY is t.
102Return t if anything is deleted." 102Return t if anything is deleted."
103 (let ((field-colon (if (string-match "^.*:$" field) 103 (let ((field-colon (if (string-match "^.*:$" field)
104 field 104 field
@@ -119,11 +119,11 @@ Return t if anything is deleted."
119 "Marker for the end of a signature inserted by `mh-insert-identity'.") 119 "Marker for the end of a signature inserted by `mh-insert-identity'.")
120 120
121(defun mh-identity-field-handler (field) 121(defun mh-identity-field-handler (field)
122 "Return the handler for a FIELD or nil if none set. 122 "Return the handler for header FIELD or nil if none set.
123The field name is downcased. If the FIELD begins with the character 123The field name is downcased. If the FIELD begins with the character
124`:', then it must have a special handler defined in 124`:', then it must have a special handler defined in
125`mh-identity-handlers', else return an error since it is not a valid 125`mh-identity-handlers', else return an error since it is not a valid
126message header." 126header field."
127 (or (cdr (assoc (downcase field) mh-identity-handlers)) 127 (or (cdr (assoc (downcase field) mh-identity-handlers))
128 (and (eq (aref field 0) ?:) 128 (and (eq (aref field 0) ?:)
129 (error (format "Field %s - unknown mh-identity-handler" field))) 129 (error (format "Field %s - unknown mh-identity-handler" field)))
@@ -132,8 +132,8 @@ message header."
132 132
133;;;###mh-autoload 133;;;###mh-autoload
134(defun mh-insert-identity (identity) 134(defun mh-insert-identity (identity)
135 "Insert proper fields for given IDENTITY. 135 "Insert fields specified by given IDENTITY.
136Edit the `mh-identity-list' variable to define identity." 136See `mh-identity-list'."
137 (interactive 137 (interactive
138 (list (completing-read 138 (list (completing-read
139 "Identity: " 139 "Identity: "
@@ -167,7 +167,8 @@ Edit the `mh-identity-list' variable to define identity."
167 167
168;;;###mh-autoload 168;;;###mh-autoload
169(defun mh-identity-handler-gpg-identity (field action &optional value) 169(defun mh-identity-handler-gpg-identity (field action &optional value)
170 "For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. 170 "Process header FIELD \":pgg-default-user-id\".
171The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
171The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE 172The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE
172when action 'add is selected." 173when action 'add is selected."
173 (cond 174 (cond
@@ -180,8 +181,8 @@ when action 'add is selected."
180 181
181;;;###mh-autoload 182;;;###mh-autoload
182(defun mh-identity-handler-signature (field action &optional value) 183(defun mh-identity-handler-signature (field action &optional value)
183 "For FIELD \"signature\", process headers for ACTION 'remove or 'add. 184 "Process header FIELD \":signature\".
184The VALUE is added." 185The ACTION is one of 'remove or 'add. If 'add, the VALUE is added."
185 (cond 186 (cond
186 ((equal action 'remove) 187 ((equal action 'remove)
187 (when (and (markerp mh-identity-signature-start) 188 (when (and (markerp mh-identity-signature-start)
@@ -210,8 +211,8 @@ The VALUE is added."
210 211
211;;;###mh-autoload 212;;;###mh-autoload
212(defun mh-identity-handler-attribution-verb (field action &optional value) 213(defun mh-identity-handler-attribution-verb (field action &optional value)
213 "For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. 214 "Process header FIELD \":attribution-verb\".
214The VALUE is added." 215The ACTION is one of 'remove or 'add. If 'add, the VALUE is added."
215 (when (and (markerp mh-identity-attribution-verb-start) 216 (when (and (markerp mh-identity-attribution-verb-start)
216 (markerp mh-identity-attribution-verb-end)) 217 (markerp mh-identity-attribution-verb-end))
217 (delete-region mh-identity-attribution-verb-start 218 (delete-region mh-identity-attribution-verb-start
@@ -239,9 +240,10 @@ If VALUE is nil, use `mh-extract-from-attribution-verb'."
239 (point-max-marker)))) 240 (point-max-marker))))
240 241
241(defun mh-identity-handler-default (field action top &optional value) 242(defun mh-identity-handler-default (field action top &optional value)
242 "For FIELD, process mh-identity headers for ACTION 'remove or 'add. 243 "Process header FIELD.
243if TOP is non-nil, add the field and it's VALUE at the top of the header, else 244The ACTION is one of 'remove or 'add. If TOP is non-nil, add the field and its
244add it at the bottom of the header." 245VALUE at the top of the header, else add it at the bottom of the header. If
246action is 'add, the VALUE is added."
245 (let ((field-colon (if (string-match "^.*:$" field) 247 (let ((field-colon (if (string-match "^.*:$" field)
246 field 248 field
247 (concat field ":")))) 249 (concat field ":"))))
@@ -266,14 +268,16 @@ add it at the bottom of the header."
266 268
267;;;###mh-autoload 269;;;###mh-autoload
268(defun mh-identity-handler-top (field action &optional value) 270(defun mh-identity-handler-top (field action &optional value)
269 "For FIELD, process mh-identity headers for ACTION 'remove or 'add. 271 "Process header FIELD.
270If the field wasn't present, the VALUE is added at the top of the header." 272The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
273If the field wasn't present, it is added to the top of the header."
271 (mh-identity-handler-default field action t value)) 274 (mh-identity-handler-default field action t value))
272 275
273;;;###mh-autoload 276;;;###mh-autoload
274(defun mh-identity-handler-bottom (field action &optional value) 277(defun mh-identity-handler-bottom (field action &optional value)
275 "For FIELD, process mh-identity headers for ACTION 'remove or 'add. 278 "Process header FIELD.
276If the field wasn't present, the VALUE is added at the bottom of the header." 279The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
280If the field wasn't present, it is added to the bottom of the header."
277 (mh-identity-handler-default field action nil value)) 281 (mh-identity-handler-default field action nil value))
278 282
279(provide 'mh-identity) 283(provide 'mh-identity)
diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el
index 95341fa75f7..c9a9c6cb6b6 100644
--- a/lisp/mh-e/mh-inc.el
+++ b/lisp/mh-e/mh-inc.el
@@ -1,6 +1,6 @@
1;;; mh-inc.el --- MH-E `inc' and separate mail spool handling 1;;; mh-inc.el --- MH-E `inc' and separate mail spool handling
2;; 2;;
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Peter S. Galbraith <psg@debian.org> 5;; Author: Peter S. Galbraith <psg@debian.org>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -98,10 +98,10 @@ This is called after 'customize is used to alter `mh-inc-spool-list'."
98 98
99(provide 'mh-inc) 99(provide 'mh-inc)
100 100
101;; Local Variables: 101;;; Local Variables:
102;; indent-tabs-mode: nil 102;;; indent-tabs-mode: nil
103;; sentence-end-double-space: nil 103;;; sentence-end-double-space: nil
104;; End: 104;;; End:
105 105
106;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 106;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835
107;;; mh-inc.el ends here 107;;; mh-inc.el ends here
diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el
index cde630236b0..7a52b94dd2b 100644
--- a/lisp/mh-e/mh-index.el
+++ b/lisp/mh-e/mh-index.el
@@ -1,6 +1,6 @@
1;;; mh-index -- MH-E interface to indexing programs 1;;; mh-index -- MH-E interface to indexing programs
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -31,6 +31,7 @@
31;;; swish-e 31;;; swish-e
32;;; mairix 32;;; mairix
33;;; namazu 33;;; namazu
34;;; pick
34;;; grep 35;;; grep
35;;; 36;;;
36;;; (2) To use this package, you first have to build an index. Please read 37;;; (2) To use this package, you first have to build an index. Please read
@@ -352,43 +353,74 @@ they are concatenated to construct the base name."
352(defun* mh-index-search (redo-search-flag folder search-regexp 353(defun* mh-index-search (redo-search-flag folder search-regexp
353 &optional window-config) 354 &optional window-config)
354 "Perform an indexed search in an MH mail folder. 355 "Perform an indexed search in an MH mail folder.
355Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. 356Use a prefix argument to repeat the search.
356 357
357If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a 358Unlike regular searches, the prompt for the folder to search can be `all' to
358index search, then the search is repeated. Otherwise, FOLDER is searched with 359search all folders; in addition, the search works recursively on the listed
359SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is 360folder. The search criteria are entered in an MH-Pick buffer as described in
360\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG 361`mh-search-folder'.
361stores the window configuration that will be restored after the user quits the 362
362folder containing the index search results. 363To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. Another
363 364difference from the regular searches is that because the search operates on
364Four indexing programs are supported; if none of these are present, then grep 365more than one folder, the messages that are found are put in a temporary
365is used. This function picks the first program that is available on your 366sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This
366system. If you would prefer to use a different program, set the customization 367buffer is special because it displays messages from multiple folders; each set
367variable `mh-index-program' accordingly. 368of messages from a given folder has a heading with the folder name.
368 369
369The documentation for the following functions describes how to generate the 370In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] command can
370index for each program: 371be used to visit the folder of the message at point. Initially, only the
372messages that matched the search criteria are displayed in the folder. While
373the temporary buffer has its own set of message numbers, the actual messages
374numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder]
375command is useful to find the actual message number of an interesting message,
376or to view surrounding messages with the \\[mh-rescan-folder] command.
377
378Because this folder is temporary, you'll probably get in the habit of killing
379it when you're done with \\[mh-kill-folder].
380
381If you have run the \\[mh-search-folder] command, but change your mind while
382entering the search criteria and actually want to run an indexed search, then
383you can use the \\<mh-pick-mode-map>\\[mh-index-do-search] command in the
384MH-Pick buffer.
385
386The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command defined
387by the `mh-index-program' option. The default value is \"Auto-detect\" which
388means that MH-E will automatically choose one of \"swish++\", \"swish-e\",
389\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example,
390you have both \"swish++\" and \"mairix\" installed and you want to use
391\"mairix\", then you can set this option to \"mairix\".
392
393 *NOTE*
394
395 The \"pick\" and \"grep\" commands do not perform a recursive search on
396 the given folder.
397
398This command uses an \"X-MHE-Checksum:\" header field to cache the MD5
399checksum of a message. This means that if an incoming message already contains
400an \"X-MHE-Checksum:\" field, that message might not be found by this command.
401The following \"procmail\" recipe avoids this problem by renaming the existing
402header field:
403
404 :0 wf
405 | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\"
406
407The documentation for the following commands describe how to set up the
408various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands
409do not require additional configuration.
371 410
372 - `mh-swish++-execute-search' 411 - `mh-swish++-execute-search'
373 - `mh-swish-execute-search' 412 - `mh-swish-execute-search'
374 - `mh-mairix-execute-search' 413 - `mh-mairix-execute-search'
375 - `mh-namazu-execute-search' 414 - `mh-namazu-execute-search'
376
377If none of these programs are present then we use pick. If desired grep can be
378used instead. Details about these methods can be found in:
379
380 - `mh-pick-execute-search' 415 - `mh-pick-execute-search'
381 - `mh-grep-execute-search' 416 - `mh-grep-execute-search'
382 417
383This and related functions use an X-MHE-Checksum header to cache the MD5 418In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was
384checksum of a message. This means that already present X-MHE-Checksum headers 419generated by a index search, then the search is repeated. Otherwise, FOLDER is
385in the incoming email could result in messages not being found. The following 420searched with SEARCH-REGEXP and the results are presented in an MH-E folder.
386procmail recipe should avoid this: 421If FOLDER is \"+\" then mail in all folders are searched. Optional argument
387 422WINDOW-CONFIG stores the window configuration that will be restored after the
388 :0 wf 423user quits the folder containing the index search results."
389 | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\"
390
391This has the effect of renaming already present X-MHE-Checksum headers."
392 (interactive 424 (interactive
393 (list current-prefix-arg 425 (list current-prefix-arg
394 (progn 426 (progn
@@ -998,8 +1030,8 @@ Unlike the other index search programs \"pick\" only searches messages present
998in the folder itself and does not descend into any sub-folders that may be 1030in the folder itself and does not descend into any sub-folders that may be
999present. 1031present.
1000 1032
1001FOLDER-PATH is the directory containing the mails to be searched and 1033In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used
1002SEARCH-REGEXP is the pattern that pick gets." 1034to search."
1003 (set-buffer (get-buffer-create mh-index-temp-buffer)) 1035 (set-buffer (get-buffer-create mh-index-temp-buffer))
1004 (erase-buffer) 1036 (erase-buffer)
1005 (setq mh-index-pick-folder 1037 (setq mh-index-pick-folder
@@ -1029,7 +1061,13 @@ SEARCH-REGEXP is the pattern that pick gets."
1029 1061
1030(defun mh-grep-execute-search (folder-path search-regexp) 1062(defun mh-grep-execute-search (folder-path search-regexp)
1031 "Execute grep and read the results. 1063 "Execute grep and read the results.
1032FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." 1064
1065Unlike the other index search programs \"grep\" only searches messages present
1066in the folder itself and does not descend into any sub-folders that may be
1067present.
1068
1069In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used
1070to search."
1033 (set-buffer (get-buffer-create mh-index-temp-buffer)) 1071 (set-buffer (get-buffer-create mh-index-temp-buffer))
1034 (erase-buffer) 1072 (erase-buffer)
1035 (call-process mh-grep-binary nil '(t nil) nil 1073 (call-process mh-grep-binary nil '(t nil) nil
@@ -1081,34 +1119,34 @@ other matches left then return nil. If the current record is invalid return
1081(defun mh-mairix-execute-search (folder-path search-regexp-list) 1119(defun mh-mairix-execute-search (folder-path search-regexp-list)
1082 "Execute mairix and read the results. 1120 "Execute mairix and read the results.
1083 1121
1084In the examples below replace /home/user/Mail with the path to your MH 1122In the examples below, replace \"/home/user/Mail\" with the path to your MH
1085directory. 1123directory.
1086 1124
1087First create the directory /home/user/Mail/.mairix. Then create the file 1125First create the directory \"/home/user/Mail/.mairix\". Then create the file
1088/home/user/Mail/.mairix/config with the following contents: 1126\"/home/user/Mail/.mairix/config\" with the following contents:
1089 1127
1090 # This should contain the same thing as your `mh-user-path' 1128 base=/home/user/Mail
1091 base=/home/user/Mail
1092 1129
1093 # List of folders that should be indexed. 3 dots at the end means there are 1130 # List of folders that should be indexed. 3 dots at the end means there
1094 # subfolders within the folder 1131 # are subfolders within the folder
1095 mh_folders=archive...:inbox:drafts:news:sent:trash 1132 mh=archive...:inbox:drafts:news:sent:trash
1096 1133
1097 vfolder_format=raw 1134 vfolder_format=raw
1098 database=/home/user/Mail/mairix/database 1135 database=/home/user/Mail/mairix/database
1099 1136
1100Use the following command line to generate the mairix index. Run this daily 1137Use the following command line to generate the mairix index. Run this daily
1101from cron: 1138from cron:
1102 1139
1103 mairix -f /home/user/Mail/.mairix/config 1140 mairix -f /home/user/Mail/.mairix/config
1104 1141
1105FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used to search." 1142In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used
1143to search."
1106 (set-buffer (get-buffer-create mh-index-temp-buffer)) 1144 (set-buffer (get-buffer-create mh-index-temp-buffer))
1107 (erase-buffer) 1145 (erase-buffer)
1108 (unless mh-mairix-binary 1146 (unless mh-mairix-binary
1109 (error "Set mh-mairix-binary appropriately")) 1147 (error "Set mh-mairix-binary appropriately"))
1110 (apply #'call-process mh-mairix-binary nil '(t nil) nil 1148 (apply #'call-process mh-mairix-binary nil '(t nil) nil
1111 "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) 1149 "-r" "-f" (format "%s%s/config" mh-user-path mh-mairix-directory)
1112 search-regexp-list) 1150 search-regexp-list)
1113 (goto-char (point-min)) 1151 (goto-char (point-min))
1114 (setq mh-mairix-folder 1152 (setq mh-mairix-folder
@@ -1167,10 +1205,10 @@ REGEXP-LIST is an alist of fields and values."
1167 (let ((expr-list (cdr conjunct)) 1205 (let ((expr-list (cdr conjunct))
1168 (expr-string "")) 1206 (expr-string ""))
1169 (dolist (e expr-list) 1207 (dolist (e expr-list)
1170 (setq expr-string (concat expr-string "+" 1208 (setq expr-string (concat expr-string ","
1171 (if (atom e) "" "~") 1209 (if (atom e) "" "~")
1172 (if (atom e) e (cadr e))))) 1210 (if (atom e) e (cadr e)))))
1173 (setq final (concat final "," (substring expr-string 1))))) 1211 (setq final (concat final "/" (substring expr-string 1)))))
1174 (substring final 1))) 1212 (substring final 1)))
1175 result))) 1213 result)))
1176 result)) 1214 result))
@@ -1327,52 +1365,49 @@ space-separated list of FOLDERS, or nothing to search all folders."
1327(defun mh-swish-execute-search (folder-path search-regexp) 1365(defun mh-swish-execute-search (folder-path search-regexp)
1328 "Execute swish-e and read the results. 1366 "Execute swish-e and read the results.
1329 1367
1330In the examples below, replace /home/user/Mail with the path to your MH 1368In the examples below, replace \"/home/user/Mail\" with the path to your
1331directory. 1369MH directory.
1332 1370
1333First create the directory /home/user/Mail/.swish. Then create the file 1371First create the directory \"/home/user/Mail/.swish\". Then create the file
1334/home/user/Mail/.swish/config with the following contents: 1372\"/home/user/Mail/.swish/config\" with the following contents:
1335 1373
1336 IndexDir /home/user/Mail 1374 DefaultContents TXT*
1337 IndexFile /home/user/Mail/.swish/index 1375 IndexDir /home/user/Mail
1338 IndexName \"Mail Index\" 1376 IndexFile /home/user/Mail/.swish/index
1339 IndexDescription \"Mail Index\" 1377 IndexName \"Mail Index\"
1340 IndexPointer \"http://nowhere\" 1378 IndexDescription \"Mail Index\"
1341 IndexAdmin \"nobody\" 1379 IndexPointer \"http://nowhere\"
1342 #MetaNames automatic 1380 IndexAdmin \"nobody\"
1343 IndexReport 3 1381 #MetaNames automatic
1344 FollowSymLinks no 1382 IndexReport 3
1345 UseStemming no 1383 FollowSymLinks no
1346 IgnoreTotalWordCountWhenRanking yes 1384 UseStemming no
1347 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- 1385 IgnoreTotalWordCountWhenRanking yes
1348 BeginCharacters abcdefghijklmnopqrstuvwxyz 1386 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
1349 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 1387 BeginCharacters abcdefghijklmnopqrstuvwxyz
1350 IgnoreLimit 50 1000 1388 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
1351 IndexComments 0 1389 IgnoreLimit 50 1000
1352 FileRules pathname contains /home/user/Mail/.swish 1390 IndexComments 0
1353 FileRules pathname contains /home/user/Mail/mhe-index 1391 FileRules filename contains \\D
1354 FileRules filename is index 1392 FileRules pathname contains /home/user/Mail/.swish
1355 FileRules filename is \\..* 1393 FileRules pathname contains /home/user/Mail/mhe-index
1356 FileRules filename is #.* 1394
1357 FileRules filename is ,.* 1395This configuration does not index the folders that hold the results of your
1358 FileRules filename is .*~ 1396searches in \"+mhe-index\" since they tend to be ephemeral and the original
1397messages are indexed anyway.
1359 1398
1360If there are any directories you would like to ignore, append lines like the 1399If there are any directories you would like to ignore, append lines like the
1361following to config: 1400following to \"config\":
1362
1363 FileRules pathname contains /home/user/Mail/scripts
1364 1401
1365You do not want to index the folders that hold the results of your searches 1402 FileRules pathname contains /home/user/Mail/scripts
1366since they tend to be ephemeral and the original messages are indexed anyway.
1367The configuration file above assumes that the results are found in sub-folders
1368of `mh-index-folder' which is +mhe-index by default.
1369 1403
1370Use the following command line to generate the swish index. Run this 1404Use the following command line to generate the swish index. Run this daily
1371daily from cron: 1405from cron:
1372 1406
1373 swish-e -c /home/user/Mail/.swish/config 1407 swish-e -c /home/user/Mail/.swish/config
1374 1408
1375FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." 1409In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
1410search."
1376 (set-buffer (get-buffer-create mh-index-temp-buffer)) 1411 (set-buffer (get-buffer-create mh-index-temp-buffer))
1377 (erase-buffer) 1412 (erase-buffer)
1378 (unless mh-swish-binary 1413 (unless mh-swish-binary
@@ -1407,7 +1442,8 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
1407 (list (let* ((s (buffer-substring-no-properties start (1+ (point))))) 1442 (list (let* ((s (buffer-substring-no-properties start (1+ (point)))))
1408 (unless (string-match mh-swish-folder s) 1443 (unless (string-match mh-swish-folder s)
1409 (return 'error)) 1444 (return 'error))
1410 (if (string-match mh-user-path s) 1445 (if (and (string-match mh-user-path s)
1446 (< (match-end 0) (1- (length s))))
1411 (format "+%s" 1447 (format "+%s"
1412 (substring s (match-end 0) (1- (length s)))) 1448 (substring s (match-end 0) (1- (length s))))
1413 (return 'error))) 1449 (return 'error)))
@@ -1431,34 +1467,35 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
1431(defun mh-swish++-execute-search (folder-path search-regexp) 1467(defun mh-swish++-execute-search (folder-path search-regexp)
1432 "Execute swish++ and read the results. 1468 "Execute swish++ and read the results.
1433 1469
1434In the examples below, replace /home/user/Mail with the path to your MH 1470In the examples below, replace \"/home/user/Mail\" with the path to your MH
1435directory. 1471directory.
1436 1472
1437First create the directory /home/user/Mail/.swish++. Then create the file 1473First create the directory \"/home/user/Mail/.swish++\". Then create the file
1438/home/user/Mail/.swish++/swish++.conf with the following contents: 1474\"/home/user/Mail/.swish++/swish++.conf\" with the following contents:
1439 1475
1440 IncludeMeta Bcc Cc Comments Content-Description From Keywords 1476 IncludeMeta Bcc Cc Comments Content-Description From Keywords
1441 IncludeMeta Newsgroups Resent-To Subject To 1477 IncludeMeta Newsgroups Resent-To Subject To
1442 IncludeMeta Message-Id References In-Reply-To 1478 IncludeMeta Message-Id References In-Reply-To
1443 IncludeFile Mail * 1479 IncludeFile Mail *
1444 IndexFile /home/user/Mail/.swish++/swish++.index 1480 IndexFile /home/user/Mail/.swish++/swish++.index
1445 1481
1446Use the following command line to generate the swish index. Run this 1482Use the following command line to generate the swish index. Run this daily
1447daily from cron: 1483from cron:
1448 1484
1449 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ 1485 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\
1450 -o -path /home/user/Mail/.swish++ -prune \\ 1486 -o -path /home/user/Mail/.swish++ -prune \\
1451 -o -name \"[0-9]*\" -print \\ 1487 -o -name \"[0-9]*\" -print \\
1452 | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail 1488 | index -c /home/user/Mail/.swish++/swish++.conf -
1453 1489
1454You do not want to index the folders that hold the results of your searches 1490This command does not index the folders that hold the results of your searches
1455since they tend to be ephemeral and the original messages are indexed anyway. 1491in \"+mhe-index\" since they tend to be ephemeral and the original messages
1456The command above assumes that the results are found in sub-folders of 1492are indexed anyway.
1457`mh-index-folder' which is +mhe-index by default.
1458 1493
1459On some systems (Debian GNU/Linux, for example), use index++ instead of index. 1494On some systems (Debian GNU/Linux, for example), use \"index++\" instead of
1495\"index\".
1460 1496
1461FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." 1497In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
1498search."
1462 (set-buffer (get-buffer-create mh-index-temp-buffer)) 1499 (set-buffer (get-buffer-create mh-index-temp-buffer))
1463 (erase-buffer) 1500 (erase-buffer)
1464 (unless mh-swish++-binary 1501 (unless mh-swish++-binary
@@ -1512,32 +1549,29 @@ REGEXP-LIST is an alist of fields and values."
1512(defun mh-namazu-execute-search (folder-path search-regexp) 1549(defun mh-namazu-execute-search (folder-path search-regexp)
1513 "Execute namazu and read the results. 1550 "Execute namazu and read the results.
1514 1551
1515In the examples below, replace /home/user/Mail with the path to your MH 1552In the examples below, replace \"/home/user/Mail\" with the path to your MH
1516directory. 1553directory.
1517 1554
1518First create the directory /home/user/Mail/.namazu. Then create the file 1555First create the directory \"/home/user/Mail/.namazu\". Then create the file
1519/home/user/Mail/.namazu/mknmzrc with the following contents: 1556\"/home/user/Mail/.namazu/mknmzrc\" with the following contents:
1520 1557
1521 package conf; # Don't remove this line! 1558 package conf; # Don't remove this line!
1522 $ADDRESS = 'user@localhost'; 1559 $ADDRESS = 'user@localhost';
1523 $ALLOW_FILE = \"[0-9]*\"; 1560 $ALLOW_FILE = \"[0-9]*\";
1524 $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; 1561 $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\";
1525 1562
1526In the above example configuration, none of the mail files contained in the 1563This configuration does not index the folders that hold the results of your
1527directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. 1564searches in \"+mhe-index\" since they tend to be ephemeral and the original
1565messages are indexed anyway.
1528 1566
1529You do not want to index the folders that hold the results of your searches 1567Use the following command line to generate the namazu index. Run this daily
1530since they tend to be ephemeral and the original messages are indexed anyway. 1568from cron:
1531The configuration file above assumes that the results are found in sub-folders
1532of `mh-index-folder' which is +mhe-index by default.
1533
1534Use the following command line to generate the namazu index. Run this
1535daily from cron:
1536 1569
1537 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ 1570 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\
1538 /home/user/Mail 1571 /home/user/Mail
1539 1572
1540FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." 1573In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
1574search."
1541 (let ((namazu-index-directory 1575 (let ((namazu-index-directory
1542 (format "%s%s" mh-user-path mh-namazu-directory))) 1576 (format "%s%s" mh-user-path mh-namazu-directory)))
1543 (unless (file-exists-p namazu-index-directory) 1577 (unless (file-exists-p namazu-index-directory)
diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el
index b97e9fcde65..a975b882128 100644
--- a/lisp/mh-e/mh-init.el
+++ b/lisp/mh-e/mh-init.el
@@ -1,6 +1,6 @@
1;;; mh-init.el --- MH-E initialization. 1;;; mh-init.el --- MH-E initialization.
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Peter S. Galbraith <psg@debian.org> 5;; Author: Peter S. Galbraith <psg@debian.org>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el
index 29005d47aa6..e66f49e3a55 100644
--- a/lisp/mh-e/mh-junk.el
+++ b/lisp/mh-e/mh-junk.el
@@ -1,6 +1,6 @@
1;;; mh-junk.el --- Interface to anti-spam measures 1;;; mh-junk.el --- Interface to anti-spam measures
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>, 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>,
6;; Bill Wohler <wohler@newt.com> 6;; Bill Wohler <wohler@newt.com>
@@ -191,8 +191,8 @@ done by adding the following to your crontab:
191 (message (format "Blacklisting message %d..." msg)) 191 (message (format "Blacklisting message %d..." msg))
192 (set-buffer (get-buffer-create mh-temp-buffer)) 192 (set-buffer (get-buffer-create mh-temp-buffer))
193 (erase-buffer) 193 (erase-buffer)
194 (call-process (expand-file-name mh-scan-prog mh-progs) mh-junk-background 194 (call-process (expand-file-name mh-scan-prog mh-progs)
195 t nil 195 nil mh-junk-background nil
196 (format "%s" msg) current-folder 196 (format "%s" msg) current-folder
197 "-format" "%<(mymbox{from})%|%(addr{from})%>") 197 "-format" "%<(mymbox{from})%|%(addr{from})%>")
198 (goto-char (point-min)) 198 (goto-char (point-min))
diff --git a/lisp/mh-e/mh-loaddefs.el b/lisp/mh-e/mh-loaddefs.el
index 4abe3b208ef..9accabede57 100644
--- a/lisp/mh-e/mh-loaddefs.el
+++ b/lisp/mh-e/mh-loaddefs.el
@@ -1,6 +1,6 @@
1;;; mh-loaddefs.el --- automatically extracted autoloads 1;;; mh-loaddefs.el --- automatically extracted autoloads
2;; 2;;
3;;; Copyright (C) 2005 Free Software Foundation, Inc. 3;;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
4;;; Author: Bill Wohler <wohler@newt.com> 4;;; Author: Bill Wohler <wohler@newt.com>
5;;; Keywords: mail 5;;; Keywords: mail
6;;; Commentary: 6;;; Commentary:
@@ -13,7 +13,7 @@
13;;;;;; mh-check-whom mh-insert-signature mh-to-fcc mh-to-field mh-fill-paragraph-function 13;;;;;; mh-check-whom mh-insert-signature mh-to-fcc mh-to-field mh-fill-paragraph-function
14;;;;;; mh-get-header-field mh-send-other-window mh-send mh-reply 14;;;;;; mh-get-header-field mh-send-other-window mh-send mh-reply
15;;;;;; mh-redistribute mh-forward mh-extract-rejected-mail mh-edit-again) 15;;;;;; mh-redistribute mh-forward mh-extract-rejected-mail mh-edit-again)
16;;;;;; "mh-comp" "mh-comp.el" (16665 53716)) 16;;;;;; "mh-comp" "mh-comp.el" (17048 51103))
17;;; Generated autoloads from mh-comp.el 17;;; Generated autoloads from mh-comp.el
18 18
19(autoload (quote mh-edit-again) "mh-comp" "\ 19(autoload (quote mh-edit-again) "mh-comp" "\
@@ -56,8 +56,10 @@ to reply to:
56 cc/all sender and all recipients. 56 cc/all sender and all recipients.
57If optional prefix argument INCLUDEP provided, then include the message 57If optional prefix argument INCLUDEP provided, then include the message
58in the reply using filter `mhl.reply' in your MH directory. 58in the reply using filter `mhl.reply' in your MH directory.
59If the file named by `mh-repl-formfile' exists, it is used as a skeleton 59If the file named by `mh-repl-formfile' exists, it is used as a skeleton for
60for the reply. 60the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU
61mailutils variants and the file names by `mh-repl-group-formfile' exists, it
62is used instead.
61 63
62See also `mh-send'." t nil) 64See also `mh-send'." t nil)
63 65
@@ -183,7 +185,7 @@ If we are at the first header field go to the start of the message body." t nil)
183;;;;;; mh-store-msg mh-undo-folder mh-sort-folder mh-page-digest-backwards 185;;;;;; mh-store-msg mh-undo-folder mh-sort-folder mh-page-digest-backwards
184;;;;;; mh-page-digest mh-pipe-msg mh-pack-folder mh-list-folders 186;;;;;; mh-page-digest mh-pipe-msg mh-pack-folder mh-list-folders
185;;;;;; mh-kill-folder mh-copy-msg mh-burst-digest) "mh-funcs" "mh-funcs.el" 187;;;;;; mh-kill-folder mh-copy-msg mh-burst-digest) "mh-funcs" "mh-funcs.el"
186;;;;;; (16671 48788)) 188;;;;;; (17048 47864))
187;;; Generated autoloads from mh-funcs.el 189;;; Generated autoloads from mh-funcs.el
188 190
189(autoload (quote mh-burst-digest) "mh-funcs" "\ 191(autoload (quote mh-burst-digest) "mh-funcs" "\
@@ -261,7 +263,7 @@ Display cheat sheet for the commands of the current prefix in minibuffer." t nil
261;;;;;; mh-identity-insert-attribution-verb mh-identity-handler-attribution-verb 263;;;;;; mh-identity-insert-attribution-verb mh-identity-handler-attribution-verb
262;;;;;; mh-identity-handler-signature mh-identity-handler-gpg-identity 264;;;;;; mh-identity-handler-signature mh-identity-handler-gpg-identity
263;;;;;; mh-insert-identity mh-identity-list-set mh-identity-make-menu) 265;;;;;; mh-insert-identity mh-identity-list-set mh-identity-make-menu)
264;;;;;; "mh-identity" "mh-identity.el" (16671 57010)) 266;;;;;; "mh-identity" "mh-identity.el" (17044 63778))
265;;; Generated autoloads from mh-identity.el 267;;; Generated autoloads from mh-identity.el
266 268
267(autoload (quote mh-identity-make-menu) "mh-identity" "\ 269(autoload (quote mh-identity-make-menu) "mh-identity" "\
@@ -271,43 +273,46 @@ change." nil nil)
271 273
272(autoload (quote mh-identity-list-set) "mh-identity" "\ 274(autoload (quote mh-identity-list-set) "mh-identity" "\
273Update the `mh-identity-list' variable, and rebuild the menu. 275Update the `mh-identity-list' variable, and rebuild the menu.
274Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in 276Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set
275customization). This is called after 'customize is used to alter 277in customization). This is called after 'customize is used to alter
276`mh-identity-list'." nil nil) 278`mh-identity-list'." nil nil)
277 279
278(autoload (quote mh-insert-identity) "mh-identity" "\ 280(autoload (quote mh-insert-identity) "mh-identity" "\
279Insert proper fields for given IDENTITY. 281Insert fields specified by given IDENTITY.
280Edit the `mh-identity-list' variable to define identity." t nil) 282See `mh-identity-list'." t nil)
281 283
282(autoload (quote mh-identity-handler-gpg-identity) "mh-identity" "\ 284(autoload (quote mh-identity-handler-gpg-identity) "mh-identity" "\
283For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. 285Process header FIELD \":pgg-default-user-id\".
286The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
284The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE 287The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE
285when action 'add is selected." nil nil) 288when action 'add is selected." nil nil)
286 289
287(autoload (quote mh-identity-handler-signature) "mh-identity" "\ 290(autoload (quote mh-identity-handler-signature) "mh-identity" "\
288For FIELD \"signature\", process headers for ACTION 'remove or 'add. 291Process header FIELD \":signature\".
289The VALUE is added." nil nil) 292The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil)
290 293
291(autoload (quote mh-identity-handler-attribution-verb) "mh-identity" "\ 294(autoload (quote mh-identity-handler-attribution-verb) "mh-identity" "\
292For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. 295Process header FIELD \":attribution-verb\".
293The VALUE is added." nil nil) 296The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil)
294 297
295(autoload (quote mh-identity-insert-attribution-verb) "mh-identity" "\ 298(autoload (quote mh-identity-insert-attribution-verb) "mh-identity" "\
296Insert VALUE as attribution verb, setting up delimiting markers. 299Insert VALUE as attribution verb, setting up delimiting markers.
297If VALUE is nil, use `mh-extract-from-attribution-verb'." nil nil) 300If VALUE is nil, use `mh-extract-from-attribution-verb'." nil nil)
298 301
299(autoload (quote mh-identity-handler-top) "mh-identity" "\ 302(autoload (quote mh-identity-handler-top) "mh-identity" "\
300For FIELD, process mh-identity headers for ACTION 'remove or 'add. 303Process header FIELD.
301If the field wasn't present, the VALUE is added at the top of the header." nil nil) 304The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
305If the field wasn't present, it is added to the top of the header." nil nil)
302 306
303(autoload (quote mh-identity-handler-bottom) "mh-identity" "\ 307(autoload (quote mh-identity-handler-bottom) "mh-identity" "\
304For FIELD, process mh-identity headers for ACTION 'remove or 'add. 308Process header FIELD.
305If the field wasn't present, the VALUE is added at the bottom of the header." nil nil) 309The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
310If the field wasn't present, it is added to the bottom of the header." nil nil)
306 311
307;;;*** 312;;;***
308 313
309;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (16671 314;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (17048
310;;;;;; 48848)) 315;;;;;; 44143))
311;;; Generated autoloads from mh-inc.el 316;;; Generated autoloads from mh-inc.el
312 317
313(autoload (quote mh-inc-spool-list-set) "mh-inc" "\ 318(autoload (quote mh-inc-spool-list-set) "mh-inc" "\
@@ -326,7 +331,7 @@ This is called after 'customize is used to alter `mh-inc-spool-list'." nil nil)
326;;;;;; mh-index-parse-search-regexp mh-index-do-search mh-index-p 331;;;;;; mh-index-parse-search-regexp mh-index-do-search mh-index-p
327;;;;;; mh-index-read-data mh-index-search mh-index-create-sequences 332;;;;;; mh-index-read-data mh-index-search mh-index-create-sequences
328;;;;;; mh-create-sequence-map mh-index-update-maps) "mh-index" "mh-index.el" 333;;;;;; mh-create-sequence-map mh-index-update-maps) "mh-index" "mh-index.el"
329;;;;;; (16665 53754)) 334;;;;;; (17044 64025))
330;;; Generated autoloads from mh-index.el 335;;; Generated autoloads from mh-index.el
331 336
332(autoload (quote mh-index-update-maps) "mh-index" "\ 337(autoload (quote mh-index-update-maps) "mh-index" "\
@@ -346,43 +351,74 @@ Mirror sequences present in source folders in index folder." nil nil)
346 351
347(autoload (quote mh-index-search) "mh-index" "\ 352(autoload (quote mh-index-search) "mh-index" "\
348Perform an indexed search in an MH mail folder. 353Perform an indexed search in an MH mail folder.
349Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. 354Use a prefix argument to repeat the search.
350 355
351If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a 356Unlike regular searches, the prompt for the folder to search can be `all' to
352index search, then the search is repeated. Otherwise, FOLDER is searched with 357search all folders; in addition, the search works recursively on the listed
353SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is 358folder. The search criteria are entered in an MH-Pick buffer as described in
354\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG 359`mh-search-folder'.
355stores the window configuration that will be restored after the user quits the 360
356folder containing the index search results. 361To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. Another
357 362difference from the regular searches is that because the search operates on
358Four indexing programs are supported; if none of these are present, then grep 363more than one folder, the messages that are found are put in a temporary
359is used. This function picks the first program that is available on your 364sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This
360system. If you would prefer to use a different program, set the customization 365buffer is special because it displays messages from multiple folders; each set
361variable `mh-index-program' accordingly. 366of messages from a given folder has a heading with the folder name.
362 367
363The documentation for the following functions describes how to generate the 368In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] command can
364index for each program: 369be used to visit the folder of the message at point. Initially, only the
370messages that matched the search criteria are displayed in the folder. While
371the temporary buffer has its own set of message numbers, the actual messages
372numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder]
373command is useful to find the actual message number of an interesting message,
374or to view surrounding messages with the \\[mh-rescan-folder] command.
375
376Because this folder is temporary, you'll probably get in the habit of killing
377it when you're done with \\[mh-kill-folder].
378
379If you have run the \\[mh-search-folder] command, but change your mind while
380entering the search criteria and actually want to run an indexed search, then
381you can use the \\<mh-pick-mode-map>\\[mh-index-do-search] command in the
382MH-Pick buffer.
383
384The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command defined
385by the `mh-index-program' option. The default value is \"Auto-detect\" which
386means that MH-E will automatically choose one of \"swish++\", \"swish-e\",
387\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example,
388you have both \"swish++\" and \"mairix\" installed and you want to use
389\"mairix\", then you can set this option to \"mairix\".
390
391 *NOTE*
392
393 The \"pick\" and \"grep\" commands do not perform a recursive search on
394 the given folder.
395
396This command uses an \"X-MHE-Checksum:\" header field to cache the MD5
397checksum of a message. This means that if an incoming message already contains
398an \"X-MHE-Checksum:\" field, that message might not be found by this command.
399The following \"procmail\" recipe avoids this problem by renaming the existing
400header field:
401
402 :0 wf
403 | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\"
404
405The documentation for the following commands describe how to set up the
406various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands
407do not require additional configuration.
365 408
366 - `mh-swish++-execute-search' 409 - `mh-swish++-execute-search'
367 - `mh-swish-execute-search' 410 - `mh-swish-execute-search'
368 - `mh-mairix-execute-search' 411 - `mh-mairix-execute-search'
369 - `mh-namazu-execute-search' 412 - `mh-namazu-execute-search'
370
371If none of these programs are present then we use pick. If desired grep can be
372used instead. Details about these methods can be found in:
373
374 - `mh-pick-execute-search' 413 - `mh-pick-execute-search'
375 - `mh-grep-execute-search' 414 - `mh-grep-execute-search'
376 415
377This and related functions use an X-MHE-Checksum header to cache the MD5 416In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was
378checksum of a message. This means that already present X-MHE-Checksum headers 417generated by a index search, then the search is repeated. Otherwise, FOLDER is
379in the incoming email could result in messages not being found. The following 418searched with SEARCH-REGEXP and the results are presented in an MH-E folder.
380procmail recipe should avoid this: 419If FOLDER is \"+\" then mail in all folders are searched. Optional argument
381 420WINDOW-CONFIG stores the window configuration that will be restored after the
382 :0 wf 421user quits the folder containing the index search results." t nil)
383 | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\"
384
385This has the effect of renaming already present X-MHE-Checksum headers." t nil)
386 422
387(autoload (quote mh-index-read-data) "mh-index" "\ 423(autoload (quote mh-index-read-data) "mh-index" "\
388Read index data from file." nil nil) 424Read index data from file." nil nil)
@@ -463,114 +499,109 @@ space-separated list of FOLDERS, or nothing to search all folders." t nil)
463(autoload (quote mh-swish-execute-search) "mh-index" "\ 499(autoload (quote mh-swish-execute-search) "mh-index" "\
464Execute swish-e and read the results. 500Execute swish-e and read the results.
465 501
466In the examples below, replace /home/user/Mail with the path to your MH 502In the examples below, replace \"/home/user/Mail\" with the path to your
467directory. 503MH directory.
468 504
469First create the directory /home/user/Mail/.swish. Then create the file 505First create the directory \"/home/user/Mail/.swish\". Then create the file
470/home/user/Mail/.swish/config with the following contents: 506\"/home/user/Mail/.swish/config\" with the following contents:
471 507
472 IndexDir /home/user/Mail 508 DefaultContents TXT*
473 IndexFile /home/user/Mail/.swish/index 509 IndexDir /home/user/Mail
474 IndexName \"Mail Index\" 510 IndexFile /home/user/Mail/.swish/index
475 IndexDescription \"Mail Index\" 511 IndexName \"Mail Index\"
476 IndexPointer \"http://nowhere\" 512 IndexDescription \"Mail Index\"
477 IndexAdmin \"nobody\" 513 IndexPointer \"http://nowhere\"
478 #MetaNames automatic 514 IndexAdmin \"nobody\"
479 IndexReport 3 515 #MetaNames automatic
480 FollowSymLinks no 516 IndexReport 3
481 UseStemming no 517 FollowSymLinks no
482 IgnoreTotalWordCountWhenRanking yes 518 UseStemming no
483 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- 519 IgnoreTotalWordCountWhenRanking yes
484 BeginCharacters abcdefghijklmnopqrstuvwxyz 520 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
485 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 521 BeginCharacters abcdefghijklmnopqrstuvwxyz
486 IgnoreLimit 50 1000 522 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
487 IndexComments 0 523 IgnoreLimit 50 1000
488 FileRules pathname contains /home/user/Mail/.swish 524 IndexComments 0
489 FileRules pathname contains /home/user/Mail/mhe-index 525 FileRules filename contains \\D
490 FileRules filename is index 526 FileRules pathname contains /home/user/Mail/.swish
491 FileRules filename is \\..* 527 FileRules pathname contains /home/user/Mail/mhe-index
492 FileRules filename is #.* 528
493 FileRules filename is ,.* 529This configuration does not index the folders that hold the results of your
494 FileRules filename is .*~ 530searches in \"+mhe-index\" since they tend to be ephemeral and the original
531messages are indexed anyway.
495 532
496If there are any directories you would like to ignore, append lines like the 533If there are any directories you would like to ignore, append lines like the
497following to config: 534following to \"config\":
498 535
499 FileRules pathname contains /home/user/Mail/scripts 536 FileRules pathname contains /home/user/Mail/scripts
500 537
501You do not want to index the folders that hold the results of your searches 538Use the following command line to generate the swish index. Run this daily
502since they tend to be ephemeral and the original messages are indexed anyway. 539from cron:
503The configuration file above assumes that the results are found in sub-folders
504of `mh-index-folder' which is +mhe-index by default.
505 540
506Use the following command line to generate the swish index. Run this 541 swish-e -c /home/user/Mail/.swish/config
507daily from cron:
508 542
509 swish-e -c /home/user/Mail/.swish/config 543In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
510 544search." nil nil)
511FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil)
512 545
513(autoload (quote mh-swish++-execute-search) "mh-index" "\ 546(autoload (quote mh-swish++-execute-search) "mh-index" "\
514Execute swish++ and read the results. 547Execute swish++ and read the results.
515 548
516In the examples below, replace /home/user/Mail with the path to your MH 549In the examples below, replace \"/home/user/Mail\" with the path to your MH
517directory. 550directory.
518 551
519First create the directory /home/user/Mail/.swish++. Then create the file 552First create the directory \"/home/user/Mail/.swish++\". Then create the file
520/home/user/Mail/.swish++/swish++.conf with the following contents: 553\"/home/user/Mail/.swish++/swish++.conf\" with the following contents:
521 554
522 IncludeMeta Bcc Cc Comments Content-Description From Keywords 555 IncludeMeta Bcc Cc Comments Content-Description From Keywords
523 IncludeMeta Newsgroups Resent-To Subject To 556 IncludeMeta Newsgroups Resent-To Subject To
524 IncludeMeta Message-Id References In-Reply-To 557 IncludeMeta Message-Id References In-Reply-To
525 IncludeFile Mail * 558 IncludeFile Mail *
526 IndexFile /home/user/Mail/.swish++/swish++.index 559 IndexFile /home/user/Mail/.swish++/swish++.index
527 560
528Use the following command line to generate the swish index. Run this 561Use the following command line to generate the swish index. Run this daily
529daily from cron: 562from cron:
530 563
531 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ 564 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\
532 -o -path /home/user/Mail/.swish++ -prune \\ 565 -o -path /home/user/Mail/.swish++ -prune \\
533 -o -name \"[0-9]*\" -print \\ 566 -o -name \"[0-9]*\" -print \\
534 | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail 567 | index -c /home/user/Mail/.swish++/swish++.conf -
535 568
536You do not want to index the folders that hold the results of your searches 569This command does not index the folders that hold the results of your searches
537since they tend to be ephemeral and the original messages are indexed anyway. 570in \"+mhe-index\" since they tend to be ephemeral and the original messages
538The command above assumes that the results are found in sub-folders of 571are indexed anyway.
539`mh-index-folder' which is +mhe-index by default.
540 572
541On some systems (Debian GNU/Linux, for example), use index++ instead of index. 573On some systems (Debian GNU/Linux, for example), use \"index++\" instead of
574\"index\".
542 575
543FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) 576In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
577search." nil nil)
544 578
545(autoload (quote mh-namazu-execute-search) "mh-index" "\ 579(autoload (quote mh-namazu-execute-search) "mh-index" "\
546Execute namazu and read the results. 580Execute namazu and read the results.
547 581
548In the examples below, replace /home/user/Mail with the path to your MH 582In the examples below, replace \"/home/user/Mail\" with the path to your MH
549directory. 583directory.
550 584
551First create the directory /home/user/Mail/.namazu. Then create the file 585First create the directory \"/home/user/Mail/.namazu\". Then create the file
552/home/user/Mail/.namazu/mknmzrc with the following contents: 586\"/home/user/Mail/.namazu/mknmzrc\" with the following contents:
553
554 package conf; # Don't remove this line!
555 $ADDRESS = 'user@localhost';
556 $ALLOW_FILE = \"[0-9]*\";
557 $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\";
558 587
559In the above example configuration, none of the mail files contained in the 588 package conf; # Don't remove this line!
560directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. 589 $ADDRESS = 'user@localhost';
590 $ALLOW_FILE = \"[0-9]*\";
591 $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\";
561 592
562You do not want to index the folders that hold the results of your searches 593This configuration does not index the folders that hold the results of your
563since they tend to be ephemeral and the original messages are indexed anyway. 594searches in \"+mhe-index\" since they tend to be ephemeral and the original
564The configuration file above assumes that the results are found in sub-folders 595messages are indexed anyway.
565of `mh-index-folder' which is +mhe-index by default.
566 596
567Use the following command line to generate the namazu index. Run this 597Use the following command line to generate the namazu index. Run this daily
568daily from cron: 598from cron:
569 599
570 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ 600 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\
571 /home/user/Mail 601 /home/user/Mail
572 602
573FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) 603In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
604search." nil nil)
574 605
575(autoload (quote mh-index-choose) "mh-index" "\ 606(autoload (quote mh-index-choose) "mh-index" "\
576Choose an indexing function. 607Choose an indexing function.
@@ -582,7 +613,7 @@ system." nil nil)
582;;;*** 613;;;***
583 614
584;;;### (autoloads (mh-variants mh-variant-p mh-variant-set) "mh-init" 615;;;### (autoloads (mh-variants mh-variant-p mh-variant-set) "mh-init"
585;;;;;; "mh-init.el" (16684 6777)) 616;;;;;; "mh-init.el" (17044 64253))
586;;; Generated autoloads from mh-init.el 617;;; Generated autoloads from mh-init.el
587 618
588(autoload (quote mh-variant-set) "mh-init" "\ 619(autoload (quote mh-variant-set) "mh-init" "\
@@ -604,7 +635,7 @@ by the variable `mh-variants'." nil nil)
604;;;*** 635;;;***
605 636
606;;;### (autoloads (mh-junk-whitelist mh-junk-blacklist) "mh-junk" 637;;;### (autoloads (mh-junk-whitelist mh-junk-blacklist) "mh-junk"
607;;;;;; "mh-junk.el" (16671 48929)) 638;;;;;; "mh-junk.el" (17044 64253))
608;;; Generated autoloads from mh-junk.el 639;;; Generated autoloads from mh-junk.el
609 640
610(autoload (quote mh-junk-blacklist) "mh-junk" "\ 641(autoload (quote mh-junk-blacklist) "mh-junk" "\
@@ -644,7 +675,7 @@ The `mh-junk-program' option specifies the spam program in use." t nil)
644;;;;;; mh-mhn-compose-external-compressed-tar mh-mhn-compose-anon-ftp 675;;;;;; mh-mhn-compose-external-compressed-tar mh-mhn-compose-anon-ftp
645;;;;;; mh-mhn-compose-insertion mh-file-mime-type mh-have-file-command 676;;;;;; mh-mhn-compose-insertion mh-file-mime-type mh-have-file-command
646;;;;;; mh-compose-forward mh-compose-insertion) "mh-mime" "mh-mime.el" 677;;;;;; mh-compose-forward mh-compose-insertion) "mh-mime" "mh-mime.el"
647;;;;;; (16684 7323)) 678;;;;;; (17048 47895))
648;;; Generated autoloads from mh-mime.el 679;;; Generated autoloads from mh-mime.el
649 680
650(autoload (quote mh-compose-insertion) "mh-mime" "\ 681(autoload (quote mh-compose-insertion) "mh-mime" "\
@@ -857,15 +888,79 @@ View MIME PART-INDEX externally." t nil)
857;;;*** 888;;;***
858 889
859;;;### (autoloads (mh-do-search mh-pick-do-search mh-search-folder) 890;;;### (autoloads (mh-do-search mh-pick-do-search mh-search-folder)
860;;;;;; "mh-pick" "mh-pick.el" (16671 49140)) 891;;;;;; "mh-pick" "mh-pick.el" (17048 47905))
861;;; Generated autoloads from mh-pick.el 892;;; Generated autoloads from mh-pick.el
862 893
863(autoload (quote mh-search-folder) "mh-pick" "\ 894(autoload (quote mh-search-folder) "mh-pick" "\
864Search FOLDER for messages matching a pattern. 895Search FOLDER for messages matching a pattern.
865This function uses the MH command `pick' to do the work. 896
866Add the messages found to the sequence named `search'. 897With this command, you can search a folder for messages to or from a
867Argument WINDOW-CONFIG is the current window configuration and is used when 898particular person or about a particular subject. In fact, you can also search
868the search folder is dismissed." t nil) 899for messages containing selected strings in any arbitrary header field or any
900string found within the messages.
901
902You are first prompted for the name of the folder to search and then placed in
903the following buffer in MH-Pick mode:
904
905 From:
906 To:
907 Cc:
908 Date:
909 Subject:
910 --------
911
912Edit this template by entering your search criteria in an appropriate header
913field that is already there, or create a new field yourself. If the string
914you're looking for could be anywhere in a message, then place the string
915underneath the row of dashes. The \\[mh-search-folder] command uses the MH
916command \"pick\" to do the real work.
917
918There are no semantics associated with the search criteria--they are simply
919treated as strings. Case is ignored when all lowercase is used, and regular
920expressions (a la \"ed\") are available. It is all right to specify several
921search criteria. What happens then is that a logical _and_ of the various
922fields is performed. If you prefer a logical _or_ operation, run
923\\[mh-search-folder] multiple times.
924
925As an example, let's say that we want to find messages from Ginnean about
926horseback riding in the Kosciusko National Park (Australia) during January,
9271994. Normally we would start with a broad search and narrow it down if
928necessary to produce a manageable amount of data, but we'll cut to the chase
929and create a fairly restrictive set of criteria as follows:
930
931 From: ginnean
932 To:
933 Cc:
934 Date: Jan 1994
935 Subject: horse.*kosciusko
936 --------
937
938As with MH-Letter mode, MH-Pick provides commands like
939\\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks.
940
941To perform the search, type \\[mh-do-search]. The selected messages are placed
942in the \"search\" sequence, which you can use later in forwarding, printing,
943or narrowing your field of view. Subsequent searches are appended to the
944\"search\" sequence. If, however, you wish to start with a clean slate, first
945delete the \"search\" sequence.
946
947If you're searching in a folder that is already displayed in an MH-Folder
948buffer, only those messages contained in the buffer are used for the search.
949Therefore, if you want to search in all messages, first kill the folder's
950buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder
951with \\[mh-rescan-folder].
952
953If you find that you do the same thing over and over when editing the search
954template, you may wish to bind some shortcuts to keys. This can be done with
955the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is
956run on a new pattern.
957
958If you have run the \\[mh-index-search] command, but change your mind while
959entering the search criteria and actually want to run a regular search, then
960you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command.
961
962In a program, argument WINDOW-CONFIG is the current window configuration and
963is used when the search folder is dismissed." t nil)
869 964
870(autoload (quote mh-pick-do-search) "mh-pick" "\ 965(autoload (quote mh-pick-do-search) "mh-pick" "\
871Find messages that match the qualifications in the current pattern buffer. 966Find messages that match the qualifications in the current pattern buffer.
@@ -882,7 +977,7 @@ indexing program specified in `mh-index-program' is used." t nil)
882 977
883;;;### (autoloads (mh-print-msg mh-ps-print-toggle-mime mh-ps-print-toggle-color 978;;;### (autoloads (mh-print-msg mh-ps-print-toggle-mime mh-ps-print-toggle-color
884;;;;;; mh-ps-print-toggle-faces mh-ps-print-msg-show mh-ps-print-msg-file 979;;;;;; mh-ps-print-toggle-faces mh-ps-print-msg-show mh-ps-print-msg-file
885;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (16680 11171)) 980;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (17044 64253))
886;;; Generated autoloads from mh-print.el 981;;; Generated autoloads from mh-print.el
887 982
888(autoload (quote mh-ps-print-msg) "mh-print" "\ 983(autoload (quote mh-ps-print-msg) "mh-print" "\
@@ -935,7 +1030,7 @@ The messages are formatted by mhl. See the variable `mhl-formfile'." t nil)
935;;;;;; mh-rename-seq mh-translate-range mh-read-range mh-read-seq-default 1030;;;;;; mh-rename-seq mh-translate-range mh-read-range mh-read-seq-default
936;;;;;; mh-notate-deleted-and-refiled mh-widen mh-put-msg-in-seq 1031;;;;;; mh-notate-deleted-and-refiled mh-widen mh-put-msg-in-seq
937;;;;;; mh-narrow-to-seq mh-msg-is-in-seq mh-list-sequences mh-delete-seq) 1032;;;;;; mh-narrow-to-seq mh-msg-is-in-seq mh-list-sequences mh-delete-seq)
938;;;;;; "mh-seq" "mh-seq.el" (16671 65286)) 1033;;;;;; "mh-seq" "mh-seq.el" (17048 47921))
939;;; Generated autoloads from mh-seq.el 1034;;; Generated autoloads from mh-seq.el
940 1035
941(autoload (quote mh-delete-seq) "mh-seq" "\ 1036(autoload (quote mh-delete-seq) "mh-seq" "\
@@ -1157,7 +1252,7 @@ Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." t nil)
1157 1252
1158;;;### (autoloads (mh-speed-add-folder mh-speed-invalidate-map mh-speed-flists 1253;;;### (autoloads (mh-speed-add-folder mh-speed-invalidate-map mh-speed-flists
1159;;;;;; mh-speed-view mh-speed-toggle mh-folder-speedbar-buttons) 1254;;;;;; mh-speed-view mh-speed-toggle mh-folder-speedbar-buttons)
1160;;;;;; "mh-speed" "mh-speed.el" (16665 53793)) 1255;;;;;; "mh-speed" "mh-speed.el" (17044 64253))
1161;;; Generated autoloads from mh-speed.el 1256;;; Generated autoloads from mh-speed.el
1162 1257
1163(autoload (quote mh-folder-speedbar-buttons) "mh-speed" "\ 1258(autoload (quote mh-folder-speedbar-buttons) "mh-speed" "\
@@ -1196,7 +1291,7 @@ The function invalidates the latest ancestor that is present." nil nil)
1196;;;;;; mh-alias-grab-from-field mh-alias-add-alias mh-alias-for-from-p 1291;;;;;; mh-alias-grab-from-field mh-alias-add-alias mh-alias-for-from-p
1197;;;;;; mh-alias-address-to-alias mh-alias-letter-expand-alias mh-alias-minibuffer-confirm-address 1292;;;;;; mh-alias-address-to-alias mh-alias-letter-expand-alias mh-alias-minibuffer-confirm-address
1198;;;;;; mh-read-address mh-alias-reload-maybe mh-alias-reload) "mh-alias" 1293;;;;;; mh-read-address mh-alias-reload-maybe mh-alias-reload) "mh-alias"
1199;;;;;; "mh-alias.el" (16671 49382)) 1294;;;;;; "mh-alias.el" (17048 47789))
1200;;; Generated autoloads from mh-alias.el 1295;;; Generated autoloads from mh-alias.el
1201 1296
1202(autoload (quote mh-alias-reload) "mh-alias" "\ 1297(autoload (quote mh-alias-reload) "mh-alias" "\
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index d286069ba4b..dcd8f67a0f3 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -1,6 +1,7 @@
1;;; mh-mime.el --- MH-E support for composing MIME messages 1;;; mh-mime.el --- MH-E support for composing MIME messages
2 2
3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995,
4;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 5
5;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -1325,6 +1326,18 @@ Parameter EL is unused."
1325 (point-max))) 1326 (point-max)))
1326 (forward-line -1))))) 1327 (forward-line -1)))))
1327 1328
1329(defun mh-mime-security-button-face (info)
1330 "Return the button face to use for encrypted/signed mail based on INFO."
1331 (cond ((string-match "OK" info) ;Decrypted mail
1332 mh-show-pgg-good-face)
1333 ((string-match "Failed" info) ;Decryption failed or signature invalid
1334 mh-show-pgg-bad-face)
1335 ((string-match "Undecided" info);Unprocessed mail
1336 mh-show-pgg-unknown-face)
1337 ((string-match "Untrusted" info);Key not trusted
1338 mh-show-pgg-unknown-face)
1339 (t mh-show-pgg-good-face)))
1340
1328(defun mh-mime-security-press-button (handle) 1341(defun mh-mime-security-press-button (handle)
1329 "Callback from security button for part HANDLE." 1342 "Callback from security button for part HANDLE."
1330 (if (mm-handle-multipart-ctl-parameter handle 'gnus-info) 1343 (if (mm-handle-multipart-ctl-parameter handle 'gnus-info)
@@ -1364,9 +1377,10 @@ Parameter EL is unused."
1364 (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info) 1377 (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)
1365 "Undecided")) 1378 "Undecided"))
1366 (details (mm-handle-multipart-ctl-parameter handle 'gnus-details)) 1379 (details (mm-handle-multipart-ctl-parameter handle 'gnus-details))
1367 pressed-details begin end) 1380 pressed-details begin end face)
1368 (setq details (if details (concat "\n" details) "")) 1381 (setq details (if details (concat "\n" details) ""))
1369 (setq pressed-details (if mh-mime-security-button-pressed details "")) 1382 (setq pressed-details (if mh-mime-security-button-pressed details ""))
1383 (setq face (mh-mime-security-button-face info))
1370 (unless (bolp) (insert "\n")) 1384 (unless (bolp) (insert "\n"))
1371 (setq begin (point)) 1385 (setq begin (point))
1372 (gnus-eval-format 1386 (gnus-eval-format
@@ -1382,6 +1396,7 @@ Parameter EL is unused."
1382 :mime-handle handle 1396 :mime-handle handle
1383 :action 'mh-widget-press-button 1397 :action 'mh-widget-press-button
1384 :button-keymap mh-mime-security-button-map 1398 :button-keymap mh-mime-security-button-map
1399 :button-face face
1385 :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.") 1400 :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.")
1386 (dolist (ov (mh-funcall-if-exists overlays-in begin end)) 1401 (dolist (ov (mh-funcall-if-exists overlays-in begin end))
1387 (mh-funcall-if-exists overlay-put ov 'evaporate t)) 1402 (mh-funcall-if-exists overlay-put ov 'evaporate t))
diff --git a/lisp/mh-e/mh-pick.el b/lisp/mh-e/mh-pick.el
index 7b0ae4bafdf..5c31fb167cb 100644
--- a/lisp/mh-e/mh-pick.el
+++ b/lisp/mh-e/mh-pick.el
@@ -1,6 +1,7 @@
1;;; mh-pick.el --- make a search pattern and search for a message in MH-E 1;;; mh-pick.el --- make a search pattern and search for a message in MH-E
2 2
3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995,
4;; 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
4 5
5;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -52,10 +53,74 @@
52;;;###mh-autoload 53;;;###mh-autoload
53(defun mh-search-folder (folder window-config) 54(defun mh-search-folder (folder window-config)
54 "Search FOLDER for messages matching a pattern. 55 "Search FOLDER for messages matching a pattern.
55This function uses the MH command `pick' to do the work. 56
56Add the messages found to the sequence named `search'. 57With this command, you can search a folder for messages to or from a
57Argument WINDOW-CONFIG is the current window configuration and is used when 58particular person or about a particular subject. In fact, you can also search
58the search folder is dismissed." 59for messages containing selected strings in any arbitrary header field or any
60string found within the messages.
61
62You are first prompted for the name of the folder to search and then placed in
63the following buffer in MH-Pick mode:
64
65 From:
66 To:
67 Cc:
68 Date:
69 Subject:
70 --------
71
72Edit this template by entering your search criteria in an appropriate header
73field that is already there, or create a new field yourself. If the string
74you're looking for could be anywhere in a message, then place the string
75underneath the row of dashes. The \\[mh-search-folder] command uses the MH
76command \"pick\" to do the real work.
77
78There are no semantics associated with the search criteria--they are simply
79treated as strings. Case is ignored when all lowercase is used, and regular
80expressions (a la \"ed\") are available. It is all right to specify several
81search criteria. What happens then is that a logical _and_ of the various
82fields is performed. If you prefer a logical _or_ operation, run
83\\[mh-search-folder] multiple times.
84
85As an example, let's say that we want to find messages from Ginnean about
86horseback riding in the Kosciusko National Park (Australia) during January,
871994. Normally we would start with a broad search and narrow it down if
88necessary to produce a manageable amount of data, but we'll cut to the chase
89and create a fairly restrictive set of criteria as follows:
90
91 From: ginnean
92 To:
93 Cc:
94 Date: Jan 1994
95 Subject: horse.*kosciusko
96 --------
97
98As with MH-Letter mode, MH-Pick provides commands like
99\\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks.
100
101To perform the search, type \\[mh-do-search]. The selected messages are placed
102in the \"search\" sequence, which you can use later in forwarding, printing,
103or narrowing your field of view. Subsequent searches are appended to the
104\"search\" sequence. If, however, you wish to start with a clean slate, first
105delete the \"search\" sequence.
106
107If you're searching in a folder that is already displayed in an MH-Folder
108buffer, only those messages contained in the buffer are used for the search.
109Therefore, if you want to search in all messages, first kill the folder's
110buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder
111with \\[mh-rescan-folder].
112
113If you find that you do the same thing over and over when editing the search
114template, you may wish to bind some shortcuts to keys. This can be done with
115the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is
116run on a new pattern.
117
118If you have run the \\[mh-index-search] command, but change your mind while
119entering the search criteria and actually want to run a regular search, then
120you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command.
121
122In a program, argument WINDOW-CONFIG is the current window configuration and
123is used when the search folder is dismissed."
59 (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t) 124 (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t)
60 (current-window-configuration))) 125 (current-window-configuration)))
61 (let ((pick-folder (if (equal folder "+") mh-current-folder folder))) 126 (let ((pick-folder (if (equal folder "+") mh-current-folder folder)))
@@ -140,8 +205,7 @@ with no arguments, upon entry to this mode.
140 (make-local-variable 'mh-searching-function) 205 (make-local-variable 'mh-searching-function)
141 (make-local-variable 'mh-help-messages) 206 (make-local-variable 'mh-help-messages)
142 (easy-menu-add mh-pick-menu) 207 (easy-menu-add mh-pick-menu)
143 (setq mh-help-messages mh-pick-mode-help-messages) 208 (setq mh-help-messages mh-pick-mode-help-messages))
144 (run-hooks 'mh-pick-mode-hook))
145 209
146;;;###mh-autoload 210;;;###mh-autoload
147(defun mh-pick-do-search () 211(defun mh-pick-do-search ()
diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el
index 9a7df0b8fd4..7539e455919 100644
--- a/lisp/mh-e/mh-print.el
+++ b/lisp/mh-e/mh-print.el
@@ -1,6 +1,6 @@
1;;; mh-print.el --- MH-E printing support 1;;; mh-print.el --- MH-E printing support
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Jeffrey C Honig <jch@honig.net> 5;; Author: Jeffrey C Honig <jch@honig.net>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index d09e9805682..e618e6f41b3 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -1,6 +1,7 @@
1;;; mh-seq.el --- MH-E sequences support 1;;; mh-seq.el --- MH-E sequences support
2 2
3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995,
4;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 5
5;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -195,7 +196,7 @@ redone to get the new thread tree. This makes incremental threading easier.")
195 (insert "\n")) 196 (insert "\n"))
196 (setq seq-list (cdr seq-list))) 197 (setq seq-list (cdr seq-list)))
197 (goto-char (point-min)) 198 (goto-char (point-min))
198 (view-mode 1) 199 (view-mode-enter)
199 (setq view-exit-action 'kill-buffer) 200 (setq view-exit-action 'kill-buffer)
200 (message "Listing sequences...done"))))) 201 (message "Listing sequences...done")))))
201 202
@@ -788,10 +789,33 @@ This function can only be used the folder is threaded."
788If no prefix arg is given, then return DEFAULT." 789If no prefix arg is given, then return DEFAULT."
789 (let ((default-string (loop for x in default concat (format " %s" x)))) 790 (let ((default-string (loop for x in default concat (format " %s" x))))
790 (if (or current-prefix-arg (equal default-string "")) 791 (if (or current-prefix-arg (equal default-string ""))
791 (delete "" (split-string (read-string "Pick expression: " 792 (mh-pick-args-list (read-string "Pick expression: "
792 default-string))) 793 default-string))
793 default))) 794 default)))
794 795
796(defun mh-pick-args-list (s)
797 "Form list by grouping elements in string S suitable for pick arguments.
798For example, the string \"-subject a b c -from Joe User <user@domain.com>\"
799is converted to (\"-subject\" \"a b c\" \"-from\"
800\"Joe User <user@domain.com>\""
801 (let ((full-list (split-string s))
802 current-arg collection arg-list)
803 (while full-list
804 (setq current-arg (car full-list))
805 (if (null (string-match "^-" current-arg))
806 (setq collection
807 (if (null collection)
808 current-arg
809 (format "%s %s" collection current-arg)))
810 (when collection
811 (setq arg-list (append arg-list (list collection)))
812 (setq collection nil))
813 (setq arg-list (append arg-list (list current-arg))))
814 (setq full-list (cdr full-list)))
815 (when collection
816 (setq arg-list (append arg-list (list collection))))
817 arg-list))
818
795;;;###mh-autoload 819;;;###mh-autoload
796(defun mh-narrow-to-subject (&optional pick-expr) 820(defun mh-narrow-to-subject (&optional pick-expr)
797 "Limit to messages with same subject. 821 "Limit to messages with same subject.
@@ -1315,6 +1339,7 @@ All messages after START-POINT are added to the thread tree."
1315 (old-buffer-modified-flag (buffer-modified-p))) 1339 (old-buffer-modified-flag (buffer-modified-p)))
1316 (delete-region (point-min) (point-max)) 1340 (delete-region (point-min) (point-max))
1317 (mh-thread-print-scan-lines thread-tree) 1341 (mh-thread-print-scan-lines thread-tree)
1342 (mh-notate-user-sequences)
1318 (mh-notate-deleted-and-refiled) 1343 (mh-notate-deleted-and-refiled)
1319 (mh-notate-cur) 1344 (mh-notate-cur)
1320 (set-buffer-modified-p old-buffer-modified-flag)))) 1345 (set-buffer-modified-p old-buffer-modified-flag))))
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index a20e6e0a410..2617a941de1 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -1,6 +1,6 @@
1;;; mh-speed.el --- Speedbar interface for MH-E. 1;;; mh-speed.el --- Speedbar interface for MH-E.
2 2
3;; Copyright (C) 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index a7ba9311403..d371087cc6d 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -1,6 +1,7 @@
1;;; mh-utils.el --- MH-E code needed for both sending and reading 1;;; mh-utils.el --- MH-E code needed for both sending and reading
2 2
3;; Copyright (C) 1993, 95, 1997, 2000, 01, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995, 1997,
4;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 5
5;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -703,8 +704,8 @@ not pointing to a message."
703 (save-excursion 704 (save-excursion
704 (beginning-of-line) 705 (beginning-of-line)
705 (cond ((looking-at mh-scan-msg-number-regexp) 706 (cond ((looking-at mh-scan-msg-number-regexp)
706 (string-to-int (buffer-substring (match-beginning 1) 707 (string-to-number (buffer-substring (match-beginning 1)
707 (match-end 1)))) 708 (match-end 1))))
708 (error-if-no-message 709 (error-if-no-message
709 (error "Cursor not pointing to message")) 710 (error "Cursor not pointing to message"))
710 (t nil)))) 711 (t nil))))
@@ -1129,8 +1130,7 @@ See also `mh-folder-mode'.
1129 (make-local-variable 'mh-show-folder-buffer) 1130 (make-local-variable 'mh-show-folder-buffer)
1130 (buffer-disable-undo) 1131 (buffer-disable-undo)
1131 (setq buffer-read-only t) 1132 (setq buffer-read-only t)
1132 (use-local-map mh-show-mode-map) 1133 (use-local-map mh-show-mode-map))
1133 (run-hooks 'mh-show-mode-hook))
1134 1134
1135(defun mh-show-addr () 1135(defun mh-show-addr ()
1136 "Use `goto-address'." 1136 "Use `goto-address'."
@@ -1673,7 +1673,8 @@ The message is displayed in raw form."
1673 "Decode >From at beginning of lines for `mh-show-mode'." 1673 "Decode >From at beginning of lines for `mh-show-mode'."
1674 (save-excursion 1674 (save-excursion
1675 (let ((modified (buffer-modified-p)) 1675 (let ((modified (buffer-modified-p))
1676 (case-fold-search nil)) 1676 (case-fold-search nil)
1677 (buffer-read-only nil))
1677 (goto-char (mh-mail-header-end)) 1678 (goto-char (mh-mail-header-end))
1678 (while (re-search-forward "^>From" nil t) 1679 (while (re-search-forward "^>From" nil t)
1679 (replace-match "From")) 1680 (replace-match "From"))
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index b279715329f..f234ab059d5 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -670,8 +670,7 @@ These are the special commands of EUDC mode:
670 (if eudc-emacs-p 670 (if eudc-emacs-p
671 (easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu)) 671 (easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu))
672 (setq mode-popup-menu (eudc-menu))) 672 (setq mode-popup-menu (eudc-menu)))
673 (run-hooks 'eudc-mode-hook) 673 (run-mode-hooks 'eudc-mode-hook))
674 )
675 674
676;;}}} 675;;}}}
677 676
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index ebf4dcd3618..d2ff0140dce 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -458,7 +458,7 @@ The key bindings for `quickurl-list-mode' are:
458 (use-local-map quickurl-list-mode-map) 458 (use-local-map quickurl-list-mode-map)
459 (setq major-mode 'quickurl-list-mode 459 (setq major-mode 'quickurl-list-mode
460 mode-name "quickurl list") 460 mode-name "quickurl list")
461 (run-hooks 'quickurl-list-mode-hook) 461 (run-mode-hooks 'quickurl-list-mode-hook)
462 (setq buffer-read-only t 462 (setq buffer-read-only t
463 truncate-lines t)) 463 truncate-lines t))
464 464
diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el
index 73fef1452a0..f41dd845261 100644
--- a/lisp/net/snmp-mode.el
+++ b/lisp/net/snmp-mode.el
@@ -393,8 +393,7 @@ Turning on snmp-mode runs the hooks in `snmp-common-mode-hook', then
393 (setq snmp-mode-status-list snmp-rfc1212-status) 393 (setq snmp-mode-status-list snmp-rfc1212-status)
394 394
395 ;; Run hooks 395 ;; Run hooks
396 (run-hooks 'snmp-common-mode-hook) 396 (run-mode-hooks 'snmp-common-mode-hook 'snmp-mode-hook))
397 (run-hooks 'snmp-mode-hook))
398 397
399 398
400;;;###autoload 399;;;###autoload
@@ -429,8 +428,7 @@ then `snmpv2-mode-hook'."
429 (setq snmp-mode-status-list snmp-rfc1902-status) 428 (setq snmp-mode-status-list snmp-rfc1902-status)
430 429
431 ;; Run hooks 430 ;; Run hooks
432 (run-hooks 'snmp-common-mode-hook) 431 (run-mode-hooks 'snmp-common-mode-hook 'snmpv2-mode-hook))
433 (run-hooks 'snmpv2-mode-hook))
434 432
435 433
436;;;---------------------------------------------------------------------------- 434;;;----------------------------------------------------------------------------
diff --git a/lisp/obsolete/ooutline.el b/lisp/obsolete/ooutline.el
index 6b595b86297..0218d097b64 100644
--- a/lisp/obsolete/ooutline.el
+++ b/lisp/obsolete/ooutline.el
@@ -224,7 +224,7 @@ Turning on outline mode calls the value of `text-mode-hook' and then of
224 (setq font-lock-defaults '(outline-font-lock-keywords t)) 224 (setq font-lock-defaults '(outline-font-lock-keywords t))
225 (make-local-variable 'change-major-mode-hook) 225 (make-local-variable 'change-major-mode-hook)
226 (add-hook 'change-major-mode-hook 'show-all) 226 (add-hook 'change-major-mode-hook 'show-all)
227 (run-hooks 'text-mode-hook 'outline-mode-hook)) 227 (run-mode-hooks 'text-mode-hook 'outline-mode-hook))
228 228
229(defcustom outline-minor-mode-prefix "\C-c@" 229(defcustom outline-minor-mode-prefix "\C-c@"
230 "*Prefix key to use for Outline commands in Outline minor mode. 230 "*Prefix key to use for Outline commands in Outline minor mode.
diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el
index 34d7e532d1a..5ea14678d0b 100644
--- a/lisp/obsolete/options.el
+++ b/lisp/obsolete/options.el
@@ -109,7 +109,7 @@ For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph]
109 (setq truncate-lines t) 109 (setq truncate-lines t)
110 (setq major-mode 'Edit-options-mode) 110 (setq major-mode 'Edit-options-mode)
111 (setq mode-name "Options") 111 (setq mode-name "Options")
112 (run-hooks 'Edit-options-mode-hook)) 112 (run-mode-hooks 'Edit-options-mode-hook))
113 113
114(defun Edit-options-set () (interactive) 114(defun Edit-options-set () (interactive)
115 (Edit-options-modify 115 (Edit-options-modify
diff --git a/lisp/obsolete/rnews.el b/lisp/obsolete/rnews.el
index cb2ed034ffc..7a546aa3081 100644
--- a/lisp/obsolete/rnews.el
+++ b/lisp/obsolete/rnews.el
@@ -375,7 +375,7 @@ U unsubscribe from specified newsgroup."
375 (set-syntax-table text-mode-syntax-table) 375 (set-syntax-table text-mode-syntax-table)
376 (use-local-map news-mode-map) 376 (use-local-map news-mode-map)
377 (setq local-abbrev-table text-mode-abbrev-table) 377 (setq local-abbrev-table text-mode-abbrev-table)
378 (run-hooks 'news-mode-hook)) 378 (run-mode-hooks 'news-mode-hook))
379 379
380(defun string-subst-char (new old string) 380(defun string-subst-char (new old string)
381 (let (index) 381 (let (index)
diff --git a/lisp/obsolete/rnewspost.el b/lisp/obsolete/rnewspost.el
index 1b7623f78ae..e1a378c6fb6 100644
--- a/lisp/obsolete/rnewspost.el
+++ b/lisp/obsolete/rnewspost.el
@@ -130,7 +130,7 @@ C-c C-r caesar rotate all letters by 13 places in the article's body (rot13)."
130 (setq mode-name "News Reply") 130 (setq mode-name "News Reply")
131 (make-local-variable 'paragraph-separate) 131 (make-local-variable 'paragraph-separate)
132 (make-local-variable 'paragraph-start) 132 (make-local-variable 'paragraph-start)
133 (run-hooks 'text-mode-hook 'news-reply-mode-hook)) 133 (run-mode-hooks 'text-mode-hook 'news-reply-mode-hook))
134 134
135(defvar news-reply-yank-from "" 135(defvar news-reply-yank-from ""
136 "Save `From:' field for `news-reply-yank-original'.") 136 "Save `From:' field for `news-reply-yank-original'.")
diff --git a/lisp/outline.el b/lisp/outline.el
index 89e9e193e9c..b807365f733 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1,6 +1,6 @@
1;;; outline.el --- outline mode commands for Emacs 1;;; outline.el --- outline mode commands for Emacs
2 2
3;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004 3;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -167,14 +167,45 @@ in the file it applies to."
167 0 '(outline-font-lock-face) nil t))) 167 0 '(outline-font-lock-face) nil t)))
168 "Additional expressions to highlight in Outline mode.") 168 "Additional expressions to highlight in Outline mode.")
169 169
170(defface outline-1 '((t :inherit font-lock-function-name-face)) "Level 1.") 170(defface outline-1
171(defface outline-2 '((t :inherit font-lock-variable-name-face)) "Level 2.") 171 '((t :inherit font-lock-function-name-face))
172(defface outline-3 '((t :inherit font-lock-keyword-face)) "Level 3.") 172 "Level 1."
173(defface outline-4 '((t :inherit font-lock-builtin-face)) "Level 4.") 173 :group 'outlines)
174(defface outline-5 '((t :inherit font-lock-comment-face)) "Level 5.") 174
175(defface outline-6 '((t :inherit font-lock-constant-face)) "Level 6.") 175(defface outline-2
176(defface outline-7 '((t :inherit font-lock-type-face)) "Level 7.") 176 '((t :inherit font-lock-variable-name-face))
177(defface outline-8 '((t :inherit font-lock-string-face)) "Level 8.") 177 "Level 2."
178 :group 'outlines)
179
180(defface outline-3
181 '((t :inherit font-lock-keyword-face))
182 "Level 3."
183 :group 'outlines)
184
185(defface outline-4
186 '((t :inherit font-lock-builtin-face))
187 "Level 4."
188 :group 'outlines)
189
190(defface outline-5
191 '((t :inherit font-lock-comment-face))
192 "Level 5."
193 :group 'outlines)
194
195(defface outline-6
196 '((t :inherit font-lock-constant-face))
197 "Level 6."
198 :group 'outlines)
199
200(defface outline-7
201 '((t :inherit font-lock-type-face))
202 "Level 7."
203 :group 'outlines)
204
205(defface outline-8
206 '((t :inherit font-lock-string-face))
207 "Level 8."
208 :group 'outlines)
178 209
179(defvar outline-font-lock-faces 210(defvar outline-font-lock-faces
180 [outline-1 outline-2 outline-3 outline-4 211 [outline-1 outline-2 outline-3 outline-4
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el
index a7860244a8a..f012f132352 100644
--- a/lisp/play/5x5.el
+++ b/lisp/play/5x5.el
@@ -178,10 +178,10 @@ The key bindings for 5x5-mode are:
178 (use-local-map 5x5-mode-map) 178 (use-local-map 5x5-mode-map)
179 (setq major-mode '5x5-mode 179 (setq major-mode '5x5-mode
180 mode-name "5x5") 180 mode-name "5x5")
181 (run-hooks '5x5-mode-hook) 181 (run-mode-hooks '5x5-mode-hook)
182 (setq buffer-read-only t 182 (setq buffer-read-only t
183 truncate-lines t) 183 truncate-lines t)
184 (buffer-disable-undo (current-buffer))) 184 (buffer-disable-undo))
185 185
186;;;###autoload 186;;;###autoload
187(defun 5x5 (&optional size) 187(defun 5x5 (&optional size)
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el
index f314a10a9e2..9ef8d0fd01f 100644
--- a/lisp/play/decipher.el
+++ b/lisp/play/decipher.el
@@ -314,7 +314,7 @@ The most useful commands are:
314 (lambda () (setq buffer-read-only nil 314 (lambda () (setq buffer-read-only nil
315 buffer-undo-list nil)) 315 buffer-undo-list nil))
316 nil t) 316 nil t)
317 (run-hooks 'decipher-mode-hook) 317 (run-mode-hooks 'decipher-mode-hook)
318 (setq buffer-read-only t)) 318 (setq buffer-read-only t))
319(put 'decipher-mode 'mode-class 'special) 319(put 'decipher-mode 'mode-class 'special)
320 320
@@ -998,7 +998,7 @@ Creates the statistics buffer if it doesn't exist."
998 major-mode 'decipher-stats-mode 998 major-mode 'decipher-stats-mode
999 mode-name "Decipher-Stats") 999 mode-name "Decipher-Stats")
1000 (use-local-map decipher-stats-mode-map) 1000 (use-local-map decipher-stats-mode-map)
1001 (run-hooks 'decipher-stats-mode-hook)) 1001 (run-mode-hooks 'decipher-stats-mode-hook))
1002(put 'decipher-stats-mode 'mode-class 'special) 1002(put 'decipher-stats-mode 'mode-class 'special)
1003 1003
1004;;-------------------------------------------------------------------- 1004;;--------------------------------------------------------------------
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index b640c1bbbd8..69ec07496d5 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -206,7 +206,7 @@ is non-nil."
206 (make-local-variable 'font-lock-defaults) 206 (make-local-variable 'font-lock-defaults)
207 (setq font-lock-defaults '(gomoku-font-lock-keywords t)) 207 (setq font-lock-defaults '(gomoku-font-lock-keywords t))
208 (toggle-read-only t) 208 (toggle-read-only t)
209 (run-hooks 'gomoku-mode-hook)) 209 (run-mode-hooks 'gomoku-mode-hook))
210 210
211;;; 211;;;
212;;; THE BOARD. 212;;; THE BOARD.
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el
index 87ebd88fd58..3dc5e8ad320 100644
--- a/lisp/play/landmark.el
+++ b/lisp/play/landmark.el
@@ -248,6 +248,7 @@ Other useful commands:
248Entry to this mode calls the value of `lm-mode-hook' if that value 248Entry to this mode calls the value of `lm-mode-hook' if that value
249is non-nil. One interesting value is `turn-on-font-lock'." 249is non-nil. One interesting value is `turn-on-font-lock'."
250 (interactive) 250 (interactive)
251 (kill-all-local-variables)
251 (setq major-mode 'lm-mode 252 (setq major-mode 'lm-mode
252 mode-name "Lm") 253 mode-name "Lm")
253 (lm-display-statistics) 254 (lm-display-statistics)
@@ -255,7 +256,7 @@ is non-nil. One interesting value is `turn-on-font-lock'."
255 (make-local-variable 'font-lock-defaults) 256 (make-local-variable 'font-lock-defaults)
256 (setq font-lock-defaults '(lm-font-lock-keywords t)) 257 (setq font-lock-defaults '(lm-font-lock-keywords t))
257 (toggle-read-only t) 258 (toggle-read-only t)
258 (run-hooks 'lm-mode-hook)) 259 (run-mode-hooks 'lm-mode-hook))
259 260
260 261
261;;;_ + THE SCORE TABLE. 262;;;_ + THE SCORE TABLE.
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el
index a637a2e98d1..849e87a28b0 100644
--- a/lisp/play/mpuz.el
+++ b/lisp/play/mpuz.el
@@ -129,11 +129,12 @@ To leave the game to do other editing work, just switch buffers.
129Then you may resume the game with M-x mpuz. 129Then you may resume the game with M-x mpuz.
130You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." 130You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
131 (interactive) 131 (interactive)
132 (kill-all-local-variables)
132 (setq major-mode 'mpuz-mode 133 (setq major-mode 'mpuz-mode
133 mode-name "Mult Puzzle" 134 mode-name "Mult Puzzle"
134 tab-width 30) 135 tab-width 30)
135 (use-local-map mpuz-mode-map) 136 (use-local-map mpuz-mode-map)
136 (run-hooks 'mpuz-mode-hook)) 137 (run-mode-hooks 'mpuz-mode-hook))
137 138
138 139
139;; Some variables for statistics 140;; Some variables for statistics
diff --git a/lisp/play/snake.el b/lisp/play/snake.el
index 71c460feae5..e676d734755 100644
--- a/lisp/play/snake.el
+++ b/lisp/play/snake.el
@@ -385,7 +385,7 @@ Snake mode keybindings:
385 385
386 (gamegrid-init (snake-display-options)) 386 (gamegrid-init (snake-display-options))
387 387
388 (run-hooks 'snake-mode-hook)) 388 (run-mode-hooks 'snake-mode-hook))
389 389
390;;;###autoload 390;;;###autoload
391(defun snake () 391(defun snake ()
diff --git a/lisp/play/solitaire.el b/lisp/play/solitaire.el
index 1dc57b61c65..22dcea47599 100644
--- a/lisp/play/solitaire.el
+++ b/lisp/play/solitaire.el
@@ -105,7 +105,7 @@ The usual mnemonic keys move the cursor around the board; in addition,
105 (setq truncate-lines t) 105 (setq truncate-lines t)
106 (setq major-mode 'solitaire-mode) 106 (setq major-mode 'solitaire-mode)
107 (setq mode-name "Solitaire") 107 (setq mode-name "Solitaire")
108 (run-hooks 'solitaire-mode-hook)) 108 (run-mode-hooks 'solitaire-mode-hook))
109 109
110(defvar solitaire-stones 0 110(defvar solitaire-stones 0
111 "Counter for the stones that are still there.") 111 "Counter for the stones that are still there.")
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index 045534c2cea..5b8746bb1d7 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -616,7 +616,7 @@ tetris-mode keybindings:
616 616
617 (gamegrid-init (tetris-display-options)) 617 (gamegrid-init (tetris-display-options))
618 618
619 (run-hooks 'tetris-mode-hook)) 619 (run-mode-hooks 'tetris-mode-hook))
620 620
621;;;###autoload 621;;;###autoload
622(defun tetris () 622(defun tetris ()
diff --git a/lisp/printing.el b/lisp/printing.el
index b70c55b3f98..ddfe6fd5cc0 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5466,7 +5466,7 @@ non-nil."
5466 (str (pr-f-read-string (format fmt-prompt prompt mess) "1" nil "1")) 5466 (str (pr-f-read-string (format fmt-prompt prompt mess) "1" nil "1"))
5467 int) 5467 int)
5468 (while (if (string-match "^\\s *[0-9]+$" str) 5468 (while (if (string-match "^\\s *[0-9]+$" str)
5469 (setq int (string-to-int str) 5469 (setq int (string-to-number str)
5470 prompt (cond ((< int 1) "Integer below 1; ") 5470 prompt (cond ((< int 1) "Integer below 1; ")
5471 ((> int 100) "Integer above 100; ") 5471 ((> int 100) "Integer above 100; ")
5472 (t nil))) 5472 (t nil)))
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index d31978b5ec9..bc0edb1f047 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -1369,7 +1369,7 @@ If you use ada-xref.el:
1369 (min ada-indent (current-column)))))) 1369 (min ada-indent (current-column))))))
1370 (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t) 1370 (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t)
1371 1371
1372 (run-hooks 'ada-mode-hook) 1372 (run-mode-hooks 'ada-mode-hook)
1373 1373
1374 ;; To be run after the hook, in case the user modified 1374 ;; To be run after the hook, in case the user modified
1375 ;; ada-fill-comment-prefix 1375 ;; ada-fill-comment-prefix
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 03587577f59..bdf376bfab7 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -2624,7 +2624,7 @@ the default language."
2624 (imenu-add-to-menubar 2624 (imenu-add-to-menubar
2625 (if (stringp antlr-imenu-name) antlr-imenu-name "Index"))) 2625 (if (stringp antlr-imenu-name) antlr-imenu-name "Index")))
2626 (antlr-set-tabs) 2626 (antlr-set-tabs)
2627 (run-hooks 'antlr-mode-hook)) 2627 (run-mode-hooks 'antlr-mode-hook))
2628 2628
2629;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in 2629;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in
2630;; XEmacs) could use the following property. The header of the submenu would 2630;; XEmacs) could use the following property. The header of the submenu would
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el
index ec83e33b10d..908b18b070b 100644
--- a/lisp/progmodes/autoconf.el
+++ b/lisp/progmodes/autoconf.el
@@ -103,7 +103,7 @@ searching backwards at another AC_... command."
103 (set (make-local-variable 'indent-line-function) #'indent-relative) 103 (set (make-local-variable 'indent-line-function) #'indent-relative)
104 (set (make-local-variable 'add-log-current-defun-function) 104 (set (make-local-variable 'add-log-current-defun-function)
105 #'autoconf-current-defun-function) 105 #'autoconf-current-defun-function)
106 (run-hooks 'autoconf-mode-hook)) 106 (run-mode-hooks 'autoconf-mode-hook))
107 107
108(provide 'autoconf-mode) 108(provide 'autoconf-mode)
109 109
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index ad43228a100..a27a5282b42 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -231,9 +231,9 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
231 231
232 (makepp 232 (makepp
233 "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ 233 "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\
234`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'\\)" 234`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)"
235 4 5 nil (1 . 2) 3 235 4 5 nil (1 . 2) 3
236 ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil 236 ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil
237 (2 compilation-info-face) 237 (2 compilation-info-face)
238 (3 compilation-line-face nil t) 238 (3 compilation-line-face nil t)
239 (1 (compilation-error-properties 2 3 nil nil nil 0 nil) 239 (1 (compilation-error-properties 2 3 nil nil nil 0 nil)
@@ -935,12 +935,20 @@ Returns the compilation buffer created."
935 (substitute-env-vars (match-string 1 command)) 935 (substitute-env-vars (match-string 1 command))
936 "~") 936 "~")
937 default-directory)) 937 default-directory))
938 ;; Select the desired mode.
939 (if (not (eq mode t))
940 (funcall mode)
941 (setq buffer-read-only nil)
942 (with-no-warnings (comint-mode))
943 (compilation-shell-minor-mode))
944 (if highlight-regexp
945 (set (make-local-variable 'compilation-highlight-regexp)
946 highlight-regexp))
938 (erase-buffer) 947 (erase-buffer)
939 ;; output a mode setter, for saving and later reloading this buffer 948 ;; Output a mode setter, for saving and later reloading this buffer.
940 (insert "-*- mode: " name-of-mode 949 (insert "-*- mode: " name-of-mode
941 "; default-directory: " (prin1-to-string default-directory) 950 "; default-directory: " (prin1-to-string default-directory)
942 " -*-\n" command "\n") 951 " -*-\n" command "\n") (setq thisdir default-directory))
943 (setq thisdir default-directory))
944 (set-buffer-modified-p nil)) 952 (set-buffer-modified-p nil))
945 ;; If we're already in the compilation buffer, go to the end 953 ;; If we're already in the compilation buffer, go to the end
946 ;; of the buffer, so point will track the compilation output. 954 ;; of the buffer, so point will track the compilation output.
@@ -963,14 +971,6 @@ Returns the compilation buffer created."
963 ;; don't override users' setting of $EMACS. 971 ;; don't override users' setting of $EMACS.
964 (unless (getenv "EMACS") '("EMACS=t")) 972 (unless (getenv "EMACS") '("EMACS=t"))
965 (copy-sequence process-environment)))) 973 (copy-sequence process-environment))))
966 (if (not (eq mode t))
967 (funcall mode)
968 (setq buffer-read-only nil)
969 (with-no-warnings (comint-mode))
970 (compilation-shell-minor-mode))
971 (if highlight-regexp
972 (set (make-local-variable 'compilation-highlight-regexp)
973 highlight-regexp))
974 (set (make-local-variable 'compilation-arguments) 974 (set (make-local-variable 'compilation-arguments)
975 (list command mode name-function highlight-regexp)) 975 (list command mode name-function highlight-regexp))
976 (set (make-local-variable 'revert-buffer-function) 976 (set (make-local-variable 'revert-buffer-function)
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index b52e004e5bb..0a89091165c 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -641,7 +641,7 @@ There is some minimal font-lock support (see vars
641 (setq mode-name "DCL") 641 (setq mode-name "DCL")
642 (use-local-map dcl-mode-map) 642 (use-local-map dcl-mode-map)
643 (tempo-use-tag-list 'dcl-tempo-tags) 643 (tempo-use-tag-list 'dcl-tempo-tags)
644 (run-hooks 'dcl-mode-hook)) 644 (run-mode-hooks 'dcl-mode-hook))
645 645
646 646
647;;; *** Movement commands *************************************************** 647;;; *** Movement commands ***************************************************
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 8d3ee554026..3d86f15c175 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -2002,7 +2002,7 @@ no args, if that value is non-nil."
2002 (delphi-parse-region (point-min) (point-max)) 2002 (delphi-parse-region (point-min) (point-max))
2003 (delphi-progress-done)))) 2003 (delphi-progress-done))))
2004 2004
2005 (run-hooks 'delphi-mode-hook)) 2005 (run-mode-hooks 'delphi-mode-hook))
2006 2006
2007;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41 2007;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41
2008;;; delphi.el ends here 2008;;; delphi.el ends here
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 6dd15897e7b..953ecd79f7f 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -1162,7 +1162,7 @@ Tree mode key bindings:
1162 (when tree 1162 (when tree
1163 (ebrowse-redraw-tree) 1163 (ebrowse-redraw-tree)
1164 (set-buffer-modified-p nil)) 1164 (set-buffer-modified-p nil))
1165 (run-hooks 'ebrowse-tree-mode-hook))) 1165 (run-mode-hooks 'ebrowse-tree-mode-hook)))
1166 1166
1167 1167
1168 1168
@@ -2026,7 +2026,7 @@ COLLAPSE non-nil means collapse the branch."
2026 truncate-lines t 2026 truncate-lines t
2027 buffer-read-only t 2027 buffer-read-only t
2028 major-mode 'ebrowse-electric-list-mode) 2028 major-mode 'ebrowse-electric-list-mode)
2029 (run-hooks 'ebrowse-electric-list-mode-hook)) 2029 (run-mode-hooks 'ebrowse-electric-list-mode-hook))
2030 2030
2031 2031
2032(defun ebrowse-list-tree-buffers () 2032(defun ebrowse-list-tree-buffers ()
@@ -2277,7 +2277,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
2277 ebrowse--const-display-flag nil 2277 ebrowse--const-display-flag nil
2278 ebrowse--pure-display-flag nil) 2278 ebrowse--pure-display-flag nil)
2279 (modify-syntax-entry ?_ (char-to-string (char-syntax ?a))) 2279 (modify-syntax-entry ?_ (char-to-string (char-syntax ?a)))
2280 (run-hooks 'ebrowse-member-mode-hook)) 2280 (run-mode-hooks 'ebrowse-member-mode-hook))
2281 2281
2282 2282
2283 2283
@@ -3987,7 +3987,7 @@ Runs the hook `ebrowse-electric-position-mode-hook'."
3987 truncate-lines t 3987 truncate-lines t
3988 buffer-read-only t 3988 buffer-read-only t
3989 major-mode 'ebrowse-electric-position-mode) 3989 major-mode 'ebrowse-electric-position-mode)
3990 (run-hooks 'ebrowse-electric-position-mode-hook)) 3990 (run-mode-hooks 'ebrowse-electric-position-mode-hook))
3991 3991
3992 3992
3993(defun ebrowse-draw-position-buffer () 3993(defun ebrowse-draw-position-buffer ()
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index eb6db05c159..6eb39051984 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -830,7 +830,7 @@ with no args, if that value is non-nil."
830 (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram) 830 (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram)
831 (set (make-local-variable 'add-log-current-defun-function) 831 (set (make-local-variable 'add-log-current-defun-function)
832 #'f90-current-defun) 832 #'f90-current-defun)
833 (run-hooks 'f90-mode-hook)) 833 (run-mode-hooks 'f90-mode-hook))
834 834
835 835
836;; Inline-functions. 836;; Inline-functions.
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 30e1977d28d..458a4c8de2b 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -799,7 +799,7 @@ with no args, if that value is non-nil."
799 #'fortran-current-defun) 799 #'fortran-current-defun)
800 (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search) 800 (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search)
801 (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr) 801 (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr)
802 (run-hooks 'fortran-mode-hook)) 802 (run-mode-hooks 'fortran-mode-hook))
803 803
804 804
805(defun fortran-gud-find-expr () 805(defun fortran-gud-find-expr ()
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 1a26b64beca..7e2022cc11c 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -66,15 +66,16 @@
66 66
67(require 'gud) 67(require 'gud)
68 68
69(defvar gdb-current-address "main" "Initialisation for Assembler buffer.") 69(defvar gdb-frame-address "main" "Initialisation for Assembler buffer.")
70(defvar gdb-previous-address nil) 70(defvar gdb-previous-frame-address nil)
71(defvar gdb-memory-address "main") 71(defvar gdb-memory-address "main")
72(defvar gdb-previous-frame nil) 72(defvar gdb-previous-frame nil)
73(defvar gdb-current-frame nil) 73(defvar gdb-selected-frame nil)
74(defvar gdb-current-stack-level nil) 74(defvar gdb-frame-number nil)
75(defvar gdb-current-language nil) 75(defvar gdb-current-language nil)
76(defvar gdb-var-list nil "List of variables in watch window.") 76(defvar gdb-var-list nil "List of variables in watch window.")
77(defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") 77(defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.")
78(defvar gdb-main-file nil "Source file from which program execution begins.")
78(defvar gdb-buffer-type nil) 79(defvar gdb-buffer-type nil)
79(defvar gdb-overlay-arrow-position nil) 80(defvar gdb-overlay-arrow-position nil)
80(defvar gdb-server-prefix nil) 81(defvar gdb-server-prefix nil)
@@ -211,11 +212,18 @@ predefined macros."
211 :version "22.1") 212 :version "22.1")
212 213
213(defcustom gdb-cpp-define-alist-flags "" 214(defcustom gdb-cpp-define-alist-flags ""
214 "*Preprocessor flags for `gdb-cpp-define-alist-program'." 215 "Preprocessor flags for `gdb-cpp-define-alist-program'."
215 :type 'string 216 :type 'string
216 :group 'gud 217 :group 'gud
217 :version "22.1") 218 :version "22.1")
218 219
220(defcustom gdb-show-main nil
221 "Non-nil means display source file containing the main routine at startup.
222Also display the main routine in the disassembly buffer if present."
223 :type 'boolean
224 :group 'gud
225 :version "22.1")
226
219(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") 227(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
220 228
221(defun gdb-create-define-alist () 229(defun gdb-create-define-alist ()
@@ -269,7 +277,7 @@ predefined macros."
269(defun gdb-set-gud-minor-mode-1 (buffer) 277(defun gdb-set-gud-minor-mode-1 (buffer)
270 (goto-char (point-min)) 278 (goto-char (point-min))
271 (when (and (search-forward "Located in " nil t) 279 (when (and (search-forward "Located in " nil t)
272 (looking-at "\\S-*") 280 (looking-at "\\S-+")
273 (string-equal (buffer-file-name buffer) 281 (string-equal (buffer-file-name buffer)
274 (match-string 0))) 282 (match-string 0)))
275 (with-current-buffer buffer 283 (with-current-buffer buffer
@@ -295,7 +303,7 @@ predefined macros."
295 (set (make-local-variable 'gud-minor-mode) 'gdba) 303 (set (make-local-variable 'gud-minor-mode) 'gdba)
296 (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) 304 (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
297 ;; 305 ;;
298 (gud-def gud-break (if (not (string-equal mode-name "Machine")) 306 (gud-def gud-break (if (not (string-match "Machine" mode-name))
299 (gud-call "break %f:%l" arg) 307 (gud-call "break %f:%l" arg)
300 (save-excursion 308 (save-excursion
301 (beginning-of-line) 309 (beginning-of-line)
@@ -303,7 +311,7 @@ predefined macros."
303 (gud-call "break *%a" arg))) 311 (gud-call "break *%a" arg)))
304 "\C-b" "Set breakpoint at current line or address.") 312 "\C-b" "Set breakpoint at current line or address.")
305 ;; 313 ;;
306 (gud-def gud-remove (if (not (string-equal mode-name "Machine")) 314 (gud-def gud-remove (if (not (string-match "Machine" mode-name))
307 (gud-call "clear %f:%l" arg) 315 (gud-call "clear %f:%l" arg)
308 (save-excursion 316 (save-excursion
309 (beginning-of-line) 317 (beginning-of-line)
@@ -311,7 +319,7 @@ predefined macros."
311 (gud-call "clear *%a" arg))) 319 (gud-call "clear *%a" arg)))
312 "\C-d" "Remove breakpoint at current line or address.") 320 "\C-d" "Remove breakpoint at current line or address.")
313 ;; 321 ;;
314 (gud-def gud-until (if (not (string-equal mode-name "Machine")) 322 (gud-def gud-until (if (not (string-match "Machine" mode-name))
315 (gud-call "until %f:%l" arg) 323 (gud-call "until %f:%l" arg)
316 (save-excursion 324 (save-excursion
317 (beginning-of-line) 325 (beginning-of-line)
@@ -332,25 +340,26 @@ predefined macros."
332 (setq comint-input-sender 'gdb-send) 340 (setq comint-input-sender 'gdb-send)
333 ;; 341 ;;
334 ;; (re-)initialize 342 ;; (re-)initialize
335 (setq gdb-current-address "main") 343 (setq gdb-frame-address (if gdb-show-main "main" nil))
336 (setq gdb-previous-address nil) 344 (setq gdb-previous-frame-address nil
337 (setq gdb-memory-address "main") 345 gdb-memory-address "main"
338 (setq gdb-previous-frame nil) 346 gdb-previous-frame nil
339 (setq gdb-current-frame nil) 347 gdb-selected-frame nil
340 (setq gdb-current-stack-level nil) 348 gdb-current-language nil
341 (setq gdb-var-list nil) 349 gdb-frame-number nil
342 (setq gdb-var-changed nil) 350 gdb-var-list nil
343 (setq gdb-first-prompt nil) 351 gdb-var-changed nil
344 (setq gdb-prompting nil) 352 gdb-first-prompt nil
345 (setq gdb-input-queue nil) 353 gdb-prompting nil
346 (setq gdb-current-item nil) 354 gdb-input-queue nil
347 (setq gdb-pending-triggers nil) 355 gdb-current-item nil
348 (setq gdb-output-sink 'user) 356 gdb-pending-triggers nil
349 (setq gdb-server-prefix "server ") 357 gdb-output-sink 'user
350 (setq gdb-flush-pending-output nil) 358 gdb-server-prefix "server "
351 (setq gdb-location-alist nil) 359 gdb-flush-pending-output nil
352 (setq gdb-find-file-unhook nil) 360 gdb-location-alist nil
353 (setq gdb-macro-info nil) 361 gdb-find-file-unhook nil
362 gdb-macro-info nil)
354 ;; 363 ;;
355 (setq gdb-buffer-type 'gdba) 364 (setq gdb-buffer-type 'gdba)
356 ;; 365 ;;
@@ -380,8 +389,8 @@ predefined macros."
380 (require 'tooltip) 389 (require 'tooltip)
381 (let ((expr (tooltip-identifier-from-point (point)))) 390 (let ((expr (tooltip-identifier-from-point (point))))
382 (if (and (string-equal gdb-current-language "c") 391 (if (and (string-equal gdb-current-language "c")
383 gdb-use-colon-colon-notation gdb-current-frame) 392 gdb-use-colon-colon-notation gdb-selected-frame)
384 (setq expr (concat gdb-current-frame "::" expr))) 393 (setq expr (concat gdb-selected-frame "::" expr)))
385 (catch 'already-watched 394 (catch 'already-watched
386 (dolist (var gdb-var-list) 395 (dolist (var gdb-var-list)
387 (if (string-equal expr (car var)) (throw 'already-watched nil))) 396 (if (string-equal expr (car var)) (throw 'already-watched nil)))
@@ -862,7 +871,7 @@ This filter may simply queue input for a later time."
862 (setq gdb-prompting t)) 871 (setq gdb-prompting t))
863 872
864(defconst gdb-source-spec-regexp 873(defconst gdb-source-spec-regexp
865 "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)") 874 "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:0x0*\\([a-f0-9]*\\)")
866 875
867;; Do not use this except as an annotation handler. 876;; Do not use this except as an annotation handler.
868(defun gdb-source (args) 877(defun gdb-source (args)
@@ -872,7 +881,7 @@ This filter may simply queue input for a later time."
872 (cons 881 (cons
873 (match-string 1 args) 882 (match-string 1 args)
874 (string-to-number (match-string 2 args)))) 883 (string-to-number (match-string 2 args))))
875 (setq gdb-current-address (match-string 3 args)) 884 (setq gdb-frame-address (match-string 3 args))
876 ;; cover for auto-display output which comes *before* 885 ;; cover for auto-display output which comes *before*
877 ;; stopped annotation 886 ;; stopped annotation
878 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) 887 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user)))
@@ -985,10 +994,12 @@ sink to `user' in `gdb-stopping', that is fine."
985This begins the collection of output from the current command if that 994This begins the collection of output from the current command if that
986happens to be appropriate." 995happens to be appropriate."
987 (unless gdb-pending-triggers 996 (unless gdb-pending-triggers
988 (gdb-get-current-frame) 997 (gdb-get-selected-frame)
989 (gdb-invalidate-frames) 998 (gdb-invalidate-frames)
990 (gdb-invalidate-breakpoints) 999 (gdb-invalidate-breakpoints)
991 (gdb-invalidate-assembler) 1000 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler
1001 ;; so gdb-frame-address is updated.
1002 ;; (gdb-invalidate-assembler)
992 (gdb-invalidate-registers) 1003 (gdb-invalidate-registers)
993 (gdb-invalidate-memory) 1004 (gdb-invalidate-memory)
994 (gdb-invalidate-locals) 1005 (gdb-invalidate-locals)
@@ -1150,12 +1161,12 @@ happens to be appropriate."
1150 (let ((buf (gdb-get-buffer ',buf-key))) 1161 (let ((buf (gdb-get-buffer ',buf-key)))
1151 (and buf 1162 (and buf
1152 (with-current-buffer buf 1163 (with-current-buffer buf
1153 (let ((p (point)) 1164 (let ((p (window-point (get-buffer-window buf 0)))
1154 (buffer-read-only nil)) 1165 (buffer-read-only nil))
1155 (erase-buffer) 1166 (erase-buffer)
1156 (insert-buffer-substring (gdb-get-create-buffer 1167 (insert-buffer-substring (gdb-get-create-buffer
1157 'gdb-partial-output-buffer)) 1168 'gdb-partial-output-buffer))
1158 (goto-char p))))) 1169 (set-window-point (get-buffer-window buf 0) p)))))
1159 ;; put customisation here 1170 ;; put customisation here
1160 (,custom-defun))) 1171 (,custom-defun)))
1161 1172
@@ -1293,7 +1304,7 @@ static char *magick[] = {
1293 (goto-char (point-min)) 1304 (goto-char (point-min))
1294 (while (< (point) (- (point-max) 1)) 1305 (while (< (point) (- (point-max) 1))
1295 (forward-line 1) 1306 (forward-line 1)
1296 (if (looking-at "[^\t].*breakpoint") 1307 (if (looking-at "[^\t].*?breakpoint")
1297 (progn 1308 (progn
1298 (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)") 1309 (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)")
1299 (setq bptno (match-string 1)) 1310 (setq bptno (match-string 1))
@@ -1435,9 +1446,9 @@ static char *magick[] = {
1435 (save-excursion 1446 (save-excursion
1436 (beginning-of-line 1) 1447 (beginning-of-line 1)
1437 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1448 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1438 (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") 1449 (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)\\s-+")
1439 (looking-at 1450 (looking-at
1440 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+")) 1451 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+\\S-+\\s-+\\S-+:[0-9]+"))
1441 (gdb-enqueue-input 1452 (gdb-enqueue-input
1442 (list 1453 (list
1443 (concat gdb-server-prefix 1454 (concat gdb-server-prefix
@@ -1452,9 +1463,9 @@ static char *magick[] = {
1452 (interactive) 1463 (interactive)
1453 (beginning-of-line 1) 1464 (beginning-of-line 1)
1454 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1465 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1455 (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") 1466 (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)")
1456 (looking-at 1467 (looking-at
1457 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+")) 1468 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+"))
1458 (gdb-enqueue-input 1469 (gdb-enqueue-input
1459 (list 1470 (list
1460 (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) 1471 (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore))
@@ -1467,10 +1478,10 @@ static char *magick[] = {
1467 (save-excursion 1478 (save-excursion
1468 (beginning-of-line 1) 1479 (beginning-of-line 1)
1469 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1480 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1470 (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)") 1481 (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)")
1471 (looking-at 1482 (looking-at
1472 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\ 1483 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\
1473\\(\\S-*\\):\\([0-9]+\\)")) 1484\\(\\S-+\\):\\([0-9]+\\)"))
1474 (let ((bptno (match-string 1)) 1485 (let ((bptno (match-string 1))
1475 (file (match-string 2)) 1486 (file (match-string 2))
1476 (line (match-string 3))) 1487 (line (match-string 3)))
@@ -1511,7 +1522,7 @@ static char *magick[] = {
1511 help-echo "mouse-2, RET: Select frame")) 1522 help-echo "mouse-2, RET: Select frame"))
1512 (beginning-of-line) 1523 (beginning-of-line)
1513 (when (and (looking-at "^#\\([0-9]+\\)") 1524 (when (and (looking-at "^#\\([0-9]+\\)")
1514 (equal (match-string 1) gdb-current-stack-level)) 1525 (equal (match-string 1) gdb-frame-number))
1515 (put-text-property (line-beginning-position) (line-end-position) 1526 (put-text-property (line-beginning-position) (line-end-position)
1516 'face '(:inverse-video t))) 1527 'face '(:inverse-video t)))
1517 (forward-line 1)))))) 1528 (forward-line 1))))))
@@ -1648,13 +1659,20 @@ static char *magick[] = {
1648 1659
1649;; Registers buffer. 1660;; Registers buffer.
1650;; 1661;;
1662(defcustom gdb-all-registers nil
1663 "Non-nil means include floating-point registers."
1664 :type 'boolean
1665 :group 'gud
1666 :version "22.1")
1667
1651(gdb-set-buffer-rules 'gdb-registers-buffer 1668(gdb-set-buffer-rules 'gdb-registers-buffer
1652 'gdb-registers-buffer-name 1669 'gdb-registers-buffer-name
1653 'gdb-registers-mode) 1670 'gdb-registers-mode)
1654 1671
1655(def-gdb-auto-updated-buffer gdb-registers-buffer 1672(def-gdb-auto-updated-buffer gdb-registers-buffer
1656 gdb-invalidate-registers 1673 gdb-invalidate-registers
1657 (concat gdb-server-prefix "info registers\n") 1674 (concat
1675 gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n")
1658 gdb-info-registers-handler 1676 gdb-info-registers-handler
1659 gdb-info-registers-custom) 1677 gdb-info-registers-custom)
1660 1678
@@ -1663,6 +1681,7 @@ static char *magick[] = {
1663(defvar gdb-registers-mode-map 1681(defvar gdb-registers-mode-map
1664 (let ((map (make-sparse-keymap))) 1682 (let ((map (make-sparse-keymap)))
1665 (suppress-keymap map) 1683 (suppress-keymap map)
1684 (define-key map " " 'toggle-gdb-all-registers)
1666 (define-key map "q" 'kill-this-buffer) 1685 (define-key map "q" 'kill-this-buffer)
1667 map)) 1686 map))
1668 1687
@@ -1672,7 +1691,7 @@ static char *magick[] = {
1672\\{gdb-registers-mode-map}" 1691\\{gdb-registers-mode-map}"
1673 (kill-all-local-variables) 1692 (kill-all-local-variables)
1674 (setq major-mode 'gdb-registers-mode) 1693 (setq major-mode 'gdb-registers-mode)
1675 (setq mode-name "Registers") 1694 (setq mode-name "Registers:")
1676 (setq buffer-read-only t) 1695 (setq buffer-read-only t)
1677 (use-local-map gdb-registers-mode-map) 1696 (use-local-map gdb-registers-mode-map)
1678 (run-mode-hooks 'gdb-registers-mode-hook) 1697 (run-mode-hooks 'gdb-registers-mode-hook)
@@ -1695,6 +1714,20 @@ static char *magick[] = {
1695 (special-display-frame-alist gdb-frame-parameters)) 1714 (special-display-frame-alist gdb-frame-parameters))
1696 (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer)))) 1715 (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer))))
1697 1716
1717(defun toggle-gdb-all-registers ()
1718 "Toggle the display of floating-point registers."
1719 (interactive)
1720 (if gdb-all-registers
1721 (progn
1722 (setq gdb-all-registers nil)
1723 (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
1724 (setq mode-name "Registers:")))
1725 (setq gdb-all-registers t)
1726 (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
1727 (setq mode-name "Registers:All")))
1728 (gdb-invalidate-registers))
1729
1730
1698;; Memory buffer. 1731;; Memory buffer.
1699;; 1732;;
1700(defcustom gdb-memory-repeat-count 32 1733(defcustom gdb-memory-repeat-count 32
@@ -1733,7 +1766,11 @@ static char *magick[] = {
1733 gdb-read-memory-handler 1766 gdb-read-memory-handler
1734 gdb-read-memory-custom) 1767 gdb-read-memory-custom)
1735 1768
1736(defun gdb-read-memory-custom ()) 1769(defun gdb-read-memory-custom ()
1770 (save-excursion
1771 (goto-char (point-min))
1772 (if (looking-at "0x[[:xdigit:]]+")
1773 (setq gdb-memory-address (match-string 0)))))
1737 1774
1738(defvar gdb-memory-mode-map 1775(defvar gdb-memory-mode-map
1739 (let ((map (make-sparse-keymap))) 1776 (let ((map (make-sparse-keymap)))
@@ -1757,8 +1794,8 @@ static char *magick[] = {
1757 (select-window (posn-window (event-start event))) 1794 (select-window (posn-window (event-start event)))
1758 (let* ((arg (read-from-minibuffer "Repeat count: ")) 1795 (let* ((arg (read-from-minibuffer "Repeat count: "))
1759 (count (string-to-number arg))) 1796 (count (string-to-number arg)))
1760 (if (< count 0) 1797 (if (<= count 0)
1761 (error "Non-negative numbers only") 1798 (error "Positive numbers only")
1762 (customize-set-variable 'gdb-memory-repeat-count count) 1799 (customize-set-variable 'gdb-memory-repeat-count count)
1763 (gdb-invalidate-memory))))) 1800 (gdb-invalidate-memory)))))
1764 1801
@@ -1911,10 +1948,42 @@ corresponding to the mode line clicked."
1911 (setq header-line-format 1948 (setq header-line-format
1912 '(:eval 1949 '(:eval
1913 (concat 1950 (concat
1914 "Read address: " 1951 "Read address["
1952 (propertize
1953 "-"
1954 'face font-lock-warning-face
1955 'help-echo "mouse-1: Decrement address"
1956 'mouse-face 'mode-line-highlight
1957 'local-map
1958 (gdb-make-header-line-mouse-map
1959 'mouse-1
1960 #'(lambda () (interactive)
1961 (let ((gdb-memory-address
1962 ;; let GDB do the arithmetic
1963 (concat
1964 gdb-memory-address " - "
1965 (number-to-string
1966 (* gdb-memory-repeat-count
1967 (cond ((string= gdb-memory-unit "b") 1)
1968 ((string= gdb-memory-unit "h") 2)
1969 ((string= gdb-memory-unit "w") 4)
1970 ((string= gdb-memory-unit "g") 8)))))))
1971 (gdb-invalidate-memory)))))
1972 "|"
1973 (propertize "+"
1974 'face font-lock-warning-face
1975 'help-echo "mouse-1: Increment address"
1976 'mouse-face 'mode-line-highlight
1977 'local-map (gdb-make-header-line-mouse-map
1978 'mouse-1
1979 #'(lambda () (interactive)
1980 (let ((gdb-memory-address nil))
1981 (gdb-invalidate-memory)))))
1982 "]: "
1915 (propertize gdb-memory-address 1983 (propertize gdb-memory-address
1916 'face font-lock-warning-face 1984 'face font-lock-warning-face
1917 'help-echo "mouse-1: Set memory address" 1985 'help-echo "mouse-1: Set memory address"
1986 'mouse-face 'mode-line-highlight
1918 'local-map (gdb-make-header-line-mouse-map 1987 'local-map (gdb-make-header-line-mouse-map
1919 'mouse-1 1988 'mouse-1
1920 #'gdb-memory-set-address)) 1989 #'gdb-memory-set-address))
@@ -1922,6 +1991,7 @@ corresponding to the mode line clicked."
1922 (propertize (number-to-string gdb-memory-repeat-count) 1991 (propertize (number-to-string gdb-memory-repeat-count)
1923 'face font-lock-warning-face 1992 'face font-lock-warning-face
1924 'help-echo "mouse-1: Set repeat count" 1993 'help-echo "mouse-1: Set repeat count"
1994 'mouse-face 'mode-line-highlight
1925 'local-map (gdb-make-header-line-mouse-map 1995 'local-map (gdb-make-header-line-mouse-map
1926 'mouse-1 1996 'mouse-1
1927 #'gdb-memory-set-repeat-count)) 1997 #'gdb-memory-set-repeat-count))
@@ -1929,11 +1999,13 @@ corresponding to the mode line clicked."
1929 (propertize gdb-memory-format 1999 (propertize gdb-memory-format
1930 'face font-lock-warning-face 2000 'face font-lock-warning-face
1931 'help-echo "mouse-3: Select display format" 2001 'help-echo "mouse-3: Select display format"
2002 'mouse-face 'mode-line-highlight
1932 'local-map gdb-memory-format-keymap) 2003 'local-map gdb-memory-format-keymap)
1933 " Unit Size: " 2004 " Unit Size: "
1934 (propertize gdb-memory-unit 2005 (propertize gdb-memory-unit
1935 'face font-lock-warning-face 2006 'face font-lock-warning-face
1936 'help-echo "mouse-3: Select unit size" 2007 'help-echo "mouse-3: Select unit size"
2008 'mouse-face 'mode-line-highlight
1937 'local-map gdb-memory-unit-keymap)))) 2009 'local-map gdb-memory-unit-keymap))))
1938 (run-mode-hooks 'gdb-memory-mode-hook) 2010 (run-mode-hooks 'gdb-memory-mode-hook)
1939 'gdb-invalidate-memory) 2011 'gdb-invalidate-memory)
@@ -1986,12 +2058,12 @@ corresponding to the mode line clicked."
1986 (replace-match " (array);\n" nil nil)))) 2058 (replace-match " (array);\n" nil nil))))
1987 (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) 2059 (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
1988 (and buf (with-current-buffer buf 2060 (and buf (with-current-buffer buf
1989 (let ((p (point)) 2061 (let ((p (window-point (get-buffer-window buf 0)))
1990 (buffer-read-only nil)) 2062 (buffer-read-only nil))
1991 (delete-region (point-min) (point-max)) 2063 (erase-buffer)
1992 (insert-buffer-substring (gdb-get-create-buffer 2064 (insert-buffer-substring (gdb-get-create-buffer
1993 'gdb-partial-output-buffer)) 2065 'gdb-partial-output-buffer))
1994 (goto-char p))))) 2066 (set-window-point (get-buffer-window buf 0) p)))))
1995 (run-hooks 'gdb-info-locals-hook)) 2067 (run-hooks 'gdb-info-locals-hook))
1996 2068
1997(defun gdb-info-locals-custom () 2069(defun gdb-info-locals-custom ()
@@ -2009,7 +2081,7 @@ corresponding to the mode line clicked."
2009\\{gdb-locals-mode-map}" 2081\\{gdb-locals-mode-map}"
2010 (kill-all-local-variables) 2082 (kill-all-local-variables)
2011 (setq major-mode 'gdb-locals-mode) 2083 (setq major-mode 'gdb-locals-mode)
2012 (setq mode-name (concat "Locals:" gdb-current-frame)) 2084 (setq mode-name (concat "Locals:" gdb-selected-frame))
2013 (setq buffer-read-only t) 2085 (setq buffer-read-only t)
2014 (use-local-map gdb-locals-mode-map) 2086 (use-local-map gdb-locals-mode-map)
2015 (run-mode-hooks 'gdb-locals-mode-hook) 2087 (run-mode-hooks 'gdb-locals-mode-hook)
@@ -2069,7 +2141,8 @@ corresponding to the mode line clicked."
2069 (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) 2141 (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer))
2070 (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) 2142 (define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
2071 (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) 2143 (define-key menu [memory] '("Memory" . gdb-display-memory-buffer))
2072 (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) 2144 (define-key menu [disassembly]
2145 '("Disassembly" . gdb-display-assembler-buffer))
2073 (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) 2146 (define-key menu [registers] '("Registers" . gdb-display-registers-buffer))
2074 (define-key menu [inferior] 2147 (define-key menu [inferior]
2075 '(menu-item "Inferior IO" gdb-display-inferior-io-buffer 2148 '(menu-item "Inferior IO" gdb-display-inferior-io-buffer
@@ -2086,7 +2159,7 @@ corresponding to the mode line clicked."
2086 (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) 2159 (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer))
2087 (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) 2160 (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
2088 (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) 2161 (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer))
2089 (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) 2162 (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer))
2090 (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) 2163 (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
2091 (define-key menu [inferior] 2164 (define-key menu [inferior]
2092 '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer 2165 '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer
@@ -2129,14 +2202,6 @@ corresponding to the mode line clicked."
2129 (gdb-display-buffer 2202 (gdb-display-buffer
2130 (gdb-get-create-buffer 'gdba))) 2203 (gdb-get-create-buffer 'gdba)))
2131 2204
2132(defvar gdb-main-file nil "Source file from which program execution begins.")
2133
2134(defcustom gdb-show-main nil
2135 "Nil means don't display source file containing the main routine."
2136 :type 'boolean
2137 :group 'gud
2138 :version "22.1")
2139
2140(defun gdb-set-window-buffer (name) 2205(defun gdb-set-window-buffer (name)
2141 (set-window-buffer (selected-window) (get-buffer name)) 2206 (set-window-buffer (selected-window) (get-buffer name))
2142 (set-window-dedicated-p (selected-window) t)) 2207 (set-window-dedicated-p (selected-window) t))
@@ -2236,7 +2301,7 @@ Kills the gdb buffers and resets the source buffers."
2236buffers." 2301buffers."
2237 (goto-char (point-min)) 2302 (goto-char (point-min))
2238 (if (and (search-forward "Located in " nil t) 2303 (if (and (search-forward "Located in " nil t)
2239 (looking-at "\\S-*")) 2304 (looking-at "\\S-+"))
2240 (setq gdb-main-file (match-string 0))) 2305 (setq gdb-main-file (match-string 0)))
2241 (goto-char (point-min)) 2306 (goto-char (point-min))
2242 (if (search-forward "Includes preprocessor macro info." nil t) 2307 (if (search-forward "Includes preprocessor macro info." nil t)
@@ -2254,7 +2319,7 @@ Put in buffer and place breakpoint icon."
2254 (goto-char (point-min)) 2319 (goto-char (point-min))
2255 (catch 'file-not-found 2320 (catch 'file-not-found
2256 (if (search-forward "Located in " nil t) 2321 (if (search-forward "Located in " nil t)
2257 (when (looking-at "\\S-*") 2322 (when (looking-at "\\S-+")
2258 (delete (cons bptno "File not found") gdb-location-alist) 2323 (delete (cons bptno "File not found") gdb-location-alist)
2259 (push (cons bptno (match-string 0)) gdb-location-alist)) 2324 (push (cons bptno (match-string 0)) gdb-location-alist))
2260 (gdb-resync) 2325 (gdb-resync)
@@ -2276,6 +2341,8 @@ Add directory to search path for source files using the GDB command, dir."))
2276(add-hook 'find-file-hook 'gdb-find-file-hook) 2341(add-hook 'find-file-hook 'gdb-find-file-hook)
2277 2342
2278(defun gdb-find-file-hook () 2343(defun gdb-find-file-hook ()
2344"Set up buffer for debugging if file is part of the source code
2345of the current session."
2279 (if (and (not gdb-find-file-unhook) 2346 (if (and (not gdb-find-file-unhook)
2280 ;; in case gud or gdb-ui is just loaded 2347 ;; in case gud or gdb-ui is just loaded
2281 gud-comint-buffer 2348 gud-comint-buffer
@@ -2399,7 +2466,9 @@ BUFFER nil or omitted means use the current buffer."
2399 2466
2400(def-gdb-auto-updated-buffer gdb-assembler-buffer 2467(def-gdb-auto-updated-buffer gdb-assembler-buffer
2401 gdb-invalidate-assembler 2468 gdb-invalidate-assembler
2402 (concat gdb-server-prefix "disassemble " gdb-current-address "\n") 2469 (concat gdb-server-prefix "disassemble "
2470 (if (member gdb-frame-address '(nil "main")) nil "0x")
2471 gdb-frame-address "\n")
2403 gdb-assembler-handler 2472 gdb-assembler-handler
2404 gdb-assembler-custom) 2473 gdb-assembler-custom)
2405 2474
@@ -2407,38 +2476,38 @@ BUFFER nil or omitted means use the current buffer."
2407 (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) 2476 (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))
2408 (pos 1) (address) (flag) (bptno)) 2477 (pos 1) (address) (flag) (bptno))
2409 (with-current-buffer buffer 2478 (with-current-buffer buffer
2410 (if (not (equal gdb-current-address "main")) 2479 (save-excursion
2411 (progn 2480 (if (not (equal gdb-frame-address "main"))
2412 (goto-char (point-min)) 2481 (progn
2413 (if (re-search-forward gdb-current-address nil t) 2482 (goto-char (point-min))
2414 (progn 2483 (if (and gdb-frame-address
2415 (setq pos (point)) 2484 (re-search-forward gdb-frame-address nil t))
2416 (beginning-of-line) 2485 (progn
2417 (or gdb-overlay-arrow-position 2486 (setq pos (point))
2418 (setq gdb-overlay-arrow-position (make-marker))) 2487 (beginning-of-line)
2419 (set-marker gdb-overlay-arrow-position 2488 (or gdb-overlay-arrow-position
2420 (point) (current-buffer)))))) 2489 (setq gdb-overlay-arrow-position (make-marker)))
2421 ;; remove all breakpoint-icons in assembler buffer before updating. 2490 (set-marker gdb-overlay-arrow-position
2422 (gdb-remove-breakpoint-icons (point-min) (point-max))) 2491 (point) (current-buffer))))))
2492 ;; remove all breakpoint-icons in assembler buffer before updating.
2493 (gdb-remove-breakpoint-icons (point-min) (point-max))))
2423 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) 2494 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
2424 (goto-char (point-min)) 2495 (goto-char (point-min))
2425 (while (< (point) (- (point-max) 1)) 2496 (while (< (point) (- (point-max) 1))
2426 (forward-line 1) 2497 (forward-line 1)
2427 (if (looking-at "[^\t].*breakpoint") 2498 (if (looking-at "[^\t].*?breakpoint")
2428 (progn 2499 (progn
2429 (looking-at 2500 (looking-at
2430 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x\\(\\S-+\\)") 2501 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)")
2431 (setq bptno (match-string 1)) 2502 (setq bptno (match-string 1))
2432 (setq flag (char-after (match-beginning 2))) 2503 (setq flag (char-after (match-beginning 2)))
2433 (setq address (match-string 3)) 2504 (setq address (match-string 3))
2434 ;; remove leading 0s from output of info break.
2435 (if (string-match "^0+\\(.*\\)" address)
2436 (setq address (match-string 1 address)))
2437 (with-current-buffer buffer 2505 (with-current-buffer buffer
2506 (save-excursion
2438 (goto-char (point-min)) 2507 (goto-char (point-min))
2439 (if (re-search-forward address nil t) 2508 (if (re-search-forward address nil t)
2440 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) 2509 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))))
2441 (if (not (equal gdb-current-address "main")) 2510 (if (not (equal gdb-frame-address "main"))
2442 (set-window-point (get-buffer-window buffer 0) pos)))) 2511 (set-window-point (get-buffer-window buffer 0) pos))))
2443 2512
2444(defvar gdb-assembler-mode-map 2513(defvar gdb-assembler-mode-map
@@ -2468,7 +2537,7 @@ BUFFER nil or omitted means use the current buffer."
2468\\{gdb-assembler-mode-map}" 2537\\{gdb-assembler-mode-map}"
2469 (kill-all-local-variables) 2538 (kill-all-local-variables)
2470 (setq major-mode 'gdb-assembler-mode) 2539 (setq major-mode 'gdb-assembler-mode)
2471 (setq mode-name "Machine") 2540 (setq mode-name (concat "Machine:" gdb-selected-frame))
2472 (setq gdb-overlay-arrow-position nil) 2541 (setq gdb-overlay-arrow-position nil)
2473 (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position) 2542 (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position)
2474 (setq fringes-outside-margins t) 2543 (setq fringes-outside-margins t)
@@ -2482,33 +2551,36 @@ BUFFER nil or omitted means use the current buffer."
2482 2551
2483(defun gdb-assembler-buffer-name () 2552(defun gdb-assembler-buffer-name ()
2484 (with-current-buffer gud-comint-buffer 2553 (with-current-buffer gud-comint-buffer
2485 (concat "*Machine Code " (gdb-get-target-string) "*"))) 2554 (concat "*Disassembly of " (gdb-get-target-string) "*")))
2486 2555
2487(defun gdb-display-assembler-buffer () 2556(defun gdb-display-assembler-buffer ()
2488 "Display disassembly view." 2557 "Display disassembly view."
2489 (interactive) 2558 (interactive)
2559 (setq gdb-previous-frame nil)
2490 (gdb-display-buffer 2560 (gdb-display-buffer
2491 (gdb-get-create-buffer 'gdb-assembler-buffer))) 2561 (gdb-get-create-buffer 'gdb-assembler-buffer)))
2492 2562
2493(defun gdb-frame-assembler-buffer () 2563(defun gdb-frame-assembler-buffer ()
2494 "Display disassembly view in a new frame." 2564 "Display disassembly view in a new frame."
2495 (interactive) 2565 (interactive)
2566 (setq gdb-previous-frame nil)
2496 (let ((special-display-regexps (append special-display-regexps '(".*"))) 2567 (let ((special-display-regexps (append special-display-regexps '(".*")))
2497 (special-display-frame-alist gdb-frame-parameters)) 2568 (special-display-frame-alist gdb-frame-parameters))
2498 (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))) 2569 (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))))
2499 2570
2500;; modified because if gdb-current-address has changed value a new command 2571;; modified because if gdb-frame-address has changed value a new command
2501;; must be enqueued to update the buffer with the new output 2572;; must be enqueued to update the buffer with the new output
2502(defun gdb-invalidate-assembler (&optional ignored) 2573(defun gdb-invalidate-assembler (&optional ignored)
2503 (if (gdb-get-buffer 'gdb-assembler-buffer) 2574 (if (gdb-get-buffer 'gdb-assembler-buffer)
2504 (progn 2575 (progn
2505 (unless (string-equal gdb-current-frame gdb-previous-frame) 2576 (unless (and gdb-selected-frame
2577 (string-equal gdb-selected-frame gdb-previous-frame))
2506 (if (or (not (member 'gdb-invalidate-assembler 2578 (if (or (not (member 'gdb-invalidate-assembler
2507 gdb-pending-triggers)) 2579 gdb-pending-triggers))
2508 (not (string-equal gdb-current-address 2580 (not (string-equal gdb-frame-address
2509 gdb-previous-address))) 2581 gdb-previous-frame-address)))
2510 (progn 2582 (progn
2511 ;; take previous disassemble command off the queue 2583 ;; take previous disassemble command, if any, off the queue
2512 (with-current-buffer gud-comint-buffer 2584 (with-current-buffer gud-comint-buffer
2513 (let ((queue gdb-input-queue)) 2585 (let ((queue gdb-input-queue))
2514 (dolist (item queue) 2586 (dolist (item queue)
@@ -2516,46 +2588,46 @@ BUFFER nil or omitted means use the current buffer."
2516 (setq gdb-input-queue 2588 (setq gdb-input-queue
2517 (delete item gdb-input-queue)))))) 2589 (delete item gdb-input-queue))))))
2518 (gdb-enqueue-input 2590 (gdb-enqueue-input
2519 (list (concat gdb-server-prefix "disassemble " 2591 (list
2520 gdb-current-address "\n") 2592 (concat gdb-server-prefix "disassemble "
2593 (if (member gdb-frame-address '(nil "main")) nil "0x")
2594 gdb-frame-address "\n")
2521 'gdb-assembler-handler)) 2595 'gdb-assembler-handler))
2522 (push 'gdb-invalidate-assembler gdb-pending-triggers) 2596 (push 'gdb-invalidate-assembler gdb-pending-triggers)
2523 (setq gdb-previous-address gdb-current-address) 2597 (setq gdb-previous-frame-address gdb-frame-address)
2524 (setq gdb-previous-frame gdb-current-frame))))))) 2598 (setq gdb-previous-frame gdb-selected-frame)))))))
2525 2599
2526(defun gdb-get-current-frame () 2600(defun gdb-get-selected-frame ()
2527 (if (not (member 'gdb-get-current-frame gdb-pending-triggers)) 2601 (if (not (member 'gdb-get-selected-frame gdb-pending-triggers))
2528 (progn 2602 (progn
2529 (gdb-enqueue-input 2603 (gdb-enqueue-input
2530 (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler)) 2604 (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler))
2531 (push 'gdb-get-current-frame 2605 (push 'gdb-get-selected-frame
2532 gdb-pending-triggers)))) 2606 gdb-pending-triggers))))
2533 2607
2534(defun gdb-frame-handler () 2608(defun gdb-frame-handler ()
2535 (setq gdb-pending-triggers 2609 (setq gdb-pending-triggers
2536 (delq 'gdb-get-current-frame gdb-pending-triggers)) 2610 (delq 'gdb-get-selected-frame gdb-pending-triggers))
2537 (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) 2611 (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
2538 (goto-char (point-min)) 2612 (goto-char (point-min))
2539 (if (looking-at "Stack level \\([0-9]+\\)") 2613 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t)
2540 (setq gdb-current-stack-level (match-string 1))) 2614 (setq gdb-frame-number (match-string 1)))
2541 (forward-line) 2615 (goto-char (point-min))
2542 (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ") 2616 (if (re-search-forward
2617 ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t)
2543 (progn 2618 (progn
2544 (setq gdb-current-frame (match-string 2)) 2619 (setq gdb-selected-frame (match-string 2))
2545 (if (gdb-get-buffer 'gdb-locals-buffer) 2620 (if (gdb-get-buffer 'gdb-locals-buffer)
2546 (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer) 2621 (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
2547 (setq mode-name (concat "Locals:" gdb-current-frame)))) 2622 (setq mode-name (concat "Locals:" gdb-selected-frame))))
2548 (let ((address (match-string 1))) 2623 (if (gdb-get-buffer 'gdb-assembler-buffer)
2549 ;; remove leading 0s from output of info frame command. 2624 (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer)
2550 (if (string-match "^0+\\(.*\\)" address) 2625 (setq mode-name (concat "Machine:" gdb-selected-frame))))
2551 (setq gdb-current-address 2626 (setq gdb-frame-address (match-string 1))))
2552 (concat "0x" (match-string 1 address))) 2627 (goto-char (point-min))
2553 (setq gdb-current-address (concat "0x" address))))
2554 (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t))
2555 ;;update with new frame for machine code if necessary
2556 (gdb-invalidate-assembler)))))
2557 (if (re-search-forward " source language \\(\\S-*\\)\." nil t) 2628 (if (re-search-forward " source language \\(\\S-*\\)\." nil t)
2558 (setq gdb-current-language (match-string 1)))) 2629 (setq gdb-current-language (match-string 1))))
2630 (gdb-invalidate-assembler))
2559 2631
2560(provide 'gdb-ui) 2632(provide 'gdb-ui)
2561 2633
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 4c95fc65d58..f3a95514c13 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -25,17 +25,17 @@
25 25
26;;; Commentary: 26;;; Commentary:
27 27
28;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> 28;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> It was
29;; It was later rewritten by rms. Some ideas were due to Masanobu. 29;; later rewritten by rms. Some ideas were due to Masanobu. Grand
30;; Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> 30;; Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> Barry
31;; The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>, 31;; Warsaw <bwarsaw@cen.com> hacked the mode to use comint.el. Shane Hartman
32;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com> 32;; <shane@spr.com> added support for xdb (HPUX debugger). Rick Sladkey
33;; added support for xdb (HPUX debugger). Rick Sladkey <jrs@world.std.com> 33;; <jrs@world.std.com> wrote the GDB command completion code. Dave Love
34;; wrote the GDB command completion code. Dave Love <d.love@dl.ac.uk> 34;; <d.love@dl.ac.uk> added the IRIX kluge, re-implemented the Mips-ish variant
35;; added the IRIX kluge, re-implemented the Mips-ish variant and added 35;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
36;; a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX kluge with 36;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
37;; the gud-xdb-directories hack producing gud-dbx-directories. Derek L. Davies 37;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java
38;; <ddavies@world.std.com> added support for jdb (Java debugger.) 38;; debugger.)
39 39
40;;; Code: 40;;; Code:
41 41
@@ -107,11 +107,10 @@ Used to grey out relevant togolbar icons.")
107 (setq same-window-regexps nil) 107 (setq same-window-regexps nil)
108 (throw 'info-found nil)))) 108 (throw 'info-found nil))))
109 nil 0) 109 nil 0)
110 (require 'info)
111 (select-frame (make-frame))) 110 (select-frame (make-frame)))
112 (if (memq gud-minor-mode '(gdbmi gdba)) 111 (if (memq gud-minor-mode '(gdbmi gdba))
113 (Info-goto-node "(emacs)GDB Graphical Interface") 112 (info "(emacs)GDB Graphical Interface")
114 (Info-goto-node "(emacs)Debuggers")))) 113 (info "(emacs)Debuggers"))))
115 114
116(easy-mmode-defmap gud-menu-map 115(easy-mmode-defmap gud-menu-map
117 '(([help] "Info" . gud-goto-info) 116 '(([help] "Info" . gud-goto-info)
@@ -141,6 +140,9 @@ Used to grey out relevant togolbar icons.")
141 :enable (and (not gud-running) 140 :enable (and (not gud-running)
142 (memq gud-minor-mode 141 (memq gud-minor-mode
143 '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) 142 '(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
143 ([print*] menu-item "Print Dereference" gud-pstar
144 :enable (and (not gud-running)
145 (memq gud-minor-mode '(gdbmi gdba gdb))))
144 ([print] menu-item "Print Expression" gud-print 146 ([print] menu-item "Print Expression" gud-print
145 :enable (not gud-running)) 147 :enable (not gud-running))
146 ([watch] menu-item "Watch Expression" gud-watch 148 ([watch] menu-item "Watch Expression" gud-watch
@@ -184,18 +186,19 @@ Used to grey out relevant togolbar icons.")
184 (dolist (x '((gud-break . "gud-break") 186 (dolist (x '((gud-break . "gud-break")
185 (gud-remove . "gud-remove") 187 (gud-remove . "gud-remove")
186 (gud-print . "gud-print") 188 (gud-print . "gud-print")
189 (gud-pstar . "gud-pstar")
187 (gud-watch . "gud-watch") 190 (gud-watch . "gud-watch")
188 (gud-run . "gud-run")
189 (gud-until . "gud-until")
190 (gud-cont . "gud-cont") 191 (gud-cont . "gud-cont")
192 (gud-until . "gud-until")
193 (gud-finish . "gud-finish")
194 (gud-run . "gud-run")
191 ;; gud-s, gud-si etc. instead of gud-step, 195 ;; gud-s, gud-si etc. instead of gud-step,
192 ;; gud-stepi, to avoid file-name clashes on DOS 196 ;; gud-stepi, to avoid file-name clashes on DOS
193 ;; 8+3 filesystems. 197 ;; 8+3 filesystems.
194 (gud-step . "gud-s")
195 (gud-next . "gud-n") 198 (gud-next . "gud-n")
196 (gud-finish . "gud-finish") 199 (gud-step . "gud-s")
197 (gud-stepi . "gud-si")
198 (gud-nexti . "gud-ni") 200 (gud-nexti . "gud-ni")
201 (gud-stepi . "gud-si")
199 (gud-up . "gud-up") 202 (gud-up . "gud-up")
200 (gud-down . "gud-down") 203 (gud-down . "gud-down")
201 (gud-goto-info . "info")) 204 (gud-goto-info . "info"))
@@ -343,13 +346,13 @@ t means that there is no stack, and we are in display-file mode.")
343 346
344(defvar gud-speedbar-menu-items 347(defvar gud-speedbar-menu-items
345 ;; Note to self. Add expand, and turn off items when not available. 348 ;; Note to self. Add expand, and turn off items when not available.
346 '(["Jump to stack frame" speedbar-edit-line 349 '(["Jump to stack frame" speedbar-edit-line
347 (with-current-buffer gud-comint-buffer 350 (with-current-buffer gud-comint-buffer
348 (not (memq gud-minor-mode '(gdbmi gdba))))] 351 (not (memq gud-minor-mode '(gdbmi gdba))))]
349 ["Edit value" speedbar-edit-line 352 ["Edit value" speedbar-edit-line
350 (with-current-buffer gud-comint-buffer 353 (with-current-buffer gud-comint-buffer
351 (not (memq gud-minor-mode '(gdbmi gdba))))] 354 (not (memq gud-minor-mode '(gdbmi gdba))))]
352 ["Delete expression" gdb-var-delete 355 ["Delete expression" gdb-var-delete
353 (with-current-buffer gud-comint-buffer 356 (with-current-buffer gud-comint-buffer
354 (not (memq gud-minor-mode '(gdbmi gdba))))]) 357 (not (memq gud-minor-mode '(gdbmi gdba))))])
355 "Additional menu items to add to the speedbar frame.") 358 "Additional menu items to add to the speedbar frame.")
@@ -581,6 +584,8 @@ and source-file directory for your debugger."
581 (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") 584 (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
582 (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") 585 (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
583 (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") 586 (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
587 (gud-def gud-pstar "print* %e" nil
588 "Evaluate C dereferenced pointer expression at point.")
584 (gud-def gud-until "until %l" "\C-u" "Continue to current line.") 589 (gud-def gud-until "until %l" "\C-u" "Continue to current line.")
585 (gud-def gud-run "run" nil "Run the program.") 590 (gud-def gud-run "run" nil "Run the program.")
586 591
@@ -3192,7 +3197,7 @@ For C this would dereference a pointer expression.")
3192 "The mouse movement event that led to a tooltip display. 3197 "The mouse movement event that led to a tooltip display.
3193This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") 3198This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3194 3199
3195(defun gud-tooltip-toggle-dereference () 3200(defun toggle-gud-tooltip-dereference ()
3196 "Toggle whether tooltips should show `* expr' or `expr'." 3201 "Toggle whether tooltips should show `* expr' or `expr'."
3197 (interactive) 3202 (interactive)
3198 (setq gud-tooltip-dereference (not gud-tooltip-dereference)) 3203 (setq gud-tooltip-dereference (not gud-tooltip-dereference))
@@ -3201,7 +3206,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3201 (if gud-tooltip-dereference "on" "off")))) 3206 (if gud-tooltip-dereference "on" "off"))))
3202 3207
3203(define-obsolete-function-alias 'tooltip-gud-toggle-dereference 3208(define-obsolete-function-alias 'tooltip-gud-toggle-dereference
3204 'gud-tooltip-toggle-dereference "22.1") 3209 'toggle-gud-tooltip-dereference "22.1")
3205 3210
3206(define-minor-mode gud-tooltip-mode 3211(define-minor-mode gud-tooltip-mode
3207 "Toggle the display of GUD tooltips." 3212 "Toggle the display of GUD tooltips."
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index c61c64532a3..0eb1b8bf3df 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -205,7 +205,7 @@ with no args, if that value is non-nil."
205 (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil 205 (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil
206 icon-forward-sexp-function) 206 icon-forward-sexp-function)
207 hs-special-modes-alist))) 207 hs-special-modes-alist)))
208 (run-hooks 'icon-mode-hook)) 208 (run-mode-hooks 'icon-mode-hook))
209 209
210;; This is used by indent-for-comment to decide how much to 210;; This is used by indent-for-comment to decide how much to
211;; indent a comment in Icon code based on its context. 211;; indent a comment in Icon code based on its context.
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el
index 8696e1a7d63..6c2cb00bbde 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/progmodes/idlw-help.el
@@ -278,7 +278,7 @@ Here are all keybindings.
278 (set (make-local-variable 'idlwave-help-def-pos) nil) 278 (set (make-local-variable 'idlwave-help-def-pos) nil)
279 (set (make-local-variable 'idlwave-help-args) nil) 279 (set (make-local-variable 'idlwave-help-args) nil)
280 (set (make-local-variable 'idlwave-help-in-header) nil) 280 (set (make-local-variable 'idlwave-help-in-header) nil)
281 (run-hooks 'idlwave-help-mode-hook)) 281 (run-mode-hooks 'idlwave-help-mode-hook))
282 282
283(defun idlwave-html-help-location () 283(defun idlwave-html-help-location ()
284 "Return the help directory where HTML files are, or nil if that is unknown." 284 "Return the help directory where HTML files are, or nil if that is unknown."
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 77244819f1b..e804b9f8d50 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -1055,7 +1055,7 @@ IDL has currently stepped.")
1055 (set (make-local-variable 'tool-bar-map) nil) 1055 (set (make-local-variable 'tool-bar-map) nil)
1056 1056
1057 ;; Run the hooks. 1057 ;; Run the hooks.
1058 (run-hooks 'idlwave-shell-mode-hook) 1058 (run-mode-hooks 'idlwave-shell-mode-hook)
1059 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) 1059 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
1060 ;; Turn off IDL's ^d interpreting, and define a system 1060 ;; Turn off IDL's ^d interpreting, and define a system
1061 ;; variable which knows the version of IDLWAVE 1061 ;; variable which knows the version of IDLWAVE
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index a118b0055a9..6bd7e0eaced 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -1954,7 +1954,7 @@ The main features of this mode are
1954 (idlwave-new-buffer-update) 1954 (idlwave-new-buffer-update)
1955 1955
1956 ;; Run the mode hook 1956 ;; Run the mode hook
1957 (run-hooks 'idlwave-mode-hook)) 1957 (run-mode-hooks 'idlwave-mode-hook))
1958 1958
1959(defvar idlwave-setup-done nil) 1959(defvar idlwave-setup-done nil)
1960(defun idlwave-setup () 1960(defun idlwave-setup ()
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index 13bc7f08999..ad7c4cb4cf2 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -260,7 +260,8 @@ Paragraphs are separated only by blank lines. Semicolons start comments.
260If you accidentally suspend your process, use \\[comint-continue-subjob] 260If you accidentally suspend your process, use \\[comint-continue-subjob]
261to continue it." 261to continue it."
262 (interactive) 262 (interactive)
263 (comint-mode) 263 (delay-mode-hooks
264 (comint-mode))
264 (setq comint-prompt-regexp inferior-lisp-prompt) 265 (setq comint-prompt-regexp inferior-lisp-prompt)
265 (setq major-mode 'inferior-lisp-mode) 266 (setq major-mode 'inferior-lisp-mode)
266 (setq mode-name "Inferior Lisp") 267 (setq mode-name "Inferior Lisp")
@@ -269,7 +270,7 @@ to continue it."
269 (use-local-map inferior-lisp-mode-map) ;c-c c-k for "kompile" file 270 (use-local-map inferior-lisp-mode-map) ;c-c c-k for "kompile" file
270 (setq comint-get-old-input (function lisp-get-old-input)) 271 (setq comint-get-old-input (function lisp-get-old-input))
271 (setq comint-input-filter (function lisp-input-filter)) 272 (setq comint-input-filter (function lisp-input-filter))
272 (run-hooks 'inferior-lisp-mode-hook)) 273 (run-mode-hooks 'inferior-lisp-mode-hook))
273 274
274(defun lisp-get-old-input () 275(defun lisp-get-old-input ()
275 "Return a string containing the sexp ending at point." 276 "Return a string containing the sexp ending at point."
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el
index bd6fac5c639..5becd22f6eb 100644
--- a/lisp/progmodes/m4-mode.el
+++ b/lisp/progmodes/m4-mode.el
@@ -147,7 +147,7 @@
147 font-lock-defaults '(m4-font-lock-keywords nil) 147 font-lock-defaults '(m4-font-lock-keywords nil)
148 ) 148 )
149 (set-syntax-table m4-mode-syntax-table) 149 (set-syntax-table m4-mode-syntax-table)
150 (run-hooks 'm4-mode-hook)) 150 (run-mode-hooks 'm4-mode-hook))
151 151
152(provide 'm4-mode) 152(provide 'm4-mode)
153;;stuff to play with for debugging 153;;stuff to play with for debugging
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 05c3ac50787..7356583fb90 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -111,7 +111,8 @@
111 '((t (:underline t))) 111 '((t (:underline t)))
112 "Face to use for additionally highlighting rule targets in Font-Lock mode." 112 "Face to use for additionally highlighting rule targets in Font-Lock mode."
113 :group 'faces 113 :group 'faces
114 :group 'makefile) 114 :group 'makefile
115 :version "22.1")
115 116
116(defface makefile-shell-face 117(defface makefile-shell-face
117 '((((class color) (background light)) (:background "seashell1")) 118 '((((class color) (background light)) (:background "seashell1"))
@@ -119,7 +120,8 @@
119 (t (:reverse-video t))) 120 (t (:reverse-video t)))
120 "Face to use for additionally highlighting Shell commands in Font-Lock mode." 121 "Face to use for additionally highlighting Shell commands in Font-Lock mode."
121 :group 'faces 122 :group 'faces
122 :group 'makefile) 123 :group 'makefile
124 :version "22.1")
123 125
124(defface makefile-makepp-perl-face 126(defface makefile-makepp-perl-face
125 '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book 127 '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book
@@ -127,7 +129,8 @@
127 (t (:reverse-video t))) 129 (t (:reverse-video t)))
128 "Face to use for additionally highlighting Perl code in Font-Lock mode." 130 "Face to use for additionally highlighting Perl code in Font-Lock mode."
129 :group 'faces 131 :group 'faces
130 :group 'makefile) 132 :group 'makefile
133 :version "22.1")
131 134
132(defcustom makefile-browser-buffer-name "*Macros and Targets*" 135(defcustom makefile-browser-buffer-name "*Macros and Targets*"
133 "*Name of the macro- and target browser buffer." 136 "*Name of the macro- and target browser buffer."
@@ -262,18 +265,33 @@ not be enclosed in { } or ( )."
262 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" 265 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)"
263 "Regex used to find dependency lines in a makefile.") 266 "Regex used to find dependency lines in a makefile.")
264 267
268(defconst makefile-bsdmake-dependency-regex
269 (progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex)
270 (replace-match "\\([:!]\\)" t t makefile-dependency-regex))
271 "Regex used to find dependency lines in a BSD makefile.")
272
265(defvar makefile-dependency-skip "^:" 273(defvar makefile-dependency-skip "^:"
266 "Characters to skip to find a line that might be a dependency.") 274 "Characters to skip to find a line that might be a dependency.")
267 275
268(defvar makefile-rule-action-regex 276(defvar makefile-rule-action-regex
269 "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)" 277 "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)"
270 "Regex used to highlight rule action lines in font lock mode.") 278 "Regex used to highlight rule action lines in font lock mode.")
271 279
280(defconst makefile-makepp-rule-action-regex
281 ;; Don't care about initial tab, but I don't know how to font-lock correctly without.
282 "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)"
283 "Regex used to highlight makepp rule action lines in font lock mode.")
284
285(defconst makefile-bsdmake-rule-action-regex
286 (progn (string-match "-@" makefile-rule-action-regex)
287 (replace-match "-+@" t t makefile-rule-action-regex))
288 "Regex used to highlight BSD rule action lines in font lock mode.")
289
272;; Note that the first and second subexpression is used by font lock. Note 290;; Note that the first and second subexpression is used by font lock. Note
273;; that if you change this regexp you might have to fix the imenu index in 291;; that if you change this regexp you might have to fix the imenu index in
274;; makefile-imenu-generic-expression. 292;; makefile-imenu-generic-expression.
275(defconst makefile-macroassign-regex 293(defconst makefile-macroassign-regex
276 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\)" 294 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)"
277 "Regex used to find macro assignment lines in a makefile.") 295 "Regex used to find macro assignment lines in a makefile.")
278 296
279(defconst makefile-var-use-regex 297(defconst makefile-var-use-regex
@@ -420,7 +438,7 @@ not be enclosed in { } or ( )."
420 nil 438 nil
421 "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" 439 "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>"
422 440
423 '("[^$]\\(\\$[({]\\(?:target\\|output\\)s?\\_>.*?[})]\\)" 441 '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)"
424 1 'makefile-targets-face prepend) 442 1 'makefile-targets-face prepend)
425 443
426 ;; Colon modifier keywords. 444 ;; Colon modifier keywords.
@@ -849,10 +867,8 @@ Makefile mode can be configured by modifying the following variables:
849;;;###autoload 867;;;###autoload
850(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" 868(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile"
851 "An adapted `makefile-mode' that knows about makepp." 869 "An adapted `makefile-mode' that knows about makepp."
852 (set (make-local-variable 'makefile-rule-action-regex) 870 (set (make-local-variable 'makefile-rule-action-regex)
853 ;; Don't care about initial tab, but I don't know how to font-lock correctly without. 871 makefile-makepp-rule-action-regex)
854 "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)")
855
856 (setq font-lock-defaults 872 (setq font-lock-defaults
857 `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) 873 `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
858 imenu-generic-expression 874 imenu-generic-expression
@@ -863,11 +879,10 @@ Makefile mode can be configured by modifying the following variables:
863(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" 879(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
864 "An adapted `makefile-mode' that knows about BSD make." 880 "An adapted `makefile-mode' that knows about BSD make."
865 (set (make-local-variable 'makefile-dependency-regex) 881 (set (make-local-variable 'makefile-dependency-regex)
866 ;; Identical to default, except allows `!' instead of `:'. 882 makefile-bsdmake-dependency-regex)
867 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)")
868 (set (make-local-variable 'makefile-dependency-skip) "^:!") 883 (set (make-local-variable 'makefile-dependency-skip) "^:!")
869 (set (make-local-variable 'makefile-rule-action-regex) 884 (set (make-local-variable 'makefile-rule-action-regex)
870 "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)") 885 makefile-bsdmake-rule-action-regex)
871 (setq font-lock-defaults 886 (setq font-lock-defaults
872 `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) 887 `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
873 888
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index 7bf9921b2ee..3d77de8f182 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -998,7 +998,7 @@ Turning on Metafont mode calls the value of the variables
998 (setq meta-complete-list 998 (setq meta-complete-list
999 (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) 999 (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list)
1000 (list "" 'ispell-complete-word))) 1000 (list "" 'ispell-complete-word)))
1001 (run-hooks 'meta-common-mode-hook 'metafont-mode-hook)) 1001 (run-mode-hooks 'meta-common-mode-hook 'metafont-mode-hook))
1002 1002
1003;;;###autoload 1003;;;###autoload
1004(defun metapost-mode () 1004(defun metapost-mode ()
@@ -1023,7 +1023,7 @@ Turning on MetaPost mode calls the value of the variable
1023 (setq meta-complete-list 1023 (setq meta-complete-list
1024 (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) 1024 (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list)
1025 (list "" 'ispell-complete-word))) 1025 (list "" 'ispell-complete-word)))
1026 (run-hooks 'meta-common-mode-hook 'metapost-mode-hook)) 1026 (run-mode-hooks 'meta-common-mode-hook 'metapost-mode-hook))
1027 1027
1028 1028
1029;;; Just in case ... 1029;;; Just in case ...
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index 0fa46bee0f9..5fd3dbcb11b 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -172,7 +172,7 @@ followed by the first character of the construct.
172 ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. 172 ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP.
173 ;(font-lock-comment-start-regexp . "(\\*") 173 ;(font-lock-comment-start-regexp . "(\\*")
174 )) 174 ))
175 (run-hooks 'm2-mode-hook)) 175 (run-mode-hooks 'm2-mode-hook))
176 176
177;; Regexps written with help from Ron Forrester <ron@orcad.com> 177;; Regexps written with help from Ron Forrester <ron@orcad.com>
178;; and Spencer Allain <sallain@teknowledge.com>. 178;; and Spencer Allain <sallain@teknowledge.com>.
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index 265cf6c049b..250d00171f2 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -158,7 +158,7 @@ Entry to this mode successively runs the hooks `comint-mode-hook' and
158 inferior-octave-dynamic-complete-functions) 158 inferior-octave-dynamic-complete-functions)
159 (comint-read-input-ring t) 159 (comint-read-input-ring t)
160 160
161 (run-hooks 'inferior-octave-mode-hook)) 161 (run-mode-hooks 'inferior-octave-mode-hook))
162 162
163;;;###autoload 163;;;###autoload
164(defun inferior-octave (&optional arg) 164(defun inferior-octave (&optional arg)
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 281edfd693e..35d5bd897c9 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -555,7 +555,7 @@ including a reproducible test case and send the message."
555 555
556 (octave-add-octave-menu) 556 (octave-add-octave-menu)
557 (octave-initialize-completions) 557 (octave-initialize-completions)
558 (run-hooks 'octave-mode-hook)) 558 (run-mode-hooks 'octave-mode-hook))
559 559
560;;; Miscellaneous useful functions 560;;; Miscellaneous useful functions
561(defun octave-describe-major-mode () 561(defun octave-describe-major-mode ()
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 6292fd36a67..e4d36244537 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -383,7 +383,7 @@ no args, if that value is non-nil."
383 (make-local-variable 'imenu-generic-expression) 383 (make-local-variable 'imenu-generic-expression)
384 (setq imenu-generic-expression pascal-imenu-generic-expression) 384 (setq imenu-generic-expression pascal-imenu-generic-expression)
385 (setq imenu-case-fold-search t) 385 (setq imenu-case-fold-search t)
386 (run-hooks 'pascal-mode-hook)) 386 (run-mode-hooks 'pascal-mode-hook))
387 387
388 388
389 389
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 87915933862..7dc695f24bf 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1392,7 +1392,7 @@ with your script for an edit-interpret-debug cycle."
1392 (string-match "\\.m?spec\\'" buffer-file-name)) 1392 (string-match "\\.m?spec\\'" buffer-file-name))
1393 "rpm"))))) 1393 "rpm")))))
1394 (sh-set-shell (or interpreter sh-shell-file) nil nil)) 1394 (sh-set-shell (or interpreter sh-shell-file) nil nil))
1395 (run-hooks 'sh-mode-hook)) 1395 (run-mode-hooks 'sh-mode-hook))
1396 1396
1397;;;###autoload 1397;;;###autoload
1398(defalias 'shell-script-mode 'sh-mode) 1398(defalias 'shell-script-mode 'sh-mode)
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 902cd920ead..add4493e5f8 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -2249,7 +2249,7 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file:
2249 (setq local-abbrev-table sql-mode-abbrev-table) 2249 (setq local-abbrev-table sql-mode-abbrev-table)
2250 (setq abbrev-all-caps 1) 2250 (setq abbrev-all-caps 1)
2251 ;; Run hook 2251 ;; Run hook
2252 (run-hooks 'sql-mode-hook) 2252 (run-mode-hooks 'sql-mode-hook)
2253 ;; Catch changes to sql-product and highlight accordingly 2253 ;; Catch changes to sql-product and highlight accordingly
2254 (sql-highlight-product) 2254 (sql-highlight-product)
2255 (add-hook 'hack-local-variables-hook 'sql-highlight-product t t)) 2255 (add-hook 'hack-local-variables-hook 'sql-highlight-product t t))
@@ -2367,7 +2367,7 @@ you entered, right above the output it created.
2367 (make-local-variable 'sql-input-ring-separator) 2367 (make-local-variable 'sql-input-ring-separator)
2368 (make-local-variable 'sql-input-ring-file-name) 2368 (make-local-variable 'sql-input-ring-file-name)
2369 ;; Run hook. 2369 ;; Run hook.
2370 (run-hooks 'sql-interactive-mode-hook) 2370 (run-mode-hooks 'sql-interactive-mode-hook)
2371 ;; Set comint based on user overrides. 2371 ;; Set comint based on user overrides.
2372 (setq comint-prompt-regexp sql-prompt-regexp) 2372 (setq comint-prompt-regexp sql-prompt-regexp)
2373 (setq left-margin sql-prompt-length) 2373 (setq left-margin sql-prompt-length)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index f840ef356d9..ebccb1bf5bf 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -127,7 +127,7 @@
127 "Non-nil if XEmacs is used.") 127 "Non-nil if XEmacs is used.")
128;; Emacs 21 handling 128;; Emacs 21 handling
129(defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs)) 129(defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs))
130 "Non-nil if GNU Emacs 21 is used.") 130 "Non-nil if Emacs 21 is used.")
131 131
132 132
133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -4568,8 +4568,7 @@ Key bindings:
4568 (set (make-local-variable 'indent-line-function) 'vhdl-indent-line) 4568 (set (make-local-variable 'indent-line-function) 'vhdl-indent-line)
4569 (set (make-local-variable 'comment-start) "--") 4569 (set (make-local-variable 'comment-start) "--")
4570 (set (make-local-variable 'comment-end) "") 4570 (set (make-local-variable 'comment-end) "")
4571 (when vhdl-emacs-21 4571 (set (make-local-variable 'comment-padding) "")
4572 (set (make-local-variable 'comment-padding) ""))
4573 (set (make-local-variable 'comment-column) vhdl-inline-comment-column) 4572 (set (make-local-variable 'comment-column) vhdl-inline-comment-column)
4574 (set (make-local-variable 'end-comment-column) vhdl-end-comment-column) 4573 (set (make-local-variable 'end-comment-column) vhdl-end-comment-column)
4575 (set (make-local-variable 'comment-start-skip) "--+\\s-*") 4574 (set (make-local-variable 'comment-start-skip) "--+\\s-*")
@@ -4622,7 +4621,7 @@ Key bindings:
4622 (if noninteractive "" " See menu for documentation and release notes.")) 4621 (if noninteractive "" " See menu for documentation and release notes."))
4623 4622
4624 ;; run hooks 4623 ;; run hooks
4625 (run-hooks 'vhdl-mode-hook)) 4624 (run-mode-hooks 'vhdl-mode-hook))
4626 4625
4627(defun vhdl-activate-customizations () 4626(defun vhdl-activate-customizations ()
4628 "Activate all customizations on local variables." 4627 "Activate all customizations on local variables."
@@ -7484,7 +7483,13 @@ end of line, do nothing in comments and strings."
7484 (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t) 7483 (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t)
7485 (if (match-string 1) 7484 (if (match-string 1)
7486 (goto-char (match-end 1)) 7485 (goto-char (match-end 1))
7487 (replace-match "\\3 \\4 \\5") 7486 (save-excursion
7487 (goto-char (match-beginning 4))
7488 (unless (eq (preceding-char) ?\ )
7489 (insert " "))
7490 (goto-char (match-end 4))
7491 (unless (eq (following-char) ?\ )
7492 (insert " ")))
7488 (goto-char (match-end 4)))) 7493 (goto-char (match-end 4))))
7489 ;; eliminate multiple spaces and spaces at end of line 7494 ;; eliminate multiple spaces and spaces at end of line
7490 (goto-char beg) 7495 (goto-char beg)
@@ -7540,7 +7545,7 @@ buffer."
7540 (interactive "r\np") 7545 (interactive "r\np")
7541 (save-excursion 7546 (save-excursion
7542 (goto-char beg) 7547 (goto-char beg)
7543 (let ((margin (if interactive (current-indentation) (current-column)))) 7548 (let ((margin (if arg (current-indentation) (current-column))))
7544 (goto-char end) 7549 (goto-char end)
7545 (setq end (point-marker)) 7550 (setq end (point-marker))
7546 ;; remove inline comments, newlines and whitespace 7551 ;; remove inline comments, newlines and whitespace
@@ -12055,8 +12060,7 @@ File statistics: \"%s\"\n\
12055# statements : %5d\n\ 12060# statements : %5d\n\
12056# code lines : %5d\n\ 12061# code lines : %5d\n\
12057# total lines : %5d\n\ " 12062# total lines : %5d\n\ "
12058 (buffer-file-name) no-stats no-code-lines no-lines) 12063 (buffer-file-name) no-stats no-code-lines no-lines)))
12059 (unless vhdl-emacs-21 (vhdl-show-messages))))
12060 12064
12061;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12065;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12062;; Help functions 12066;; Help functions
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index d329e234025..1fa37532ab0 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -196,7 +196,7 @@ It creates the Imenu index for the buffer, if necessary."
196 (puthash window current which-func-table) 196 (puthash window current which-func-table)
197 (force-mode-line-update))) 197 (force-mode-line-update)))
198 (error 198 (error
199 (which-func-mode -1) 199 (setq which-func-mode nil)
200 (error "Error in which-func-update: %s" info)))))) 200 (error "Error in which-func-update: %s" info))))))
201 201
202;;;###autoload 202;;;###autoload
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index bf1279da8a0..8ee791affe1 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -338,7 +338,7 @@ with no args, if that value is non-nil.
338 (setq xscheme-previous-process-state (cons nil nil))))))) 338 (setq xscheme-previous-process-state (cons nil nil)))))))
339 (scheme-interaction-mode-initialize) 339 (scheme-interaction-mode-initialize)
340 (scheme-mode-variables) 340 (scheme-mode-variables)
341 (run-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook)) 341 (run-mode-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook))
342 342
343(defun exit-scheme-interaction-mode () 343(defun exit-scheme-interaction-mode ()
344 "Take buffer out of scheme interaction mode" 344 "Take buffer out of scheme interaction mode"
diff --git a/lisp/recentf.el b/lisp/recentf.el
index cf61b688eb5..bb462bc71d7 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -76,7 +76,7 @@ See the command `recentf-save-list'."
76 :type 'file) 76 :type 'file)
77 77
78(defcustom recentf-exclude nil 78(defcustom recentf-exclude nil
79"*List of regexps and predicates for filenames excluded from the recent list. 79 "*List of regexps and predicates for filenames excluded from the recent list.
80When a filename matches any of the regexps or satisfies any of the 80When a filename matches any of the regexps or satisfies any of the
81predicates it is excluded from the recent list. 81predicates it is excluded from the recent list.
82A predicate is a function that is passed a filename to check and that 82A predicate is a function that is passed a filename to check and that
diff --git a/lisp/replace.el b/lisp/replace.el
index c9c70b59de5..ba3d5fcfbf4 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -693,7 +693,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
693 (make-local-variable 'occur-revert-arguments) 693 (make-local-variable 'occur-revert-arguments)
694 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) 694 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
695 (setq next-error-function 'occur-next-error) 695 (setq next-error-function 'occur-next-error)
696 (run-hooks 'occur-mode-hook)) 696 (run-mode-hooks 'occur-mode-hook))
697 697
698(defun occur-revert-function (ignore1 ignore2) 698(defun occur-revert-function (ignore1 ignore2)
699 "Handle `revert-buffer' for Occur mode buffers." 699 "Handle `revert-buffer' for Occur mode buffers."
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 9dc7b858e37..34c88a89948 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -222,7 +222,8 @@ may have changed\) back to `save-place-alist'."
222 (t 222 (t
223 t)))) 223 t))))
224 (condition-case nil 224 (condition-case nil
225 (write-file file) 225 ;; Don't use write-file; we don't want this buffer to visit it.
226 (write-region (point-min) (point-max) file)
226 (file-error (message "Can't write %s" file))) 227 (file-error (message "Can't write %s" file)))
227 (kill-buffer (current-buffer)) 228 (kill-buffer (current-buffer))
228 (message "Saving places to %s...done" file))))) 229 (message "Saving places to %s...done" file)))))
diff --git a/lisp/ses.el b/lisp/ses.el
index 502acf868dc..d01a8307ffd 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1552,7 +1552,7 @@ These are active only in the minibuffer, when entering or editing a formula:
1552 (setq ses--deferred-narrow 'ses-mode) 1552 (setq ses--deferred-narrow 'ses-mode)
1553 (1value (add-hook 'post-command-hook 'ses-command-hook nil t)) 1553 (1value (add-hook 'post-command-hook 'ses-command-hook nil t))
1554 (run-with-idle-timer 0.01 nil 'ses-command-hook) 1554 (run-with-idle-timer 0.01 nil 'ses-command-hook)
1555 (run-hooks 'ses-mode-hook))) 1555 (run-mode-hooks 'ses-mode-hook)))
1556 1556
1557(put 'ses-mode 'mode-class 'special) 1557(put 'ses-mode 'mode-class 'special)
1558 1558
diff --git a/lisp/simple.el b/lisp/simple.el
index 240896b5eef..016c48924e0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -920,21 +920,21 @@ in *Help* buffer. See also the command `describe-char'."
920(defvar read-expression-history nil) 920(defvar read-expression-history nil)
921 921
922(defcustom eval-expression-print-level 4 922(defcustom eval-expression-print-level 4
923 "*Value to use for `print-level' when printing value in `eval-expression'. 923 "Value for `print-level' while printing value in `eval-expression'.
924A value of nil means no limit." 924A value of nil means no limit."
925 :group 'lisp 925 :group 'lisp
926 :type '(choice (const :tag "No Limit" nil) integer) 926 :type '(choice (const :tag "No Limit" nil) integer)
927 :version "21.1") 927 :version "21.1")
928 928
929(defcustom eval-expression-print-length 12 929(defcustom eval-expression-print-length 12
930 "*Value to use for `print-length' when printing value in `eval-expression'. 930 "Value for `print-length' while printing value in `eval-expression'.
931A value of nil means no limit." 931A value of nil means no limit."
932 :group 'lisp 932 :group 'lisp
933 :type '(choice (const :tag "No Limit" nil) integer) 933 :type '(choice (const :tag "No Limit" nil) integer)
934 :version "21.1") 934 :version "21.1")
935 935
936(defcustom eval-expression-debug-on-error t 936(defcustom eval-expression-debug-on-error t
937 "*Non-nil means set `debug-on-error' when evaluating in `eval-expression'. 937 "If non-nil set `debug-on-error' to t in `eval-expression'.
938If nil, don't change the value of `debug-on-error'." 938If nil, don't change the value of `debug-on-error'."
939 :group 'lisp 939 :group 'lisp
940 :type 'boolean 940 :type 'boolean
@@ -2247,7 +2247,7 @@ is nil, the buffer substring is returned unaltered.
2247If DELETE is non-nil, the text between BEG and END is deleted 2247If DELETE is non-nil, the text between BEG and END is deleted
2248from the buffer. 2248from the buffer.
2249 2249
2250Point is temporarily set to BEG before caling 2250Point is temporarily set to BEG before calling
2251`buffer-substring-filters', in case the functions need to know 2251`buffer-substring-filters', in case the functions need to know
2252where the text came from. 2252where the text came from.
2253 2253
@@ -3351,25 +3351,27 @@ Outline mode sets this."
3351 (let ((forward (> arg 0)) 3351 (let ((forward (> arg 0))
3352 (part (nth 2 (pos-visible-in-window-p (point) nil t)))) 3352 (part (nth 2 (pos-visible-in-window-p (point) nil t))))
3353 (if (and (consp part) 3353 (if (and (consp part)
3354 (> (setq part (if forward (cdr part) (car part))) 0)) 3354 (> (if forward (cdr part) (car part)) 0))
3355 (set-window-vscroll nil 3355 (set-window-vscroll nil
3356 (if forward 3356 (if forward
3357 (+ (window-vscroll nil t) 3357 (+ (window-vscroll nil t)
3358 (min part 3358 (min (cdr part)
3359 (* (frame-char-height) arg))) 3359 (* (frame-char-height) arg)))
3360 (max 0 3360 (max 0
3361 (- (window-vscroll nil t) 3361 (- (window-vscroll nil t)
3362 (min part 3362 (min (car part)
3363 (* (frame-char-height) (- arg)))))) 3363 (* (frame-char-height) (- arg))))))
3364 t) 3364 t)
3365 (set-window-vscroll nil 0) 3365 (set-window-vscroll nil 0)
3366 (when (line-move-1 arg noerror to-end) 3366 (when (line-move-1 arg noerror to-end)
3367 (sit-for 0) 3367 (when (not forward)
3368 (if (and (not forward) 3368 ;; Update display before calling pos-visible-in-window-p,
3369 (setq part (nth 2 (pos-visible-in-window-p 3369 ;; because it depends on window-start being up-to-date.
3370 (line-beginning-position) nil t))) 3370 (sit-for 0)
3371 (> (cdr part) 0)) 3371 (if (and (setq part (nth 2 (pos-visible-in-window-p
3372 (set-window-vscroll nil (cdr part) t)) 3372 (line-beginning-position) nil t)))
3373 (> (cdr part) 0))
3374 (set-window-vscroll nil (cdr part) t)))
3373 t))) 3375 t)))
3374 (line-move-1 arg noerror to-end))) 3376 (line-move-1 arg noerror to-end)))
3375 3377
@@ -4762,7 +4764,7 @@ Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\
4762 (setq major-mode 'completion-list-mode) 4764 (setq major-mode 'completion-list-mode)
4763 (make-local-variable 'completion-base-size) 4765 (make-local-variable 'completion-base-size)
4764 (setq completion-base-size nil) 4766 (setq completion-base-size nil)
4765 (run-hooks 'completion-list-mode-hook)) 4767 (run-mode-hooks 'completion-list-mode-hook))
4766 4768
4767(defun completion-list-mode-finish () 4769(defun completion-list-mode-finish ()
4768 "Finish setup of the completions buffer. 4770 "Finish setup of the completions buffer.
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index e843ef9f02d..d4caca3ca42 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -557,7 +557,7 @@ symmetrical ones, and the same character twice for the others."
557;; (aset map i nil) 557;; (aset map i nil)
558;; (aset map (+ i 128) nil) 558;; (aset map (+ i 128) nil)
559;; (setq i (1+ i)))) 559;; (setq i (1+ i))))
560;; (run-hooks 'mirror-mode-hook)) 560;; (run-mode-hooks 'mirror-mode-hook))
561 561
562(provide 'skeleton) 562(provide 'skeleton)
563 563
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 7a6e01f2859..a01b9ddb47e 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1306,7 +1306,7 @@ in the selected file.
1306 (if speedbar-track-mouse-flag 1306 (if speedbar-track-mouse-flag
1307 (set (make-local-variable 'track-mouse) t)) ;this could be messy. 1307 (set (make-local-variable 'track-mouse) t)) ;this could be messy.
1308 (setq auto-show-mode nil)) ;no auto-show for Emacs 1308 (setq auto-show-mode nil)) ;no auto-show for Emacs
1309 (run-hooks 'speedbar-mode-hook)) 1309 (run-mode-hooks 'speedbar-mode-hook))
1310 (speedbar-update-contents) 1310 (speedbar-update-contents)
1311 speedbar-buffer) 1311 speedbar-buffer)
1312 1312
diff --git a/lisp/subr.el b/lisp/subr.el
index f284c18ce5e..2fe94e2a3c5 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1853,7 +1853,7 @@ Major mode functions should use this."
1853These hooks will be executed by the first following call to 1853These hooks will be executed by the first following call to
1854`run-mode-hooks' that occurs outside any `delayed-mode-hooks' form. 1854`run-mode-hooks' that occurs outside any `delayed-mode-hooks' form.
1855Only affects hooks run in the current buffer." 1855Only affects hooks run in the current buffer."
1856 (declare (debug t)) 1856 (declare (debug t) (indent 0))
1857 `(progn 1857 `(progn
1858 (make-local-variable 'delay-mode-hooks) 1858 (make-local-variable 'delay-mode-hooks)
1859 (let ((delay-mode-hooks t)) 1859 (let ((delay-mode-hooks t))
@@ -1996,14 +1996,34 @@ STRING should be given if the last search was by `string-match' on STRING."
1996 (buffer-substring-no-properties (match-beginning num) 1996 (buffer-substring-no-properties (match-beginning num)
1997 (match-end num))))) 1997 (match-end num)))))
1998 1998
1999(defun looking-back (regexp &optional limit) 1999(defun looking-back (regexp &optional limit greedy)
2000 "Return non-nil if text before point matches regular expression REGEXP. 2000 "Return non-nil if text before point matches regular expression REGEXP.
2001Like `looking-at' except matches before point, and is slower. 2001Like `looking-at' except matches before point, and is slower.
2002LIMIT if non-nil speeds up the search by specifying how far back the 2002LIMIT if non-nil speeds up the search by specifying how far back the
2003match can start." 2003match can start.
2004 (not (null 2004
2005 (save-excursion 2005If GREEDY is non-nil, extend the match backwards as far as possible,
2006 (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t))))) 2006stopping when a single additional previous character cannot be part
2007of a match for REGEXP."
2008 (let ((start (point))
2009 (pos
2010 (save-excursion
2011 (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)
2012 (point)))))
2013 (if (and greedy pos)
2014 (save-restriction
2015 (narrow-to-region (point-min) start)
2016 (while (and (> pos (point-min))
2017 (save-excursion
2018 (goto-char pos)
2019 (backward-char 1)
2020 (looking-at (concat "\\(?:" regexp "\\)\\'"))))
2021 (setq pos (1- pos)))
2022 (save-excursion
2023 (goto-char pos)
2024 (looking-at (concat "\\(?:" regexp "\\)\\'")))))
2025 (not (null pos))))
2026
2007 2027
2008(defconst split-string-default-separators "[ \f\t\n\r\v]+" 2028(defconst split-string-default-separators "[ \f\t\n\r\v]+"
2009 "The default value of separators for `split-string'. 2029 "The default value of separators for `split-string'.
diff --git a/lisp/term.el b/lisp/term.el
index 7f8347a986d..48460b3833d 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1100,7 +1100,7 @@ Entry to this mode runs the hooks on `term-mode-hook'."
1100 (make-local-variable 'term-current-face) 1100 (make-local-variable 'term-current-face)
1101 (make-local-variable 'term-pending-frame) 1101 (make-local-variable 'term-pending-frame)
1102 (setq term-pending-frame nil) 1102 (setq term-pending-frame nil)
1103 (run-hooks 'term-mode-hook) 1103 (run-mode-hooks 'term-mode-hook)
1104 (term-if-xemacs 1104 (term-if-xemacs
1105 (set-buffer-menubar 1105 (set-buffer-menubar
1106 (append current-menubar (list term-terminal-menu)))) 1106 (append current-menubar (list term-terminal-menu))))
@@ -4177,7 +4177,7 @@ the process. Any more args are arguments to PROGRAM."
4177;;; (make-local-variable 'shell-directory-stack) 4177;;; (make-local-variable 'shell-directory-stack)
4178;;; (setq shell-directory-stack nil) 4178;;; (setq shell-directory-stack nil)
4179;;; (add-hook 'term-input-filter-functions 'shell-directory-tracker) 4179;;; (add-hook 'term-input-filter-functions 'shell-directory-tracker)
4180;;; (run-hooks 'shell-mode-hook)) 4180;;; (run-mode-hooks 'shell-mode-hook))
4181;;; 4181;;;
4182;;; 4182;;;
4183;;; Completion for term-mode users 4183;;; Completion for term-mode users
diff --git a/lisp/terminal.el b/lisp/terminal.el
index b84b1b6ed00..6b055200359 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -1,6 +1,6 @@
1;;; terminal.el --- terminal emulator for GNU Emacs 1;;; terminal.el --- terminal emulator for GNU Emacs
2 2
3;; Copyright (C) 1986,87,88,89,93,94 Free Software Foundation, Inc. 3;; Copyright (C) 1986, 1987, 1988, 1989, 1993, 1994 Free Software Foundation, Inc.
4 4
5;; Author: Richard Mlynarik <mly@eddie.mit.edu> 5;; Author: Richard Mlynarik <mly@eddie.mit.edu>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -537,7 +537,7 @@ together with a command \\<terminal-edit-map>to return to terminal emulation: \\
537 (setq mode-name "Terminal Edit") 537 (setq mode-name "Terminal Edit")
538 (setq mode-line-modified (default-value 'mode-line-modified)) 538 (setq mode-line-modified (default-value 'mode-line-modified))
539 (setq mode-line-process nil) 539 (setq mode-line-process nil)
540 (run-hooks 'terminal-edit-mode-hook)) 540 (run-mode-hooks 'terminal-edit-mode-hook))
541 541
542(defun te-edit () 542(defun te-edit ()
543 "Start editing the terminal emulator buffer with ordinary Emacs commands." 543 "Start editing the terminal emulator buffer with ordinary Emacs commands."
diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el
index 400f87205c4..ac32eccd9ec 100644
--- a/lisp/textmodes/dns-mode.el
+++ b/lisp/textmodes/dns-mode.el
@@ -48,7 +48,8 @@
48;;; Code: 48;;; Code:
49 49
50(defgroup dns-mode nil 50(defgroup dns-mode nil
51 "DNS master file mode configuration.") 51 "DNS master file mode configuration."
52 :group 'data)
52 53
53(defconst dns-mode-classes '("IN" "CS" "CH" "HS") 54(defconst dns-mode-classes '("IN" "CS" "CH" "HS")
54 "List of strings with known DNS classes.") 55 "List of strings with known DNS classes.")
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index dbe8b1cfbc6..500c9c4e113 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1,6 +1,6 @@
1;;; flyspell.el --- on-the-fly spell checker 1;;; flyspell.el --- on-the-fly spell checker
2 2
3;; Copyright (C) 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr> 5;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -56,6 +56,21 @@
56 :group 'processes) 56 :group 'processes)
57 57
58;*---------------------------------------------------------------------*/ 58;*---------------------------------------------------------------------*/
59;* Which emacs are we currently running */
60;*---------------------------------------------------------------------*/
61(defvar flyspell-emacs
62 (cond
63 ((string-match "XEmacs" emacs-version)
64 'xemacs)
65 (t
66 'emacs))
67 "The type of Emacs we are currently running.")
68
69(defvar flyspell-use-local-map
70 (or (eq flyspell-emacs 'xemacs)
71 (not (string< emacs-version "20"))))
72
73;*---------------------------------------------------------------------*/
59;* User configuration ... */ 74;* User configuration ... */
60;*---------------------------------------------------------------------*/ 75;*---------------------------------------------------------------------*/
61(defcustom flyspell-highlight-flag t 76(defcustom flyspell-highlight-flag t
@@ -109,7 +124,8 @@ is highlighted."
109 delete-backward-char 124 delete-backward-char
110 backward-or-forward-delete-char 125 backward-or-forward-delete-char
111 delete-char 126 delete-char
112 scrollbar-vertical-drag) 127 scrollbar-vertical-drag
128 backward-delete-char-untabify)
113 "The standard list of delayed commands for Flyspell. 129 "The standard list of delayed commands for Flyspell.
114See `flyspell-delayed-commands'." 130See `flyspell-delayed-commands'."
115 :group 'flyspell 131 :group 'flyspell
@@ -199,15 +215,15 @@ http://strw.leidenuniv.nl/~dominik/Tools"
199 :type '(repeat (string))) 215 :type '(repeat (string)))
200 216
201(defcustom flyspell-abbrev-p 217(defcustom flyspell-abbrev-p
202 t 218 nil
203 "*If true, add correction to abbreviation table." 219 "*If non-nil, add correction to abbreviation table."
204 :group 'flyspell 220 :group 'flyspell
205 :version "21.1" 221 :version "21.1"
206 :type 'boolean) 222 :type 'boolean)
207 223
208(defcustom flyspell-use-global-abbrev-table-p 224(defcustom flyspell-use-global-abbrev-table-p
209 nil 225 nil
210 "*If true, prefer global abbrev table to local abbrev table." 226 "*If non-nil, prefer global abbrev table to local abbrev table."
211 :group 'flyspell 227 :group 'flyspell
212 :version "21.1" 228 :version "21.1"
213 :type 'boolean) 229 :type 'boolean)
@@ -224,10 +240,12 @@ Set this to nil if you don't want a modeline indicator."
224If the region is smaller than this number of characters, 240If the region is smaller than this number of characters,
225`flyspell-region' checks the words sequentially using regular 241`flyspell-region' checks the words sequentially using regular
226flyspell methods. Else, if the region is large, a new Ispell process is 242flyspell methods. Else, if the region is large, a new Ispell process is
227spawned for speed." 243spawned for speed.
244
245If `flyspell-large-region' is nil, all regions are treated as small."
228 :group 'flyspell 246 :group 'flyspell
229 :version "21.1" 247 :version "21.1"
230 :type 'number) 248 :type '(choice number boolean))
231 249
232(defcustom flyspell-insert-function (function insert) 250(defcustom flyspell-insert-function (function insert)
233 "*Function for inserting word by flyspell upon correction." 251 "*Function for inserting word by flyspell upon correction."
@@ -244,6 +262,20 @@ spawned for speed."
244 :group 'flyspell 262 :group 'flyspell
245 :type '(choice string (const nil))) 263 :type '(choice string (const nil)))
246 264
265(defcustom flyspell-use-meta-tab t
266 "*Non-nil means that flyspell uses META-TAB to correct word."
267 :group 'flyspell
268 :type 'boolean)
269
270(defcustom flyspell-auto-correct-binding
271 (cond
272 ((eq flyspell-emacs 'xemacs)
273 [(control \;)])
274 (t
275 [?\C-\;]))
276 "The key binding for flyspell auto correction."
277 :group 'flyspell)
278
247;*---------------------------------------------------------------------*/ 279;*---------------------------------------------------------------------*/
248;* Mode specific options */ 280;* Mode specific options */
249;* ------------------------------------------------------------- */ 281;* ------------------------------------------------------------- */
@@ -267,17 +299,24 @@ property of the major mode name.")
267(put 'message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify) 299(put 'message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
268(defun mail-mode-flyspell-verify () 300(defun mail-mode-flyspell-verify ()
269 "This function is used for `flyspell-generic-check-word-p' in Mail mode." 301 "This function is used for `flyspell-generic-check-word-p' in Mail mode."
270 (let ((in-headers (save-excursion 302 (let ((header-end (save-excursion
271 ;; When mail-header-separator is "", 303 (goto-char (point-min))
272 ;; it is likely to be found in both directions. 304 (re-search-forward
273 (not (re-search-backward (concat "^" (regexp-quote mail-header-separator) "$") nil t)))) 305 (concat "^"
274 (in-signature (save-excursion 306 (regexp-quote mail-header-separator)
275 (re-search-backward message-signature-separator nil t)))) 307 "$")
276 (cond (in-headers 308 nil t)
309 (point)))
310 (signature-begin (save-excursion
311 (goto-char (point-max))
312 (re-search-backward message-signature-separator
313 nil t)
314 (point))))
315 (cond ((< (point) header-end)
277 (and (save-excursion (beginning-of-line) 316 (and (save-excursion (beginning-of-line)
278 (looking-at "^Subject:")) 317 (looking-at "^Subject:"))
279 (> (point) (match-end 0)))) 318 (> (point) (match-end 0))))
280 (in-signature 319 ((> (point) signature-begin)
281 nil) 320 nil)
282 (t 321 (t
283 (save-excursion 322 (save-excursion
@@ -351,7 +390,8 @@ property of the major mode name.")
351 "Turn on `flyspell-mode' for comments and strings." 390 "Turn on `flyspell-mode' for comments and strings."
352 (interactive) 391 (interactive)
353 (setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify) 392 (setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify)
354 (flyspell-mode 1)) 393 (flyspell-mode 1)
394 (run-hooks 'flyspell-prog-mode-hook))
355 395
356;*---------------------------------------------------------------------*/ 396;*---------------------------------------------------------------------*/
357;* Overlay compatibility */ 397;* Overlay compatibility */
@@ -366,21 +406,6 @@ property of the major mode name.")
366(autoload 'previous-overlay-change "overlay" "Overlay compatibility kit." t) 406(autoload 'previous-overlay-change "overlay" "Overlay compatibility kit." t)
367 407
368;*---------------------------------------------------------------------*/ 408;*---------------------------------------------------------------------*/
369;* Which emacs are we currently running */
370;*---------------------------------------------------------------------*/
371(defvar flyspell-emacs
372 (cond
373 ((string-match "XEmacs" emacs-version)
374 'xemacs)
375 (t
376 'emacs))
377 "The type of Emacs we are currently running.")
378
379(defvar flyspell-use-local-map
380 (or (eq flyspell-emacs 'xemacs)
381 (not (string< emacs-version "20"))))
382
383;*---------------------------------------------------------------------*/
384;* The minor mode declaration. */ 409;* The minor mode declaration. */
385;*---------------------------------------------------------------------*/ 410;*---------------------------------------------------------------------*/
386(eval-when-compile (defvar flyspell-local-mouse-map)) 411(eval-when-compile (defvar flyspell-local-mouse-map))
@@ -391,9 +416,13 @@ property of the major mode name.")
391 416
392(defvar flyspell-mouse-map 417(defvar flyspell-mouse-map
393 (let ((map (make-sparse-keymap))) 418 (let ((map (make-sparse-keymap)))
419 (if flyspell-use-meta-tab
420 (define-key map "\M-\t" #'flyspell-auto-correct-word))
394 (define-key map (if (featurep 'xemacs) [button2] [down-mouse-2]) 421 (define-key map (if (featurep 'xemacs) [button2] [down-mouse-2])
395 #'flyspell-correct-word) 422 #'flyspell-correct-word)
396 (define-key map "\M-\t" #'flyspell-auto-correct-word) 423 (define-key map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
424 (define-key map [(control \,)] 'flyspell-goto-next-error)
425 (define-key map [(control \.)] 'flyspell-auto-correct-word)
397 map)) 426 map))
398 427
399;;;###autoload 428;;;###autoload
@@ -404,7 +433,18 @@ property of the major mode name.")
404 (setq minor-mode-map-alist 433 (setq minor-mode-map-alist
405 (cons (cons 'flyspell-mode flyspell-mode-map) 434 (cons (cons 'flyspell-mode flyspell-mode-map)
406 minor-mode-map-alist))) 435 minor-mode-map-alist)))
407 (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word)) 436 (if flyspell-use-meta-tab
437 (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word))
438 (cond
439 ((eq flyspell-emacs 'xemacs)
440 (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
441 (define-key flyspell-mode-map [(control \,)] 'flyspell-goto-next-error)
442 (define-key flyspell-mode-map [(control \.)] 'flyspell-auto-correct-word))
443 (flyspell-use-local-map
444 (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
445 (define-key flyspell-mode-map [?\C-\,] 'flyspell-goto-next-error)
446 (define-key flyspell-mode-map [?\C-\.] 'flyspell-auto-correct-word))))
447
408 448
409;; the name of the overlay property that defines the keymap 449;; the name of the overlay property that defines the keymap
410(defvar flyspell-overlay-keymap-property-name 'keymap) 450(defvar flyspell-overlay-keymap-property-name 'keymap)
@@ -456,7 +496,8 @@ With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive.
456Bindings: 496Bindings:
457\\[ispell-word]: correct words (using Ispell). 497\\[ispell-word]: correct words (using Ispell).
458\\[flyspell-auto-correct-word]: automatically correct word. 498\\[flyspell-auto-correct-word]: automatically correct word.
459\\[flyspell-correct-word] (or mouse-2): popup correct words. 499\\[flyspell-auto-correct-previous-word]: automatically correct the last misspelled word.
500\\[flyspell-correct-word] (or down-mouse-2): popup correct words.
460 501
461Hooks: 502Hooks:
462This runs `flyspell-mode-hook' after flyspell is entered. 503This runs `flyspell-mode-hook' after flyspell is entered.
@@ -512,22 +553,19 @@ in your .emacs file.
512 (and (consp ws) (window-minibuffer-p (car ws))))) 553 (and (consp ws) (window-minibuffer-p (car ws)))))
513 554
514;*---------------------------------------------------------------------*/ 555;*---------------------------------------------------------------------*/
515;* flyspell-version ... */
516;*---------------------------------------------------------------------*/
517;;;###autoload
518(defun flyspell-version ()
519 "The flyspell version"
520 (interactive)
521 "1.6h")
522
523;*---------------------------------------------------------------------*/
524;* flyspell-accept-buffer-local-defs ... */ 556;* flyspell-accept-buffer-local-defs ... */
525;*---------------------------------------------------------------------*/ 557;*---------------------------------------------------------------------*/
526(defun flyspell-accept-buffer-local-defs () 558(defun flyspell-accept-buffer-local-defs ()
527 (ispell-accept-buffer-local-defs) 559 ;; strange problem. If buffer in current window has font-lock turned on,
560 ;; but SET-BUFFER was called to point to an invisible buffer, this ispell
561 ;; call will reset the buffer to the buffer in the current window. However,
562 ;; it only happens at startup (fix by Albert L. Ting).
563 (let ((buf (current-buffer)))
564 (ispell-accept-buffer-local-defs)
565 (set-buffer buf))
528 (if (not (and (eq flyspell-dash-dictionary ispell-dictionary) 566 (if (not (and (eq flyspell-dash-dictionary ispell-dictionary)
529 (eq flyspell-dash-local-dictionary ispell-local-dictionary))) 567 (eq flyspell-dash-local-dictionary ispell-local-dictionary)))
530 ;; the dictionary has changed 568 ;; The dictionary has changed
531 (progn 569 (progn
532 (setq flyspell-dash-dictionary ispell-dictionary) 570 (setq flyspell-dash-dictionary ispell-dictionary)
533 (setq flyspell-dash-local-dictionary ispell-local-dictionary) 571 (setq flyspell-dash-local-dictionary ispell-local-dictionary)
@@ -566,6 +604,22 @@ in your .emacs file.
566 (let ((mode-predicate (get major-mode 'flyspell-mode-predicate))) 604 (let ((mode-predicate (get major-mode 'flyspell-mode-predicate)))
567 (if mode-predicate 605 (if mode-predicate
568 (setq flyspell-generic-check-word-p mode-predicate))) 606 (setq flyspell-generic-check-word-p mode-predicate)))
607 ;; work around the fact that the `local-map' text-property replaces the
608 ;; buffer's local map rather than shadowing it.
609 (set (make-local-variable 'flyspell-mouse-map)
610 (let ((map (copy-keymap flyspell-mouse-map)))
611 (set-keymap-parent map (current-local-map))
612 (if (and (eq flyspell-emacs 'emacs)
613 (not (string< emacs-version "20")))
614 (define-key map '[tool-bar] nil))
615 map))
616 (set (make-local-variable 'flyspell-mode-map)
617 (let ((map (copy-keymap flyspell-mode-map)))
618 (set-keymap-parent map (current-local-map))
619 (if (and (eq flyspell-emacs 'emacs)
620 (not (string< emacs-version "20")))
621 (define-key map '[tool-bar] nil))
622 map))
569 ;; the welcome message 623 ;; the welcome message
570 (if (and flyspell-issue-message-flag 624 (if (and flyspell-issue-message-flag
571 flyspell-issue-welcome-flag 625 flyspell-issue-welcome-flag
@@ -624,9 +678,11 @@ not the very same deplacement command."
624(defvar flyspell-word-cache-start nil) 678(defvar flyspell-word-cache-start nil)
625(defvar flyspell-word-cache-end nil) 679(defvar flyspell-word-cache-end nil)
626(defvar flyspell-word-cache-word nil) 680(defvar flyspell-word-cache-word nil)
681(defvar flyspell-word-cache-result '_)
627(make-variable-buffer-local 'flyspell-word-cache-start) 682(make-variable-buffer-local 'flyspell-word-cache-start)
628(make-variable-buffer-local 'flyspell-word-cache-end) 683(make-variable-buffer-local 'flyspell-word-cache-end)
629(make-variable-buffer-local 'flyspell-word-cache-word) 684(make-variable-buffer-local 'flyspell-word-cache-word)
685(make-variable-buffer-local 'flyspell-word-cache-result)
630 686
631;*---------------------------------------------------------------------*/ 687;*---------------------------------------------------------------------*/
632;* The flyspell pre-hook, store the current position. In the */ 688;* The flyspell pre-hook, store the current position. In the */
@@ -678,7 +734,7 @@ not the very same deplacement command."
678;* flyspell-check-pre-word-p ... */ 734;* flyspell-check-pre-word-p ... */
679;*---------------------------------------------------------------------*/ 735;*---------------------------------------------------------------------*/
680(defun flyspell-check-pre-word-p () 736(defun flyspell-check-pre-word-p ()
681 "Return non-nil if we should to check the word before point. 737 "Return non-nil if we should check the word before point.
682More precisely, it applies to the word that was before point 738More precisely, it applies to the word that was before point
683before the current command." 739before the current command."
684 (cond 740 (cond
@@ -735,7 +791,7 @@ before the current command."
735The answer depends of several criteria. 791The answer depends of several criteria.
736Mostly we check word delimiters." 792Mostly we check word delimiters."
737 (cond 793 (cond
738 ((and (eq (char-after start) ?\n) (> stop start)) 794 ((and (memq (char-after start) '(?\n ? )) (> stop start))
739 t) 795 t)
740 ((not (numberp flyspell-pre-point)) 796 ((not (numberp flyspell-pre-point))
741 t) 797 t)
@@ -774,9 +830,7 @@ Mostly we check word delimiters."
774 ((get this-command 'flyspell-delayed) 830 ((get this-command 'flyspell-delayed)
775 ;; the current command is not delayed, that 831 ;; the current command is not delayed, that
776 ;; is that we must check the word now 832 ;; is that we must check the word now
777 (if (fboundp 'about-xemacs) 833 (sit-for flyspell-delay))
778 (sit-for flyspell-delay nil)
779 (sit-for flyspell-delay 0 nil)))
780 (t t))) 834 (t t)))
781 (t t))) 835 (t t)))
782 836
@@ -924,7 +978,9 @@ Mostly we check word delimiters."
924 ;; when a word is not checked because of a delayed command 978 ;; when a word is not checked because of a delayed command
925 ;; we do not disable the ispell cache. 979 ;; we do not disable the ispell cache.
926 (if (and (symbolp this-command) (get this-command 'flyspell-delayed)) 980 (if (and (symbolp this-command) (get this-command 'flyspell-delayed))
927 (setq flyspell-word-cache-end -1)))) 981 (progn
982 (setq flyspell-word-cache-end -1)
983 (setq flyspell-word-cache-result '_)))))
928 (while (consp flyspell-changes) 984 (while (consp flyspell-changes)
929 (let ((start (car (car flyspell-changes))) 985 (let ((start (car (car flyspell-changes)))
930 (stop (cdr (car flyspell-changes)))) 986 (stop (cdr (car flyspell-changes))))
@@ -949,6 +1005,34 @@ Mostly we check word delimiters."
949 (message (format "mispelling `%s' %S" word replacements))))) 1005 (message (format "mispelling `%s' %S" word replacements)))))
950 1006
951;*---------------------------------------------------------------------*/ 1007;*---------------------------------------------------------------------*/
1008;* flyspell-word-search-backward ... */
1009;*---------------------------------------------------------------------*/
1010(defun flyspell-word-search-backward (word bound)
1011 (save-excursion
1012 (let ((r '())
1013 p)
1014 (while (and (not r) (setq p (search-backward word bound t)))
1015 (let ((lw (flyspell-get-word '())))
1016 (if (and (consp lw) (string-equal (car lw) word))
1017 (setq r p)
1018 (goto-char p))))
1019 r)))
1020
1021;*---------------------------------------------------------------------*/
1022;* flyspell-word-search-forward ... */
1023;*---------------------------------------------------------------------*/
1024(defun flyspell-word-search-forward (word bound)
1025 (save-excursion
1026 (let ((r '())
1027 p)
1028 (while (and (not r) (setq p (search-forward word bound t)))
1029 (let ((lw (flyspell-get-word '())))
1030 (if (and (consp lw) (string-equal (car lw) word))
1031 (setq r p)
1032 (goto-char (1+ p)))))
1033 r)))
1034
1035;*---------------------------------------------------------------------*/
952;* flyspell-word ... */ 1036;* flyspell-word ... */
953;*---------------------------------------------------------------------*/ 1037;*---------------------------------------------------------------------*/
954(defun flyspell-word (&optional following) 1038(defun flyspell-word (&optional following)
@@ -963,7 +1047,7 @@ Mostly we check word delimiters."
963 (if (or (eq flyspell-word nil) 1047 (if (or (eq flyspell-word nil)
964 (and (fboundp flyspell-generic-check-word-p) 1048 (and (fboundp flyspell-generic-check-word-p)
965 (not (funcall flyspell-generic-check-word-p)))) 1049 (not (funcall flyspell-generic-check-word-p))))
966 '() 1050 t
967 (progn 1051 (progn
968 ;; destructure return flyspell-word info list. 1052 ;; destructure return flyspell-word info list.
969 (setq start (car (cdr flyspell-word)) 1053 (setq start (car (cdr flyspell-word))
@@ -972,21 +1056,24 @@ Mostly we check word delimiters."
972 ;; before checking in the directory, we check for doublons. 1056 ;; before checking in the directory, we check for doublons.
973 (cond 1057 (cond
974 ((and (or (not (eq ispell-parser 'tex)) 1058 ((and (or (not (eq ispell-parser 'tex))
975 (not (eq (char-after start) ?\\))) 1059 (and (> start (point-min))
1060 (not (eq (char-after (1- start)) ?}))
1061 (not (eq (char-after (1- start)) ?\\))))
976 flyspell-mark-duplications-flag 1062 flyspell-mark-duplications-flag
977 (save-excursion 1063 (save-excursion
978 (goto-char start) 1064 (goto-char (1- start))
979 (word-search-backward word 1065 (let ((p (flyspell-word-search-backward
980 (- start 1066 word
981 (+ 1 (- end start))) 1067 (- start (1+ (- end start))))))
982 t))) 1068 (and p (/= p (1- start))))))
983 ;; yes, this is a doublon 1069 ;; yes, this is a doublon
984 (flyspell-highlight-incorrect-region start end 'doublon)) 1070 (flyspell-highlight-incorrect-region start end 'doublon)
1071 nil)
985 ((and (eq flyspell-word-cache-start start) 1072 ((and (eq flyspell-word-cache-start start)
986 (eq flyspell-word-cache-end end) 1073 (eq flyspell-word-cache-end end)
987 (string-equal flyspell-word-cache-word word)) 1074 (string-equal flyspell-word-cache-word word))
988 ;; this word had been already checked, we skip 1075 ;; this word had been already checked, we skip
989 nil) 1076 flyspell-word-cache-result)
990 ((and (eq ispell-parser 'tex) 1077 ((and (eq ispell-parser 'tex)
991 (flyspell-tex-command-p flyspell-word)) 1078 (flyspell-tex-command-p flyspell-word))
992 ;; this is a correct word (because a tex command) 1079 ;; this is a correct word (because a tex command)
@@ -1016,59 +1103,68 @@ Mostly we check word delimiters."
1016 (setq ispell-filter (cdr ispell-filter)) 1103 (setq ispell-filter (cdr ispell-filter))
1017 (if (consp ispell-filter) 1104 (if (consp ispell-filter)
1018 (setq poss (ispell-parse-output (car ispell-filter)))) 1105 (setq poss (ispell-parse-output (car ispell-filter))))
1019 (cond ((eq poss t) 1106 (let ((res (cond ((eq poss t)
1020 ;; correct 1107 ;; correct
1021 (flyspell-unhighlight-at start) 1108 (setq flyspell-word-cache-result t)
1022 (if (> end start) 1109 (flyspell-unhighlight-at start)
1023 (flyspell-unhighlight-at (- end 1))) 1110 (if (> end start)
1024 t) 1111 (flyspell-unhighlight-at (- end 1)))
1025 ((and (stringp poss) flyspell-highlight-flag) 1112 t)
1026 ;; correct 1113 ((and (stringp poss) flyspell-highlight-flag)
1027 (flyspell-unhighlight-at start) 1114 ;; correct
1028 (if (> end start) 1115 (setq flyspell-word-cache-result t)
1029 (flyspell-unhighlight-at (- end 1))) 1116 (flyspell-unhighlight-at start)
1030 t) 1117 (if (> end start)
1031 ((null poss) 1118 (flyspell-unhighlight-at (- end 1)))
1032 (flyspell-unhighlight-at start) 1119 t)
1033 (if (> end start) 1120 ((null poss)
1034 (flyspell-unhighlight-at (- end 1)))) 1121 (setq flyspell-word-cache-result t)
1035 ((or (and (< flyspell-duplicate-distance 0) 1122 (flyspell-unhighlight-at start)
1036 (or (save-excursion 1123 (if (> end start)
1037 (goto-char start) 1124 (flyspell-unhighlight-at (- end 1)))
1038 (word-search-backward word 1125 t)
1039 (point-min) 1126 ((or (and (< flyspell-duplicate-distance 0)
1040 t)) 1127 (or (save-excursion
1041 (save-excursion 1128 (goto-char start)
1042 (goto-char end) 1129 (flyspell-word-search-backward
1043 (word-search-forward word 1130 word
1044 (point-max) 1131 (point-min)))
1045 t)))) 1132 (save-excursion
1046 (and (> flyspell-duplicate-distance 0) 1133 (goto-char end)
1047 (or (save-excursion 1134 (flyspell-word-search-forward
1048 (goto-char start) 1135 word
1049 (word-search-backward 1136 (point-max)))))
1050 word 1137 (and (> flyspell-duplicate-distance 0)
1051 (- start 1138 (or (save-excursion
1052 flyspell-duplicate-distance) 1139 (goto-char start)
1053 t)) 1140 (flyspell-word-search-backward
1054 (save-excursion 1141 word
1055 (goto-char end) 1142 (- start
1056 (word-search-forward 1143 flyspell-duplicate-distance)))
1057 word 1144 (save-excursion
1058 (+ end 1145 (goto-char end)
1059 flyspell-duplicate-distance) 1146 (flyspell-word-search-forward
1060 t))))) 1147 word
1061 (if flyspell-highlight-flag 1148 (+ end
1062 (flyspell-highlight-duplicate-region start end poss) 1149 flyspell-duplicate-distance))))))
1063 (message (format "duplicate `%s'" word)))) 1150 (setq flyspell-word-cache-result nil)
1064 (t 1151 (if flyspell-highlight-flag
1065 ;; incorrect highlight the location 1152 (flyspell-highlight-duplicate-region
1066 (if flyspell-highlight-flag 1153 start end poss)
1067 (flyspell-highlight-incorrect-region start end poss) 1154 (message (format "duplicate `%s'" word)))
1068 (flyspell-notify-misspell start end word poss)))) 1155 nil)
1069 ;; return to original location 1156 (t
1070 (goto-char cursor-location) 1157 (setq flyspell-word-cache-result nil)
1071 (if ispell-quit (setq ispell-quit nil))))))))) 1158 ;; incorrect highlight the location
1159 (if flyspell-highlight-flag
1160 (flyspell-highlight-incorrect-region
1161 start end poss)
1162 (flyspell-notify-misspell start end word poss))
1163 nil))))
1164 ;; return to original location
1165 (goto-char cursor-location)
1166 (if ispell-quit (setq ispell-quit nil))
1167 res))))))))
1072 1168
1073;*---------------------------------------------------------------------*/ 1169;*---------------------------------------------------------------------*/
1074;* flyspell-tex-math-initialized ... */ 1170;* flyspell-tex-math-initialized ... */
@@ -1175,30 +1271,31 @@ this function changes the last char of the `ispell-casechars' string."
1175;*---------------------------------------------------------------------*/ 1271;*---------------------------------------------------------------------*/
1176;* flyspell-get-word ... */ 1272;* flyspell-get-word ... */
1177;*---------------------------------------------------------------------*/ 1273;*---------------------------------------------------------------------*/
1178(defun flyspell-get-word (following) 1274(defun flyspell-get-word (following &optional extra-otherchars)
1179 "Return the word for spell-checking according to Ispell syntax. 1275 "Return the word for spell-checking according to Ispell syntax.
1180If argument FOLLOWING is non-nil or if `ispell-following-word' 1276If optional argument FOLLOWING is non-nil or if `flyspell-following-word'
1181is non-nil when called interactively, then the following word 1277is non-nil when called interactively, then the following word
1182\(rather than preceding\) is checked when the cursor is not over a word. 1278\(rather than preceding\) is checked when the cursor is not over a word.
1183Optional second argument contains other chars that can be included in word 1279Optional second argument contains otherchars that can be included in word
1184many times. 1280many times.
1185 1281
1186Word syntax described by `ispell-dictionary-alist' (which see)." 1282Word syntax described by `flyspell-dictionary-alist' (which see)."
1187 (let* ((flyspell-casechars (flyspell-get-casechars)) 1283 (let* ((flyspell-casechars (flyspell-get-casechars))
1188 (flyspell-not-casechars (flyspell-get-not-casechars)) 1284 (flyspell-not-casechars (flyspell-get-not-casechars))
1189 (ispell-otherchars (ispell-get-otherchars)) 1285 (ispell-otherchars (ispell-get-otherchars))
1190 (ispell-many-otherchars-p (ispell-get-many-otherchars-p)) 1286 (ispell-many-otherchars-p (ispell-get-many-otherchars-p))
1191 (word-regexp (if (string< "" ispell-otherchars) 1287 (word-regexp (concat flyspell-casechars
1192 (concat flyspell-casechars 1288 "+\\("
1193 "+\\(" 1289 (if (not (string= "" ispell-otherchars))
1194 ispell-otherchars 1290 (concat ispell-otherchars "?"))
1195 "?" 1291 (if extra-otherchars
1196 flyspell-casechars 1292 (concat extra-otherchars "?"))
1197 "+\\)" 1293 flyspell-casechars
1198 (if ispell-many-otherchars-p 1294 "+\\)"
1199 "*" "?")) 1295 (if (or ispell-many-otherchars-p
1200 (concat flyspell-casechars "+"))) 1296 extra-otherchars)
1201 did-it-once 1297 "*" "?")))
1298 did-it-once prevpt
1202 start end word) 1299 start end word)
1203 ;; find the word 1300 ;; find the word
1204 (if (not (looking-at flyspell-casechars)) 1301 (if (not (looking-at flyspell-casechars))
@@ -1207,21 +1304,26 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
1207 (re-search-backward flyspell-casechars (point-min) t))) 1304 (re-search-backward flyspell-casechars (point-min) t)))
1208 ;; move to front of word 1305 ;; move to front of word
1209 (re-search-backward flyspell-not-casechars (point-min) 'start) 1306 (re-search-backward flyspell-not-casechars (point-min) 'start)
1210 (let ((pos nil)) 1307 (while (and (or (and (not (string= "" ispell-otherchars))
1211 (if (string< "" ispell-otherchars) 1308 (looking-at ispell-otherchars))
1212 (while (and (looking-at ispell-otherchars) 1309 (and extra-otherchars (looking-at extra-otherchars)))
1213 (not (bobp)) 1310 (not (bobp))
1214 (or (not did-it-once) 1311 (or (not did-it-once)
1215 ispell-many-otherchars-p) 1312 ispell-many-otherchars-p)
1216 (not (eq pos (point)))) 1313 (not (eq prevpt (point))))
1217 (setq pos (point)) 1314 (if (and extra-otherchars (looking-at extra-otherchars))
1218 (setq did-it-once t) 1315 (progn
1219 (backward-char 1) 1316 (backward-char 1)
1220 (if (looking-at flyspell-casechars) 1317 (if (looking-at flyspell-casechars)
1221 (re-search-backward flyspell-not-casechars (point-min) 'move) 1318 (re-search-backward flyspell-not-casechars (point-min) 'move)))
1222 (backward-char -1))))) 1319 (setq did-it-once t
1320 prevpt (point))
1321 (backward-char 1)
1322 (if (looking-at flyspell-casechars)
1323 (re-search-backward flyspell-not-casechars (point-min) 'move)
1324 (backward-char -1))))
1223 ;; Now mark the word and save to string. 1325 ;; Now mark the word and save to string.
1224 (if (eq (re-search-forward word-regexp (point-max) t) nil) 1326 (if (not (re-search-forward word-regexp (point-max) t))
1225 nil 1327 nil
1226 (progn 1328 (progn
1227 (setq start (match-beginning 0) 1329 (setq start (match-beginning 0)
@@ -1280,25 +1382,37 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
1280 (set-buffer buffer) 1382 (set-buffer buffer)
1281 (goto-char (point-min)) 1383 (goto-char (point-min))
1282 (let ((size (- flyspell-large-region-end flyspell-large-region-beg)) 1384 (let ((size (- flyspell-large-region-end flyspell-large-region-beg))
1283 (start flyspell-large-region-beg)) 1385 (start flyspell-large-region-beg)
1386 (pword "")
1387 (pcount 1))
1284 ;; now we are done with ispell, we have to find the word in 1388 ;; now we are done with ispell, we have to find the word in
1285 ;; the initial buffer 1389 ;; the initial buffer
1286 (while (< (point) (- (point-max) 1)) 1390 (while (< (point) (- (point-max) 1))
1287 ;; we have to fetch the incorrect word 1391 ;; we have to fetch the incorrect word
1288 (if (re-search-forward "\\([^\n]+\\)\n" (point-max) t) 1392 (if (re-search-forward "\\([^\n]+\\)\n" (point-max) t)
1289 (let ((word (match-string 1))) 1393 (let ((word (match-string 1)))
1394 (if (string= word pword)
1395 (setq pcount (1+ pcount))
1396 (progn
1397 (setq pword word)
1398 (setq pcount 1)))
1290 (goto-char (match-end 0)) 1399 (goto-char (match-end 0))
1291 (set-buffer flyspell-large-region-buffer)
1292 (goto-char flyspell-large-region-beg)
1293 (if flyspell-issue-message-flag 1400 (if flyspell-issue-message-flag
1294 (message "Spell Checking...%d%% [%s]" 1401 (message "Spell Checking...%d%% [%s]"
1295 (* 100 (/ (float (- (point) start)) size)) 1402 (* 100 (/ (float (point)) (point-max)))
1296 word)) 1403 word))
1297 (if (search-forward word flyspell-large-region-end t) 1404 (set-buffer flyspell-large-region-buffer)
1405 (goto-char flyspell-large-region-beg)
1406 (let ((keep t)
1407 (n 0))
1408 (while (and (or (< n pcount) keep)
1409 (search-forward word flyspell-large-region-end t))
1298 (progn 1410 (progn
1299 (setq flyspell-large-region-beg (point))
1300 (goto-char (- (point) 1)) 1411 (goto-char (- (point) 1))
1301 (flyspell-word))) 1412 (setq n (1+ n))
1413 (setq keep (flyspell-word))))
1414 (if (= n pcount)
1415 (setq flyspell-large-region-beg (point))))
1302 (set-buffer buffer)) 1416 (set-buffer buffer))
1303 (goto-char (point-max))))) 1417 (goto-char (point-max)))))
1304 ;; we are done 1418 ;; we are done
@@ -1370,7 +1484,7 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
1370 (let ((old beg)) 1484 (let ((old beg))
1371 (setq beg end) 1485 (setq beg end)
1372 (setq end old))) 1486 (setq end old)))
1373 (if (> (- end beg) flyspell-large-region) 1487 (if (and flyspell-large-region (> (- end beg) flyspell-large-region))
1374 (flyspell-large-region beg end) 1488 (flyspell-large-region beg end)
1375 (flyspell-small-region beg end))))) 1489 (flyspell-small-region beg end)))))
1376 1490
@@ -1517,15 +1631,23 @@ for the overlay."
1517 (if (or flyspell-highlight-properties 1631 (if (or flyspell-highlight-properties
1518 (not (flyspell-properties-at-p beg))) 1632 (not (flyspell-properties-at-p beg)))
1519 (progn 1633 (progn
1634 ;; we cleanup all the overlay that are in the region, not
1635 ;; beginning at the word start position
1636 (if (< (1+ beg) end)
1637 (let ((os (overlays-in (1+ beg) end)))
1638 (while (consp os)
1639 (if (flyspell-overlay-p (car os))
1640 (delete-overlay (car os)))
1641 (setq os (cdr os)))))
1520 ;; we cleanup current overlay at the same position 1642 ;; we cleanup current overlay at the same position
1521 (if (and (not flyspell-persistent-highlight) 1643 (if (and (not flyspell-persistent-highlight)
1522 (overlayp flyspell-overlay)) 1644 (overlayp flyspell-overlay))
1523 (delete-overlay flyspell-overlay) 1645 (delete-overlay flyspell-overlay)
1524 (let ((overlays (overlays-at beg))) 1646 (let ((os (overlays-at beg)))
1525 (while (consp overlays) 1647 (while (consp os)
1526 (if (flyspell-overlay-p (car overlays)) 1648 (if (flyspell-overlay-p (car os))
1527 (delete-overlay (car overlays))) 1649 (delete-overlay (car os)))
1528 (setq overlays (cdr overlays))))) 1650 (setq os (cdr os)))))
1529 ;; now we can use a new overlay 1651 ;; now we can use a new overlay
1530 (setq flyspell-overlay 1652 (setq flyspell-overlay
1531 (make-flyspell-overlay 1653 (make-flyspell-overlay
@@ -1677,69 +1799,71 @@ This command proposes various successive corrections for the current word."
1677 (flyspell-ajust-cursor-point pos (point) old-max) 1799 (flyspell-ajust-cursor-point pos (point) old-max)
1678 (setq flyspell-auto-correct-pos (point))) 1800 (setq flyspell-auto-correct-pos (point)))
1679 ;; fetch the word to be checked 1801 ;; fetch the word to be checked
1680 (let ((word (flyspell-get-word nil)) 1802 (let ((word (flyspell-get-word nil)))
1681 start end poss) 1803 (if (consp word)
1682 ;; destructure return word info list. 1804 (let ((start (car (cdr word)))
1683 (setq start (car (cdr word)) 1805 (end (car (cdr (cdr word))))
1684 end (car (cdr (cdr word))) 1806 (word (car word))
1685 word (car word)) 1807 poss)
1686 (setq flyspell-auto-correct-word word) 1808 (setq flyspell-auto-correct-word word)
1687 ;; now check spelling of word. 1809 ;; now check spelling of word.
1688 (process-send-string ispell-process "%\n") ;put in verbose mode 1810 (process-send-string ispell-process "%\n") ;put in verbose mode
1689 (process-send-string ispell-process (concat "^" word "\n")) 1811 (process-send-string ispell-process (concat "^" word "\n"))
1690 ;; wait until ispell has processed word 1812 ;; wait until ispell has processed word
1691 (while (progn 1813 (while (progn
1692 (accept-process-output ispell-process) 1814 (accept-process-output ispell-process)
1693 (not (string= "" (car ispell-filter))))) 1815 (not (string= "" (car ispell-filter)))))
1694 (setq ispell-filter (cdr ispell-filter)) 1816 (setq ispell-filter (cdr ispell-filter))
1695 (if (consp ispell-filter) 1817 (if (consp ispell-filter)
1696 (setq poss (ispell-parse-output (car ispell-filter)))) 1818 (setq poss (ispell-parse-output (car ispell-filter))))
1697 (cond ((or (eq poss t) (stringp poss)) 1819 (cond
1698 ;; don't correct word 1820 ((or (eq poss t) (stringp poss))
1699 t) 1821 ;; don't correct word
1700 ((null poss) 1822 t)
1701 ;; ispell error 1823 ((null poss)
1702 (error "Ispell: error in Ispell process")) 1824 ;; ispell error
1703 (t 1825 (error "Ispell: error in Ispell process"))
1704 ;; the word is incorrect, we have to propose a replacement 1826 (t
1705 (let ((replacements (if flyspell-sort-corrections 1827 ;; the word is incorrect, we have to propose a replacement
1706 (sort (car (cdr (cdr poss))) 'string<) 1828 (let ((replacements (if flyspell-sort-corrections
1707 (car (cdr (cdr poss)))))) 1829 (sort (car (cdr (cdr poss))) 'string<)
1708 (setq flyspell-auto-correct-region nil) 1830 (car (cdr (cdr poss))))))
1709 (if (consp replacements) 1831 (setq flyspell-auto-correct-region nil)
1710 (progn 1832 (if (consp replacements)
1711 (let ((replace (car replacements))) 1833 (progn
1712 (let ((new-word replace)) 1834 (let ((replace (car replacements)))
1713 (if (not (equal new-word (car poss))) 1835 (let ((new-word replace))
1714 (progn 1836 (if (not (equal new-word (car poss)))
1715 ;; the save the current replacements 1837 (progn
1716 (setq flyspell-auto-correct-region 1838 ;; the save the current replacements
1717 (cons start (length new-word))) 1839 (setq flyspell-auto-correct-region
1718 (let ((l replacements)) 1840 (cons start (length new-word)))
1719 (while (consp (cdr l)) 1841 (let ((l replacements))
1720 (setq l (cdr l))) 1842 (while (consp (cdr l))
1721 (rplacd l (cons (car poss) replacements))) 1843 (setq l (cdr l)))
1722 (setq flyspell-auto-correct-ring 1844 (rplacd l (cons (car poss) replacements)))
1723 replacements) 1845 (setq flyspell-auto-correct-ring
1724 (flyspell-unhighlight-at start) 1846 replacements)
1725 (delete-region start end) 1847 (flyspell-unhighlight-at start)
1726 (funcall flyspell-insert-function new-word) 1848 (delete-region start end)
1727 (if flyspell-abbrev-p 1849 (funcall flyspell-insert-function new-word)
1728 (if (flyspell-already-abbrevp 1850 (if flyspell-abbrev-p
1729 (flyspell-abbrev-table) word) 1851 (if (flyspell-already-abbrevp
1730 (flyspell-change-abbrev 1852 (flyspell-abbrev-table) word)
1731 (flyspell-abbrev-table) 1853 (flyspell-change-abbrev
1732 word 1854 (flyspell-abbrev-table)
1733 new-word) 1855 word
1734 (flyspell-define-abbrev word new-word))) 1856 new-word)
1735 (flyspell-word) 1857 (flyspell-define-abbrev word
1736 (flyspell-display-next-corrections 1858 new-word)))
1737 (cons new-word flyspell-auto-correct-ring)) 1859 (flyspell-word)
1738 (flyspell-ajust-cursor-point pos 1860 (flyspell-display-next-corrections
1739 (point) 1861 (cons new-word flyspell-auto-correct-ring))
1740 old-max)))))))))) 1862 (flyspell-ajust-cursor-point pos
1741 (setq flyspell-auto-correct-pos (point)) 1863 (point)
1742 (ispell-pdict-save t))))) 1864 old-max))))))))))
1865 (setq flyspell-auto-correct-pos (point))
1866 (ispell-pdict-save t)))))))
1743 1867
1744;*---------------------------------------------------------------------*/ 1868;*---------------------------------------------------------------------*/
1745;* flyspell-auto-correct-previous-pos ... */ 1869;* flyspell-auto-correct-previous-pos ... */
@@ -1752,8 +1876,8 @@ This command proposes various successive corrections for the current word."
1752;*---------------------------------------------------------------------*/ 1876;*---------------------------------------------------------------------*/
1753(defun flyspell-auto-correct-previous-hook () 1877(defun flyspell-auto-correct-previous-hook ()
1754 "Hook to track successive calls to `flyspell-auto-correct-previous-word'. 1878 "Hook to track successive calls to `flyspell-auto-correct-previous-word'.
1755Sets flyspell-auto-correct-previous-pos to nil" 1879Sets `flyspell-auto-correct-previous-pos' to nil"
1756 (interactive) 1880 (interactive)
1757 (remove-hook 'pre-command-hook (function flyspell-auto-correct-previous-hook) t) 1881 (remove-hook 'pre-command-hook (function flyspell-auto-correct-previous-hook) t)
1758 (unless (eq this-command (function flyspell-auto-correct-previous-word)) 1882 (unless (eq this-command (function flyspell-auto-correct-previous-word))
1759 (setq flyspell-auto-correct-previous-pos nil))) 1883 (setq flyspell-auto-correct-previous-pos nil)))
@@ -1761,45 +1885,56 @@ Sets flyspell-auto-correct-previous-pos to nil"
1761;*---------------------------------------------------------------------*/ 1885;*---------------------------------------------------------------------*/
1762;* flyspell-auto-correct-previous-word ... */ 1886;* flyspell-auto-correct-previous-word ... */
1763;*---------------------------------------------------------------------*/ 1887;*---------------------------------------------------------------------*/
1764(defun flyspell-auto-correct-previous-word (position) 1888(defun flyspell-auto-correct-previous-word (position)
1765 "*Auto correct the first mispelled word that occurs before point." 1889 "*Auto correct the first mispelled word that occurs before point.
1890But don't look beyond what's visible on the screen."
1766 (interactive "d") 1891 (interactive "d")
1767 1892
1768 (add-hook 'pre-command-hook 1893 (let (top bot)
1769 (function flyspell-auto-correct-previous-hook) t t) 1894 (save-excursion
1770 1895 (move-to-window-line 0)
1771 (save-excursion 1896 (setq top (point))
1772 (unless flyspell-auto-correct-previous-pos 1897 (move-to-window-line -1)
1773 ;; only reset if a new overlay exists 1898 (setq bot (point)))
1774 (setq flyspell-auto-correct-previous-pos nil) 1899 (save-excursion
1775 1900 (save-restriction
1776 (let ((overlay-list (overlays-in (point-min) position)) 1901 (narrow-to-region top bot)
1777 (new-overlay 'dummy-value)) 1902 (overlay-recenter (point))
1778 1903
1779 ;; search for previous (new) flyspell overlay 1904 (add-hook 'pre-command-hook
1780 (while (and new-overlay 1905 (function flyspell-auto-correct-previous-hook) t t)
1781 (or (not (flyspell-overlay-p new-overlay)) 1906
1782 ;; check if its face has changed 1907 (unless flyspell-auto-correct-previous-pos
1783 (not (eq (get-char-property 1908 ;; only reset if a new overlay exists
1784 (overlay-start new-overlay) 'face) 1909 (setq flyspell-auto-correct-previous-pos nil)
1785 'flyspell-incorrect-face)))) 1910
1786 (setq new-overlay (car-safe overlay-list)) 1911 (let ((overlay-list (overlays-in (point-min) position))
1787 (setq overlay-list (cdr-safe overlay-list))) 1912 (new-overlay 'dummy-value))
1788 1913
1789 ;; if nothing new exits new-overlay should be nil 1914 ;; search for previous (new) flyspell overlay
1790 (if new-overlay;; the length of the word may change so go to the start 1915 (while (and new-overlay
1791 (setq flyspell-auto-correct-previous-pos 1916 (or (not (flyspell-overlay-p new-overlay))
1792 (overlay-start new-overlay))))) 1917 ;; check if its face has changed
1793 1918 (not (eq (get-char-property
1794 (when flyspell-auto-correct-previous-pos 1919 (overlay-start new-overlay) 'face)
1795 (save-excursion 1920 'flyspell-incorrect-face))))
1796 (goto-char flyspell-auto-correct-previous-pos) 1921 (setq new-overlay (car-safe overlay-list))
1797 (let ((ispell-following-word t));; point is at start 1922 (setq overlay-list (cdr-safe overlay-list)))
1798 (if (numberp flyspell-auto-correct-previous-pos) 1923
1799 (goto-char flyspell-auto-correct-previous-pos)) 1924 ;; if nothing new exits new-overlay should be nil
1800 (flyspell-auto-correct-word)) 1925 (if new-overlay ;; the length of the word may change so go to the start
1801 ;; the point may have moved so reset this 1926 (setq flyspell-auto-correct-previous-pos
1802 (setq flyspell-auto-correct-previous-pos (point)))))) 1927 (overlay-start new-overlay)))))
1928
1929 (when flyspell-auto-correct-previous-pos
1930 (save-excursion
1931 (goto-char flyspell-auto-correct-previous-pos)
1932 (let ((ispell-following-word t)) ;; point is at start
1933 (if (numberp flyspell-auto-correct-previous-pos)
1934 (goto-char flyspell-auto-correct-previous-pos))
1935 (flyspell-auto-correct-word))
1936 ;; the point may have moved so reset this
1937 (setq flyspell-auto-correct-previous-pos (point))))))))
1803 1938
1804;*---------------------------------------------------------------------*/ 1939;*---------------------------------------------------------------------*/
1805;* flyspell-correct-word ... */ 1940;* flyspell-correct-word ... */
@@ -1814,72 +1949,76 @@ The word checked is the word at the mouse position."
1814 (let ((save (point))) 1949 (let ((save (point)))
1815 (mouse-set-point event) 1950 (mouse-set-point event)
1816 (let ((cursor-location (point)) 1951 (let ((cursor-location (point))
1817 (word (flyspell-get-word nil)) 1952 (word (flyspell-get-word nil)))
1818 start end poss replace) 1953 (if (consp word)
1819 ;; destructure return word info list. 1954 (let ((start (car (cdr word)))
1820 (setq start (car (cdr word)) 1955 (end (car (cdr (cdr word))))
1821 end (car (cdr (cdr word))) 1956 (word (car word))
1822 word (car word)) 1957 poss replace)
1823 ;; now check spelling of word. 1958 ;; now check spelling of word.
1824 (process-send-string ispell-process "%\n") ;put in verbose mode 1959 (process-send-string ispell-process "%\n") ;put in verbose mode
1825 (process-send-string ispell-process (concat "^" word "\n")) 1960 (process-send-string ispell-process (concat "^" word "\n"))
1826 ;; wait until ispell has processed word 1961 ;; wait until ispell has processed word
1827 (while (progn 1962 (while (progn
1828 (accept-process-output ispell-process) 1963 (accept-process-output ispell-process)
1829 (not (string= "" (car ispell-filter))))) 1964 (not (string= "" (car ispell-filter)))))
1830 (setq ispell-filter (cdr ispell-filter)) 1965 (setq ispell-filter (cdr ispell-filter))
1831 (if (consp ispell-filter) 1966 (if (consp ispell-filter)
1832 (setq poss (ispell-parse-output (car ispell-filter)))) 1967 (setq poss (ispell-parse-output (car ispell-filter))))
1833 (cond ((or (eq poss t) (stringp poss)) 1968 (cond
1834 ;; don't correct word 1969 ((or (eq poss t) (stringp poss))
1835 t) 1970 ;; don't correct word
1836 ((null poss) 1971 t)
1837 ;; ispell error 1972 ((null poss)
1838 (error "Ispell: error in Ispell process")) 1973 ;; ispell error
1839 ((string-match "GNU" (emacs-version)) 1974 (error "Ispell: error in Ispell process"))
1840 ;; the word is incorrect, we have to propose a replacement 1975 ((string-match "GNU" (emacs-version))
1841 (setq replace (flyspell-emacs-popup event poss word)) 1976 ;; the word is incorrect, we have to propose a replacement
1842 (cond ((eq replace 'ignore) 1977 (setq replace (flyspell-emacs-popup event poss word))
1843 (goto-char save) 1978 (cond ((eq replace 'ignore)
1844 nil) 1979 (goto-char save)
1845 ((eq replace 'save) 1980 nil)
1846 (goto-char save) 1981 ((eq replace 'save)
1847 (process-send-string ispell-process (concat "*" word "\n")) 1982 (goto-char save)
1848 (flyspell-unhighlight-at cursor-location) 1983 (process-send-string ispell-process
1849 (setq ispell-pdict-modified-p '(t))) 1984 (concat "*" word "\n"))
1850 ((or (eq replace 'buffer) (eq replace 'session)) 1985 (flyspell-unhighlight-at cursor-location)
1851 (process-send-string ispell-process (concat "@" word "\n")) 1986 (setq ispell-pdict-modified-p '(t)))
1852 (if (null ispell-pdict-modified-p) 1987 ((or (eq replace 'buffer) (eq replace 'session))
1853 (setq ispell-pdict-modified-p 1988 (process-send-string ispell-process
1854 (list ispell-pdict-modified-p))) 1989 (concat "@" word "\n"))
1855 (flyspell-unhighlight-at cursor-location) 1990 (if (null ispell-pdict-modified-p)
1856 (goto-char save) 1991 (setq ispell-pdict-modified-p
1857 (if (eq replace 'buffer) 1992 (list ispell-pdict-modified-p)))
1858 (ispell-add-per-file-word-list word))) 1993 (flyspell-unhighlight-at cursor-location)
1859 (replace 1994 (goto-char save)
1860 (flyspell-unhighlight-at cursor-location) 1995 (if (eq replace 'buffer)
1861 (let ((new-word (if (atom replace) 1996 (ispell-add-per-file-word-list word)))
1862 replace 1997 (replace
1863 (car replace))) 1998 (flyspell-unhighlight-at cursor-location)
1864 (cursor-location (+ (- (length word) (- end start)) 1999 (let ((new-word (if (atom replace)
1865 cursor-location))) 2000 replace
1866 (if (not (equal new-word (car poss))) 2001 (car replace)))
1867 (let ((old-max (point-max))) 2002 (cursor-location
1868 (delete-region start end) 2003 (+ (- (length word) (- end start))
1869 (funcall flyspell-insert-function new-word) 2004 cursor-location)))
1870 (if flyspell-abbrev-p 2005 (if (not (equal new-word (car poss)))
1871 (flyspell-define-abbrev word new-word)) 2006 (let ((old-max (point-max)))
1872 (flyspell-ajust-cursor-point save 2007 (delete-region start end)
1873 cursor-location 2008 (funcall flyspell-insert-function new-word)
1874 old-max))))) 2009 (if flyspell-abbrev-p
1875 (t 2010 (flyspell-define-abbrev word new-word))
1876 (goto-char save) 2011 (flyspell-ajust-cursor-point save
1877 nil))) 2012 cursor-location
1878 ((eq flyspell-emacs 'xemacs) 2013 old-max)))))
1879 (flyspell-xemacs-popup 2014 (t
1880 event poss word cursor-location start end save) 2015 (goto-char save)
1881 (goto-char save))) 2016 nil)))
1882 (ispell-pdict-save t)))) 2017 ((eq flyspell-emacs 'xemacs)
2018 (flyspell-xemacs-popup
2019 event poss word cursor-location start end save)
2020 (goto-char save)))
2021 (ispell-pdict-save t))))))
1883 2022
1884;*---------------------------------------------------------------------*/ 2023;*---------------------------------------------------------------------*/
1885;* flyspell-xemacs-correct ... */ 2024;* flyspell-xemacs-correct ... */
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index bd81f97138c..bbc59768aaf 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 6;; Keywords: outlines, hypermedia, calendar
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 3.09 8;; Version: 3.10
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -80,6 +80,9 @@
80;; 80;;
81;; Changes: 81;; Changes:
82;; ------- 82;; -------
83;; Version 3.10
84;; - Using `define-derived-mode' to derive `org-mode' from `outline-mode'.
85;;
83;; Version 3.09 86;; Version 3.09
84;; - Time-of-day specifications in agenda are extracted and placed 87;; - Time-of-day specifications in agenda are extracted and placed
85;; into the prefix. Timed entries can be placed into a time grid for 88;; into the prefix. Timed entries can be placed into a time grid for
@@ -151,10 +154,12 @@
151(require 'outline) 154(require 'outline)
152(require 'time-date) 155(require 'time-date)
153(require 'easymenu) 156(require 'easymenu)
157(or (fboundp 'run-mode-hooks)
158 (defalias 'run-mode-hooks 'run-hooks))
154 159
155;;; Customization variables 160;;; Customization variables
156 161
157(defvar org-version "3.09" 162(defvar org-version "3.10"
158 "The version number of the file org.el.") 163 "The version number of the file org.el.")
159(defun org-version () 164(defun org-version ()
160 (interactive) 165 (interactive)
@@ -372,7 +377,11 @@ Such files should use a file variable to set it, for example
372 377
373 -*- mode: org; org-category: \"ELisp\" 378 -*- mode: org; org-category: \"ELisp\"
374 379
375If the file does not specify a category, the file's base name 380or contain a special line
381
382#+CATEGORY: ELisp
383
384If the file does not specify a category, then file's base name
376is used instead.") 385is used instead.")
377 386
378(defun org-set-regexps-and-options () 387(defun org-set-regexps-and-options ()
@@ -1525,7 +1534,7 @@ sets it back to nil.")
1525 1534
1526 1535
1527;;;###autoload 1536;;;###autoload
1528(defun org-mode (&optional arg) 1537(define-derived-mode org-mode outline-mode "Org"
1529 "Outline-based notes management and organizer, alias 1538 "Outline-based notes management and organizer, alias
1530\"Carstens outline-mode for keeping track of everything.\" 1539\"Carstens outline-mode for keeping track of everything.\"
1531 1540
@@ -1538,16 +1547,11 @@ calendar. Tables are easily created with a built-in table editor.
1538Plain text URL-like links connect to websites, emails (VM), Usenet 1547Plain text URL-like links connect to websites, emails (VM), Usenet
1539messages (Gnus), BBDB entries, and any files related to the project. 1548messages (Gnus), BBDB entries, and any files related to the project.
1540For printing and sharing of notes, an Org-mode file (or a part of it) 1549For printing and sharing of notes, an Org-mode file (or a part of it)
1541can be exported as a well-structured ASCII or HTML file. 1550can be exported as a structured ASCII or HTML file.
1542 1551
1543The following commands are available: 1552The following commands are available:
1544 1553
1545\\{org-mode-map}" 1554\\{org-mode-map}"
1546 (interactive "P")
1547 (outline-mode)
1548 (setq major-mode 'org-mode)
1549 (setq mode-name "Org")
1550 (use-local-map org-mode-map)
1551 (easy-menu-add org-org-menu) 1555 (easy-menu-add org-org-menu)
1552 (org-install-agenda-files-menu) 1556 (org-install-agenda-files-menu)
1553 (setq outline-regexp "\\*+") 1557 (setq outline-regexp "\\*+")
@@ -1569,15 +1573,10 @@ The following commands are available:
1569 (if org-enable-table-editor "|" "") 1573 (if org-enable-table-editor "|" "")
1570 (if org-enable-fixed-width-editor ":" "") 1574 (if org-enable-fixed-width-editor ":" "")
1571 "]")))) 1575 "]"))))
1572 ;; Hook, and startup actions 1576 (if (and org-insert-mode-line-in-empty-file
1573 (if (or arg 1577 (interactive-p)
1574 (and org-insert-mode-line-in-empty-file 1578 (= (point-min) (point-max)))
1575 (interactive-p) 1579 (insert " -*- mode: org -*-\n\n"))
1576 (= (point-min) (point-max))))
1577 (save-excursion
1578 (goto-char (point-min))
1579 (insert " -*- mode: org -*-\n\n")))
1580 (run-hooks 'org-mode-hook)
1581 (unless org-inhibit-startup 1580 (unless org-inhibit-startup
1582 (if org-startup-with-deadline-check 1581 (if org-startup-with-deadline-check
1583 (call-interactively 'org-check-deadlines) 1582 (call-interactively 'org-check-deadlines)
@@ -1641,7 +1640,6 @@ The following commands are available:
1641 'keymap org-mouse-map)) 1640 'keymap org-mouse-map))
1642 t))) 1641 t)))
1643 1642
1644
1645(defun org-font-lock-level () 1643(defun org-font-lock-level ()
1646 (save-excursion 1644 (save-excursion
1647 (org-back-to-heading t) 1645 (org-back-to-heading t)
@@ -3120,7 +3118,7 @@ The following commands are available:
3120 "--") 3118 "--")
3121 (mapcar 'org-file-menu-entry org-agenda-files))) 3119 (mapcar 'org-file-menu-entry org-agenda-files)))
3122 (org-agenda-set-mode-name) 3120 (org-agenda-set-mode-name)
3123 (run-hooks 'org-agenda-mode-hook)) 3121 (run-mode-hooks 'org-agenda-mode-hook))
3124 3122
3125(define-key org-agenda-mode-map [(tab)] 'org-agenda-goto) 3123(define-key org-agenda-mode-map [(tab)] 'org-agenda-goto)
3126(define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to) 3124(define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to)
@@ -6700,7 +6698,7 @@ table editor in arbitrary modes.")
6700 (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp) 6698 (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp)
6701 "[ \t]*|")) 6699 "[ \t]*|"))
6702 (easy-menu-add orgtbl-mode-menu) 6700 (easy-menu-add orgtbl-mode-menu)
6703 (run-hooks (quote orgtbl-mode-hook))) 6701 (run-hooks 'orgtbl-mode-hook))
6704 (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp) 6702 (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp)
6705 (remove-hook 'before-change-functions 'org-before-change-function t) 6703 (remove-hook 'before-change-functions 'org-before-change-function t)
6706 (easy-menu-remove orgtbl-mode-menu) 6704 (easy-menu-remove orgtbl-mode-menu)
@@ -8433,7 +8431,7 @@ the automatic table editor has been turned off."
8433 8431
8434;;; Menu entries 8432;;; Menu entries
8435 8433
8436;; First, remove the outline menus. 8434;; First, remove the outline menus. Org-mode does not neede these commands.
8437(if org-xemacs-p 8435(if org-xemacs-p
8438 (add-hook 'org-mode-hook 8436 (add-hook 'org-mode-hook
8439 (lambda () 8437 (lambda ()
@@ -8442,7 +8440,7 @@ the automatic table editor has been turned off."
8442 (delete-menu-item '("Hide")) 8440 (delete-menu-item '("Hide"))
8443 (set-menubar-dirty-flag))) 8441 (set-menubar-dirty-flag)))
8444 (setq org-mode-map (delq (assoc 'menu-bar (cdr org-mode-map)) 8442 (setq org-mode-map (delq (assoc 'menu-bar (cdr org-mode-map))
8445 org-mode-map))) 8443 org-mode-map)))
8446 8444
8447;; Define the Org-mode menus 8445;; Define the Org-mode menus
8448(easy-menu-define org-org-menu org-mode-map "Org menu" 8446(easy-menu-define org-org-menu org-mode-map "Org menu"
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index ff2ea70a011..43e56df6685 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -310,7 +310,7 @@ Here are all local bindings.
310 (easy-menu-add reftex-index-menu reftex-index-map) 310 (easy-menu-add reftex-index-menu reftex-index-map)
311 (add-hook 'post-command-hook 'reftex-index-post-command-hook nil t) 311 (add-hook 'post-command-hook 'reftex-index-post-command-hook nil t)
312 (add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t) 312 (add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t)
313 (run-hooks 'reftex-index-mode-hook)) 313 (run-mode-hooks 'reftex-index-mode-hook))
314 314
315(defconst reftex-index-help 315(defconst reftex-index-help
316" AVAILABLE KEYS IN INDEX BUFFER 316" AVAILABLE KEYS IN INDEX BUFFER
@@ -1308,7 +1308,7 @@ Here are all local bindings.
1308 reftex-index-phrases-font-lock-defaults) 1308 reftex-index-phrases-font-lock-defaults)
1309 (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map) 1309 (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map)
1310 (set (make-local-variable 'reftex-index-phrases-marker) (make-marker)) 1310 (set (make-local-variable 'reftex-index-phrases-marker) (make-marker))
1311 (run-hooks 'reftex-index-phrases-mode-hook)) 1311 (run-mode-hooks 'reftex-index-phrases-mode-hook))
1312(add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock) 1312(add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock)
1313 1313
1314;; Font Locking stuff 1314;; Font Locking stuff
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el
index eb8c3035c90..725c5122a0b 100644
--- a/lisp/textmodes/reftex-sel.el
+++ b/lisp/textmodes/reftex-sel.el
@@ -60,7 +60,7 @@ During a selection process, these are the local bindings.
60 (when (syntax-table-p reftex-latex-syntax-table) 60 (when (syntax-table-p reftex-latex-syntax-table)
61 (set-syntax-table reftex-latex-syntax-table)) 61 (set-syntax-table reftex-latex-syntax-table))
62 ;; We do not set a local map - reftex-select-item does this. 62 ;; We do not set a local map - reftex-select-item does this.
63 (run-hooks 'reftex-select-label-mode-hook)) 63 (run-mode-hooks 'reftex-select-label-mode-hook))
64 64
65(defvar reftex-select-bib-map nil 65(defvar reftex-select-bib-map nil
66 "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry. 66 "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry.
@@ -88,7 +88,7 @@ During a selection process, these are the local bindings.
88 mode-name "BSelect") 88 mode-name "BSelect")
89 (set (make-local-variable 'reftex-select-marked) nil) 89 (set (make-local-variable 'reftex-select-marked) nil)
90 ;; We do not set a local map - reftex-select-item does this. 90 ;; We do not set a local map - reftex-select-item does this.
91 (run-hooks 'reftex-select-bib-mode-hook)) 91 (run-mode-hooks 'reftex-select-bib-mode-hook))
92 92
93;;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file) 93;;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file)
94;;; ;; Find the correct offset data, like insert-docstruct would, but faster. 94;;; ;; Find the correct offset data, like insert-docstruct would, but faster.
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index 8ad811391c7..b5edba97f4b 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -73,7 +73,7 @@ Here are all local bindings.
73 (add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t) 73 (add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t)
74 (add-hook 'pre-command-hook 'reftex-toc-pre-command-hook nil t) 74 (add-hook 'pre-command-hook 'reftex-toc-pre-command-hook nil t)
75 (easy-menu-add reftex-toc-menu reftex-toc-map) 75 (easy-menu-add reftex-toc-menu reftex-toc-map)
76 (run-hooks 'reftex-toc-mode-hook)) 76 (run-mode-hooks 'reftex-toc-mode-hook))
77 77
78(defvar reftex-last-toc-file nil 78(defvar reftex-last-toc-file nil
79 "Stores the file name from which `reftex-toc' was called. For redo command.") 79 "Stores the file name from which `reftex-toc' was called. For redo command.")
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 34d39807d2d..21259ee0ccf 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -248,7 +248,8 @@ Any terminating `>' or `/' is not matched.")
248 248
249(defface sgml-namespace-face 249(defface sgml-namespace-face
250 '((t (:inherit font-lock-builtin-face))) 250 '((t (:inherit font-lock-builtin-face)))
251 "`sgml-mode' face used to highlight the namespace part of identifiers.") 251 "`sgml-mode' face used to highlight the namespace part of identifiers."
252 :group 'sgml)
252(defvar sgml-namespace-face 'sgml-namespace-face) 253(defvar sgml-namespace-face 'sgml-namespace-face)
253 254
254;; internal 255;; internal
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 04507fbc5e4..3b5bab5b4dc 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -643,19 +643,23 @@ An alternative value is \" . \", if you use a font with a narrow period."
643 643
644(defface superscript 644(defface superscript
645 '((t :height 0.8)) ;; :raise 0.3 645 '((t :height 0.8)) ;; :raise 0.3
646 "Face used for superscripts.") 646 "Face used for superscripts."
647 :group 'tex)
647(defface subscript 648(defface subscript
648 '((t :height 0.8)) ;; :raise -0.3 649 '((t :height 0.8)) ;; :raise -0.3
649 "Face used for subscripts.") 650 "Face used for subscripts."
651 :group 'tex)
650 652
651(defface tex-math-face 653(defface tex-math-face
652 '((t :inherit font-lock-string-face)) 654 '((t :inherit font-lock-string-face))
653 "Face used to highlight TeX math expressions.") 655 "Face used to highlight TeX math expressions."
656 :group 'tex)
654(defvar tex-math-face 'tex-math-face) 657(defvar tex-math-face 'tex-math-face)
655(defface tex-verbatim-face 658(defface tex-verbatim-face
656 ;; '((t :inherit font-lock-string-face)) 659 ;; '((t :inherit font-lock-string-face))
657 '((t :family "courier")) 660 '((t :family "courier"))
658 "Face used to highlight TeX verbatim environments.") 661 "Face used to highlight TeX verbatim environments."
662 :group 'tex)
659(defvar tex-verbatim-face 'tex-verbatim-face) 663(defvar tex-verbatim-face 'tex-verbatim-face)
660 664
661;; Use string syntax but math face for $...$. 665;; Use string syntax but math face for $...$.
@@ -1623,7 +1627,8 @@ If NOT-ALL is non-nil, save the `.dvi' file."
1623 1627
1624(defcustom tex-use-reftex t 1628(defcustom tex-use-reftex t
1625 "If non-nil, use RefTeX's list of files to determine what command to use." 1629 "If non-nil, use RefTeX's list of files to determine what command to use."
1626 :type 'boolean) 1630 :type 'boolean
1631 :group 'tex)
1627 1632
1628(defvar tex-compile-commands 1633(defvar tex-compile-commands
1629 '(((concat "pdf" tex-command 1634 '(((concat "pdf" tex-command
@@ -2227,8 +2232,7 @@ is provided, use the alternative command, `tex-alt-dvi-print-command'."
2227 (tex-start-shell)) 2232 (tex-start-shell))
2228 (tex-send-command 2233 (tex-send-command
2229 (if alt tex-alt-dvi-print-command tex-dvi-print-command) 2234 (if alt tex-alt-dvi-print-command tex-dvi-print-command)
2230 (shell-quote-argument 2235 print-file-name-dvi
2231 print-file-name-dvi)
2232 t)))) 2236 t))))
2233 2237
2234(defun tex-alt-print () 2238(defun tex-alt-print ()
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index ec983077d26..bd14c658379 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -345,7 +345,8 @@ Subexpression 1 is what goes into the corresponding `@end' statement.")
345 345
346(defface texinfo-heading-face 346(defface texinfo-heading-face
347 '((t (:inherit font-lock-function-name-face))) 347 '((t (:inherit font-lock-function-name-face)))
348 "Face used for section headings in `texinfo-mode'.") 348 "Face used for section headings in `texinfo-mode'."
349 :group 'texinfo)
349(defvar texinfo-heading-face 'texinfo-heading-face) 350(defvar texinfo-heading-face 'texinfo-heading-face)
350 351
351(defvar texinfo-font-lock-keywords 352(defvar texinfo-font-lock-keywords
diff --git a/lisp/thumbs.el b/lisp/thumbs.el
index 1657c4b01a9..321fe7266cc 100644
--- a/lisp/thumbs.el
+++ b/lisp/thumbs.el
@@ -302,18 +302,21 @@ Or, alternatively, a SIZE may be specified."
302 302
303(defun thumbs-thumbname (img) 303(defun thumbs-thumbname (img)
304 "Return a thumbnail name for the image IMG." 304 "Return a thumbnail name for the image IMG."
305 (concat thumbs-thumbsdir "/" 305 (convert-standard-filename
306 (subst-char-in-string 306 (let ((filename (expand-file-name img)))
307 ?\ ?\_ 307 (format "%s/%08x-%s.jpg"
308 (apply 308 thumbs-thumbsdir
309 'concat 309 (sxhash filename)
310 (split-string 310 (subst-char-in-string
311 (expand-file-name img) "/"))))) 311 ?\s ?\_
312 (apply
313 'concat
314 (split-string filename "/")))))))
312 315
313(defun thumbs-make-thumb (img) 316(defun thumbs-make-thumb (img)
314 "Create the thumbnail for IMG." 317 "Create the thumbnail for IMG."
315 (let* ((fn (expand-file-name img)) 318 (let ((fn (expand-file-name img))
316 (tn (thumbs-thumbname img))) 319 (tn (thumbs-thumbname img)))
317 (if (or (not (file-exists-p tn)) 320 (if (or (not (file-exists-p tn))
318 ;; This is not the right fix, but I don't understand 321 ;; This is not the right fix, but I don't understand
319 ;; the external program or why it produces a geometry 322 ;; the external program or why it produces a geometry
@@ -378,8 +381,9 @@ If MARKED is non-nil, the image is marked."
378 (unless (bobp) (newline)))) 381 (unless (bobp) (newline))))
379 382
380(defun thumbs-show-thumbs-list (L &optional buffer-name same-window) 383(defun thumbs-show-thumbs-list (L &optional buffer-name same-window)
381 (when (not (display-images-p)) 384 (unless (and (display-images-p)
382 (error "Images are not supported in this Emacs session")) 385 (image-type-available-p 'jpeg))
386 (error "Required image type is not supported in this Emacs session"))
383 (funcall (if same-window 'switch-to-buffer 'pop-to-buffer) 387 (funcall (if same-window 'switch-to-buffer 'pop-to-buffer)
384 (or buffer-name "*THUMB-View*")) 388 (or buffer-name "*THUMB-View*"))
385 (let ((inhibit-read-only t)) 389 (let ((inhibit-read-only t))
@@ -754,9 +758,8 @@ ACTION and ARG should be a valid convert command."
754(define-derived-mode thumbs-mode 758(define-derived-mode thumbs-mode
755 fundamental-mode "thumbs" 759 fundamental-mode "thumbs"
756 "Preview images in a thumbnails buffer" 760 "Preview images in a thumbnails buffer"
757 (make-variable-buffer-local 'thumbs-markedL)
758 (setq buffer-read-only t) 761 (setq buffer-read-only t)
759 (setq thumbs-markedL nil)) 762 (set (make-local-variable 'thumbs-markedL) nil))
760 763
761(defvar thumbs-view-image-mode-map 764(defvar thumbs-view-image-mode-map
762 (let ((map (make-sparse-keymap))) 765 (let ((map (make-sparse-keymap)))
@@ -793,7 +796,5 @@ ACTION and ARG should be a valid convert command."
793 796
794(provide 'thumbs) 797(provide 'thumbs)
795 798
799;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c
796;;; thumbs.el ends here 800;;; thumbs.el ends here
797
798
799;;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c
diff --git a/lisp/time.el b/lisp/time.el
index ddf0d932733..180d7c44cf3 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -200,6 +200,7 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'."
200 (list :background bg))))) 200 (list :background bg)))))
201 'face display-time-mail-face 201 'face display-time-mail-face
202 'help-echo "You have new mail; mouse-2: Read mail" 202 'help-echo "You have new mail; mouse-2: Read mail"
203 'mouse-face 'mode-line-highlight
203 'local-map (make-mode-line-mouse-map 'mouse-2 204 'local-map (make-mode-line-mouse-map 'mouse-2
204 read-mail-command))) 205 read-mail-command)))
205 "")) 206 ""))
@@ -293,6 +294,7 @@ update which can wait for the next redisplay."
293 (concat (substring str 0 -2) "." (substring str -2)) 294 (concat (substring str 0 -2) "." (substring str -2))
294 'local-map (make-mode-line-mouse-map 295 'local-map (make-mode-line-mouse-map
295 'mouse-2 'display-time-next-load-average) 296 'mouse-2 'display-time-next-load-average)
297 'mouse-face 'mode-line-highlight
296 'help-echo (concat 298 'help-echo (concat
297 "System load average for past " 299 "System load average for past "
298 (if (= 0 display-time-load-average) 300 (if (= 0 display-time-load-average)
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 168dbdd14dc..51e04941730 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -133,6 +133,12 @@ specify nil for this variable."
133 :type '(choice integer (const nil)) 133 :type '(choice integer (const nil))
134 :group 'tmm) 134 :group 'tmm)
135 135
136(require 'font-lock)
137(defface tmm-inactive-face
138 '((t :inherit font-lock-comment-face))
139 "Face used for inactive menu items."
140 :group 'tmm)
141
136;;;###autoload 142;;;###autoload
137(defun tmm-prompt (menu &optional in-popup default-item) 143(defun tmm-prompt (menu &optional in-popup default-item)
138 "Text-mode emulation of calling the bindings in keymap. 144 "Text-mode emulation of calling the bindings in keymap.
@@ -193,7 +199,14 @@ Its value should be an event that has a binding in MENU."
193 (eq (car-safe (cdr (car tail))) 'menu-item))) 199 (eq (car-safe (cdr (car tail))) 'menu-item)))
194 (setq index-of-default (1+ index-of-default))) 200 (setq index-of-default (1+ index-of-default)))
195 (setq tail (cdr tail))))) 201 (setq tail (cdr tail)))))
196 (setq history (reverse (mapcar 'car tmm-km-list))) 202 (let ((prompt (concat "^." (regexp-quote tmm-mid-prompt))))
203 (setq history
204 (reverse (delq nil
205 (mapcar
206 (lambda (elt)
207 (if (string-match prompt (car elt))
208 (car elt)))
209 tmm-km-list)))))
197 (setq history-len (length history)) 210 (setq history-len (length history))
198 (setq history (append history history history history)) 211 (setq history (append history history history history))
199 (setq tmm-c-prompt (nth (- history-len 1 index-of-default) history)) 212 (setq tmm-c-prompt (nth (- history-len 1 index-of-default) history))
@@ -259,37 +272,43 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
259 272
260(defsubst tmm-add-one-shortcut (elt) 273(defsubst tmm-add-one-shortcut (elt)
261;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts 274;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts
262 (let* ((str (car elt)) 275 (cond
263 (paren (string-match "(" str)) 276 ((eq (cddr elt) 'ignore)
264 (pos 0) (word 0) char) 277 (cons (concat " " (make-string (length tmm-mid-prompt) ?\-)
265 (catch 'done ; ??? is this slow? 278 (car elt))
266 (while (and (or (not tmm-shortcut-words) ; no limit on words 279 (cdr elt)))
267 (< word tmm-shortcut-words)) ; try n words 280 (t
268 (setq pos (string-match "\\w+" str pos)) ; get next word 281 (let* ((str (car elt))
269 (not (and paren (> pos paren)))) ; don't go past "(binding.." 282 (paren (string-match "(" str))
270 (if (or (= pos 0) 283 (pos 0) (word 0) char)
271 (/= (aref str (1- pos)) ?.)) ; avoid file extensions 284 (catch 'done ; ??? is this slow?
272 (let ((shortcut-style 285 (while (and (or (not tmm-shortcut-words) ; no limit on words
273 (if (listp tmm-shortcut-style) ; convert to list 286 (< word tmm-shortcut-words)) ; try n words
274 tmm-shortcut-style 287 (setq pos (string-match "\\w+" str pos)) ; get next word
275 (list tmm-shortcut-style)))) 288 (not (and paren (> pos paren)))) ; don't go past "(binding.."
276 (while shortcut-style ; try upcase and downcase variants 289 (if (or (= pos 0)
277 (setq char (funcall (car shortcut-style) (aref str pos))) 290 (/= (aref str (1- pos)) ?.)) ; avoid file extensions
278 (if (not (memq char tmm-short-cuts)) (throw 'done char)) 291 (let ((shortcut-style
279 (setq shortcut-style (cdr shortcut-style))))) 292 (if (listp tmm-shortcut-style) ; convert to list
280 (setq word (1+ word)) 293 tmm-shortcut-style
281 (setq pos (match-end 0))) 294 (list tmm-shortcut-style))))
282 (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit 295 (while shortcut-style ; try upcase and downcase variants
283 (setq char tmm-next-shortcut-digit) 296 (setq char (funcall (car shortcut-style) (aref str pos)))
284 (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit)) 297 (if (not (memq char tmm-short-cuts)) (throw 'done char))
285 (if (not (memq char tmm-short-cuts)) (throw 'done char))) 298 (setq shortcut-style (cdr shortcut-style)))))
286 (setq char nil)) 299 (setq word (1+ word))
287 (if char (setq tmm-short-cuts (cons char tmm-short-cuts))) 300 (setq pos (match-end 0)))
288 (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt) 301 (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit
289 ;; keep them lined up in columns 302 (setq char tmm-next-shortcut-digit)
290 (make-string (1+ (length tmm-mid-prompt)) ?\ )) 303 (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit))
291 str) 304 (if (not (memq char tmm-short-cuts)) (throw 'done char)))
292 (cdr elt)))) 305 (setq char nil))
306 (if char (setq tmm-short-cuts (cons char tmm-short-cuts)))
307 (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt)
308 ;; keep them lined up in columns
309 (make-string (1+ (length tmm-mid-prompt)) ?\ ))
310 str)
311 (cdr elt))))))
293 312
294;; This returns the old map. 313;; This returns the old map.
295(defun tmm-define-keys (minibuffer) 314(defun tmm-define-keys (minibuffer)
@@ -319,9 +338,27 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
319 (goto-char 1) 338 (goto-char 1)
320 (delete-region 1 (search-forward "Possible completions are:\n"))) 339 (delete-region 1 (search-forward "Possible completions are:\n")))
321 340
341(defun tmm-remove-inactive-mouse-face ()
342 "Remove the mouse-face property from inactive menu items."
343 (let ((inhibit-read-only t)
344 (inactive-string
345 (concat " " (make-string (length tmm-mid-prompt) ?\-)))
346 next)
347 (save-excursion
348 (goto-char (point-min))
349 (while (not (eobp))
350 (setq next (next-single-char-property-change (point) 'mouse-face))
351 (when (looking-at inactive-string)
352 (remove-text-properties (point) next '(mouse-face))
353 (add-text-properties (point) next '(face tmm-inactive-face)))
354 (goto-char next)))
355 (set-buffer-modified-p nil)))
356
322(defun tmm-add-prompt () 357(defun tmm-add-prompt ()
323 (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) 358 (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
324 (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t) 359 (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t)
360 (unless tmm-c-prompt
361 (error "No active menu entries"))
325 (let ((win (selected-window))) 362 (let ((win (selected-window)))
326 (setq tmm-old-mb-map (tmm-define-keys t)) 363 (setq tmm-old-mb-map (tmm-define-keys t))
327 ;; Get window and hide it for electric mode to get correct size 364 ;; Get window and hide it for electric mode to get correct size
@@ -334,8 +371,9 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
334 (with-output-to-temp-buffer "*Completions*" 371 (with-output-to-temp-buffer "*Completions*"
335 (display-completion-list completions)) 372 (display-completion-list completions))
336 (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)) 373 (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt))
374 (set-buffer "*Completions*")
375 (tmm-remove-inactive-mouse-face)
337 (when tmm-completion-prompt 376 (when tmm-completion-prompt
338 (set-buffer "*Completions*")
339 (let ((buffer-read-only nil)) 377 (let ((buffer-read-only nil))
340 (goto-char (point-min)) 378 (goto-char (point-min))
341 (insert tmm-completion-prompt)))) 379 (insert tmm-completion-prompt))))
@@ -345,7 +383,6 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
345 (Electric-pop-up-window "*Completions*") 383 (Electric-pop-up-window "*Completions*")
346 (with-current-buffer "*Completions*" 384 (with-current-buffer "*Completions*"
347 (setq tmm-old-comp-map (tmm-define-keys nil)))) 385 (setq tmm-old-comp-map (tmm-define-keys nil))))
348
349 (insert tmm-c-prompt))) 386 (insert tmm-c-prompt)))
350 387
351(defun tmm-delete-map () 388(defun tmm-delete-map ()
@@ -438,7 +475,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
438 (setq km (and (eval visible) km))) 475 (setq km (and (eval visible) km)))
439 (setq enable (plist-get plist :enable)) 476 (setq enable (plist-get plist :enable))
440 (if enable 477 (if enable
441 (setq km (and (eval enable) km))) 478 (setq km (if (eval enable) km 'ignore)))
442 (and str 479 (and str
443 (consp (nth 3 elt)) 480 (consp (nth 3 elt))
444 (stringp (cdr (nth 3 elt))) ; keyseq cache 481 (stringp (cdr (nth 3 elt))) ; keyseq cache
@@ -467,8 +504,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
467 ;; Verify that the command is enabled; 504 ;; Verify that the command is enabled;
468 ;; if not, don't mention it. 505 ;; if not, don't mention it.
469 (when (and km (symbolp km) (get km 'menu-enable)) 506 (when (and km (symbolp km) (get km 'menu-enable))
470 (unless (eval (get km 'menu-enable)) 507 (setq km (if (eval (get km 'menu-enable)) km 'ignore)))
471 (setq km nil)))
472 (and km str 508 (and km str
473 (or (assoc str tmm-km-list) 509 (or (assoc str tmm-km-list)
474 (push (cons str (cons event km)) tmm-km-list)))))) 510 (push (cons str (cons event km)) tmm-km-list))))))
diff --git a/lisp/toolbar/gud-break.xpm b/lisp/toolbar/gud-break.xpm
index 419955dd109..2ffc2748271 100644
--- a/lisp/toolbar/gud-break.xpm
+++ b/lisp/toolbar/gud-break.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * stop_xpm[] = { 2static char * stop_xpm[] = {
3"24 24 3 1", 3"24 24 3 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #F8F810104040", 5". c #F8F810104040",
6"X c #F8F8FCFCF8F8", 6"X c #F8F8FCFCF8F8",
7" ", 7" ",
diff --git a/lisp/toolbar/gud-cont.xpm b/lisp/toolbar/gud-cont.xpm
index 4863a955bec..9da91af994f 100644
--- a/lisp/toolbar/gud-cont.xpm
+++ b/lisp/toolbar/gud-cont.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * continue_xpm[] = { 2static char * continue_xpm[] = {
3"24 24 6 1", 3"24 24 6 1",
4" c #c0c0c0", 4" c None",
5". c #cc0033", 5". c #cc0033",
6"X c #d99faa", 6"X c #d99faa",
7"o c #616161", 7"o c #616161",
diff --git a/lisp/toolbar/gud-down.xpm b/lisp/toolbar/gud-down.xpm
index 77e93fdfa19..30f3af89cce 100644
--- a/lisp/toolbar/gud-down.xpm
+++ b/lisp/toolbar/gud-down.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * down_xpm[] = { 2static char * down_xpm[] = {
3"24 24 14 1", 3"24 24 14 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #000000000000", 5". c #000000000000",
6"X c #7F7F7F7F7F7F", 6"X c #7F7F7F7F7F7F",
7"o c #2D2D2D2D2D2D", 7"o c #2D2D2D2D2D2D",
diff --git a/lisp/toolbar/gud-finish.xpm b/lisp/toolbar/gud-finish.xpm
index 59066450ee3..0310f07e8da 100644
--- a/lisp/toolbar/gud-finish.xpm
+++ b/lisp/toolbar/gud-finish.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * finish_xpm[] = { 2static char * finish_xpm[] = {
3"24 24 7 1", 3"24 24 7 1",
4" c #c0c0c0", 4" c None",
5". c #cc0033", 5". c #cc0033",
6"X c #616161", 6"X c #616161",
7"o c #2a1f55", 7"o c #2a1f55",
diff --git a/lisp/toolbar/gud-n.xpm b/lisp/toolbar/gud-n.xpm
index 0e631de18e1..f0257da5cf0 100644
--- a/lisp/toolbar/gud-n.xpm
+++ b/lisp/toolbar/gud-n.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * next_xpm[] = { 2static char * next_xpm[] = {
3"24 24 7 1", 3"24 24 7 1",
4" c #c0c0c0", 4" c None",
5". c #cc0033", 5". c #cc0033",
6"X c #616161", 6"X c #616161",
7"o c #2a1f55", 7"o c #2a1f55",
diff --git a/lisp/toolbar/gud-ni.xpm b/lisp/toolbar/gud-ni.xpm
index cdb8c38e8d4..bd4f02db12e 100644
--- a/lisp/toolbar/gud-ni.xpm
+++ b/lisp/toolbar/gud-ni.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * gud_nexti_xpm[] = { 2static char * gud_nexti_xpm[] = {
3"24 24 6 1", 3"24 24 6 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #CCCC00003333", 5". c #CCCC00003333",
6"X c #616161616161", 6"X c #616161616161",
7"o c #D4D400000000", 7"o c #D4D400000000",
diff --git a/lisp/toolbar/gud-print.xpm b/lisp/toolbar/gud-print.xpm
index cab2b7d6109..e1e7c623355 100644
--- a/lisp/toolbar/gud-print.xpm
+++ b/lisp/toolbar/gud-print.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * print_xpm[] = { 2static char * print_xpm[] = {
3"24 24 2 1", 3"24 24 2 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #000000000000", 5". c #000000000000",
6" ", 6" ",
7" ", 7" ",
diff --git a/lisp/toolbar/gud-pstar.pbm b/lisp/toolbar/gud-pstar.pbm
new file mode 100644
index 00000000000..1f5967107a0
--- /dev/null
+++ b/lisp/toolbar/gud-pstar.pbm
Binary files differ
diff --git a/lisp/toolbar/gud-pstar.xpm b/lisp/toolbar/gud-pstar.xpm
new file mode 100644
index 00000000000..6edc603db14
--- /dev/null
+++ b/lisp/toolbar/gud-pstar.xpm
@@ -0,0 +1,29 @@
1/* XPM */
2static char * gud_pstar_xpm[] = {
3"24 24 2 1",
4" c #BDBDBEBEBDBD",
5". c #000000000000",
6" ",
7" ",
8" ",
9" ",
10" ",
11" ",
12" ",
13" ",
14" ... ... ",
15" ... ... ",
16" .. .. . ",
17" .. .. . . . ",
18" .. .. ... ",
19" .. .. . . . ",
20" .. .. . ",
21" ... .. ",
22" .. .. ",
23" .. ",
24" .. ",
25" .. ",
26" .... ",
27" ",
28" ",
29" "};
diff --git a/lisp/toolbar/gud-remove.xpm b/lisp/toolbar/gud-remove.xpm
index c61b6b2b8f3..5f38bd416ed 100644
--- a/lisp/toolbar/gud-remove.xpm
+++ b/lisp/toolbar/gud-remove.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * go_xpm[] = { 2static char * go_xpm[] = {
3"24 24 4 1", 3"24 24 4 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #000080800000", 5". c #000080800000",
6"X c #FFFFFFFFFFFF", 6"X c #FFFFFFFFFFFF",
7"o c #F8F8FCFCF8F8", 7"o c #F8F8FCFCF8F8",
diff --git a/lisp/toolbar/gud-run.xpm b/lisp/toolbar/gud-run.xpm
index 6e077a11659..ef29662ed24 100644
--- a/lisp/toolbar/gud-run.xpm
+++ b/lisp/toolbar/gud-run.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * run_xpm[] = { 2static char * run_xpm[] = {
3"24 24 9 1", 3"24 24 9 1",
4" c #c0c0c0", 4" c None",
5". c #000080", 5". c #000080",
6"X c #aa9faa", 6"X c #aa9faa",
7"o c #b5b9b5", 7"o c #b5b9b5",
diff --git a/lisp/toolbar/gud-s.xpm b/lisp/toolbar/gud-s.xpm
index 7b4eb876235..4ee3eccaee2 100644
--- a/lisp/toolbar/gud-s.xpm
+++ b/lisp/toolbar/gud-s.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * step_xpm[] = { 2static char * step_xpm[] = {
3"24 24 6 1", 3"24 24 6 1",
4" c #c0c0c0", 4" c None",
5". c #d40000", 5". c #d40000",
6"X c #616161", 6"X c #616161",
7"o c #2a1f55", 7"o c #2a1f55",
diff --git a/lisp/toolbar/gud-si.xpm b/lisp/toolbar/gud-si.xpm
index d2667fc70b6..b20eb6243f7 100644
--- a/lisp/toolbar/gud-si.xpm
+++ b/lisp/toolbar/gud-si.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * gud_stepi_xpm[] = { 2static char * gud_stepi_xpm[] = {
3"24 24 5 1", 3"24 24 5 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #D4D400000000", 5". c #D4D400000000",
6"X c #616161616161", 6"X c #616161616161",
7"o c #2A2A1F1F5555", 7"o c #2A2A1F1F5555",
diff --git a/lisp/toolbar/gud-until.xpm b/lisp/toolbar/gud-until.xpm
index 8801320a2d1..f82da6700b2 100644
--- a/lisp/toolbar/gud-until.xpm
+++ b/lisp/toolbar/gud-until.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * goto_xpm[] = { 2static char * goto_xpm[] = {
3"24 24 6 1", 3"24 24 6 1",
4" c #c0c0c0", 4" c None",
5". c #ff0000", 5". c #ff0000",
6"X c #616161", 6"X c #616161",
7"o c #2a1f55", 7"o c #2a1f55",
diff --git a/lisp/toolbar/gud-up.xpm b/lisp/toolbar/gud-up.xpm
index 10d8c1278c9..c2e4c9f8ff4 100644
--- a/lisp/toolbar/gud-up.xpm
+++ b/lisp/toolbar/gud-up.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * up_xpm[] = { 2static char * up_xpm[] = {
3"24 24 14 1", 3"24 24 14 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #000000000000", 5". c #000000000000",
6"X c #7F7F7F7F7F7F", 6"X c #7F7F7F7F7F7F",
7"o c #2D2D2D2D2D2D", 7"o c #2D2D2D2D2D2D",
diff --git a/lisp/toolbar/gud-watch.xpm b/lisp/toolbar/gud-watch.xpm
index 41361dc32b2..52052212390 100644
--- a/lisp/toolbar/gud-watch.xpm
+++ b/lisp/toolbar/gud-watch.xpm
@@ -1,7 +1,7 @@
1/* XPM */ 1/* XPM */
2static char * watch_xpm[] = { 2static char * watch_xpm[] = {
3"24 24 11 1", 3"24 24 11 1",
4" c #C0C0C0C0C0C0", 4" c None",
5". c #808080808080", 5". c #808080808080",
6"X c #000000000000", 6"X c #000000000000",
7"o c #A5A59F9FA3A3", 7"o c #A5A59F9FA3A3",
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 16d51a0258c..f5bbf4a7bf4 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -500,7 +500,8 @@ should be shown to the user."
500 (url-request-data url-http-data) 500 (url-request-data url-http-data)
501 (url-request-extra-headers url-http-extra-headers)) 501 (url-request-extra-headers url-http-extra-headers))
502 (url-retrieve redirect-uri url-callback-function 502 (url-retrieve redirect-uri url-callback-function
503 url-callback-arguments) 503 (cons redirect-uri
504 (cdr url-callback-arguments)))
504 (url-mark-buffer-as-dead (current-buffer)))))) 505 (url-mark-buffer-as-dead (current-buffer))))))
505 (4 ; Client error 506 (4 ; Client error
506 ;; 400 Bad Request 507 ;; 400 Bad Request
@@ -849,7 +850,7 @@ the end of the document."
849 (url-display-percentage nil nil) 850 (url-display-percentage nil nil)
850 (goto-char (match-end 1)) 851 (goto-char (match-end 1))
851 (if (re-search-forward "^\r*$" nil t) 852 (if (re-search-forward "^\r*$" nil t)
852 (message "Saw end of trailers...")) 853 (url-http-debug "Saw end of trailers..."))
853 (if (url-http-parse-headers) 854 (if (url-http-parse-headers)
854 (url-http-activate-callback)))))))))) 855 (url-http-activate-callback))))))))))
855 856
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 3941fd681df..a82176af5e8 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -263,7 +263,7 @@ See `wdired-mode'."
263 (buffer-enable-undo) ; Performance hack. See above. 263 (buffer-enable-undo) ; Performance hack. See above.
264 (set-buffer-modified-p nil) 264 (set-buffer-modified-p nil)
265 (setq buffer-undo-list nil) 265 (setq buffer-undo-list nil)
266 (run-hooks 'wdired-mode-hook) 266 (run-mode-hooks 'wdired-mode-hook)
267 (message (substitute-command-keys "Press \\[wdired-finish-edit] when finished \ 267 (message (substitute-command-keys "Press \\[wdired-finish-edit] when finished \
268or \\[wdired-abort-changes] to abort changes"))) 268or \\[wdired-abort-changes] to abort changes")))
269 269
diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el
index 3878289b467..57c4ebdb548 100644
--- a/lisp/wid-browse.el
+++ b/lisp/wid-browse.el
@@ -82,7 +82,7 @@ if that value is non-nil."
82 (use-local-map widget-browse-mode-map) 82 (use-local-map widget-browse-mode-map)
83 (easy-menu-add widget-browse-mode-customize-menu) 83 (easy-menu-add widget-browse-mode-customize-menu)
84 (easy-menu-add widget-browse-mode-menu) 84 (easy-menu-add widget-browse-mode-menu)
85 (run-hooks 'widget-browse-mode-hook)) 85 (run-mode-hooks 'widget-browse-mode-hook))
86 86
87(put 'widget-browse-mode 'mode-class 'special) 87(put 'widget-browse-mode 'mode-class 'special)
88 88
diff --git a/lisp/xml.el b/lisp/xml.el
index daf5689c18b..f9527a276b1 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -84,6 +84,9 @@
84;;** 84;;**
85;;******************************************************************* 85;;*******************************************************************
86 86
87(defconst xml-undefined-entity "?"
88 "What to substitute for undefined entities")
89
87(defvar xml-entity-alist 90(defvar xml-entity-alist
88 '(("lt" . "<") 91 '(("lt" . "<")
89 ("gt" . ">") 92 ("gt" . ">")
@@ -745,9 +748,10 @@ This follows the rule [28] in the XML specifications."
745 ((eq (length this-part) 0) 748 ((eq (length this-part) 0)
746 (error "XML: (Not Well-Formed) No entity given")) 749 (error "XML: (Not Well-Formed) No entity given"))
747 (t 750 (t
748 (when xml-validating-parser 751 (if xml-validating-parser
749 (error "XML: (Validity) Undefined entity `%s'" 752 (error "XML: (Validity) Undefined entity `%s'"
750 this-part)))))) 753 this-part)
754 xml-undefined-entity)))))
751 755
752 (cond ((null children) 756 (cond ((null children)
753 ;; FIXME: If we have an entity that expands into XML, this won't work. 757 ;; FIXME: If we have an entity that expands into XML, this won't work.