summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
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 @@
-2005-05-26 Nick Roberts <nickrob@snap.net.nz>
+2005-06-05 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-info-locals-handler): Use window point
+ to preserve point.
+ (gdb-find-file-hook): Add doc string.
+
+ * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate
+ C dereferenced pointer expression.
+ (gud-tool-bar-map): Put it on the tool bar. Re-order icons.
+
+ * toolbar/gud-pstar.xpm, toolbar/gud-pstar.pbm: New files.
+
+ * toolbar/gud-break.xpm, toolbar/gud-cont.xpm, toolbar/gud-down.xpm,
+ toolbar/gud-finish.xpm, toolbar/gud-ni.xpm, toolbar/gud-n.xpm,
+ toolbar/gud-print.xpm, toolbar/gud-remove.xpm, toolbar/gud-run.xpm,
+ toolbar/gud-si.xpm, toolbar/gud-s.xpm, toolbar/gud-until.xpm,
+ toolbar/gud-up.xpm, toolbar/gud-watch.xpm:
+ Make background transparent.
+
+2005-06-04 Luc Teirlinck <teirllm@auburn.edu>
+
+ * font-lock.el (font-lock-add-keywords): Doc fix. Comment change.
+ (font-lock-remove-keywords): Doc fix.
+ (font-lock-mode-major-mode): Compiler defvar.
+ (font-lock-set-defaults): Use `font-lock-mode-major-mode'.
+
+ * font-core.el (font-lock-mode-major-mode): Compiler defvar.
+ (font-lock-mode): Update `font-lock-mode-major-mode'.
+ (font-lock-set-defaults): Compiler defvar.
+ (font-lock-default-function): Take `font-lock-mode-major-mode'
+ into account.
+
+ * emacs-lisp/easy-mmode.el (define-global-minor-mode): Make it
+ keep track of which major mode it enabled the minor mode for.
+ Use find-file-hook again. Update docstring.
+
+ * simple.el (eval-expression-print-level)
+ (eval-expression-print-length, eval-expression-debug-on-error):
+ Doc fixes.
+
+2005-06-04 Matt Hodges <MPHodges@member.fsf.org>
+
+ * iswitchb.el (iswitchb-single-match-face)
+ (iswitchb-current-match-face, iswitchb-virtual-matches-face)
+ (iswitchb-invalid-regexp-face): New faces.
+ (iswitchb-completions): Use them.
+ (iswitchb-use-faces): Renamed from iswitchb-use-fonts, which is
+ now marked as an obsolete alias.
+ (iswitchb-read-buffer): Remove check for bound font variables.
+ (iswitchb-invalid-regexp): New free variable.
+ (iswitchb-get-matched-buffers): Catch invalid-regexp errors and
+ set iswitchb-invalid-regexp.
+ (iswitchb, iswitchb-complete, iswitchb-completions): Deal with
+ invalid regexps.
+ (iswitchb-completions): Add check for complete match when entering
+ a regexp.
+ (iswitchb-completions): Remove require-match argument.
+ (iswitchb-exhibit): Fix caller.
+ (iswitchb-common-match-inserted): New variable.
+ (iswitchb-complete, iswitchb-completion-help): Use it.
+
+2005-06-04 David Reitter <david.reitter@gmail.com> (tiny change)
+
+ * url-http.el (url-http-chunked-encoding-after-change-function):
+ Use `url-http-debug' instead of `message'.
+
+2005-06-04 Thierry Emery <thierry.emery@free.fr> (tiny change)
+
+ * url-http.el (url-http-parse-headers): Pass redirected URL as a
+ callback argument.
+
+2005-06-04 Kim F. Storm <storm@cua.dk>
+
+ * simple.el (line-move): Only call sit-for when moving backwards.
+
+ * ido.el (ido-make-merged-file-list-1): New defun split from
+ ido-make-merged-file-list.
+ (ido-make-merged-file-list): Bind throw-on-input around call to
+ ido-make-merged-file-list-1. Return input-pending-p if
+ interrupted by more input available.
+ (ido-read-internal): Handle input-pending-p return value from
+ ido-make-merged-file-list.
+
+2005-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/flyspell.el (flyspell-check-word-p): Simplify silly
+ compatibility code.
+
+ * international/latexenc.el (latexenc-find-file-coding-system):
+ Don't inherit the EOL part of the coding-system from the
+ tex-main buffer. Fit within 80 columns.
+
+2005-06-03 Matt Hodges <MPHodges@member.fsf.org>
+
+ * tmm.el (tmm-inactive-face): New face.
+ (tmm-remove-inactive-mouse-face): New function.
+ (tmm-prompt, tmm-add-one-shortcut)
+ (tmm-add-prompt, tmm-get-keymap): Make active menu items visible
+ but not selectable.
+
+2005-06-03 Juanma Barranquero <lekktu@gmail.com>
+
+ * faces.el (face-equal): Improve argument/docstring consistency.
+
+2005-06-03 Daniel Pfeiffer <occitan@esperanto.org>
+
+ * progmodes/make-mode.el (makefile-targets-face)
+ (makefile-shell-face, makefile-makepp-perl-face): Add :version.
+ (makefile-bsdmake-dependency-regex)
+ (makefile-makepp-rule-action-regex)
+ (makefile-bsdmake-rule-action-regex): New constants.
+ (makefile-makepp-mode, makefile-bsdmake-mode): Use them.
+
+ * progmodes/compile.el (compilation-error-regexp-alist-alist):
+ Allow (...) within `...' for makepp messages.
+
+2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu>
+
+ * ediff-diff.el (ediff-same-contents): Eliminate CL-type functions.
+
+ * ediff-mult.el (ediff-intersect-directories): Make sure that ".." and
+ "." files are deleted from all file lists before comparison.
+
+ * viper-keym.el (viper-toggle-key, viper-quoted-insert-key)
+ (viper-ESC-key): Made them customizable.
+
+ * viper.el (viper-non-hook-settings): Fix the names of defadvices.
+
+2005-06-01 Luc Teirlinck <teirllm@auburn.edu>
+
+ * autorevert.el (auto-revert-buffers): Use save-match-data.
+
+2005-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/easymenu.el (easy-menu-return-item): Quick fix to find
+ menu items with a nil command binding.
+
+2005-06-01 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacs-lisp/cl-macs.el (defsetf):
+ Improve argument/docstring consistency.
+
+ * faces.el (list-faces-display): Improve the formatting by
+ computing the maximum length required for any face-name (reworked
+ patch of 1999-01-11, accidentally deleted on 1999-07-21).
+ (internal-find-face): Remove redundant info in docstring.
+
+2005-06-01 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-1)
+ (gdb-info-breakpoints-custom, gdb-delete-breakpoint)
+ (gdb-goto-breakpoint, gdb-source-info, gdb-get-location)
+ (gdb-assembler-custom): Improve regexps.
+ (def-gdb-auto-update-handler): Use window point to preserve
+ point.
+
+2005-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * thumbs.el (thumbs-mode): Fix misuse of make-variable-buffer-local.
+
+2005-05-31 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc-embed.el (calc-embedded-word): Change argument passed
+ to calc-embedded.
+ (calc-embedded-make-info): Have plain prefix argument select
+ entire line.
+
+2005-05-31 Juanma Barranquero <lekktu@gmail.com>
+
+ * faces.el (list-faces-display): Signal error if passed a regexp
+ that matches no face name.
+
+ * simple.el (filter-buffer-substring): Fix typo in docstring.
+
+2005-05-31 Richard M. Stallman <rms@gnu.org>
+
+ * progmodes/vhdl-mode.el (vhdl-fill-region): Test ARG, not INTERACTIVE.
+ (vhdl-emacs-21): Doc fix.
+ (vhdl-mode): Unconditionally set comment-padding.
+ (vhdl-fixup-whitespace-region): Insert spaces only where
+ there are none.
+ (vhdl-statistics-buffer): Make the Emacs 21 behavior universal.
+
+2005-05-30 John Wiegley <johnw@newartisans.com>
+
+ * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el
+ * eshell/em-unix.el, eshell/esh-ext.el, eshell/esh-io.el
+ * eshell/esh-util.el, eshell/esh-var.el: Change all uses of
+ `directory-sep-char' to ?/, and all uses of `string-to-int' to
+ `string-to-number'.
+
+2005-05-30 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc.el (calc-bug-address): Fix docstring.
+ (calc-window-hook, calc-trail-window-hook): New variables.
+ (calc-trail-display): Restore use of calc-trail-window-hook.
+ (calc): Restore use of calc-window-hook.
+
+2005-05-31 Masatake YAMATO <jet@gyve.org>
+
+ * emacs-lisp/find-func.el (find-function-noselect): Handle subroutines.
+
+ * help-fns.el (help-C-file-name): Add autoload mark for
+ `find-function-noselect'.
+
+2005-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/tex-mode.el (tex-compile-commands, tex-compile)
+ (tex-start-tex): Undo all but the last part of the 2005-05-28 change.
+
+2005-05-30 Glenn Morris <gmorris@ast.cam.ac.uk>
+
+ * calendar/diary-lib.el (mark-included-diary-files): Only kill
+ included diary buffer if it was not already being visited.
+ Reported by Stephen Berman <Stephen.Berman@gmx.net>.
+
+ * calendar/icalendar.el (top-level): Do not require 'appt.
+
+ * mail/supercite.el (sc-select-attribution): Only use a list
+ element from sc-attrib-selection-list if it returns a string.
+ Reported by Davide G. M. Salvetti <salve@debian.org>.
+
+2005-05-30 Juanma Barranquero <lekktu@gmail.com>
+
+ * thumbs.el (thumbs-thumbname): The resulting thubname now
+ includes a hash value to improve its uniqueness, and has a ".jpg"
+ extension. Also, it is now a valid filename on all systems.
+ (thumbs-make-thumb): Use `let', not `let*'.
+ (thumbs-show-thumbs-list): Check for JPEG availability.
+
+2005-05-30 Richard M. Stallman <rms@gnu.org>
+
+ * filesets.el (filesets-menu-ensure-use-cached):
+ Prevent warning when emacs-version>= is undefined.
+
+ * printing.el (pr-interactive-n-up): Use string-to-number.
+
+ * emulation/tpu-mapper.el: Use eval-buffer, not eval-current-buffer.
+
+ * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn):
+ Warn only when name to be defined is quoted.
+
+2005-05-30 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-toggle-breakpoint):
+ Make regexp more robust.
+ (gdb-display-assembler-buffer, gdb-frame-assembler-buffer):
+ Force regeneration of disassembly.
+
+2005-05-29 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc.el (calc-user-invocation): Check if
+ calc-invocation-macro is non-nil.
+
+2005-05-29 Juri Linkov <juri@jurta.org>
+
+ * add-log.el (change-log-font-lock-keywords):
+ Add `+' to e-mail regexp to accept mail address with keywords.
+
+ * man.el (Man-name-regexp): Add `:' to accept qualified names.
+
+2005-05-29 Luc Teirlinck <teirllm@auburn.edu>
+
+ * progmodes/inf-lisp.el (inferior-lisp-mode): Use delay-mode-hooks.
+
+ * ielm.el (inferior-emacs-lisp-mode): Ditto.
+
+2005-05-29 Richard M. Stallman <rms@gnu.org>
+
+ * textmodes/flyspell.el (flyspell-auto-correct-previous-word):
+ Undo the change that moves to end of the current word.
+
+2005-05-29 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-memory-set-repeat-count):
+ Throw error when count <= 0 to ensure input is a number.
+ (gdb-read-memory-custom): Pick up address from buffer.
+ (gdb-memory-mode): Allow user to increment and decrement
+ memory address from header line.
+
+2005-05-29 Richard M. Stallman <rms@gnu.org>
+
+ * flyspell.el (flyspell-version): Function deleted.
+ (flyspell-auto-correct-previous-hook): Doc fix.
+
+ * jit-lock.el (jit-lock-function, jit-lock-after-change):
+ Do nothing if memory is full.
+
+ * font-lock.el (font-lock-fontify-syntactically-region):
+ Pass t for GREEDY to looking-back.
+
+ * saveplace.el (save-place-alist-to-file): Write the file
+ using write-region.
+
+ * subr.el (looking-back): New argument GREEDY.
+
+ * progmodes/compile.el (compilation-start): Set the mode
+ before inserting the initial text.
+
+ * progmodes/which-func.el (which-func-update-1): Turn the mode
+ off in case of error by setting which-func-mode.
+
+2005-05-29 Peter Heslin <p.j.heslin@durham.ac.uk> (tiny change)
+
+ * flyspell.el (flyspell-auto-correct-previous-word):
+ Narrow down to what's on the screen, and recenter overlays
+ at the end of the next word.
+
+2005-05-29 Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
+
+ * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up.
+ (flyspell-default-delayed-commands): Add backward-delete-char-untabify.
+ (flyspell-abbrev-p): Default to nil.
+ (flyspell-use-global-abbrev-table-p): Doc fix.
+ (flyspell-large-region): Allow nil as value.
+ (flyspell-use-meta-tab, flyspell-auto-correct-binding): New variables.
+
+ (mail-mode-flyspell-verify): More robust handling
+ of `mail-header-separator'. More efficient signature detection.
+ Allow for regexp metacharacters in message-header-separator.
+ Adding `To' not to be checked in mail-mode-flyspell-verify.
+
+ (flyspell-prog-mode): Run flyspell-prog-mode-hook.
+ (flyspell-mouse-map): Bind M-TAB only if flyspell-use-meta-tab.
+ Bind flyspell-auto-correct-binding.
+ Bind C-. and C-, .
+ (flyspell-mode-map): Likewise.
+ (flyspell-mode): Doc fix.
+ (flyspell-accept-buffer-local-defs): Preserve current buffer.
+ (flyspell-mode-on): Bind flyspell-mouse-map and flyspell-mode-map.
+ (flyspell-word-cache-result): New var, always local.
+ (flyspell-check-pre-word-p): Doc fix.
+ (flyspell-check-changed-word-p): Handle spc like newline.
+ (flyspell-post-command-hook): Set flyspell-word-cache-result.
+ (flyspell-word-search-backward, flyspell-word-search-forward):
+ New functions.
+ (flyspell-word): Return t if nothing to check.
+ When parsing TeX code, check for after } or \.
+ Use flyspell-word-search-backward to find previous word.
+ Return nil if duplicated word.
+ For word already checked, return same value as last time.
+ Set flyspell-word-cache-result after checking.
+ Don't clobber the return value.
+ (flyspell-get-word): Major rewrite.
+ (flyspell-external-point-words): New locals pword, pcount.
+ Fix size used in progress message.
+ Find the proper corresponding word in flyspell-large-region-buffer.
+ (flyspell-region): Check for flyspell-large-region = nil.
+ (flyspell-highlight-incorrect-region): Clean up overlays in region.
+ (flyspell-auto-correct-word): Check that WORD is a cons.
+ (flyspell-correct-word): Likewise.
+
+2005-05-29 Daniel Pfeiffer <occitan@esperanto.org>
+
+ * progmodes/make-mode.el (makefile-rule-action-regex)
+ (makefile-macroassign-regex, makefile-makepp-mode)
+ (makefile-bsdmake-mode): Continuation lines may be empty.
+ Reported by Joshua Varner.
+ (makefile-makepp-font-lock-keywords): Add $(stem).
+
+2005-05-28 Karl Berry <karl@gnu.org>
+
+ * textmodes/tex-mode.el: Now that tex-send-command calls
+ shell-quote-argument (2005-03-31 change), remove all calls to
+ shell-quote-argument; they all end up invoking tex-send-command.
+ The double quoting loses on filenames with non-safe characters,
+ such as "@". Reported by Frederik Fouvry.
+
+2005-05-29 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-assembler-custom): Be more careful
+ about preserving point.
+
+2005-05-27 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc-misc.el (calc-info-goto-node): Use info instead of
+ Info-goto-node.
+
+ * calc/calc-embed.el (calc-embed-arg): New variable.
+ (calc-do-embedded-activate, calc-embedded-activate-formula)
+ (calc-embedded-edit, calc-do-embedded-activate): Replace undeclared
+ variable by new variable.
+ (calc-embedded-make-info): Replace undeclared variable by new
+ variable. When selecting region with positive prefix
+ argument, use end of previous line instead of beginning of line.
+
+ * calc/calc-aent.el (calc-arg-values): Declare it.
+
+ * calc/calc-ext.el (calc-help-map, calc-alg-map, calc-alg-esc-map):
+ Declare them.
+
+ * calc/calc-stuff.el (math-decls-cache-tag): Declare it.
+
+ * calc/calc.el (calc-alg-map): Declare it.
+
+ * calc/calcalg2.el (math-decls-cache, math-decls-all): Declare them.
+
+2005-05-28 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-all-registers): New variable.
+ (gdb-registers-buffer, toggle-gdb-all-registers):
+ Toggle display of floating point registers.
+ (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers.
+
+ * progmodes/gud.el (gud-goto-info): Use info. Don't use require.
+ (toggle-gud-tooltip-dereference):
+ Rename from gud-toggle-tooltip-dereference.
+
+2005-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * info.el (Info-goto-node): Revert autoload addition (2004-06-12).
+
+2005-05-27 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc-prog.el (calc-kbd-report): Remove.
+ (calc-kbd-query): Rewrite.
+
+2005-05-27 Juanma Barranquero <lekktu@gmail.com>
+
+ * image.el (image-library-alist): Move to image.c.
+ (image-type-available-p): Doc fix.
+
+2005-05-27 Lute Kamstra <lute@gnu.org>
+
+ * calc/calc.el (calc):
+ * outline.el (outline-1, outline-2, outline-3, outline-4)
+ (outline-5, outline-6, outline-7, outline-8):
+ * textmodes/dns-mode.el (dns-mode):
+ * textmodes/sgml-mode.el (sgml-namespace-face):
+ * textmodes/tex-mode.el (superscript, subscript, tex-math-face)
+ (tex-verbatim-face, tex-use-reftex):
+ * textmodes/texinfo.el (texinfo-heading-face):
+ Specify customization group.
+
+ * longlines.el: Don't require easy-mmode.
+ (longlines-visible-face): Specify customization group.
+
+2005-05-27 Kenichi Handa <handa@m17n.org>
+
+ * language/cyrillic.el: Add cyrillic-iso8859-5 characters in the
+ encoding table of windows-1251.
+
+ * international/ucs-tables.el (ucs-set-table-for-input):
+ If translation-table-for-input of a coding system is a symbol, get
+ its translation-table property.
+
+ * international/code-pages.el: Don't register a coding system into
+ non-iso-charset-alist more than once.
+ (cp-make-coding-system): Likewise.
+
+2005-05-26 John Wiegley <johnw@newartisans.com>
+
+ * eshell/esh-cmd.el (eshell-eval-command): If the return value of
+ `eshell-resume-eval' is wrapped in a list, it indicates that the
+ command was run asynchronously. In that case, unwrap the value
+ before checking the delimiter value.
+
+ * eshell/em-cmpl.el (eshell-complete-parse-arguments): If the
+ character before a space at the end of a line is \, assume the space
+ is part of the last argument rather than a final argument separator.
+
+ * eshell/esh-io.el (eshell-get-target): If `eshell-buffer-shorthand'
+ is in use, and the target is `t' or `nil' (which are the most common
+ values), don't assume that the symbol target is a buffer.
+
+2005-05-26 Luc Teirlinck <teirllm@auburn.edu>
+
+ * calendar/calendar.el (calendar-mode-line-format):
+ Use mode-line-highlight as mouse-face.
+
+ * time.el (display-time-string-forms, display-time-update):
+ Use mode-line-highlight as mouse-face.
+
+2005-05-26 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc.el (calc-language-alist): Remove extra defvar.
+
+2005-05-26 Lute Kamstra <lute@gnu.org>
+
+ * arc-mode.el (archive-mode):
+ * bookmark.el (bookmark-read-annotation-mode)
+ (bookmark-edit-annotation-mode, bookmark-bmenu-mode):
+ * bs.el (bs-mode):
+ * calc/calc-yank.el (calc-edit-mode):
+ * calc/calc.el (calc-mode, calc-trail-mode):
+ * calculator.el (calculator-mode):
+ * chistory.el (command-history-mode):
+ * comint.el:
+ * cus-edit.el (custom-mode):
+ * descr-text.el (describe-text-mode):
+ * ebuff-menu.el (Electric-buffer-menu-mode):
+ * ediff-util.el (ediff-mode):
+ * emacs-lisp/re-builder.el (reb-mode):
+ * emulation/vi.el (vi-mode-setup):
+ * emulation/ws-mode.el (wordstar-mode):
+ * eshell/esh-mode.el (eshell-mode):
+ * forms.el (forms-mode):
+ * help-mode.el (help-mode):
+ * hexl.el (hexl-mode):
+ * ibuffer.el (ibuffer-mode):
+ * ielm.el (inferior-emacs-lisp-mode):
+ * info.el (Info-mode, Info-edit-mode):
+ * international/swedish.el:
+ * ledit.el (ledit-from-lisp-mode):
+ * locate.el (locate-mode):
+ * mail/rmail.el (rmail-mode):
+ * mail/rmailedit.el (rmail-edit-mode):
+ * mail/rmailsum.el (rmail-summary-mode):
+ * mail/supercite.el (sc-electric-mode):
+ * net/eudc.el (eudc-mode):
+ * net/quickurl.el (quickurl-list-mode):
+ * net/snmp-mode.el (snmp-mode, snmpv2-mode):
+ * obsolete/ooutline.el (outline-mode):
+ * obsolete/options.el (Edit-options-mode):
+ * obsolete/rnews.el (news-mode):
+ * obsolete/rnewspost.el (news-reply-mode):
+ * play/5x5.el (5x5-mode):
+ * play/decipher.el (decipher-mode, decipher-stats-mode):
+ * play/gomoku.el (gomoku-mode):
+ * play/snake.el (snake-mode):
+ * play/solitaire.el (solitaire-mode):
+ * play/tetris.el (tetris-mode):
+ * progmodes/ada-mode.el (ada-mode):
+ * progmodes/antlr-mode.el (antlr-mode):
+ * progmodes/autoconf.el (autoconf-mode):
+ * progmodes/dcl-mode.el (dcl-mode):
+ * progmodes/delphi.el (delphi-mode):
+ * progmodes/ebrowse.el (ebrowse-tree-mode)
+ (ebrowse-electric-list-mode, ebrowse-member-mode)
+ (ebrowse-electric-position-mode):
+ * progmodes/f90.el (f90-mode):
+ * progmodes/fortran.el (fortran-mode):
+ * progmodes/icon.el (icon-mode):
+ * progmodes/idlw-help.el (idlwave-help-mode):
+ * progmodes/idlw-shell.el (idlwave-shell-mode):
+ * progmodes/idlwave.el (idlwave-mode):
+ * progmodes/inf-lisp.el (inferior-lisp-mode):
+ * progmodes/m4-mode.el (m4-mode):
+ * progmodes/meta-mode.el (metafont-mode, metapost-mode):
+ * progmodes/modula2.el (modula-2-mode):
+ * progmodes/octave-inf.el (inferior-octave-mode):
+ * progmodes/octave-mod.el (octave-mode):
+ * progmodes/pascal.el (pascal-mode):
+ * progmodes/sh-script.el (sh-mode):
+ * progmodes/sql.el (sql-mode, sql-interactive-mode):
+ * progmodes/vhdl-mode.el (vhdl-mode):
+ * progmodes/xscheme.el (scheme-interaction-mode):
+ * replace.el (occur-mode):
+ * ses.el (ses-mode):
+ * simple.el (completion-list-mode):
+ * skeleton.el:
+ * speedbar.el (speedbar-mode):
+ * term.el (term-mode):
+ * terminal.el (terminal-edit-mode):
+ * textmodes/reftex-index.el (reftex-index-mode)
+ (reftex-index-phrases-mode):
+ * textmodes/reftex-sel.el (reftex-select-label-mode)
+ (reftex-select-bib-mode):
+ * textmodes/reftex-toc.el (reftex-toc-mode):
+ * wdired.el (wdired-change-to-wdired-mode):
+ * wid-browse.el (widget-browse-mode):
+ Use run-mode-hooks.
+
+ * array.el (array-mode):
+ * calendar/todo-mode.el (todo-mode):
+ * man.el (Man-mode):
+ * play/landmark.el (lm-mode):
+ * play/mpuz.el (mpuz-mode):
+ Use kill-all-local-variables and run-mode-hooks.
+
+ * subr.el (delay-mode-hooks): Specify indentation.
+
+2005-05-26 Mark A. Hershberger <mah@everybody.org>
+
+ * xml.el (xml-substitute-special): Don't die for undefined xml entities.
+
+2005-05-26 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc-prog.el (calc-user-define-edit): Don't find substring
+ of nil.
+
+2005-05-27 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-frame-address):
+ Rename from gdb-current-address.
+ (gdb-previous-frame-address): Rename from gdb-previous-address.
+ (gdb-selected-frame): Rename from gdb-current-frame.
+ (gdb-get-selected-frame): Rename from gdb-get-current-frame.
+ (gdb-frame-number): Rename from gdb-current-stack-level.
+ (gdb-ann3): Match new mode-name for disassembly buffer.
+ Extend initialisation of variables.
+ (gdb-post-prompt): Update disassembly from gdb-frame-handler.
+ (gdb-memory-mode): Use mouse-face in header line.
+ (gdb-assembler-buffer-name): Call it disassembly and give frame
+ in mode line.
+ (gdb-source-spec-regexp, gdb-assembler-custom)
+ (gdb-invalidate-assembler, gdb-frame-handler):
+ Make robust to leading zeroes in address format.
+
+2005-05-26 Carsten Dominik <dominik@science.uva.nl>
+
+ * textmodes/org.el (org-mode): Use `define-derived-mode' to
+ define `org-mode'.
+ (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'.
+
+2005-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
* log-edit.el (log-edit-changelog-entries): Distinguish between
filenames like xfns.c and fns.c.
- Coded by Stefan Monnier <monnier@iro.umontreal.ca>.
2005-05-25 Luc Teirlinck <teirllm@auburn.edu>
@@ -35,7 +639,7 @@
2005-05-24 Andre Spiegel <spiegel@gnu.org>
- * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsoleted.
+ * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsolete.
(cperl-vc-rcs-header, cperl-vc-sccs-header): New user options.
(cperl-mode): Use them.
@@ -76,11 +680,11 @@
CC Mode update to 5.30.10:
- * cc-fonts.el (c-font-lock-declarators): Fixed bug where the point
+ * cc-fonts.el (c-font-lock-declarators): Fix bug where the point
could go past the limit in decoration level 2, thereby causing
errors during interactive fontification.
- * cc-mode.el (c-make-inherited-keymap): Fixed cc-bytecomp bug when
+ * cc-mode.el (c-make-inherited-keymap): Fix cc-bytecomp bug when
the file is evaluated interactively.
* cc-engine.el (c-guess-basic-syntax): Handle operator
@@ -98,7 +702,7 @@
Compensate for return value from `forward-line' when it has moved
but not to a different line due to eob.
- * cc-engine.el (c-guess-basic-syntax): Fixed anchoring in
+ * cc-engine.el (c-guess-basic-syntax): Fix anchoring in
`objc-method-intro' and `objc-method-args-cont'.
2005-05-23 Alan Mackenzie <bug-cc-mode@gnu.org>
@@ -127,8 +731,7 @@
* subr.el (font-lock-defaults): Remove defvar as it's already
defined in font-core.el.
- * font-lock.el (font-lock-beginning-of-syntax-function): Fix
- docstring.
+ * font-lock.el (font-lock-beginning-of-syntax-function): Fix docstring.
2005-05-23 Nick Roberts <nickrob@snap.net.nz>
@@ -140,8 +743,8 @@
* font-core.el: Update comment.
- * emacs-lisp/easy-mmode.el (define-global-minor-mode): Use
- `after-change-major-mode-hook' instead of `find-file-hook'.
+ * emacs-lisp/easy-mmode.el (define-global-minor-mode):
+ Use `after-change-major-mode-hook' instead of `find-file-hook'.
* buff-menu.el (Buffer-menu-mode): Use `run-mode-hooks'.
@@ -201,15 +804,14 @@
* vc-cvs.el (vc-cvs-checkout-model): Handle the case where FILE
doesn't exist.
- * vc.el (vc-trunk-p): Add autoload cookie. The function is used
- in vc-rcs.el when vc-mistrust-permissions is t, which is not the
- default.
+ * vc.el (vc-trunk-p): Add autoload cookie. The function is used in
+ vc-rcs.el when vc-mistrust-permissions is t, which is not the default.
2005-05-22 Nick Roberts <nickrob@snap.net.nz>
* emacs-lisp/bytecomp.el: Remove make-obsolete-variable for
already deleted variables: auto-fill-hook, blink-paren-hook,
- lisp-indent-hook, inhibit-local-variables, unread-command-event
+ lisp-indent-hook, inhibit-local-variables, unread-command-event,
suspend-hooks, comment-indent-hook, meta-flag,
before-change-function, after-change-function,
font-lock-doc-string-face.
@@ -451,7 +1053,7 @@
post-command-idle-delay.
* faces.el (list-faces-display): Provide button when describe-face
- is called to take user back to the list of faces.
+ is called to take user back to the list of faces.
* help-fns.el (describe-variable): Remove hyperlinks in a
variable's value as these are quite frequently inappropriate.
@@ -721,8 +1323,8 @@
* progmodes/compile.el (compilation-setup): Set local value of
overlay-arrow-string to "" always.
- (compilation-set-window): Left fringe then don't scroll. No left
- fringe then no arrow and scroll message to top.
+ (compilation-set-window): Left fringe then don't scroll.
+ No left fringe then no arrow and scroll message to top.
(compilation-context-lines): Adjust doc string accordingly.
2005-05-16 Kim F. Storm <storm@cua.dk>
@@ -981,7 +1583,7 @@
2005-05-11 Stefan Monnier <monnier@iro.umontreal.ca>
- * files.el (executable-find): Move from executable.el. Use locate-file.
+ * files.el (executable-find): Move from executable.el. Use locate-file.
* progmodes/executable.el (executable-find): Move to files.el.
* font-lock.el (font-lock-fontify-keywords-region): Use a marker
@@ -1031,10 +1633,10 @@
* progmodes/gdb-ui.el (gdb-macro-info): New variable.
(gdb-source-info): Check for preprocessor info.
- (gdb-tooltip-print-1): New function. Don't print tooltip if it is
+ (gdb-tooltip-print-1): New function. Don't print tooltip if it is
a macro for a function.
- found (user might have used GDB dir command).
(gdb-info-breakpoints-custom): Try to find file again if not already
+ found (user might have used GDB dir command).
(gdb-get-location): Update gdb-location-alist correctly for change
to gdb-info-breakpoints-custom.
@@ -1130,7 +1732,7 @@
* tooltip.el: Move code for GUD tooltips into gud.el.
(require): CL no longer needed to compile case.
(tooltip-mode): Do not toggle functions for GUD tooltips.
- (tooltip-gud-tips-p): Remove. Replace with minor mode
+ (tooltip-gud-tips-p): Remove. Replace with minor mode
gud-tooltip-mode in gud.el.
(tooltip-gud-modes, tooltip-gud-display, tooltip-gud-echo-area)
(tooltip-gud-toggle-dereference): Rename in gud.el by replacing
@@ -1142,14 +1744,14 @@
(tooltip-gud-original-filter, tooltip-gud-dereference)
(tooltip-gud-event, tooltip-toggle-gud-tips)
(tooltip-gud-process-output, tooltip-gud-print-command)
- (tooltip-gud-tips): GUD tooltip functions/variables. Rename in
+ (tooltip-gud-tips): GUD tooltip functions/variables. Rename in
gud.el by replacing tooltip-gud prefix with gud-tooltip.
(gdb-tooltip-print): Move to gdb-ui.el.
* progmodes/gud.el: Move code for GUD tooltips from tooltip.el.
(require): CL needed to compile case.
(gud-tooltip-mode): Use to toggle GUD tooltips unstead of
- tooltip-gud-tips-p. Make it a minor-mode.
+ tooltip-gud-tips-p. Make it a minor-mode.
(gud-find-file): Only prepare GUD tooltips if gud-tooltip-mode is t.
(gud-menu-map): GUD tooltips use gud-tooltip-mode now.
(gud-tooltip-modes, gud-tooltip-display, gud-tooltip-echo-area)
@@ -1245,7 +1847,7 @@
* ido.el (ido-setup-hook): New hook.
(ido-define-mode-map-hook): Remove hook; use ido-setup-hook instead.
(ido-input-stack): New var.
- (ido-define-mode-map): Bind M-b to ido-push-dir. Move old
+ (ido-define-mode-map): Bind M-b to ido-push-dir. Move old
ido-next-work-file binding to M-O.
Bind M-f to ido-wide-find-file-or-pop-dir.
(ido-define-mode-map): Don't run ido-define-mode-map-hook.
@@ -1338,7 +1940,7 @@
(gdb-set-gud-minor-mode-1): Handle gdb-define-alist.
(gdb-source, gdb-memory-set-repeat-count): Replace string-to-int
with string-to-number.
- (gdb-reset): Kill gdb-define-alist. Move assignments outside loop.
+ (gdb-reset): Kill gdb-define-alist. Move assignments outside loop.
* progmodes/gud.el: Replace string-to-int with string-to-number.
(gud-find-file): Handle gdb-define-alist.
@@ -1384,7 +1986,7 @@
move to cc-vars.el.
* progmodes/cc-vars.el (cc-define-list-program):
- Change to "gcc -E -dM -". Make customizable.
+ Change to "gcc -E -dM -". Make customizable.
2005-05-02 Kim F. Storm <storm@cua.dk>
@@ -1435,7 +2037,7 @@
* subr.el (dot, dot-marker, dot-min, dot-max, buffer-flush-undo)
(compiled-function-p, focus-frame, unfocus-frame):
Remove aliases and obsolete declarations.
- Back out inadvertant changes from previous commit.
+ Back out inadvertent changes from previous commit.
2005-05-01 Luc Teirlinck <teirllm@auburn.edu>
@@ -1490,7 +2092,7 @@
2005-04-30 Nick Roberts <nickrob@snap.net.nz>
* progmodes/cc-mode.el (cc-create-define-alist): Check that file
- exists. Initialise cc-define-alist.
+ exists. Initialise cc-define-alist.
(c-mode): Add cc-create-define-alist locally to after-save-hook.
If there is no file (Macroexpansion) don't create an alist.
@@ -1580,7 +2182,7 @@
2005-04-28 Nick Roberts <nickrob@snap.net.nz>
- * progmodes/cc-mode.el: (cc-create-define-alist): New function.
+ * progmodes/cc-mode.el (cc-create-define-alist): New function.
(cc-define-alist): New variable.
(c-mode): Make it local and initialise it.
@@ -1709,7 +2311,7 @@
2005-04-25 Dan Nicolaescu <dann@ics.uci.edu>
* term.el (ansi-term-color-vector): Use the xterm colors.
- (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar.
+ (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar.
2005-04-25 Lute Kamstra <lute@gnu.org>
@@ -2731,13 +3333,13 @@
* add-log.el (change-log-font-lock-keywords): The manual
describing a Change Log entry, says: (...) "Aside from these
header lines, every line in the change log starts with a space or
- a tab.". The font-lock was not highlighting lines started with
+ a tab.". The font-lock was not highlighting lines started with
spaces, added support for it.
2005-04-03 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
* textmodes/bibtex.el (bibtex-url): Use format to generate the url.
- (bibtex-generate-url-list): Update docstring accordingly. Put the
+ (bibtex-generate-url-list): Update docstring accordingly. Put the
complex example in the docstring.
(bibtex-font-lock-url): Use pop.
@@ -2770,7 +3372,7 @@
2005-04-02 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change)
- * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional
+ * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional
mailbox specifications as well as URLs.
(rmail-insert-inbox-text): Remove unused conditional branches.
@@ -2872,12 +3474,7 @@
(fill-newline): Use fill-text-properties-at instead of
text-properties-at.
-2005-03-31 Karl Berry <karl@freefriends.org>
-
- * textmodes/tex-mode.el (tex-compile): Use shell-quote-argument,
- not comint-quote-filename.
-
-2005-03-31 Olive Lin <olive.lin@versateladsl.be> (tiny change)
+2005-03-31 Olive Lin <olive.lin@versateladsl.be> (tiny change)
* textmodes/tex-mode.el (tex-start-tex) Use shell-quote-argument,
not comint-quote-filename.
@@ -3016,12 +3613,12 @@
(hs-special-modes-alist): Add a Fortran entry.
(fortran-mode-map): Bind fortran-end-of-block,
fortran-beginning-of-block to \M-\C-n, \M-\C-p.
- (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4.
+ (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4.
(fortran-looking-at-if-then, fortran-end-of-block)
(fortran-beginning-of-block): New functions, for hideshow.
- * progmodes/f90.el (f90-end-block-re, f90-start-block-re): Doc
- fix. Tweak regexp.
+ * progmodes/f90.el (f90-end-block-re, f90-start-block-re):
+ Doc fix. Tweak regexp.
(f90-beginning-of-block): Push mark first.
2005-03-29 Jay Belanger <belanger@truman.edu>
@@ -3039,7 +3636,7 @@
* vc.el (vc-do-command): Use a pipe for async processes, so password
prompts don't show up at places where the user can't reply.
-2005-03-29 Olive Lin <olive.lin@versateladsl.be> (tiny change)
+2005-03-29 Olive Lin <olive.lin@versateladsl.be> (tiny change)
* textmodes/tex-mode.el (tex-send-command): shell-quote-argument
on the file name we pass to the inferior shell.
@@ -3269,11 +3866,11 @@
* calendar/calendar.el: Replace `legal' with `valid'.
* emacs-lisp/advice.el: Replace `legal' with `valid'.
* mail/supercite.el: Replace `legal' with `valid'.
- * progmodes/cperl-mode.el, progmodes/idlw-shell.el,
- progmodes/idlwave.el, progmodes/vhdl-mode.el: Replace `legal' with
- `valid'.
- * textmodes/reftex-vars.el, textmodes/reftex.el: Replace `legal'
- with `valid'.
+ * progmodes/cperl-mode.el, progmodes/idlw-shell.el
+ * progmodes/idlwave.el, progmodes/vhdl-mode.el:
+ Replace `legal' with `valid'.
+ * textmodes/reftex-vars.el, textmodes/reftex.el:
+ Replace `legal' with `valid'.
2005-03-25 Werner Lemberg <wl@gnu.org>
@@ -3283,15 +3880,15 @@
* emulation/vip.el: Replace `illegal' with `invalid'.
* eshell/esh-io.el, eshell/esh-var.el: Replace `illegal' with `invalid'.
* mail/supercite.el: Replace `illegal' with `invalid'.
- * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el,
- progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el,
- progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el,
- progmodes/sh-script.el, progmodes/xscheme.el: Replace `illegal' with
- `invalid'.
- * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el,
- textmodes/reftex-index.el, textmodes/reftex-parse.el,
- textmodes/reftex-ref.el, textmodes/reftex-vars.el,
- textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'.
+ * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el
+ * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el
+ * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el
+ * progmodes/sh-script.el, progmodes/xscheme.el:
+ Replace `illegal' with `invalid'.
+ * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el
+ * textmodes/reftex-index.el, textmodes/reftex-parse.el
+ * textmodes/reftex-ref.el, textmodes/reftex-vars.el
+ * textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'.
2005-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -3412,11 +4009,11 @@
(recentf-include-p): More robust.
(recentf-keep-p): New function.
(recentf-remove-if-non-kept): Rename from
- `recentf-remove-if-non-readable'. Use `recentf-keep-p'.
+ `recentf-remove-if-non-readable'. Use `recentf-keep-p'.
All callers updated.
(recentf-menu-items-for-commands): Fix help string.
- (recentf-track-closed-file): Update. Doc fix.
- (recentf-cleanup): Update. Count removed files. Doc fix.
+ (recentf-track-closed-file): Update. Doc fix.
+ (recentf-cleanup): Update. Count removed files. Doc fix.
2005-03-23 Kim F. Storm <storm@cua.dk>
@@ -4132,7 +4729,7 @@
* files.el (mode-require-final-newline): Doc fix.
-2005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change)
+2005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change)
* progmodes/which-func.el (which-function):
Specify NOERROR when calling imenu--make-index-alist.
@@ -4727,7 +5324,7 @@
* progmodes/gdb-ui.el (gdb-find-file-unhook): New variable.
(gdb-set-gud-minor-mode, gdb-set-gud-minor-mode-1)
(gdb-set-gud-minor-mode-existing-buffers): New functions.
- (gdb-find-file-hook): New hook. Add it to find-file-hook.
+ (gdb-find-file-hook): New hook. Add it to find-file-hook.
(gdb-info-breakpoints-custom, gdb-source-info): Simplify.
2005-02-14 Luc Teirlinck <teirllm@auburn.edu>
@@ -4891,13 +5488,13 @@
2005-02-05 Nick Roberts <nickrob@snap.net.nz>
- * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before
+ * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before
GDB-Windows on the menu-bar as this works better.
2005-02-04 Jay Belanger <belanger@truman.edu>
* calc/calc-embed.el (calc-embedded-update): Don't put in
- unnecessary newlines. Adjust the end of formula marker.
+ unnecessary newlines. Adjust the end of formula marker.
* calc/calc-lang.el (math-latex-parse-frac): Don't use arguments.
(math-latex-parse-two-args): New function.
@@ -4959,7 +5556,7 @@
2005-02-02 Nick Roberts <nickrob@snap.net.nz>
- * progmodes/gdb-ui.el: (gdb-goto-info): Delete.
+ * progmodes/gdb-ui.el (gdb-goto-info): Delete.
* progmodes/gud.el (gud-goto-info): New function.
(gud-tool-bar-map): Use correct icon.
@@ -5667,8 +6264,8 @@
2005-01-11 Juri Linkov <juri@jurta.org>
- * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm,
- * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm,
+ * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm
+ * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm
* toolbar/fwd_arrow.xpm, toolbar/fwd_arrow.pbm: New icons.
* info.el (Info-history-forward): New variable.
@@ -6392,7 +6989,7 @@
2004-12-21 Eli Barzilay <eli@barzilay.org>
- * calculator.el: (calculator-radix-grouping-mode)
+ * calculator.el (calculator-radix-grouping-mode)
(calculator-radix-grouping-digits)
(calculator-radix-grouping-separator):
New defcustoms for the new radix grouping mode functionality.
@@ -6593,11 +7190,11 @@
(zone-replace-char): New defsubst.
(zone-park/sit-for): Likewise.
(zone-fret): Take window-start arg.
- Update callers. Use `zone-park/sit-for'.
+ Update callers. Use `zone-park/sit-for'.
(zone-fill-out-screen): Rewrite.
- (zone-fall-through-ws): Likewise. Update callers.
+ (zone-fall-through-ws): Likewise. Update callers.
(zone-pgm-drip): Use `zone-replace-char'.
- Move var inits before while-loop. Use `zone-park/sit-for'.
+ Move var inits before while-loop. Use `zone-park/sit-for'.
(zone-pgm-random-life): Handle empty initial field.
Use `zone-replace-char' and `zone-park/sit-for'.
@@ -7438,16 +8035,16 @@
(tramp-file-name-handler-alist): Delete file-directory-files, add
directory-files-and-attributes.
(tramp-perl-file-attributes): Surround uid and gid by double
- quotes. Change parameter id-format from nonnumeric.
+ quotes. Change parameter id-format from nonnumeric.
(tramp-convert-file-attributes): New function.
(tramp-handle-file-attributes): Use it.
(tramp-maybe-send-perl-script): New function.
- (tramp-handle-file-attributes-with-perl): Use it. Don't convert
- file mode. Change parameter id-format from nonnumeric.
+ (tramp-handle-file-attributes-with-perl): Use it. Don't convert
+ file mode. Change parameter id-format from nonnumeric.
(tramp-handle-file-attributes-with-ls): Change parameter id-format
from nonnumeric.
(tramp-post-connection): Don't send tramp-perl-file-attributes
- script. Reset connection property "perl-scripts".
+ script. Reset connection property "perl-scripts".
(tramp-handle-insert-directory): Run real handler when ls-lisp is
in use.
@@ -7470,7 +8067,7 @@
(gdb-view-source-function, gdb-view-assembler): Delete functions.
(menu): Delete menu bindings for viewing source/assembler.
(gdb-setup-windows, gdb-restore-windows):
- Don't dedicate GUD. No assembler now.
+ Don't dedicate GUD. No assembler now.
(gdb-reset): No need to undedicate source buffers now.
(gdb-source-info): No assembler now.
@@ -7597,7 +8194,7 @@
(gdb-var-evaluate-expression-handler, gdb-put-string):
Remove unused variable bindings.
(gdb-setup-windows, gdb-display-buffer):
- Simplify. Use pop-to-buffer.
+ Simplify. Use pop-to-buffer.
(gdb-view-source-function): Simplify.
(gdb-frame-breakpoints-buffer):
Use pop-to-buffer, special-display-regexps.
@@ -7681,8 +8278,8 @@
* progmodes/gdb-ui.el (dedicated-switch-to-buffer): New function.
(gdb-ann3, gdb-setup-windows, gdb-restore-windows):
Dedicate gdb-related windows.
- (gdb-display-buffer): Dedicate gdb-related windows. Don't grab
- other frames.
+ (gdb-display-buffer): Dedicate gdb-related windows.
+ Don't grab other frames.
(gdb-reset): Remove dedicated property after debugging.
2004-11-24 Jay Belanger <belanger@truman.edu>
@@ -8548,8 +9145,8 @@
2004-11-10 Nick Roberts <nickrob@snap.net.nz>
- * tooltip.el: Don't require cl, comint, gud, gdb-ui for
- compilation. The resulting compiler warnings appear to be harmless.
+ * tooltip.el: Don't require cl, comint, gud, gdb-ui for compilation.
+ The resulting compiler warnings appear to be harmless.
2004-11-10 Daniel Pfeiffer <occitan@esperanto.org>
@@ -9772,7 +10369,7 @@
* kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and
reset kmacro-initial-counter-value if set.
(kmacro-set-counter): Only set kmacro-counter if defining or executing
- macro. Set kmacro-initial-counter-value otherwise. Never set both.
+ macro. Set kmacro-initial-counter-value otherwise. Never set both.
(kmacro-display): Show macro counter if non-zero.
* subr.el (substitute-key-definition): Mention command remapping
@@ -9959,8 +10556,8 @@
* term.el (term-adjust-current-row-cache): Don't allow the current
row to become negative.
- (term-emulate-terminal): Fix insert mode. Handle tab insertion at
- the end of the line. Fix scroll down. Add comments.
+ (term-emulate-terminal): Fix insert mode. Handle tab insertion at
+ the end of the line. Fix scroll down. Add comments.
(term-handle-ansi-escape): Don't exceed terminal width when moving
right.
(term-scroll-region): Move the cursor after setting the scroll region.
@@ -10115,7 +10712,7 @@
* calendar/holidays.el (holiday-advent): Report on a specified day
offset from advent, not just advent.
(holiday-easter-etc): Report on one specified day offset from
- easter, not all easter holidays. Various Easter holidays moved to
+ easter, not all easter holidays. Various Easter holidays moved to
`christian-holidays' variable in calendar.el.
* calendar/calendar.el (christian-holidays): Adapt for new
behaviour of `holiday-advent' and `holiday-easter-etc' functions.
@@ -10130,7 +10727,7 @@
(ido-read-internal): Handle new `list' context.
Handle insert-buffer and insert-file ido-exit values.
(ido-buffer-internal): New arg switch-cmd. Use it to setup
- ido-context-switch-command. Handle insert-file ido-exit value.
+ ido-context-switch-command. Handle insert-file ido-exit value.
(ido-read-buffer): Set ido-context-switch-command to 'ignore
unless it is already bound by caller.
(ido-file-internal): New arg switch-cmd. Use it to setup
@@ -10460,7 +11057,7 @@
Do not call obsolete function compilation-parse-errors.
(bibtex-remove-delimiters): Only remove delimiters if present.
(bibtex-copy-entry-as-kill): Add docstring.
- (bibtex-clean-entry): Use bibtex-string=. Handle empty keys.
+ (bibtex-clean-entry): Use bibtex-string=. Handle empty keys.
Detect duplicate keys if bibtex-maintain-sorted-entries is nil.
(bibtex-complete): Use bibtex-predefined-month-strings,
bibtex-string=, and new function bibtex-complete-key-cleanup.
@@ -11146,8 +11743,8 @@
when `c-opt-type-concat-key' is used (i.e. in Pike).
* progmodes/cc-engine.el (c-looking-at-special-brace-list):
- Fix bug when the inner char pair doesn't have paren syntax, i.e. "(<
- >)".
+ Fix bug when the inner char pair doesn't have paren syntax,
+ i.e. "(<>)".
* progmodes/cc-align.el (c-lineup-multi-inher): Made it syntactic
whitespace safe.
@@ -11227,7 +11824,7 @@
string. (2) Check that settings to `c-offsets-alist' are not
spuriously quoted.
- * progmodes/cc-cmds.el: (c-electric-brace): Don't delete a comment
+ * progmodes/cc-cmds.el (c-electric-brace): Don't delete a comment
which precedes the newly inserted `{'.
2004-08-10 Michael Albinus <michael.albinus@gmx.de>
@@ -11880,7 +12477,7 @@
2004-06-23 Nick Roberts <nickrob@gnu.org>
- * comint.el: (comint-insert-clicked-input, comint-copy-old-input):
+ * comint.el (comint-insert-clicked-input, comint-copy-old-input):
Remove.
(comint-insert-input, comint-mouse-insert-input): New functions
based on comint-insert-clicked-input for two bindings but just
@@ -12391,7 +12988,7 @@
2004-06-04 Karl Fogel <kfogel@red-bean.com>
- * vc-svn.el (vc-svn-checkin): Use 'nconc' instead of 'list*',
+ * vc-svn.el (vc-svn-checkin): Use `nconc' instead of `list*',
because the latter is a CL-ism. This fixes the bug reported by
Shawn Boyette <mdxi@collapsar.net> in
http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00442.html.
@@ -13331,9 +13928,9 @@
of 19 months of 19 days, with 4 intercalary days. Each year
begins on March 21, with the calendar starting in 1844.
- * calendar/cal-menu.el, calendar/calendar.el,
- calendar/diary-lib.el, calendar/holidays.el: Added support for
- using cal-bahai.el.
+ * calendar/cal-menu.el, calendar/calendar.el
+ * calendar/diary-lib.el, calendar/holidays.el:
+ Added support for using cal-bahai.el.
* eshell/em-glob.el (eshell-glob-initialize): Move initialization
of `eshell-glob-chars-regexp' into `eshell-glob-regexp', so that
@@ -14157,7 +14754,7 @@
* emacs-lisp/rx.el (rx-syntax): Move sregex style syntax to code.
(rx-bracket, rx-check-any, rx-any): Clean up name space.
- * wdired.el: (wdired-mode-map): Move init into declaration.
+ * wdired.el (wdired-mode-map): Move init into declaration.
Fix `return' binding.
(wdired-change-to-wdired-mode, wdired-change-to-dired-mode):
Use force-mode-line-update.
@@ -15700,7 +16297,7 @@
2004-03-15 David Ponce <david@dponce.com>
- * ruler-mode.el: (ruler-mode-left-fringe-cols)
+ * ruler-mode.el (ruler-mode-left-fringe-cols)
(ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols)
(ruler-mode-right-scroll-bar-cols): Remove.
(ruler-mode-window-col, ruler-mode-mouse-set-left-margin)
@@ -16447,7 +17044,7 @@
2004-02-16 Eli Tziperman <eli@deas.harvard.edu>
- * rmail-spam-filter.el: (vm-use-spam-filter)
+ * rmail-spam-filter.el (vm-use-spam-filter)
(rsf-min-region-length-added-to-spam-list): New variables.
(rsf-bbdb-auto-delete-spam-bbdb-entries): Rename from
rmail-bbdb-auto-delete-spam-entries. Add cc: to recipients for
@@ -17105,7 +17702,7 @@
* mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline.
-2004-01-18 David Ponce <david@dponce.com> (tiny change)
+2004-01-18 David Ponce <david@dponce.com> (tiny change)
* progmodes/which-func.el (which-function-mode): Don't cancel
which-func-update-timer if not set.
@@ -19619,10 +20216,10 @@
* calendar/cal-tex.el (cal-tex-day-name-format): Doc fix.
(cal-tex-LaTeX-hourbox): Move definition before use.
- * calendar/cal-china.el, cal-hebrew.el, cal-islam.el,
- cal-julian.el, cal-menu.el, cal-move.el, holidays.el,
- lunar.el, solar.el
- (displayed-month, displayed-year): Define for compiler.
+ * calendar/cal-china.el, cal-hebrew.el, cal-islam.el
+ * cal-julian.el, cal-menu.el, cal-move.el, holidays.el
+ * lunar.el, solar.el (displayed-month, displayed-year):
+ Define for compiler.
2003-08-03 Martin Stjernholm <bug-cc-mode@gnu.org>
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."
("^\\sw.........[0-9:+ ]*"
(0 'change-log-date-face)
;; Name and e-mail; some people put e-mail in parens, not angles.
- ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil
+ ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil
(1 'change-log-name-face)
(2 'change-log-email-face)))
;;
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.
(setq major-mode 'archive-mode)
(setq mode-name (concat typename "-Archive"))
;; Run archive-foo-mode-hook and archive-mode-hook
- (run-hooks (archive-name "mode-hook") 'archive-mode-hook)
+ (run-mode-hooks (archive-name "mode-hook") 'archive-mode-hook)
(use-local-map archive-mode-map))
(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):
Entering array mode calls the function `array-mode-hook'."
(interactive)
+ (kill-all-local-variables)
;; Number of rows in the array.
(make-local-variable 'array-max-row)
;; Number of columns in the array.
@@ -907,7 +908,7 @@ Entering array mode calls the function `array-mode-hook'."
(setq truncate-lines t)
(setq overwrite-mode 'overwrite-mode-textual)
(use-local-map array-mode-map)
- (run-hooks 'array-mode-hook))
+ (run-mode-hooks 'array-mode-hook))
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.
This function is also responsible for removing buffers no longer in
Auto-Revert mode from `auto-revert-buffer-list', and for canceling
the timer when no buffers need to be checked."
- (let ((bufs (if global-auto-revert-mode
- (buffer-list)
- auto-revert-buffer-list))
- (remaining ())
- (new ()))
- ;; Partition `bufs' into two halves depending on whether or not
- ;; the buffers are in `auto-revert-remaining-buffers'. The two
- ;; halves are then re-joined with the "remaining" buffers at the
- ;; head of the list.
- (dolist (buf auto-revert-remaining-buffers)
- (if (memq buf bufs)
- (push buf remaining)))
- (dolist (buf bufs)
- (if (not (memq buf remaining))
- (push buf new)))
- (setq bufs (nreverse (nconc new remaining)))
- (while (and bufs
- (not (and auto-revert-stop-on-user-input
- (input-pending-p))))
- (let ((buf (car bufs)))
- (if (buffer-name buf) ; Buffer still alive?
- (with-current-buffer buf
- ;; Test if someone has turned off Auto-Revert Mode in a
- ;; non-standard way, for example by changing major mode.
- (if (and (not auto-revert-mode)
- (not auto-revert-tail-mode)
- (memq buf auto-revert-buffer-list))
- (setq auto-revert-buffer-list
- (delq buf auto-revert-buffer-list)))
- (when (auto-revert-active-p) (auto-revert-handler)))
- ;; Remove dead buffer from `auto-revert-buffer-list'.
- (setq auto-revert-buffer-list
- (delq buf auto-revert-buffer-list))))
- (setq bufs (cdr bufs)))
- (setq auto-revert-remaining-buffers bufs)
- ;; Check if we should cancel the timer.
- (when (and (not global-auto-revert-mode)
- (null auto-revert-buffer-list))
- (cancel-timer auto-revert-timer)
- (setq auto-revert-timer nil))))
+ (save-match-data
+ (let ((bufs (if global-auto-revert-mode
+ (buffer-list)
+ auto-revert-buffer-list))
+ (remaining ())
+ (new ()))
+ ;; Partition `bufs' into two halves depending on whether or not
+ ;; the buffers are in `auto-revert-remaining-buffers'. The two
+ ;; halves are then re-joined with the "remaining" buffers at the
+ ;; head of the list.
+ (dolist (buf auto-revert-remaining-buffers)
+ (if (memq buf bufs)
+ (push buf remaining)))
+ (dolist (buf bufs)
+ (if (not (memq buf remaining))
+ (push buf new)))
+ (setq bufs (nreverse (nconc new remaining)))
+ (while (and bufs
+ (not (and auto-revert-stop-on-user-input
+ (input-pending-p))))
+ (let ((buf (car bufs)))
+ (if (buffer-name buf) ; Buffer still alive?
+ (with-current-buffer buf
+ ;; Test if someone has turned off Auto-Revert Mode in a
+ ;; non-standard way, for example by changing major mode.
+ (if (and (not auto-revert-mode)
+ (not auto-revert-tail-mode)
+ (memq buf auto-revert-buffer-list))
+ (setq auto-revert-buffer-list
+ (delq buf auto-revert-buffer-list)))
+ (when (auto-revert-active-p) (auto-revert-handler)))
+ ;; Remove dead buffer from `auto-revert-buffer-list'.
+ (setq auto-revert-buffer-list
+ (delq buf auto-revert-buffer-list))))
+ (setq bufs (cdr bufs)))
+ (setq auto-revert-remaining-buffers bufs)
+ ;; Check if we should cancel the timer.
+ (when (and (not global-auto-revert-mode)
+ (null auto-revert-buffer-list))
+ (cancel-timer auto-revert-timer)
+ (setq auto-revert-timer nil)))))
;; 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.
(use-local-map bookmark-read-annotation-mode-map)
(setq major-mode 'bookmark-read-annotation-mode)
(insert (funcall bookmark-read-annotation-text-func bookmark))
- (run-hooks 'text-mode-hook))
+ (run-mode-hooks 'text-mode-hook))
(defun bookmark-read-annotation (parg bookmark)
@@ -903,7 +903,7 @@ When you have finished composing, type \\[bookmark-send-annotation].
(let ((annotation (bookmark-get-annotation bookmark)))
(if (and annotation (not (string-equal annotation "")))
(insert annotation)))
- (run-hooks 'text-mode-hook))
+ (run-mode-hooks 'text-mode-hook))
(defun bookmark-send-edited-annotation ()
@@ -1618,7 +1618,7 @@ Bookmark names preceded by a \"*\" have annotations.
(setq buffer-read-only t)
(setq major-mode 'bookmark-bmenu-mode)
(setq mode-name "Bookmark Menu")
- (run-hooks 'bookmark-bmenu-mode-hook))
+ (run-mode-hooks 'bookmark-bmenu-mode-hook))
(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.
truncate-lines t
font-lock-defaults '(bs-mode-font-lock-keywords t)
font-lock-verbose nil)
- (run-hooks 'bs-mode-hook))
+ (run-mode-hooks 'bs-mode-hook))
(defun bs-kill ()
"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.")
first nil))
x))
+;; calc-arg-values is defined in calc-ext.el, but is used here.
+(defvar calc-arg-values)
+
(defun calc-check-user-syntax (&optional x prec)
(let ((p calc-user-parse-table)
(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 @@
(defvar calc-embed-top)
(defvar calc-embed-bot)
+;; The variable calc-embed-arg is local to calc-do-embedded,
+;; calc-embedded-update-formula, calc-embedded-edit and
+;; calc-do-embedded-activate, but is used by
+;; calc-embedded-make-info, which is called by the above
+;; functions.
+(defvar calc-embed-arg)
+
(defvar calc-embedded-quiet nil)
-(defun calc-do-embedded (arg end obeg oend)
+(defun calc-do-embedded (calc-embed-arg end obeg oend)
(if calc-embedded-info
;; Turn embedded mode off or switch to a new buffer.
@@ -237,7 +244,7 @@
(buffer-name)))
(keyboard-quit))
(calc-embedded nil)))
- (calc-embedded arg end obeg oend)))
+ (calc-embedded calc-embed-arg end obeg oend)))
;; Turn embedded mode on.
(calc-plain-buffer-only)
@@ -250,7 +257,8 @@
(calc-embedded-save-original-modes)
(or calc-embedded-globals
(calc-find-globals))
- (setq info (calc-embedded-make-info (point) nil t arg end obeg oend))
+ (setq info
+ (calc-embedded-make-info (point) nil t calc-embed-arg end obeg oend))
(if (eq (car-safe (aref info 8)) 'error)
(progn
(setq calc-embedded-original-modes nil)
@@ -311,13 +319,13 @@
(calc-select-part 2)))
-(defun calc-embedded-update-formula (arg)
+(defun calc-embedded-update-formula (calc-embed-arg)
(interactive "P")
- (if arg
+ (if calc-embed-arg
(let ((entry (assq (current-buffer) calc-embedded-active)))
(while (setq entry (cdr entry))
(and (eq (car-safe (aref (car entry) 8)) 'calcFunc-evalto)
- (or (not (consp arg))
+ (or (not (consp calc-embed-arg))
(and (<= (aref (car entry) 2) (region-beginning))
(>= (aref (car entry) 3) (region-end))))
(save-excursion
@@ -337,9 +345,9 @@
(goto-char (+ (aref info 4) pt))))))))
-(defun calc-embedded-edit (arg)
+(defun calc-embedded-edit (calc-embed-arg)
(interactive "P")
- (let ((info (calc-embedded-make-info (point) nil t arg))
+ (let ((info (calc-embedded-make-info (point) nil t calc-embed-arg))
str)
(if (eq (car-safe (aref info 8)) 'error)
(progn
@@ -374,12 +382,12 @@
(aset info 8 val)
(calc-embedded-update info 14 t t))))
-(defun calc-do-embedded-activate (arg cbuf)
+(defun calc-do-embedded-activate (calc-embed-arg cbuf)
(calc-plain-buffer-only)
- (if arg
+ (if calc-embed-arg
(calc-embedded-forget))
(calc-find-globals)
- (if (< (prefix-numeric-value arg) 0)
+ (if (< (prefix-numeric-value calc-embed-arg) 0)
(message "Deactivating %s for Calc Embedded mode" (buffer-name))
(message "Activating %s for Calc Embedded mode..." (buffer-name))
(save-excursion
@@ -432,7 +440,7 @@
(defun calc-embedded-word ()
(interactive)
- (calc-embedded '(4)))
+ (calc-embedded '(t)))
(defun calc-embedded-mark-formula (&optional body-only)
"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."
(aset info 1 (or cbuf (save-excursion
(calc-create-buffer)
(current-buffer)))))
- (if (and (integerp calc-embed-top) (not calc-embed-bot))
+ (if (and
+ (or (integerp calc-embed-top) (equal calc-embed-top '(4)))
+ (not calc-embed-bot))
; started with a user-supplied argument
(progn
- (if (= (setq arg (prefix-numeric-value arg)) 0)
- (progn
- (aset info 2 (copy-marker (region-beginning)))
- (aset info 3 (copy-marker (region-end))))
- (aset info (if (> arg 0) 2 3) (point-marker))
- (forward-line arg)
- (aset info (if (> arg 0) 3 2) (point-marker)))
+ (if (equal calc-embed-top '(4))
+ (progn
+ (aset info 2 (copy-marker (line-beginning-position)))
+ (aset info 3 (copy-marker (line-end-position))))
+ (if (= (setq calc-embed-arg (prefix-numeric-value calc-embed-arg)) 0)
+ (progn
+ (aset info 2 (copy-marker (region-beginning)))
+ (aset info 3 (copy-marker (region-end))))
+ (aset info (if (> calc-embed-arg 0) 2 3) (point-marker))
+ (if (> calc-embed-arg 0)
+ (progn
+ (forward-line (1- calc-embed-arg))
+ (end-of-line))
+ (forward-line (1+ calc-embed-arg)))
+ (aset info (if (> calc-embed-arg 0) 3 2) (point-marker))))
(aset info 4 (copy-marker (aref info 2)))
(aset info 5 (copy-marker (aref info 3))))
(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 @@
(defvar math-comp-sel-cpos nil)
(defvar math-compose-hash-args nil)
+(defvar calc-alg-map)
+(defvar calc-alg-esc-map)
+
;;; The following was made a function so that it could be byte-compiled.
(defun calc-init-extensions ()
@@ -1192,8 +1195,9 @@ calc-kill calc-kill-region calc-yank))))
(math-normalize val)))))
+(defvar calc-help-map nil)
-(if (boundp 'calc-help-map)
+(if calc-help-map
nil
(setq calc-help-map (make-keymap))
(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)."
"Go to a node in the Calculator info documentation."
(interactive)
(select-window (get-largest-window))
- (Info-goto-node (concat "(Calc)" node)))
+ (info (concat "(Calc)" node)))
(defun calc-tutorial ()
"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 @@
(get func 'calc-user-defn)))
(kys (concat "z" (char-to-string (car def))))
(intcmd (symbol-name (cdr def)))
- (algcmd (substring (symbol-name func) 9)))
+ (algcmd (if func (substring (symbol-name func) 9) "")))
(if (and defn (calc-valid-formula-func func))
(let ((niceexpr (math-format-nice-expr defn (frame-width))))
(calc-wrapper
@@ -1446,15 +1446,22 @@ Redefine the corresponding command."
(error "Unbalanced Z' in keyboard macro")))
-(defun calc-kbd-report (msg)
- (interactive "sMessage: ")
- (calc-wrapper
- (math-working msg (calc-top-n 1))))
+;; (defun calc-kbd-report (msg)
+;; (interactive "sMessage: ")
+;; (calc-wrapper
+;; (math-working msg (calc-top-n 1))))
-(defun calc-kbd-query (msg)
- (interactive "sPrompt: ")
- (calc-wrapper
- (calc-alg-entry nil (and (not (equal msg "")) msg))))
+(defun calc-kbd-query ()
+ (interactive)
+ (let ((defining-kbd-macro nil)
+ (executing-kbd-macro nil)
+ (msg (calc-top 1)))
+ (if (not (eq (car-safe msg) 'vec))
+ (error "No prompt string provided")
+ (setq msg (math-vector-to-string msg))
+ (calc-wrapper
+ (calc-pop-stack 1)
+ (calc-alg-entry nil (and (not (equal msg "")) msg))))))
;;;; Logical operations.
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."
(defvar math-max-digits-cache) ; calc-bin.el
(defvar math-integral-cache) ; calcalg2.el
(defvar math-units-table) ; calc-units.el
+(defvar math-decls-cache-tag) ; calc-arith.el
(defvar math-format-date-cache) ; calc-forms.el
(defvar math-holidays-cache-tag) ; calc-forms.el
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."
(setq truncate-lines nil)
(setq major-mode 'calc-edit-mode)
(setq mode-name "Calc Edit")
- (run-hooks 'calc-edit-mode-hook)
+ (run-mode-hooks 'calc-edit-mode-hook)
(make-local-variable 'calc-original-buffer)
(setq calc-original-buffer oldbuf)
(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 @@
(defgroup calc nil
"GNU Calc"
:prefix "calc-"
- :tag "Calc")
+ :tag "Calc"
+ :group 'applications)
;;;###autoload
(defcustom calc-settings-file
@@ -324,7 +325,7 @@ This is not required to be present for user-written mode annotations."
:type '(choice (string) (sexp)))
(defvar calc-bug-address "belanger@truman.edu"
- "Address of the author of Calc, for use by `report-calc-bug'.")
+ "Address of the maintainer of Calc, for use by `report-calc-bug'.")
(defvar calc-scan-for-dels t
"If t, scan keymaps to find all DEL-like keys.
@@ -719,6 +720,12 @@ If nil, selections displayed but ignored.")
(defvar calc-load-hook nil
"Hook run when calc.el is loaded.")
+(defvar calc-window-hook nil
+ "Hook called to create the Calc window.")
+
+(defvar calc-trail-window-hook nil
+ "Hook called to create the Calc trail window.")
+
;; Verify that Calc is running on the right kind of system.
(defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version))))
@@ -830,20 +837,6 @@ If nil, selections displayed but ignored.")
(defvar var-gamma '(special-const (math-gamma-const)))
(defvar var-Modes '(special-const (math-get-modes-vec)))
-(defvar calc-language-alist
- '((latex-mode . latex)
- (tex-mode . tex)
- (plain-tex-mode . tex)
- (context-mode . tex)
- (nroff-mode . eqn)
- (pascal-mode . pascal)
- (c-mode . c)
- (c++-mode . c)
- (fortran-mode . fortran)
- (f90-mode . fortran))
- "Alist of major modes with appropriate Calc languages.")
-
-
(mapcar (lambda (v) (or (boundp v) (set v nil)))
calc-local-var-list)
@@ -1066,7 +1059,7 @@ If nil, selections displayed but ignored.")
(use-global-map glob)
(use-local-map loc)))))
-
+(defvar calc-alg-map) ; Defined in calc-ext.el
(defun calc-mode ()
"Calculator major mode.
@@ -1131,7 +1124,7 @@ Notations: 3.14e6 3.14 * 10^6
(string-match "full" (nth 1 p))
(setq calc-standalone-flag t))
(setq p (cdr p))))
- (run-hooks 'calc-mode-hook)
+ (run-mode-hooks 'calc-mode-hook)
(calc-refresh t)
(calc-set-mode-line)
(calc-check-defines))
@@ -1181,7 +1174,7 @@ commands given here will actually operate on the *Calculator* stack."
(insert (propertize (concat "Emacs Calculator v" calc-version
" by Dave Gillespie\n")
'font-lock-face 'italic))))
- (run-hooks 'calc-trail-mode-hook))
+ (run-mode-hooks 'calc-trail-mode-hook))
(defun calc-create-buffer ()
(set-buffer (get-buffer-create "*Calculator*"))
@@ -1218,18 +1211,20 @@ commands given here will actually operate on the *Calculator* stack."
(switch-to-buffer (current-buffer) t)
(if (get-buffer-window (current-buffer))
(select-window (get-buffer-window (current-buffer)))
- (let ((w (get-largest-window)))
- (if (and pop-up-windows
- (> (window-height w)
- (+ window-min-height calc-window-height 2)))
- (progn
- (setq w (split-window w
- (- (window-height w)
- calc-window-height 2)
- nil))
- (set-window-buffer w (current-buffer))
- (select-window w))
- (pop-to-buffer (current-buffer))))))
+ (if calc-window-hook
+ (run-hooks 'calc-window-hook)
+ (let ((w (get-largest-window)))
+ (if (and pop-up-windows
+ (> (window-height w)
+ (+ window-min-height calc-window-height 2)))
+ (progn
+ (setq w (split-window w
+ (- (window-height w)
+ calc-window-height 2)
+ nil))
+ (set-window-buffer w (current-buffer))
+ (select-window w))
+ (pop-to-buffer (current-buffer)))))))
(save-excursion
(set-buffer (calc-trail-buffer))
(and calc-display-trail
@@ -1836,15 +1831,17 @@ See calc-keypad for details."
(not (if flag (memq flag '(nil 0)) win)))
(if (null win)
(progn
- (let ((w (split-window nil (/ (* (window-width) 2) 3) t)))
- (set-window-buffer w calc-trail-buffer))
- (calc-wrapper
- (setq overlay-arrow-string calc-trail-overlay
- overlay-arrow-position calc-trail-pointer)
- (or no-refresh
- (if interactive
- (calc-do-refresh)
- (calc-refresh))))))
+ (if calc-trail-window-hook
+ (run-hooks 'calc-trail-window-hook)
+ (let ((w (split-window nil (/ (* (window-width) 2) 3) t)))
+ (set-window-buffer w calc-trail-buffer)))
+ (calc-wrapper
+ (setq overlay-arrow-string calc-trail-overlay
+ overlay-arrow-position calc-trail-pointer)
+ (or no-refresh
+ (if interactive
+ (calc-do-refresh)
+ (calc-refresh))))))
(if win
(progn
(delete-window win)
@@ -3444,7 +3441,7 @@ Also looks for the equivalent TeX words, \\gets and \\evalto."
(defun calc-user-invocation ()
(interactive)
- (unless (stringp calc-invocation-macro)
+ (unless calc-invocation-macro
(error "Use `Z I' inside Calc to define a `M-# Z' keyboard macro"))
(execute-kbd-macro calc-invocation-macro nil))
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 @@
(defvar math-deriv-var)
(defvar math-deriv-total)
(defvar math-deriv-symb)
+(defvar math-decls-cache)
+(defvar math-decls-all)
(defun math-derivative (expr)
(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 @@
;; Author: Eli Barzilay <eli@barzilay.org>
;; Keywords: tools, convenience
-;; Time-stamp: <2002-07-13 01:14:35 eli>
+;; Time-stamp: <26 May 2005, 14:32:34, Lute Kamstra, pijl>
;; This file is part of GNU Emacs.
@@ -680,7 +680,7 @@ more information.
(setq major-mode 'calculator-mode)
(setq mode-name "Calculator")
(use-local-map calculator-mode-map)
- (run-hooks 'calculator-mode-hook))
+ (run-mode-hooks 'calculator-mode-hook))
(eval-when-compile (require 'electric) (require 'ehelp))
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."
(propertize (substitute-command-keys
"\\<calendar-mode-map>\\[scroll-calendar-left]")
'help-echo "mouse-2: scroll left"
+ 'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map 'mouse-2
'mouse-scroll-calendar-left))
"Calendar"
@@ -2343,12 +2344,14 @@ movement commands will not work correctly."
(substitute-command-keys
"\\<calendar-mode-map>\\[calendar-goto-info-node] info")
'help-echo "mouse-2: read Info on Calendar"
+ 'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map 'mouse-2 'calendar-goto-info-node))
"/"
(propertize
(substitute-command-keys
"\\<calendar-mode-map>\\[calendar-other-month] other")
'help-echo "mouse-2: choose another month"
+ 'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map
'mouse-2 'mouse-calendar-other-month))
"/"
@@ -2356,11 +2359,13 @@ movement commands will not work correctly."
(substitute-command-keys
"\\<calendar-mode-map>\\[calendar-goto-today] today")
'help-echo "mouse-2: go to today's date"
+ 'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map 'mouse-2 #'calendar-goto-today)))
'(calendar-date-string (calendar-current-date) t)
(propertize (substitute-command-keys
"\\<calendar-mode-map>\\[scroll-calendar-right]")
'help-echo "mouse-2: scroll right"
+ 'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map
'mouse-2 'mouse-scroll-calendar-right)))
"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'."
(regexp-quote diary-include-string)
" \"\\([^\"]*\\)\"")
nil t)
- (let ((diary-file (substitute-in-file-name
- (buffer-substring-no-properties
- (match-beginning 2) (match-end 2))))
- (mark-diary-entries-hook 'mark-included-diary-files))
+ (let* ((diary-file (substitute-in-file-name
+ (match-string-no-properties 2)))
+ (mark-diary-entries-hook 'mark-included-diary-files)
+ (dbuff (find-buffer-visiting diary-file)))
(if (file-exists-p diary-file)
(if (file-readable-p diary-file)
(progn
(mark-diary-entries)
- (kill-buffer (find-buffer-visiting diary-file)))
+ (unless dbuff
+ (kill-buffer (find-buffer-visiting diary-file))))
(beep)
(message "Can't read included diary file %s" diary-file)
(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."
;; all the other libs we need
;; ======================================================================
(require 'calendar)
-(require 'appt)
;; ======================================================================
;; 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'."
\\{todo-mode-map}"
(interactive)
+ (kill-all-local-variables)
(setq major-mode 'todo-mode)
(setq mode-name "TODO")
(use-local-map todo-mode-map)
(easy-menu-add todo-menu)
- (run-hooks 'todo-mode-hook))
+ (run-mode-hooks 'todo-mode-hook))
(eval-when-compile
(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:
(setq major-mode 'command-history-mode)
(setq mode-name "Command History")
(use-local-map command-history-map)
- (run-hooks 'command-history-mode-hook))
+ (run-mode-hooks 'command-history-mode-hook))
(defun Command-history-setup ()
(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."
;; (make-local-variable 'shell-directory-stack)
;; (setq shell-directory-stack nil)
;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker)
-;; (run-hooks 'shell-mode-hook))
+;; (run-mode-hooks 'shell-mode-hook))
;;
;;
;; 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."
(set (make-local-variable 'widget-link-prefix) "")
(set (make-local-variable 'widget-link-suffix) ""))
(add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
- (run-hooks 'custom-mode-hook))
+ (run-mode-hooks 'custom-mode-hook))
(put 'custom-mode 'mode-class 'special)
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."
(use-local-map describe-text-mode-map)
(widget-setup)
(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
- (run-hooks 'describe-text-mode-hook))
+ (run-mode-hooks 'describe-text-mode-hook))
;;; Describe-Text Utilities.
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
(setq major-mode 'Electric-buffer-menu-mode)
(goto-char (point-min))
(if (search-forward "\n." nil t) (forward-char -1))
- (run-hooks 'electric-buffer-menu-mode-hook))
+ (run-mode-hooks 'electric-buffer-menu-mode-hook))
;; generally the same as Buffer-menu-mode-map
;; (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.
If FILTER-RE is non-nil, recursive checking in directories
affects only files whose names match the expression."
;; Normalize empty filter RE to nil.
- (unless (length filter-re) (setq filter-re nil))
+ (unless (> (length filter-re) 0) (setq filter-re nil))
;; Indicate progress
(message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re)
(cond
@@ -1367,27 +1367,11 @@ affects only files whose names match the expression."
(if (eq ediff-recurse-to-subdirectories 'yes)
(let* ((all-entries-1 (directory-files d1 t filter-re))
(all-entries-2 (directory-files d2 t filter-re))
- (entries-1 (remove-if (lambda (s)
- (string-match "^\\.\\.?$"
- (file-name-nondirectory s)))
- all-entries-1))
- (entries-2 (remove-if (lambda (s)
- (string-match "^\\.\\.?$"
- (file-name-nondirectory s)))
- all-entries-2))
+ (entries-1 (ediff-delete-all-matches "^\\.\\.?$" all-entries-1))
+ (entries-2 (ediff-delete-all-matches "^\\.\\.?$" all-entries-2))
)
- ;; First, check only the names (works quickly and ensures a
- ;; precondition for subsequent code)
- (if (and (= (length entries-1) (length entries-2))
- (every (lambda (a b) (equal (file-name-nondirectory a)
- (file-name-nondirectory b)))
- entries-1 entries-2))
- ;; With name equality established, compare the entries
- ;; through recursion.
- (every (lambda (a b)
- (ediff-same-contents a b filter-re))
- entries-1 entries-2)
- )
+
+ (ediff-same-file-contents-lists entries-1 entries-2 filter-re)
))
) ; end of the directories case
;; D1 & D2 are both files => compare directly
@@ -1398,6 +1382,42 @@ affects only files whose names match the expression."
)
)
+;; If lists have the same length and names of files are pairwise equal
+;; (removing the directories) then compare contents pairwise.
+;; True if all contents are the same; false otherwise
+(defun ediff-same-file-contents-lists (entries-1 entries-2 filter-re)
+ ;; First, check only the names (works quickly and ensures a
+ ;; precondition for subsequent code)
+ (if (and (= (length entries-1) (length entries-2))
+ (equal (mapcar 'file-name-nondirectory entries-1)
+ (mapcar 'file-name-nondirectory entries-2)))
+ ;; With name equality established, compare the entries
+ ;; through recursion.
+ (let ((continue t))
+ (while (and entries-1 continue)
+ (if (ediff-same-contents
+ (car entries-1) (car entries-2) filter-re)
+ (setq entries-1 (cdr entries-1)
+ entries-2 (cdr entries-2))
+ (setq continue nil))
+ )
+ ;; if reached the end then lists are equal
+ (null entries-1))
+ )
+ )
+
+
+;; ARG1 is a regexp, ARG2 is a list of full-filenames
+;; Delete all entries that match the regexp
+(defun ediff-delete-all-matches (regex file-list-list)
+ (let (result elt)
+ (while file-list-list
+ (setq elt (car file-list-list))
+ (or (string-match regex (file-name-nondirectory elt))
+ (setq result (cons elt result)))
+ (setq file-list-list (cdr file-list-list)))
+ (reverse result)))
+
;;; Local Variables:
;;; 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.")
"Normally, not a user option. See `ediff-help-message' for details.")
(defconst ediff-brief-message-string
- " ? -quick help "
+ " Type ? for help"
"Contents of the brief help message.")
;; The actual brief help message
(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."
(ediff-add-slash-if-directory auxdir1 elt))
lis1)
auxdir2 (file-name-as-directory dir2)
+ lis2 (directory-files auxdir2 nil regexp)
+ lis2 (delete "." lis2)
+ lis2 (delete ".." lis2)
lis2 (mapcar
(lambda (elt)
(ediff-add-slash-if-directory auxdir2 elt))
- (directory-files auxdir2 nil regexp)))
+ lis2))
(if (stringp dir3)
(setq auxdir3 (file-name-as-directory dir3)
+ lis3 (directory-files auxdir3 nil regexp)
+ lis3 (delete "." lis3)
+ lis3 (delete ".." lis3)
lis3 (mapcar
(lambda (elt)
(ediff-add-slash-if-directory auxdir3 elt))
- (directory-files auxdir3 nil regexp))))
+ lis3)))
(if (ediff-nonempty-string-p merge-autostore-dir)
(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 @@
;;; ediff-util.el --- the core commands and utilities of ediff
-;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+;; 2004 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
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 @@
;; Keywords: comparing, merging, patching, tools, unix
(defconst ediff-version "2.80" "The current version of Ediff")
-(defconst ediff-date "February 19, 2005" "Date of last update")
+(defconst ediff-date "June 3, 2005" "Date of last update")
;; 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."
(defun byte-compile-nogroup-warn (form)
(let ((keyword-args (cdr (cdr (cdr (cdr form)))))
(name (cadr form)))
- (unless (plist-get keyword-args :group)
- (byte-compile-warn
- "%s for `%s' fails to specify containing group"
- (cdr (assq (car form)
- '((custom-declare-group . defgroup)
- (custom-declare-face . defface)
- (custom-declare-variable . defcustom))))
- (if (and (consp name) (eq (car name) 'quote))
- (cadr name) name)))))
+ (or (plist-get keyword-args :group)
+ (not (and (consp name) (eq (car name) 'quote)))
+ (byte-compile-warn
+ "%s for `%s' fails to specify containing group"
+ (cdr (assq (car form)
+ '((custom-declare-group . defgroup)
+ (custom-declare-face . defface)
+ (custom-declare-variable . defcustom))))
+ (cadr name)))))
;; Warn if the function or macro is being redefined with a different
;; 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.
This macro is an easy-to-use substitute for `define-setf-method' that works
well for simple place forms. In the simple `defsetf' form, `setf's of
the form (setf (NAME ARGS...) VAL) are transformed to function or macro
-calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset).
+calls of the form (FUNC ARGS... VAL). Example:
+
+ (defsetf aref aset)
+
Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
Here, the above `setf' call is expanded by binding the argument forms ARGS
according to ARGLIST, binding the value form VAL to STORE, then executing
BODY, which must return a Lisp form that does the necessary `setf' operation.
Actually, ARGLIST and STORE may be bound to temporary variables which are
introduced automatically to preserve proper execution order of the arguments.
-Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))."
+Example:
+
+ (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))
+
+\(fn NAME [FUNC | ARGLIST (STORE) BODY...])"
(if (listp arg1)
(let* ((largs nil) (largsr nil)
(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.
TURN-ON is a function that will be called with no args in every buffer
and that should try to turn MODE on if applicable for that buffer.
KEYS is a list of CL-style keyword arguments:
-:group to specify the custom group."
+:group to specify the custom group.
+
+If MODE's set-up depends on the major mode in effect when it was
+enabled, then disabling and reenabling MODE should make MODE work
+correctly with the current major mode. This is important to
+prevent problems with derived modes, that is, major modes that
+call another major mode in their body."
+
(let* ((global-mode-name (symbol-name global-mode))
(pretty-name (easy-mmode-pretty-mode-name mode))
(pretty-global-name (easy-mmode-pretty-mode-name global-mode))
(group nil)
(extra-args nil)
- (buffers (intern (concat global-mode-name "-buffers")))
- (cmmh (intern (concat global-mode-name "-cmmh"))))
+ (MODE-buffers (intern (concat global-mode-name "-buffers")))
+ (MODE-enable-in-buffers
+ (intern (concat global-mode-name "-enable-in-buffers")))
+ (MODE-check-buffers
+ (intern (concat global-mode-name "-check-buffers")))
+ (MODE-cmhh (intern (concat global-mode-name "-cmhh")))
+ (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode"))))
;; Check keys.
(while (keywordp (car keys))
@@ -294,6 +306,8 @@ KEYS is a list of CL-style keyword arguments:
"-mode\\'" "" (symbol-name mode))))))
`(progn
+ (defvar ,MODE-major-mode nil)
+ (make-variable-buffer-local ',MODE-major-mode)
;; The actual global minor-mode
(define-minor-mode ,global-mode
,(format "Toggle %s in every buffer.
@@ -306,10 +320,13 @@ in which `%s' turns it on."
;; Setup hook to handle future mode changes and new buffers.
(if ,global-mode
(progn
- (add-hook 'after-change-major-mode-hook ',buffers)
- (add-hook 'change-major-mode-hook ',cmmh))
- (remove-hook 'after-change-major-mode-hook ',buffers)
- (remove-hook 'change-major-mode-hook ',cmmh))
+ (add-hook 'after-change-major-mode-hook
+ ',MODE-enable-in-buffers)
+ (add-hook 'find-file-hook ',MODE-check-buffers)
+ (add-hook 'change-major-mode-hook ',MODE-cmhh))
+ (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers)
+ (remove-hook 'find-file-hook ',MODE-check-buffers)
+ (remove-hook 'change-major-mode-hook ',MODE-cmhh))
;; Go through existing buffers.
(dolist (buf (buffer-list))
@@ -321,22 +338,33 @@ in which `%s' turns it on."
:autoload-end
;; List of buffers left to process.
- (defvar ,buffers nil)
+ (defvar ,MODE-buffers nil)
;; The function that calls TURN-ON in each buffer.
- (defun ,buffers ()
- (remove-hook 'post-command-hook ',buffers)
- (while ,buffers
- (let ((buf (pop ,buffers)))
- (when (buffer-live-p buf)
- (with-current-buffer buf (,turn-on))))))
- (put ',buffers 'definition-name ',global-mode)
+ (defun ,MODE-enable-in-buffers ()
+ (dolist (buf ,MODE-buffers)
+ (when (buffer-live-p buf)
+ (with-current-buffer buf
+ (if ,mode
+ (unless (eq ,MODE-major-mode major-mode)
+ (,mode -1)
+ (,turn-on)
+ (setq ,MODE-major-mode major-mode))
+ (,turn-on)
+ (setq ,MODE-major-mode major-mode))))))
+ (put ',MODE-enable-in-buffers 'definition-name ',global-mode)
+
+ (defun ,MODE-check-buffers ()
+ (,MODE-enable-in-buffers)
+ (setq ,MODE-buffers nil)
+ (remove-hook 'post-command-hook ',MODE-check-buffers))
+ (put ',MODE-check-buffers 'definition-name ',global-mode)
;; The function that catches kill-all-local-variables.
- (defun ,cmmh ()
- (add-to-list ',buffers (current-buffer))
- (add-hook 'post-command-hook ',buffers))
- (put ',cmmh 'definition-name ',global-mode))))
+ (defun ,MODE-cmhh ()
+ (add-to-list ',MODE-buffers (current-buffer))
+ (add-hook 'post-command-hook ',MODE-check-buffers))
+ (put ',MODE-cmhh 'definition-name ',global-mode))))
;;;
;;; 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 @@
;;; easymenu.el --- support the easymenu interface for defining a menu
-;; Copyright (C) 1994,96,98,1999,2000,2004 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1996, 1998, 1999, 2000, 2004, 2005
+;; Free Software Foundation, Inc.
;; Keywords: emulations
;; Author: Richard Stallman <rms@gnu.org>
@@ -534,7 +535,7 @@ earlier by `easy-menu-define' or `easy-menu-create-menu'."
(easy-menu-do-add-item map item before)))
(defun easy-menu-item-present-p (map path name)
- "In submenu of MAP with path PATH, return true iff item NAME is present.
+ "In submenu of MAP with path PATH, return non-nil iff item NAME is present.
MAP and PATH are defined as in `easy-menu-add-item'.
NAME should be a string, the name of the element to be looked for."
(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."
"In menu MENU try to look for menu item with name NAME.
If a menu item is found, return (NAME . item), otherwise return nil.
If item is an old format item, a new format item is returned."
- (let ((item (lookup-key menu (vector (easy-menu-intern name))))
+ ;; The call to `lookup-key' also calls the C function `get_keyelt' which
+ ;; looks inside a menu-item to only return the actual command. This is
+ ;; not what we want here. We should either add an arg to lookup-key to be
+ ;; able to turn off this "feature", or else we could use map-keymap here.
+ ;; In the mean time, I just use `assq' which is an OK approximation since
+ ;; menus are rarely built from vectors or char-tables.
+ (let ((item (or (cdr (assq name menu))
+ (lookup-key menu (vector (easy-menu-intern name)))))
ret enable cache label)
(cond
((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
in `load-path'."
(if (not function)
(error "You didn't specify a function"))
- (and (subrp (symbol-function function))
- (error "%s is a primitive function" function))
(let ((def (symbol-function function))
aliases)
(while (symbolp def)
@@ -265,6 +263,8 @@ in `load-path'."
(let ((library
(cond ((eq (car-safe def) 'autoload)
(nth 1 def))
+ ((subrp def)
+ (help-C-file-name def 'subr))
((symbol-file function 'defun)))))
(find-function-search-for-symbol function nil library))))
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'.")
mode-name "RE Builder")
(use-local-map reb-mode-map)
(reb-mode-common)
- (run-hooks 'reb-mode-hook))
+ (run-mode-hooks 'reb-mode-hook))
(define-derived-mode reb-lisp-mode
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 @@
;;;
;;; Load the newly defined keys and clean up
;;;
-(eval-current-buffer)
+(eval-buffer)
(kill-buffer (current-buffer))
(kill-buffer "*scratch*")
(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.")
(make-local-variable 'vi-mode-old-mode-name)
(make-local-variable 'vi-mode-old-major-mode)
(make-local-variable 'vi-mode-old-case-fold)
- (run-hooks 'vi-mode-hook))
+ (run-mode-hooks 'vi-mode-hook))
;;;###autoload
(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 @@
;;; Variables
-(defvar viper-toggle-key "\C-z"
+(defcustom viper-toggle-key "\C-z"
"The key used to change states from emacs to Vi and back.
In insert mode, this key also functions as Meta.
Must be set in .viper file or prior to loading Viper.
-This setting cannot be changed interactively.")
+This setting cannot be changed interactively."
+ :type 'string
+ :group 'viper)
+
+(defcustom viper-quoted-insert-key "\C-v"
+ "The key used to quote special characters when inserting them in Insert state."
+ :type 'string
+ :group 'viper)
-(defvar viper-ESC-key "\e"
+(defcustom viper-ESC-key "\e"
"Key used to ESC.
Must be set in .viper file or prior to loading Viper.
-This setting cannot be changed interactively.")
+This setting cannot be changed interactively."
+ :type 'string
+ :group 'viper)
;;; Emacs keys in other states.
@@ -242,7 +251,7 @@ viper-insert-basic-map. Not recommended, except for novice users.")
(define-key viper-insert-basic-map "\C-t" 'viper-forward-indent)
(define-key viper-insert-basic-map
(if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab)
-(define-key viper-insert-basic-map "\C-v" 'quoted-insert)
+(define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert)
(define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert)
(define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert)
(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."
(setq global-mode-string
(append '("" viper-mode-string) (cdr global-mode-string))))
- (defadvice describe-key (before viper-read-keyseq-ad protect activate)
+ (defadvice describe-key (before viper-describe-key-ad protect activate)
"Force to read key via `viper-read-key-sequence'."
- (interactive (list (viper-read-key-sequence "Describe key: "))))
+ (interactive (list (viper-read-key-sequence "Describe key: "))
+ ))
(defadvice describe-key-briefly
- (before viper-read-keyseq-ad protect activate)
+ (before viper-describe-key-briefly-ad protect activate)
"Force to read key via `viper-read-key-sequence'."
(interactive (list (viper-read-key-sequence "Describe key briefly: "))))
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:
(use-local-map wordstar-mode-map)
(setq mode-name "WordStar")
(setq major-mode 'wordstar-mode)
- (run-hooks 'wordstar-mode-hook))
+ (run-mode-hooks 'wordstar-mode-hook))
(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."
:type (get 'pcomplete-file-ignore 'custom-type)
:group 'eshell-cmpl)
-(defcustom eshell-cmpl-dir-ignore
- (format "\\`\\(\\.\\.?\\|CVS\\)%c\\'" directory-sep-char)
+(defcustom eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\)/\\'"
(documentation-property 'pcomplete-dir-ignore
'variable-documentation)
:type (get 'pcomplete-dir-ignore 'custom-type)
@@ -155,7 +154,7 @@ to writing a completion function."
:type (get 'pcomplete-autolist 'custom-type)
:group 'eshell-cmpl)
-(defcustom eshell-cmpl-suffix-list (list directory-sep-char ?:)
+(defcustom eshell-cmpl-suffix-list (list ?/ ?:)
(documentation-property 'pcomplete-suffix-list
'variable-documentation)
:type (get 'pcomplete-suffix-list 'custom-type)
@@ -370,7 +369,8 @@ to writing a completion function."
(setq args (nthcdr (1+ l) args)
posns (nthcdr (1+ l) posns))))
(assert (= (length args) (length posns)))
- (when (and args (eq (char-syntax (char-before end)) ? ))
+ (when (and args (eq (char-syntax (char-before end)) ? )
+ (not (eq (char-before (1- end)) ?\\)))
(nconc args (list ""))
(nconc posns (list (point))))
(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.")
(let* ((letter (match-string 1))
(regexp (concat "\\`" letter))
(path (eshell-find-previous-directory regexp)))
- (concat (or path letter)
- (char-to-string directory-sep-char)))))
+ (concat (or path letter) "/"))))
(defun eshell-complete-user-reference ()
"If there is a user reference, complete it."
@@ -300,7 +299,7 @@ Thus, this does not include the current directory.")
(let* ((path default-directory)
(len (length path)))
(if (and (> len 1)
- (eq (aref path (1- len)) directory-sep-char)
+ (eq (aref path (1- len)) ?/)
(not (and (eshell-under-windows-p)
(string-match "\\`[A-Za-z]:[\\\\/]\\'" path))))
(setq path (substring path 0 (1- (length path)))))
@@ -324,9 +323,7 @@ in the minibuffer:
(len (length extra-dots))
replace-text)
(while (> len 0)
- (setq replace-text
- (concat replace-text
- (char-to-string directory-sep-char) "..")
+ (setq replace-text (concat replace-text "/..")
len (1- len)))
(setq path
(replace-match replace-text t t path 1))))
@@ -371,7 +368,7 @@ in the minibuffer:
(setq path
(ring-remove eshell-last-dir-ring
(if index
- (string-to-int index)
+ (string-to-number index)
0)))))
((and path (string-match "^=\\(.*\\)$" path))
(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:
(defvar matches)
(defvar message-shown))
-;; jww (1999-11-18): this function assumes that directory-sep-char is
-;; a forward slash (/)
-
(defun eshell-glob-entries (path globs &optional recurse-p)
"Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil."
(let* ((entries (ignore-errors
@@ -303,11 +300,11 @@ the form:
;; can't use `directory-file-name' because it strips away text
;; properties in the string
(let ((len (1- (length incl))))
- (if (eq (aref incl len) directory-sep-char)
+ (if (eq (aref incl len) ?/)
(setq incl (substring incl 0 len)))
(when excl
(setq len (1- (length excl)))
- (if (eq (aref excl len) directory-sep-char)
+ (if (eq (aref excl len) ?/)
(setq excl (substring excl 0 len)))))
(setq incl (eshell-glob-regexp incl)
excl (and excl (eshell-glob-regexp excl)))
@@ -329,7 +326,7 @@ the form:
(while entries
(setq name (car entries)
len (length name)
- isdir (eq (aref name (1- len)) directory-sep-char))
+ isdir (eq (aref name (1- len)) ?/))
(if (let ((fname (directory-file-name name)))
(and (not (and excl (string-match excl fname)))
(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.")
(unless by-bytes
(setq block-size (or block-size 1024)))
(if (and max-depth (stringp max-depth))
- (setq max-depth (string-to-int max-depth)))
+ (setq max-depth (string-to-number max-depth)))
;; filesystem support means nothing under Windows
(if (eshell-under-windows-p)
(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)."
(defmacro eshell-do-subjob (object)
"Evaluate a command OBJECT as a subjob.
-We indicate thet the process was run in the background by returned it
+We indicate that the process was run in the background by returning it
ensconced in a list."
`(let ((eshell-current-subjob-p t))
,object))
@@ -1006,11 +1006,10 @@ at the moment are:
(eshell-resume-eval))))
;; On systems that don't support async subprocesses, eshell-resume
;; can return t. Don't treat that as an error.
+ (if (listp delim)
+ (setq delim (car delim)))
(if (and delim (not (eq delim t)))
- (error "Unmatched delimiter: %c"
- (if (listp delim)
- (car delim)
- delim))))))
+ (error "Unmatched delimiter: %c" delim)))))
(defun eshell-resume-command (proc status)
"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."
"Invoke a .BAT or .CMD file on DOS/Windows systems."
;; since CMD.EXE can't handle forward slashes in the initial
;; argument...
- (setcar args (subst-char-in-string directory-sep-char ?\\ (car args)))
+ (setcar args (subst-char-in-string ?/ ?\\ (car args)))
(throw 'eshell-replace-command
(eshell-parse-command eshell-windows-shell-file (cons "/c" args))))
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."
(eshell-finish-arg
(prog1
(list 'eshell-set-output-handle
- (or (and sh (string-to-int sh)) 1)
+ (or (and sh (string-to-number sh)) 1)
(list 'quote
(aref [overwrite append insert]
(1- (length oper)))))
@@ -353,7 +353,8 @@ it defaults to `insert'."
((or (bufferp target)
(and (boundp 'eshell-buffer-shorthand)
(symbol-value 'eshell-buffer-shorthand)
- (symbolp target)))
+ (symbolp target)
+ (not (memq target '(t nil)))))
(let ((buf (if (bufferp target)
target
(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'."
(if eshell-first-time-p
(run-hooks 'eshell-first-time-mode-hook))
- (run-hooks 'eshell-mode-hook)
+ (run-mode-hooks 'eshell-mode-hook)
(run-hooks 'eshell-post-command-hook))
(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."
parts)
(if (and (eshell-under-windows-p)
(> len 2)
- (eq (aref path 0) directory-sep-char)
- (eq (aref path 1) directory-sep-char))
+ (eq (aref path 0) ?/)
+ (eq (aref path 1) ?/))
(setq i 2))
(while (< i len)
- (if (and (eq (aref path i) directory-sep-char)
+ (if (and (eq (aref path i) ?/)
(not (get-text-property i 'escaped path)))
- (setq parts (cons (if (= li i)
- (char-to-string directory-sep-char)
+ (setq parts (cons (if (= li i) "/"
(substring path li (1+ i))) parts)
li (1+ i)))
(setq i (1+ i)))
@@ -268,9 +267,7 @@ If N or M is nil, it means the end of the list."
(setq parts (cons (substring path li i) parts)))
(if (and (eshell-under-windows-p)
(string-match "\\`[A-Za-z]:\\'" (car (last parts))))
- (setcar (last parts)
- (concat (car (last parts))
- (char-to-string directory-sep-char))))
+ (setcar (last parts) (concat (car (last parts)) "/")))
(nreverse parts)))
(defun eshell-to-flat-string (value)
@@ -450,8 +447,8 @@ list."
(point) (progn (end-of-line)
(point))) ":")))
(if (and (and fields (nth 0 fields) (nth 2 fields))
- (not (assq (string-to-int (nth 2 fields)) names)))
- (setq names (cons (cons (string-to-int (nth 2 fields))
+ (not (assq (string-to-number (nth 2 fields)) names)))
+ (setq names (cons (cons (string-to-number (nth 2 fields))
(nth 0 fields))
names))))
(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
(if (and value
(stringp value)
(file-directory-p value))
- (concat varname (char-to-string directory-sep-char))
+ (concat varname "/")
varname))))
(eshell-envvar-names (eshell-environment-variables)))
(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.
If the optional argument FRAME is given, this gets the face NAME for
that frame; otherwise, it uses the selected frame.
If FRAME is the symbol t, then the global, non-frame face is returned.
-If NAME is already a face, it is simply returned.
-
-This function is defined for compatibility with Emacs 20.2. It
-should not be used anymore."
+If NAME is already a face, it is simply returned."
(facep name))
(make-obsolete 'internal-find-face 'facep "21.1")
@@ -234,8 +231,8 @@ of a face name is the same for all frames."
(defun face-equal (face1 face2 &optional frame)
"Non-nil if faces FACE1 and FACE2 are equal.
Faces are considered equal if all their attributes are equal.
-If the optional argument FRAME is given, report on face FACE in that frame.
-If FRAME is t, report on the defaults for face FACE (for new frames).
+If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame.
+If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames).
If FRAME is omitted or nil, use the selected frame."
(internal-lisp-face-equal-p face1 face2 frame))
@@ -1154,16 +1151,24 @@ this regular expression. When called interactively with a prefix
arg, prompt for a regular expression."
(interactive (list (and current-prefix-arg
(read-string "List faces matching regexp: "))))
- (let ((faces (sort (face-list) #'string-lessp))
+ (let ((all-faces (zerop (length regexp)))
(frame (selected-frame))
+ (max-length 0)
+ faces line-format
disp-frame window face-name)
- (when (> (length regexp) 0)
- (setq faces
- (delq nil
- (mapcar (lambda (f)
- (when (string-match regexp (symbol-name f))
- f))
- faces))))
+ ;; We filter and take the max length in one pass
+ (setq faces
+ (delq nil
+ (mapcar (lambda (f)
+ (let ((s (symbol-name f)))
+ (when (or all-faces (string-match regexp s))
+ (setq max-length (max (length s) max-length))
+ f)))
+ (sort (face-list) #'string-lessp))))
+ (unless faces
+ (error "No faces matching \"%s\"" regexp))
+ (setq max-length (1+ max-length)
+ line-format (format "%%-%ds" max-length))
(with-output-to-temp-buffer "*Faces*"
(save-excursion
(set-buffer standard-output)
@@ -1178,7 +1183,7 @@ arg, prompt for a regular expression."
(setq help-xref-stack nil)
(dolist (face faces)
(setq face-name (symbol-name face))
- (insert (format "%25s " face-name))
+ (insert (format line-format face-name))
;; Hyperlink to a customization buffer for the face. Using
;; the help xref mechanism may not be the best way.
(save-excursion
@@ -1203,7 +1208,7 @@ arg, prompt for a regular expression."
(goto-char beg)
(forward-line 1)
(while (not (eobp))
- (insert " ")
+ (insert-char ?\s max-length)
(forward-line 1))))
(goto-char (point-min)))
(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."
This means to guarantee valid names and perhaps to canonicalize
certain patterns.
+FILENAME should be an absolute file name since the conversion rules
+sometimes vary depending on the position in the file name. E.g. c:/foo
+is a valid DOS file name, but c:/bar/c:/foo is not.
+
This function's standard definition is trivial; it just returns
the argument. However, on Windows and DOS, replace invalid
characters. 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.")
(defvar filesets-menu-ensure-use-cached
(and filesets-running-xemacs
- (not (emacs-version>= 21 5)))
+ (if (fboundp 'emacs-version>=)
+ (not (emacs-version>= 21 5))))
"Make sure (X)Emacs uses filesets' cache.
Well, 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.")
It will be passed one argument, which is the current value of
`font-lock-mode'.")
+;; The mode for which font-lock was initialized, or nil if none.
+(defvar font-lock-mode-major-mode)
(define-minor-mode font-lock-mode
"Toggle Font Lock mode.
With 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
;; Arrange to unfontify this buffer if we change major mode later.
(if font-lock-mode
(add-hook 'change-major-mode-hook 'font-lock-change-mode nil t)
- (remove-hook 'change-major-mode-hook 'font-lock-change-mode t)))
+ (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))
+ (when font-lock-mode
+ (setq font-lock-mode-major-mode major-mode)))
;; Get rid of fontification for the old major mode.
;; We do this when changing major modes.
@@ -175,6 +179,7 @@ this function onto `change-major-mode-hook'."
'(font-lock-face)))
(restore-buffer-modified-p modp)))
+(defvar font-lock-set-defaults)
(defun font-lock-default-function (mode)
;; Turn on Font Lock mode.
(when mode
@@ -201,9 +206,14 @@ this function onto `change-major-mode-hook'."
;; Only do hard work if the mode has specified stuff in
;; `font-lock-defaults'.
(when (or font-lock-defaults
- (and (boundp 'font-lock-keywords) font-lock-keywords)
+ (if (boundp 'font-lock-keywords) font-lock-keywords)
(with-no-warnings
- (cdr (assq major-mode font-lock-defaults-alist))))
+ (cdr (assq major-mode font-lock-defaults-alist)))
+ (and mode
+ (boundp 'font-lock-set-defaults)
+ font-lock-set-defaults
+ font-lock-mode-major-mode
+ (not (eq font-lock-mode-major-mode major-mode))))
(font-lock-mode-internal mode)))
(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:
adds two fontification patterns for C mode, to fontify `FIXME:' words, even in
comments, and to fontify `and', `or' and `not' words as keywords.
-When used from a Lisp program (such as a minor mode), it is recommended to
-use nil for MODE (and place the call on a hook) to avoid subtle problems
-due to details of the implementation.
+The above procedure will only add the keywords for C mode, not
+for modes derived from C mode. To add them for derived modes too,
+pass nil for MODE and add the call to c-mode-hook.
+
+For example:
+
+ (add-hook 'c-mode-hook
+ (lambda ()
+ (font-lock-add-keywords 'c-mode
+ '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)
+ (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
+ font-lock-keyword-face)))))
+
+The above procedure may fail to add keywords to derived modes if
+some involved major mode does not follow the standard conventions.
+File a bug report if this happens, so the major mode can be corrected.
Note that some modes have specialized support for additional patterns, e.g.,
see 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',
(font-lock-update-removed-keyword-alist mode keywords append))
(t
;; Otherwise set or add the keywords now.
- ;; This is a no-op if it has been done already in this buffer.
+ ;; This is a no-op if it has been done already in this buffer
+ ;; for the correct major mode.
(font-lock-set-defaults)
(let ((was-compiled (eq (car font-lock-keywords) t)))
;; Bring back the user-level (uncompiled) keywords.
@@ -774,9 +788,11 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
MODE should be a symbol, the major mode command name, such as `c-mode'
or nil. If nil, highlighting keywords are removed for the current buffer.
-When used from a Lisp program (such as a minor mode), it is recommended to
-use nil for MODE (and place the call on a hook) to avoid subtle problems
-due to details of the implementation."
+To make the removal apply to modes derived from MODE as well,
+pass nil for MODE and add the call to MODE-hook. This may fail
+for some derived modes if some involved major mode does not
+follow the standard conventions. File a bug report if this
+happens, so the major mode can be corrected."
(cond (mode
;; Remove one keyword at the time.
(dolist (keyword keywords)
@@ -1351,7 +1367,7 @@ START should be at the beginning of a line."
comment-start-skip))
(put-text-property beg (match-end 0) 'face
font-lock-comment-delimiter-face)))
- (if (looking-back comment-end-regexp (point-at-bol))
+ (if (looking-back comment-end-regexp (point-at-bol) t)
(put-text-property (match-beginning 0) (point) 'face
font-lock-comment-delimiter-face))))
(< (point) end))
@@ -1571,12 +1587,15 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
(defvar font-lock-set-defaults nil) ; Whether we have set up defaults.
+(defvar font-lock-mode-major-mode)
(defun font-lock-set-defaults ()
"Set fontification defaults appropriately for this mode.
Sets various variables using `font-lock-defaults' (or, if nil, using
`font-lock-defaults-alist') and `font-lock-maximum-decoration'."
- ;; Set fontification defaults iff not previously set.
- (unless font-lock-set-defaults
+ ;; Set fontification defaults iff not previously set for correct major mode.
+ (unless (and font-lock-set-defaults
+ (eq font-lock-mode-major-mode major-mode))
+ (setq font-lock-mode-major-mode major-mode)
(set (make-local-variable 'font-lock-set-defaults) t)
(make-local-variable 'font-lock-fontified)
(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:
;; user customising
;;(message "forms: proceeding setup (user hooks)...")
- (run-hooks 'forms-mode-hook 'forms-mode-hooks)
+ (run-mode-hooks 'forms-mode-hook 'forms-mode-hooks)
;;(message "forms: setting up... done.")
;; 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 @@
+2005-06-04 Luc Teirlinck <teirllm@auburn.edu>
+
+ * gnus-art.el (article-update-date-lapsed): Use `save-match-data'.
+
+2005-06-04 Lute Kamstra <lute@gnu.org>
+
+ * nnfolder.el (nnfolder-read-folder): Make sure that undo
+ information is never recorded.
+
+2005-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy.
+
+2005-06-02 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * pop3.el (pop3-md5): Run md5 in the binary mode.
+ (pop3-md5-program-args): New variable.
+
+ * starttls.el (starttls-set-process-query-on-exit-flag):
+ Use eval-and-compile.
+
+2005-05-31 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-art.el (article-display-x-face): Replace
+ process-kill-without-query by gnus-set-process-query-on-exit-flag.
+
+ * gnus-group.el: Bind gnus-cache-active-hashtb when compiling.
+
+ * gnus-util.el (gnus-set-process-query-on-exit-flag): Alias to
+ set-process-query-on-exit-flag or process-kill-without-query.
+
+ * html2text.el (html2text-fix-paragraphs): Use `while - re-search'
+ loop instead of replace-regexp.
+
+ * imap.el (imap-ssl-open): Use set-process-query-on-exit-flag
+ instead of process-kill-without-query if it is available.
+
+ * mm-util.el (mm-insert-file-contents): Bind find-file-hook
+ instead of find-file-hooks if it is available.
+
+ * mml1991.el: Bind pgg-default-user-id when compiling.
+
+ * mml2015.el: Bind pgg-default-user-id when compiling.
+
+ * nndraft.el (nndraft-request-associate-buffer):
+ Use write-contents-functions instead of write-contents-hooks if it is
+ available.
+
+ * nnheader.el (nnheader-find-file-noselect): Bind find-file-hook
+ instead of find-file-hooks if it is available.
+
+ * nntp.el (nntp-open-connection): Replace
+ process-kill-without-query by gnus-set-process-query-on-exit-flag.
+ (nntp-open-ssl-stream): Ditto.
+ (nntp-open-tls-stream): Ditto.
+
+ * pgg.el: Don't bind itimer vars; don't autoload itimer functions.
+ (pgg-run-at-time-1): New macro.
+ (pgg-run-at-time): Use it.
+
+ * starttls.el (starttls-set-process-query-on-exit-flag): Alias to
+ set-process-query-on-exit-flag or process-kill-without-query.
+ (starttls-open-stream-gnutls): Use it instead of
+ process-kill-without-query.
+ (starttls-open-stream): Ditto.
+
+2005-05-31 Simon Josefsson <jas@extundo.com>
+
+ * imap.el (imap-ssl-open): Use imap-process-connection-type,
+ instead of hard coding to nil.
+
+2005-05-31 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * gnus-group.el (): Require gnus-sum and autoload functions to
+ resolve warnings when gnus-group.el compiled alone.
+
+2005-05-30 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-agent.el (gnus-agent-regenerate-group)
+ (gnus-agent-fetch-articles): Replace `string-to-int' by
+ `string-to-number'.
+ * gnus-art.el (gnus-button-fetch-group): Ditto.
+ * gnus-cache.el (gnus-cache-generate-active)
+ (gnus-cache-articles-in-group): Ditto.
+ * gnus-group.el (gnus-group-set-current-level)
+ (gnus-group-insert-group-line): Ditto.
+ * gnus-score.el (gnus-score-set-expunge-below)
+ (gnus-score-set-mark-below, gnus-summary-score-effect)
+ (gnus-summary-score-entry): Ditto.
+ * gnus-soup.el (gnus-soup-send-packet, gnus-soup-parse-areas)
+ (gnus-soup-pack): Ditto.
+ * gnus-spec.el (gnus-xmas-format): Ditto.
+ * gnus-start.el (gnus-newsrc-to-gnus-format): Ditto.
+ * gnus-sum.el (gnus-create-xref-hashtb): Ditto.
+ * gnus-uu.el (gnus-uu-expand-numbers): Ditto.
+ * nnbabyl.el (nnbabyl-article-group-number): Ditto.
+ * nndb.el (nndb-get-remote-expire-response): Ditto.
+ * nndiary.el (nndiary-parse-schedule-value)
+ (nndiary-string-to-number, nndiary-request-replace-article)
+ (nndiary-request-article): Ditto.
+ * nndoc.el (nndoc-rnews-body-end, nndoc-mbox-body-end): Ditto.
+ * nndraft.el (nndraft-articles, nndraft-request-group): Ditto.
+ * nneething.el (nneething-make-head): Ditto.
+ * nnfolder.el (nnfolder-request-article)
+ (nnfolder-retrieve-headers): Ditto.
+ * nnheader.el (nnheader-file-to-number): Ditto.
+ * nnkiboze.el (nnkiboze-request-article): Ditto.
+ * nnmail.el (nnmail-process-unix-mail-format)
+ (nnmail-process-babyl-mail-format): Ditto.
+ * nnmbox.el (nnmbox-read-mbox, nnmbox-article-group-number): Ditto.
+ * nnmh.el (nnmh-update-gnus-unreads, nnmh-active-number)
+ (nnmh-request-create-group, nnmh-request-list-1)
+ (nnmh-request-group, nnmh-request-article): Ditto.
+ * nnml.el (nnml-request-replace-article, nnml-request-article): Ditto.
+ * nnrss.el (nnrss-find-rss-via-syndic8): Ditto.
+ * nnsoup.el (nnsoup-make-active): Ditto.
+ * nnspool.el (nnspool-find-id, nnspool-request-group): Ditto.
+ * nntp.el (nntp-find-group-and-number)
+ (nntp-retrieve-headers-with-xover): Ditto.
+ * pgg-gpg.el (pgg-gpg-snarf-keys-region): Ditto.
+ * pgg-parse.el (pgg-read-body, pgg-read-bytes)
+ (pgg-format-key-identifier): Ditto.
+ * pop3.el (pop3-last, pop3-stat): Ditto.
+ * qp.el (quoted-printable-decode-region): Ditto.
+
+ * spam-report.el (spam-report-url-ping-mm-url): Use format instead
+ of concat.
+
+2005-05-30 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks.
+
+ * gnus-art.el (gnus-article-mode): Use gnus-run-mode-hooks.
+
+ * gnus-cus.el (gnus-custom-mode): Use gnus-run-mode-hooks.
+
+ * gnus-eform.el (gnus-edit-form-mode): Use gnus-run-mode-hooks.
+
+ * gnus-group.el (gnus-group-mode): Use gnus-run-mode-hooks.
+
+ * gnus-kill.el (gnus-kill-file-mode): Use gnus-run-mode-hooks.
+
+ * gnus-salt.el (gnus-tree-mode): Use gnus-run-mode-hooks.
+ (gnus-carpal-mode): Ditto.
+
+ * gnus-srvr.el (gnus-server-mode): Use gnus-run-mode-hooks.
+ (gnus-browse-mode): Ditto.
+
+ * gnus-sum.el (gnus-summary-mode): Use gnus-run-mode-hooks.
+
+ * gnus-util.el (gnus-run-mode-hooks): Save current buffer.
+
+2005-05-29 Richard M. Stallman <rms@gnu.org>
+
+ * gnus-cite.el (gnus-cite-add-face): Set overlay's evaporate property.
+
+2005-05-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-util.el (gnus-run-mode-hooks): New function.
+
+ * score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks.
+
+2005-05-26 Luc Teirlinck <teirllm@auburn.edu>
+
+ * gnus-agent.el (gnus-agent-make-mode-line-string):
+ Use mode-line-highlight as mouse-face.
+
+2005-05-17 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * canlock.el (canlock): Change the parent group to news.
+
+ * deuglify.el (gnus-outlook-deuglify): Add :group.
+
+ * dig.el (dig): Add :group.
+
+ * gnus-art.el (gnus-inhibit-mime-unbuttonizing): Add :group.
+
+ * gnus-cite.el (gnus-cite-attribution-face): Add :group.
+ (gnus-cite-face-1, gnus-cite-face-2, gnus-cite-face-3): Ditto.
+ (gnus-cite-face-4, gnus-cite-face-5, gnus-cite-face-6): Ditto.
+ (gnus-cite-face-7, gnus-cite-face-8, gnus-cite-face-9): Ditto.
+ (gnus-cite-face-10, gnus-cite-face-11): Ditto.
+
+ * gnus-diary.el (gnus-diary): Add :group.
+
+ * gnus.el (gnus-group-news-1-face): Add :group.
+ (gnus-group-news-1-empty-face): Ditto.
+ (gnus-group-news-2-face, gnus-group-news-2-empty-face): Ditto.
+ (gnus-group-news-3-face, gnus-group-news-3-empty-face): Ditto.
+ (gnus-group-news-4-face, gnus-group-news-4-empty-face): Ditto.
+ (gnus-group-news-5-face, gnus-group-news-5-empty-face): Ditto.
+ (gnus-group-news-6-face, gnus-group-news-6-empty-face): Ditto.
+ (gnus-group-news-low-face, gnus-group-news-low-empty-face): Ditto.
+ (gnus-group-mail-1-face, gnus-group-mail-1-empty-face): Ditto.
+ (gnus-group-mail-2-face, gnus-group-mail-2-empty-face): Ditto.
+ (gnus-group-mail-3-face, gnus-group-mail-3-empty-face): Ditto.
+ (gnus-group-mail-low-face, gnus-group-mail-low-empty-face): Ditto.
+ (gnus-summary-selected-face, gnus-summary-cancelled-face): Ditto.
+ (gnus-summary-high-ticked-face): Ditto.
+ (gnus-summary-low-ticked-face): Ditto.
+ (gnus-summary-normal-ticked-face): Ditto.
+ (gnus-summary-high-ancient-face): Ditto.
+ (gnus-summary-low-ancient-face): Ditto.
+ (gnus-summary-normal-ancient-face): Ditto.
+ (gnus-summary-high-undownloaded-face): Ditto.
+ (gnus-summary-low-undownloaded-face): Ditto.
+ (gnus-summary-normal-undownloaded-face): Ditto.
+ (gnus-summary-high-unread-face): Ditto.
+ (gnus-summary-low-unread-face): Ditto.
+ (gnus-summary-normal-unread-face): Ditto.
+ (gnus-summary-high-read-face, gnus-summary-low-read-face): Ditto.
+ (gnus-summary-normal-read-face, gnus-splash-face): Ditto.
+
+ * message.el (message-minibuffer-local-map): Add :group.
+
+ * sieve-manage.el (sieve-manage-log): Add :group.
+ (sieve-manage-default-user): Diito.
+ (sieve-manage-server-eol, sieve-manage-client-eol): Ditto.
+ (sieve-manage-streams, sieve-manage-stream-alist): Ditto.
+ (sieve-manage-authenticators): Ditto.
+ (sieve-manage-authenticator-alist): Ditto.
+ (sieve-manage-default-port): Ditto.
+
+ * sieve-mode.el (sieve-control-commands-face): Add :group.
+ (sieve-action-commands-face): Ditto.
+ (sieve-test-commands-face): Ditto.
+ (sieve-tagged-arguments-face): Ditto.
+
+ * smime.el (smime): Add :group.
+
+ * spam-report.el (spam-report): Add :group.
+
+ * spam.el (spam, spam-face): Add :group.
+
+2005-05-26 Lute Kamstra <lute@gnu.org>
+
+ * score-mode.el (gnus-score-mode): Use run-mode-hooks.
+
2005-05-16 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el: Don't autoload mail-extract-address-components.
@@ -213,11 +451,11 @@
* nnimap.el (nnimap-date-days-ago): Ditto.
- * gnus-demon.el (parse-time-string): Added autoload.
+ * gnus-demon.el (parse-time-string): Add autoload.
- * gnus-delay.el (parse-time-string): Added autoload.
+ * gnus-delay.el (parse-time-string): Add autoload.
- * gnus-art.el (parse-time-string): Added autoload.
+ * gnus-art.el (parse-time-string): Add autoload.
* nnultimate.el (parse-time): Require for `parse-time-string'.
@@ -271,14 +509,13 @@
(rfc2047-encoded-word-regexp): Don't use shy group.
(rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change.
(rfc2047-parse-and-decode): Ditto.
- (rfc2047-decode): Treat the ascii coding-system as raw-text by
- default.
+ (rfc2047-decode): Treat the ascii coding-system as raw-text by default.
2005-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
* rfc2047.el (rfc2047-encode-encoded-words): New variable.
(rfc2047-field-value): Strip props.
- (rfc2047-encode-message-header): Disabled header folding -- not
+ (rfc2047-encode-message-header): Disable header folding -- not
all headers can be folded, and this should be done by the message
composition mode. Probably. I think.
(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 @@
;;; canlock.el --- functions for Cancel-Lock feature
-;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004
+;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
@@ -50,7 +50,7 @@
(defgroup canlock nil
"The Cancel-Lock feature."
- :group 'applications)
+ :group 'news)
(defcustom canlock-password nil
"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 @@
;;; deuglify.el --- deuglify broken Outlook (Express) articles
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2002 Raymond Scholz
;; Author: Raymond Scholz <rscholz@zonix.de>
@@ -231,7 +231,8 @@
(defgroup gnus-outlook-deuglify nil
"Deuglify articles generated by broken user agents like MS Outlook (Express)."
- :version "22.1")
+ :version "22.1"
+ :group 'gnus)
;;;###autoload
(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 @@
;;; dig.el --- Domain Name System dig interface
-;; Copyright (c) 2000, 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: DNS BIND dig
@@ -40,7 +40,8 @@
(eval-when-compile (require 'cl))
(defgroup dig nil
- "Dig configuration.")
+ "Dig configuration."
+ :group 'comm)
(defcustom dig-program "dig"
"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:
(if (and (fboundp 'propertize)
(fboundp 'make-mode-line-mouse-map))
(propertize string 'local-map
- (make-mode-line-mouse-map mouse-button mouse-func))
+ (make-mode-line-mouse-map mouse-button mouse-func)
+ 'mouse-face 'mode-line-highlight)
string))
(defun gnus-agent-toggle-plugged (set-to)
@@ -1539,7 +1540,7 @@ downloaded into the agent."
(while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *")
(push (cons (buffer-substring (match-beginning 1)
(match-end 1))
- (string-to-int
+ (string-to-number
(buffer-substring (match-beginning 2)
(match-end 2))))
crosses)
@@ -2551,7 +2552,7 @@ The following commands are available:
(buffer-disable-undo)
(setq truncate-lines t)
(setq buffer-read-only t)
- (gnus-run-hooks 'gnus-category-mode-hook))
+ (gnus-run-mode-hooks 'gnus-category-mode-hook))
(defalias 'gnus-category-position-point 'gnus-goto-colon)
@@ -3702,7 +3703,7 @@ If REREAD is not nil, downloaded articles are marked as unread."
(dir (file-name-directory file))
point
(downloaded (if (file-exists-p dir)
- (sort (mapcar (lambda (name) (string-to-int name))
+ (sort (mapcar (lambda (name) (string-to-number name))
(directory-files dir nil "^[0-9]+$" t))
'>)
(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:
(or (nth 4 spec) 3)
(intern (format "gnus-emphasis-%s" (nth 2 spec)))))
types))
- '(("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)"
- 2 3 gnus-emphasis-strikethru)
+ '(;; I've never seen anyone use this strikethru convention whereas I've
+ ;; several times seen it triggered by normal text. --Stef
+ ;; Miles suggests that this form is sometimes used but for italics,
+ ;; so maybe we should map it to `italic'.
+ ;; ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)"
+ ;; 2 3 gnus-emphasis-strikethru)
("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)"
2 3 gnus-emphasis-underline))))
"*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,
as described by the variables `gnus-buttonized-mime-types' and
`gnus-unbuttonized-mime-types'."
:version "22.1"
+ :group 'gnus-article-mime
:type 'boolean)
(defcustom gnus-body-boundary-delimiter "_"
@@ -2180,10 +2185,11 @@ unfolded."
;; The command is a string, so we interpret the command
;; as a, well, command, and fork it off.
(let ((process-connection-type nil))
- (process-kill-without-query
+ (gnus-set-process-query-on-exit-flag
(start-process
"article-x-face" nil shell-file-name
- shell-command-switch gnus-article-x-face-command))
+ shell-command-switch gnus-article-x-face-command)
+ nil)
(with-temp-buffer
(insert face)
(process-send-region "article-x-face"
@@ -3032,20 +3038,21 @@ function and want to see what the date was before converting."
(defun article-update-date-lapsed ()
"Function to be run from a timer to update the lapsed time line."
- (let (deactivate-mark)
- (save-excursion
- (ignore-errors
- (walk-windows
- (lambda (w)
- (set-buffer (window-buffer w))
- (when (eq major-mode 'gnus-article-mode)
- (let ((mark (point-marker)))
- (goto-char (point-min))
- (when (re-search-forward "^X-Sent:" nil t)
- (article-date-lapsed t))
- (goto-char (marker-position mark))
- (move-marker mark nil))))
- nil 'visible)))))
+ (save-match-data
+ (let (deactivate-mark)
+ (save-excursion
+ (ignore-errors
+ (walk-windows
+ (lambda (w)
+ (set-buffer (window-buffer w))
+ (when (eq major-mode 'gnus-article-mode)
+ (let ((mark (point-marker)))
+ (goto-char (point-min))
+ (when (re-search-forward "^X-Sent:" nil t)
+ (article-date-lapsed t))
+ (goto-char (marker-position mark))
+ (move-marker mark nil))))
+ nil 'visible))))))
(defun gnus-start-date-timer (&optional n)
"Start a timer to update the X-Sent header in the article buffers.
@@ -3741,7 +3748,7 @@ commands:
(setq buffer-read-only t)
(set-syntax-table gnus-article-mode-syntax-table)
(mm-enable-multibyte)
- (gnus-run-hooks 'gnus-article-mode-hook))
+ (gnus-run-mode-hooks 'gnus-article-mode-hook))
(defun gnus-article-setup-buffer ()
"Initialize the article buffer."
@@ -6786,7 +6793,7 @@ specified by `gnus-button-alist'."
(match-string 3 address)
"nntp")))
nil nil nil
- (and (match-end 6) (list (string-to-int (match-string 6 address))))))))
+ (and (match-end 6) (list (string-to-number (match-string 6 address))))))))
(defun gnus-url-parse-query-string (query &optional downcase)
(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."
articles)
(when (file-exists-p dir)
(setq articles
- (sort (mapcar (lambda (name) (string-to-int name))
+ (sort (mapcar (lambda (name) (string-to-number name))
(directory-files dir nil "^[0-9]+$" t))
'<))
;; Update the cache active file, just to synch more.
@@ -681,7 +681,7 @@ If LOW, update the lower bound instead."
;; Separate articles from all other files and directories.
(while files
(if (string-match "^[0-9]+$" (file-name-nondirectory (car files)))
- (push (string-to-int (file-name-nondirectory (pop files))) nums)
+ (push (string-to-number (file-name-nondirectory (pop files))) nums)
(push (pop files) alphs)))
;; If we have nums, then this is probably a valid group.
(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 @@
;;; gnus-cite.el --- parse citations in articles for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;; 2005
;; Free Software Foundation, Inc.
;; Author: Per Abhiddenware
@@ -138,7 +139,8 @@ the envelope From line."
(defface gnus-cite-attribution-face '((t
(:italic t)))
- "Face used for attribution lines.")
+ "Face used for attribution lines."
+ :group 'gnus-cite)
(defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face
"Face used for attribution lines.
@@ -155,7 +157,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "MidnightBlue"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-2 '((((class color)
(background dark))
@@ -165,7 +168,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "firebrick"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-3 '((((class color)
(background dark))
@@ -175,7 +179,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "dark green"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-4 '((((class color)
(background dark))
@@ -185,7 +190,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "OrangeRed"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-5 '((((class color)
(background dark))
@@ -195,7 +201,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "dark khaki"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-6 '((((class color)
(background dark))
@@ -205,7 +212,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "dark violet"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-7 '((((class color)
(background dark))
@@ -215,7 +223,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "SteelBlue4"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-8 '((((class color)
(background dark))
@@ -225,7 +234,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "magenta"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-9 '((((class color)
(background dark))
@@ -235,7 +245,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "violet"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-10 '((((class color)
(background dark))
@@ -245,7 +256,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "medium purple"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defface gnus-cite-face-11 '((((class color)
(background dark))
@@ -255,7 +267,8 @@ It is merged with the face for the cited text belonging to the attribution."
(:foreground "turquoise"))
(t
(:italic t)))
- "Citation face.")
+ "Citation face."
+ :group 'gnus-cite)
(defcustom gnus-cite-face-list
'(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'."
(when (< from to)
(push (setq overlay (gnus-make-overlay from to))
gnus-cite-overlay-list)
+ (gnus-overlay-put overlay 'evaporate t)
(gnus-overlay-put overlay 'face face))))))
(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 @@
;;; gnus-cus.el --- customization commands for Gnus
;;
-;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
@@ -67,7 +67,7 @@ if that value is non-nil."
(set (make-local-variable 'widget-push-button-suffix) "")
(set (make-local-variable 'widget-link-prefix) "")
(set (make-local-variable 'widget-link-suffix) ""))
- (gnus-run-hooks 'gnus-custom-mode-hook))
+ (gnus-run-mode-hooks 'gnus-custom-mode-hook))
;;; Group Customization:
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 @@
;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend
-;; Copyright (c) 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000, 2001 Didier Verna.
;; Author: Didier Verna <didier@xemacs.org>
@@ -103,7 +103,8 @@
(defgroup gnus-diary nil
"Utilities on top of the nndiary backend for Gnus."
- :version "22.1")
+ :version "22.1"
+ :group 'gnus)
(defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n"
"*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 @@
;;; gnus-eform.el --- a mode for editing forms for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -83,7 +83,7 @@ It is a slightly enhanced emacs-lisp-mode.
(use-local-map gnus-edit-form-mode-map)
(make-local-variable 'gnus-edit-form-done-function)
(make-local-variable 'gnus-prev-winconf)
- (gnus-run-hooks 'gnus-edit-form-mode-hook))
+ (gnus-run-mode-hooks 'gnus-edit-form-mode-hook))
(defun gnus-edit-form (form documentation exit-func)
"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 @@
;;; gnus-group.el --- group mode commands for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -41,7 +41,11 @@
(require 'time-date)
(require 'gnus-ems)
-(eval-when-compile (require 'mm-url))
+(eval-when-compile
+ (require 'mm-url)
+ (let ((features (cons 'gnus-group features)))
+ (require 'gnus-sum))
+ (defvar gnus-cache-active-hashtb))
(defcustom gnus-group-archive-directory
"/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/"
@@ -1042,7 +1046,7 @@ The following commands are available:
(gnus-undo-mode 1))
(when gnus-slave
(gnus-slave-mode))
- (gnus-run-hooks 'gnus-group-mode-hook))
+ (gnus-run-mode-hooks 'gnus-group-mode-hook))
(defun gnus-update-group-mark-positions ()
(save-excursion
@@ -1452,7 +1456,7 @@ if it is a string, only list groups matching REGEXP."
(eval gnus-group-line-format-spec)))
`(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb)
gnus-unread ,(if (numberp number)
- (string-to-int gnus-tmp-number-of-unread)
+ (string-to-number gnus-tmp-number-of-unread)
t)
gnus-marked ,gnus-tmp-marked-mark
gnus-indentation ,gnus-group-indentation
@@ -3246,7 +3250,7 @@ Uses the process/prefix convention."
(progn
(unless (gnus-group-process-prefix current-prefix-arg)
(error "No group on the current line"))
- (string-to-int
+ (string-to-number
(let ((s (read-string
(format "Level (default %s): "
(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 @@
;;; gnus-kill.el --- kill commands for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; 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."
(setq major-mode 'gnus-kill-file-mode)
(setq mode-name "Kill")
(lisp-mode-variables nil)
- (gnus-run-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook))
+ (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook))
(defun gnus-kill-file-edit-file (newsgroup)
"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 @@
;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2001
+;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -496,7 +496,7 @@ Two predefined functions are available:
(gnus-set-work-buffer)
(gnus-tree-node-insert (make-mail-header "") nil)
(setq gnus-tree-node-length (1- (point))))
- (gnus-run-hooks 'gnus-tree-mode-hook))
+ (gnus-run-mode-hooks 'gnus-tree-mode-hook))
(defun gnus-tree-read-summary-keys (&optional arg)
"Read a summary buffer key sequence and execute it."
@@ -1009,7 +1009,7 @@ The following commands are available:
(buffer-disable-undo)
(setq buffer-read-only t)
(make-local-variable 'gnus-carpal-attached-buffer)
- (gnus-run-hooks 'gnus-carpal-mode-hook))
+ (gnus-run-mode-hooks 'gnus-carpal-mode-hook))
(defun gnus-carpal-setup-buffer (type)
(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."
;; If this is an integer comparison, we transform from string to int.
(if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
(if (stringp match)
- (setq match (string-to-int match)))
+ (setq match (string-to-number match)))
(set-text-properties 0 (length match) nil match))
(unless (eq date 'now)
@@ -891,7 +891,7 @@ EXTRA is the possible non-standard header."
t)
(read-string "Match: ")
(if (y-or-n-p "Use regexp match? ") 'r 's)
- (string-to-int (read-string "Score: "))))
+ (string-to-number (read-string "Score: "))))
(save-excursion
(unless (and (stringp match) (> (length match) 0))
(error "No match"))
@@ -945,7 +945,7 @@ EXTRA is the possible non-standard header."
"Automatically mark articles with score below SCORE as read."
(interactive
(list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg))
- (string-to-int (read-string "Mark below: ")))))
+ (string-to-number (read-string "Mark below: ")))))
(setq score (or score gnus-summary-default-score 0))
(gnus-score-set 'mark (list score))
(gnus-score-set 'touched '(t))
@@ -979,7 +979,7 @@ EXTRA is the possible non-standard header."
"Automatically expunge articles with score below SCORE."
(interactive
(list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg))
- (string-to-int (read-string "Set expunge below: ")))))
+ (string-to-number (read-string "Set expunge below: ")))))
(setq score (or score gnus-summary-default-score 0))
(gnus-score-set 'expunge (list score))
(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."
(packer (if (< (string-match "%s" packer)
(string-match "%d" packer))
(format packer files
- (string-to-int (gnus-soup-unique-prefix dir)))
+ (string-to-number (gnus-soup-unique-prefix dir)))
(format packer
- (string-to-int (gnus-soup-unique-prefix dir))
+ (string-to-number (gnus-soup-unique-prefix dir))
files)))
(dir (expand-file-name dir)))
(gnus-make-directory dir)
@@ -385,7 +385,7 @@ though the two last may be nil if they are missing."
(and (eq (preceding-char) ?\t)
(gnus-soup-field))
(and (eq (preceding-char) ?\t)
- (string-to-int (gnus-soup-field))))
+ (string-to-number (gnus-soup-field))))
areas)
(when (eq (preceding-char) ?\t)
(beginning-of-line 2)))
@@ -535,7 +535,7 @@ Return whether the unpacking was successful."
(error "Bad header"))
(forward-line 1)
(setq beg (point)
- end (+ (point) (string-to-int
+ end (+ (point) (string-to-number
(buffer-substring
(match-beginning 1) (match-end 1)))))
(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."
(t
(if (null args)
(error 'wrong-number-of-arguments #'my-format n fstring))
- (let* ((minlen (string-to-int (or (match-string 2) "")))
+ (let* ((minlen (string-to-number (or (match-string 2) "")))
(arg (car args))
(str (if (stringp arg) arg (format "%s" arg)))
(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 @@
;;; gnus-srvr.el --- virtual server support for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+;; 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -269,7 +270,7 @@ The following commands are available:
(put 'gnus-server-mode 'font-lock-defaults '(gnus-server-font-lock-keywords t))
(set (make-local-variable 'font-lock-defaults)
'(gnus-server-font-lock-keywords t)))
- (gnus-run-hooks 'gnus-server-mode-hook))
+ (gnus-run-mode-hooks 'gnus-server-mode-hook))
(defun gnus-server-insert-server-line (gnus-tmp-name method)
(let* ((gnus-tmp-how (car method))
@@ -849,7 +850,7 @@ buffer.
(setq truncate-lines t)
(gnus-set-default-directory)
(setq buffer-read-only t)
- (gnus-run-hooks 'gnus-browse-mode-hook))
+ (gnus-run-mode-hooks 'gnus-browse-mode-hook))
(defun gnus-browse-read-group (&optional no-article number)
"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."
(cond
((looking-at "[0-9]+")
;; We narrow and read a number instead of buffer-substring/
- ;; string-to-int because it's faster. narrow/widen is
+ ;; string-to-number because it's faster. narrow/widen is
;; faster than save-restriction/narrow, and save-restriction
;; produces a garbage object.
(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:
(make-local-variable 'gnus-summary-mark-positions)
(gnus-make-local-hook 'pre-command-hook)
(add-hook 'pre-command-hook 'gnus-set-global-variables nil t)
- (gnus-run-hooks 'gnus-summary-mode-hook)
+ (gnus-run-mode-hooks 'gnus-summary-mode-hook)
(turn-on-gnus-mailing-list-mode)
(mm-enable-multibyte)
(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."
(match-end 1)))
(substring xrefs (match-beginning 1) (match-end 1))))
(setq number
- (string-to-int (substring xrefs (match-beginning 2)
+ (string-to-number (substring xrefs (match-beginning 2)
(match-end 2))))
(if (setq entry (gnus-gethash group xref-hashtb))
(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."
(save-current-buffer
(apply 'run-hooks funcs)))
+(defun gnus-run-mode-hooks (&rest funcs)
+ "Run `run-mode-hooks' if it is available, otherwise `run-hooks'.
+This function saves the current buffer."
+ (if (fboundp 'run-mode-hooks)
+ (save-current-buffer (apply 'run-mode-hooks funcs))
+ (save-current-buffer (apply 'run-hooks funcs))))
+
;;; Various
(defvar gnus-group-buffer) ; Compiler directive
@@ -1564,6 +1571,11 @@ empty directories from OLD-PATH."
(file-truename
(concat old-dir "..")))))))))
+(if (fboundp 'set-process-query-on-exit-flag)
+ (defalias 'gnus-set-process-query-on-exit-flag
+ 'set-process-query-on-exit-flag)
+ (defalias 'gnus-set-process-query-on-exit-flag
+ 'process-kill-without-query))
(provide 'gnus-util)
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."
(ignore-errors
(replace-match
(format "%06d"
- (string-to-int (buffer-substring
+ (string-to-number (buffer-substring
(match-beginning 0) (match-end 0)))))))
(setq string (buffer-substring 1 (point-max)))
(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."
(:foreground "ForestGreen" :bold t))
(t
()))
- "Level 1 newsgroup face.")
+ "Level 1 newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-1-empty-face
'((((class color)
@@ -377,7 +378,8 @@ be set in `.emacs' instead."
(:foreground "ForestGreen"))
(t
()))
- "Level 1 empty newsgroup face.")
+ "Level 1 empty newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-2-face
'((((class color)
@@ -388,7 +390,8 @@ be set in `.emacs' instead."
(:foreground "CadetBlue4" :bold t))
(t
()))
- "Level 2 newsgroup face.")
+ "Level 2 newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-2-empty-face
'((((class color)
@@ -399,7 +402,8 @@ be set in `.emacs' instead."
(:foreground "CadetBlue4"))
(t
()))
- "Level 2 empty newsgroup face.")
+ "Level 2 empty newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-3-face
'((((class color)
@@ -410,7 +414,8 @@ be set in `.emacs' instead."
(:bold t))
(t
()))
- "Level 3 newsgroup face.")
+ "Level 3 newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-3-empty-face
'((((class color)
@@ -421,7 +426,8 @@ be set in `.emacs' instead."
())
(t
()))
- "Level 3 empty newsgroup face.")
+ "Level 3 empty newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-4-face
'((((class color)
@@ -432,7 +438,8 @@ be set in `.emacs' instead."
(:bold t))
(t
()))
- "Level 4 newsgroup face.")
+ "Level 4 newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-4-empty-face
'((((class color)
@@ -443,7 +450,8 @@ be set in `.emacs' instead."
())
(t
()))
- "Level 4 empty newsgroup face.")
+ "Level 4 empty newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-5-face
'((((class color)
@@ -454,7 +462,8 @@ be set in `.emacs' instead."
(:bold t))
(t
()))
- "Level 5 newsgroup face.")
+ "Level 5 newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-5-empty-face
'((((class color)
@@ -465,7 +474,8 @@ be set in `.emacs' instead."
())
(t
()))
- "Level 5 empty newsgroup face.")
+ "Level 5 empty newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-6-face
'((((class color)
@@ -476,7 +486,8 @@ be set in `.emacs' instead."
(:bold t))
(t
()))
- "Level 6 newsgroup face.")
+ "Level 6 newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-6-empty-face
'((((class color)
@@ -487,7 +498,8 @@ be set in `.emacs' instead."
())
(t
()))
- "Level 6 empty newsgroup face.")
+ "Level 6 empty newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-low-face
'((((class color)
@@ -498,7 +510,8 @@ be set in `.emacs' instead."
(:foreground "DarkGreen" :bold t))
(t
()))
- "Low level newsgroup face.")
+ "Low level newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-news-low-empty-face
'((((class color)
@@ -509,7 +522,8 @@ be set in `.emacs' instead."
(:foreground "DarkGreen"))
(t
()))
- "Low level empty newsgroup face.")
+ "Low level empty newsgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-1-face
'((((class color)
@@ -520,7 +534,8 @@ be set in `.emacs' instead."
(:foreground "DeepPink3" :bold t))
(t
(:bold t)))
- "Level 1 mailgroup face.")
+ "Level 1 mailgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-1-empty-face
'((((class color)
@@ -531,7 +546,8 @@ be set in `.emacs' instead."
(:foreground "DeepPink3"))
(t
(:italic t :bold t)))
- "Level 1 empty mailgroup face.")
+ "Level 1 empty mailgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-2-face
'((((class color)
@@ -542,7 +558,8 @@ be set in `.emacs' instead."
(:foreground "HotPink3" :bold t))
(t
(:bold t)))
- "Level 2 mailgroup face.")
+ "Level 2 mailgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-2-empty-face
'((((class color)
@@ -553,7 +570,8 @@ be set in `.emacs' instead."
(:foreground "HotPink3"))
(t
(:bold t)))
- "Level 2 empty mailgroup face.")
+ "Level 2 empty mailgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-3-face
'((((class color)
@@ -564,7 +582,8 @@ be set in `.emacs' instead."
(:foreground "magenta4" :bold t))
(t
(:bold t)))
- "Level 3 mailgroup face.")
+ "Level 3 mailgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-3-empty-face
'((((class color)
@@ -575,7 +594,8 @@ be set in `.emacs' instead."
(:foreground "magenta4"))
(t
()))
- "Level 3 empty mailgroup face.")
+ "Level 3 empty mailgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-low-face
'((((class color)
@@ -586,7 +606,8 @@ be set in `.emacs' instead."
(:foreground "DeepPink4" :bold t))
(t
(:bold t)))
- "Low level mailgroup face.")
+ "Low level mailgroup face."
+ :group 'gnus-group)
(defface gnus-group-mail-low-empty-face
'((((class color)
@@ -597,18 +618,21 @@ be set in `.emacs' instead."
(:foreground "DeepPink4"))
(t
(:bold t)))
- "Low level empty mailgroup face.")
+ "Low level empty mailgroup face."
+ :group 'gnus-group)
;; Summary mode faces.
(defface gnus-summary-selected-face '((t
(:underline t)))
- "Face used for selected articles.")
+ "Face used for selected articles."
+ :group 'gnus-summary)
(defface gnus-summary-cancelled-face
'((((class color))
(:foreground "yellow" :background "black")))
- "Face used for cancelled articles.")
+ "Face used for cancelled articles."
+ :group 'gnus-summary)
(defface gnus-summary-high-ticked-face
'((((class color)
@@ -619,7 +643,8 @@ be set in `.emacs' instead."
(:foreground "firebrick" :bold t))
(t
(:bold t)))
- "Face used for high interest ticked articles.")
+ "Face used for high interest ticked articles."
+ :group 'gnus-summary)
(defface gnus-summary-low-ticked-face
'((((class color)
@@ -630,7 +655,8 @@ be set in `.emacs' instead."
(:foreground "firebrick" :italic t))
(t
(:italic t)))
- "Face used for low interest ticked articles.")
+ "Face used for low interest ticked articles."
+ :group 'gnus-summary)
(defface gnus-summary-normal-ticked-face
'((((class color)
@@ -641,7 +667,8 @@ be set in `.emacs' instead."
(:foreground "firebrick"))
(t
()))
- "Face used for normal interest ticked articles.")
+ "Face used for normal interest ticked articles."
+ :group 'gnus-summary)
(defface gnus-summary-high-ancient-face
'((((class color)
@@ -652,7 +679,8 @@ be set in `.emacs' instead."
(:foreground "RoyalBlue" :bold t))
(t
(:bold t)))
- "Face used for high interest ancient articles.")
+ "Face used for high interest ancient articles."
+ :group 'gnus-summary)
(defface gnus-summary-low-ancient-face
'((((class color)
@@ -663,7 +691,8 @@ be set in `.emacs' instead."
(:foreground "RoyalBlue" :italic t))
(t
(:italic t)))
- "Face used for low interest ancient articles.")
+ "Face used for low interest ancient articles."
+ :group 'gnus-summary)
(defface gnus-summary-normal-ancient-face
'((((class color)
@@ -674,7 +703,8 @@ be set in `.emacs' instead."
(:foreground "RoyalBlue"))
(t
()))
- "Face used for normal interest ancient articles.")
+ "Face used for normal interest ancient articles."
+ :group 'gnus-summary)
(defface gnus-summary-high-undownloaded-face
'((((class color)
@@ -683,7 +713,8 @@ be set in `.emacs' instead."
(((class color) (background dark))
(:bold t :foreground "LightGray"))
(t (:inverse-video t :bold t)))
- "Face used for high interest uncached articles.")
+ "Face used for high interest uncached articles."
+ :group 'gnus-summary)
(defface gnus-summary-low-undownloaded-face
'((((class color)
@@ -692,7 +723,8 @@ be set in `.emacs' instead."
(((class color) (background dark))
(:italic t :foreground "LightGray" :bold nil))
(t (:inverse-video t :italic t)))
- "Face used for low interest uncached articles.")
+ "Face used for low interest uncached articles."
+ :group 'gnus-summary)
(defface gnus-summary-normal-undownloaded-face
'((((class color)
@@ -701,22 +733,26 @@ be set in `.emacs' instead."
(((class color) (background dark))
(:foreground "LightGray" :bold nil))
(t (:inverse-video t)))
- "Face used for normal interest uncached articles.")
+ "Face used for normal interest uncached articles."
+ :group 'gnus-summary)
(defface gnus-summary-high-unread-face
'((t
(:bold t)))
- "Face used for high interest unread articles.")
+ "Face used for high interest unread articles."
+ :group 'gnus-summary)
(defface gnus-summary-low-unread-face
'((t
(:italic t)))
- "Face used for low interest unread articles.")
+ "Face used for low interest unread articles."
+ :group 'gnus-summary)
(defface gnus-summary-normal-unread-face
'((t
()))
- "Face used for normal interest unread articles.")
+ "Face used for normal interest unread articles."
+ :group 'gnus-summary)
(defface gnus-summary-high-read-face
'((((class color)
@@ -729,7 +765,8 @@ be set in `.emacs' instead."
:bold t))
(t
(:bold t)))
- "Face used for high interest read articles.")
+ "Face used for high interest read articles."
+ :group 'gnus-summary)
(defface gnus-summary-low-read-face
'((((class color)
@@ -742,7 +779,8 @@ be set in `.emacs' instead."
:italic t))
(t
(:italic t)))
- "Face used for low interest read articles.")
+ "Face used for low interest read articles."
+ :group 'gnus-summary)
(defface gnus-summary-normal-read-face
'((((class color)
@@ -753,7 +791,8 @@ be set in `.emacs' instead."
(:foreground "DarkGreen"))
(t
()))
- "Face used for normal interest read articles.")
+ "Face used for normal interest read articles."
+ :group 'gnus-summary)
;;;
@@ -806,7 +845,8 @@ be set in `.emacs' instead."
(:foreground "#888888"))
(t
()))
- "Face for the splash screen.")
+ "Face for the splash screen."
+ :group 'gnus)
(defun gnus-splash ()
(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 @@
;;; html2text.el --- a simple html to plain text converter
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Joakim Hove <hove@phys.ntnu.no>
@@ -374,7 +374,8 @@ formatting, and then moved afterward.")
fashion, quite close to pure guess-work. It does work in some cases though."
(interactive)
(goto-char (point-min))
- (replace-regexp "^<br>$" "")
+ (while (re-search-forward "^<br>$" nil t)
+ (delete-region (match-beginning 0) (match-end 0)))
;; Removing lonely <br> on a single line, if they are left intact we
;; dont have any paragraphs at all.
(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'."
(let* ((port (or port imap-default-ssl-port))
(coding-system-for-read imap-coding-system-for-read)
(coding-system-for-write imap-coding-system-for-write)
- (process-connection-type nil)
+ (process-connection-type imap-process-connection-type)
+ (set-process-query-on-exit-flag
+ (if (fboundp 'set-process-query-on-exit-flag)
+ 'set-process-query-on-exit-flag
+ 'process-kill-without-query))
process)
(when (progn
(setq process (start-process
@@ -650,7 +654,7 @@ sure of changing the value of `foo'."
(format-spec-make
?s server
?p (number-to-string port)))))
- (process-kill-without-query process)
+ (funcall set-process-query-on-exit-flag process nil)
process)
(with-current-buffer buffer
(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."
(set-keymap-parent map minibuffer-local-map)
map)
"Keymap for `message-read-from-minibuffer'."
- :version "22.1")
+ :version "22.1"
+ :group 'message-various)
;;;###autoload
(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,
`find-file-hooks', etc.
If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'.
This function ensures that none of these modifications will take place."
- (let ((format-alist nil)
- (auto-mode-alist (if inhibit nil (mm-auto-mode-alist)))
- (default-major-mode 'fundamental-mode)
- (enable-local-variables nil)
- (after-insert-file-functions nil)
- (enable-local-eval nil)
- (find-file-hooks nil)
- (inhibit-file-name-operation (if inhibit
- 'insert-file-contents
- inhibit-file-name-operation))
- (inhibit-file-name-handlers
- (if inhibit
- (append mm-inhibit-file-name-handlers
- inhibit-file-name-handlers)
- inhibit-file-name-handlers)))
- (insert-file-contents filename visit beg end replace)))
+ (let* ((format-alist nil)
+ (auto-mode-alist (if inhibit nil (mm-auto-mode-alist)))
+ (default-major-mode 'fundamental-mode)
+ (enable-local-variables nil)
+ (after-insert-file-functions nil)
+ (enable-local-eval nil)
+ (inhibit-file-name-operation (if inhibit
+ 'insert-file-contents
+ inhibit-file-name-operation))
+ (inhibit-file-name-handlers
+ (if inhibit
+ (append mm-inhibit-file-name-handlers
+ inhibit-file-name-handlers)
+ inhibit-file-name-handlers))
+ (ffh (if (boundp 'find-file-hook)
+ 'find-file-hook
+ 'find-file-hooks))
+ (val (symbol-value ffh)))
+ (set ffh nil)
+ (unwind-protect
+ (insert-file-contents filename visit beg end replace)
+ (set ffh val))))
(defun mm-append-to-file (start end filename &optional codesys inhibit)
"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 @@
;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML
-;; Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005
+;; Free Software Foundation, Inc.
;; Author: Sascha Lüdecke <sascha@meta-x.de>,
;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue)
@@ -219,8 +220,10 @@
;; pgg wrapper
-(defvar pgg-output-buffer)
-(defvar pgg-errors-buffer)
+(eval-when-compile
+ (defvar pgg-default-user-id)
+ (defvar pgg-errors-buffer)
+ (defvar pgg-output-buffer))
(defun mml1991-pgg-sign (cont)
(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 @@
;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP)
-;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
+;; Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: PGP MIME MML
@@ -632,6 +633,7 @@
;;; pgg wrapper
(eval-when-compile
+ (defvar pgg-default-user-id)
(defvar pgg-errors-buffer)
(defvar pgg-output-buffer))
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 @@
(when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) "
nil t)
(cons (buffer-substring (match-beginning 1) (match-end 1))
- (string-to-int
+ (string-to-number
(buffer-substring (match-beginning 2) (match-end 2)))))))
(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")
;; otherwise, pull all of the following numbers into the list
(re-search-forward "follows\r?\n?" nil t)
(while (re-search-forward "^[0-9]+$" nil t)
- (push (string-to-int (match-string 0)) list)))
+ (push (string-to-number (match-string 0)) list)))
list))
(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.")
(nnheader-report 'nndiary "Article %s retrieved" id)
;; We return the article number.
(cons (if group-num (car group-num) group)
- (string-to-int (file-name-nondirectory path)))))))
+ (string-to-number (file-name-nondirectory path)))))))
(deffoo nndiary-request-group (group &optional server dont-check)
(let ((file-name-coding-system nnmail-pathname-coding-system))
@@ -820,7 +820,7 @@ all. This may very well take some time.")
;; we should insert it. (This situation should never
;; occur, but one likes to make sure...)
(while (and (looking-at "[0-9]+\t")
- (< (string-to-int
+ (< (string-to-number
(buffer-substring
(match-beginning 0) (match-end 0)))
article)
@@ -1281,14 +1281,14 @@ all. This may very well take some time.")
(nnheader-article-to-file-alist nndiary-current-directory))))
-(defun nndiary-string-to-int (str min &optional max)
- ;; Like `string-to-int' but barf if STR is not exactly an integer, and not
+(defun nndiary-string-to-number (str min &optional max)
+ ;; Like `string-to-number' but barf if STR is not exactly an integer, and not
;; within the specified bounds.
;; Signals are caught by `nndiary-schedule'.
(if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str))
(nndiary-error "not an integer value")
;; else
- (let ((val (string-to-int str)))
+ (let ((val (string-to-number str)))
(and (or (< val min)
(and max (> val max)))
(nndiary-error "value out of range"))
@@ -1315,12 +1315,12 @@ all. This may very well take some time.")
(let ((res (split-string val "-")))
(cond
((= (length res) 1)
- (nndiary-string-to-int (car res) min-or-values max))
+ (nndiary-string-to-number (car res) min-or-values max))
((= (length res) 2)
;; don't know if crontab accepts this, but ensure
;; that BEG is <= END
- (let ((beg (nndiary-string-to-int (car res) min-or-values max))
- (end (nndiary-string-to-int (cadr res) min-or-values max)))
+ (let ((beg (nndiary-string-to-number (car res) min-or-values max))
+ (end (nndiary-string-to-number (cadr res) min-or-values max)))
(cond ((< beg end)
(cons beg end))
((= 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.")
(search-forward "\n\n" beg t)
(re-search-backward
"^Content-Length:[ \t]*\\([0-9]+\\) *$" end t)
- (setq len (string-to-int (match-string 1)))
+ (setq len (string-to-number (match-string 1)))
(search-forward "\n\n" beg t)
(unless (= (setq len (+ (point) len)) (point-max))
(and (< len (point-max))
@@ -444,7 +444,7 @@ from the document.")
(defun nndoc-rnews-body-end ()
(and (re-search-backward nndoc-article-begin nil t)
(forward-line 1)
- (goto-char (+ (point) (string-to-int (match-string 1))))))
+ (goto-char (+ (point) (string-to-number (match-string 1))))))
(defun nndoc-babyl-type-p ()
(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 @@
;;; nndraft.el --- draft article access for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -174,8 +174,11 @@
(setq buffer-file-name (expand-file-name file)
buffer-auto-save-file-name (make-auto-save-file-name))
(clear-visited-file-modtime)
- (make-local-variable 'write-contents-hooks)
- (push 'nndraft-generate-headers write-contents-hooks)
+ (let ((hook (if (boundp 'write-contents-functions)
+ 'write-contents-functions
+ 'write-contents-hooks)))
+ (gnus-make-local-hook hook)
+ (add-hook hook 'nndraft-generate-headers nil t))
article))
(deffoo nndraft-request-group (group &optional server dont-check)
@@ -185,7 +188,7 @@
(file-name-coding-system nnmail-pathname-coding-system)
dir file)
(nnheader-re-read-dir pathname)
- (setq dir (mapcar (lambda (name) (string-to-int (substring name 1)))
+ (setq dir (mapcar (lambda (name) (string-to-number (substring name 1)))
(ignore-errors (directory-files
pathname nil "^#[0-9]+#$" t))))
(dolist (n dir)
@@ -293,7 +296,7 @@
"Return the list of messages in the group."
(gnus-make-directory nndraft-current-directory)
(sort
- (mapcar 'string-to-int
+ (mapcar 'string-to-number
(directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t))
'<))
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.")
(when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t)
(concat "From: " (match-string 0) "\n"))))
(nneething-from-line (nth 2 atts) file))
- (if (> (string-to-int (int-to-string (nth 7 atts))) 0)
+ (if (> (string-to-number (int-to-string (nth 7 atts))) 0)
(concat "Chars: " (int-to-string (nth 7 atts)) "\n")
"")
(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.")
((search-backward (concat "\n" nnfolder-article-marker)
nil t)
(goto-char (match-end 0))
- (setq num (string-to-int
+ (setq num (string-to-number
(buffer-substring
(point) (gnus-point-at-eol))))
(goto-char start)
@@ -210,7 +210,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
(search-forward (concat "\n" nnfolder-article-marker)
nil t)
(progn
- (setq num (string-to-int
+ (setq num (string-to-number
(buffer-substring
(point) (gnus-point-at-eol))))
(> num article))
@@ -285,7 +285,7 @@ the group. Then the marks file will be regenerated properly by Gnus.")
(cons nnfolder-current-group
(if (search-forward (concat "\n" nnfolder-article-marker)
nil t)
- (string-to-int (buffer-substring
+ (string-to-number (buffer-substring
(point) (gnus-point-at-eol)))
-1))))))))
@@ -875,6 +875,7 @@ deleted. Point is left where the deleted region was."
nnfolder-file-coding-system))
(nnheader-find-file-noselect file t)))))
(mm-enable-multibyte) ;; Use multibyte buffer for future copying.
+ (buffer-disable-undo)
(if (equal (cadr (assoc group nnfolder-scantime-alist))
(nth 5 (file-attributes file)))
;; 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."
maxid start end newscantime
novbuf articles newnum
buffer-read-only)
- (buffer-disable-undo)
(setq maxid (cdr active))
(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 @@
;;; nnheader.el --- header access macros for Gnus and its backends
;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
-;; 1997, 1998, 2000, 2001, 2002, 2003, 2004
+;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -683,9 +683,9 @@ the line could be found."
(defsubst nnheader-file-to-number (file)
"Take a FILE name and return the article number."
(if (string= nnheader-numerical-short-files "^[0-9]+$")
- (string-to-int file)
+ (string-to-number file)
(string-match nnheader-numerical-short-files file)
- (string-to-int (match-string 0 file))))
+ (string-to-number (match-string 0 file))))
(defvar nnheader-directory-files-is-safe
(or (eq system-type 'windows-nt)
@@ -953,15 +953,21 @@ find-file-hooks, etc.
(defun nnheader-find-file-noselect (&rest args)
"Open a file with some variables bound.
See `find-file-noselect' for the arguments."
- (let ((format-alist nil)
- (auto-mode-alist (mm-auto-mode-alist))
- (default-major-mode 'fundamental-mode)
- (enable-local-variables nil)
- (after-insert-file-functions nil)
- (enable-local-eval nil)
- (find-file-hooks nil)
- (coding-system-for-read nnheader-file-coding-system))
- (apply 'find-file-noselect args)))
+ (let* ((format-alist nil)
+ (auto-mode-alist (mm-auto-mode-alist))
+ (default-major-mode 'fundamental-mode)
+ (enable-local-variables nil)
+ (after-insert-file-functions nil)
+ (enable-local-eval nil)
+ (coding-system-for-read nnheader-file-coding-system)
+ (ffh (if (boundp 'find-file-hook)
+ 'find-file-hook
+ 'find-file-hooks))
+ (val (symbol-value ffh)))
+ (set ffh nil)
+ (unwind-protect
+ (apply 'find-file-noselect args)
+ (set ffh val))))
(defun nnheader-directory-regular-files (dir)
"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 @@
(error "nnkiboze: No xref"))
(unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref)
(error "nnkiboze: Malformed xref"))
- (setq num (string-to-int (match-string 2 xref))
+ (setq num (string-to-number (match-string 2 xref))
group (match-string 1 xref))
(or (with-current-buffer buffer
(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."
(if (not (save-excursion
(and (re-search-backward
"^Content-Length:[ \t]*\\([0-9]+\\)" start t)
- (setq content-length (string-to-int
+ (setq content-length (string-to-number
(buffer-substring
(match-beginning 1)
(match-end 1))))
@@ -906,7 +906,7 @@ If SOURCE is a directory spec, try to return the group name component."
(if (not (re-search-forward
"^Content-Length:[ \t]*\\([0-9]+\\)" nil t))
(setq content-length nil)
- (setq content-length (string-to-int (match-string 1)))
+ (setq content-length (string-to-number (match-string 1)))
;; We destroy the header, since none of the backends ever
;; use it, and we do not want to confuse other mailers by
;; 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 @@
(when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) "
nil t)
(cons (buffer-substring (match-beginning 1) (match-end 1))
- (string-to-int
+ (string-to-number
(buffer-substring (match-beginning 2) (match-end 2)))))))
(defun nnmbox-in-header-p (pos)
@@ -681,7 +681,7 @@
(let (alist)
(while (re-search-forward " \\([^:]+\\):\\([0-9]+\\)" end-header t)
(push (cons (match-string 1)
- (string-to-int (match-string 2))) alist))
+ (string-to-number (match-string 2))) alist))
(nnmbox-insert-newsgroup-line alist))
;; this is really a new article
(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.")
(file-exists-p file)
(not (file-directory-p file))
(save-excursion (nnmail-find-file file))
- (string-to-int (file-name-nondirectory file)))))
+ (string-to-number (file-name-nondirectory file)))))
(deffoo nnmh-request-group (group &optional server dont-check)
(nnheader-init-server-buffer)
@@ -176,7 +176,7 @@ as unread by Gnus.")
(nnheader-re-read-dir pathname)
(setq dir
(sort
- (mapcar (lambda (name) (string-to-int name))
+ (mapcar (lambda (name) (string-to-number name))
(directory-files pathname nil "^[0-9]+$" t))
'<))
(cond
@@ -224,7 +224,7 @@ as unread by Gnus.")
;; For each directory, generate an active file line.
(unless (string= (expand-file-name nnmh-toplev) dir)
(let ((files (mapcar
- (lambda (name) (string-to-int name))
+ (lambda (name) (string-to-number name))
(directory-files dir nil "^[0-9]+$" t))))
(when files
(save-excursion
@@ -358,7 +358,7 @@ as unread by Gnus.")
(nnmh-possibly-change-directory group server)
(let ((articles (mapcar
(lambda (file)
- (string-to-int file))
+ (string-to-number file))
(directory-files
nnmh-current-directory nil "^[0-9]+$"))))
(when articles
@@ -486,7 +486,7 @@ as unread by Gnus.")
(let ((files (sort
(mapcar
(lambda (f)
- (string-to-int f))
+ (string-to-number f))
(directory-files dir nil "^[0-9]+$"))
'>)))
(when files
@@ -509,7 +509,7 @@ as unread by Gnus.")
;; articles in this folder. The articles that are "new" will be
;; marked as unread by Gnus.
(let* ((dir nnmh-current-directory)
- (files (sort (mapcar (function (lambda (name) (string-to-int name)))
+ (files (sort (mapcar (function (lambda (name) (string-to-number name)))
(directory-files nnmh-current-directory
nil "^[0-9]+$" t))
'<))
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.")
(nnheader-report 'nnml "Article %s retrieved" id)
;; We return the article number.
(cons (if group-num (car group-num) group)
- (string-to-int (file-name-nondirectory path)))))))
+ (string-to-number (file-name-nondirectory path)))))))
(deffoo nnml-request-group (group &optional server dont-check)
(let ((file-name-coding-system nnmail-pathname-coding-system))
@@ -426,7 +426,7 @@ marks file will be regenerated properly by Gnus.")
;; we should insert it. (This situation should never
;; occur, but one likes to make sure...)
(while (and (looking-at "[0-9]+\t")
- (< (string-to-int
+ (< (string-to-number
(buffer-substring
(match-beginning 0) (match-end 0)))
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'."
(selection
(mapcar (lambda (listinfo)
(cons (cdr (assoc "sitename" listinfo))
- (string-to-int
+ (string-to-number
(cdr (assoc "feedid" listinfo)))))
feedinfo)))
(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.")
(let ((files (sort (directory-files nnsoup-directory t "IDX$")
(lambda (f1 f2)
(< (progn (string-match "/\\([0-9]+\\)\\." f1)
- (string-to-int (match-string 1 f1)))
+ (string-to-number (match-string 1 f1)))
(progn (string-match "/\\([0-9]+\\)\\." f2)
- (string-to-int (match-string 1 f2)))))))
+ (string-to-number (match-string 1 f2)))))))
active group lines ident elem min)
(set-buffer (get-buffer-create " *nnsoup work*"))
(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.")
;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu>
(when (setq dir (directory-files pathname nil "^[0-9]+$" t))
(setq dir
- (sort (mapcar (lambda (name) (string-to-int name)) dir) '<)))
+ (sort (mapcar (lambda (name) (string-to-number name)) dir) '<)))
(if dir
(nnheader-insert
"211 %d %d %d %s\n" (length dir) (car dir)
@@ -440,7 +440,7 @@ there.")
(goto-char (point-min))
(prog1
(when (looking-at "<[^>]+>[ \t]+[-0-9~]+[ \t]+\\([^ /\t\n]+\\)/\\([0-9]+\\)[ \t\n]")
- (cons (match-string 1) (string-to-int (match-string 2))))
+ (cons (match-string 1) (string-to-number (match-string 2))))
(kill-buffer (current-buffer)))))
(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'."
(nntp-kill-buffer pbuffer))
(when (and (buffer-name pbuffer)
process)
- (process-kill-without-query process)
+ (gnus-set-process-query-on-exit-flag process nil)
(if (and (nntp-wait-for process "^2.*\n" buffer nil t)
(memq (process-status process) '(open run)))
(prog1
@@ -1162,7 +1162,7 @@ password contained in '~/.nntp-authinfo'."
(format-spec-make
?s nntp-address
?p nntp-port-number)))))
- (process-kill-without-query proc)
+ (gnus-set-process-query-on-exit-flag proc nil)
(save-excursion
(set-buffer buffer)
(let ((nntp-connection-alist (list proc buffer nil)))
@@ -1173,7 +1173,7 @@ password contained in '~/.nntp-authinfo'."
(defun nntp-open-tls-stream (buffer)
(let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number)))
- (process-kill-without-query proc)
+ (gnus-set-process-query-on-exit-flag proc nil)
(save-excursion
(set-buffer buffer)
(let ((nntp-connection-alist (list proc buffer nil)))
@@ -1499,7 +1499,7 @@ password contained in '~/.nntp-authinfo'."
(when (<= count 1)
(goto-char (point-min))
(when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t)
- (let ((low-limit (string-to-int
+ (let ((low-limit (string-to-number
(buffer-substring (match-beginning 1)
(match-end 1)))))
(while (and articles (<= (car articles) low-limit))
@@ -1571,7 +1571,7 @@ password contained in '~/.nntp-authinfo'."
(goto-char (point-min))
;; We first find the number by looking at the status line.
(let ((number (and (looking-at "2[0-9][0-9] +\\([0-9]+\\) ")
- (string-to-int
+ (string-to-number
(buffer-substring (match-beginning 1)
(match-end 1)))))
newsgroups xref)
@@ -1609,7 +1609,7 @@ password contained in '~/.nntp-authinfo'."
"\\([^ :]+\\):\\([0-9]+\\)")
xref))
(setq group (match-string 1 xref)
- number (string-to-int (match-string 2 xref))))
+ number (string-to-number (match-string 2 xref))))
((and (setq newsgroups
(mail-fetch-field "newsgroups"))
(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."
(when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t)
(setq status (buffer-substring (match-end 0)
(progn (end-of-line)(point)))
- status (vconcat (mapcar #'string-to-int (split-string status))))
+ status (vconcat (mapcar #'string-to-number (split-string status))))
(erase-buffer)
(insert (format "Imported %d key(s).
\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 @@
`(mapconcat (lambda (c) (format "%02X" (pgg-char-int c)))
,string "")
;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x"
- ;; (string-to-int-list ,string)))
+ ;; (string-to-number-list ,string)))
)
(defmacro pgg-parse-time-field (bytes)
@@ -136,7 +136,7 @@
(defmacro pgg-read-bytes (nbytes)
`(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes))
- ;; `(string-to-int-list (pgg-read-bytes-string ,nbytes))
+ ;; `(string-to-number-list (pgg-read-bytes-string ,nbytes))
)
(defmacro pgg-read-body-string (ptag)
@@ -146,7 +146,7 @@
(defmacro pgg-read-body (ptag)
`(mapcar #'pgg-char-int (pgg-read-body-string ,ptag))
- ;; `(string-to-int-list (pgg-read-body-string ,ptag))
+ ;; `(string-to-number-list (pgg-read-body-string ,ptag))
)
(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 @@
;;; pgg.el --- glue for the various PGP implementations.
-;; Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/10/28
@@ -97,82 +97,76 @@
(read-passwd prompt)))
(eval-when-compile
- (defvar itimer-process)
- (defvar itimer-timer)
- (autoload 'delete-itimer "itimer")
- (autoload 'itimer-driver-start "itimer")
- (autoload 'itimer-value "itimer")
- (autoload 'set-itimer-function "itimer")
- (autoload 'set-itimer-function-arguments "itimer")
- (autoload 'set-itimer-restart "itimer")
- (autoload 'start-itimer "itimer"))
+ (defmacro pgg-run-at-time-1 (time repeat function args)
+ (when (featurep 'xemacs)
+ (if (condition-case nil
+ (let ((delete-itimer 'delete-itimer)
+ (itimer-driver-start 'itimer-driver-start)
+ (itimer-value 'itimer-value)
+ (start-itimer 'start-itimer))
+ (unless (or (symbol-value 'itimer-process)
+ (symbol-value 'itimer-timer))
+ (funcall itimer-driver-start))
+ ;; Check whether there is a bug to which the difference of
+ ;; the present time and the time when the itimer driver was
+ ;; woken up is subtracted from the initial itimer value.
+ (let* ((inhibit-quit t)
+ (ctime (current-time))
+ (itimer-timer-last-wakeup
+ (prog1
+ ctime
+ (setcar ctime (1- (car ctime)))))
+ (itimer-list nil)
+ (itimer (funcall start-itimer "pgg-run-at-time"
+ 'ignore 5)))
+ (sleep-for 0.1) ;; Accept the timeout interrupt.
+ (prog1
+ (> (funcall itimer-value itimer) 0)
+ (funcall delete-itimer itimer))))
+ (error nil))
+ `(let ((time ,time))
+ (apply #'start-itimer "pgg-run-at-time"
+ ,function (if time (max time 1e-9) 1e-9)
+ ,repeat nil t ,args)))
+ `(let ((time ,time)
+ (itimers (list nil)))
+ (setcar
+ itimers
+ (apply #'start-itimer "pgg-run-at-time"
+ (lambda (itimers repeat function &rest args)
+ (let ((itimer (car itimers)))
+ (if repeat
+ (progn
+ (set-itimer-function
+ itimer
+ (lambda (itimer repeat function &rest args)
+ (set-itimer-restart itimer repeat)
+ (set-itimer-function itimer function)
+ (set-itimer-function-arguments itimer args)
+ (apply function args)))
+ (set-itimer-function-arguments
+ itimer
+ (append (list itimer repeat function) args)))
+ (set-itimer-function
+ itimer
+ (lambda (itimer function &rest args)
+ (delete-itimer itimer)
+ (apply function args)))
+ (set-itimer-function-arguments
+ itimer
+ (append (list itimer function) args)))))
+ 1e-9 (if time (max time 1e-9) 1e-9)
+ nil t itimers ,repeat ,function ,args))))))
(eval-and-compile
- (defalias
- 'pgg-run-at-time
- (if (featurep 'xemacs)
- (if (condition-case nil
- (progn
- (unless (or itimer-process itimer-timer)
- (itimer-driver-start))
- ;; Check whether there is a bug to which the difference of
- ;; the present time and the time when the itimer driver was
- ;; woken up is subtracted from the initial itimer value.
- (let* ((inhibit-quit t)
- (ctime (current-time))
- (itimer-timer-last-wakeup
- (prog1
- ctime
- (setcar ctime (1- (car ctime)))))
- (itimer-list nil)
- (itimer (start-itimer "pgg-run-at-time" 'ignore 5)))
- (sleep-for 0.1) ;; Accept the timeout interrupt.
- (prog1
- (> (itimer-value itimer) 0)
- (delete-itimer itimer))))
- (error nil))
- (lambda (time repeat function &rest args)
- "Emulating function run as `run-at-time'.
+ (if (featurep 'xemacs)
+ (defun pgg-run-at-time (time repeat function &rest args)
+ "Emulating function run as `run-at-time'.
TIME should be nil meaning now, or a number of seconds from now.
Return an itimer object which can be used in either `delete-itimer'
or `cancel-timer'."
- (apply #'start-itimer "pgg-run-at-time"
- function (if time (max time 1e-9) 1e-9)
- repeat nil t args))
- (lambda (time repeat function &rest args)
- "Emulating function run as `run-at-time' in the right way.
-TIME should be nil meaning now, or a number of seconds from now.
-Return an itimer object which can be used in either `delete-itimer'
-or `cancel-timer'."
- (let ((itimers (list nil)))
- (setcar
- itimers
- (apply #'start-itimer "pgg-run-at-time"
- (lambda (itimers repeat function &rest args)
- (let ((itimer (car itimers)))
- (if repeat
- (progn
- (set-itimer-function
- itimer
- (lambda (itimer repeat function &rest args)
- (set-itimer-restart itimer repeat)
- (set-itimer-function itimer function)
- (set-itimer-function-arguments itimer args)
- (apply function args)))
- (set-itimer-function-arguments
- itimer
- (append (list itimer repeat function) args)))
- (set-itimer-function
- itimer
- (lambda (itimer function &rest args)
- (delete-itimer itimer)
- (apply function args)))
- (set-itimer-function-arguments
- itimer
- (append (list itimer function) args)))))
- 1e-9 (if time (max time 1e-9) 1e-9)
- nil t itimers repeat function args)))))
- 'run-at-time)))
+ (pgg-run-at-time-1 time repeat function args))
+ (defalias 'pgg-run-at-time 'run-at-time)))
(defun pgg-add-passphrase-cache (key passphrase)
(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 @@
;;; pop3.el --- Post Office Protocol (RFC 1460) interface
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;; 2005
;; Free Software Foundation, Inc.
;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
@@ -348,21 +349,36 @@ If NOW, use that time instead."
;; AUTHORIZATION STATE
+(eval-when-compile
+ (if (not (fboundp 'md5)) ;; Emacs 20
+ (defalias 'md5 'ignore)))
+
(eval-and-compile
- (if (fboundp 'md5)
- (defalias 'pop3-md5 'md5)
+ (if (and (fboundp 'md5)
+ ;; There might be an incompatible implementation.
+ (condition-case nil
+ (md5 "Check whether the 4th argument is allowed"
+ nil nil 'binary)
+ (error nil)))
+ (defun pop3-md5 (string)
+ (md5 string nil nil 'binary))
(defvar pop3-md5-program "md5"
- "*Program to encode its input in MD5.")
-
+ "*Program to encode its input in MD5.
+\"openssl\" is a popular alternative; set `pop3-md5-program-args' to
+'(\"md5\") if you use it.")
+ (defvar pop3-md5-program-args nil
+ "*List of arguments passed to `pop3-md5-program'.")
(defun pop3-md5 (string)
- (with-temp-buffer
- (insert string)
- (call-process-region (point-min) (point-max)
- pop3-md5-program
- t (current-buffer) nil)
- ;; The meaningful output is the first 32 characters.
- ;; Don't return the newline that follows them!
- (buffer-substring (point-min) (+ 32 (point-min)))))))
+ (let ((default-enable-multibyte-characters t)
+ (coding-system-for-write 'binary))
+ (with-temp-buffer
+ (insert string)
+ (apply 'call-process-region (point-min) (point-max)
+ pop3-md5-program t (current-buffer) nil
+ pop3-md5-program-args)
+ ;; The meaningful output is the first 32 characters.
+ ;; Don't return the newline that follows them!
+ (buffer-substring (point-min) (+ 32 (point-min))))))))
(defun pop3-user (process user)
"Send USER information to POP3 server."
@@ -398,8 +414,8 @@ If NOW, use that time instead."
"Return the number of messages in the maildrop and the maildrop's size."
(pop3-send-command process "STAT")
(let ((response (pop3-read-response process t)))
- (list (string-to-int (nth 1 (split-string response " ")))
- (string-to-int (nth 2 (split-string response " "))))
+ (list (string-to-number (nth 1 (split-string response " ")))
+ (string-to-number (nth 2 (split-string response " "))))
))
(defun pop3-list (process &optional msg)
@@ -449,7 +465,7 @@ This function currently does nothing.")
"Return highest accessed message-id number for the session."
(pop3-send-command process "LAST")
(let ((response (pop3-read-response process t)))
- (string-to-int (nth 1 (split-string response " ")))
+ (string-to-number (nth 1 (split-string response " ")))
))
(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."
(cond ((eq (char-after (1+ (point))) ?\n)
(delete-char 2))
((looking-at "=[0-9A-F][0-9A-F]")
- (let ((byte (string-to-int (buffer-substring (1+ (point))
- (+ 3 (point)))
- 16)))
+ (let ((byte (string-to-number (buffer-substring (1+ (point))
+ (+ 3 (point)))
+ 16)))
(mm-insert-byte byte 1)
(delete-char 3)))
(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 @@
;;; score-mode.el --- mode for editing Gnus score files
-;; Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001, 2004, 2005 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
@@ -28,7 +28,7 @@
(eval-when-compile (require 'cl))
(require 'mm-util) ; for mm-universal-coding-system
-(require 'gnus-util) ; for gnus-pp
+(require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks
(defvar gnus-score-mode-hook nil
"*Hook run in score mode buffers.")
@@ -71,7 +71,7 @@ This mode is an extended emacs-lisp mode.
(setq mode-name "Score")
(lisp-mode-variables nil)
(make-local-variable 'gnus-score-edit-exit-function)
- (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook))
+ (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook))
(defun gnus-score-make-menu-bar ()
(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 @@
(defcustom sieve-manage-log "*sieve-manage-log*"
"Name of buffer for managesieve session trace."
- :type 'string)
+ :type 'string
+ :group 'sieve-manage)
(defcustom sieve-manage-default-user (user-login-name)
"Default username to use."
- :type 'string)
+ :type 'string
+ :group 'sieve-manage)
(defcustom sieve-manage-server-eol "\r\n"
"The EOL string sent from the server."
- :type 'string)
+ :type 'string
+ :group 'sieve-manage)
(defcustom sieve-manage-client-eol "\r\n"
"The EOL string we send to the server."
- :type 'string)
+ :type 'string
+ :group 'sieve-manage)
(defcustom sieve-manage-streams '(network starttls shell)
- "Priority of streams to consider when opening connection to server.")
+ "Priority of streams to consider when opening connection to server."
+ :group 'sieve-manage)
(defcustom sieve-manage-stream-alist
'((network sieve-manage-network-p sieve-manage-network-open)
@@ -113,10 +118,12 @@
NAME names the stream, CHECK is a function returning non-nil if the
server support the stream and OPEN is a function for opening the
-stream.")
+stream."
+ :group 'sieve-manage)
(defcustom sieve-manage-authenticators '(cram-md5 plain)
- "Priority of authenticators to consider when authenticating to server.")
+ "Priority of authenticators to consider when authenticating to server."
+ :group 'sieve-manage)
(defcustom sieve-manage-authenticator-alist
'((cram-md5 sieve-manage-cram-md5-p sieve-manage-cram-md5-auth)
@@ -127,11 +134,13 @@ stream.")
NAME names the authenticator. CHECK is a function returning non-nil if
the server support the authenticator and AUTHENTICATE is a function
-for doing the actual authentication.")
+for doing the actual authentication."
+ :group 'sieve-manage)
(defcustom sieve-manage-default-port 2000
"Default port number for managesieve protocol."
- :type 'integer)
+ :type 'integer
+ :group 'sieve-manage)
;; Internal variables:
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 @@
;;; sieve-mode.el --- Sieve code editing commands for Emacs
-;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
@@ -75,7 +75,8 @@
(((class color) (background light)) (:foreground "Orchid"))
(((class color) (background dark)) (:foreground "LightSteelBlue"))
(t (:bold t)))
- "Face used for Sieve Control Commands.")
+ "Face used for Sieve Control Commands."
+ :group 'sieve)
(defvar sieve-action-commands-face 'sieve-action-commands-face
"Face name used for Sieve Action Commands.")
@@ -85,7 +86,8 @@
(((class color) (background light)) (:foreground "Blue"))
(((class color) (background dark)) (:foreground "LightSkyBlue"))
(t (:inverse-video t :bold t)))
- "Face used for Sieve Action Commands.")
+ "Face used for Sieve Action Commands."
+ :group 'sieve)
(defvar sieve-test-commands-face 'sieve-test-commands-face
"Face name used for Sieve Test Commands.")
@@ -99,7 +101,8 @@
(((class color) (background light)) (:foreground "CadetBlue"))
(((class color) (background dark)) (:foreground "Aquamarine"))
(t (:bold t :underline t)))
- "Face used for Sieve Test Commands.")
+ "Face used for Sieve Test Commands."
+ :group 'sieve)
(defvar sieve-tagged-arguments-face 'sieve-tagged-arguments-face
"Face name used for Sieve Tagged Arguments.")
@@ -111,7 +114,8 @@
(((class color) (background light)) (:foreground "Purple"))
(((class color) (background dark)) (:foreground "Cyan"))
(t (:bold t)))
- "Face used for Sieve Tagged Arguments.")
+ "Face used for Sieve Tagged Arguments."
+ :group 'sieve)
(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 @@
(eval-when-compile (require 'cl))
(defgroup smime nil
- "S/MIME configuration.")
+ "S/MIME configuration."
+ :group 'mime)
(defcustom smime-keys nil
"*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 @@
;;; spam-report.el --- Reporting spam
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Teodor Zlatanov <tzz@lifelogs.com>
;; Keywords: network
@@ -35,7 +35,9 @@
(autoload 'mm-url-insert "mm-url"))
(defgroup spam-report nil
- "Spam reporting configuration.")
+ "Spam reporting configuration."
+ :group 'mail
+ :group 'news)
(defcustom spam-report-gmane-regex nil
"Regexp matching Gmane newsgroups, e.g. \"^nntp\\+.*:gmane\\.\"
@@ -181,14 +183,14 @@ symbol `ask', query before flushing the queue file."
the external program specified in `mm-url-program' to connect to
server."
(with-temp-buffer
- (let ((url (concat "http://" host report)))
+ (let ((url (format "http://%s%s" host report)))
(mm-url-insert url t))))
;;;###autoload
(defun spam-report-url-to-file (host report)
"Collect spam report requests in `spam-report-requests-file'.
Customize `spam-report-url-ping-function' to use this function."
- (let ((url (concat "http://" host report))
+ (let ((url (format "http://%s%s" host report))
(file spam-report-requests-file))
(gnus-make-directory (file-name-directory file))
(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 @@
;;; spam.el --- Identifying spam
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network
@@ -77,7 +77,9 @@
(defgroup spam nil
"Spam configuration."
- :version "22.1")
+ :version "22.1"
+ :group 'mail
+ :group 'news)
(defcustom spam-directory (nnheader-concat gnus-directory "spam/")
"Directory for spam whitelists and blacklists."
@@ -308,7 +310,8 @@ All unmarked article in such group receive the spam mark on group entry."
(((class color) (background light))
(:foreground "ivory4"))
(t :inverse-video t))
- "Face for spam-marked articles.")
+ "Face for spam-marked articles."
+ :group 'spam)
(defcustom spam-face 'spam-face
"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 @@
;;; starttls.el --- STARTTLS functions
-;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2003, 2004, 2005
+;; Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Author: Simon Josefsson <simon@josefsson.org>
@@ -235,6 +236,13 @@ handshake, or NIL on failure."
(starttls-negotiate-gnutls process)
(signal-process (process-id process) 'SIGALRM)))
+(eval-and-compile
+ (if (fboundp 'set-process-query-on-exit-flag)
+ (defalias 'starttls-set-process-query-on-exit-flag
+ 'set-process-query-on-exit-flag)
+ (defalias 'starttls-set-process-query-on-exit-flag
+ 'process-kill-without-query)))
+
(defun starttls-open-stream-gnutls (name buffer host service)
(message "Opening STARTTLS connection to `%s'..." host)
(let* (done
@@ -246,7 +254,7 @@ handshake, or NIL on failure."
(int-to-string service)
service)
starttls-extra-arguments)))
- (process-kill-without-query process)
+ (starttls-set-process-query-on-exit-flag process nil)
(while (and (processp process)
(eq (process-status process) 'run)
(save-excursion
@@ -286,7 +294,7 @@ specifying a port number to connect to."
name buffer starttls-program
host (format "%s" service)
starttls-extra-args)))
- (process-kill-without-query process)
+ (starttls-set-process-query-on-exit-flag process nil)
process)))
(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 ...)\"."
;;; (symbol-file (if (symbolp subr-or-var) subr-or-var
;;; (subr-name subr-or-var))
;;; (if (eq kind 'var) 'defvar 'defun)))
-
+;;;###autoload
(defun help-C-file-name (subr-or-var kind)
"Return the name of the C file where SUBR-OR-VAR is defined.
KIND 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:
(view-mode)
(make-local-variable 'view-no-disable-on-exit)
(setq view-no-disable-on-exit t)
- (run-hooks 'help-mode-hook))
+ (run-mode-hooks 'help-mode-hook))
;;;###autoload
(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.
"hexl-current-address")
(if hexl-follow-ascii (hexl-follow-ascii 1)))
- (run-hooks 'hexl-mode-hook))
+ (run-mode-hooks 'hexl-mode-hook))
(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."
(when ibuffer-default-directory
(setq default-directory ibuffer-default-directory))
(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
- (run-hooks 'ibuffer-mode-hook)
+ (run-mode-hooks 'ibuffer-mode-hook)
;; called after mode hooks to allow the user to add filters
(ibuffer-update-mode-name))
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."
(l (ido-make-merged-file-list ido-text-init
(eq ido-use-merged-list 'auto)
(eq ido-try-merged-list 'wide))))
+ (ido-trace "merged" l)
(cond
((not l)
(if (eq ido-try-merged-list 'wide)
@@ -1665,6 +1666,9 @@ If INITIAL is non-nil, it specifies the initial input string."
ido-use-merged-list nil)))
((eq l t)
(setq ido-use-merged-list nil))
+ ((eq l 'input-pending-p)
+ (setq ido-try-merged-list t
+ ido-use-merged-list nil))
(t
(setq ido-pre-merge-state
(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.
(file-directory-p dir)
(or (not must-match)
;; TODO. check for nonreadable and too-big.
- (ido-set-matches1
+ (ido-set-matches-1
(if (eq ido-cur-item 'file)
- (ido-make-file-list1 dir)
- (ido-make-dir-list1 dir)))))
+ (ido-make-file-list-1 dir)
+ (ido-make-dir-list-1 dir)))))
(setq j n)
(setq dir nil)))
(if dir
@@ -2786,11 +2790,11 @@ for first matching file."
(ido-directory-too-big nil))
(cond
((eq ido-cur-item 'file)
- (ido-make-file-list1 ido-current-directory))
+ (ido-make-file-list-1 ido-current-directory))
((eq ido-cur-item 'dir)
- (ido-make-dir-list1 ido-current-directory))
+ (ido-make-dir-list-1 ido-current-directory))
((eq ido-cur-item 'buffer)
- (ido-make-buffer-list1))
+ (ido-make-buffer-list-1))
((eq ido-cur-item 'list)
ido-choice-list)
(t nil))))
@@ -2908,74 +2912,87 @@ for first matching file."
(setq items (cdr items)))
res))
-(defun ido-make-merged-file-list (text auto wide)
+
+(defun ido-make-merged-file-list-1 (text auto wide)
(let (res)
- (message "Searching for `%s'...." text)
- (condition-case nil
- (if (and (ido-final-slash text) ido-dir-file-cache)
- (if wide
- (setq res (ido-wide-find-dirs-or-files
- ido-current-directory (substring text 0 -1) ido-enable-prefix t))
- ;; Use list of cached directories
- (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'"))
- (dirs ido-dir-file-cache)
- dir b d f)
- (if nil ;; simple
- (while dirs
- (setq dir (car (car dirs))
- dirs (cdr dirs))
- (when (and (string-match re dir)
- (not (ido-ignore-item-p dir ido-ignore-directories-merge))
- (file-directory-p dir))
- (setq b (substring dir 0 -1)
- f (concat (file-name-nondirectory b) "/")
- d (file-name-directory b)
- res (cons (cons f d) res))))
- (while dirs
- (setq dir (car dirs)
- d (car dir)
- dirs (cdr dirs))
- (when (not (ido-ignore-item-p d ido-ignore-directories-merge))
- (setq dir (cdr (cdr dir)))
- (while dir
- (setq f (car dir)
- dir (cdr dir))
- (if (and (string-match re f)
- (not (ido-ignore-item-p f ido-ignore-directories)))
- (setq res (cons (cons f d) res)))))
- (if (and auto (input-pending-p))
- (setq dirs nil
- res t))))))
- (if wide
- (setq res (ido-wide-find-dirs-or-files
- ido-current-directory text ido-enable-prefix nil))
- (let ((ido-text text)
- (dirs ido-work-directory-list)
- (must-match (and text (> (length text) 0)))
- dir fl)
- (if (and auto (not (member ido-current-directory dirs)))
- (setq dirs (cons ido-current-directory dirs)))
+ (if (and (ido-final-slash text) ido-dir-file-cache)
+ (if wide
+ (setq res (ido-wide-find-dirs-or-files
+ ido-current-directory (substring text 0 -1) ido-enable-prefix t))
+ ;; Use list of cached directories
+ (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'"))
+ (dirs ido-dir-file-cache)
+ dir b d f)
+ (if nil ;; simple
+ (while dirs
+ (setq dir (car (car dirs))
+ dirs (cdr dirs))
+ (when (and (string-match re dir)
+ (not (ido-ignore-item-p dir ido-ignore-directories-merge))
+ (file-directory-p dir))
+ (setq b (substring dir 0 -1)
+ f (concat (file-name-nondirectory b) "/")
+ d (file-name-directory b)
+ res (cons (cons f d) res))))
(while dirs
(setq dir (car dirs)
+ d (car dir)
dirs (cdr dirs))
- (when (and dir (stringp dir)
- (or ido-merge-ftp-work-directories
- (not (ido-is-ftp-directory dir)))
- (file-directory-p dir)
- ;; TODO. check for nonreadable and too-big.
- (setq fl (if (eq ido-cur-item 'file)
- (ido-make-file-list1 dir t)
- (ido-make-dir-list1 dir t))))
- (if must-match
- (setq fl (ido-set-matches1 fl)))
- (if fl
- (setq res (nconc fl res))))
+ (when (not (ido-ignore-item-p d ido-ignore-directories-merge))
+ (setq dir (cdr (cdr dir)))
+ (while dir
+ (setq f (car dir)
+ dir (cdr dir))
+ (if (and (string-match re f)
+ (not (ido-ignore-item-p f ido-ignore-directories)))
+ (setq res (cons (cons f d) res)))))
(if (and auto (input-pending-p))
(setq dirs nil
res t))))))
- (quit (setq res t)))
- (if (and res (not (eq res t)))
- (setq res (ido-sort-merged-list res auto)))
+ (if wide
+ (setq res (ido-wide-find-dirs-or-files
+ ido-current-directory text ido-enable-prefix nil))
+ (let ((ido-text text)
+ (dirs ido-work-directory-list)
+ (must-match (and text (> (length text) 0)))
+ dir fl)
+ (if (and auto (not (member ido-current-directory dirs)))
+ (setq dirs (cons ido-current-directory dirs)))
+ (while dirs
+ (setq dir (car dirs)
+ dirs (cdr dirs))
+ (when (and dir (stringp dir)
+ (or ido-merge-ftp-work-directories
+ (not (ido-is-ftp-directory dir)))
+ (file-directory-p dir)
+ ;; TODO. check for nonreadable and too-big.
+ (setq fl (if (eq ido-cur-item 'file)
+ (ido-make-file-list-1 dir t)
+ (ido-make-dir-list-1 dir t))))
+ (if must-match
+ (setq fl (ido-set-matches-1 fl)))
+ (if fl
+ (setq res (nconc fl res))))
+ (if (and auto (input-pending-p))
+ (setq dirs nil
+ res t))))))
+ res))
+
+(defun ido-make-merged-file-list (text auto wide)
+ (let (res)
+ (message "Searching for `%s'...." text)
+ (condition-case nil
+ (unless (catch 'input-pending-p
+ (let ((throw-on-input 'input-pending-p))
+ (setq res (ido-make-merged-file-list-1 text auto wide))
+ t))
+ (setq res 'input-pending-p))
+ (quit
+ (setq res t
+ ido-try-merged-list nil
+ ido-use-merged-list nil)))
+ (when (and res (listp res))
+ (setq res (ido-sort-merged-list res auto)))
(when (and (or ido-rotate-temp ido-rotate-file-list-default)
(listp res)
(> (length text) 0))
@@ -2986,7 +3003,7 @@ for first matching file."
(message nil)
res))
-(defun ido-make-buffer-list1 (&optional frame visible)
+(defun ido-make-buffer-list-1 (&optional frame visible)
;; Return list of non-ignored buffer names
(delq nil
(mapcar
@@ -3004,7 +3021,7 @@ for first matching file."
;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer,
;; it is put to the start of the list.
(let* ((ido-current-buffers (ido-get-buffers-in-frames 'current))
- (ido-temp-list (ido-make-buffer-list1 (selected-frame) ido-current-buffers)))
+ (ido-temp-list (ido-make-buffer-list-1 (selected-frame) ido-current-buffers)))
(if ido-temp-list
(nconc ido-temp-list ido-current-buffers)
(setq ido-temp-list ido-current-buffers))
@@ -3041,7 +3058,7 @@ for first matching file."
(nconc ido-temp-list items)
(setq ido-temp-list items)))
-(defun ido-file-name-all-completions1 (dir)
+(defun ido-file-name-all-completions-1 (dir)
(cond
((ido-nonreadable-directory-p dir) '())
;; do not check (ido-directory-too-big-p dir) here.
@@ -3098,13 +3115,13 @@ for first matching file."
(if (and ftp (file-readable-p dir))
(setq mtime (cons 'ftp (ido-time-stamp))))
(if mtime
- (setq cached (cons dir (cons mtime (ido-file-name-all-completions1 dir)))
+ (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir)))
ido-dir-file-cache (cons cached ido-dir-file-cache)))
(if (> (length ido-dir-file-cache) ido-max-dir-file-cache)
(setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil)))
(and cached
(cdr (cdr cached))))
- (ido-file-name-all-completions1 dir)))
+ (ido-file-name-all-completions-1 dir)))
(defun ido-remove-cached-dir (dir)
;; Remove dir from ido-dir-file-cache
@@ -3115,7 +3132,7 @@ for first matching file."
(setq ido-dir-file-cache (delq cached ido-dir-file-cache))))))
-(defun ido-make-file-list1 (dir &optional merged)
+(defun ido-make-file-list-1 (dir &optional merged)
;; Return list of non-ignored files in DIR
;; If MERGED is non-nil, each file is cons'ed with DIR
(and (or (ido-is-tramp-root dir) (file-directory-p dir))
@@ -3132,7 +3149,7 @@ for first matching file."
;; The hook `ido-make-file-list-hook' is run after the list has been
;; created to allow the user to further modify the order of the file names
;; in this list.
- (let ((ido-temp-list (ido-make-file-list1 ido-current-directory)))
+ (let ((ido-temp-list (ido-make-file-list-1 ido-current-directory)))
(setq ido-temp-list (sort ido-temp-list
(if ido-file-extensions-order
#'ido-file-extension-lessp
@@ -3168,7 +3185,7 @@ for first matching file."
(run-hooks 'ido-make-file-list-hook)
ido-temp-list))
-(defun ido-make-dir-list1 (dir &optional merged)
+(defun ido-make-dir-list-1 (dir &optional merged)
;; Return list of non-ignored subdirs in DIR
;; If MERGED is non-nil, each subdir is cons'ed with DIR
(and (or (ido-is-tramp-root dir) (file-directory-p dir))
@@ -3184,7 +3201,7 @@ for first matching file."
;; The hook `ido-make-dir-list-hook' is run after the list has been
;; created to allow the user to further modify the order of the
;; directory names in this list.
- (let ((ido-temp-list (ido-make-dir-list1 ido-current-directory)))
+ (let ((ido-temp-list (ido-make-dir-list-1 ido-current-directory)))
(setq ido-temp-list (sort ido-temp-list #'ido-file-lessp))
(ido-to-end ;; move . files to end
(delq nil (mapcar
@@ -3238,7 +3255,7 @@ for first matching file."
;;; FIND MATCHING ITEMS
-(defun ido-set-matches1 (items &optional do-full)
+(defun ido-set-matches-1 (items &optional do-full)
;; Return list of matches in items
(let* ((case-fold-search ido-case-fold)
(slash (and (not ido-enable-prefix) (ido-final-slash ido-text)))
@@ -3296,7 +3313,7 @@ for first matching file."
(defun ido-set-matches ()
;; Set `ido-matches' to the list of items matching prompt
(when ido-rescan
- (setq ido-matches (ido-set-matches1 (reverse ido-cur-list) (not ido-rotate))
+ (setq ido-matches (ido-set-matches-1 (reverse ido-cur-list) (not ido-rotate))
ido-rotate nil)))
(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:
Customized bindings may be defined in `ielm-map', which currently contains:
\\{ielm-map}"
(interactive)
- (comint-mode)
+ (delay-mode-hooks
+ (comint-mode))
(setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt)))
(set (make-local-variable 'paragraph-separate) "\\'")
(make-local-variable 'paragraph-start)
@@ -548,7 +549,7 @@ Customized bindings may be defined in `ielm-map', which currently contains:
(set-marker comint-last-input-start (ielm-pm))
(set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter))
- (run-hooks 'ielm-mode-hook))
+ (run-mode-hooks 'ielm-mode-hook))
(defun ielm-get-old-input nil
;; 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
with one argument, a string containing the image data. If PREDICATE returns
a non-nil value, TYPE is the image's type.")
-;;;###autoload
-(defvar image-library-alist nil
- "Alist of image types vs external libraries needed to display them.
-
-Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
-representing a supported image type, and the rest are strings giving
-alternate filenames for the corresponding external libraries.
-
-Emacs tries to load the libraries in the order they appear on the
-list; if none is loaded, the running session of Emacs won't
-support the image type. Types 'pbm and 'xbm don't need to be
-listed; they're always supported.")
-;;;###autoload (put 'image-library-alist 'risky-local-variable t)
-
(defun image-jpeg-p (data)
"Value is non-nil if DATA, a string, consists of JFIF image data.
We accept the tag Exif because that is the same format."
@@ -122,7 +108,7 @@ be determined."
;;;###autoload
(defun image-type-available-p (type)
- "Value is non-nil if image type TYPE is available.
+ "Return non-nil if image type TYPE is available.
Image types are symbols like `xbm' or `jpeg'."
(and (fboundp 'init-image-library)
(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 @@
;;; info.el --- info package for Emacs
-;; Copyright (C) 1985,86,92,93,94,95,96,97,98,99,2000,01,02,03,04,2005
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: help
@@ -515,9 +515,10 @@ in all the directories in that path."
;; since the argument will then be parsed improperly. This also
;; has the added benefit of allowing node names to be included
;; following the parenthesized filename.
- (if (and (stringp file) (string-match "(.*)" file))
- (Info-goto-node file)
- (Info-goto-node (concat "(" file ")")))
+ (Info-goto-node
+ (if (and (stringp file) (string-match "(.*)" file))
+ file
+ (concat "(" file ")")))
(if (zerop (buffer-size))
(Info-directory))))
@@ -1344,7 +1345,9 @@ any double quotes or backslashes must be escaped (\\\",\\\\)."
;; Go to an info node specified with a filename-and-nodename string
;; of the sort that is found in pointers in nodes.
-;;;###autoload
+;; Don't autoload this function: the correct entry point for other packages
+;; to use is `info'. --Stef
+;; ;;;###autoload
(defun Info-goto-node (nodename &optional fork)
"Go to info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME.
If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
@@ -3259,7 +3262,7 @@ Advanced commands:
(set (make-local-variable 'search-whitespace-regexp)
Info-search-whitespace-regexp)
(Info-set-mode-line)
- (run-hooks 'Info-mode-hook))
+ (run-mode-hooks 'Info-mode-hook))
;; When an Info buffer is killed, make sure the associated tags buffer
;; is killed too.
@@ -3301,7 +3304,7 @@ which returns to Info mode for browsing.
(setq buffer-read-only nil)
(force-mode-line-update)
(buffer-enable-undo (current-buffer))
- (run-hooks 'Info-edit-mode-hook))
+ (run-mode-hooks 'Info-edit-mode-hook))
(defun Info-edit ()
"Edit the contents of this Info node.
@@ -4127,5 +4130,5 @@ BUFFER is the buffer speedbar is requesting buttons for."
(provide 'info)
-;;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac
+;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac
;;; 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'."
(throw 'cs t)
(goto-char (match-end 0))))))
(let* ((match (match-string 1))
- (sym (intern match)))
- (when (latexenc-inputenc-to-coding-system match)
- (setq sym (latexenc-inputenc-to-coding-system match)))
- (when (coding-system-p sym)
- sym
- (if (and (require 'code-pages nil t) (coding-system-p sym))
- sym
- 'undecided)))
+ (sym (or (latexenc-inputenc-to-coding-system match)
+ (intern match))))
+ (cond
+ ((coding-system-p sym) sym)
+ ((and (require 'code-pages nil t) (coding-system-p sym)) sym)
+ (t 'undecided)))
;; else try to find it in the master/main file
- (let (latexenc-main-file)
- ;; is there a TeX-master or tex-main-file in the local variable section
+ (let ((default-directory (file-name-directory (nth 1 arg-list)))
+ latexenc-main-file)
+ ;; Is there a TeX-master or tex-main-file in the local variables
+ ;; section?
(unless latexenc-dont-use-TeX-master-flag
(goto-char (point-max))
- (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move)
+ (search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
+ 'move)
(search-forward "Local Variables:" nil t)
- (when (re-search-forward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t)
- (let ((file (concat (file-name-directory (nth 1 arg-list)) (match-string 2))))
- (if (file-exists-p file)
- (setq latexenc-main-file file)
- (if (boundp 'TeX-default-extension)
- (when (file-exists-p (concat file "." TeX-default-extension))
- (setq latexenc-main-file (concat file "." TeX-default-extension)))
- (dolist (ext '("drv" "dtx" "ltx" "tex"))
- (if (file-exists-p (concat file "." ext))
- (setq latexenc-main-file (concat file "." ext)))))))))
+ (when (re-search-forward
+ "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
+ nil t)
+ (let ((file (match-string 2)))
+ (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
+ (concat "." TeX-default-extension)
+ "")
+ ".tex" ".ltx" ".dtx" ".drv"))
+ (if (and (null latexenc-main-file) ;Stop at first.
+ (file-exists-p (concat file ext)))
+ (setq latexenc-main-file (concat file ext)))))))
;; try tex-modes tex-guess-main-file
(when (and (not latexenc-dont-use-tex-guess-main-file-flag)
- (not latexenc-main-file))
- (when (fboundp 'tex-guess-main-file)
- (let ((tex-start-of-header "\\\\document\\(style\\|class\\)")
- (default-directory (file-name-directory (nth 1 arg-list))))
- (setq latexenc-main-file (tex-guess-main-file)))))
+ (not latexenc-main-file)
+ (fboundp 'tex-guess-main-file))
+ (let ((tex-start-of-header "\\\\document\\(style\\|class\\)"))
+ (setq latexenc-main-file (tex-guess-main-file))))
;; if we found a master/main file get the coding system from it
(if (and latexenc-main-file
(file-readable-p latexenc-main-file))
(let* ((latexenc-dont-use-tex-guess-main-file-flag t)
(latexenc-dont-use-TeX-master-flag t)
- (latexenc-main-buffer (find-file-noselect latexenc-main-file t)))
- (or (buffer-local-value 'coding-system-for-write latexenc-main-buffer)
- (buffer-local-value 'buffer-file-coding-system latexenc-main-buffer)))
+ (latexenc-main-buffer
+ (find-file-noselect latexenc-main-file t)))
+ (coding-system-base ;Disregard the EOL part of the CS.
+ (with-current-buffer latexenc-main-buffer
+ (or coding-system-for-write buffer-file-coding-system))))
'undecided))))
'undecided))
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."
; (setq major-mode 'swedish-mode)
; (setq local-abbrev-table swedish-mode-abbrev-table)
; (set-syntax-table text-mode-syntax-table)
-; (run-hooks 'text-mode-hook))
+; (run-mode-hooks 'text-mode-hook))
;(defun indented-swedish-mode ()
; "Major mode for editing indented Swedish text intended for
@@ -151,7 +151,7 @@ Leaves point just after the word that looks Swedish."
; (use-local-map indented-text-mode-map)
; (setq mode-name "Indented Swedish")
; (setq major-mode 'indented-swedish-mode)
-; (run-hooks 'text-mode-hook))
+; (run-mode-hooks 'text-mode-hook))
(provide 'swedish)
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 @@
;;; iswitchb.el --- switch between buffers using substrings
-;; Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
@@ -165,11 +165,10 @@
;; Font-Lock
-;; If you have font-lock loaded, the first matching buffer is
-;; highlighted. To switch this off, set (setq iswitchb-use-fonts nil)
-;; I don't use font-lock that much, so I've hardcoded the faces. If
-;; this is too harsh, let me know. Colouring of the matching buffer
-;; name was suggested by Carsten Dominik (dominik@strw.leidenuniv.nl)
+;; font-lock is used to highlight the first matching buffer. To
+;; switch this off, set (setq iswitchb-use-faces nil). Colouring of
+;; the matching buffer name was suggested by Carsten Dominik
+;; (dominik@strw.leidenuniv.nl)
;; Replacement for read-buffer
@@ -230,16 +229,10 @@
;; Regexp matching
-;; There is limited provision for regexp matching within iswitchb,
-;; enabled through `iswitchb-regexp'. This allows you to type `c$'
-;; for example and see all buffer names ending in `c'. This facility
-;; is quite limited though in two respects. First, you can't
-;; currently type in expressions like `[0-9]' directly -- you have to
-;; type them in when iswitchb-regexp is nil and then toggle on the
-;; regexp functionality. Likewise, don't enter an expression
-;; containing `\' in regexp mode. If you try, iswitchb gets confused,
-;; so just hit C-g and try again. Secondly, no completion mechanism
-;; is currently offered when regexp searching.
+;; There is provision for regexp matching within iswitchb, enabled
+;; through `iswitchb-regexp'. This allows you to type `c$' for
+;; example and see all buffer names ending in `c'. No completion
+;; mechanism is currently offered when regexp searching.
;;; TODO
@@ -256,6 +249,8 @@
(fboundp 'last)))
(require 'cl))
+(require 'font-lock)
+
;; Set up the custom library.
;; taken from http://www.dina.kvl.dk/~abraham/custom/
(eval-and-compile
@@ -377,10 +372,11 @@ See also `iswitchb-newbuffer'."
:type 'boolean
:group 'iswitchb)
-(defcustom iswitchb-use-fonts t
+(defcustom iswitchb-use-faces t
"*Non-nil means use font-lock fonts for showing first match."
:type 'boolean
:group 'iswitchb)
+(define-obsolete-variable-alias 'iswitchb-use-fonts 'iswitchb-use-faces "22.1")
(defcustom iswitchb-use-frame-buffer-list nil
"*Non-nil means use the currently selected frame's buffer list."
@@ -408,6 +404,35 @@ iswitchb is running."
:type 'hook
:group 'iswitchb)
+(defface iswitchb-single-match-face
+ '((t
+ (:inherit font-lock-comment-face)))
+ "Iswitchb face for single matching buffer name."
+ :version "22.1"
+ :group 'iswitchb)
+
+(defface iswitchb-current-match-face
+ '((t
+ (:inherit font-lock-function-name-face)))
+ "Iswitchb face for current matching buffer name."
+ :version "22.1"
+ :group 'iswitchb)
+
+(defface iswitchb-virtual-matches-face
+ '((t
+ (:inherit font-lock-builtin-face)))
+ "Iswitchb face for matching virtual buffer names.
+See also `iswitchb-use-virtual-buffers'."
+ :version "22.1"
+ :group 'iswitchb)
+
+(defface iswitchb-invalid-regexp-face
+ '((t
+ (:inherit font-lock-warning-face)))
+ "Iswitchb face for indicating invalid regexp. "
+ :version "22.1"
+ :group 'iswitchb)
+
;; Do we need the variable iswitchb-use-mycompletion?
;;; Internal Variables
@@ -507,6 +532,11 @@ selected.")
(defvar iswitchb-minibuf-depth nil
"Value we expect to be returned by `minibuffer-depth' in the minibuffer.")
+(defvar iswitchb-common-match-inserted nil
+ "Non-nil if we have just inserted a common match in the minibuffer.")
+
+(defvar iswitchb-invalid-regexp)
+
;;; FUNCTIONS
;;; ISWITCHB KEYMAP
@@ -564,6 +594,7 @@ in a separate window.
;;`iswitchb-buffer-ignore')
(let* ((prompt "iswitch ")
+ iswitchb-invalid-regexp
(buf (iswitchb-read-buffer prompt)))
;;(message "chosen text %s" iswitchb-final-text)
@@ -572,7 +603,8 @@ in a separate window.
(cond ( (eq iswitchb-exit 'findfile)
(call-interactively 'find-file))
-
+ (iswitchb-invalid-regexp
+ (message "Won't make invalid regexp named buffer"))
(t
;; View the buffer
;;(message "go to buf %s" buf)
@@ -602,10 +634,7 @@ the selection process begins. Used by isearchb.el."
buf-sel
iswitchb-final-text
(icomplete-mode nil) ;; prevent icomplete starting up
- ;; can only use fonts if they have been bound.
- (iswitchb-use-fonts (and iswitchb-use-fonts
- (boundp 'font-lock-comment-face)
- (boundp 'font-lock-function-name-face))))
+ )
(iswitchb-define-mode-map)
(setq iswitchb-exit nil)
@@ -691,7 +720,9 @@ The result is stored in `iswitchb-common-match-string'."
(let (res)
(cond ((not iswitchb-matches)
(run-hooks 'iswitchb-cannot-complete-hook))
-
+ (iswitchb-invalid-regexp
+ ;; Do nothing
+ )
((= 1 (length iswitchb-matches))
;; only one choice, so select it.
(exit-minibuffer))
@@ -703,7 +734,8 @@ The result is stored in `iswitchb-common-match-string'."
(not (equal res iswitchb-text)))
;; found something to complete, so put it in the minibuffer.
(progn
- (setq iswitchb-rescan nil)
+ (setq iswitchb-rescan nil
+ iswitchb-common-match-inserted t)
(delete-region (minibuffer-prompt-end) (point))
(insert res))
;; else nothing to complete
@@ -889,22 +921,26 @@ BUFFER-LIST can be list of buffers or list of strings."
(do-string (stringp (car list)))
name
ret)
- (mapcar
- (lambda (x)
-
- (if do-string
- (setq name x) ;We already have the name
- (setq name (buffer-name x)))
-
- (cond
- ((and (or (and string-format (string-match regexp name))
- (and (null string-format)
- (string-match (regexp-quote regexp) name)))
-
- (not (iswitchb-ignore-buffername-p name)))
- (setq ret (cons name ret))
- )))
- list)
+ (setq iswitchb-invalid-regexp nil)
+ (catch 'invalid-regexp
+ (mapcar
+ (lambda (x)
+
+ (if do-string
+ (setq name x) ;We already have the name
+ (setq name (buffer-name x)))
+
+ (cond
+ ((and (if (not string-format)
+ (string-match (regexp-quote regexp) name)
+ (condition-case error
+ (string-match regexp name)
+ (invalid-regexp
+ (setq iswitchb-invalid-regexp t)
+ (throw 'invalid-regexp (setq ret (cdr error))))))
+ (not (iswitchb-ignore-buffername-p name)))
+ (setq ret (cons name ret)))))
+ list))
ret))
(defun iswitchb-ignore-buffername-p (bufname)
@@ -989,7 +1025,8 @@ Return the modified list with the last element prepended to it."
(temp-buf "*Completions*")
(win))
- (if (eq last-command this-command)
+ (if (and (eq last-command this-command)
+ (not iswitchb-common-match-inserted))
;; scroll buffer
(progn
(set-buffer temp-buf)
@@ -1016,8 +1053,8 @@ Return the modified list with the last element prepended to it."
(fundamental-mode))
(display-completion-list (if iswitchb-matches
iswitchb-matches
- iswitchb-buflist))
- )))))
+ iswitchb-buflist))))
+ (setq iswitchb-common-match-inserted nil))))
;;; KILL CURRENT BUFFER
@@ -1227,8 +1264,7 @@ Copied from `icomplete-exhibit' with two changes:
;; Insert the match-status information:
(insert (iswitchb-completions
- contents
- (not minibuffer-completion-confirm)))))))
+ contents))))))
(eval-when-compile
(defvar most-len)
@@ -1243,27 +1279,29 @@ Copied from `icomplete-exhibit' with two changes:
(setq most-is-exact t))
(substring com most-len)))
-(defun iswitchb-completions (name require-match)
+(defun iswitchb-completions (name)
"Return the string that is displayed after the user's text.
Modified from `icomplete-completions'."
(let ((comps iswitchb-matches)
; "-determined" - only one candidate
- (open-bracket-determined (if require-match "(" "["))
- (close-bracket-determined (if require-match ")" "]"))
+ (open-bracket-determined "[")
+ (close-bracket-determined "]")
;"-prospects" - more than one candidate
(open-bracket-prospects "{")
(close-bracket-prospects "}")
first)
- (if (and iswitchb-use-fonts comps)
+ (if (and iswitchb-use-faces comps)
(progn
(setq first (car comps))
(setq first (format "%s" first))
(put-text-property 0 (length first) 'face
(if (= (length comps) 1)
- 'font-lock-comment-face
- 'font-lock-function-name-face)
+ (if iswitchb-invalid-regexp
+ 'iswitchb-invalid-regexp-face
+ 'iswitchb-single-match-face)
+ 'iswitchb-current-match-face)
first)
(setq comps (cons first (cdr comps)))))
@@ -1292,7 +1330,7 @@ Modified from `icomplete-completions'."
(let ((comp comps))
(while comp
(put-text-property 0 (length (car comp))
- 'face 'font-lock-builtin-face
+ 'face 'iswitchb-virtual-matches-face
(car comp))
(setq comp (cdr comp))))))
@@ -1300,16 +1338,23 @@ Modified from `icomplete-completions'."
open-bracket-determined
close-bracket-determined))
- ((null (cdr comps)) ;one match
- (concat (if (and (> (length (car comps))
- (length name)))
- (concat open-bracket-determined
+ (iswitchb-invalid-regexp
+ (concat " " (car comps)))
+ ((null (cdr comps)) ;one match
+ (concat
+ (if (if (not iswitchb-regexp)
+ (= (length name)
+ (length (car comps)))
+ (string-match name (car comps))
+ (string-equal (match-string 0 (car comps))
+ (car comps)))
+ ""
+ (concat open-bracket-determined
;; when there is one match, show the
;; matching buffer name in full
(car comps)
- close-bracket-determined)
- "")
- (if (not iswitchb-use-fonts) " [Matched]")))
+ close-bracket-determined))
+ (if (not iswitchb-use-faces) " [Matched]")))
(t ;multiple matches
(if (and iswitchb-max-to-show
(> (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."
"Fontify current buffer starting at position START.
This function is added to `fontification-functions' when `jit-lock-mode'
is active."
- (when jit-lock-mode
+ (when (and jit-lock-mode (not (memory-full-p)))
(if (null jit-lock-defer-time)
;; No deferral.
(jit-lock-fontify-now start (+ start jit-lock-chunk-size))
@@ -540,7 +540,7 @@ is the pre-change length.
This function ensures that lines following the change will be refontified
in case the syntax of those lines has changed. Refontification
will take place when text is fontified stealthily."
- (when jit-lock-mode
+ (when (and jit-lock-mode (not (memory-full-p)))
(save-excursion
(with-buffer-prepared-for-jit-lock
;; 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)"
(use-local-map ledit-mode-map)
(setq mode-name "Ledit")
(setq major-mode 'ledit-mode)
- (run-hooks 'ledit-mode-hook))
+ (run-mode-hooks 'ledit-mode-hook))
(provide 'ledit)
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.
(make-local-variable 'revert-buffer-function)
(setq revert-buffer-function 'locate-update)
(set (make-local-variable 'page-delimiter) "\n\n")
- (run-hooks 'locate-mode-hook))
+ (run-mode-hooks 'locate-mode-hook))
(defun locate-do-setup (search-string)
(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 @@
;;; Code:
-(require 'easy-mmode)
-
(defgroup longlines nil
"Automatic wrapping of long lines when loading files."
:group 'fill)
@@ -157,7 +155,8 @@ major mode changes."
(defface longlines-visible-face
'((t (:background "red")))
- "Face used to make hard newlines visible in `longlines-mode'.")
+ "Face used to make hard newlines visible in `longlines-mode'."
+ :group 'longlines)
(defun longlines-show-hard-newlines (&optional arg)
"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:
(when rmail-display-summary
(rmail-summary))
(rmail-construct-io-menu))
- (run-hooks 'rmail-mode-hook)))
+ (run-mode-hooks 'rmail-mode-hook)))
(defun rmail-mode-2 ()
(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'.
(save-excursion
(set-buffer rmail-summary-buffer)
(rmail-summary-disable)))
- (run-hooks 'rmail-edit-mode-hook))
+ (run-mode-hooks 'rmail-edit-mode-hook))
(defvar rmail-old-pruned nil)
(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:
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(rmail-summary-font-lock-keywords t))
(rmail-summary-enable)
- (run-hooks 'rmail-summary-mode-hook))
+ (run-mode-hooks 'rmail-summary-mode-hook))
;; Summary features need to be disabled during edit mode.
(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 @@
;; Copyright (C) 1993, 1997, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org>
-;; Maintainer: FSF
+;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
;; Created: February 1993
;; Last Modified: 1993/09/22 18:58:46
;; Keywords: mail, news
@@ -1182,8 +1182,11 @@ to the auto-selected attribution string."
(setq attribution attrib
attriblist nil))
((listp attrib)
- (setq attribution (eval attrib)
- attriblist nil))
+ (setq attribution (eval attrib))
+ (if (stringp attribution)
+ (setq attriblist nil)
+ (setq attribution nil
+ attriblist (cdr attriblist))))
(t (error "%s did not evaluate to a string or list!"
"sc-attrib-selection-list"))
)))
@@ -1667,7 +1670,7 @@ header style to use, unless not supplied or invalid, in which case
(major-mode 'sc-electric-mode))
(use-local-map sc-electric-mode-map)
(sc-eref-show sc-eref-style)
- (run-hooks 'sc-electric-mode-hook)
+ (run-mode-hooks 'sc-electric-mode-hook)
(recursive-edit)
)))
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."
(defvar Man-cooked-hook nil
"Hook run after removing backspaces but before `Man-mode' processing.")
-(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.­+]*"
+(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.:­+]*"
"Regular expression describing the name of a manpage (without section).")
(defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]"
@@ -1061,6 +1061,7 @@ The following variables may be of some use. Try
The following key bindings are currently in effect in the buffer:
\\{Man-mode-map}"
(interactive)
+ (kill-all-local-variables)
(setq major-mode 'Man-mode
mode-name "Man"
buffer-auto-save-file-name nil
@@ -1069,7 +1070,7 @@ The following key bindings are currently in effect in the buffer:
" {" 'Man-page-mode-string "}")
truncate-lines t
buffer-read-only t)
- (buffer-disable-undo (current-buffer))
+ (buffer-disable-undo)
(auto-fill-mode -1)
(use-local-map Man-mode-map)
(set-syntax-table man-mode-syntax-table)
@@ -1080,7 +1081,7 @@ The following key bindings are currently in effect in the buffer:
(Man-strip-page-headers)
(Man-unindent)
(Man-goto-page 1)
- (run-hooks 'Man-mode-hook))
+ (run-mode-hooks 'Man-mode-hook))
(defsubst Man-build-section-alist ()
"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 @@
-2005-04-08 Dan Nicolaescu <dann@ics.uci.edu>
+2005-05-28 Bill Wohler <wohler@newt.com>
+
+ Released MH-E version 7.84.
+
+ * MH-E-NEWS, README: Updated for release 7.84.
+
+ * mh-e.el (Version, mh-version): Updated for release 7.84.
+
+2005-05-28 Bill Wohler <wohler@newt.com>
+
+ * mh-e.el, mh-comp.el: Don't autoload Info-goto-node. It's not
+ used, and if it were, the code should use the info function
+ instead.
+
+ Use full year in copyright notices (for example, 2005, not 05).
+
+ * Makefile (mh-loaddefs.el, mh-e-autoloads.el): Added 2005 to
+ copyright notice.
+
+ * mh-inc.el: Use three ;;; to precede Local Variables to be
+ consistent with other files. Will have to ask Stefan Monnier why
+ he changed it.
+
+ * README: This version of MH-E to appear in GNU Emacs 22.1, not
+ 21.5.
+
+ * ChangeLog: The * in a ChangeLog entry must only be used before a
+ filename.
+
+ Fixed compilation warnings in CVS Emacs. This included using
+ "public" functions instead of "private" ones (info instead of
+ Info-goto-node, view-mode-enter instead of view-mode), and
+ removing a customization group that didn't have a parent group. In
+ addition, string-to-int was recently deprecated; use
+ string-to-number instead.
+
+ * mh-customize.el (Info-goto-node): Deleted autoload.
+ (mh-e): Deleted mh group. Use single mh-e group instead.
+ (mh-tool-bar-folder-help, mh-tool-bar-letter-help): Use info
+ instead of Info-goto-node.
+
+ * mh-e.el (mh-read-msg-list): string-to-int deprecated; use
+ string-to-number.
+
+ * mh-funcs.el (mh-list-folders): Use view-mode-enter instead of
+ view-mode.
+
+ * mh-seq.el (mh-list-sequences): Use view-mode-enter instead of
+ view-mode.
+
+ * mh-utils.el (mh-get-msg-num): string-to-int deprecated; use
+ string-to-number.
+
+ Merged in changes from CVS Emacs including:
+
+ * mh-utils.el (mh-show-mode):
+ * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. Lute
+ Kamstra <lute@gnu.org> 2005-05-26.
+
+2005-05-25 Bill Wohler <wohler@newt.com>
+
+ Merged in changes from CVS Emacs including:
* mh-customize.el (mh-speedbar-selected-folder-face): Special case
- high number of colors displays.
+ high number of colors displays. Dan Nicolaescu <dann@ics.uci.edu>
+ 2005-04-08.
+
+ * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with
+ `valid'. Replace `illegal' with `invalid'. Werner Lemberg
+ <wl@gnu.org> 2005-03-25.
-2005-03-25 Werner Lemberg <wl@gnu.org>
+ * mh-inc.el (mh-inc-spool-list): Correctly declare the external
+ var. Stefan <monnier@iro.umontreal.ca> 2004-09-07.
- * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'.
+2005-05-18 Bill Wohler <wohler@newt.com>
-2005-03-25 Werner Lemberg <wl@gnu.org>
+ * mh-comp.el (mh-reply): Mention use of mh-repl-group-formfile in
+ docstring.
- * mh-e.el: Replace `illegal' with `invalid'.
+2005-05-05 Bill Wohler <wohler@newt.com>
-2004-09-07 Stefan <monnier@iro.umontreal.ca>
+ * mh-e.el (Version, mh-version): Added +cvs to release number.
- * mh-inc.el (mh-inc-spool-list): Correctly declare the external var.
+2005-05-05 Bill Wohler <wohler@newt.com>
-2004-08-21 Bill Wohler <wohler@newt.com>
+ Released MH-E version 7.83.
+
+ * MH-E-NEWS, README: Updated for release 7.83.
+
+ * mh-e.el (Version, mh-version): Updated for release 7.83.
+
+2005-05-05 Bill Wohler <wohler@newt.com>
+
+ * README: To appear in Emacs 21.5, since 21.4 was released (but
+ without the latest MH-E).
+
+ * release-utils (usage): Added --variable-changes.
+
+2005-05-04 Bill Wohler <wohler@newt.com>
+
+ * mh-customize.el (*-face): Made docstrings consistent.
+
+ * mh-seq.el (mh-pick-args-list): Extracted function for turning
+ string of pick arguments to list. Fixed list so that multi-word
+ arguments were put in a single string (closes SF #1122655).
+ (mh-edit-pick-expr): Use it.
+
+ * mh-unit.el (mh-unit): Since 21.4 snuck out but didn't contain
+ updated lm-verify, don't run lm-verify on versions before 21.5.
+ (mh-unit-test-pick-args-list): Added.
+
+ * mh-customize.el (mh-yank-from-start-of-msg): Use headline
+ capitalization. Changed wording of some choices to be more consistent.
+ (mh-invisible-header-fields-internal): Added fields from usa.net.
+
+2005-04-24 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-mime.el (mh-mime-security-button-face): New function which
+ determines the face to use to colorize encrypted or signed emails.
+ (mh-insert-mime-security-button): Modified to colorize the button
+ differently based on whether the signature was valid or not,
+ whether the decryption was successful or not, etc.
+
+ * mh-customize.el (mh-show-pgg-good-face)
+ (mh-show-pgg-unknown-face, mh-show-pgg-bad-face): Faces added to
+ highlight buttons introduced for encrpted or signed MIME parts.
+
+2005-03-19 Bill Wohler <wohler@newt.com>
+
+ * mh-customize.el (mh-mml-method-default): Sorted alphabetically.
+ (mh-insert-x-mailer-flag, mh-reply-show-message-flag): Moved from
+ mh-letter group to mh-sending-mail group. The writing of the
+ documentation revealed that these options were misplaced.
+
+2005-03-17 Bill Wohler <wohler@newt.com>
+
+ * mh-customize.el (mh-junk-background): Put in alphabetical order.
+ Synced with manual.
+ (mh-junk-program): Use double-quotes on non-symbols.
+
+ * mh-pick.el: (mh-search-folder): Synced docstrings with manual.
+
+ * mh-index.el: (mh-index-search, mh-pick-execute-search)
+ (mh-grep-execute-search, mh-mairix-execute-search)
+ (mh-swish-execute-search, mh-swish++-execute-search)
+ (mh-namazu-execute-search): Synced docstrings with manual. Note
+ that I'm now grabbing the output of an Info buffer which is why
+ the indents on the examples has changed a bit. If we all use that
+ methodology in the future, we shouldn't produce as many gratuitous
+ diffs. I also noticed that `grep' and `search' became links to
+ unrelated things, so let's use double-quotes for quoting
+ non-symbols in the docstrings.
+
+ * mh-customize.el (mh-index-new-messages-folders)
+ (mh-index-ticked-messages-folders): Synced docstrings with manual.
+
+2005-02-16 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-index.el (mh-swish-execute-search): Simplify the indexing
+ recipe for swish. Thanks to Eric Jensen for the suggestion.
+
+2005-02-11 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-index.el (mh-swish-execute-search)
+ (mh-swish++-execute-search): Make the indexing recipes better.
+ (mh-swish-next-result): The indexer might find matches in files
+ that aren't messages. Make the function handle that case
+ gracefully.
- * Released MH-E version 7.82.
+2005-02-07 Bill Wohler <wohler@newt.com>
+
+ * mh-customize.el (mh-inc-prog, mh-inc-spool-list): Synced
+ docstrings with manual.
+
+2005-02-06 Bill Wohler <wohler@newt.com>
+
+ * mh-junk.el (mh-spamassassin-blacklist): Removed trailing
+ whitespace.
+
+ * mh-e.el (mh-refile-or-write-again): Checkdoc fix.
+
+ * mh-identity.el (mh-identity-list-set)
+ (mh-identity-field-handler, mh-identity-handler-gpg-identity)
+ (mh-identity-handler-signature)
+ (mh-identity-handler-attribution-verb)
+ (mh-identity-handler-default, mh-identity-handler-top): Docstring
+ editing.
+
+ * mh-customize.el (mh-identity-list, mh-auto-fields-list)
+ (mh-identity-default, mh-identity-handlers): Synced docstrings
+ with manual.
+
+2005-02-03 Bill Wohler <wohler@newt.com>
+
+ * mh-xemacs.el (define-behavior 'mh): Moved Ben's code here from
+ mh-e.el and added standard documentation.
+
+ * mh-e.el: Received patch from Ben Wing <ben@666.com> to add
+ define-behavior on XEmacs.
+
+2005-01-28 Jeffrey C Honig <jch@honig.net>
+
+ * mh-customize.el (mh-invisible-header-fields-internal): Added
+ X-Evolution header added by Evolution mai client.
+
+2005-01-18 Bill Wohler <wohler@newt.com>
+
+ * mh-customize.el (mh-invisible-header-fields-internal): Added
+ DomainKey-Signature (http://antispam.yahoo.com/domainkeys/).
+ There's a Comment field that goes with it, but I thought it was
+ too general to add.
+
+2005-01-06 Bill Wohler <wohler@newt.com>
+
+ * mh-junk.el (mh-spamassassin-blacklist): Fixed typo to fix an
+ error when junking spamassassin mail when mh-junk-background is
+ turned on.
+
+2004-12-25 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-utils.el (mh-show-unquote-From): Make the buffer writable
+ before trying to change it (closes SF #1089870).
+
+ * mh-comp.el (mh-complete-word): Fix a typo in a variable
+ name (closes SF #1089870)
+
+2004-11-28 Jeffrey C Honig <jch@honig.net>
+
+ * mh-comp.el (mh-complete-word): Kill the *Completions* buffer in
+ any cases where we belive we are done with it. Not perfect, but
+ better than just leaving it around.
+
+2004-11-08 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a
+ function at compile time doesn't guarantee it's existence at run
+ time. So make the macro handle that situation better.
+
+2004-11-05 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-acros.el (advice): Load advice, since it isn't loaded in
+ XEmacs causing compilation problems.
+
+2004-10-24 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-index.el (mh-mairix-execute-search)
+ (mh-mairix-regexp-builder): Update the interface to mairix so that
+ it will work with versions of mairix 0.12 and later.
+
+ * mh-funcs.el (mh-rmf-daemon): Avoid using
+ beginning-of-buffer since it clobbers the mark and it was pointed
+ out on the Emacs developers list to be the wrong thing to do.
+
+ * mh-e.el (mh-inc-folder): Only remove the window on the show
+ buffer. This means if the user has BBDB enabled then the window
+ displaying BBDB information isn't clobbered.
+ (mh-refile-or-write-again): Don't use the function
+ interactive-p. There was a long thread on the Emacs developers
+ list where it was pointed out that it is incorrect to use this
+ function most of the time.
+
+ * mh-comp.el (autoload): Don't set auto-mode-alist. This could
+ screw things up for users that don't use MH-E (closes SF #1032353).
+
+2004-10-13 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-e.el (mh-refile-or-write-again): Generalize the function to
+ work on a range of messages (closes SF #1046330).
+
+2004-09-02 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-e.el (mh-process-commands): The concurrent execution of mark
+ and refile can cause problems since both the commands change the
+ current folder. This change avoids that by getting rid of the
+ concurrency. Another change covers the corner case where we refile
+ messages to a previously empty folder. Before the modification
+ sequences weren't preserved even if the appropriate flag was
+ set. That is no longer the case.
+
+2004-08-26 Satyaki Das <satyaki@theforce.stanford.edu>
+
+ * mh-e.el (mh-get-new-mail): Also, update the unseen sequence from
+ disk. Otherwise, the new messages aren't highlighted.
+
+ * mh-seq.el (mh-thread-inc): Fix a bug which appears when inc is
+ run in a narrowed folder. The user sequence notation was getting
+ lost. The change fixes that.
+
+ * mh-e.el (mh-get-new-mail): Make inc more efficient by reusing
+ the existing user sequence notation and deleted/refiled notation.
+
+2004-08-24 Bill Wohler <wohler@newt.com>
+
+ * mh-e.el (Version, mh-version): Added +cvs to release number.
+
+2004-08-24 Bill Wohler <wohler@newt.com>
+
+ Released MH-E version 7.82.
* MH-E-NEWS, README: Updated for release 7.82.
- * mh-e.el (Version, mh-version): Update for release 7.82.
+ * mh-e.el (Version, mh-version): Updated for release 7.82.
2004-08-24 Bill Wohler <wohler@newt.com>
@@ -52,11 +330,11 @@
2004-08-21 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.81.
+ Released MH-E version 7.81.
* MH-E-NEWS, README: Updated for release 7.81.
- * mh-e.el (Version, mh-version): Update for release 7.81.
+ * mh-e.el (Version, mh-version): Updated for release 7.81.
2004-08-21 Bill Wohler <wohler@newt.com>
@@ -89,7 +367,7 @@
2004-08-15 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.4.80.
+ Released MH-E version 7.4.80.
* MH-E-NEWS, README: Updated for release 7.4.80.
@@ -319,13 +597,13 @@
are more useful than a key sequence in these cases. Use "See also"
instead of "See also documentation for".
- * Merged in 7.4.4 changes, described below.
+ Merged in 7.4.4 changes, described below.
* mh-e.el (Version, mh-version): Set to 7.4.4+cvs.
2004-07-10 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.4.4.
+ Released MH-E version 7.4.4.
* MH-E-NEWS, README: Updated for release 7.4.4.
@@ -394,9 +672,9 @@
routines in the best way possible (closes SF #930012).
(require 'mouse): To shush compiler.
- * Use new function mh-require-cl throughout.
+ Use new function mh-require-cl throughout.
- * Add arch taglines (courtesy Miles Bader).
+ Add arch taglines (courtesy Miles Bader).
* mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and
mh-xemacs-icons.el with mh-xemacs.el.
@@ -536,7 +814,7 @@
2003-11-18 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.4.3.
+ Released MH-E version 7.4.3.
* MH-E-NEWS, README: Updated for release 7.4.3.
@@ -679,8 +957,8 @@
2003-11-04 Steve Youngs <sryoungs@bigpond.net.au>
- * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate mh-loaddefs.el
- in XEmacs.
+ * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate
+ mh-loaddefs.el in XEmacs.
(XEMACS_LOADDEFS_COOKIE): Ditto.
(XEMACS_LOADDEFS_PKG_NAME): Ditto.
(xemacs): Add target to build mh-loaddefs.el in XEmacs
@@ -1358,7 +1636,7 @@
2003-08-19 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.4.2.
+ Released MH-E version 7.4.2.
* MH-E-NEWS, README: Updated for release 7.4.2.
@@ -2228,7 +2506,7 @@
2003-06-25 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.4.1.
+ Released MH-E version 7.4.1.
* MH-E-NEWS, README: Updated for release 7.4.1.
@@ -2250,7 +2528,7 @@
2003-06-24 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.4.
+ Released MH-E version 7.4.
* MH-E-NEWS, README: Updated for release 7.4.
@@ -3357,7 +3635,7 @@
2003-04-24 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.3.
+ Released MH-E version 7.3.
* MH-E-NEWS, README: Updated for release 7.3.
@@ -4915,7 +5193,7 @@
2003-02-03 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.2.
+ Released MH-E version 7.2.
* MH-E-NEWS, README: Updated for release 7.2.
@@ -5579,7 +5857,7 @@
2003-01-07 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.1.
+ Released MH-E version 7.1.
* MH-E-NEWS, README: Updated for release 7.1.
@@ -6673,7 +6951,7 @@
2002-11-29 Bill Wohler <wohler@newt.com>
- * Released MH-E version 7.0.
+ Released MH-E version 7.0.
* mh-e.el (Version, mh-version): Updated for release 7.0.
@@ -6698,7 +6976,7 @@
2002-11-21 Bill Wohler <wohler@newt.com>
- * Released MH-E version 6.1.91.
+ Released MH-E version 6.1.91.
* mh-e.el (Version, mh-version): Updated for release 6.1.91.
@@ -6722,7 +7000,7 @@
2002-11-15 Bill Wohler <wohler@newt.com>
- * Released MH-E version 6.1.90.
+ Released MH-E version 6.1.90.
* README (Compile): New section. Users must now compile MH-E due
to the vagaries of the various versions of gnus.
@@ -9683,7 +9961,7 @@
2002-04-08 Bill Wohler <wohler@newt.com>
- * Released mh-e version 6.1.
+ Released mh-e version 6.1.
* mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component
Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp
@@ -9787,7 +10065,7 @@
2001-12-16 Bill Wohler <wohler@newt.com>
- * Released mh-e version 6.0.
+ Released mh-e version 6.0.
* MH-E-NEWS: Be a little more specific about incompatible changes.
Added info about outdated manual.
@@ -9810,7 +10088,7 @@
2001-12-14 Bill Wohler <wohler@newt.com>
- * Released mh-e version 5.0.93.
+ Released mh-e version 5.0.93.
* Makefile (MH-E-SRC): Added mh-xemacs-compat.el.
(MH-E-IMG): Added .pbm images for all. Removed mail_ prefix from
@@ -9995,7 +10273,7 @@
2001-12-04 Bill Wohler <wohler@newt.com>
- * Released mh-e version 5.0.92.
+ Released mh-e version 5.0.92.
* mh-utils.el (gnus-cite-face-list)
(mh-gnus-article-highlight-citation): Don't autoload. Revert to
@@ -10005,7 +10283,7 @@
2001-12-03 Bill Wohler <wohler@newt.com>
- * Released mh-e version 5.0.91.
+ Released mh-e version 5.0.91.
* MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now
that workaround has been implemented.
@@ -10911,17 +11189,17 @@
2001-04-14 chad brown <y@mit.edu>
- * rearrange the font-lock keywords a bit
+ Rearrange the font-lock keywords a bit.
2001-04-12 chad brown <y@mit.edu>
- * preliminary (somewhat boring) font-lock support for mh-e. More
+ Preliminary (somewhat boring) font-lock support for mh-e. More
interesting font-lock support probably wants to have better
support for multiple format files
2001-02-24 chad brown <y@mit.edu>
- * add default nmh paths to mh-find-prog in mh-utils.el.
+ Add default nmh paths to mh-find-prog in mh-utils.el.
change to mh-kill-folder in mh-funcs.el to make it more general.
2001-02-19 Bill Wohler <wohler@newt.com>
@@ -10934,10 +11212,10 @@
(dist): Leave release in current directory.
-Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
;;; 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 @@
;;; mh-acros.el --- Macros used in MH-E
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2004 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -40,6 +40,7 @@
;;; Code:
(require 'cl)
+(require 'advice)
;; The Emacs coding conventions require that the cl package not be required at
;; 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."
(defmacro mh-funcall-if-exists (function &rest args)
"Call FUNCTION with ARGS as parameters if it exists."
- (if (fboundp function)
- `(funcall ',function ,@args)))
+ (when (fboundp function)
+ `(when (fboundp ',function)
+ (funcall ',function ,@args))))
(defmacro mh-make-local-hook (hook)
"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 @@
;;; mh-alias.el --- MH-E mail alias completion and expansion
;;
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 1997,
+;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -162,16 +163,16 @@ Exclude all aliases already in `mh-alias-alist' from `ali'"
(while (< (point) (point-max))
(cond
((looking-at "\\([^:]*\\):[^:]*:\\([^:]*\\):[^:]*:\\([^:]*\\):")
- (when (> (string-to-int (match-string 2)) 200)
+ (when (> (string-to-number (match-string 2)) 200)
(let* ((username (match-string 1))
(gecos-name (match-string 3))
(realname (mh-alias-gecos-name
gecos-name username
mh-alias-passwd-gecos-comma-separator-flag))
(alias-name (if mh-alias-local-users-prefix
- (concat mh-alias-local-users-prefix
- (mh-alias-suggest-alias realname t))
- username))
+ (concat mh-alias-local-users-prefix
+ (mh-alias-suggest-alias realname t))
+ username))
(alias-translation
(if (string-equal username realname)
(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 @@
;;; mh-comp.el --- MH-E functions for composing messages
-;; Copyright (C) 1993, 95, 1997, 2000, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 1997,
+;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -52,7 +53,6 @@
(defvar mh-identity-menu)
;;; Autoloads
-(autoload 'Info-goto-node "info")
(autoload 'mail-mode-fill-paragraph "sendmail")
(autoload 'mm-handle-displayed-p "mm-decode")
@@ -490,8 +490,10 @@ to reply to:
cc/all sender and all recipients.
If optional prefix argument INCLUDEP provided, then include the message
in the reply using filter `mhl.reply' in your MH directory.
-If the file named by `mh-repl-formfile' exists, it is used as a skeleton
-for the reply.
+If the file named by `mh-repl-formfile' exists, it is used as a skeleton for
+the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU
+mailutils variants and the file names by `mh-repl-group-formfile' exists, it
+is used instead.
See also `mh-send'."
(interactive (list
@@ -1629,15 +1631,22 @@ This is useful in breaking up paragraphs in replies."
(defun mh-complete-word (word choices begin end)
"Complete WORD at from CHOICES.
Any match found replaces the text from BEGIN to END."
- (let ((completion (try-completion word choices)))
+ (let ((completion (try-completion word choices))
+ (completions-buffer "*Completions*"))
(cond ((eq completion t)
+ (ignore-errors
+ (kill-buffer completions-buffer))
(message "Completed: %s" word))
((null completion)
+ (ignore-errors
+ (kill-buffer completions-buffer))
(message "No completion for `%s'" word))
((stringp completion)
(if (equal word completion)
- (with-output-to-temp-buffer "*Completions*"
+ (with-output-to-temp-buffer completions-buffer
(display-completion-list (all-completions word choices)))
+ (ignore-errors
+ (kill-buffer completions-buffer))
(delete-region begin end)
(insert completion))))))
@@ -1965,8 +1974,6 @@ Otherwise return the empty string."
;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el.
-;;;###autoload(add-to-list 'auto-mode-alist '("/drafts/[0-9]+\\'" . mh-letter-mode))
-
(provide 'mh-comp)
;;; 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 @@
;;; mh-customize.el --- MH-E customization
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -69,8 +69,6 @@
(mh-require-cl)
(require 'mh-loaddefs)
-(autoload 'Info-goto-node "info")
-
(eval-and-compile
(defvar mh-xemacs-flag (featurep 'xemacs)
"Non-nil means the current Emacs is XEmacs."))
@@ -102,121 +100,115 @@ the frame are removed."
;;; MH-E Customization Groups
-(defgroup mh nil
+(defgroup mh-e nil
"Emacs interface to the MH mail system.
MH is the Rand Mail Handler. Other implementations include nmh and GNU
mailutils."
:link '(custom-manual "(mh-e)Top")
:group 'mail)
-(defgroup mh-e '((mh custom-group)) ; Sort of an alias for 'mh group
- "Emacs interface to the MH mail system.
-MH is the Rand Mail Handler. Other implementations include nmh and GNU
-mailutils."
- :link '(custom-manual "(mh-e)Top"))
-
(defgroup mh-alias nil
"Aliases."
:link '(custom-manual "(mh-e)Aliases")
:prefix "mh-alias-"
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-folder nil
"Organizing your mail with folders."
:prefix "mh-"
:link '(custom-manual "(mh-e)Organizing")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-folder-selection nil
"Folder selection."
:prefix "mh-"
:link '(custom-manual "(mh-e)Folder Selection")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-identity nil
"Identities."
:link '(custom-manual "(mh-e)Identities")
:prefix "mh-identity-"
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-inc nil
"Incorporating your mail."
:prefix "mh-inc-"
:link '(custom-manual "(mh-e)Incorporating Mail")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-index nil
"Searching."
:link '(custom-manual "(mh-e)Searching")
:prefix "mh-index-"
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-junk nil
"Dealing with junk mail."
:link '(custom-manual "(mh-e)Junk")
:prefix "mh-junk-"
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-letter nil
"Editing a draft."
:prefix "mh-"
:link '(custom-manual "(mh-e)Editing Drafts")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-ranges nil
"Ranges."
:prefix "mh-"
:link '(custom-manual "(mh-e)Ranges")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-scan-line-formats nil
"Scan line formats."
:link '(custom-manual "(mh-e)Scan Line Formats")
:prefix "mh-"
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-sending-mail nil
"Sending mail."
:prefix "mh-"
:link '(custom-manual "(mh-e)Sending Mail")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-sequences nil
"Sequences."
:prefix "mh-"
:link '(custom-manual "(mh-e)Sequences")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-show nil
"Reading your mail."
:prefix "mh-"
:link '(custom-manual "(mh-e)Reading Mail")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-speed nil
"The speedbar."
:prefix "mh-speed-"
:link '(custom-manual "(mh-e)Speedbar")
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-toolbar nil
"The toolbar"
:link '(custom-manual "(mh-e)Toolbar")
:prefix "mh-"
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-faces nil
"Faces used in MH-E."
:link '(custom-manual "(mh-e)Top")
:prefix "mh-"
:group 'faces
- :group 'mh)
+ :group 'mh-e)
(defgroup mh-hooks nil
"MH-E hooks."
:link '(custom-manual "(mh-e)Top")
:prefix "mh-"
- :group 'mh)
+ :group 'mh-e)
;;; Faces
@@ -280,7 +272,7 @@ accordingly."
:set (lambda (symbol value)
(set-default symbol value) ;Done in mh-variant-set-variant!
(mh-variant-set value))
- :group 'mh)
+ :group 'mh-e)
@@ -448,14 +440,34 @@ information."
(defcustom mh-identity-list nil
"*List of identities.
-Each element consists of an identity label, and a collection of header fields
-and a signature to insert if the identity is selected (see
-`mh-identity-default', `mh-insert-identity' and the `Identity' menu in a
-MH-Letter buffer). The `Value Menu' contains the common header fields `From'
-and `Organization'. Other header fields may be added using the `Other Field'
-menu item. The `Signature' menu item is used to insert a signature with
-`mh-insert-signature'. The `GPG Key ID' menu item is used to specify a
-different key to sign or encrypt messages."
+To customize this option, click on the `INS' button and enter a label such as
+`Home' or `Work'. Then click on the `INS' button with the label `Add at least
+one item below'. Then choose one of the items in the `Value Menu'.
+
+You can specify an alternate `From:' header field using the `From Field' menu
+item. You must include a valid email address. A standard format is `First Last
+<login@@host.domain>'. If you use an initial with a period, then you must
+quote your name as in `\"First I. Last\" <login@@host.domain>'. People usually
+list the name of the company where they work using the `Organization Field'
+menu item. Set any arbitrary header field and value in the `Other Field' menu
+item. Unless the header field is a standard one, precede the name of your
+field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of
+`Attribution Verb' overrides the setting of
+`mh-extract-from-attribution-verb'. Set your signature with the `Signature'
+menu item. You can specify the contents of `mh-signature-file-name', a file,
+or a function. Specify a different key to sign or encrypt messages with the
+`GPG Key ID' menu item.
+
+You can select the identities you have added via the menu called `Identity' in
+the MH-Letter buffer. You can also use \\[mh-insert-identity]. To clear the
+fields and signature added by the identity, select the `None' identity.
+
+The `Identity' menu contains two other items to save you from having to set
+the identity on every message. The menu item `Set Default for Session' can be
+used to set the default identity to the current identity until you exit Emacs.
+The menu item `Save as Default' sets the option `mh-identity-default' to the
+current identity setting. You can also customize the `mh-identity-default'
+option in the usual fashion."
:type '(repeat (list :tag ""
(string :tag "Label")
(repeat :tag "Add at least one item below"
@@ -489,12 +501,38 @@ different key to sign or encrypt messages."
(defcustom mh-auto-fields-list nil
"List of recipients for which header lines are automatically inserted.
-Each element consists of the recipient, which is a regular expression, and a
-collection of header fields and identities to insert if the message is sent to
-this recipient. The `Value Menu' contains the common header fields `Fcc' and
-`Mail-Followup-To'. Other header fields may be added using the `Other Field'
-menu item. The `Identity' menu item is used to insert entire identities with
-`mh-insert-identity'."
+
+This option can be used to set the identity depending on the recipient. To
+customize this option, click on the `INS' button and enter a regular
+expression for the recipient's address. Click on the `INS' button with the
+`Add at least one item below' label. Then choose one of the items in the
+`Value Menu'.
+
+The `Identity' menu item is used to select an identity from those configured
+in `mh-identity-list'. All of the information for that identity will be added
+if the recipient matches. The `Fcc Field' menu item is used to select a folder
+that is used in the `Fcc:' header. When you send the message, MH will put a
+copy of your message in this folder. The `Mail-Followup-To Field' menu item is
+used to insert an `Mail-Followup-To:' header field with the recipients you
+provide. If the recipient's mail user agent supports this header field (as nmh
+does), then their replies will go to the addresses listed. This is useful if
+their replies go both to the list and to you and you don't have a mechanism to
+suppress duplicates. If you reply to someone not on the list, you must either
+remove the `Mail-Followup-To:' field, or ensure the recipient is also listed
+there so that he receives replies to your reply. Other header fields may be
+added using the `Other Field' menu item.
+
+These fields can only be added after the recipient is known. Once the header
+contains one or more recipients, run the \\[mh-insert-auto-fields] command or
+choose the `Identity -> Insert Auto Fields' menu item to insert these fields
+manually. However, you can just send the message and the fields will be added
+automatically. You are given a chance to see these fields and to confirm them
+before the message is actually sent. You can do away with this confirmation by
+turning off the option `mh-auto-fields-prompt-flag'.
+
+You should avoid using the same header field in `mh-auto-fields-list' and
+`mh-identity-list' definitions that may apply to the same message as the
+result is undefined."
:type `(repeat
(list :tag ""
(string :tag "Recipient")
@@ -525,7 +563,8 @@ See `mh-auto-fields-list'."
:group 'mh-identity)
(defcustom mh-identity-default nil
- "Default identity to use when `mh-letter-mode' is called."
+ "Default identity to use when `mh-letter-mode' is called.
+See `mh-identity-list'."
:type (append
'(radio)
(cons '(const :tag "None" nil)
@@ -534,16 +573,32 @@ See `mh-auto-fields-list'."
:group 'mh-identity)
(defcustom mh-identity-handlers
- '((":default" . mh-identity-handler-bottom)
- ("from" . mh-identity-handler-top)
+ '(("From" . mh-identity-handler-top)
+ (":default" . mh-identity-handler-bottom)
(":attribution-verb" . mh-identity-handler-attribution-verb)
(":signature" . mh-identity-handler-signature)
(":pgg-default-user-id" . mh-identity-handler-gpg-identity))
"Handler functions for fields in `mh-identity-list'.
-This is an alist of fields (strings) and handlers (functions). Strings are
-lowercase. Use \":signature\" for Signature and \":pgg-default-user-id\" for
-GPG Key ID. The function associated with the string \":default\" is used if no
-other functions are appropriate."
+
+This option is used to change the way that fields, signatures, and
+attributions in `mh-identity-list' are added. To customize
+`mh-identity-handlers', replace the name of an existing handler function
+associated with the field you want to change with the name of a function you
+have written. You can also click on an `INS' button and insert a field of your
+choice and the name of the function you have written to handle it.
+
+The `Field' field can be any field that you've used in your
+`mh-identity-list'. The special fields `:attribution-verb', `:signature', or
+`:pgg-default-user-id' are used for the `mh-identity-list' choices
+`Attribution Verb', `Signature', and `GPG Key ID' respectively.
+
+The handler associated with the `:default' field is used when no other field
+matches.
+
+The handler functions are passed two or three arguments: the FIELD itself (for
+example, `From'), or one of the special fields (for example, `:signature'),
+and the ACTION `'remove' or `'add'. If the action is `'add', an additional
+argument containing the VALUE for the field is given."
:type '(repeat (cons (string :tag "Field") function))
:group 'mh-identity)
@@ -552,45 +607,45 @@ other functions are appropriate."
;;; Incorporating Your Mail (:group 'mh-inc)
(defcustom mh-inc-prog "inc"
- "*Program to run to incorporate new mail into a folder.
-Normally \"inc\". This program is relative to the `mh-progs' directory unless
-it is an absolute pathname."
+ "*Program to incorporate new mail into a folder.
+
+This program generates a one-line summary for each of the new messages. Unless
+it is an absolute pathname, the file is assumed to be in the `mh-progs'
+directory. You may also link a file to `inc' that uses a different format.
+You'll then need to modify several scan line format variables appropriately."
:type 'string
:group 'mh-inc)
(defcustom mh-inc-spool-list nil
- "*Alist of alternate spool files, corresponding folders and keybindings.
-This option will be described by example.
+ "*Alternate spool files.
+
+You can use the `mh-inc-spool-list' variable to direct MH-E to retrieve mail
+from arbitrary spool files other than your system mailbox, file it in folders
+other than your `+inbox', and assign key bindings to incorporate this mail.
-Suppose you have subscribed to the mh-e-devel mailing list and you use
-procmail to filter its mail into `~/mail/mh-e' with the following
-`.procmailrc' recipe:
+Suppose you are subscribed to the `mh-e-devel' mailing list and you use
+`procmail' to filter this mail into `~/mail/mh-e' with the following recipe in
+`.procmailrc':
MAILDIR=$HOME/mail
:0:
- * ^From mh-e-devel-admin@lists.sourceforge.net
+ * ^From mh-e-devel-admin@stop.mail-abuse.org
mh-e
-If you wanted to incorporate that spool file into an MH folder called mh-e
-with the \"I m\" or \\[mh-inc-spool-mh-e] commands, you would use the
-following:
+In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m'
+\(`mh-inc-spool-mh-e'\) command, customize this option, and click on the `INS'
+button. Enter a `Spool File' of `~/mail/mh-e', a `Folder' of `mh-e', and a
+`Key Binding' of `m'.
- Spool File: ~/mail/mh-e
- Folder: mh-e
- Key Binding: m
-
-Then, you could also install `xbuffy' and configure an extra mailbox using the
-gnuserv package to run the `mh-inc-spool-mh-e' command in Emacs:
+You can use `xbuffy' to automate the incorporation of this mail using the
+`gnudoit' command in the `gnuserv' package as follows:
box ~/mail/mh-e
title mh-e
origMode
polltime 10
headertime 0
- command gnudoit -q '(mh-inc-spool-mh-e)'
-
-To incorporate the spool file, click the xbuffy box with the middle mouse
-button."
+ command gnudoit -q '(mh-inc-spool-mh-e)'"
:type '(repeat (list (file :tag "Spool File")
(string :tag "Folder")
(character :tag "Key Binding")))
@@ -602,10 +657,10 @@ button."
;;; Searching (:group 'mh-index)
(defcustom mh-index-new-messages-folders t
- "Folders searched for the `unseen' sequence.
-This option can be set to `Inbox' to search the `+inbox' folder or `All' to
+ "Folders searched for the \"unseen\" sequence.
+Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to
search all of the top level folders. Otherwise, list the folders that should
-be searched with the `Choose Folders' menu item.
+be searched with the \"Choose Folders\" menu item.
See also `mh-recursive-folders-flag'."
:group 'mh-index
@@ -633,9 +688,9 @@ found in the documentation of `mh-index-search'."
(defcustom mh-index-ticked-messages-folders t
"Folders searched for `mh-tick-seq'.
-This option can be set to `Inbox' to search the `+inbox' folder or `All' to
+Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to
search all of the top level folders. Otherwise, list the folders that should
-be searched with the `Choose Folders' menu item.
+be searched with the \"Choose Folders\" menu item.
See also `mh-recursive-folders-flag'."
:group 'mh-index
@@ -672,6 +727,15 @@ bound to the new value of `mh-junk-program'. The function sets the variable
finally return (car element)))))
;; User customizable variables
+(defcustom mh-junk-background nil
+ "If on, spam programs are run in background.
+By default, the programs are run in the foreground, but this can be slow when
+junking large numbers of messages. If you have enough memory or don't junk
+that many messages at the same time, you might try turning on this option."
+ :type '(choice (const :tag "Off" nil)
+ (const :tag "On" 0))
+ :group 'mh-junk)
+
(defcustom mh-junk-disposition nil
"Disposition of junk mail."
: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
(defcustom mh-junk-program nil
"Spam program that MH-E should use.
-The default setting of this option is `Auto-detect' which means that MH-E will
-automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in that
-order. If, for example, you have both SpamAssassin and Bogofilter installed
-and you want to use BogoFilter, then you can set this option to `Bogofilter'."
+
+The default setting of this option is \"Auto-detect\" which means that MH-E
+will automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in
+that order. If, for example, you have both SpamAssassin and Bogofilter
+installed and you want to use BogoFilter, then you can set this option to
+\"Bogofilter\"."
:type '(choice (const :tag "Auto-detect" nil)
(const :tag "SpamAssassin" spamassassin)
(const :tag "Bogofilter" bogofilter)
@@ -691,32 +757,10 @@ and you want to use BogoFilter, then you can set this option to `Bogofilter'."
:set 'mh-junk-choose
:group 'mh-junk)
-(defcustom mh-junk-background nil
- "If on, spam programs are run in background.
-By default, the programs are run in the foreground, but this can be slow when
-junking large numbers of messages. If you have enough memory or don't junk
-that many messages at the same time, you might try turning on this option."
- :type '(choice (const :tag "Off" nil)
- (const :tag "On" 0))
- :group 'mh-junk)
-
;;; Editing a Draft (:group 'mh-letter)
-(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none")
- "Default method to use in security directives."
- :type '(choice (const :tag "PGP (MIME)" "pgpmime")
- (const :tag "PGP" "pgp")
- (const :tag "S/MIME" "smime")
- (const :tag "None" "none"))
- :group 'mh-letter)
-
-(defcustom mh-compose-forward-as-mime-flag t
- "Non-nil means that messages are forwarded as a MIME part."
- :type 'boolean
- :group 'mh-letter)
-
(defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn)
"Type of MIME message directives in messages.
@@ -761,11 +805,6 @@ by \\<mh-letter-mode-map>\\[mh-insert-letter] or \\[mh-yank-cur-msg]."
:type 'string
:group 'mh-letter)
-(defcustom mh-insert-x-mailer-flag t
- "*Non-nil means append an X-Mailer field to the header."
- :type 'boolean
- :group 'mh-letter)
-
(defcustom mh-letter-complete-function 'ispell-complete-word
"*Function to call when completing outside of address or folder fields.
By 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."
:type 'integer
:group 'mh-letter)
-(defcustom mh-reply-show-message-flag t
- "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply].
-
-The setting of this variable determines whether the MH `show-buffer' is
-displayed with the current message when using `mh-reply' without a prefix
-argument. Set it to nil if you already include the message automatically
-in your draft using
- repl: -filter repl.filter
-in your ~/.mh_profile file."
- :type 'boolean
+(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none")
+ "Default method to use in security directives."
+ :type '(choice (const :tag "PGP (MIME)" "pgpmime")
+ (const :tag "PGP" "pgp")
+ (const :tag "S/MIME" "smime")
+ (const :tag "None" "none"))
:group 'mh-letter)
(defcustom mh-signature-file-name "~/.signature"
@@ -881,14 +916,14 @@ If nil, yank only the portion of the message following the point.
If the show buffer has a region, this variable is ignored unless its value is
one of `attribution' or `autoattrib' in which case the attribution is added
to the yanked region."
- :type '(choice (const :tag "Below point" nil)
- (const :tag "Without header" body)
+ :type '(choice (const :tag "Body and Header" t)
+ (const :tag "Body" body)
+ (const :tag "Below Point" nil)
(const :tag "Invoke supercite" supercite)
- (const :tag "Invoke supercite, automatically" autosupercite)
- (const :tag "Without header, with attribution" attribution)
- (const :tag "Without header, with attribution, automatically"
- autoattrib)
- (const :tag "Entire message with headers" t))
+ (const :tag "Invoke supercite, Automatically" autosupercite)
+ (const :tag "Body With Attribution" attribution)
+ (const :tag "Body With Attribution, Automatically"
+ autoattrib))
:group 'mh-letter)
@@ -947,6 +982,11 @@ for relative to the `mh-progs' directory unless it is an absolute pathname."
;;; Sending Mail (:group 'mh-sending-mail)
+(defcustom mh-compose-forward-as-mime-flag t
+ "Non-nil means that messages are forwarded as a MIME part."
+ :type 'boolean
+ :group 'mh-sending-mail)
+
(defcustom mh-compose-letter-function nil
"Invoked when setting up a letter draft.
It is passed three arguments: TO recipients, SUBJECT, and CC recipients."
@@ -965,6 +1005,11 @@ message and the original subject line."
:type 'string
:group 'mh-sending-mail)
+(defcustom mh-insert-x-mailer-flag t
+ "*Non-nil means append an X-Mailer field to the header."
+ :type 'boolean
+ :group 'mh-sending-mail)
+
(defcustom mh-reply-default-reply-to nil
"*Sets the person or persons to whom a reply will be sent.
If 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."
(const "cc") (const "all"))
:group 'mh-sending-mail)
+(defcustom mh-reply-show-message-flag t
+ "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply].
+
+The setting of this variable determines whether the MH `show-buffer' is
+displayed with the current message when using `mh-reply' without a prefix
+argument. Set it to nil if you already include the message automatically
+in your draft using
+ repl: -filter repl.filter
+in your ~/.mh_profile file."
+ :type 'boolean
+ :group 'mh-sending-mail)
+
;;; Sequences (:group 'mh-sequences)
@@ -1120,6 +1177,7 @@ The gnus method uses a different color for each indentation."
"Delivered-To:" ; Egroups/yahoogroups mailing list manager
"Delivery-Date:" ; MH
"Delivery:"
+ "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys
"Encoding:"
"Envelope-to:"
"Errors-To:"
@@ -1188,6 +1246,7 @@ The gnus method uses a different color for each indentation."
"X-Envelope-From:"
"X-Envelope-Sender:"
"X-Envelope-To:"
+ "X-Evolution:" ; Evolution mail client
"X-Face:"
"X-Folder:" ; Spam
"X-From-Line"
@@ -1264,6 +1323,7 @@ The gnus method uses a different color for each indentation."
"X-Trace:"
"X-UID"
"X-UIDL:"
+ "X-USANET-" ; usa.net
"X-UserInfo1:"
"X-VSMLoop:" ; NTMail
"X-Vms-To:"
@@ -1527,13 +1587,13 @@ Optional argument ARG is not used."
(defun mh-tool-bar-folder-help ()
"Visit \"(mh-e)Top\"."
(interactive)
- (Info-goto-node "(mh-e)Top")
+ (info "(mh-e)Top")
(delete-other-windows))
(defun mh-tool-bar-letter-help ()
"Visit \"(mh-e)Draft Editing\"."
(interactive)
- (Info-goto-node "(mh-e)Draft Editing")
+ (info "(mh-e)Draft Editing")
(delete-other-windows))
(defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag)
@@ -1907,9 +1967,9 @@ This button runs `mh-previous-undeleted-msg'")
;; Common buttons
(mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences")
(mh-tool-bar-folder-help (folder) "help"
- "Help! (general help)\nThis button runs `Info-goto-node'")
+ "Help! (general help)\nThis button runs `info'")
(mh-tool-bar-letter-help (letter) "help"
- "Help! (general help)\nThis button runs `Info-goto-node'")
+ "Help! (general help)\nThis button runs `info'")
;; Folder narrowed to sequence buttons
(mh-widen (sequence) "widen"
"Widen from the sequence\nThis button runs `mh-widen'"))
@@ -2085,7 +2145,7 @@ will be removed from the unseen sequence."
;;; Faces Used in Scan Listing (:group 'mh-folder-faces)
(defvar mh-folder-body-face 'mh-folder-body-face
- "Face for highlighting body text in MH-Folder buffers.")
+ "Face used to highlight body text in MH-Folder buffers.")
(defface mh-folder-body-face
'((((type tty) (class color)) (:foreground "green"))
(((class grayscale) (background light)) (:foreground "DimGray" :italic t))
@@ -2093,11 +2153,11 @@ will be removed from the unseen sequence."
(((class color) (background light)) (:foreground "RosyBrown"))
(((class color) (background dark)) (:foreground "LightSalmon"))
(t (:italic t)))
- "Face for highlighting body text in MH-Folder buffers."
+ "Face used to highlight body text in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face
- "Face for the current message line in MH-Folder buffers.")
+ "Face used for the current message line in MH-Folder buffers.")
(defface mh-folder-cur-msg-face
'((((type tty pc) (class color))
(:background "LightGreen"))
@@ -2108,11 +2168,11 @@ will be removed from the unseen sequence."
(((class color) (background dark))
(:background "DarkOliveGreen4"))
(t (:underline t)))
- "Face for the current message line in MH-Folder buffers."
+ "Face used for the current message line in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face
- "Face for highlighting the current message in MH-Folder buffers.")
+ "Face used to highlight the current message in MH-Folder buffers.")
(defface mh-folder-cur-msg-number-face
'((((type tty) (class color)) (:foreground "cyan" :weight bold))
(((class grayscale) (background light)) (:foreground "LightGray" :bold t))
@@ -2120,11 +2180,11 @@ will be removed from the unseen sequence."
(((class color) (background light)) (:foreground "Purple"))
(((class color) (background dark)) (:foreground "Cyan"))
(t (:bold t)))
- "Face for highlighting the current message in MH-Folder buffers."
+ "Face used to highlight the current message in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-date-face 'mh-folder-date-face
- "Face for highlighting the date in MH-Folder buffers.")
+ "Face used to highlight the date in MH-Folder buffers.")
(defface mh-folder-date-face
'((((class color) (background light))
(:foreground "snow4"))
@@ -2132,11 +2192,11 @@ will be removed from the unseen sequence."
(:foreground "snow3"))
(t
(:bold t)))
- "Face for highlighting the date in MH-Folder buffers."
+ "Face used to highlight the date in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-followup-face 'mh-folder-followup-face
- "Face for highlighting Re: (followup) subject text in MH-Folder buffers.")
+ "Face used to highlight Re: subject text in MH-Folder buffers.")
(defface mh-folder-followup-face
'((((class color) (background light))
(:foreground "blue3"))
@@ -2144,11 +2204,11 @@ will be removed from the unseen sequence."
(:foreground "LightGoldenRod"))
(t
(:bold t)))
- "Face for highlighting Re: (followup) subject text in MH-Folder buffers."
+ "Face used to highlight Re: subject text in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-msg-number-face 'mh-folder-msg-number-face
- "Face for highlighting the message number in MH-Folder buffers.")
+ "Face used to highlight the message number in MH-Folder buffers.")
(defface mh-folder-msg-number-face
'((((class color) (background light))
(:foreground "snow4"))
@@ -2156,15 +2216,15 @@ will be removed from the unseen sequence."
(:foreground "snow3"))
(t
(:bold t)))
- "Face for highlighting the message number in MH-Folder buffers."
+ "Face used to highlight the message number in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-deleted-face 'mh-folder-deleted-face
- "Face for highlighting deleted messages in MH-Folder buffers.")
+ "Face used to highlight deleted messages in MH-Folder buffers.")
(copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face)
(defvar mh-folder-refiled-face 'mh-folder-refiled-face
- "Face for highlighting refiled messages in MH-Folder buffers.")
+ "Face used to highlight refiled messages in MH-Folder buffers.")
(defface mh-folder-refiled-face
'((((type tty) (class color)) (:foreground "yellow" :weight light))
(((class grayscale) (background light))
@@ -2174,11 +2234,11 @@ will be removed from the unseen sequence."
(((class color) (background light)) (:foreground "DarkGoldenrod"))
(((class color) (background dark)) (:foreground "LightGoldenrod"))
(t (:bold t :italic t)))
- "Face for highlighting refiled messages in MH-Folder buffers."
+ "Face used to highlight refiled messages in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-subject-face 'mh-folder-subject-face
- "Face for highlighting subject text in MH-Folder buffers.")
+ "Face used to highlight subject text in MH-Folder buffers.")
(if (boundp 'facemenu-unlisted-faces)
(add-to-list 'facemenu-unlisted-faces "^mh-folder"))
(defface mh-folder-subject-face
@@ -2188,7 +2248,7 @@ will be removed from the unseen sequence."
(:foreground "yellow"))
(t
(:bold t)))
- "Face for highlighting subject text in MH-Folder buffers."
+ "Face used to highlight subject text in MH-Folder buffers."
:group 'mh-folder-faces)
(defface mh-folder-tick-face
@@ -2199,15 +2259,15 @@ will be removed from the unseen sequence."
:group 'mh-folder-faces)
(defvar mh-folder-address-face 'mh-folder-address-face
- "Face for highlighting the address in MH-Folder buffers.")
+ "Face used to highlight the address in MH-Folder buffers.")
(copy-face 'mh-folder-subject-face 'mh-folder-address-face)
(defvar mh-folder-scan-format-face 'mh-folder-scan-format-face
- "Face for highlighting `mh-scan-format-regexp' matches in MH-Folder buffers.")
+ "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.")
(copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face)
(defvar mh-folder-to-face 'mh-folder-to-face
- "Face for highlighting the To: string in MH-Folder buffers.")
+ "Face used to highlight the To: string in MH-Folder buffers.")
(defface mh-folder-to-face
'((((type tty) (class color)) (:foreground "green"))
(((class grayscale) (background light)) (:foreground "DimGray" :italic t))
@@ -2215,7 +2275,7 @@ will be removed from the unseen sequence."
(((class color) (background light)) (:foreground "RosyBrown"))
(((class color) (background dark)) (:foreground "LightSalmon"))
(t (:italic t)))
- "Face for highlighting the To: string in MH-Folder buffers."
+ "Face used to highlight the To: string in MH-Folder buffers."
:group 'mh-folder-faces)
@@ -2223,7 +2283,7 @@ will be removed from the unseen sequence."
;;; Faces Used in Searching (:group 'mh-index-faces)
(defvar mh-index-folder-face 'mh-index-folder-face
- "Face for highlighting folders in MH-Index buffers.")
+ "Face used to highlight folders in MH-Index buffers.")
(defface mh-index-folder-face
'((((class color) (background light))
(:foreground "dark green" :bold t))
@@ -2231,7 +2291,7 @@ will be removed from the unseen sequence."
(:foreground "indian red" :bold t))
(t
(:bold t)))
- "Face for highlighting folders in MH-Index buffers."
+ "Face used to highlight folders in MH-Index buffers."
:group 'mh-index-faces)
@@ -2244,7 +2304,7 @@ will be removed from the unseen sequence."
(((class color) (background dark))
(:background "gray10"))
(t (:bold t)))
- "Face for displaying header fields in draft buffers."
+ "Face used to display header fields in draft buffers."
:group 'mh-letter-faces)
@@ -2252,7 +2312,7 @@ will be removed from the unseen sequence."
;;; Faces Used in Message Display (:group 'mh-show-faces)
(defvar mh-show-cc-face 'mh-show-cc-face
- "Face for highlighting cc header fields.")
+ "Face used to highlight cc: header fields.")
(defface mh-show-cc-face
'((((type tty) (class color)) (:foreground "yellow" :weight light))
(((class grayscale) (background light))
@@ -2262,11 +2322,11 @@ will be removed from the unseen sequence."
(((class color) (background light)) (:foreground "DarkGoldenrod"))
(((class color) (background dark)) (:foreground "LightGoldenrod"))
(t (:bold t :italic t)))
- "Face for highlighting cc header fields."
+ "Face used to highlight cc: header fields."
:group 'mh-show-faces)
(defvar mh-show-date-face 'mh-show-date-face
- "Face for highlighting the Date header field.")
+ "Face used to highlight the Date: header field.")
(defface mh-show-date-face
'((((type tty) (class color)) (:foreground "green"))
(((class grayscale) (background light)) (:foreground "Gray90" :bold t))
@@ -2274,7 +2334,7 @@ will be removed from the unseen sequence."
(((class color) (background light)) (:foreground "ForestGreen"))
(((class color) (background dark)) (:foreground "PaleGreen"))
(t (:bold t :underline t)))
- "Face for highlighting the Date header field."
+ "Face used to highlight the Date: header field."
:group 'mh-show-faces)
(defvar mh-show-header-face 'mh-show-header-face
@@ -2289,13 +2349,36 @@ will be removed from the unseen sequence."
"Face used to deemphasize unspecified header fields."
:group 'mh-show-faces)
+(defvar mh-show-pgg-good-face 'mh-show-pgg-good-face
+ "Face used to highlight a good PGG signature.")
+(defface mh-show-pgg-good-face
+ '((t (:bold t :foreground "LimeGreen")))
+ "Face used to highlight a good PGG signature."
+ :group 'mh-show-faces)
+
+(defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown-face
+ "Face used to highlight a PGG signature whose status is unknown.
+This face is also used for a signature when the signer is untrusted.")
+(defface mh-show-pgg-unknown-face
+ '((t (:bold t :foreground "DarkGoldenrod2")))
+ "Face used to highlight a PGG signature whose status is unknown.
+This face is also used for a signature when the signer is untrusted."
+ :group 'mh-show-faces)
+
+(defvar mh-show-pgg-bad-face 'mh-show-pgg-bad-face
+ "Face used to highlight a bad PGG signature.")
+(defface mh-show-pgg-bad-face
+ '((t (:bold t :foreground "DeepPink1")))
+ "Face used to highlight a bad PGG signature."
+ :group 'mh-show-faces)
+
(defface mh-show-signature-face
'((t (:italic t)))
- "Face for highlighting message signature."
+ "Face used to highlight the message signature."
:group 'mh-show-faces)
(defvar mh-show-to-face 'mh-show-to-face
- "Face for highlighting the To: header field.")
+ "Face used to highlight the To: header field.")
(if (boundp 'facemenu-unlisted-faces)
(add-to-list 'facemenu-unlisted-faces "^mh-show"))
(defface mh-show-to-face
@@ -2306,11 +2389,11 @@ will be removed from the unseen sequence."
(((class color) (background light)) (:foreground "SaddleBrown"))
(((class color) (background dark)) (:foreground "burlywood"))
(t (:underline t)))
- "Face for highlighting the To: header field."
+ "Face used to highlight the To: header field."
:group 'mh-show-faces)
(defvar mh-show-from-face 'mh-show-from-face
- "Face for highlighting the From: header field.")
+ "Face used to highlight the From: header field.")
(defface mh-show-from-face
'((((class color) (background light))
(:foreground "red3"))
@@ -2318,17 +2401,17 @@ will be removed from the unseen sequence."
(:foreground "cyan"))
(t
(:bold t)))
- "Face for highlighting the From: header field."
+ "Face used to highlight the From: header field."
:group 'mh-show-faces)
(defface mh-show-xface-face
'((t (:foreground "black" :background "white")))
- "Face for displaying the X-Face image.
+ "Face used to display the X-Face image.
The background and foreground is used in the image."
:group 'mh-show-faces)
(defvar mh-show-subject-face 'mh-show-subject-face
- "Face for highlighting the Subject header field.")
+ "Face used to highlight the Subject: header field.")
(copy-face 'mh-folder-subject-face 'mh-show-subject-face)
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 @@
;;; mh-e.el --- GNU Emacs interface to the MH mail system
-;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999,
-;; 2000, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1988,
+;; 1990, 1992, 1993, 1994, 1995, 1997, 1999,
+;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
-;; Version: 7.82
+;; Version: 7.84
;; Keywords: mail
;; This file is part of GNU Emacs.
@@ -97,10 +98,7 @@
(defvar font-lock-auto-fontify)
(defvar font-lock-defaults)
-(defconst mh-version "7.82" "Version number of MH-E.")
-
-;;; Autoloads
-(autoload 'Info-goto-node "info")
+(defconst mh-version "7.84" "Version number of MH-E.")
(defvar mh-partial-folder-mode-line-annotation "select"
"Annotation when displaying part of a folder.
@@ -578,7 +576,8 @@ Do not call this function from outside MH-E; use \\[mh-rmail] instead."
(setq folder mh-inbox))
(let ((threading-needed-flag nil))
(let ((config (current-window-configuration)))
- (delete-other-windows)
+ (when (and mh-show-buffer (get-buffer mh-show-buffer))
+ (delete-windows-on mh-show-buffer))
(cond ((not (get-buffer folder))
(mh-make-folder folder)
(setq threading-needed-flag mh-show-threads-flag)
@@ -717,22 +716,24 @@ updated."
(mh-refile-a-msg nil folder))
(when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg)))
-(defun mh-refile-or-write-again (message)
- "Re-execute the last refile or write command on the given MESSAGE.
+(defun mh-refile-or-write-again (range &optional interactive-flag)
+ "Re-execute the last refile or write command on the given RANGE.
Default is the displayed message. Use the same folder or file as the previous
-refile or write command."
- (interactive (list (mh-get-msg-num t)))
+refile or write command.
+If INTERACTIVE-FLAG is non-nil then the function was called interactively."
+ (interactive (list (mh-interactive-range "Redo") t))
(if (null mh-last-destination)
(error "No previous refile or write"))
(let (output)
(setq output
(cond ((eq (car mh-last-destination) 'refile)
- (mh-refile-a-msg message (cdr mh-last-destination))
+ (mh-refile-msg range (cdr mh-last-destination))
(format "Destination folder: %s" (cdr mh-last-destination)))
(t
- (apply 'mh-write-msg-to-file message (cdr mh-last-destination))
+ (mh-iterate-on-range msg range
+ (apply 'mh-write-msg-to-file msg (cdr mh-last-destination)))
+ (mh-next-msg interactive-flag)
(format "Destination: %s" (cdr mh-last-destination)))))
- (mh-next-msg (interactive-p))
(message output)))
(defun mh-quit ()
@@ -1801,7 +1802,7 @@ Return in the current buffer."
(message "inc %s..." folder))
(setq mh-next-direction 'forward)
(goto-char (point-max))
- (mh-remove-all-notation)
+ (mh-remove-cur-notation)
(let ((start-of-inc (point)))
(if maildrop-name
;; I think MH 5 used "-ms-file" instead of "-file",
@@ -1827,7 +1828,7 @@ Return in the current buffer."
start-of-inc (point-max))))
(delete-region start-of-inc (point-max))
(unwind-protect (mh-widen t)
- (mh-remove-all-notation)
+ (mh-remove-cur-notation)
(goto-char (point-max))
(setq start-of-inc (point))
(insert saved-text)
@@ -1846,7 +1847,15 @@ Return in the current buffer."
(t
(setq new-mail-flag t)))
(keep-lines mh-scan-valid-regexp) ; Flush random scan lines
- (setq mh-seq-list (mh-read-folder-sequences folder t))
+ (let* ((sequences (mh-read-folder-sequences folder t))
+ (new-cur (assoc 'cur sequences))
+ (new-unseen (assoc mh-unseen-seq sequences)))
+ (unless (assoc 'cur mh-seq-list)
+ (push (list 'cur) mh-seq-list))
+ (unless (assoc mh-unseen-seq mh-seq-list)
+ (push (list mh-unseen-seq) mh-seq-list))
+ (setcdr (assoc 'cur mh-seq-list) (cdr new-cur))
+ (setcdr (assoc mh-unseen-seq mh-seq-list) (cdr new-unseen)))
(when (equal (point-max) start-of-inc)
(mh-notate-cur))
(if new-mail-flag
@@ -1858,8 +1867,7 @@ Return in the current buffer."
(mh-thread-inc folder start-of-inc))
(mh-goto-cur-msg))
(goto-char point-before-inc))
- (mh-notate-user-sequences)
- (mh-notate-deleted-and-refiled)))))
+ (mh-notate-user-sequences (cons start-of-inc (point-max)))))))
(defun mh-make-folder-mode-line (&optional ignored)
"Set the fields of the mode line for a folder buffer.
@@ -2033,18 +2041,18 @@ with no arguments, before the commands are processed."
(mh-coalesce-msg-list msgs))
(mh-delete-scan-msgs msgs)
;; Preserve sequences in destination folder...
- (when (and mh-refile-preserves-sequences-flag
- (numberp last))
+ (when mh-refile-preserves-sequences-flag
(clrhash dest-map)
- (loop for i from (1+ last)
+ (loop for i from (1+ (or last 0))
for msg in (sort (copy-sequence msgs) #'<)
do (loop for seq-name in (gethash msg seq-map)
do (push i (gethash seq-name dest-map))))
(maphash
#'(lambda (seq msgs)
- ;; Run it in the background, since we don't care
- ;; about the results.
- (apply #'mh-exec-cmd-daemon "mark" #'ignore
+ ;; Can't be run in the background, since the
+ ;; current folder is changed by mark this could
+ ;; lead to a race condition with the next refile.
+ (apply #'mh-exec-cmd "mark"
"-sequence" (symbol-name seq) dest-folder
"-add" (mapcar #'(lambda (x) (format "%s" x))
(mh-coalesce-msg-list msgs))))
@@ -2201,13 +2209,14 @@ Expands ranges into set of individual numbers."
(end-of-line (save-excursion (end-of-line) (point)))
num)
(while (re-search-forward "[0-9]+" end-of-line t)
- (setq num (string-to-int (buffer-substring (match-beginning 0)
- (match-end 0))))
+ (setq num (string-to-number (buffer-substring (match-beginning 0)
+ (match-end 0))))
(cond ((looking-at "-") ; Message range
(forward-char 1)
(re-search-forward "[0-9]+" end-of-line t)
- (let ((num2 (string-to-int (buffer-substring (match-beginning 0)
- (match-end 0)))))
+ (let ((num2 (string-to-number
+ (buffer-substring (match-beginning 0)
+ (match-end 0)))))
(if (< num2 num)
(error "Bad message range: %d-%d" num num2))
(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 @@
;;; mh-funcs.el --- MH-E functions not everyone will use right away
-;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995,
+;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -127,7 +128,7 @@ Display the results only if something went wrong."
(set-buffer (get-buffer-create mh-temp-buffer))
(insert-before-markers output)
(when (save-excursion
- (beginning-of-buffer)
+ (goto-char (point-min))
(re-search-forward "^rmf: " (point-max) t))
(display-buffer mh-temp-buffer)))
@@ -148,7 +149,7 @@ Display the results only if something went wrong."
"-recurse"
"-norecurse"))
(goto-char (point-min))
- (view-mode 1)
+ (view-mode-enter)
(setq view-exit-action 'kill-buffer)
(message "Listing folders...done")))))
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 @@
;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus.
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; 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 @@
;;; mh-identity.el --- Multiple identify support for MH-E.
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -87,18 +87,18 @@ change."
;;;###mh-autoload
(defun mh-identity-list-set (symbol value)
"Update the `mh-identity-list' variable, and rebuild the menu.
-Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in
-customization). This is called after 'customize is used to alter
+Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set
+in customization). This is called after 'customize is used to alter
`mh-identity-list'."
(set-default symbol value)
(mh-identity-make-menu))
(defvar mh-identity-local nil
- "Buffer-local variable holding the identity currently in use.")
+ "Buffer-local variable that holds the identity currently in use.")
(make-variable-buffer-local 'mh-identity-local)
(defun mh-header-field-delete (field value-only)
- "Delete FIELD in the mail header, or only its value if VALUE-ONLY is t.
+ "Delete header FIELD, or only its value if VALUE-ONLY is t.
Return t if anything is deleted."
(let ((field-colon (if (string-match "^.*:$" field)
field
@@ -119,11 +119,11 @@ Return t if anything is deleted."
"Marker for the end of a signature inserted by `mh-insert-identity'.")
(defun mh-identity-field-handler (field)
- "Return the handler for a FIELD or nil if none set.
+ "Return the handler for header FIELD or nil if none set.
The field name is downcased. If the FIELD begins with the character
`:', then it must have a special handler defined in
`mh-identity-handlers', else return an error since it is not a valid
-message header."
+header field."
(or (cdr (assoc (downcase field) mh-identity-handlers))
(and (eq (aref field 0) ?:)
(error (format "Field %s - unknown mh-identity-handler" field)))
@@ -132,8 +132,8 @@ message header."
;;;###mh-autoload
(defun mh-insert-identity (identity)
- "Insert proper fields for given IDENTITY.
-Edit the `mh-identity-list' variable to define identity."
+ "Insert fields specified by given IDENTITY.
+See `mh-identity-list'."
(interactive
(list (completing-read
"Identity: "
@@ -167,7 +167,8 @@ Edit the `mh-identity-list' variable to define identity."
;;;###mh-autoload
(defun mh-identity-handler-gpg-identity (field action &optional value)
- "For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add.
+ "Process header FIELD \":pgg-default-user-id\".
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE
when action 'add is selected."
(cond
@@ -180,8 +181,8 @@ when action 'add is selected."
;;;###mh-autoload
(defun mh-identity-handler-signature (field action &optional value)
- "For FIELD \"signature\", process headers for ACTION 'remove or 'add.
-The VALUE is added."
+ "Process header FIELD \":signature\".
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added."
(cond
((equal action 'remove)
(when (and (markerp mh-identity-signature-start)
@@ -210,8 +211,8 @@ The VALUE is added."
;;;###mh-autoload
(defun mh-identity-handler-attribution-verb (field action &optional value)
- "For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add.
-The VALUE is added."
+ "Process header FIELD \":attribution-verb\".
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added."
(when (and (markerp mh-identity-attribution-verb-start)
(markerp mh-identity-attribution-verb-end))
(delete-region mh-identity-attribution-verb-start
@@ -239,9 +240,10 @@ If VALUE is nil, use `mh-extract-from-attribution-verb'."
(point-max-marker))))
(defun mh-identity-handler-default (field action top &optional value)
- "For FIELD, process mh-identity headers for ACTION 'remove or 'add.
-if TOP is non-nil, add the field and it's VALUE at the top of the header, else
-add it at the bottom of the header."
+ "Process header FIELD.
+The ACTION is one of 'remove or 'add. If TOP is non-nil, add the field and its
+VALUE at the top of the header, else add it at the bottom of the header. If
+action is 'add, the VALUE is added."
(let ((field-colon (if (string-match "^.*:$" field)
field
(concat field ":"))))
@@ -266,14 +268,16 @@ add it at the bottom of the header."
;;;###mh-autoload
(defun mh-identity-handler-top (field action &optional value)
- "For FIELD, process mh-identity headers for ACTION 'remove or 'add.
-If the field wasn't present, the VALUE is added at the top of the header."
+ "Process header FIELD.
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
+If the field wasn't present, it is added to the top of the header."
(mh-identity-handler-default field action t value))
;;;###mh-autoload
(defun mh-identity-handler-bottom (field action &optional value)
- "For FIELD, process mh-identity headers for ACTION 'remove or 'add.
-If the field wasn't present, the VALUE is added at the bottom of the header."
+ "Process header FIELD.
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
+If the field wasn't present, it is added to the bottom of the header."
(mh-identity-handler-default field action nil value))
(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 @@
;;; mh-inc.el --- MH-E `inc' and separate mail spool handling
;;
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -98,10 +98,10 @@ This is called after 'customize is used to alter `mh-inc-spool-list'."
(provide 'mh-inc)
-;; Local Variables:
-;; indent-tabs-mode: nil
-;; sentence-end-double-space: nil
-;; End:
+;;; Local Variables:
+;;; indent-tabs-mode: nil
+;;; sentence-end-double-space: nil
+;;; End:
-;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835
+;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835
;;; 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 @@
;;; mh-index -- MH-E interface to indexing programs
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -31,6 +31,7 @@
;;; swish-e
;;; mairix
;;; namazu
+;;; pick
;;; grep
;;;
;;; (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."
(defun* mh-index-search (redo-search-flag folder search-regexp
&optional window-config)
"Perform an indexed search in an MH mail folder.
-Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below.
-
-If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a
-index search, then the search is repeated. Otherwise, FOLDER is searched with
-SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is
-\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG
-stores the window configuration that will be restored after the user quits the
-folder containing the index search results.
-
-Four indexing programs are supported; if none of these are present, then grep
-is used. This function picks the first program that is available on your
-system. If you would prefer to use a different program, set the customization
-variable `mh-index-program' accordingly.
-
-The documentation for the following functions describes how to generate the
-index for each program:
+Use a prefix argument to repeat the search.
+
+Unlike regular searches, the prompt for the folder to search can be `all' to
+search all folders; in addition, the search works recursively on the listed
+folder. The search criteria are entered in an MH-Pick buffer as described in
+`mh-search-folder'.
+
+To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. Another
+difference from the regular searches is that because the search operates on
+more than one folder, the messages that are found are put in a temporary
+sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This
+buffer is special because it displays messages from multiple folders; each set
+of messages from a given folder has a heading with the folder name.
+
+In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] command can
+be used to visit the folder of the message at point. Initially, only the
+messages that matched the search criteria are displayed in the folder. While
+the temporary buffer has its own set of message numbers, the actual messages
+numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder]
+command is useful to find the actual message number of an interesting message,
+or to view surrounding messages with the \\[mh-rescan-folder] command.
+
+Because this folder is temporary, you'll probably get in the habit of killing
+it when you're done with \\[mh-kill-folder].
+
+If you have run the \\[mh-search-folder] command, but change your mind while
+entering the search criteria and actually want to run an indexed search, then
+you can use the \\<mh-pick-mode-map>\\[mh-index-do-search] command in the
+MH-Pick buffer.
+
+The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command defined
+by the `mh-index-program' option. The default value is \"Auto-detect\" which
+means that MH-E will automatically choose one of \"swish++\", \"swish-e\",
+\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example,
+you have both \"swish++\" and \"mairix\" installed and you want to use
+\"mairix\", then you can set this option to \"mairix\".
+
+ *NOTE*
+
+ The \"pick\" and \"grep\" commands do not perform a recursive search on
+ the given folder.
+
+This command uses an \"X-MHE-Checksum:\" header field to cache the MD5
+checksum of a message. This means that if an incoming message already contains
+an \"X-MHE-Checksum:\" field, that message might not be found by this command.
+The following \"procmail\" recipe avoids this problem by renaming the existing
+header field:
+
+ :0 wf
+ | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\"
+
+The documentation for the following commands describe how to set up the
+various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands
+do not require additional configuration.
- `mh-swish++-execute-search'
- `mh-swish-execute-search'
- `mh-mairix-execute-search'
- `mh-namazu-execute-search'
-
-If none of these programs are present then we use pick. If desired grep can be
-used instead. Details about these methods can be found in:
-
- `mh-pick-execute-search'
- `mh-grep-execute-search'
-This and related functions use an X-MHE-Checksum header to cache the MD5
-checksum of a message. This means that already present X-MHE-Checksum headers
-in the incoming email could result in messages not being found. The following
-procmail recipe should avoid this:
-
- :0 wf
- | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\"
-
-This has the effect of renaming already present X-MHE-Checksum headers."
+In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was
+generated by a index search, then the search is repeated. Otherwise, FOLDER is
+searched with SEARCH-REGEXP and the results are presented in an MH-E folder.
+If FOLDER is \"+\" then mail in all folders are searched. Optional argument
+WINDOW-CONFIG stores the window configuration that will be restored after the
+user quits the folder containing the index search results."
(interactive
(list current-prefix-arg
(progn
@@ -998,8 +1030,8 @@ Unlike the other index search programs \"pick\" only searches messages present
in the folder itself and does not descend into any sub-folders that may be
present.
-FOLDER-PATH is the directory containing the mails to be searched and
-SEARCH-REGEXP is the pattern that pick gets."
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used
+to search."
(set-buffer (get-buffer-create mh-index-temp-buffer))
(erase-buffer)
(setq mh-index-pick-folder
@@ -1029,7 +1061,13 @@ SEARCH-REGEXP is the pattern that pick gets."
(defun mh-grep-execute-search (folder-path search-regexp)
"Execute grep and read the results.
-FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
+
+Unlike the other index search programs \"grep\" only searches messages present
+in the folder itself and does not descend into any sub-folders that may be
+present.
+
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used
+to search."
(set-buffer (get-buffer-create mh-index-temp-buffer))
(erase-buffer)
(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
(defun mh-mairix-execute-search (folder-path search-regexp-list)
"Execute mairix and read the results.
-In the examples below replace /home/user/Mail with the path to your MH
+In the examples below, replace \"/home/user/Mail\" with the path to your MH
directory.
-First create the directory /home/user/Mail/.mairix. Then create the file
-/home/user/Mail/.mairix/config with the following contents:
+First create the directory \"/home/user/Mail/.mairix\". Then create the file
+\"/home/user/Mail/.mairix/config\" with the following contents:
- # This should contain the same thing as your `mh-user-path'
- base=/home/user/Mail
+ base=/home/user/Mail
- # List of folders that should be indexed. 3 dots at the end means there are
- # subfolders within the folder
- mh_folders=archive...:inbox:drafts:news:sent:trash
+ # List of folders that should be indexed. 3 dots at the end means there
+ # are subfolders within the folder
+ mh=archive...:inbox:drafts:news:sent:trash
- vfolder_format=raw
- database=/home/user/Mail/mairix/database
+ vfolder_format=raw
+ database=/home/user/Mail/mairix/database
Use the following command line to generate the mairix index. Run this daily
from cron:
- mairix -f /home/user/Mail/.mairix/config
+ mairix -f /home/user/Mail/.mairix/config
-FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used to search."
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used
+to search."
(set-buffer (get-buffer-create mh-index-temp-buffer))
(erase-buffer)
(unless mh-mairix-binary
(error "Set mh-mairix-binary appropriately"))
(apply #'call-process mh-mairix-binary nil '(t nil) nil
- "-f" (format "%s%s/config" mh-user-path mh-mairix-directory)
+ "-r" "-f" (format "%s%s/config" mh-user-path mh-mairix-directory)
search-regexp-list)
(goto-char (point-min))
(setq mh-mairix-folder
@@ -1167,10 +1205,10 @@ REGEXP-LIST is an alist of fields and values."
(let ((expr-list (cdr conjunct))
(expr-string ""))
(dolist (e expr-list)
- (setq expr-string (concat expr-string "+"
+ (setq expr-string (concat expr-string ","
(if (atom e) "" "~")
(if (atom e) e (cadr e)))))
- (setq final (concat final "," (substring expr-string 1)))))
+ (setq final (concat final "/" (substring expr-string 1)))))
(substring final 1)))
result)))
result))
@@ -1327,52 +1365,49 @@ space-separated list of FOLDERS, or nothing to search all folders."
(defun mh-swish-execute-search (folder-path search-regexp)
"Execute swish-e and read the results.
-In the examples below, replace /home/user/Mail with the path to your MH
-directory.
-
-First create the directory /home/user/Mail/.swish. Then create the file
-/home/user/Mail/.swish/config with the following contents:
-
- IndexDir /home/user/Mail
- IndexFile /home/user/Mail/.swish/index
- IndexName \"Mail Index\"
- IndexDescription \"Mail Index\"
- IndexPointer \"http://nowhere\"
- IndexAdmin \"nobody\"
- #MetaNames automatic
- IndexReport 3
- FollowSymLinks no
- UseStemming no
- IgnoreTotalWordCountWhenRanking yes
- WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
- BeginCharacters abcdefghijklmnopqrstuvwxyz
- EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
- IgnoreLimit 50 1000
- IndexComments 0
- FileRules pathname contains /home/user/Mail/.swish
- FileRules pathname contains /home/user/Mail/mhe-index
- FileRules filename is index
- FileRules filename is \\..*
- FileRules filename is #.*
- FileRules filename is ,.*
- FileRules filename is .*~
+In the examples below, replace \"/home/user/Mail\" with the path to your
+MH directory.
+
+First create the directory \"/home/user/Mail/.swish\". Then create the file
+\"/home/user/Mail/.swish/config\" with the following contents:
+
+ DefaultContents TXT*
+ IndexDir /home/user/Mail
+ IndexFile /home/user/Mail/.swish/index
+ IndexName \"Mail Index\"
+ IndexDescription \"Mail Index\"
+ IndexPointer \"http://nowhere\"
+ IndexAdmin \"nobody\"
+ #MetaNames automatic
+ IndexReport 3
+ FollowSymLinks no
+ UseStemming no
+ IgnoreTotalWordCountWhenRanking yes
+ WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
+ BeginCharacters abcdefghijklmnopqrstuvwxyz
+ EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
+ IgnoreLimit 50 1000
+ IndexComments 0
+ FileRules filename contains \\D
+ FileRules pathname contains /home/user/Mail/.swish
+ FileRules pathname contains /home/user/Mail/mhe-index
+
+This configuration does not index the folders that hold the results of your
+searches in \"+mhe-index\" since they tend to be ephemeral and the original
+messages are indexed anyway.
If there are any directories you would like to ignore, append lines like the
-following to config:
-
- FileRules pathname contains /home/user/Mail/scripts
+following to \"config\":
-You do not want to index the folders that hold the results of your searches
-since they tend to be ephemeral and the original messages are indexed anyway.
-The configuration file above assumes that the results are found in sub-folders
-of `mh-index-folder' which is +mhe-index by default.
+ FileRules pathname contains /home/user/Mail/scripts
-Use the following command line to generate the swish index. Run this
-daily from cron:
+Use the following command line to generate the swish index. Run this daily
+from cron:
- swish-e -c /home/user/Mail/.swish/config
+ swish-e -c /home/user/Mail/.swish/config
-FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
+search."
(set-buffer (get-buffer-create mh-index-temp-buffer))
(erase-buffer)
(unless mh-swish-binary
@@ -1407,7 +1442,8 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
(list (let* ((s (buffer-substring-no-properties start (1+ (point)))))
(unless (string-match mh-swish-folder s)
(return 'error))
- (if (string-match mh-user-path s)
+ (if (and (string-match mh-user-path s)
+ (< (match-end 0) (1- (length s))))
(format "+%s"
(substring s (match-end 0) (1- (length s))))
(return 'error)))
@@ -1431,34 +1467,35 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
(defun mh-swish++-execute-search (folder-path search-regexp)
"Execute swish++ and read the results.
-In the examples below, replace /home/user/Mail with the path to your MH
+In the examples below, replace \"/home/user/Mail\" with the path to your MH
directory.
-First create the directory /home/user/Mail/.swish++. Then create the file
-/home/user/Mail/.swish++/swish++.conf with the following contents:
+First create the directory \"/home/user/Mail/.swish++\". Then create the file
+\"/home/user/Mail/.swish++/swish++.conf\" with the following contents:
- IncludeMeta Bcc Cc Comments Content-Description From Keywords
- IncludeMeta Newsgroups Resent-To Subject To
- IncludeMeta Message-Id References In-Reply-To
- IncludeFile Mail *
- IndexFile /home/user/Mail/.swish++/swish++.index
+ IncludeMeta Bcc Cc Comments Content-Description From Keywords
+ IncludeMeta Newsgroups Resent-To Subject To
+ IncludeMeta Message-Id References In-Reply-To
+ IncludeFile Mail *
+ IndexFile /home/user/Mail/.swish++/swish++.index
-Use the following command line to generate the swish index. Run this
-daily from cron:
+Use the following command line to generate the swish index. Run this daily
+from cron:
- find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\
- -o -path /home/user/Mail/.swish++ -prune \\
- -o -name \"[0-9]*\" -print \\
- | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail
+ find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\
+ -o -path /home/user/Mail/.swish++ -prune \\
+ -o -name \"[0-9]*\" -print \\
+ | index -c /home/user/Mail/.swish++/swish++.conf -
-You do not want to index the folders that hold the results of your searches
-since they tend to be ephemeral and the original messages are indexed anyway.
-The command above assumes that the results are found in sub-folders of
-`mh-index-folder' which is +mhe-index by default.
+This command does not index the folders that hold the results of your searches
+in \"+mhe-index\" since they tend to be ephemeral and the original messages
+are indexed anyway.
-On some systems (Debian GNU/Linux, for example), use index++ instead of index.
+On some systems (Debian GNU/Linux, for example), use \"index++\" instead of
+\"index\".
-FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
+search."
(set-buffer (get-buffer-create mh-index-temp-buffer))
(erase-buffer)
(unless mh-swish++-binary
@@ -1512,32 +1549,29 @@ REGEXP-LIST is an alist of fields and values."
(defun mh-namazu-execute-search (folder-path search-regexp)
"Execute namazu and read the results.
-In the examples below, replace /home/user/Mail with the path to your MH
+In the examples below, replace \"/home/user/Mail\" with the path to your MH
directory.
-First create the directory /home/user/Mail/.namazu. Then create the file
-/home/user/Mail/.namazu/mknmzrc with the following contents:
+First create the directory \"/home/user/Mail/.namazu\". Then create the file
+\"/home/user/Mail/.namazu/mknmzrc\" with the following contents:
- package conf; # Don't remove this line!
- $ADDRESS = 'user@localhost';
- $ALLOW_FILE = \"[0-9]*\";
- $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\";
+ package conf; # Don't remove this line!
+ $ADDRESS = 'user@localhost';
+ $ALLOW_FILE = \"[0-9]*\";
+ $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\";
-In the above example configuration, none of the mail files contained in the
-directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed.
+This configuration does not index the folders that hold the results of your
+searches in \"+mhe-index\" since they tend to be ephemeral and the original
+messages are indexed anyway.
-You do not want to index the folders that hold the results of your searches
-since they tend to be ephemeral and the original messages are indexed anyway.
-The configuration file above assumes that the results are found in sub-folders
-of `mh-index-folder' which is +mhe-index by default.
-
-Use the following command line to generate the namazu index. Run this
-daily from cron:
+Use the following command line to generate the namazu index. Run this daily
+from cron:
- mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\
- /home/user/Mail
+ mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\
+ /home/user/Mail
-FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search."
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
+search."
(let ((namazu-index-directory
(format "%s%s" mh-user-path mh-namazu-directory)))
(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 @@
;;; mh-init.el --- MH-E initialization.
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; 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 @@
;;; mh-junk.el --- Interface to anti-spam measures
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>,
;; Bill Wohler <wohler@newt.com>
@@ -191,8 +191,8 @@ done by adding the following to your crontab:
(message (format "Blacklisting message %d..." msg))
(set-buffer (get-buffer-create mh-temp-buffer))
(erase-buffer)
- (call-process (expand-file-name mh-scan-prog mh-progs) mh-junk-background
- t nil
+ (call-process (expand-file-name mh-scan-prog mh-progs)
+ nil mh-junk-background nil
(format "%s" msg) current-folder
"-format" "%<(mymbox{from})%|%(addr{from})%>")
(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 @@
;;; mh-loaddefs.el --- automatically extracted autoloads
;;
-;;; Copyright (C) 2005 Free Software Foundation, Inc.
+;;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
;;; Author: Bill Wohler <wohler@newt.com>
;;; Keywords: mail
;;; Commentary:
@@ -13,7 +13,7 @@
;;;;;; mh-check-whom mh-insert-signature mh-to-fcc mh-to-field mh-fill-paragraph-function
;;;;;; mh-get-header-field mh-send-other-window mh-send mh-reply
;;;;;; mh-redistribute mh-forward mh-extract-rejected-mail mh-edit-again)
-;;;;;; "mh-comp" "mh-comp.el" (16665 53716))
+;;;;;; "mh-comp" "mh-comp.el" (17048 51103))
;;; Generated autoloads from mh-comp.el
(autoload (quote mh-edit-again) "mh-comp" "\
@@ -56,8 +56,10 @@ to reply to:
cc/all sender and all recipients.
If optional prefix argument INCLUDEP provided, then include the message
in the reply using filter `mhl.reply' in your MH directory.
-If the file named by `mh-repl-formfile' exists, it is used as a skeleton
-for the reply.
+If the file named by `mh-repl-formfile' exists, it is used as a skeleton for
+the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU
+mailutils variants and the file names by `mh-repl-group-formfile' exists, it
+is used instead.
See also `mh-send'." t nil)
@@ -183,7 +185,7 @@ If we are at the first header field go to the start of the message body." t nil)
;;;;;; mh-store-msg mh-undo-folder mh-sort-folder mh-page-digest-backwards
;;;;;; mh-page-digest mh-pipe-msg mh-pack-folder mh-list-folders
;;;;;; mh-kill-folder mh-copy-msg mh-burst-digest) "mh-funcs" "mh-funcs.el"
-;;;;;; (16671 48788))
+;;;;;; (17048 47864))
;;; Generated autoloads from mh-funcs.el
(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
;;;;;; mh-identity-insert-attribution-verb mh-identity-handler-attribution-verb
;;;;;; mh-identity-handler-signature mh-identity-handler-gpg-identity
;;;;;; mh-insert-identity mh-identity-list-set mh-identity-make-menu)
-;;;;;; "mh-identity" "mh-identity.el" (16671 57010))
+;;;;;; "mh-identity" "mh-identity.el" (17044 63778))
;;; Generated autoloads from mh-identity.el
(autoload (quote mh-identity-make-menu) "mh-identity" "\
@@ -271,43 +273,46 @@ change." nil nil)
(autoload (quote mh-identity-list-set) "mh-identity" "\
Update the `mh-identity-list' variable, and rebuild the menu.
-Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in
-customization). This is called after 'customize is used to alter
+Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set
+in customization). This is called after 'customize is used to alter
`mh-identity-list'." nil nil)
(autoload (quote mh-insert-identity) "mh-identity" "\
-Insert proper fields for given IDENTITY.
-Edit the `mh-identity-list' variable to define identity." t nil)
+Insert fields specified by given IDENTITY.
+See `mh-identity-list'." t nil)
(autoload (quote mh-identity-handler-gpg-identity) "mh-identity" "\
-For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add.
+Process header FIELD \":pgg-default-user-id\".
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE
when action 'add is selected." nil nil)
(autoload (quote mh-identity-handler-signature) "mh-identity" "\
-For FIELD \"signature\", process headers for ACTION 'remove or 'add.
-The VALUE is added." nil nil)
+Process header FIELD \":signature\".
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil)
(autoload (quote mh-identity-handler-attribution-verb) "mh-identity" "\
-For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add.
-The VALUE is added." nil nil)
+Process header FIELD \":attribution-verb\".
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil)
(autoload (quote mh-identity-insert-attribution-verb) "mh-identity" "\
Insert VALUE as attribution verb, setting up delimiting markers.
If VALUE is nil, use `mh-extract-from-attribution-verb'." nil nil)
(autoload (quote mh-identity-handler-top) "mh-identity" "\
-For FIELD, process mh-identity headers for ACTION 'remove or 'add.
-If the field wasn't present, the VALUE is added at the top of the header." nil nil)
+Process header FIELD.
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
+If the field wasn't present, it is added to the top of the header." nil nil)
(autoload (quote mh-identity-handler-bottom) "mh-identity" "\
-For FIELD, process mh-identity headers for ACTION 'remove or 'add.
-If the field wasn't present, the VALUE is added at the bottom of the header." nil nil)
+Process header FIELD.
+The ACTION is one of 'remove or 'add. If 'add, the VALUE is added.
+If the field wasn't present, it is added to the bottom of the header." nil nil)
;;;***
-;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (16671
-;;;;;; 48848))
+;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (17048
+;;;;;; 44143))
;;; Generated autoloads from mh-inc.el
(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)
;;;;;; mh-index-parse-search-regexp mh-index-do-search mh-index-p
;;;;;; mh-index-read-data mh-index-search mh-index-create-sequences
;;;;;; mh-create-sequence-map mh-index-update-maps) "mh-index" "mh-index.el"
-;;;;;; (16665 53754))
+;;;;;; (17044 64025))
;;; Generated autoloads from mh-index.el
(autoload (quote mh-index-update-maps) "mh-index" "\
@@ -346,43 +351,74 @@ Mirror sequences present in source folders in index folder." nil nil)
(autoload (quote mh-index-search) "mh-index" "\
Perform an indexed search in an MH mail folder.
-Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below.
-
-If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a
-index search, then the search is repeated. Otherwise, FOLDER is searched with
-SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is
-\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG
-stores the window configuration that will be restored after the user quits the
-folder containing the index search results.
-
-Four indexing programs are supported; if none of these are present, then grep
-is used. This function picks the first program that is available on your
-system. If you would prefer to use a different program, set the customization
-variable `mh-index-program' accordingly.
-
-The documentation for the following functions describes how to generate the
-index for each program:
+Use a prefix argument to repeat the search.
+
+Unlike regular searches, the prompt for the folder to search can be `all' to
+search all folders; in addition, the search works recursively on the listed
+folder. The search criteria are entered in an MH-Pick buffer as described in
+`mh-search-folder'.
+
+To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. Another
+difference from the regular searches is that because the search operates on
+more than one folder, the messages that are found are put in a temporary
+sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This
+buffer is special because it displays messages from multiple folders; each set
+of messages from a given folder has a heading with the folder name.
+
+In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] command can
+be used to visit the folder of the message at point. Initially, only the
+messages that matched the search criteria are displayed in the folder. While
+the temporary buffer has its own set of message numbers, the actual messages
+numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder]
+command is useful to find the actual message number of an interesting message,
+or to view surrounding messages with the \\[mh-rescan-folder] command.
+
+Because this folder is temporary, you'll probably get in the habit of killing
+it when you're done with \\[mh-kill-folder].
+
+If you have run the \\[mh-search-folder] command, but change your mind while
+entering the search criteria and actually want to run an indexed search, then
+you can use the \\<mh-pick-mode-map>\\[mh-index-do-search] command in the
+MH-Pick buffer.
+
+The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command defined
+by the `mh-index-program' option. The default value is \"Auto-detect\" which
+means that MH-E will automatically choose one of \"swish++\", \"swish-e\",
+\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example,
+you have both \"swish++\" and \"mairix\" installed and you want to use
+\"mairix\", then you can set this option to \"mairix\".
+
+ *NOTE*
+
+ The \"pick\" and \"grep\" commands do not perform a recursive search on
+ the given folder.
+
+This command uses an \"X-MHE-Checksum:\" header field to cache the MD5
+checksum of a message. This means that if an incoming message already contains
+an \"X-MHE-Checksum:\" field, that message might not be found by this command.
+The following \"procmail\" recipe avoids this problem by renaming the existing
+header field:
+
+ :0 wf
+ | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\"
+
+The documentation for the following commands describe how to set up the
+various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands
+do not require additional configuration.
- `mh-swish++-execute-search'
- `mh-swish-execute-search'
- `mh-mairix-execute-search'
- `mh-namazu-execute-search'
-
-If none of these programs are present then we use pick. If desired grep can be
-used instead. Details about these methods can be found in:
-
- `mh-pick-execute-search'
- `mh-grep-execute-search'
-This and related functions use an X-MHE-Checksum header to cache the MD5
-checksum of a message. This means that already present X-MHE-Checksum headers
-in the incoming email could result in messages not being found. The following
-procmail recipe should avoid this:
-
- :0 wf
- | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\"
-
-This has the effect of renaming already present X-MHE-Checksum headers." t nil)
+In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was
+generated by a index search, then the search is repeated. Otherwise, FOLDER is
+searched with SEARCH-REGEXP and the results are presented in an MH-E folder.
+If FOLDER is \"+\" then mail in all folders are searched. Optional argument
+WINDOW-CONFIG stores the window configuration that will be restored after the
+user quits the folder containing the index search results." t nil)
(autoload (quote mh-index-read-data) "mh-index" "\
Read index data from file." nil nil)
@@ -463,114 +499,109 @@ space-separated list of FOLDERS, or nothing to search all folders." t nil)
(autoload (quote mh-swish-execute-search) "mh-index" "\
Execute swish-e and read the results.
-In the examples below, replace /home/user/Mail with the path to your MH
-directory.
-
-First create the directory /home/user/Mail/.swish. Then create the file
-/home/user/Mail/.swish/config with the following contents:
-
- IndexDir /home/user/Mail
- IndexFile /home/user/Mail/.swish/index
- IndexName \"Mail Index\"
- IndexDescription \"Mail Index\"
- IndexPointer \"http://nowhere\"
- IndexAdmin \"nobody\"
- #MetaNames automatic
- IndexReport 3
- FollowSymLinks no
- UseStemming no
- IgnoreTotalWordCountWhenRanking yes
- WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
- BeginCharacters abcdefghijklmnopqrstuvwxyz
- EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
- IgnoreLimit 50 1000
- IndexComments 0
- FileRules pathname contains /home/user/Mail/.swish
- FileRules pathname contains /home/user/Mail/mhe-index
- FileRules filename is index
- FileRules filename is \\..*
- FileRules filename is #.*
- FileRules filename is ,.*
- FileRules filename is .*~
+In the examples below, replace \"/home/user/Mail\" with the path to your
+MH directory.
+
+First create the directory \"/home/user/Mail/.swish\". Then create the file
+\"/home/user/Mail/.swish/config\" with the following contents:
+
+ DefaultContents TXT*
+ IndexDir /home/user/Mail
+ IndexFile /home/user/Mail/.swish/index
+ IndexName \"Mail Index\"
+ IndexDescription \"Mail Index\"
+ IndexPointer \"http://nowhere\"
+ IndexAdmin \"nobody\"
+ #MetaNames automatic
+ IndexReport 3
+ FollowSymLinks no
+ UseStemming no
+ IgnoreTotalWordCountWhenRanking yes
+ WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
+ BeginCharacters abcdefghijklmnopqrstuvwxyz
+ EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
+ IgnoreLimit 50 1000
+ IndexComments 0
+ FileRules filename contains \\D
+ FileRules pathname contains /home/user/Mail/.swish
+ FileRules pathname contains /home/user/Mail/mhe-index
+
+This configuration does not index the folders that hold the results of your
+searches in \"+mhe-index\" since they tend to be ephemeral and the original
+messages are indexed anyway.
If there are any directories you would like to ignore, append lines like the
-following to config:
+following to \"config\":
- FileRules pathname contains /home/user/Mail/scripts
+ FileRules pathname contains /home/user/Mail/scripts
-You do not want to index the folders that hold the results of your searches
-since they tend to be ephemeral and the original messages are indexed anyway.
-The configuration file above assumes that the results are found in sub-folders
-of `mh-index-folder' which is +mhe-index by default.
+Use the following command line to generate the swish index. Run this daily
+from cron:
-Use the following command line to generate the swish index. Run this
-daily from cron:
+ swish-e -c /home/user/Mail/.swish/config
- swish-e -c /home/user/Mail/.swish/config
-
-FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil)
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
+search." nil nil)
(autoload (quote mh-swish++-execute-search) "mh-index" "\
Execute swish++ and read the results.
-In the examples below, replace /home/user/Mail with the path to your MH
+In the examples below, replace \"/home/user/Mail\" with the path to your MH
directory.
-First create the directory /home/user/Mail/.swish++. Then create the file
-/home/user/Mail/.swish++/swish++.conf with the following contents:
+First create the directory \"/home/user/Mail/.swish++\". Then create the file
+\"/home/user/Mail/.swish++/swish++.conf\" with the following contents:
- IncludeMeta Bcc Cc Comments Content-Description From Keywords
- IncludeMeta Newsgroups Resent-To Subject To
- IncludeMeta Message-Id References In-Reply-To
- IncludeFile Mail *
- IndexFile /home/user/Mail/.swish++/swish++.index
+ IncludeMeta Bcc Cc Comments Content-Description From Keywords
+ IncludeMeta Newsgroups Resent-To Subject To
+ IncludeMeta Message-Id References In-Reply-To
+ IncludeFile Mail *
+ IndexFile /home/user/Mail/.swish++/swish++.index
-Use the following command line to generate the swish index. Run this
-daily from cron:
+Use the following command line to generate the swish index. Run this daily
+from cron:
- find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\
- -o -path /home/user/Mail/.swish++ -prune \\
- -o -name \"[0-9]*\" -print \\
- | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail
+ find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\
+ -o -path /home/user/Mail/.swish++ -prune \\
+ -o -name \"[0-9]*\" -print \\
+ | index -c /home/user/Mail/.swish++/swish++.conf -
-You do not want to index the folders that hold the results of your searches
-since they tend to be ephemeral and the original messages are indexed anyway.
-The command above assumes that the results are found in sub-folders of
-`mh-index-folder' which is +mhe-index by default.
+This command does not index the folders that hold the results of your searches
+in \"+mhe-index\" since they tend to be ephemeral and the original messages
+are indexed anyway.
-On some systems (Debian GNU/Linux, for example), use index++ instead of index.
+On some systems (Debian GNU/Linux, for example), use \"index++\" instead of
+\"index\".
-FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil)
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
+search." nil nil)
(autoload (quote mh-namazu-execute-search) "mh-index" "\
Execute namazu and read the results.
-In the examples below, replace /home/user/Mail with the path to your MH
+In the examples below, replace \"/home/user/Mail\" with the path to your MH
directory.
-First create the directory /home/user/Mail/.namazu. Then create the file
-/home/user/Mail/.namazu/mknmzrc with the following contents:
-
- package conf; # Don't remove this line!
- $ADDRESS = 'user@localhost';
- $ALLOW_FILE = \"[0-9]*\";
- $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\";
+First create the directory \"/home/user/Mail/.namazu\". Then create the file
+\"/home/user/Mail/.namazu/mknmzrc\" with the following contents:
-In the above example configuration, none of the mail files contained in the
-directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed.
+ package conf; # Don't remove this line!
+ $ADDRESS = 'user@localhost';
+ $ALLOW_FILE = \"[0-9]*\";
+ $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\";
-You do not want to index the folders that hold the results of your searches
-since they tend to be ephemeral and the original messages are indexed anyway.
-The configuration file above assumes that the results are found in sub-folders
-of `mh-index-folder' which is +mhe-index by default.
+This configuration does not index the folders that hold the results of your
+searches in \"+mhe-index\" since they tend to be ephemeral and the original
+messages are indexed anyway.
-Use the following command line to generate the namazu index. Run this
-daily from cron:
+Use the following command line to generate the namazu index. Run this daily
+from cron:
- mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\
- /home/user/Mail
+ mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\
+ /home/user/Mail
-FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil)
+In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to
+search." nil nil)
(autoload (quote mh-index-choose) "mh-index" "\
Choose an indexing function.
@@ -582,7 +613,7 @@ system." nil nil)
;;;***
;;;### (autoloads (mh-variants mh-variant-p mh-variant-set) "mh-init"
-;;;;;; "mh-init.el" (16684 6777))
+;;;;;; "mh-init.el" (17044 64253))
;;; Generated autoloads from mh-init.el
(autoload (quote mh-variant-set) "mh-init" "\
@@ -604,7 +635,7 @@ by the variable `mh-variants'." nil nil)
;;;***
;;;### (autoloads (mh-junk-whitelist mh-junk-blacklist) "mh-junk"
-;;;;;; "mh-junk.el" (16671 48929))
+;;;;;; "mh-junk.el" (17044 64253))
;;; Generated autoloads from mh-junk.el
(autoload (quote mh-junk-blacklist) "mh-junk" "\
@@ -644,7 +675,7 @@ The `mh-junk-program' option specifies the spam program in use." t nil)
;;;;;; mh-mhn-compose-external-compressed-tar mh-mhn-compose-anon-ftp
;;;;;; mh-mhn-compose-insertion mh-file-mime-type mh-have-file-command
;;;;;; mh-compose-forward mh-compose-insertion) "mh-mime" "mh-mime.el"
-;;;;;; (16684 7323))
+;;;;;; (17048 47895))
;;; Generated autoloads from mh-mime.el
(autoload (quote mh-compose-insertion) "mh-mime" "\
@@ -857,15 +888,79 @@ View MIME PART-INDEX externally." t nil)
;;;***
;;;### (autoloads (mh-do-search mh-pick-do-search mh-search-folder)
-;;;;;; "mh-pick" "mh-pick.el" (16671 49140))
+;;;;;; "mh-pick" "mh-pick.el" (17048 47905))
;;; Generated autoloads from mh-pick.el
(autoload (quote mh-search-folder) "mh-pick" "\
Search FOLDER for messages matching a pattern.
-This function uses the MH command `pick' to do the work.
-Add the messages found to the sequence named `search'.
-Argument WINDOW-CONFIG is the current window configuration and is used when
-the search folder is dismissed." t nil)
+
+With this command, you can search a folder for messages to or from a
+particular person or about a particular subject. In fact, you can also search
+for messages containing selected strings in any arbitrary header field or any
+string found within the messages.
+
+You are first prompted for the name of the folder to search and then placed in
+the following buffer in MH-Pick mode:
+
+ From:
+ To:
+ Cc:
+ Date:
+ Subject:
+ --------
+
+Edit this template by entering your search criteria in an appropriate header
+field that is already there, or create a new field yourself. If the string
+you're looking for could be anywhere in a message, then place the string
+underneath the row of dashes. The \\[mh-search-folder] command uses the MH
+command \"pick\" to do the real work.
+
+There are no semantics associated with the search criteria--they are simply
+treated as strings. Case is ignored when all lowercase is used, and regular
+expressions (a la \"ed\") are available. It is all right to specify several
+search criteria. What happens then is that a logical _and_ of the various
+fields is performed. If you prefer a logical _or_ operation, run
+\\[mh-search-folder] multiple times.
+
+As an example, let's say that we want to find messages from Ginnean about
+horseback riding in the Kosciusko National Park (Australia) during January,
+1994. Normally we would start with a broad search and narrow it down if
+necessary to produce a manageable amount of data, but we'll cut to the chase
+and create a fairly restrictive set of criteria as follows:
+
+ From: ginnean
+ To:
+ Cc:
+ Date: Jan 1994
+ Subject: horse.*kosciusko
+ --------
+
+As with MH-Letter mode, MH-Pick provides commands like
+\\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks.
+
+To perform the search, type \\[mh-do-search]. The selected messages are placed
+in the \"search\" sequence, which you can use later in forwarding, printing,
+or narrowing your field of view. Subsequent searches are appended to the
+\"search\" sequence. If, however, you wish to start with a clean slate, first
+delete the \"search\" sequence.
+
+If you're searching in a folder that is already displayed in an MH-Folder
+buffer, only those messages contained in the buffer are used for the search.
+Therefore, if you want to search in all messages, first kill the folder's
+buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder
+with \\[mh-rescan-folder].
+
+If you find that you do the same thing over and over when editing the search
+template, you may wish to bind some shortcuts to keys. This can be done with
+the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is
+run on a new pattern.
+
+If you have run the \\[mh-index-search] command, but change your mind while
+entering the search criteria and actually want to run a regular search, then
+you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command.
+
+In a program, argument WINDOW-CONFIG is the current window configuration and
+is used when the search folder is dismissed." t nil)
(autoload (quote mh-pick-do-search) "mh-pick" "\
Find 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)
;;;### (autoloads (mh-print-msg mh-ps-print-toggle-mime mh-ps-print-toggle-color
;;;;;; mh-ps-print-toggle-faces mh-ps-print-msg-show mh-ps-print-msg-file
-;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (16680 11171))
+;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (17044 64253))
;;; Generated autoloads from mh-print.el
(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)
;;;;;; mh-rename-seq mh-translate-range mh-read-range mh-read-seq-default
;;;;;; mh-notate-deleted-and-refiled mh-widen mh-put-msg-in-seq
;;;;;; mh-narrow-to-seq mh-msg-is-in-seq mh-list-sequences mh-delete-seq)
-;;;;;; "mh-seq" "mh-seq.el" (16671 65286))
+;;;;;; "mh-seq" "mh-seq.el" (17048 47921))
;;; Generated autoloads from mh-seq.el
(autoload (quote mh-delete-seq) "mh-seq" "\
@@ -1157,7 +1252,7 @@ Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." t nil)
;;;### (autoloads (mh-speed-add-folder mh-speed-invalidate-map mh-speed-flists
;;;;;; mh-speed-view mh-speed-toggle mh-folder-speedbar-buttons)
-;;;;;; "mh-speed" "mh-speed.el" (16665 53793))
+;;;;;; "mh-speed" "mh-speed.el" (17044 64253))
;;; Generated autoloads from mh-speed.el
(autoload (quote mh-folder-speedbar-buttons) "mh-speed" "\
@@ -1196,7 +1291,7 @@ The function invalidates the latest ancestor that is present." nil nil)
;;;;;; mh-alias-grab-from-field mh-alias-add-alias mh-alias-for-from-p
;;;;;; mh-alias-address-to-alias mh-alias-letter-expand-alias mh-alias-minibuffer-confirm-address
;;;;;; mh-read-address mh-alias-reload-maybe mh-alias-reload) "mh-alias"
-;;;;;; "mh-alias.el" (16671 49382))
+;;;;;; "mh-alias.el" (17048 47789))
;;; Generated autoloads from mh-alias.el
(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 @@
;;; mh-mime.el --- MH-E support for composing MIME messages
-;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995,
+;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -1325,6 +1326,18 @@ Parameter EL is unused."
(point-max)))
(forward-line -1)))))
+(defun mh-mime-security-button-face (info)
+ "Return the button face to use for encrypted/signed mail based on INFO."
+ (cond ((string-match "OK" info) ;Decrypted mail
+ mh-show-pgg-good-face)
+ ((string-match "Failed" info) ;Decryption failed or signature invalid
+ mh-show-pgg-bad-face)
+ ((string-match "Undecided" info);Unprocessed mail
+ mh-show-pgg-unknown-face)
+ ((string-match "Untrusted" info);Key not trusted
+ mh-show-pgg-unknown-face)
+ (t mh-show-pgg-good-face)))
+
(defun mh-mime-security-press-button (handle)
"Callback from security button for part HANDLE."
(if (mm-handle-multipart-ctl-parameter handle 'gnus-info)
@@ -1364,9 +1377,10 @@ Parameter EL is unused."
(info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)
"Undecided"))
(details (mm-handle-multipart-ctl-parameter handle 'gnus-details))
- pressed-details begin end)
+ pressed-details begin end face)
(setq details (if details (concat "\n" details) ""))
(setq pressed-details (if mh-mime-security-button-pressed details ""))
+ (setq face (mh-mime-security-button-face info))
(unless (bolp) (insert "\n"))
(setq begin (point))
(gnus-eval-format
@@ -1382,6 +1396,7 @@ Parameter EL is unused."
:mime-handle handle
:action 'mh-widget-press-button
:button-keymap mh-mime-security-button-map
+ :button-face face
:help-echo "Mouse-2 click or press RET (in show buffer) to see security details.")
(dolist (ov (mh-funcall-if-exists overlays-in begin end))
(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 @@
;;; mh-pick.el --- make a search pattern and search for a message in MH-E
-;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995,
+;; 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -52,10 +53,74 @@
;;;###mh-autoload
(defun mh-search-folder (folder window-config)
"Search FOLDER for messages matching a pattern.
-This function uses the MH command `pick' to do the work.
-Add the messages found to the sequence named `search'.
-Argument WINDOW-CONFIG is the current window configuration and is used when
-the search folder is dismissed."
+
+With this command, you can search a folder for messages to or from a
+particular person or about a particular subject. In fact, you can also search
+for messages containing selected strings in any arbitrary header field or any
+string found within the messages.
+
+You are first prompted for the name of the folder to search and then placed in
+the following buffer in MH-Pick mode:
+
+ From:
+ To:
+ Cc:
+ Date:
+ Subject:
+ --------
+
+Edit this template by entering your search criteria in an appropriate header
+field that is already there, or create a new field yourself. If the string
+you're looking for could be anywhere in a message, then place the string
+underneath the row of dashes. The \\[mh-search-folder] command uses the MH
+command \"pick\" to do the real work.
+
+There are no semantics associated with the search criteria--they are simply
+treated as strings. Case is ignored when all lowercase is used, and regular
+expressions (a la \"ed\") are available. It is all right to specify several
+search criteria. What happens then is that a logical _and_ of the various
+fields is performed. If you prefer a logical _or_ operation, run
+\\[mh-search-folder] multiple times.
+
+As an example, let's say that we want to find messages from Ginnean about
+horseback riding in the Kosciusko National Park (Australia) during January,
+1994. Normally we would start with a broad search and narrow it down if
+necessary to produce a manageable amount of data, but we'll cut to the chase
+and create a fairly restrictive set of criteria as follows:
+
+ From: ginnean
+ To:
+ Cc:
+ Date: Jan 1994
+ Subject: horse.*kosciusko
+ --------
+
+As with MH-Letter mode, MH-Pick provides commands like
+\\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks.
+
+To perform the search, type \\[mh-do-search]. The selected messages are placed
+in the \"search\" sequence, which you can use later in forwarding, printing,
+or narrowing your field of view. Subsequent searches are appended to the
+\"search\" sequence. If, however, you wish to start with a clean slate, first
+delete the \"search\" sequence.
+
+If you're searching in a folder that is already displayed in an MH-Folder
+buffer, only those messages contained in the buffer are used for the search.
+Therefore, if you want to search in all messages, first kill the folder's
+buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder
+with \\[mh-rescan-folder].
+
+If you find that you do the same thing over and over when editing the search
+template, you may wish to bind some shortcuts to keys. This can be done with
+the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is
+run on a new pattern.
+
+If you have run the \\[mh-index-search] command, but change your mind while
+entering the search criteria and actually want to run a regular search, then
+you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command.
+
+In a program, argument WINDOW-CONFIG is the current window configuration and
+is used when the search folder is dismissed."
(interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t)
(current-window-configuration)))
(let ((pick-folder (if (equal folder "+") mh-current-folder folder)))
@@ -140,8 +205,7 @@ with no arguments, upon entry to this mode.
(make-local-variable 'mh-searching-function)
(make-local-variable 'mh-help-messages)
(easy-menu-add mh-pick-menu)
- (setq mh-help-messages mh-pick-mode-help-messages)
- (run-hooks 'mh-pick-mode-hook))
+ (setq mh-help-messages mh-pick-mode-help-messages))
;;;###mh-autoload
(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 @@
;;; mh-print.el --- MH-E printing support
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;; Author: Jeffrey C Honig <jch@honig.net>
;; 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 @@
;;; mh-seq.el --- MH-E sequences support
-;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995,
+;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -195,7 +196,7 @@ redone to get the new thread tree. This makes incremental threading easier.")
(insert "\n"))
(setq seq-list (cdr seq-list)))
(goto-char (point-min))
- (view-mode 1)
+ (view-mode-enter)
(setq view-exit-action 'kill-buffer)
(message "Listing sequences...done")))))
@@ -788,10 +789,33 @@ This function can only be used the folder is threaded."
If no prefix arg is given, then return DEFAULT."
(let ((default-string (loop for x in default concat (format " %s" x))))
(if (or current-prefix-arg (equal default-string ""))
- (delete "" (split-string (read-string "Pick expression: "
- default-string)))
+ (mh-pick-args-list (read-string "Pick expression: "
+ default-string))
default)))
+(defun mh-pick-args-list (s)
+ "Form list by grouping elements in string S suitable for pick arguments.
+For example, the string \"-subject a b c -from Joe User <user@domain.com>\"
+is converted to (\"-subject\" \"a b c\" \"-from\"
+\"Joe User <user@domain.com>\""
+ (let ((full-list (split-string s))
+ current-arg collection arg-list)
+ (while full-list
+ (setq current-arg (car full-list))
+ (if (null (string-match "^-" current-arg))
+ (setq collection
+ (if (null collection)
+ current-arg
+ (format "%s %s" collection current-arg)))
+ (when collection
+ (setq arg-list (append arg-list (list collection)))
+ (setq collection nil))
+ (setq arg-list (append arg-list (list current-arg))))
+ (setq full-list (cdr full-list)))
+ (when collection
+ (setq arg-list (append arg-list (list collection))))
+ arg-list))
+
;;;###mh-autoload
(defun mh-narrow-to-subject (&optional pick-expr)
"Limit to messages with same subject.
@@ -1315,6 +1339,7 @@ All messages after START-POINT are added to the thread tree."
(old-buffer-modified-flag (buffer-modified-p)))
(delete-region (point-min) (point-max))
(mh-thread-print-scan-lines thread-tree)
+ (mh-notate-user-sequences)
(mh-notate-deleted-and-refiled)
(mh-notate-cur)
(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 @@
;;; mh-speed.el --- Speedbar interface for MH-E.
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; 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 @@
;;; mh-utils.el --- MH-E code needed for both sending and reading
-;; Copyright (C) 1993, 95, 1997, 2000, 01, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 1997,
+;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -703,8 +704,8 @@ not pointing to a message."
(save-excursion
(beginning-of-line)
(cond ((looking-at mh-scan-msg-number-regexp)
- (string-to-int (buffer-substring (match-beginning 1)
- (match-end 1))))
+ (string-to-number (buffer-substring (match-beginning 1)
+ (match-end 1))))
(error-if-no-message
(error "Cursor not pointing to message"))
(t nil))))
@@ -1129,8 +1130,7 @@ See also `mh-folder-mode'.
(make-local-variable 'mh-show-folder-buffer)
(buffer-disable-undo)
(setq buffer-read-only t)
- (use-local-map mh-show-mode-map)
- (run-hooks 'mh-show-mode-hook))
+ (use-local-map mh-show-mode-map))
(defun mh-show-addr ()
"Use `goto-address'."
@@ -1673,7 +1673,8 @@ The message is displayed in raw form."
"Decode >From at beginning of lines for `mh-show-mode'."
(save-excursion
(let ((modified (buffer-modified-p))
- (case-fold-search nil))
+ (case-fold-search nil)
+ (buffer-read-only nil))
(goto-char (mh-mail-header-end))
(while (re-search-forward "^>From" nil t)
(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:
(if eudc-emacs-p
(easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu))
(setq mode-popup-menu (eudc-menu)))
- (run-hooks 'eudc-mode-hook)
- )
+ (run-mode-hooks 'eudc-mode-hook))
;;}}}
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:
(use-local-map quickurl-list-mode-map)
(setq major-mode 'quickurl-list-mode
mode-name "quickurl list")
- (run-hooks 'quickurl-list-mode-hook)
+ (run-mode-hooks 'quickurl-list-mode-hook)
(setq buffer-read-only t
truncate-lines t))
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
(setq snmp-mode-status-list snmp-rfc1212-status)
;; Run hooks
- (run-hooks 'snmp-common-mode-hook)
- (run-hooks 'snmp-mode-hook))
+ (run-mode-hooks 'snmp-common-mode-hook 'snmp-mode-hook))
;;;###autoload
@@ -429,8 +428,7 @@ then `snmpv2-mode-hook'."
(setq snmp-mode-status-list snmp-rfc1902-status)
;; Run hooks
- (run-hooks 'snmp-common-mode-hook)
- (run-hooks 'snmpv2-mode-hook))
+ (run-mode-hooks 'snmp-common-mode-hook 'snmpv2-mode-hook))
;;;----------------------------------------------------------------------------
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
(setq font-lock-defaults '(outline-font-lock-keywords t))
(make-local-variable 'change-major-mode-hook)
(add-hook 'change-major-mode-hook 'show-all)
- (run-hooks 'text-mode-hook 'outline-mode-hook))
+ (run-mode-hooks 'text-mode-hook 'outline-mode-hook))
(defcustom outline-minor-mode-prefix "\C-c@"
"*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]
(setq truncate-lines t)
(setq major-mode 'Edit-options-mode)
(setq mode-name "Options")
- (run-hooks 'Edit-options-mode-hook))
+ (run-mode-hooks 'Edit-options-mode-hook))
(defun Edit-options-set () (interactive)
(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."
(set-syntax-table text-mode-syntax-table)
(use-local-map news-mode-map)
(setq local-abbrev-table text-mode-abbrev-table)
- (run-hooks 'news-mode-hook))
+ (run-mode-hooks 'news-mode-hook))
(defun string-subst-char (new old string)
(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)."
(setq mode-name "News Reply")
(make-local-variable 'paragraph-separate)
(make-local-variable 'paragraph-start)
- (run-hooks 'text-mode-hook 'news-reply-mode-hook))
+ (run-mode-hooks 'text-mode-hook 'news-reply-mode-hook))
(defvar news-reply-yank-from ""
"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 @@
;;; outline.el --- outline mode commands for Emacs
-;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004
+;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2004
;; Free Software Foundation, Inc.
;; Maintainer: FSF
@@ -167,14 +167,45 @@ in the file it applies to."
0 '(outline-font-lock-face) nil t)))
"Additional expressions to highlight in Outline mode.")
-(defface outline-1 '((t :inherit font-lock-function-name-face)) "Level 1.")
-(defface outline-2 '((t :inherit font-lock-variable-name-face)) "Level 2.")
-(defface outline-3 '((t :inherit font-lock-keyword-face)) "Level 3.")
-(defface outline-4 '((t :inherit font-lock-builtin-face)) "Level 4.")
-(defface outline-5 '((t :inherit font-lock-comment-face)) "Level 5.")
-(defface outline-6 '((t :inherit font-lock-constant-face)) "Level 6.")
-(defface outline-7 '((t :inherit font-lock-type-face)) "Level 7.")
-(defface outline-8 '((t :inherit font-lock-string-face)) "Level 8.")
+(defface outline-1
+ '((t :inherit font-lock-function-name-face))
+ "Level 1."
+ :group 'outlines)
+
+(defface outline-2
+ '((t :inherit font-lock-variable-name-face))
+ "Level 2."
+ :group 'outlines)
+
+(defface outline-3
+ '((t :inherit font-lock-keyword-face))
+ "Level 3."
+ :group 'outlines)
+
+(defface outline-4
+ '((t :inherit font-lock-builtin-face))
+ "Level 4."
+ :group 'outlines)
+
+(defface outline-5
+ '((t :inherit font-lock-comment-face))
+ "Level 5."
+ :group 'outlines)
+
+(defface outline-6
+ '((t :inherit font-lock-constant-face))
+ "Level 6."
+ :group 'outlines)
+
+(defface outline-7
+ '((t :inherit font-lock-type-face))
+ "Level 7."
+ :group 'outlines)
+
+(defface outline-8
+ '((t :inherit font-lock-string-face))
+ "Level 8."
+ :group 'outlines)
(defvar outline-font-lock-faces
[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:
(use-local-map 5x5-mode-map)
(setq major-mode '5x5-mode
mode-name "5x5")
- (run-hooks '5x5-mode-hook)
+ (run-mode-hooks '5x5-mode-hook)
(setq buffer-read-only t
truncate-lines t)
- (buffer-disable-undo (current-buffer)))
+ (buffer-disable-undo))
;;;###autoload
(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:
(lambda () (setq buffer-read-only nil
buffer-undo-list nil))
nil t)
- (run-hooks 'decipher-mode-hook)
+ (run-mode-hooks 'decipher-mode-hook)
(setq buffer-read-only t))
(put 'decipher-mode 'mode-class 'special)
@@ -998,7 +998,7 @@ Creates the statistics buffer if it doesn't exist."
major-mode 'decipher-stats-mode
mode-name "Decipher-Stats")
(use-local-map decipher-stats-mode-map)
- (run-hooks 'decipher-stats-mode-hook))
+ (run-mode-hooks 'decipher-stats-mode-hook))
(put 'decipher-stats-mode 'mode-class 'special)
;;--------------------------------------------------------------------
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."
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(gomoku-font-lock-keywords t))
(toggle-read-only t)
- (run-hooks 'gomoku-mode-hook))
+ (run-mode-hooks 'gomoku-mode-hook))
;;;
;;; 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:
Entry to this mode calls the value of `lm-mode-hook' if that value
is non-nil. One interesting value is `turn-on-font-lock'."
(interactive)
+ (kill-all-local-variables)
(setq major-mode 'lm-mode
mode-name "Lm")
(lm-display-statistics)
@@ -255,7 +256,7 @@ is non-nil. One interesting value is `turn-on-font-lock'."
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(lm-font-lock-keywords t))
(toggle-read-only t)
- (run-hooks 'lm-mode-hook))
+ (run-mode-hooks 'lm-mode-hook))
;;;_ + 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.
Then you may resume the game with M-x mpuz.
You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
(interactive)
+ (kill-all-local-variables)
(setq major-mode 'mpuz-mode
mode-name "Mult Puzzle"
tab-width 30)
(use-local-map mpuz-mode-map)
- (run-hooks 'mpuz-mode-hook))
+ (run-mode-hooks 'mpuz-mode-hook))
;; 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:
(gamegrid-init (snake-display-options))
- (run-hooks 'snake-mode-hook))
+ (run-mode-hooks 'snake-mode-hook))
;;;###autoload
(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,
(setq truncate-lines t)
(setq major-mode 'solitaire-mode)
(setq mode-name "Solitaire")
- (run-hooks 'solitaire-mode-hook))
+ (run-mode-hooks 'solitaire-mode-hook))
(defvar solitaire-stones 0
"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:
(gamegrid-init (tetris-display-options))
- (run-hooks 'tetris-mode-hook))
+ (run-mode-hooks 'tetris-mode-hook))
;;;###autoload
(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."
(str (pr-f-read-string (format fmt-prompt prompt mess) "1" nil "1"))
int)
(while (if (string-match "^\\s *[0-9]+$" str)
- (setq int (string-to-int str)
+ (setq int (string-to-number str)
prompt (cond ((< int 1) "Integer below 1; ")
((> int 100) "Integer above 100; ")
(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:
(min ada-indent (current-column))))))
(add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t)
- (run-hooks 'ada-mode-hook)
+ (run-mode-hooks 'ada-mode-hook)
;; To be run after the hook, in case the user modified
;; 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."
(imenu-add-to-menubar
(if (stringp antlr-imenu-name) antlr-imenu-name "Index")))
(antlr-set-tabs)
- (run-hooks 'antlr-mode-hook))
+ (run-mode-hooks 'antlr-mode-hook))
;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in
;; 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."
(set (make-local-variable 'indent-line-function) #'indent-relative)
(set (make-local-variable 'add-log-current-defun-function)
#'autoconf-current-defun-function)
- (run-hooks 'autoconf-mode-hook))
+ (run-mode-hooks 'autoconf-mode-hook))
(provide 'autoconf-mode)
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))
(makepp
"^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\
-`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'\\)"
+`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)"
4 5 nil (1 . 2) 3
- ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil
+ ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil
(2 compilation-info-face)
(3 compilation-line-face nil t)
(1 (compilation-error-properties 2 3 nil nil nil 0 nil)
@@ -935,12 +935,20 @@ Returns the compilation buffer created."
(substitute-env-vars (match-string 1 command))
"~")
default-directory))
+ ;; Select the desired mode.
+ (if (not (eq mode t))
+ (funcall mode)
+ (setq buffer-read-only nil)
+ (with-no-warnings (comint-mode))
+ (compilation-shell-minor-mode))
+ (if highlight-regexp
+ (set (make-local-variable 'compilation-highlight-regexp)
+ highlight-regexp))
(erase-buffer)
- ;; output a mode setter, for saving and later reloading this buffer
+ ;; Output a mode setter, for saving and later reloading this buffer.
(insert "-*- mode: " name-of-mode
"; default-directory: " (prin1-to-string default-directory)
- " -*-\n" command "\n")
- (setq thisdir default-directory))
+ " -*-\n" command "\n") (setq thisdir default-directory))
(set-buffer-modified-p nil))
;; If we're already in the compilation buffer, go to the end
;; of the buffer, so point will track the compilation output.
@@ -963,14 +971,6 @@ Returns the compilation buffer created."
;; don't override users' setting of $EMACS.
(unless (getenv "EMACS") '("EMACS=t"))
(copy-sequence process-environment))))
- (if (not (eq mode t))
- (funcall mode)
- (setq buffer-read-only nil)
- (with-no-warnings (comint-mode))
- (compilation-shell-minor-mode))
- (if highlight-regexp
- (set (make-local-variable 'compilation-highlight-regexp)
- highlight-regexp))
(set (make-local-variable 'compilation-arguments)
(list command mode name-function highlight-regexp))
(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
(setq mode-name "DCL")
(use-local-map dcl-mode-map)
(tempo-use-tag-list 'dcl-tempo-tags)
- (run-hooks 'dcl-mode-hook))
+ (run-mode-hooks 'dcl-mode-hook))
;;; *** 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."
(delphi-parse-region (point-min) (point-max))
(delphi-progress-done))))
- (run-hooks 'delphi-mode-hook))
+ (run-mode-hooks 'delphi-mode-hook))
;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41
;;; 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:
(when tree
(ebrowse-redraw-tree)
(set-buffer-modified-p nil))
- (run-hooks 'ebrowse-tree-mode-hook)))
+ (run-mode-hooks 'ebrowse-tree-mode-hook)))
@@ -2026,7 +2026,7 @@ COLLAPSE non-nil means collapse the branch."
truncate-lines t
buffer-read-only t
major-mode 'ebrowse-electric-list-mode)
- (run-hooks 'ebrowse-electric-list-mode-hook))
+ (run-mode-hooks 'ebrowse-electric-list-mode-hook))
(defun ebrowse-list-tree-buffers ()
@@ -2277,7 +2277,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
ebrowse--const-display-flag nil
ebrowse--pure-display-flag nil)
(modify-syntax-entry ?_ (char-to-string (char-syntax ?a)))
- (run-hooks 'ebrowse-member-mode-hook))
+ (run-mode-hooks 'ebrowse-member-mode-hook))
@@ -3987,7 +3987,7 @@ Runs the hook `ebrowse-electric-position-mode-hook'."
truncate-lines t
buffer-read-only t
major-mode 'ebrowse-electric-position-mode)
- (run-hooks 'ebrowse-electric-position-mode-hook))
+ (run-mode-hooks 'ebrowse-electric-position-mode-hook))
(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."
(set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram)
(set (make-local-variable 'add-log-current-defun-function)
#'f90-current-defun)
- (run-hooks 'f90-mode-hook))
+ (run-mode-hooks 'f90-mode-hook))
;; 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."
#'fortran-current-defun)
(set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search)
(set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr)
- (run-hooks 'fortran-mode-hook))
+ (run-mode-hooks 'fortran-mode-hook))
(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 @@
(require 'gud)
-(defvar gdb-current-address "main" "Initialisation for Assembler buffer.")
-(defvar gdb-previous-address nil)
+(defvar gdb-frame-address "main" "Initialisation for Assembler buffer.")
+(defvar gdb-previous-frame-address nil)
(defvar gdb-memory-address "main")
(defvar gdb-previous-frame nil)
-(defvar gdb-current-frame nil)
-(defvar gdb-current-stack-level nil)
+(defvar gdb-selected-frame nil)
+(defvar gdb-frame-number nil)
(defvar gdb-current-language nil)
(defvar gdb-var-list nil "List of variables in watch window.")
(defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.")
+(defvar gdb-main-file nil "Source file from which program execution begins.")
(defvar gdb-buffer-type nil)
(defvar gdb-overlay-arrow-position nil)
(defvar gdb-server-prefix nil)
@@ -211,11 +212,18 @@ predefined macros."
:version "22.1")
(defcustom gdb-cpp-define-alist-flags ""
- "*Preprocessor flags for `gdb-cpp-define-alist-program'."
+ "Preprocessor flags for `gdb-cpp-define-alist-program'."
:type 'string
:group 'gud
:version "22.1")
+(defcustom gdb-show-main nil
+ "Non-nil means display source file containing the main routine at startup.
+Also display the main routine in the disassembly buffer if present."
+ :type 'boolean
+ :group 'gud
+ :version "22.1")
+
(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
(defun gdb-create-define-alist ()
@@ -269,7 +277,7 @@ predefined macros."
(defun gdb-set-gud-minor-mode-1 (buffer)
(goto-char (point-min))
(when (and (search-forward "Located in " nil t)
- (looking-at "\\S-*")
+ (looking-at "\\S-+")
(string-equal (buffer-file-name buffer)
(match-string 0)))
(with-current-buffer buffer
@@ -295,7 +303,7 @@ predefined macros."
(set (make-local-variable 'gud-minor-mode) 'gdba)
(set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
;;
- (gud-def gud-break (if (not (string-equal mode-name "Machine"))
+ (gud-def gud-break (if (not (string-match "Machine" mode-name))
(gud-call "break %f:%l" arg)
(save-excursion
(beginning-of-line)
@@ -303,7 +311,7 @@ predefined macros."
(gud-call "break *%a" arg)))
"\C-b" "Set breakpoint at current line or address.")
;;
- (gud-def gud-remove (if (not (string-equal mode-name "Machine"))
+ (gud-def gud-remove (if (not (string-match "Machine" mode-name))
(gud-call "clear %f:%l" arg)
(save-excursion
(beginning-of-line)
@@ -311,7 +319,7 @@ predefined macros."
(gud-call "clear *%a" arg)))
"\C-d" "Remove breakpoint at current line or address.")
;;
- (gud-def gud-until (if (not (string-equal mode-name "Machine"))
+ (gud-def gud-until (if (not (string-match "Machine" mode-name))
(gud-call "until %f:%l" arg)
(save-excursion
(beginning-of-line)
@@ -332,25 +340,26 @@ predefined macros."
(setq comint-input-sender 'gdb-send)
;;
;; (re-)initialize
- (setq gdb-current-address "main")
- (setq gdb-previous-address nil)
- (setq gdb-memory-address "main")
- (setq gdb-previous-frame nil)
- (setq gdb-current-frame nil)
- (setq gdb-current-stack-level nil)
- (setq gdb-var-list nil)
- (setq gdb-var-changed nil)
- (setq gdb-first-prompt nil)
- (setq gdb-prompting nil)
- (setq gdb-input-queue nil)
- (setq gdb-current-item nil)
- (setq gdb-pending-triggers nil)
- (setq gdb-output-sink 'user)
- (setq gdb-server-prefix "server ")
- (setq gdb-flush-pending-output nil)
- (setq gdb-location-alist nil)
- (setq gdb-find-file-unhook nil)
- (setq gdb-macro-info nil)
+ (setq gdb-frame-address (if gdb-show-main "main" nil))
+ (setq gdb-previous-frame-address nil
+ gdb-memory-address "main"
+ gdb-previous-frame nil
+ gdb-selected-frame nil
+ gdb-current-language nil
+ gdb-frame-number nil
+ gdb-var-list nil
+ gdb-var-changed nil
+ gdb-first-prompt nil
+ gdb-prompting nil
+ gdb-input-queue nil
+ gdb-current-item nil
+ gdb-pending-triggers nil
+ gdb-output-sink 'user
+ gdb-server-prefix "server "
+ gdb-flush-pending-output nil
+ gdb-location-alist nil
+ gdb-find-file-unhook nil
+ gdb-macro-info nil)
;;
(setq gdb-buffer-type 'gdba)
;;
@@ -380,8 +389,8 @@ predefined macros."
(require 'tooltip)
(let ((expr (tooltip-identifier-from-point (point))))
(if (and (string-equal gdb-current-language "c")
- gdb-use-colon-colon-notation gdb-current-frame)
- (setq expr (concat gdb-current-frame "::" expr)))
+ gdb-use-colon-colon-notation gdb-selected-frame)
+ (setq expr (concat gdb-selected-frame "::" expr)))
(catch 'already-watched
(dolist (var gdb-var-list)
(if (string-equal expr (car var)) (throw 'already-watched nil)))
@@ -862,7 +871,7 @@ This filter may simply queue input for a later time."
(setq gdb-prompting t))
(defconst gdb-source-spec-regexp
- "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)")
+ "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:0x0*\\([a-f0-9]*\\)")
;; Do not use this except as an annotation handler.
(defun gdb-source (args)
@@ -872,7 +881,7 @@ This filter may simply queue input for a later time."
(cons
(match-string 1 args)
(string-to-number (match-string 2 args))))
- (setq gdb-current-address (match-string 3 args))
+ (setq gdb-frame-address (match-string 3 args))
;; cover for auto-display output which comes *before*
;; stopped annotation
(if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user)))
@@ -985,10 +994,12 @@ sink to `user' in `gdb-stopping', that is fine."
This begins the collection of output from the current command if that
happens to be appropriate."
(unless gdb-pending-triggers
- (gdb-get-current-frame)
+ (gdb-get-selected-frame)
(gdb-invalidate-frames)
(gdb-invalidate-breakpoints)
- (gdb-invalidate-assembler)
+ ;; Do this through gdb-get-selected-frame -> gdb-frame-handler
+ ;; so gdb-frame-address is updated.
+ ;; (gdb-invalidate-assembler)
(gdb-invalidate-registers)
(gdb-invalidate-memory)
(gdb-invalidate-locals)
@@ -1150,12 +1161,12 @@ happens to be appropriate."
(let ((buf (gdb-get-buffer ',buf-key)))
(and buf
(with-current-buffer buf
- (let ((p (point))
+ (let ((p (window-point (get-buffer-window buf 0)))
(buffer-read-only nil))
(erase-buffer)
(insert-buffer-substring (gdb-get-create-buffer
'gdb-partial-output-buffer))
- (goto-char p)))))
+ (set-window-point (get-buffer-window buf 0) p)))))
;; put customisation here
(,custom-defun)))
@@ -1293,7 +1304,7 @@ static char *magick[] = {
(goto-char (point-min))
(while (< (point) (- (point-max) 1))
(forward-line 1)
- (if (looking-at "[^\t].*breakpoint")
+ (if (looking-at "[^\t].*?breakpoint")
(progn
(looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)")
(setq bptno (match-string 1))
@@ -1435,9 +1446,9 @@ static char *magick[] = {
(save-excursion
(beginning-of-line 1)
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
- (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
+ (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)\\s-+")
(looking-at
- "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
+ "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+\\S-+\\s-+\\S-+:[0-9]+"))
(gdb-enqueue-input
(list
(concat gdb-server-prefix
@@ -1452,9 +1463,9 @@ static char *magick[] = {
(interactive)
(beginning-of-line 1)
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
- (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
+ (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)")
(looking-at
- "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
+ "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+"))
(gdb-enqueue-input
(list
(concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore))
@@ -1467,10 +1478,10 @@ static char *magick[] = {
(save-excursion
(beginning-of-line 1)
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
- (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
+ (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)")
(looking-at
- "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\
-\\(\\S-*\\):\\([0-9]+\\)"))
+ "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\
+\\(\\S-+\\):\\([0-9]+\\)"))
(let ((bptno (match-string 1))
(file (match-string 2))
(line (match-string 3)))
@@ -1511,7 +1522,7 @@ static char *magick[] = {
help-echo "mouse-2, RET: Select frame"))
(beginning-of-line)
(when (and (looking-at "^#\\([0-9]+\\)")
- (equal (match-string 1) gdb-current-stack-level))
+ (equal (match-string 1) gdb-frame-number))
(put-text-property (line-beginning-position) (line-end-position)
'face '(:inverse-video t)))
(forward-line 1))))))
@@ -1648,13 +1659,20 @@ static char *magick[] = {
;; Registers buffer.
;;
+(defcustom gdb-all-registers nil
+ "Non-nil means include floating-point registers."
+ :type 'boolean
+ :group 'gud
+ :version "22.1")
+
(gdb-set-buffer-rules 'gdb-registers-buffer
'gdb-registers-buffer-name
'gdb-registers-mode)
(def-gdb-auto-updated-buffer gdb-registers-buffer
gdb-invalidate-registers
- (concat gdb-server-prefix "info registers\n")
+ (concat
+ gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n")
gdb-info-registers-handler
gdb-info-registers-custom)
@@ -1663,6 +1681,7 @@ static char *magick[] = {
(defvar gdb-registers-mode-map
(let ((map (make-sparse-keymap)))
(suppress-keymap map)
+ (define-key map " " 'toggle-gdb-all-registers)
(define-key map "q" 'kill-this-buffer)
map))
@@ -1672,7 +1691,7 @@ static char *magick[] = {
\\{gdb-registers-mode-map}"
(kill-all-local-variables)
(setq major-mode 'gdb-registers-mode)
- (setq mode-name "Registers")
+ (setq mode-name "Registers:")
(setq buffer-read-only t)
(use-local-map gdb-registers-mode-map)
(run-mode-hooks 'gdb-registers-mode-hook)
@@ -1695,6 +1714,20 @@ static char *magick[] = {
(special-display-frame-alist gdb-frame-parameters))
(display-buffer (gdb-get-create-buffer 'gdb-registers-buffer))))
+(defun toggle-gdb-all-registers ()
+ "Toggle the display of floating-point registers."
+ (interactive)
+ (if gdb-all-registers
+ (progn
+ (setq gdb-all-registers nil)
+ (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
+ (setq mode-name "Registers:")))
+ (setq gdb-all-registers t)
+ (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
+ (setq mode-name "Registers:All")))
+ (gdb-invalidate-registers))
+
+
;; Memory buffer.
;;
(defcustom gdb-memory-repeat-count 32
@@ -1733,7 +1766,11 @@ static char *magick[] = {
gdb-read-memory-handler
gdb-read-memory-custom)
-(defun gdb-read-memory-custom ())
+(defun gdb-read-memory-custom ()
+ (save-excursion
+ (goto-char (point-min))
+ (if (looking-at "0x[[:xdigit:]]+")
+ (setq gdb-memory-address (match-string 0)))))
(defvar gdb-memory-mode-map
(let ((map (make-sparse-keymap)))
@@ -1757,8 +1794,8 @@ static char *magick[] = {
(select-window (posn-window (event-start event)))
(let* ((arg (read-from-minibuffer "Repeat count: "))
(count (string-to-number arg)))
- (if (< count 0)
- (error "Non-negative numbers only")
+ (if (<= count 0)
+ (error "Positive numbers only")
(customize-set-variable 'gdb-memory-repeat-count count)
(gdb-invalidate-memory)))))
@@ -1911,10 +1948,42 @@ corresponding to the mode line clicked."
(setq header-line-format
'(:eval
(concat
- "Read address: "
+ "Read address["
+ (propertize
+ "-"
+ 'face font-lock-warning-face
+ 'help-echo "mouse-1: Decrement address"
+ 'mouse-face 'mode-line-highlight
+ 'local-map
+ (gdb-make-header-line-mouse-map
+ 'mouse-1
+ #'(lambda () (interactive)
+ (let ((gdb-memory-address
+ ;; let GDB do the arithmetic
+ (concat
+ gdb-memory-address " - "
+ (number-to-string
+ (* gdb-memory-repeat-count
+ (cond ((string= gdb-memory-unit "b") 1)
+ ((string= gdb-memory-unit "h") 2)
+ ((string= gdb-memory-unit "w") 4)
+ ((string= gdb-memory-unit "g") 8)))))))
+ (gdb-invalidate-memory)))))
+ "|"
+ (propertize "+"
+ 'face font-lock-warning-face
+ 'help-echo "mouse-1: Increment address"
+ 'mouse-face 'mode-line-highlight
+ 'local-map (gdb-make-header-line-mouse-map
+ 'mouse-1
+ #'(lambda () (interactive)
+ (let ((gdb-memory-address nil))
+ (gdb-invalidate-memory)))))
+ "]: "
(propertize gdb-memory-address
'face font-lock-warning-face
'help-echo "mouse-1: Set memory address"
+ 'mouse-face 'mode-line-highlight
'local-map (gdb-make-header-line-mouse-map
'mouse-1
#'gdb-memory-set-address))
@@ -1922,6 +1991,7 @@ corresponding to the mode line clicked."
(propertize (number-to-string gdb-memory-repeat-count)
'face font-lock-warning-face
'help-echo "mouse-1: Set repeat count"
+ 'mouse-face 'mode-line-highlight
'local-map (gdb-make-header-line-mouse-map
'mouse-1
#'gdb-memory-set-repeat-count))
@@ -1929,11 +1999,13 @@ corresponding to the mode line clicked."
(propertize gdb-memory-format
'face font-lock-warning-face
'help-echo "mouse-3: Select display format"
+ 'mouse-face 'mode-line-highlight
'local-map gdb-memory-format-keymap)
" Unit Size: "
(propertize gdb-memory-unit
'face font-lock-warning-face
'help-echo "mouse-3: Select unit size"
+ 'mouse-face 'mode-line-highlight
'local-map gdb-memory-unit-keymap))))
(run-mode-hooks 'gdb-memory-mode-hook)
'gdb-invalidate-memory)
@@ -1986,12 +2058,12 @@ corresponding to the mode line clicked."
(replace-match " (array);\n" nil nil))))
(let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
(and buf (with-current-buffer buf
- (let ((p (point))
+ (let ((p (window-point (get-buffer-window buf 0)))
(buffer-read-only nil))
- (delete-region (point-min) (point-max))
+ (erase-buffer)
(insert-buffer-substring (gdb-get-create-buffer
'gdb-partial-output-buffer))
- (goto-char p)))))
+ (set-window-point (get-buffer-window buf 0) p)))))
(run-hooks 'gdb-info-locals-hook))
(defun gdb-info-locals-custom ()
@@ -2009,7 +2081,7 @@ corresponding to the mode line clicked."
\\{gdb-locals-mode-map}"
(kill-all-local-variables)
(setq major-mode 'gdb-locals-mode)
- (setq mode-name (concat "Locals:" gdb-current-frame))
+ (setq mode-name (concat "Locals:" gdb-selected-frame))
(setq buffer-read-only t)
(use-local-map gdb-locals-mode-map)
(run-mode-hooks 'gdb-locals-mode-hook)
@@ -2069,7 +2141,8 @@ corresponding to the mode line clicked."
(define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer))
(define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
(define-key menu [memory] '("Memory" . gdb-display-memory-buffer))
- (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer))
+ (define-key menu [disassembly]
+ '("Disassembly" . gdb-display-assembler-buffer))
(define-key menu [registers] '("Registers" . gdb-display-registers-buffer))
(define-key menu [inferior]
'(menu-item "Inferior IO" gdb-display-inferior-io-buffer
@@ -2086,7 +2159,7 @@ corresponding to the mode line clicked."
(define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer))
(define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
(define-key menu [memory] '("Memory" . gdb-frame-memory-buffer))
- (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer))
+ (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer))
(define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
(define-key menu [inferior]
'(menu-item "Inferior IO" gdb-frame-inferior-io-buffer
@@ -2129,14 +2202,6 @@ corresponding to the mode line clicked."
(gdb-display-buffer
(gdb-get-create-buffer 'gdba)))
-(defvar gdb-main-file nil "Source file from which program execution begins.")
-
-(defcustom gdb-show-main nil
- "Nil means don't display source file containing the main routine."
- :type 'boolean
- :group 'gud
- :version "22.1")
-
(defun gdb-set-window-buffer (name)
(set-window-buffer (selected-window) (get-buffer name))
(set-window-dedicated-p (selected-window) t))
@@ -2236,7 +2301,7 @@ Kills the gdb buffers and resets the source buffers."
buffers."
(goto-char (point-min))
(if (and (search-forward "Located in " nil t)
- (looking-at "\\S-*"))
+ (looking-at "\\S-+"))
(setq gdb-main-file (match-string 0)))
(goto-char (point-min))
(if (search-forward "Includes preprocessor macro info." nil t)
@@ -2254,7 +2319,7 @@ Put in buffer and place breakpoint icon."
(goto-char (point-min))
(catch 'file-not-found
(if (search-forward "Located in " nil t)
- (when (looking-at "\\S-*")
+ (when (looking-at "\\S-+")
(delete (cons bptno "File not found") gdb-location-alist)
(push (cons bptno (match-string 0)) gdb-location-alist))
(gdb-resync)
@@ -2276,6 +2341,8 @@ Add directory to search path for source files using the GDB command, dir."))
(add-hook 'find-file-hook 'gdb-find-file-hook)
(defun gdb-find-file-hook ()
+"Set up buffer for debugging if file is part of the source code
+of the current session."
(if (and (not gdb-find-file-unhook)
;; in case gud or gdb-ui is just loaded
gud-comint-buffer
@@ -2399,7 +2466,9 @@ BUFFER nil or omitted means use the current buffer."
(def-gdb-auto-updated-buffer gdb-assembler-buffer
gdb-invalidate-assembler
- (concat gdb-server-prefix "disassemble " gdb-current-address "\n")
+ (concat gdb-server-prefix "disassemble "
+ (if (member gdb-frame-address '(nil "main")) nil "0x")
+ gdb-frame-address "\n")
gdb-assembler-handler
gdb-assembler-custom)
@@ -2407,38 +2476,38 @@ BUFFER nil or omitted means use the current buffer."
(let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))
(pos 1) (address) (flag) (bptno))
(with-current-buffer buffer
- (if (not (equal gdb-current-address "main"))
- (progn
- (goto-char (point-min))
- (if (re-search-forward gdb-current-address nil t)
- (progn
- (setq pos (point))
- (beginning-of-line)
- (or gdb-overlay-arrow-position
- (setq gdb-overlay-arrow-position (make-marker)))
- (set-marker gdb-overlay-arrow-position
- (point) (current-buffer))))))
- ;; remove all breakpoint-icons in assembler buffer before updating.
- (gdb-remove-breakpoint-icons (point-min) (point-max)))
+ (save-excursion
+ (if (not (equal gdb-frame-address "main"))
+ (progn
+ (goto-char (point-min))
+ (if (and gdb-frame-address
+ (re-search-forward gdb-frame-address nil t))
+ (progn
+ (setq pos (point))
+ (beginning-of-line)
+ (or gdb-overlay-arrow-position
+ (setq gdb-overlay-arrow-position (make-marker)))
+ (set-marker gdb-overlay-arrow-position
+ (point) (current-buffer))))))
+ ;; remove all breakpoint-icons in assembler buffer before updating.
+ (gdb-remove-breakpoint-icons (point-min) (point-max))))
(with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
(goto-char (point-min))
(while (< (point) (- (point-max) 1))
(forward-line 1)
- (if (looking-at "[^\t].*breakpoint")
+ (if (looking-at "[^\t].*?breakpoint")
(progn
(looking-at
- "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x\\(\\S-+\\)")
+ "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)")
(setq bptno (match-string 1))
(setq flag (char-after (match-beginning 2)))
(setq address (match-string 3))
- ;; remove leading 0s from output of info break.
- (if (string-match "^0+\\(.*\\)" address)
- (setq address (match-string 1 address)))
(with-current-buffer buffer
+ (save-excursion
(goto-char (point-min))
(if (re-search-forward address nil t)
- (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))
- (if (not (equal gdb-current-address "main"))
+ (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))))
+ (if (not (equal gdb-frame-address "main"))
(set-window-point (get-buffer-window buffer 0) pos))))
(defvar gdb-assembler-mode-map
@@ -2468,7 +2537,7 @@ BUFFER nil or omitted means use the current buffer."
\\{gdb-assembler-mode-map}"
(kill-all-local-variables)
(setq major-mode 'gdb-assembler-mode)
- (setq mode-name "Machine")
+ (setq mode-name (concat "Machine:" gdb-selected-frame))
(setq gdb-overlay-arrow-position nil)
(add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position)
(setq fringes-outside-margins t)
@@ -2482,33 +2551,36 @@ BUFFER nil or omitted means use the current buffer."
(defun gdb-assembler-buffer-name ()
(with-current-buffer gud-comint-buffer
- (concat "*Machine Code " (gdb-get-target-string) "*")))
+ (concat "*Disassembly of " (gdb-get-target-string) "*")))
(defun gdb-display-assembler-buffer ()
"Display disassembly view."
(interactive)
+ (setq gdb-previous-frame nil)
(gdb-display-buffer
(gdb-get-create-buffer 'gdb-assembler-buffer)))
(defun gdb-frame-assembler-buffer ()
"Display disassembly view in a new frame."
(interactive)
+ (setq gdb-previous-frame nil)
(let ((special-display-regexps (append special-display-regexps '(".*")))
(special-display-frame-alist gdb-frame-parameters))
(display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))))
-;; modified because if gdb-current-address has changed value a new command
+;; modified because if gdb-frame-address has changed value a new command
;; must be enqueued to update the buffer with the new output
(defun gdb-invalidate-assembler (&optional ignored)
(if (gdb-get-buffer 'gdb-assembler-buffer)
(progn
- (unless (string-equal gdb-current-frame gdb-previous-frame)
+ (unless (and gdb-selected-frame
+ (string-equal gdb-selected-frame gdb-previous-frame))
(if (or (not (member 'gdb-invalidate-assembler
gdb-pending-triggers))
- (not (string-equal gdb-current-address
- gdb-previous-address)))
+ (not (string-equal gdb-frame-address
+ gdb-previous-frame-address)))
(progn
- ;; take previous disassemble command off the queue
+ ;; take previous disassemble command, if any, off the queue
(with-current-buffer gud-comint-buffer
(let ((queue gdb-input-queue))
(dolist (item queue)
@@ -2516,46 +2588,46 @@ BUFFER nil or omitted means use the current buffer."
(setq gdb-input-queue
(delete item gdb-input-queue))))))
(gdb-enqueue-input
- (list (concat gdb-server-prefix "disassemble "
- gdb-current-address "\n")
+ (list
+ (concat gdb-server-prefix "disassemble "
+ (if (member gdb-frame-address '(nil "main")) nil "0x")
+ gdb-frame-address "\n")
'gdb-assembler-handler))
(push 'gdb-invalidate-assembler gdb-pending-triggers)
- (setq gdb-previous-address gdb-current-address)
- (setq gdb-previous-frame gdb-current-frame)))))))
+ (setq gdb-previous-frame-address gdb-frame-address)
+ (setq gdb-previous-frame gdb-selected-frame)))))))
-(defun gdb-get-current-frame ()
- (if (not (member 'gdb-get-current-frame gdb-pending-triggers))
+(defun gdb-get-selected-frame ()
+ (if (not (member 'gdb-get-selected-frame gdb-pending-triggers))
(progn
(gdb-enqueue-input
(list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler))
- (push 'gdb-get-current-frame
+ (push 'gdb-get-selected-frame
gdb-pending-triggers))))
(defun gdb-frame-handler ()
(setq gdb-pending-triggers
- (delq 'gdb-get-current-frame gdb-pending-triggers))
+ (delq 'gdb-get-selected-frame gdb-pending-triggers))
(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
(goto-char (point-min))
- (if (looking-at "Stack level \\([0-9]+\\)")
- (setq gdb-current-stack-level (match-string 1)))
- (forward-line)
- (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ")
+ (if (re-search-forward "Stack level \\([0-9]+\\)" nil t)
+ (setq gdb-frame-number (match-string 1)))
+ (goto-char (point-min))
+ (if (re-search-forward
+ ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t)
(progn
- (setq gdb-current-frame (match-string 2))
+ (setq gdb-selected-frame (match-string 2))
(if (gdb-get-buffer 'gdb-locals-buffer)
(with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
- (setq mode-name (concat "Locals:" gdb-current-frame))))
- (let ((address (match-string 1)))
- ;; remove leading 0s from output of info frame command.
- (if (string-match "^0+\\(.*\\)" address)
- (setq gdb-current-address
- (concat "0x" (match-string 1 address)))
- (setq gdb-current-address (concat "0x" address))))
- (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t))
- ;;update with new frame for machine code if necessary
- (gdb-invalidate-assembler)))))
+ (setq mode-name (concat "Locals:" gdb-selected-frame))))
+ (if (gdb-get-buffer 'gdb-assembler-buffer)
+ (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer)
+ (setq mode-name (concat "Machine:" gdb-selected-frame))))
+ (setq gdb-frame-address (match-string 1))))
+ (goto-char (point-min))
(if (re-search-forward " source language \\(\\S-*\\)\." nil t)
(setq gdb-current-language (match-string 1))))
+ (gdb-invalidate-assembler))
(provide 'gdb-ui)
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 @@
;;; Commentary:
-;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu>
-;; It was later rewritten by rms. Some ideas were due to Masanobu.
-;; Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com>
-;; The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>,
-;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com>
-;; added support for xdb (HPUX debugger). Rick Sladkey <jrs@world.std.com>
-;; wrote the GDB command completion code. Dave Love <d.love@dl.ac.uk>
-;; added the IRIX kluge, re-implemented the Mips-ish variant and added
-;; a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX kluge with
-;; the gud-xdb-directories hack producing gud-dbx-directories. Derek L. Davies
-;; <ddavies@world.std.com> added support for jdb (Java debugger.)
+;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> It was
+;; later rewritten by rms. Some ideas were due to Masanobu. Grand
+;; Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> Barry
+;; Warsaw <bwarsaw@cen.com> hacked the mode to use comint.el. Shane Hartman
+;; <shane@spr.com> added support for xdb (HPUX debugger). Rick Sladkey
+;; <jrs@world.std.com> wrote the GDB command completion code. Dave Love
+;; <d.love@dl.ac.uk> added the IRIX kluge, re-implemented the Mips-ish variant
+;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
+;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
+;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java
+;; debugger.)
;;; Code:
@@ -107,11 +107,10 @@ Used to grey out relevant togolbar icons.")
(setq same-window-regexps nil)
(throw 'info-found nil))))
nil 0)
- (require 'info)
(select-frame (make-frame)))
(if (memq gud-minor-mode '(gdbmi gdba))
- (Info-goto-node "(emacs)GDB Graphical Interface")
- (Info-goto-node "(emacs)Debuggers"))))
+ (info "(emacs)GDB Graphical Interface")
+ (info "(emacs)Debuggers"))))
(easy-mmode-defmap gud-menu-map
'(([help] "Info" . gud-goto-info)
@@ -141,6 +140,9 @@ Used to grey out relevant togolbar icons.")
:enable (and (not gud-running)
(memq gud-minor-mode
'(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
+ ([print*] menu-item "Print Dereference" gud-pstar
+ :enable (and (not gud-running)
+ (memq gud-minor-mode '(gdbmi gdba gdb))))
([print] menu-item "Print Expression" gud-print
:enable (not gud-running))
([watch] menu-item "Watch Expression" gud-watch
@@ -184,18 +186,19 @@ Used to grey out relevant togolbar icons.")
(dolist (x '((gud-break . "gud-break")
(gud-remove . "gud-remove")
(gud-print . "gud-print")
+ (gud-pstar . "gud-pstar")
(gud-watch . "gud-watch")
- (gud-run . "gud-run")
- (gud-until . "gud-until")
(gud-cont . "gud-cont")
+ (gud-until . "gud-until")
+ (gud-finish . "gud-finish")
+ (gud-run . "gud-run")
;; gud-s, gud-si etc. instead of gud-step,
;; gud-stepi, to avoid file-name clashes on DOS
;; 8+3 filesystems.
- (gud-step . "gud-s")
(gud-next . "gud-n")
- (gud-finish . "gud-finish")
- (gud-stepi . "gud-si")
+ (gud-step . "gud-s")
(gud-nexti . "gud-ni")
+ (gud-stepi . "gud-si")
(gud-up . "gud-up")
(gud-down . "gud-down")
(gud-goto-info . "info"))
@@ -343,13 +346,13 @@ t means that there is no stack, and we are in display-file mode.")
(defvar gud-speedbar-menu-items
;; Note to self. Add expand, and turn off items when not available.
- '(["Jump to stack frame" speedbar-edit-line
+ '(["Jump to stack frame" speedbar-edit-line
(with-current-buffer gud-comint-buffer
(not (memq gud-minor-mode '(gdbmi gdba))))]
- ["Edit value" speedbar-edit-line
+ ["Edit value" speedbar-edit-line
(with-current-buffer gud-comint-buffer
(not (memq gud-minor-mode '(gdbmi gdba))))]
- ["Delete expression" gdb-var-delete
+ ["Delete expression" gdb-var-delete
(with-current-buffer gud-comint-buffer
(not (memq gud-minor-mode '(gdbmi gdba))))])
"Additional menu items to add to the speedbar frame.")
@@ -581,6 +584,8 @@ and source-file directory for your debugger."
(gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
(gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
(gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
+ (gud-def gud-pstar "print* %e" nil
+ "Evaluate C dereferenced pointer expression at point.")
(gud-def gud-until "until %l" "\C-u" "Continue to current line.")
(gud-def gud-run "run" nil "Run the program.")
@@ -3192,7 +3197,7 @@ For C this would dereference a pointer expression.")
"The mouse movement event that led to a tooltip display.
This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
-(defun gud-tooltip-toggle-dereference ()
+(defun toggle-gud-tooltip-dereference ()
"Toggle whether tooltips should show `* expr' or `expr'."
(interactive)
(setq gud-tooltip-dereference (not gud-tooltip-dereference))
@@ -3201,7 +3206,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
(if gud-tooltip-dereference "on" "off"))))
(define-obsolete-function-alias 'tooltip-gud-toggle-dereference
- 'gud-tooltip-toggle-dereference "22.1")
+ 'toggle-gud-tooltip-dereference "22.1")
(define-minor-mode gud-tooltip-mode
"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."
(cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil
icon-forward-sexp-function)
hs-special-modes-alist)))
- (run-hooks 'icon-mode-hook))
+ (run-mode-hooks 'icon-mode-hook))
;; This is used by indent-for-comment to decide how much to
;; 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.
(set (make-local-variable 'idlwave-help-def-pos) nil)
(set (make-local-variable 'idlwave-help-args) nil)
(set (make-local-variable 'idlwave-help-in-header) nil)
- (run-hooks 'idlwave-help-mode-hook))
+ (run-mode-hooks 'idlwave-help-mode-hook))
(defun idlwave-html-help-location ()
"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.")
(set (make-local-variable 'tool-bar-map) nil)
;; Run the hooks.
- (run-hooks 'idlwave-shell-mode-hook)
+ (run-mode-hooks 'idlwave-shell-mode-hook)
(idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
;; Turn off IDL's ^d interpreting, and define a system
;; 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
(idlwave-new-buffer-update)
;; Run the mode hook
- (run-hooks 'idlwave-mode-hook))
+ (run-mode-hooks 'idlwave-mode-hook))
(defvar idlwave-setup-done nil)
(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.
If you accidentally suspend your process, use \\[comint-continue-subjob]
to continue it."
(interactive)
- (comint-mode)
+ (delay-mode-hooks
+ (comint-mode))
(setq comint-prompt-regexp inferior-lisp-prompt)
(setq major-mode 'inferior-lisp-mode)
(setq mode-name "Inferior Lisp")
@@ -269,7 +270,7 @@ to continue it."
(use-local-map inferior-lisp-mode-map) ;c-c c-k for "kompile" file
(setq comint-get-old-input (function lisp-get-old-input))
(setq comint-input-filter (function lisp-input-filter))
- (run-hooks 'inferior-lisp-mode-hook))
+ (run-mode-hooks 'inferior-lisp-mode-hook))
(defun lisp-get-old-input ()
"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 @@
font-lock-defaults '(m4-font-lock-keywords nil)
)
(set-syntax-table m4-mode-syntax-table)
- (run-hooks 'm4-mode-hook))
+ (run-mode-hooks 'm4-mode-hook))
(provide 'm4-mode)
;;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 @@
'((t (:underline t)))
"Face to use for additionally highlighting rule targets in Font-Lock mode."
:group 'faces
- :group 'makefile)
+ :group 'makefile
+ :version "22.1")
(defface makefile-shell-face
'((((class color) (background light)) (:background "seashell1"))
@@ -119,7 +120,8 @@
(t (:reverse-video t)))
"Face to use for additionally highlighting Shell commands in Font-Lock mode."
:group 'faces
- :group 'makefile)
+ :group 'makefile
+ :version "22.1")
(defface makefile-makepp-perl-face
'((((class color) (background light)) (:background "LightBlue1")) ; Camel Book
@@ -127,7 +129,8 @@
(t (:reverse-video t)))
"Face to use for additionally highlighting Perl code in Font-Lock mode."
:group 'faces
- :group 'makefile)
+ :group 'makefile
+ :version "22.1")
(defcustom makefile-browser-buffer-name "*Macros and Targets*"
"*Name of the macro- and target browser buffer."
@@ -262,18 +265,33 @@ not be enclosed in { } or ( )."
"^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)"
"Regex used to find dependency lines in a makefile.")
+(defconst makefile-bsdmake-dependency-regex
+ (progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex)
+ (replace-match "\\([:!]\\)" t t makefile-dependency-regex))
+ "Regex used to find dependency lines in a BSD makefile.")
+
(defvar makefile-dependency-skip "^:"
"Characters to skip to find a line that might be a dependency.")
(defvar makefile-rule-action-regex
- "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)"
+ "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)"
"Regex used to highlight rule action lines in font lock mode.")
+(defconst makefile-makepp-rule-action-regex
+ ;; Don't care about initial tab, but I don't know how to font-lock correctly without.
+ "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)"
+ "Regex used to highlight makepp rule action lines in font lock mode.")
+
+(defconst makefile-bsdmake-rule-action-regex
+ (progn (string-match "-@" makefile-rule-action-regex)
+ (replace-match "-+@" t t makefile-rule-action-regex))
+ "Regex used to highlight BSD rule action lines in font lock mode.")
+
;; Note that the first and second subexpression is used by font lock. Note
;; that if you change this regexp you might have to fix the imenu index in
;; makefile-imenu-generic-expression.
(defconst makefile-macroassign-regex
- "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\)"
+ "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)"
"Regex used to find macro assignment lines in a makefile.")
(defconst makefile-var-use-regex
@@ -420,7 +438,7 @@ not be enclosed in { } or ( )."
nil
"^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>"
- '("[^$]\\(\\$[({]\\(?:target\\|output\\)s?\\_>.*?[})]\\)"
+ '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)"
1 'makefile-targets-face prepend)
;; Colon modifier keywords.
@@ -849,10 +867,8 @@ Makefile mode can be configured by modifying the following variables:
;;;###autoload
(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile"
"An adapted `makefile-mode' that knows about makepp."
- (set (make-local-variable 'makefile-rule-action-regex)
- ;; Don't care about initial tab, but I don't know how to font-lock correctly without.
- "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)")
-
+ (set (make-local-variable 'makefile-rule-action-regex)
+ makefile-makepp-rule-action-regex)
(setq font-lock-defaults
`(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
imenu-generic-expression
@@ -863,11 +879,10 @@ Makefile mode can be configured by modifying the following variables:
(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
"An adapted `makefile-mode' that knows about BSD make."
(set (make-local-variable 'makefile-dependency-regex)
- ;; Identical to default, except allows `!' instead of `:'.
- "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)")
+ makefile-bsdmake-dependency-regex)
(set (make-local-variable 'makefile-dependency-skip) "^:!")
(set (make-local-variable 'makefile-rule-action-regex)
- "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)")
+ makefile-bsdmake-rule-action-regex)
(setq font-lock-defaults
`(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
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
(setq meta-complete-list
(list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list)
(list "" 'ispell-complete-word)))
- (run-hooks 'meta-common-mode-hook 'metafont-mode-hook))
+ (run-mode-hooks 'meta-common-mode-hook 'metafont-mode-hook))
;;;###autoload
(defun metapost-mode ()
@@ -1023,7 +1023,7 @@ Turning on MetaPost mode calls the value of the variable
(setq meta-complete-list
(list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list)
(list "" 'ispell-complete-word)))
- (run-hooks 'meta-common-mode-hook 'metapost-mode-hook))
+ (run-mode-hooks 'meta-common-mode-hook 'metapost-mode-hook))
;;; 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.
;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP.
;(font-lock-comment-start-regexp . "(\\*")
))
- (run-hooks 'm2-mode-hook))
+ (run-mode-hooks 'm2-mode-hook))
;; Regexps written with help from Ron Forrester <ron@orcad.com>
;; 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
inferior-octave-dynamic-complete-functions)
(comint-read-input-ring t)
- (run-hooks 'inferior-octave-mode-hook))
+ (run-mode-hooks 'inferior-octave-mode-hook))
;;;###autoload
(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."
(octave-add-octave-menu)
(octave-initialize-completions)
- (run-hooks 'octave-mode-hook))
+ (run-mode-hooks 'octave-mode-hook))
;;; Miscellaneous useful functions
(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."
(make-local-variable 'imenu-generic-expression)
(setq imenu-generic-expression pascal-imenu-generic-expression)
(setq imenu-case-fold-search t)
- (run-hooks 'pascal-mode-hook))
+ (run-mode-hooks 'pascal-mode-hook))
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."
(string-match "\\.m?spec\\'" buffer-file-name))
"rpm")))))
(sh-set-shell (or interpreter sh-shell-file) nil nil))
- (run-hooks 'sh-mode-hook))
+ (run-mode-hooks 'sh-mode-hook))
;;;###autoload
(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:
(setq local-abbrev-table sql-mode-abbrev-table)
(setq abbrev-all-caps 1)
;; Run hook
- (run-hooks 'sql-mode-hook)
+ (run-mode-hooks 'sql-mode-hook)
;; Catch changes to sql-product and highlight accordingly
(sql-highlight-product)
(add-hook 'hack-local-variables-hook 'sql-highlight-product t t))
@@ -2367,7 +2367,7 @@ you entered, right above the output it created.
(make-local-variable 'sql-input-ring-separator)
(make-local-variable 'sql-input-ring-file-name)
;; Run hook.
- (run-hooks 'sql-interactive-mode-hook)
+ (run-mode-hooks 'sql-interactive-mode-hook)
;; Set comint based on user overrides.
(setq comint-prompt-regexp sql-prompt-regexp)
(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 @@
"Non-nil if XEmacs is used.")
;; Emacs 21 handling
(defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs))
- "Non-nil if GNU Emacs 21 is used.")
+ "Non-nil if Emacs 21 is used.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -4568,8 +4568,7 @@ Key bindings:
(set (make-local-variable 'indent-line-function) 'vhdl-indent-line)
(set (make-local-variable 'comment-start) "--")
(set (make-local-variable 'comment-end) "")
- (when vhdl-emacs-21
- (set (make-local-variable 'comment-padding) ""))
+ (set (make-local-variable 'comment-padding) "")
(set (make-local-variable 'comment-column) vhdl-inline-comment-column)
(set (make-local-variable 'end-comment-column) vhdl-end-comment-column)
(set (make-local-variable 'comment-start-skip) "--+\\s-*")
@@ -4622,7 +4621,7 @@ Key bindings:
(if noninteractive "" " See menu for documentation and release notes."))
;; run hooks
- (run-hooks 'vhdl-mode-hook))
+ (run-mode-hooks 'vhdl-mode-hook))
(defun vhdl-activate-customizations ()
"Activate all customizations on local variables."
@@ -7484,7 +7483,13 @@ end of line, do nothing in comments and strings."
(while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t)
(if (match-string 1)
(goto-char (match-end 1))
- (replace-match "\\3 \\4 \\5")
+ (save-excursion
+ (goto-char (match-beginning 4))
+ (unless (eq (preceding-char) ?\ )
+ (insert " "))
+ (goto-char (match-end 4))
+ (unless (eq (following-char) ?\ )
+ (insert " ")))
(goto-char (match-end 4))))
;; eliminate multiple spaces and spaces at end of line
(goto-char beg)
@@ -7540,7 +7545,7 @@ buffer."
(interactive "r\np")
(save-excursion
(goto-char beg)
- (let ((margin (if interactive (current-indentation) (current-column))))
+ (let ((margin (if arg (current-indentation) (current-column))))
(goto-char end)
(setq end (point-marker))
;; remove inline comments, newlines and whitespace
@@ -12055,8 +12060,7 @@ File statistics: \"%s\"\n\
# statements : %5d\n\
# code lines : %5d\n\
# total lines : %5d\n\ "
- (buffer-file-name) no-stats no-code-lines no-lines)
- (unless vhdl-emacs-21 (vhdl-show-messages))))
+ (buffer-file-name) no-stats no-code-lines no-lines)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 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."
(puthash window current which-func-table)
(force-mode-line-update)))
(error
- (which-func-mode -1)
+ (setq which-func-mode nil)
(error "Error in which-func-update: %s" info))))))
;;;###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.
(setq xscheme-previous-process-state (cons nil nil)))))))
(scheme-interaction-mode-initialize)
(scheme-mode-variables)
- (run-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook))
+ (run-mode-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook))
(defun exit-scheme-interaction-mode ()
"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'."
:type 'file)
(defcustom recentf-exclude nil
-"*List of regexps and predicates for filenames excluded from the recent list.
+ "*List of regexps and predicates for filenames excluded from the recent list.
When a filename matches any of the regexps or satisfies any of the
predicates it is excluded from the recent list.
A 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.
(make-local-variable 'occur-revert-arguments)
(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
(setq next-error-function 'occur-next-error)
- (run-hooks 'occur-mode-hook))
+ (run-mode-hooks 'occur-mode-hook))
(defun occur-revert-function (ignore1 ignore2)
"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'."
(t
t))))
(condition-case nil
- (write-file file)
+ ;; Don't use write-file; we don't want this buffer to visit it.
+ (write-region (point-min) (point-max) file)
(file-error (message "Can't write %s" file)))
(kill-buffer (current-buffer))
(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:
(setq ses--deferred-narrow 'ses-mode)
(1value (add-hook 'post-command-hook 'ses-command-hook nil t))
(run-with-idle-timer 0.01 nil 'ses-command-hook)
- (run-hooks 'ses-mode-hook)))
+ (run-mode-hooks 'ses-mode-hook)))
(put 'ses-mode 'mode-class 'special)
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'."
(defvar read-expression-history nil)
(defcustom eval-expression-print-level 4
- "*Value to use for `print-level' when printing value in `eval-expression'.
+ "Value for `print-level' while printing value in `eval-expression'.
A value of nil means no limit."
:group 'lisp
:type '(choice (const :tag "No Limit" nil) integer)
:version "21.1")
(defcustom eval-expression-print-length 12
- "*Value to use for `print-length' when printing value in `eval-expression'.
+ "Value for `print-length' while printing value in `eval-expression'.
A value of nil means no limit."
:group 'lisp
:type '(choice (const :tag "No Limit" nil) integer)
:version "21.1")
(defcustom eval-expression-debug-on-error t
- "*Non-nil means set `debug-on-error' when evaluating in `eval-expression'.
+ "If non-nil set `debug-on-error' to t in `eval-expression'.
If nil, don't change the value of `debug-on-error'."
:group 'lisp
:type 'boolean
@@ -2247,7 +2247,7 @@ is nil, the buffer substring is returned unaltered.
If DELETE is non-nil, the text between BEG and END is deleted
from the buffer.
-Point is temporarily set to BEG before caling
+Point is temporarily set to BEG before calling
`buffer-substring-filters', in case the functions need to know
where the text came from.
@@ -3351,25 +3351,27 @@ Outline mode sets this."
(let ((forward (> arg 0))
(part (nth 2 (pos-visible-in-window-p (point) nil t))))
(if (and (consp part)
- (> (setq part (if forward (cdr part) (car part))) 0))
+ (> (if forward (cdr part) (car part)) 0))
(set-window-vscroll nil
(if forward
(+ (window-vscroll nil t)
- (min part
+ (min (cdr part)
(* (frame-char-height) arg)))
(max 0
(- (window-vscroll nil t)
- (min part
+ (min (car part)
(* (frame-char-height) (- arg))))))
t)
(set-window-vscroll nil 0)
(when (line-move-1 arg noerror to-end)
- (sit-for 0)
- (if (and (not forward)
- (setq part (nth 2 (pos-visible-in-window-p
- (line-beginning-position) nil t)))
- (> (cdr part) 0))
- (set-window-vscroll nil (cdr part) t))
+ (when (not forward)
+ ;; Update display before calling pos-visible-in-window-p,
+ ;; because it depends on window-start being up-to-date.
+ (sit-for 0)
+ (if (and (setq part (nth 2 (pos-visible-in-window-p
+ (line-beginning-position) nil t)))
+ (> (cdr part) 0))
+ (set-window-vscroll nil (cdr part) t)))
t)))
(line-move-1 arg noerror to-end)))
@@ -4762,7 +4764,7 @@ Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\
(setq major-mode 'completion-list-mode)
(make-local-variable 'completion-base-size)
(setq completion-base-size nil)
- (run-hooks 'completion-list-mode-hook))
+ (run-mode-hooks 'completion-list-mode-hook))
(defun completion-list-mode-finish ()
"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."
;; (aset map i nil)
;; (aset map (+ i 128) nil)
;; (setq i (1+ i))))
-;; (run-hooks 'mirror-mode-hook))
+;; (run-mode-hooks 'mirror-mode-hook))
(provide 'skeleton)
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.
(if speedbar-track-mouse-flag
(set (make-local-variable 'track-mouse) t)) ;this could be messy.
(setq auto-show-mode nil)) ;no auto-show for Emacs
- (run-hooks 'speedbar-mode-hook))
+ (run-mode-hooks 'speedbar-mode-hook))
(speedbar-update-contents)
speedbar-buffer)
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."
These hooks will be executed by the first following call to
`run-mode-hooks' that occurs outside any `delayed-mode-hooks' form.
Only affects hooks run in the current buffer."
- (declare (debug t))
+ (declare (debug t) (indent 0))
`(progn
(make-local-variable 'delay-mode-hooks)
(let ((delay-mode-hooks t))
@@ -1996,14 +1996,34 @@ STRING should be given if the last search was by `string-match' on STRING."
(buffer-substring-no-properties (match-beginning num)
(match-end num)))))
-(defun looking-back (regexp &optional limit)
+(defun looking-back (regexp &optional limit greedy)
"Return non-nil if text before point matches regular expression REGEXP.
Like `looking-at' except matches before point, and is slower.
LIMIT if non-nil speeds up the search by specifying how far back the
-match can start."
- (not (null
- (save-excursion
- (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)))))
+match can start.
+
+If GREEDY is non-nil, extend the match backwards as far as possible,
+stopping when a single additional previous character cannot be part
+of a match for REGEXP."
+ (let ((start (point))
+ (pos
+ (save-excursion
+ (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)
+ (point)))))
+ (if (and greedy pos)
+ (save-restriction
+ (narrow-to-region (point-min) start)
+ (while (and (> pos (point-min))
+ (save-excursion
+ (goto-char pos)
+ (backward-char 1)
+ (looking-at (concat "\\(?:" regexp "\\)\\'"))))
+ (setq pos (1- pos)))
+ (save-excursion
+ (goto-char pos)
+ (looking-at (concat "\\(?:" regexp "\\)\\'")))))
+ (not (null pos))))
+
(defconst split-string-default-separators "[ \f\t\n\r\v]+"
"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'."
(make-local-variable 'term-current-face)
(make-local-variable 'term-pending-frame)
(setq term-pending-frame nil)
- (run-hooks 'term-mode-hook)
+ (run-mode-hooks 'term-mode-hook)
(term-if-xemacs
(set-buffer-menubar
(append current-menubar (list term-terminal-menu))))
@@ -4177,7 +4177,7 @@ the process. Any more args are arguments to PROGRAM."
;;; (make-local-variable 'shell-directory-stack)
;;; (setq shell-directory-stack nil)
;;; (add-hook 'term-input-filter-functions 'shell-directory-tracker)
-;;; (run-hooks 'shell-mode-hook))
+;;; (run-mode-hooks 'shell-mode-hook))
;;;
;;;
;;; 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 @@
;;; terminal.el --- terminal emulator for GNU Emacs
-;; Copyright (C) 1986,87,88,89,93,94 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1987, 1988, 1989, 1993, 1994 Free Software Foundation, Inc.
;; Author: Richard Mlynarik <mly@eddie.mit.edu>
;; Maintainer: FSF
@@ -537,7 +537,7 @@ together with a command \\<terminal-edit-map>to return to terminal emulation: \\
(setq mode-name "Terminal Edit")
(setq mode-line-modified (default-value 'mode-line-modified))
(setq mode-line-process nil)
- (run-hooks 'terminal-edit-mode-hook))
+ (run-mode-hooks 'terminal-edit-mode-hook))
(defun te-edit ()
"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 @@
;;; Code:
(defgroup dns-mode nil
- "DNS master file mode configuration.")
+ "DNS master file mode configuration."
+ :group 'data)
(defconst dns-mode-classes '("IN" "CS" "CH" "HS")
"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 @@
;;; flyspell.el --- on-the-fly spell checker
-;; Copyright (C) 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
;; Maintainer: FSF
@@ -56,6 +56,21 @@
:group 'processes)
;*---------------------------------------------------------------------*/
+;* Which emacs are we currently running */
+;*---------------------------------------------------------------------*/
+(defvar flyspell-emacs
+ (cond
+ ((string-match "XEmacs" emacs-version)
+ 'xemacs)
+ (t
+ 'emacs))
+ "The type of Emacs we are currently running.")
+
+(defvar flyspell-use-local-map
+ (or (eq flyspell-emacs 'xemacs)
+ (not (string< emacs-version "20"))))
+
+;*---------------------------------------------------------------------*/
;* User configuration ... */
;*---------------------------------------------------------------------*/
(defcustom flyspell-highlight-flag t
@@ -109,7 +124,8 @@ is highlighted."
delete-backward-char
backward-or-forward-delete-char
delete-char
- scrollbar-vertical-drag)
+ scrollbar-vertical-drag
+ backward-delete-char-untabify)
"The standard list of delayed commands for Flyspell.
See `flyspell-delayed-commands'."
:group 'flyspell
@@ -199,15 +215,15 @@ http://strw.leidenuniv.nl/~dominik/Tools"
:type '(repeat (string)))
(defcustom flyspell-abbrev-p
- t
- "*If true, add correction to abbreviation table."
+ nil
+ "*If non-nil, add correction to abbreviation table."
:group 'flyspell
:version "21.1"
:type 'boolean)
(defcustom flyspell-use-global-abbrev-table-p
nil
- "*If true, prefer global abbrev table to local abbrev table."
+ "*If non-nil, prefer global abbrev table to local abbrev table."
:group 'flyspell
:version "21.1"
:type 'boolean)
@@ -224,10 +240,12 @@ Set this to nil if you don't want a modeline indicator."
If the region is smaller than this number of characters,
`flyspell-region' checks the words sequentially using regular
flyspell methods. Else, if the region is large, a new Ispell process is
-spawned for speed."
+spawned for speed.
+
+If `flyspell-large-region' is nil, all regions are treated as small."
:group 'flyspell
:version "21.1"
- :type 'number)
+ :type '(choice number boolean))
(defcustom flyspell-insert-function (function insert)
"*Function for inserting word by flyspell upon correction."
@@ -244,6 +262,20 @@ spawned for speed."
:group 'flyspell
:type '(choice string (const nil)))
+(defcustom flyspell-use-meta-tab t
+ "*Non-nil means that flyspell uses META-TAB to correct word."
+ :group 'flyspell
+ :type 'boolean)
+
+(defcustom flyspell-auto-correct-binding
+ (cond
+ ((eq flyspell-emacs 'xemacs)
+ [(control \;)])
+ (t
+ [?\C-\;]))
+ "The key binding for flyspell auto correction."
+ :group 'flyspell)
+
;*---------------------------------------------------------------------*/
;* Mode specific options */
;* ------------------------------------------------------------- */
@@ -267,17 +299,24 @@ property of the major mode name.")
(put 'message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
(defun mail-mode-flyspell-verify ()
"This function is used for `flyspell-generic-check-word-p' in Mail mode."
- (let ((in-headers (save-excursion
- ;; When mail-header-separator is "",
- ;; it is likely to be found in both directions.
- (not (re-search-backward (concat "^" (regexp-quote mail-header-separator) "$") nil t))))
- (in-signature (save-excursion
- (re-search-backward message-signature-separator nil t))))
- (cond (in-headers
+ (let ((header-end (save-excursion
+ (goto-char (point-min))
+ (re-search-forward
+ (concat "^"
+ (regexp-quote mail-header-separator)
+ "$")
+ nil t)
+ (point)))
+ (signature-begin (save-excursion
+ (goto-char (point-max))
+ (re-search-backward message-signature-separator
+ nil t)
+ (point))))
+ (cond ((< (point) header-end)
(and (save-excursion (beginning-of-line)
(looking-at "^Subject:"))
(> (point) (match-end 0))))
- (in-signature
+ ((> (point) signature-begin)
nil)
(t
(save-excursion
@@ -351,7 +390,8 @@ property of the major mode name.")
"Turn on `flyspell-mode' for comments and strings."
(interactive)
(setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify)
- (flyspell-mode 1))
+ (flyspell-mode 1)
+ (run-hooks 'flyspell-prog-mode-hook))
;*---------------------------------------------------------------------*/
;* Overlay compatibility */
@@ -366,21 +406,6 @@ property of the major mode name.")
(autoload 'previous-overlay-change "overlay" "Overlay compatibility kit." t)
;*---------------------------------------------------------------------*/
-;* Which emacs are we currently running */
-;*---------------------------------------------------------------------*/
-(defvar flyspell-emacs
- (cond
- ((string-match "XEmacs" emacs-version)
- 'xemacs)
- (t
- 'emacs))
- "The type of Emacs we are currently running.")
-
-(defvar flyspell-use-local-map
- (or (eq flyspell-emacs 'xemacs)
- (not (string< emacs-version "20"))))
-
-;*---------------------------------------------------------------------*/
;* The minor mode declaration. */
;*---------------------------------------------------------------------*/
(eval-when-compile (defvar flyspell-local-mouse-map))
@@ -391,9 +416,13 @@ property of the major mode name.")
(defvar flyspell-mouse-map
(let ((map (make-sparse-keymap)))
+ (if flyspell-use-meta-tab
+ (define-key map "\M-\t" #'flyspell-auto-correct-word))
(define-key map (if (featurep 'xemacs) [button2] [down-mouse-2])
#'flyspell-correct-word)
- (define-key map "\M-\t" #'flyspell-auto-correct-word)
+ (define-key map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
+ (define-key map [(control \,)] 'flyspell-goto-next-error)
+ (define-key map [(control \.)] 'flyspell-auto-correct-word)
map))
;;;###autoload
@@ -404,7 +433,18 @@ property of the major mode name.")
(setq minor-mode-map-alist
(cons (cons 'flyspell-mode flyspell-mode-map)
minor-mode-map-alist)))
- (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word))
+ (if flyspell-use-meta-tab
+ (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word))
+ (cond
+ ((eq flyspell-emacs 'xemacs)
+ (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
+ (define-key flyspell-mode-map [(control \,)] 'flyspell-goto-next-error)
+ (define-key flyspell-mode-map [(control \.)] 'flyspell-auto-correct-word))
+ (flyspell-use-local-map
+ (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word)
+ (define-key flyspell-mode-map [?\C-\,] 'flyspell-goto-next-error)
+ (define-key flyspell-mode-map [?\C-\.] 'flyspell-auto-correct-word))))
+
;; the name of the overlay property that defines the keymap
(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.
Bindings:
\\[ispell-word]: correct words (using Ispell).
\\[flyspell-auto-correct-word]: automatically correct word.
-\\[flyspell-correct-word] (or mouse-2): popup correct words.
+\\[flyspell-auto-correct-previous-word]: automatically correct the last misspelled word.
+\\[flyspell-correct-word] (or down-mouse-2): popup correct words.
Hooks:
This runs `flyspell-mode-hook' after flyspell is entered.
@@ -512,22 +553,19 @@ in your .emacs file.
(and (consp ws) (window-minibuffer-p (car ws)))))
;*---------------------------------------------------------------------*/
-;* flyspell-version ... */
-;*---------------------------------------------------------------------*/
-;;;###autoload
-(defun flyspell-version ()
- "The flyspell version"
- (interactive)
- "1.6h")
-
-;*---------------------------------------------------------------------*/
;* flyspell-accept-buffer-local-defs ... */
;*---------------------------------------------------------------------*/
(defun flyspell-accept-buffer-local-defs ()
- (ispell-accept-buffer-local-defs)
+ ;; strange problem. If buffer in current window has font-lock turned on,
+ ;; but SET-BUFFER was called to point to an invisible buffer, this ispell
+ ;; call will reset the buffer to the buffer in the current window. However,
+ ;; it only happens at startup (fix by Albert L. Ting).
+ (let ((buf (current-buffer)))
+ (ispell-accept-buffer-local-defs)
+ (set-buffer buf))
(if (not (and (eq flyspell-dash-dictionary ispell-dictionary)
(eq flyspell-dash-local-dictionary ispell-local-dictionary)))
- ;; the dictionary has changed
+ ;; The dictionary has changed
(progn
(setq flyspell-dash-dictionary ispell-dictionary)
(setq flyspell-dash-local-dictionary ispell-local-dictionary)
@@ -566,6 +604,22 @@ in your .emacs file.
(let ((mode-predicate (get major-mode 'flyspell-mode-predicate)))
(if mode-predicate
(setq flyspell-generic-check-word-p mode-predicate)))
+ ;; work around the fact that the `local-map' text-property replaces the
+ ;; buffer's local map rather than shadowing it.
+ (set (make-local-variable 'flyspell-mouse-map)
+ (let ((map (copy-keymap flyspell-mouse-map)))
+ (set-keymap-parent map (current-local-map))
+ (if (and (eq flyspell-emacs 'emacs)
+ (not (string< emacs-version "20")))
+ (define-key map '[tool-bar] nil))
+ map))
+ (set (make-local-variable 'flyspell-mode-map)
+ (let ((map (copy-keymap flyspell-mode-map)))
+ (set-keymap-parent map (current-local-map))
+ (if (and (eq flyspell-emacs 'emacs)
+ (not (string< emacs-version "20")))
+ (define-key map '[tool-bar] nil))
+ map))
;; the welcome message
(if (and flyspell-issue-message-flag
flyspell-issue-welcome-flag
@@ -624,9 +678,11 @@ not the very same deplacement command."
(defvar flyspell-word-cache-start nil)
(defvar flyspell-word-cache-end nil)
(defvar flyspell-word-cache-word nil)
+(defvar flyspell-word-cache-result '_)
(make-variable-buffer-local 'flyspell-word-cache-start)
(make-variable-buffer-local 'flyspell-word-cache-end)
(make-variable-buffer-local 'flyspell-word-cache-word)
+(make-variable-buffer-local 'flyspell-word-cache-result)
;*---------------------------------------------------------------------*/
;* The flyspell pre-hook, store the current position. In the */
@@ -678,7 +734,7 @@ not the very same deplacement command."
;* flyspell-check-pre-word-p ... */
;*---------------------------------------------------------------------*/
(defun flyspell-check-pre-word-p ()
- "Return non-nil if we should to check the word before point.
+ "Return non-nil if we should check the word before point.
More precisely, it applies to the word that was before point
before the current command."
(cond
@@ -735,7 +791,7 @@ before the current command."
The answer depends of several criteria.
Mostly we check word delimiters."
(cond
- ((and (eq (char-after start) ?\n) (> stop start))
+ ((and (memq (char-after start) '(?\n ? )) (> stop start))
t)
((not (numberp flyspell-pre-point))
t)
@@ -774,9 +830,7 @@ Mostly we check word delimiters."
((get this-command 'flyspell-delayed)
;; the current command is not delayed, that
;; is that we must check the word now
- (if (fboundp 'about-xemacs)
- (sit-for flyspell-delay nil)
- (sit-for flyspell-delay 0 nil)))
+ (sit-for flyspell-delay))
(t t)))
(t t)))
@@ -924,7 +978,9 @@ Mostly we check word delimiters."
;; when a word is not checked because of a delayed command
;; we do not disable the ispell cache.
(if (and (symbolp this-command) (get this-command 'flyspell-delayed))
- (setq flyspell-word-cache-end -1))))
+ (progn
+ (setq flyspell-word-cache-end -1)
+ (setq flyspell-word-cache-result '_)))))
(while (consp flyspell-changes)
(let ((start (car (car flyspell-changes)))
(stop (cdr (car flyspell-changes))))
@@ -949,6 +1005,34 @@ Mostly we check word delimiters."
(message (format "mispelling `%s' %S" word replacements)))))
;*---------------------------------------------------------------------*/
+;* flyspell-word-search-backward ... */
+;*---------------------------------------------------------------------*/
+(defun flyspell-word-search-backward (word bound)
+ (save-excursion
+ (let ((r '())
+ p)
+ (while (and (not r) (setq p (search-backward word bound t)))
+ (let ((lw (flyspell-get-word '())))
+ (if (and (consp lw) (string-equal (car lw) word))
+ (setq r p)
+ (goto-char p))))
+ r)))
+
+;*---------------------------------------------------------------------*/
+;* flyspell-word-search-forward ... */
+;*---------------------------------------------------------------------*/
+(defun flyspell-word-search-forward (word bound)
+ (save-excursion
+ (let ((r '())
+ p)
+ (while (and (not r) (setq p (search-forward word bound t)))
+ (let ((lw (flyspell-get-word '())))
+ (if (and (consp lw) (string-equal (car lw) word))
+ (setq r p)
+ (goto-char (1+ p)))))
+ r)))
+
+;*---------------------------------------------------------------------*/
;* flyspell-word ... */
;*---------------------------------------------------------------------*/
(defun flyspell-word (&optional following)
@@ -963,7 +1047,7 @@ Mostly we check word delimiters."
(if (or (eq flyspell-word nil)
(and (fboundp flyspell-generic-check-word-p)
(not (funcall flyspell-generic-check-word-p))))
- '()
+ t
(progn
;; destructure return flyspell-word info list.
(setq start (car (cdr flyspell-word))
@@ -972,21 +1056,24 @@ Mostly we check word delimiters."
;; before checking in the directory, we check for doublons.
(cond
((and (or (not (eq ispell-parser 'tex))
- (not (eq (char-after start) ?\\)))
+ (and (> start (point-min))
+ (not (eq (char-after (1- start)) ?}))
+ (not (eq (char-after (1- start)) ?\\))))
flyspell-mark-duplications-flag
(save-excursion
- (goto-char start)
- (word-search-backward word
- (- start
- (+ 1 (- end start)))
- t)))
+ (goto-char (1- start))
+ (let ((p (flyspell-word-search-backward
+ word
+ (- start (1+ (- end start))))))
+ (and p (/= p (1- start))))))
;; yes, this is a doublon
- (flyspell-highlight-incorrect-region start end 'doublon))
+ (flyspell-highlight-incorrect-region start end 'doublon)
+ nil)
((and (eq flyspell-word-cache-start start)
(eq flyspell-word-cache-end end)
(string-equal flyspell-word-cache-word word))
;; this word had been already checked, we skip
- nil)
+ flyspell-word-cache-result)
((and (eq ispell-parser 'tex)
(flyspell-tex-command-p flyspell-word))
;; this is a correct word (because a tex command)
@@ -1016,59 +1103,68 @@ Mostly we check word delimiters."
(setq ispell-filter (cdr ispell-filter))
(if (consp ispell-filter)
(setq poss (ispell-parse-output (car ispell-filter))))
- (cond ((eq poss t)
- ;; correct
- (flyspell-unhighlight-at start)
- (if (> end start)
- (flyspell-unhighlight-at (- end 1)))
- t)
- ((and (stringp poss) flyspell-highlight-flag)
- ;; correct
- (flyspell-unhighlight-at start)
- (if (> end start)
- (flyspell-unhighlight-at (- end 1)))
- t)
- ((null poss)
- (flyspell-unhighlight-at start)
- (if (> end start)
- (flyspell-unhighlight-at (- end 1))))
- ((or (and (< flyspell-duplicate-distance 0)
- (or (save-excursion
- (goto-char start)
- (word-search-backward word
- (point-min)
- t))
- (save-excursion
- (goto-char end)
- (word-search-forward word
- (point-max)
- t))))
- (and (> flyspell-duplicate-distance 0)
- (or (save-excursion
- (goto-char start)
- (word-search-backward
- word
- (- start
- flyspell-duplicate-distance)
- t))
- (save-excursion
- (goto-char end)
- (word-search-forward
- word
- (+ end
- flyspell-duplicate-distance)
- t)))))
- (if flyspell-highlight-flag
- (flyspell-highlight-duplicate-region start end poss)
- (message (format "duplicate `%s'" word))))
- (t
- ;; incorrect highlight the location
- (if flyspell-highlight-flag
- (flyspell-highlight-incorrect-region start end poss)
- (flyspell-notify-misspell start end word poss))))
- ;; return to original location
- (goto-char cursor-location)
- (if ispell-quit (setq ispell-quit nil)))))))))
+ (let ((res (cond ((eq poss t)
+ ;; correct
+ (setq flyspell-word-cache-result t)
+ (flyspell-unhighlight-at start)
+ (if (> end start)
+ (flyspell-unhighlight-at (- end 1)))
+ t)
+ ((and (stringp poss) flyspell-highlight-flag)
+ ;; correct
+ (setq flyspell-word-cache-result t)
+ (flyspell-unhighlight-at start)
+ (if (> end start)
+ (flyspell-unhighlight-at (- end 1)))
+ t)
+ ((null poss)
+ (setq flyspell-word-cache-result t)
+ (flyspell-unhighlight-at start)
+ (if (> end start)
+ (flyspell-unhighlight-at (- end 1)))
+ t)
+ ((or (and (< flyspell-duplicate-distance 0)
+ (or (save-excursion
+ (goto-char start)
+ (flyspell-word-search-backward
+ word
+ (point-min)))
+ (save-excursion
+ (goto-char end)
+ (flyspell-word-search-forward
+ word
+ (point-max)))))
+ (and (> flyspell-duplicate-distance 0)
+ (or (save-excursion
+ (goto-char start)
+ (flyspell-word-search-backward
+ word
+ (- start
+ flyspell-duplicate-distance)))
+ (save-excursion
+ (goto-char end)
+ (flyspell-word-search-forward
+ word
+ (+ end
+ flyspell-duplicate-distance))))))
+ (setq flyspell-word-cache-result nil)
+ (if flyspell-highlight-flag
+ (flyspell-highlight-duplicate-region
+ start end poss)
+ (message (format "duplicate `%s'" word)))
+ nil)
+ (t
+ (setq flyspell-word-cache-result nil)
+ ;; incorrect highlight the location
+ (if flyspell-highlight-flag
+ (flyspell-highlight-incorrect-region
+ start end poss)
+ (flyspell-notify-misspell start end word poss))
+ nil))))
+ ;; return to original location
+ (goto-char cursor-location)
+ (if ispell-quit (setq ispell-quit nil))
+ res))))))))
;*---------------------------------------------------------------------*/
;* flyspell-tex-math-initialized ... */
@@ -1175,30 +1271,31 @@ this function changes the last char of the `ispell-casechars' string."
;*---------------------------------------------------------------------*/
;* flyspell-get-word ... */
;*---------------------------------------------------------------------*/
-(defun flyspell-get-word (following)
+(defun flyspell-get-word (following &optional extra-otherchars)
"Return the word for spell-checking according to Ispell syntax.
-If argument FOLLOWING is non-nil or if `ispell-following-word'
+If optional argument FOLLOWING is non-nil or if `flyspell-following-word'
is non-nil when called interactively, then the following word
\(rather than preceding\) is checked when the cursor is not over a word.
-Optional second argument contains other chars that can be included in word
+Optional second argument contains otherchars that can be included in word
many times.
-Word syntax described by `ispell-dictionary-alist' (which see)."
+Word syntax described by `flyspell-dictionary-alist' (which see)."
(let* ((flyspell-casechars (flyspell-get-casechars))
(flyspell-not-casechars (flyspell-get-not-casechars))
(ispell-otherchars (ispell-get-otherchars))
(ispell-many-otherchars-p (ispell-get-many-otherchars-p))
- (word-regexp (if (string< "" ispell-otherchars)
- (concat flyspell-casechars
- "+\\("
- ispell-otherchars
- "?"
- flyspell-casechars
- "+\\)"
- (if ispell-many-otherchars-p
- "*" "?"))
- (concat flyspell-casechars "+")))
- did-it-once
+ (word-regexp (concat flyspell-casechars
+ "+\\("
+ (if (not (string= "" ispell-otherchars))
+ (concat ispell-otherchars "?"))
+ (if extra-otherchars
+ (concat extra-otherchars "?"))
+ flyspell-casechars
+ "+\\)"
+ (if (or ispell-many-otherchars-p
+ extra-otherchars)
+ "*" "?")))
+ did-it-once prevpt
start end word)
;; find the word
(if (not (looking-at flyspell-casechars))
@@ -1207,21 +1304,26 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
(re-search-backward flyspell-casechars (point-min) t)))
;; move to front of word
(re-search-backward flyspell-not-casechars (point-min) 'start)
- (let ((pos nil))
- (if (string< "" ispell-otherchars)
- (while (and (looking-at ispell-otherchars)
- (not (bobp))
- (or (not did-it-once)
- ispell-many-otherchars-p)
- (not (eq pos (point))))
- (setq pos (point))
- (setq did-it-once t)
+ (while (and (or (and (not (string= "" ispell-otherchars))
+ (looking-at ispell-otherchars))
+ (and extra-otherchars (looking-at extra-otherchars)))
+ (not (bobp))
+ (or (not did-it-once)
+ ispell-many-otherchars-p)
+ (not (eq prevpt (point))))
+ (if (and extra-otherchars (looking-at extra-otherchars))
+ (progn
(backward-char 1)
(if (looking-at flyspell-casechars)
- (re-search-backward flyspell-not-casechars (point-min) 'move)
- (backward-char -1)))))
+ (re-search-backward flyspell-not-casechars (point-min) 'move)))
+ (setq did-it-once t
+ prevpt (point))
+ (backward-char 1)
+ (if (looking-at flyspell-casechars)
+ (re-search-backward flyspell-not-casechars (point-min) 'move)
+ (backward-char -1))))
;; Now mark the word and save to string.
- (if (eq (re-search-forward word-regexp (point-max) t) nil)
+ (if (not (re-search-forward word-regexp (point-max) t))
nil
(progn
(setq start (match-beginning 0)
@@ -1280,25 +1382,37 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
(set-buffer buffer)
(goto-char (point-min))
(let ((size (- flyspell-large-region-end flyspell-large-region-beg))
- (start flyspell-large-region-beg))
+ (start flyspell-large-region-beg)
+ (pword "")
+ (pcount 1))
;; now we are done with ispell, we have to find the word in
;; the initial buffer
(while (< (point) (- (point-max) 1))
;; we have to fetch the incorrect word
(if (re-search-forward "\\([^\n]+\\)\n" (point-max) t)
(let ((word (match-string 1)))
+ (if (string= word pword)
+ (setq pcount (1+ pcount))
+ (progn
+ (setq pword word)
+ (setq pcount 1)))
(goto-char (match-end 0))
- (set-buffer flyspell-large-region-buffer)
- (goto-char flyspell-large-region-beg)
(if flyspell-issue-message-flag
(message "Spell Checking...%d%% [%s]"
- (* 100 (/ (float (- (point) start)) size))
+ (* 100 (/ (float (point)) (point-max)))
word))
- (if (search-forward word flyspell-large-region-end t)
+ (set-buffer flyspell-large-region-buffer)
+ (goto-char flyspell-large-region-beg)
+ (let ((keep t)
+ (n 0))
+ (while (and (or (< n pcount) keep)
+ (search-forward word flyspell-large-region-end t))
(progn
- (setq flyspell-large-region-beg (point))
(goto-char (- (point) 1))
- (flyspell-word)))
+ (setq n (1+ n))
+ (setq keep (flyspell-word))))
+ (if (= n pcount)
+ (setq flyspell-large-region-beg (point))))
(set-buffer buffer))
(goto-char (point-max)))))
;; we are done
@@ -1370,7 +1484,7 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
(let ((old beg))
(setq beg end)
(setq end old)))
- (if (> (- end beg) flyspell-large-region)
+ (if (and flyspell-large-region (> (- end beg) flyspell-large-region))
(flyspell-large-region beg end)
(flyspell-small-region beg end)))))
@@ -1517,15 +1631,23 @@ for the overlay."
(if (or flyspell-highlight-properties
(not (flyspell-properties-at-p beg)))
(progn
+ ;; we cleanup all the overlay that are in the region, not
+ ;; beginning at the word start position
+ (if (< (1+ beg) end)
+ (let ((os (overlays-in (1+ beg) end)))
+ (while (consp os)
+ (if (flyspell-overlay-p (car os))
+ (delete-overlay (car os)))
+ (setq os (cdr os)))))
;; we cleanup current overlay at the same position
(if (and (not flyspell-persistent-highlight)
(overlayp flyspell-overlay))
(delete-overlay flyspell-overlay)
- (let ((overlays (overlays-at beg)))
- (while (consp overlays)
- (if (flyspell-overlay-p (car overlays))
- (delete-overlay (car overlays)))
- (setq overlays (cdr overlays)))))
+ (let ((os (overlays-at beg)))
+ (while (consp os)
+ (if (flyspell-overlay-p (car os))
+ (delete-overlay (car os)))
+ (setq os (cdr os)))))
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay
@@ -1677,69 +1799,71 @@ This command proposes various successive corrections for the current word."
(flyspell-ajust-cursor-point pos (point) old-max)
(setq flyspell-auto-correct-pos (point)))
;; fetch the word to be checked
- (let ((word (flyspell-get-word nil))
- start end poss)
- ;; destructure return word info list.
- (setq start (car (cdr word))
- end (car (cdr (cdr word)))
- word (car word))
- (setq flyspell-auto-correct-word word)
- ;; now check spelling of word.
- (process-send-string ispell-process "%\n") ;put in verbose mode
- (process-send-string ispell-process (concat "^" word "\n"))
- ;; wait until ispell has processed word
- (while (progn
- (accept-process-output ispell-process)
- (not (string= "" (car ispell-filter)))))
- (setq ispell-filter (cdr ispell-filter))
- (if (consp ispell-filter)
- (setq poss (ispell-parse-output (car ispell-filter))))
- (cond ((or (eq poss t) (stringp poss))
- ;; don't correct word
- t)
- ((null poss)
- ;; ispell error
- (error "Ispell: error in Ispell process"))
- (t
- ;; the word is incorrect, we have to propose a replacement
- (let ((replacements (if flyspell-sort-corrections
- (sort (car (cdr (cdr poss))) 'string<)
- (car (cdr (cdr poss))))))
- (setq flyspell-auto-correct-region nil)
- (if (consp replacements)
- (progn
- (let ((replace (car replacements)))
- (let ((new-word replace))
- (if (not (equal new-word (car poss)))
- (progn
- ;; the save the current replacements
- (setq flyspell-auto-correct-region
- (cons start (length new-word)))
- (let ((l replacements))
- (while (consp (cdr l))
- (setq l (cdr l)))
- (rplacd l (cons (car poss) replacements)))
- (setq flyspell-auto-correct-ring
- replacements)
- (flyspell-unhighlight-at start)
- (delete-region start end)
- (funcall flyspell-insert-function new-word)
- (if flyspell-abbrev-p
- (if (flyspell-already-abbrevp
- (flyspell-abbrev-table) word)
- (flyspell-change-abbrev
- (flyspell-abbrev-table)
- word
- new-word)
- (flyspell-define-abbrev word new-word)))
- (flyspell-word)
- (flyspell-display-next-corrections
- (cons new-word flyspell-auto-correct-ring))
- (flyspell-ajust-cursor-point pos
- (point)
- old-max))))))))))
- (setq flyspell-auto-correct-pos (point))
- (ispell-pdict-save t)))))
+ (let ((word (flyspell-get-word nil)))
+ (if (consp word)
+ (let ((start (car (cdr word)))
+ (end (car (cdr (cdr word))))
+ (word (car word))
+ poss)
+ (setq flyspell-auto-correct-word word)
+ ;; now check spelling of word.
+ (process-send-string ispell-process "%\n") ;put in verbose mode
+ (process-send-string ispell-process (concat "^" word "\n"))
+ ;; wait until ispell has processed word
+ (while (progn
+ (accept-process-output ispell-process)
+ (not (string= "" (car ispell-filter)))))
+ (setq ispell-filter (cdr ispell-filter))
+ (if (consp ispell-filter)
+ (setq poss (ispell-parse-output (car ispell-filter))))
+ (cond
+ ((or (eq poss t) (stringp poss))
+ ;; don't correct word
+ t)
+ ((null poss)
+ ;; ispell error
+ (error "Ispell: error in Ispell process"))
+ (t
+ ;; the word is incorrect, we have to propose a replacement
+ (let ((replacements (if flyspell-sort-corrections
+ (sort (car (cdr (cdr poss))) 'string<)
+ (car (cdr (cdr poss))))))
+ (setq flyspell-auto-correct-region nil)
+ (if (consp replacements)
+ (progn
+ (let ((replace (car replacements)))
+ (let ((new-word replace))
+ (if (not (equal new-word (car poss)))
+ (progn
+ ;; the save the current replacements
+ (setq flyspell-auto-correct-region
+ (cons start (length new-word)))
+ (let ((l replacements))
+ (while (consp (cdr l))
+ (setq l (cdr l)))
+ (rplacd l (cons (car poss) replacements)))
+ (setq flyspell-auto-correct-ring
+ replacements)
+ (flyspell-unhighlight-at start)
+ (delete-region start end)
+ (funcall flyspell-insert-function new-word)
+ (if flyspell-abbrev-p
+ (if (flyspell-already-abbrevp
+ (flyspell-abbrev-table) word)
+ (flyspell-change-abbrev
+ (flyspell-abbrev-table)
+ word
+ new-word)
+ (flyspell-define-abbrev word
+ new-word)))
+ (flyspell-word)
+ (flyspell-display-next-corrections
+ (cons new-word flyspell-auto-correct-ring))
+ (flyspell-ajust-cursor-point pos
+ (point)
+ old-max))))))))))
+ (setq flyspell-auto-correct-pos (point))
+ (ispell-pdict-save t)))))))
;*---------------------------------------------------------------------*/
;* flyspell-auto-correct-previous-pos ... */
@@ -1752,8 +1876,8 @@ This command proposes various successive corrections for the current word."
;*---------------------------------------------------------------------*/
(defun flyspell-auto-correct-previous-hook ()
"Hook to track successive calls to `flyspell-auto-correct-previous-word'.
-Sets flyspell-auto-correct-previous-pos to nil"
- (interactive)
+Sets `flyspell-auto-correct-previous-pos' to nil"
+ (interactive)
(remove-hook 'pre-command-hook (function flyspell-auto-correct-previous-hook) t)
(unless (eq this-command (function flyspell-auto-correct-previous-word))
(setq flyspell-auto-correct-previous-pos nil)))
@@ -1761,45 +1885,56 @@ Sets flyspell-auto-correct-previous-pos to nil"
;*---------------------------------------------------------------------*/
;* flyspell-auto-correct-previous-word ... */
;*---------------------------------------------------------------------*/
-(defun flyspell-auto-correct-previous-word (position)
- "*Auto correct the first mispelled word that occurs before point."
+(defun flyspell-auto-correct-previous-word (position)
+ "*Auto correct the first mispelled word that occurs before point.
+But don't look beyond what's visible on the screen."
(interactive "d")
- (add-hook 'pre-command-hook
- (function flyspell-auto-correct-previous-hook) t t)
-
- (save-excursion
- (unless flyspell-auto-correct-previous-pos
- ;; only reset if a new overlay exists
- (setq flyspell-auto-correct-previous-pos nil)
-
- (let ((overlay-list (overlays-in (point-min) position))
- (new-overlay 'dummy-value))
-
- ;; search for previous (new) flyspell overlay
- (while (and new-overlay
- (or (not (flyspell-overlay-p new-overlay))
- ;; check if its face has changed
- (not (eq (get-char-property
- (overlay-start new-overlay) 'face)
- 'flyspell-incorrect-face))))
- (setq new-overlay (car-safe overlay-list))
- (setq overlay-list (cdr-safe overlay-list)))
-
- ;; if nothing new exits new-overlay should be nil
- (if new-overlay;; the length of the word may change so go to the start
- (setq flyspell-auto-correct-previous-pos
- (overlay-start new-overlay)))))
-
- (when flyspell-auto-correct-previous-pos
- (save-excursion
- (goto-char flyspell-auto-correct-previous-pos)
- (let ((ispell-following-word t));; point is at start
- (if (numberp flyspell-auto-correct-previous-pos)
- (goto-char flyspell-auto-correct-previous-pos))
- (flyspell-auto-correct-word))
- ;; the point may have moved so reset this
- (setq flyspell-auto-correct-previous-pos (point))))))
+ (let (top bot)
+ (save-excursion
+ (move-to-window-line 0)
+ (setq top (point))
+ (move-to-window-line -1)
+ (setq bot (point)))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region top bot)
+ (overlay-recenter (point))
+
+ (add-hook 'pre-command-hook
+ (function flyspell-auto-correct-previous-hook) t t)
+
+ (unless flyspell-auto-correct-previous-pos
+ ;; only reset if a new overlay exists
+ (setq flyspell-auto-correct-previous-pos nil)
+
+ (let ((overlay-list (overlays-in (point-min) position))
+ (new-overlay 'dummy-value))
+
+ ;; search for previous (new) flyspell overlay
+ (while (and new-overlay
+ (or (not (flyspell-overlay-p new-overlay))
+ ;; check if its face has changed
+ (not (eq (get-char-property
+ (overlay-start new-overlay) 'face)
+ 'flyspell-incorrect-face))))
+ (setq new-overlay (car-safe overlay-list))
+ (setq overlay-list (cdr-safe overlay-list)))
+
+ ;; if nothing new exits new-overlay should be nil
+ (if new-overlay ;; the length of the word may change so go to the start
+ (setq flyspell-auto-correct-previous-pos
+ (overlay-start new-overlay)))))
+
+ (when flyspell-auto-correct-previous-pos
+ (save-excursion
+ (goto-char flyspell-auto-correct-previous-pos)
+ (let ((ispell-following-word t)) ;; point is at start
+ (if (numberp flyspell-auto-correct-previous-pos)
+ (goto-char flyspell-auto-correct-previous-pos))
+ (flyspell-auto-correct-word))
+ ;; the point may have moved so reset this
+ (setq flyspell-auto-correct-previous-pos (point))))))))
;*---------------------------------------------------------------------*/
;* flyspell-correct-word ... */
@@ -1814,72 +1949,76 @@ The word checked is the word at the mouse position."
(let ((save (point)))
(mouse-set-point event)
(let ((cursor-location (point))
- (word (flyspell-get-word nil))
- start end poss replace)
- ;; destructure return word info list.
- (setq start (car (cdr word))
- end (car (cdr (cdr word)))
- word (car word))
- ;; now check spelling of word.
- (process-send-string ispell-process "%\n") ;put in verbose mode
- (process-send-string ispell-process (concat "^" word "\n"))
- ;; wait until ispell has processed word
- (while (progn
- (accept-process-output ispell-process)
- (not (string= "" (car ispell-filter)))))
- (setq ispell-filter (cdr ispell-filter))
- (if (consp ispell-filter)
- (setq poss (ispell-parse-output (car ispell-filter))))
- (cond ((or (eq poss t) (stringp poss))
- ;; don't correct word
- t)
- ((null poss)
- ;; ispell error
- (error "Ispell: error in Ispell process"))
- ((string-match "GNU" (emacs-version))
- ;; the word is incorrect, we have to propose a replacement
- (setq replace (flyspell-emacs-popup event poss word))
- (cond ((eq replace 'ignore)
- (goto-char save)
- nil)
- ((eq replace 'save)
- (goto-char save)
- (process-send-string ispell-process (concat "*" word "\n"))
- (flyspell-unhighlight-at cursor-location)
- (setq ispell-pdict-modified-p '(t)))
- ((or (eq replace 'buffer) (eq replace 'session))
- (process-send-string ispell-process (concat "@" word "\n"))
- (if (null ispell-pdict-modified-p)
- (setq ispell-pdict-modified-p
- (list ispell-pdict-modified-p)))
- (flyspell-unhighlight-at cursor-location)
- (goto-char save)
- (if (eq replace 'buffer)
- (ispell-add-per-file-word-list word)))
- (replace
- (flyspell-unhighlight-at cursor-location)
- (let ((new-word (if (atom replace)
- replace
- (car replace)))
- (cursor-location (+ (- (length word) (- end start))
- cursor-location)))
- (if (not (equal new-word (car poss)))
- (let ((old-max (point-max)))
- (delete-region start end)
- (funcall flyspell-insert-function new-word)
- (if flyspell-abbrev-p
- (flyspell-define-abbrev word new-word))
- (flyspell-ajust-cursor-point save
- cursor-location
- old-max)))))
- (t
- (goto-char save)
- nil)))
- ((eq flyspell-emacs 'xemacs)
- (flyspell-xemacs-popup
- event poss word cursor-location start end save)
- (goto-char save)))
- (ispell-pdict-save t))))
+ (word (flyspell-get-word nil)))
+ (if (consp word)
+ (let ((start (car (cdr word)))
+ (end (car (cdr (cdr word))))
+ (word (car word))
+ poss replace)
+ ;; now check spelling of word.
+ (process-send-string ispell-process "%\n") ;put in verbose mode
+ (process-send-string ispell-process (concat "^" word "\n"))
+ ;; wait until ispell has processed word
+ (while (progn
+ (accept-process-output ispell-process)
+ (not (string= "" (car ispell-filter)))))
+ (setq ispell-filter (cdr ispell-filter))
+ (if (consp ispell-filter)
+ (setq poss (ispell-parse-output (car ispell-filter))))
+ (cond
+ ((or (eq poss t) (stringp poss))
+ ;; don't correct word
+ t)
+ ((null poss)
+ ;; ispell error
+ (error "Ispell: error in Ispell process"))
+ ((string-match "GNU" (emacs-version))
+ ;; the word is incorrect, we have to propose a replacement
+ (setq replace (flyspell-emacs-popup event poss word))
+ (cond ((eq replace 'ignore)
+ (goto-char save)
+ nil)
+ ((eq replace 'save)
+ (goto-char save)
+ (process-send-string ispell-process
+ (concat "*" word "\n"))
+ (flyspell-unhighlight-at cursor-location)
+ (setq ispell-pdict-modified-p '(t)))
+ ((or (eq replace 'buffer) (eq replace 'session))
+ (process-send-string ispell-process
+ (concat "@" word "\n"))
+ (if (null ispell-pdict-modified-p)
+ (setq ispell-pdict-modified-p
+ (list ispell-pdict-modified-p)))
+ (flyspell-unhighlight-at cursor-location)
+ (goto-char save)
+ (if (eq replace 'buffer)
+ (ispell-add-per-file-word-list word)))
+ (replace
+ (flyspell-unhighlight-at cursor-location)
+ (let ((new-word (if (atom replace)
+ replace
+ (car replace)))
+ (cursor-location
+ (+ (- (length word) (- end start))
+ cursor-location)))
+ (if (not (equal new-word (car poss)))
+ (let ((old-max (point-max)))
+ (delete-region start end)
+ (funcall flyspell-insert-function new-word)
+ (if flyspell-abbrev-p
+ (flyspell-define-abbrev word new-word))
+ (flyspell-ajust-cursor-point save
+ cursor-location
+ old-max)))))
+ (t
+ (goto-char save)
+ nil)))
+ ((eq flyspell-emacs 'xemacs)
+ (flyspell-xemacs-popup
+ event poss word cursor-location start end save)
+ (goto-char save)))
+ (ispell-pdict-save t))))))
;*---------------------------------------------------------------------*/
;* 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 @@
;; Author: Carsten Dominik <dominik at science dot uva dot nl>
;; Keywords: outlines, hypermedia, calendar
;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 3.09
+;; Version: 3.10
;;
;; This file is part of GNU Emacs.
;;
@@ -80,6 +80,9 @@
;;
;; Changes:
;; -------
+;; Version 3.10
+;; - Using `define-derived-mode' to derive `org-mode' from `outline-mode'.
+;;
;; Version 3.09
;; - Time-of-day specifications in agenda are extracted and placed
;; into the prefix. Timed entries can be placed into a time grid for
@@ -151,10 +154,12 @@
(require 'outline)
(require 'time-date)
(require 'easymenu)
+(or (fboundp 'run-mode-hooks)
+ (defalias 'run-mode-hooks 'run-hooks))
;;; Customization variables
-(defvar org-version "3.09"
+(defvar org-version "3.10"
"The version number of the file org.el.")
(defun org-version ()
(interactive)
@@ -372,7 +377,11 @@ Such files should use a file variable to set it, for example
-*- mode: org; org-category: \"ELisp\"
-If the file does not specify a category, the file's base name
+or contain a special line
+
+#+CATEGORY: ELisp
+
+If the file does not specify a category, then file's base name
is used instead.")
(defun org-set-regexps-and-options ()
@@ -1525,7 +1534,7 @@ sets it back to nil.")
;;;###autoload
-(defun org-mode (&optional arg)
+(define-derived-mode org-mode outline-mode "Org"
"Outline-based notes management and organizer, alias
\"Carstens outline-mode for keeping track of everything.\"
@@ -1538,16 +1547,11 @@ calendar. Tables are easily created with a built-in table editor.
Plain text URL-like links connect to websites, emails (VM), Usenet
messages (Gnus), BBDB entries, and any files related to the project.
For printing and sharing of notes, an Org-mode file (or a part of it)
-can be exported as a well-structured ASCII or HTML file.
+can be exported as a structured ASCII or HTML file.
The following commands are available:
\\{org-mode-map}"
- (interactive "P")
- (outline-mode)
- (setq major-mode 'org-mode)
- (setq mode-name "Org")
- (use-local-map org-mode-map)
(easy-menu-add org-org-menu)
(org-install-agenda-files-menu)
(setq outline-regexp "\\*+")
@@ -1569,15 +1573,10 @@ The following commands are available:
(if org-enable-table-editor "|" "")
(if org-enable-fixed-width-editor ":" "")
"]"))))
- ;; Hook, and startup actions
- (if (or arg
- (and org-insert-mode-line-in-empty-file
- (interactive-p)
- (= (point-min) (point-max))))
- (save-excursion
- (goto-char (point-min))
- (insert " -*- mode: org -*-\n\n")))
- (run-hooks 'org-mode-hook)
+ (if (and org-insert-mode-line-in-empty-file
+ (interactive-p)
+ (= (point-min) (point-max)))
+ (insert " -*- mode: org -*-\n\n"))
(unless org-inhibit-startup
(if org-startup-with-deadline-check
(call-interactively 'org-check-deadlines)
@@ -1641,7 +1640,6 @@ The following commands are available:
'keymap org-mouse-map))
t)))
-
(defun org-font-lock-level ()
(save-excursion
(org-back-to-heading t)
@@ -3120,7 +3118,7 @@ The following commands are available:
"--")
(mapcar 'org-file-menu-entry org-agenda-files)))
(org-agenda-set-mode-name)
- (run-hooks 'org-agenda-mode-hook))
+ (run-mode-hooks 'org-agenda-mode-hook))
(define-key org-agenda-mode-map [(tab)] 'org-agenda-goto)
(define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to)
@@ -6700,7 +6698,7 @@ table editor in arbitrary modes.")
(concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp)
"[ \t]*|"))
(easy-menu-add orgtbl-mode-menu)
- (run-hooks (quote orgtbl-mode-hook)))
+ (run-hooks 'orgtbl-mode-hook))
(setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp)
(remove-hook 'before-change-functions 'org-before-change-function t)
(easy-menu-remove orgtbl-mode-menu)
@@ -8433,7 +8431,7 @@ the automatic table editor has been turned off."
;;; Menu entries
-;; First, remove the outline menus.
+;; First, remove the outline menus. Org-mode does not neede these commands.
(if org-xemacs-p
(add-hook 'org-mode-hook
(lambda ()
@@ -8442,7 +8440,7 @@ the automatic table editor has been turned off."
(delete-menu-item '("Hide"))
(set-menubar-dirty-flag)))
(setq org-mode-map (delq (assoc 'menu-bar (cdr org-mode-map))
- org-mode-map)))
+ org-mode-map)))
;; Define the Org-mode menus
(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.
(easy-menu-add reftex-index-menu reftex-index-map)
(add-hook 'post-command-hook 'reftex-index-post-command-hook nil t)
(add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t)
- (run-hooks 'reftex-index-mode-hook))
+ (run-mode-hooks 'reftex-index-mode-hook))
(defconst reftex-index-help
" AVAILABLE KEYS IN INDEX BUFFER
@@ -1308,7 +1308,7 @@ Here are all local bindings.
reftex-index-phrases-font-lock-defaults)
(easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map)
(set (make-local-variable 'reftex-index-phrases-marker) (make-marker))
- (run-hooks 'reftex-index-phrases-mode-hook))
+ (run-mode-hooks 'reftex-index-phrases-mode-hook))
(add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock)
;; 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.
(when (syntax-table-p reftex-latex-syntax-table)
(set-syntax-table reftex-latex-syntax-table))
;; We do not set a local map - reftex-select-item does this.
- (run-hooks 'reftex-select-label-mode-hook))
+ (run-mode-hooks 'reftex-select-label-mode-hook))
(defvar reftex-select-bib-map nil
"Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry.
@@ -88,7 +88,7 @@ During a selection process, these are the local bindings.
mode-name "BSelect")
(set (make-local-variable 'reftex-select-marked) nil)
;; We do not set a local map - reftex-select-item does this.
- (run-hooks 'reftex-select-bib-mode-hook))
+ (run-mode-hooks 'reftex-select-bib-mode-hook))
;;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file)
;;; ;; 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.
(add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t)
(add-hook 'pre-command-hook 'reftex-toc-pre-command-hook nil t)
(easy-menu-add reftex-toc-menu reftex-toc-map)
- (run-hooks 'reftex-toc-mode-hook))
+ (run-mode-hooks 'reftex-toc-mode-hook))
(defvar reftex-last-toc-file nil
"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.")
(defface sgml-namespace-face
'((t (:inherit font-lock-builtin-face)))
- "`sgml-mode' face used to highlight the namespace part of identifiers.")
+ "`sgml-mode' face used to highlight the namespace part of identifiers."
+ :group 'sgml)
(defvar sgml-namespace-face 'sgml-namespace-face)
;; 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."
(defface superscript
'((t :height 0.8)) ;; :raise 0.3
- "Face used for superscripts.")
+ "Face used for superscripts."
+ :group 'tex)
(defface subscript
'((t :height 0.8)) ;; :raise -0.3
- "Face used for subscripts.")
+ "Face used for subscripts."
+ :group 'tex)
(defface tex-math-face
'((t :inherit font-lock-string-face))
- "Face used to highlight TeX math expressions.")
+ "Face used to highlight TeX math expressions."
+ :group 'tex)
(defvar tex-math-face 'tex-math-face)
(defface tex-verbatim-face
;; '((t :inherit font-lock-string-face))
'((t :family "courier"))
- "Face used to highlight TeX verbatim environments.")
+ "Face used to highlight TeX verbatim environments."
+ :group 'tex)
(defvar tex-verbatim-face 'tex-verbatim-face)
;; Use string syntax but math face for $...$.
@@ -1623,7 +1627,8 @@ If NOT-ALL is non-nil, save the `.dvi' file."
(defcustom tex-use-reftex t
"If non-nil, use RefTeX's list of files to determine what command to use."
- :type 'boolean)
+ :type 'boolean
+ :group 'tex)
(defvar tex-compile-commands
'(((concat "pdf" tex-command
@@ -2227,8 +2232,7 @@ is provided, use the alternative command, `tex-alt-dvi-print-command'."
(tex-start-shell))
(tex-send-command
(if alt tex-alt-dvi-print-command tex-dvi-print-command)
- (shell-quote-argument
- print-file-name-dvi)
+ print-file-name-dvi
t))))
(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.")
(defface texinfo-heading-face
'((t (:inherit font-lock-function-name-face)))
- "Face used for section headings in `texinfo-mode'.")
+ "Face used for section headings in `texinfo-mode'."
+ :group 'texinfo)
(defvar texinfo-heading-face 'texinfo-heading-face)
(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."
(defun thumbs-thumbname (img)
"Return a thumbnail name for the image IMG."
- (concat thumbs-thumbsdir "/"
- (subst-char-in-string
- ?\ ?\_
- (apply
- 'concat
- (split-string
- (expand-file-name img) "/")))))
+ (convert-standard-filename
+ (let ((filename (expand-file-name img)))
+ (format "%s/%08x-%s.jpg"
+ thumbs-thumbsdir
+ (sxhash filename)
+ (subst-char-in-string
+ ?\s ?\_
+ (apply
+ 'concat
+ (split-string filename "/")))))))
(defun thumbs-make-thumb (img)
"Create the thumbnail for IMG."
- (let* ((fn (expand-file-name img))
- (tn (thumbs-thumbname img)))
+ (let ((fn (expand-file-name img))
+ (tn (thumbs-thumbname img)))
(if (or (not (file-exists-p tn))
;; This is not the right fix, but I don't understand
;; the external program or why it produces a geometry
@@ -378,8 +381,9 @@ If MARKED is non-nil, the image is marked."
(unless (bobp) (newline))))
(defun thumbs-show-thumbs-list (L &optional buffer-name same-window)
- (when (not (display-images-p))
- (error "Images are not supported in this Emacs session"))
+ (unless (and (display-images-p)
+ (image-type-available-p 'jpeg))
+ (error "Required image type is not supported in this Emacs session"))
(funcall (if same-window 'switch-to-buffer 'pop-to-buffer)
(or buffer-name "*THUMB-View*"))
(let ((inhibit-read-only t))
@@ -754,9 +758,8 @@ ACTION and ARG should be a valid convert command."
(define-derived-mode thumbs-mode
fundamental-mode "thumbs"
"Preview images in a thumbnails buffer"
- (make-variable-buffer-local 'thumbs-markedL)
(setq buffer-read-only t)
- (setq thumbs-markedL nil))
+ (set (make-local-variable 'thumbs-markedL) nil))
(defvar thumbs-view-image-mode-map
(let ((map (make-sparse-keymap)))
@@ -793,7 +796,5 @@ ACTION and ARG should be a valid convert command."
(provide 'thumbs)
+;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c
;;; thumbs.el ends here
-
-
-;;; 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'."
(list :background bg)))))
'face display-time-mail-face
'help-echo "You have new mail; mouse-2: Read mail"
+ 'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map 'mouse-2
read-mail-command)))
""))
@@ -293,6 +294,7 @@ update which can wait for the next redisplay."
(concat (substring str 0 -2) "." (substring str -2))
'local-map (make-mode-line-mouse-map
'mouse-2 'display-time-next-load-average)
+ 'mouse-face 'mode-line-highlight
'help-echo (concat
"System load average for past "
(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."
:type '(choice integer (const nil))
:group 'tmm)
+(require 'font-lock)
+(defface tmm-inactive-face
+ '((t :inherit font-lock-comment-face))
+ "Face used for inactive menu items."
+ :group 'tmm)
+
;;;###autoload
(defun tmm-prompt (menu &optional in-popup default-item)
"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."
(eq (car-safe (cdr (car tail))) 'menu-item)))
(setq index-of-default (1+ index-of-default)))
(setq tail (cdr tail)))))
- (setq history (reverse (mapcar 'car tmm-km-list)))
+ (let ((prompt (concat "^." (regexp-quote tmm-mid-prompt))))
+ (setq history
+ (reverse (delq nil
+ (mapcar
+ (lambda (elt)
+ (if (string-match prompt (car elt))
+ (car elt)))
+ tmm-km-list)))))
(setq history-len (length history))
(setq history (append history history history history))
(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'."
(defsubst tmm-add-one-shortcut (elt)
;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts
- (let* ((str (car elt))
- (paren (string-match "(" str))
- (pos 0) (word 0) char)
- (catch 'done ; ??? is this slow?
- (while (and (or (not tmm-shortcut-words) ; no limit on words
- (< word tmm-shortcut-words)) ; try n words
- (setq pos (string-match "\\w+" str pos)) ; get next word
- (not (and paren (> pos paren)))) ; don't go past "(binding.."
- (if (or (= pos 0)
- (/= (aref str (1- pos)) ?.)) ; avoid file extensions
- (let ((shortcut-style
- (if (listp tmm-shortcut-style) ; convert to list
- tmm-shortcut-style
- (list tmm-shortcut-style))))
- (while shortcut-style ; try upcase and downcase variants
- (setq char (funcall (car shortcut-style) (aref str pos)))
- (if (not (memq char tmm-short-cuts)) (throw 'done char))
- (setq shortcut-style (cdr shortcut-style)))))
- (setq word (1+ word))
- (setq pos (match-end 0)))
- (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit
- (setq char tmm-next-shortcut-digit)
- (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit))
- (if (not (memq char tmm-short-cuts)) (throw 'done char)))
- (setq char nil))
- (if char (setq tmm-short-cuts (cons char tmm-short-cuts)))
- (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt)
- ;; keep them lined up in columns
- (make-string (1+ (length tmm-mid-prompt)) ?\ ))
- str)
- (cdr elt))))
+ (cond
+ ((eq (cddr elt) 'ignore)
+ (cons (concat " " (make-string (length tmm-mid-prompt) ?\-)
+ (car elt))
+ (cdr elt)))
+ (t
+ (let* ((str (car elt))
+ (paren (string-match "(" str))
+ (pos 0) (word 0) char)
+ (catch 'done ; ??? is this slow?
+ (while (and (or (not tmm-shortcut-words) ; no limit on words
+ (< word tmm-shortcut-words)) ; try n words
+ (setq pos (string-match "\\w+" str pos)) ; get next word
+ (not (and paren (> pos paren)))) ; don't go past "(binding.."
+ (if (or (= pos 0)
+ (/= (aref str (1- pos)) ?.)) ; avoid file extensions
+ (let ((shortcut-style
+ (if (listp tmm-shortcut-style) ; convert to list
+ tmm-shortcut-style
+ (list tmm-shortcut-style))))
+ (while shortcut-style ; try upcase and downcase variants
+ (setq char (funcall (car shortcut-style) (aref str pos)))
+ (if (not (memq char tmm-short-cuts)) (throw 'done char))
+ (setq shortcut-style (cdr shortcut-style)))))
+ (setq word (1+ word))
+ (setq pos (match-end 0)))
+ (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit
+ (setq char tmm-next-shortcut-digit)
+ (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit))
+ (if (not (memq char tmm-short-cuts)) (throw 'done char)))
+ (setq char nil))
+ (if char (setq tmm-short-cuts (cons char tmm-short-cuts)))
+ (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt)
+ ;; keep them lined up in columns
+ (make-string (1+ (length tmm-mid-prompt)) ?\ ))
+ str)
+ (cdr elt))))))
;; This returns the old map.
(defun tmm-define-keys (minibuffer)
@@ -319,9 +338,27 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(goto-char 1)
(delete-region 1 (search-forward "Possible completions are:\n")))
+(defun tmm-remove-inactive-mouse-face ()
+ "Remove the mouse-face property from inactive menu items."
+ (let ((inhibit-read-only t)
+ (inactive-string
+ (concat " " (make-string (length tmm-mid-prompt) ?\-)))
+ next)
+ (save-excursion
+ (goto-char (point-min))
+ (while (not (eobp))
+ (setq next (next-single-char-property-change (point) 'mouse-face))
+ (when (looking-at inactive-string)
+ (remove-text-properties (point) next '(mouse-face))
+ (add-text-properties (point) next '(face tmm-inactive-face)))
+ (goto-char next)))
+ (set-buffer-modified-p nil)))
+
(defun tmm-add-prompt ()
(remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
(add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t)
+ (unless tmm-c-prompt
+ (error "No active menu entries"))
(let ((win (selected-window)))
(setq tmm-old-mb-map (tmm-define-keys t))
;; 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'."
(with-output-to-temp-buffer "*Completions*"
(display-completion-list completions))
(remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt))
+ (set-buffer "*Completions*")
+ (tmm-remove-inactive-mouse-face)
(when tmm-completion-prompt
- (set-buffer "*Completions*")
(let ((buffer-read-only nil))
(goto-char (point-min))
(insert tmm-completion-prompt))))
@@ -345,7 +383,6 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(Electric-pop-up-window "*Completions*")
(with-current-buffer "*Completions*"
(setq tmm-old-comp-map (tmm-define-keys nil))))
-
(insert tmm-c-prompt)))
(defun tmm-delete-map ()
@@ -438,7 +475,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
(setq km (and (eval visible) km)))
(setq enable (plist-get plist :enable))
(if enable
- (setq km (and (eval enable) km)))
+ (setq km (if (eval enable) km 'ignore)))
(and str
(consp (nth 3 elt))
(stringp (cdr (nth 3 elt))) ; keyseq cache
@@ -467,8 +504,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
;; Verify that the command is enabled;
;; if not, don't mention it.
(when (and km (symbolp km) (get km 'menu-enable))
- (unless (eval (get km 'menu-enable))
- (setq km nil)))
+ (setq km (if (eval (get km 'menu-enable)) km 'ignore)))
(and km str
(or (assoc str tmm-km-list)
(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 @@
/* XPM */
static char * stop_xpm[] = {
"24 24 3 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #F8F810104040",
"X c #F8F8FCFCF8F8",
" ",
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 @@
/* XPM */
static char * continue_xpm[] = {
"24 24 6 1",
-" c #c0c0c0",
+" c None",
". c #cc0033",
"X c #d99faa",
"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 @@
/* XPM */
static char * down_xpm[] = {
"24 24 14 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #000000000000",
"X c #7F7F7F7F7F7F",
"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 @@
/* XPM */
static char * finish_xpm[] = {
"24 24 7 1",
-" c #c0c0c0",
+" c None",
". c #cc0033",
"X c #616161",
"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 @@
/* XPM */
static char * next_xpm[] = {
"24 24 7 1",
-" c #c0c0c0",
+" c None",
". c #cc0033",
"X c #616161",
"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 @@
/* XPM */
static char * gud_nexti_xpm[] = {
"24 24 6 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #CCCC00003333",
"X c #616161616161",
"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 @@
/* XPM */
static char * print_xpm[] = {
"24 24 2 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #000000000000",
" ",
" ",
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 @@
+/* XPM */
+static char * gud_pstar_xpm[] = {
+"24 24 2 1",
+" c #BDBDBEBEBDBD",
+". c #000000000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ... ... ",
+" ... ... ",
+" .. .. . ",
+" .. .. . . . ",
+" .. .. ... ",
+" .. .. . . . ",
+" .. .. . ",
+" ... .. ",
+" .. .. ",
+" .. ",
+" .. ",
+" .. ",
+" .... ",
+" ",
+" ",
+" "};
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 @@
/* XPM */
static char * go_xpm[] = {
"24 24 4 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #000080800000",
"X c #FFFFFFFFFFFF",
"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 @@
/* XPM */
static char * run_xpm[] = {
"24 24 9 1",
-" c #c0c0c0",
+" c None",
". c #000080",
"X c #aa9faa",
"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 @@
/* XPM */
static char * step_xpm[] = {
"24 24 6 1",
-" c #c0c0c0",
+" c None",
". c #d40000",
"X c #616161",
"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 @@
/* XPM */
static char * gud_stepi_xpm[] = {
"24 24 5 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #D4D400000000",
"X c #616161616161",
"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 @@
/* XPM */
static char * goto_xpm[] = {
"24 24 6 1",
-" c #c0c0c0",
+" c None",
". c #ff0000",
"X c #616161",
"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 @@
/* XPM */
static char * up_xpm[] = {
"24 24 14 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #000000000000",
"X c #7F7F7F7F7F7F",
"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 @@
/* XPM */
static char * watch_xpm[] = {
"24 24 11 1",
-" c #C0C0C0C0C0C0",
+" c None",
". c #808080808080",
"X c #000000000000",
"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."
(url-request-data url-http-data)
(url-request-extra-headers url-http-extra-headers))
(url-retrieve redirect-uri url-callback-function
- url-callback-arguments)
+ (cons redirect-uri
+ (cdr url-callback-arguments)))
(url-mark-buffer-as-dead (current-buffer))))))
(4 ; Client error
;; 400 Bad Request
@@ -849,7 +850,7 @@ the end of the document."
(url-display-percentage nil nil)
(goto-char (match-end 1))
(if (re-search-forward "^\r*$" nil t)
- (message "Saw end of trailers..."))
+ (url-http-debug "Saw end of trailers..."))
(if (url-http-parse-headers)
(url-http-activate-callback))))))))))
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'."
(buffer-enable-undo) ; Performance hack. See above.
(set-buffer-modified-p nil)
(setq buffer-undo-list nil)
- (run-hooks 'wdired-mode-hook)
+ (run-mode-hooks 'wdired-mode-hook)
(message (substitute-command-keys "Press \\[wdired-finish-edit] when finished \
or \\[wdired-abort-changes] to abort changes")))
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."
(use-local-map widget-browse-mode-map)
(easy-menu-add widget-browse-mode-customize-menu)
(easy-menu-add widget-browse-mode-menu)
- (run-hooks 'widget-browse-mode-hook))
+ (run-mode-hooks 'widget-browse-mode-hook))
(put 'widget-browse-mode 'mode-class 'special)
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 @@
;;**
;;*******************************************************************
+(defconst xml-undefined-entity "?"
+ "What to substitute for undefined entities")
+
(defvar xml-entity-alist
'(("lt" . "<")
("gt" . ">")
@@ -745,9 +748,10 @@ This follows the rule [28] in the XML specifications."
((eq (length this-part) 0)
(error "XML: (Not Well-Formed) No entity given"))
(t
- (when xml-validating-parser
+ (if xml-validating-parser
(error "XML: (Validity) Undefined entity `%s'"
- this-part))))))
+ this-part)
+ xml-undefined-entity)))))
(cond ((null children)
;; FIXME: If we have an entity that expands into XML, this won't work.