mh-e-8.5/0002755000175000000620000000000012114520723011373 5ustar wohlerstaffmh-e-8.5/Makefile0000644000175000000620000003400312114520723013031 0ustar wohlerstaff# Makefile for MH-E. # Copyright (C) 2003-2006, 2011, 2012 Bill Wohler # This file is part of MH-E. # MH-E is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # MH-E is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with MH-E; see the file COPYING. If not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # # Note: most changes to this file should also be mirrored in the Makefiles in # $(TOP)/doc and $(TOP)/contrib. # TOP = .. EMACS_SRC = emacs/trunk URL = bzr://bzr.savannah.gnu.org/$(EMACS_SRC) DEV_URL = bzr+ssh://$(USER)@bzr.savannah.gnu.org/$(EMACS_SRC) # Program to install files INSTALL = install -m 644 # MH-E source. MH_E_SRC = \ $(EMACS_SRC)/lisp/mh-e/mh-alias.el \ $(EMACS_SRC)/lisp/mh-e/mh-buffers.el \ $(EMACS_SRC)/lisp/mh-e/mh-comp.el \ $(EMACS_SRC)/lisp/mh-e/mh-e.el \ $(EMACS_SRC)/lisp/mh-e/mh-folder.el \ $(EMACS_SRC)/lisp/mh-e/mh-funcs.el \ $(EMACS_SRC)/lisp/mh-e/mh-identity.el \ $(EMACS_SRC)/lisp/mh-e/mh-inc.el \ $(EMACS_SRC)/lisp/mh-e/mh-junk.el \ $(EMACS_SRC)/lisp/mh-e/mh-letter.el \ $(EMACS_SRC)/lisp/mh-e/mh-limit.el \ $(EMACS_SRC)/lisp/mh-e/mh-mime.el \ $(EMACS_SRC)/lisp/mh-e/mh-print.el \ $(EMACS_SRC)/lisp/mh-e/mh-scan.el \ $(EMACS_SRC)/lisp/mh-e/mh-search.el \ $(EMACS_SRC)/lisp/mh-e/mh-seq.el \ $(EMACS_SRC)/lisp/mh-e/mh-show.el \ $(EMACS_SRC)/lisp/mh-e/mh-speed.el \ $(EMACS_SRC)/lisp/mh-e/mh-thread.el \ $(EMACS_SRC)/lisp/mh-e/mh-tool-bar.el \ $(EMACS_SRC)/lisp/mh-e/mh-utils.el \ $(EMACS_SRC)/lisp/mh-e/mh-xface.el MH_E_OBJ = $(MH_E_SRC:.el=.elc) MH_E_SRC_NONCOMPILED = \ $(EMACS_SRC)/lisp/mh-e/mh-acros.el \ $(EMACS_SRC)/lisp/mh-e/mh-compat.el \ $(EMACS_SRC)/lisp/mh-e/mh-gnus.el MH_E_XEMACS_SRC = mh-xemacs.el MH_E_XEMACS_OBJ = $(MH_E_XEMACS_SRC:.el=.elc) # Automatically generated files. MH_E_LOADDEFS = $(EMACS_SRC)/lisp/mh-e/mh-loaddefs.el MH_E_LOADDEFS_SRC = $(MH_E_SRC) MH_E_AUTOLOADS = $(EMACS_SRC)/lisp/mh-e/mh-autoloads.el MH_E_CUSTOM_LOAD = $(EMACS_SRC)/lisp/mh-e/mh-cus-load.el MH_E_AUTOGEN = \ $(MH_E_AUTOLOADS) \ $(MH_E_CUSTOM_LOAD) \ $(MH_E_LOADDEFS) # Emacs images needed by MH-E. # These names are duplicated in mh-xemacs.el and mh-tool-bar.el. MH_E_IMG = \ $(EMACS_SRC)/etc/images/attach.pbm \ $(EMACS_SRC)/etc/images/attach.xpm \ $(EMACS_SRC)/etc/images/contact.pbm \ $(EMACS_SRC)/etc/images/contact.xpm \ $(EMACS_SRC)/etc/images/copy.pbm \ $(EMACS_SRC)/etc/images/copy.xpm \ $(EMACS_SRC)/etc/images/cut.pbm \ $(EMACS_SRC)/etc/images/cut.xpm \ $(EMACS_SRC)/etc/images/data-save.pbm \ $(EMACS_SRC)/etc/images/data-save.xpm \ $(EMACS_SRC)/etc/images/delete.pbm \ $(EMACS_SRC)/etc/images/delete.xpm \ $(EMACS_SRC)/etc/images/help.pbm \ $(EMACS_SRC)/etc/images/help.xpm \ $(EMACS_SRC)/etc/images/left-arrow.pbm \ $(EMACS_SRC)/etc/images/left-arrow.xpm \ $(EMACS_SRC)/etc/images/mail/compose.pbm \ $(EMACS_SRC)/etc/images/mail/compose.xpm \ $(EMACS_SRC)/etc/images/mail/flag-for-followup.pbm \ $(EMACS_SRC)/etc/images/mail/flag-for-followup.xpm \ $(EMACS_SRC)/etc/images/mail/inbox.pbm \ $(EMACS_SRC)/etc/images/mail/inbox.xpm \ $(EMACS_SRC)/etc/images/mail/move.pbm \ $(EMACS_SRC)/etc/images/mail/move.xpm \ $(EMACS_SRC)/etc/images/mail/repack.pbm \ $(EMACS_SRC)/etc/images/mail/repack.xpm \ $(EMACS_SRC)/etc/images/mail/reply-all.pbm \ $(EMACS_SRC)/etc/images/mail/reply-all.xpm \ $(EMACS_SRC)/etc/images/mail/reply-from.pbm \ $(EMACS_SRC)/etc/images/mail/reply-from.xpm \ $(EMACS_SRC)/etc/images/mail/reply-to.pbm \ $(EMACS_SRC)/etc/images/mail/reply-to.xpm \ $(EMACS_SRC)/etc/images/mail/reply.pbm \ $(EMACS_SRC)/etc/images/mail/reply.xpm \ $(EMACS_SRC)/etc/images/mail/send.pbm \ $(EMACS_SRC)/etc/images/mail/send.xpm \ $(EMACS_SRC)/etc/images/mh-logo.xpm \ $(EMACS_SRC)/etc/images/next-page.pbm \ $(EMACS_SRC)/etc/images/next-page.xpm \ $(EMACS_SRC)/etc/images/open.pbm \ $(EMACS_SRC)/etc/images/open.xpm \ $(EMACS_SRC)/etc/images/paste.pbm \ $(EMACS_SRC)/etc/images/paste.xpm \ $(EMACS_SRC)/etc/images/preferences.pbm \ $(EMACS_SRC)/etc/images/preferences.xpm \ $(EMACS_SRC)/etc/images/refresh.pbm \ $(EMACS_SRC)/etc/images/refresh.xpm \ $(EMACS_SRC)/etc/images/right-arrow.pbm \ $(EMACS_SRC)/etc/images/right-arrow.xpm \ $(EMACS_SRC)/etc/images/search.pbm \ $(EMACS_SRC)/etc/images/search.xpm \ $(EMACS_SRC)/etc/images/save.pbm \ $(EMACS_SRC)/etc/images/save.xpm \ $(EMACS_SRC)/etc/images/show.pbm \ $(EMACS_SRC)/etc/images/show.xpm \ $(EMACS_SRC)/etc/images/spell.pbm \ $(EMACS_SRC)/etc/images/spell.xpm \ $(EMACS_SRC)/etc/images/undo.pbm \ $(EMACS_SRC)/etc/images/undo.xpm \ $(EMACS_SRC)/etc/images/zoom-out.pbm \ $(EMACS_SRC)/etc/images/zoom-out.xpm # Other MH-E files. MH_E_ETC = \ COPYING \ ChangeLog \ ChangeLog.1 \ Makefile \ README \ $(EMACS_SRC)/etc/MH-E-NEWS \ $(EMACS_SRC)/lisp/mh-e/ChangeLog \ $(EMACS_SRC)/lisp/mh-e/ChangeLog.1 # MH-E maintainer files. MH_E_MAINT = \ $(EMACS_SRC)/.bzrignore \ mh-unit.el \ release-utils # MH-E files for distribution. MH_E_DIST_NOAUTOGEN = \ $(MH_E_SRC) \ $(MH_E_SRC_NONCOMPILED) \ $(MH_E_XEMACS_SRC) \ $(MH_E_IMG) \ $(MH_E_ETC) # MH-E files for distribution, including automatically generated files. MH_E_DIST = \ $(MH_E_DIST_NOAUTOGEN) \ $(MH_E_AUTOGEN) # All MH-E files, excluding automatically generated files. MH_E_ALL = \ $(MH_E_DIST_NOAUTOGEN) \ $(MH_E_MAINT) # Compiling variables. EMACS = emacs # $(EMACS_SRC)/lisp/mh-e only needed by custom-deps on Emacs 21. EMACS_OPTIONS = --batch --no-site-file --multibyte \ --eval "(setq load-path (cons \".\" (cons \"$(EMACS_SRC)/lisp/mh-e\" load-path)))" EMACS_LOADDEFS_COOKIE = \ --eval "(setq generate-autoload-cookie \";;;\#\#\#mh-autoload\")" # autoload-package-name needed by XEmacs; harmless on GNU Emacs. EMACS_EXPORT_MH_LOADDEFS = \ --eval "(setq generated-autoload-file (expand-file-name \"$(MH_E_LOADDEFS)\"))" \ --eval "(setq make-backup-files nil)" \ --eval "(setq autoload-package-name \"mh-loaddefs\")" EMACS_EXPORT_MH_AUTOLOADS = \ --eval "(setq generated-autoload-file (expand-file-name \"$(MH_E_AUTOLOADS)\"))" \ --eval "(setq make-backup-files nil)" \ --eval "(setq autoload-package-name \"mh\")" COMPILE_COMMAND = $(EMACS) $(EMACS_OPTIONS) # XEmacs variables. XEMACS = false XEMACS_OPTIONS = --batch --vanilla \ --eval "(setq load-path (cons (expand-file-name \"$(EMACS_SRC)/lisp/mh-e\") load-path))" \ --eval "(setq load-path (cons \".\" load-path))" # Since sed did not support the -i (--inplace) option at the time of # the initial Emacs 21 release, use a temporary file instead of sed -i # as long as we support Emacs 21. Solaris 9 sed also had problems # using an expression to insert multiple lines starting at line 2 of # the file, so we may end up keeping an intermediate temporary file as # a workaround for longer than just support of the Emacs 21 release. MH_E_TMP = /tmp/mh-e$$$$ # Default target. Works for both Emacs and XEmacs. all: emacs case $(EMACS) in \ *xemacs*) \ $(MAKE) EMACS='$(EMACS)' \ EMACS_OPTIONS='$(XEMACS_OPTIONS)' \ XEMACS=: \ xemacs ;;\ *) \ $(MAKE) EMACS='$(EMACS)' \ Emacs ;;\ esac # Check out emacs directory if necessary. emacs: bzr init-repo emacs @echo "Checking out Emacs repository (370 MB)..." (cd emacs && bzr co $(URL)) emacs-devel: bzr init-repo emacs @echo "Checking out Emacs repository (370 MB)..." (cd emacs && bzr co $(DEV_URL)) # The .PHONY targets are always considered to be out-of-date. # This rule needs to be after the ``all'' rule for compatibility # with old versions of make. .PHONY: all clean compile Emacs emacs-devel # Ensure clean compile which is advised since old .elc files can # interfere with the compilation process. Emacs: clean loaddefs compile autoloads custom-deps # Remove everything we make. clean:: rm -rf $(MH_E_OBJ) $(MH_E_AUTOGEN) # Compile MH-E. See $EMACS_HOME/lisp/Makefile for commentary. compile: $(MH_E_SRC) $(COMPILE_COMMAND) -f batch-byte-compile $? # Automatically extract internal autoloads. MH_E_LOADDEFS_HEADER =\ ";;; mh-loaddefs.el --- automatically extracted internal autoloads for MH-E\ \n;;\ \n;; Copyright (C) 2003-2012 Free Software Foundation, Inc.\ \n;; Author: Bill Wohler \ \n;; Keywords: mail\ \n;;; Commentary:\ \n;;; Change Log:\ \n;;; Code:\n\n" MH_E_LOADDEFS_FOOTER =\ "\f\ \n(provide 'mh-loaddefs)\ \n;; Local Variables:\ \n;; version-control: never\ \n;; no-byte-compile: t\ \n;; no-update-autoloads: t\ \n;; End:\ \n;;; mh-loaddefs.el ends here\n" .PHONY: loaddefs loaddefs: $(MH_E_LOADDEFS) $(MH_E_LOADDEFS): $(MH_E_LOADDEFS_SRC) # For XEmacs, the autoload file must not be present. if $(XEMACS); then :; else \ printf $(MH_E_LOADDEFS_HEADER) > $@; \ fi $(COMPILE_COMMAND) \ -l autoload \ $(EMACS_LOADDEFS_COOKIE) \ $(EMACS_EXPORT_MH_LOADDEFS) \ -f batch-update-autoloads $(EMACS_SRC)/lisp/mh-e # Prepend the header in case of XEmacs. if $(XEMACS); then \ (printf $(MH_E_LOADDEFS_HEADER); cat $@) > $(MH_E_TMP); \ mv $(MH_E_TMP) $@; \ fi; \ printf $(MH_E_LOADDEFS_FOOTER) >> $@ # Automatically extract external autoloads. MH_E_AUTOLOADS_HEADER =\ ";;; mh-autoloads.el --- automatically extracted external autoloads for MH-E\ \n\ \n;; Copyright (C) 2003-2012 Free Software Foundation, Inc.\ \n;; Author: Bill Wohler \ \n;; Keywords: mail\ \n;;; Commentary:\ \n\ \n;; If you installed MH-E separately from Emacs, you can set up its entry\ \n;; points using the following in your .emacs file:\ \n\ \n;; (require 'mh-autoloads)\ \n\ \n;;; Change Log:\ \n;;; Code:\n\n" MH_E_AUTOLOADS_FOOTER =\ "\f\ \n(provide 'mh-autoloads)\ \n;; Local Variables:\ \n;; version-control: never\ \n;; no-byte-compile: t\ \n;; no-update-autoloads: t\ \n;; End:\ \n;;; mh-autoloads.el ends here\n" .PHONY: autoloads autoloads: $(MH_E_AUTOLOADS) $(MH_E_AUTOLOADS): $(MH_E_SRC) # In GNU Emacs, the autoloads must be present; in XEmacs, it must not. if $(XEMACS); then :; else \ printf $(MH_E_AUTOLOADS_HEADER) > $@; \ fi $(COMPILE_COMMAND) \ -l autoload \ $(EMACS_EXPORT_MH_AUTOLOADS) \ -f batch-update-autoloads $(EMACS_SRC)/lisp/mh-e # Prepend the header in case of XEmacs. if $(XEMACS); then \ (printf $(MH_E_AUTOLOADS_HEADER); cat $@) > $(MH_E_TMP); \ mv $(MH_E_TMP) $@; \ fi; \ printf $(MH_E_AUTOLOADS_FOOTER) >> $@ # Automatically extract custom autoloads. # Emacs 22 has generated-custom-dependencies-file, but Emacs 21 hard-codes # the output file to cus-load.el. XEmacs has cusload-base-file which is set to # custom-load.el. MH_E_CUSTOM_LOAD_HEADER =\ "\ \n;; Copyright (C) 2003-2012 Free Software Foundation, Inc.\ \n;; Author: Bill Wohler \ \n;; Keywords: mail\ \n;;; Commentary:\ \n\ \n;; If you installed MH-E separately from Emacs, you can set up its custom\ \n;; dependencies using the following in your .emacs file:\ \n\ \n;; (require 'mh-cus-load)\ \n\ \n;;; Change Log:\n\n" MH_E_CUSTOM_LOAD_FOOTER =\ "\f\ \n(provide 'mh-cus-load)\ \n;; Local Variables:\ \n;; version-control: never\ \n;; no-byte-compile: t\ \n;; no-update-autoloads: t\ \n;; End:\n" .PHONY: custom-deps custom-deps: $(MH_E_CUSTOM_LOAD) $(MH_E_CUSTOM_LOAD): $(MH_E_SRC) if $(XEMACS); then \ $(COMPILE_COMMAND) \ -l cus-dep -l $(EMACS_SRC)/lisp/mh-e/mh-e \ -f Custom-make-dependencies $(EMACS_SRC)/lisp/mh-e; \ (sed -e "s/custom-load/mh-cus-load/" \ $(EMACS_SRC)/lisp/mh-e/custom-load.el; \ printf $(MH_E_CUSTOM_LOAD_FOOTER)) > $(MH_E_TMP); \ rm -f $(EMACS_SRC)/lisp/mh-e/custom-load.el; \ else \ $(COMPILE_COMMAND) \ -l cus-dep -l $(EMACS_SRC)/lisp/mh-e/mh-e \ -f custom-make-dependencies $(EMACS_SRC)/lisp/mh-e; \ sed -e "s/cus-load/mh-cus-load/" cus-load.el > $(MH_E_TMP); \ rm -f cus-load.el; \ fi; \ (sed -e 2,\$$d $(MH_E_TMP); \ printf $(MH_E_CUSTOM_LOAD_HEADER); \ sed -e 1d $(MH_E_TMP)) > $@; \ rm -f $(MH_E_TMP) # XEmacs targets. .PHONY: xemacs compile-xemacs xemacs: clean loaddefs compile-xemacs autoloads custom-deps clean:: rm -rf $(MH_E_XEMACS_OBJ) compile-xemacs: $(MH_E_SRC) $(MH_E_XEMACS_SRC) $(COMPILE_COMMAND) -l bytecomp -f batch-byte-compile $? # # The following targets are only of interest to maintainers. # .PHONY: install-maint tag dist # Installs MH-E outside of the source directory to provide a stable # environment while developing. Two variables are used: # # INSTALL_LISP_DIR - installation directory for compiled .elc and # non-compiled .el files # INSTALL_IMG_DIR - installation directory for images # install-maint: @if [ -z "$(INSTALL_LISP_DIR)" -o ! -d "$(INSTALL_LISP_DIR)" ]; then \ echo "Set INSTALL_LISP_DIR to an existing directory where" \ "lisp files should be installed."; \ else \ $(INSTALL) -c $(MH_E_SRC_NONCOMPILED) $(MH_E_OBJ) \ $(MH_E_AUTOGEN) $(INSTALL_LISP_DIR); \ for file in $(MH_E_XEMACS_OBJ); do \ if [ -f $$file ]; then \ $(INSTALL) -c $$file $(INSTALL_LISP_DIR); \ fi \ done; \ fi @if [ -z "$(INSTALL_IMG_DIR)" -o ! -d "$(INSTALL_IMG_DIR)" ]; then \ echo "Set INSTALL_IMG_DIR to an existing directory where" \ "images should be installed."; \ else \ $(INSTALL) -c $(MH_E_IMG) $(INSTALL_IMG_DIR); \ fi # Tag the MH-E files that are checked out. tag: @TAG=$(TAG) ./release-utils --tag # Create a distribution suitable for installing at SourceForge. dist: all @TAG=$(TAG) ./release-utils --dist $(MH_E_DIST) # The unit test that finds unused code runs much faster when compiled. clean:: rm -f mh-unit.elc mh-unit.elc: mh-unit.el $(COMPILE_COMMAND) -f batch-byte-compile $? mh-e-8.5/MH-E-NEWS0000644000175000000620000033723712114520723012573 0ustar wohlerstaff* COPYRIGHT Copyright (C) 2001-2013 Free Software Foundation, Inc. See the end of the file for license conditions. * Changes in MH-E 8.5 Version 8.5 fixes bugs when incorporating or forwarding mail. ** Bug Fixes in MH-E 8.5 *** mh-rmail doesn't switch to +inbox The function `mh-rmail' now switches to `+inbox' as expected (closes SF #271). *** Problem forwarding a messsage Forwarding messages resulted in the error: `(wrong-type-argument number-or-marker-p nil).' This has been fixed by setting the mail separator (closes SF #270). * Changes in MH-E 8.4 Version 8.4 postpones junk processing and merges in your components file when re-editing a draft. A few bugs were also fixed. ** New Features in MH-E 8.4 *** Postpone junk processing The `J w' (`mh-junk-whitelist') and `J b' (`mh-junk-blacklist') commands now mark the message. Like with other marks, this mark can be removed with `u' (`mh-undo') and processed with `x' (`mh-execute-commands'). Thanks to Ted Phelps (closes SF #2945712). ** New Variables in MH-E 8.4 *** mh-blacklist-msg-hook Hook run by `J b' (`mh-junk-blacklist') after marking each message for blacklisting. *** mh-whitelist-msg-hook Hook run by `J w' (`mh-junk-whitelist') after marking each message for whitelisting. *** mh-whitelist-preserves-sequences-flag Non-nil means that sequences are preserved when messages are whitelisted. ** New Faces in MH-E 8.4 *** mh-folder-blacklisted Blacklisted message face. *** mh-folder-whitelisted Whitelisted message face. ** Bug Fixes in MH-E 8.4 *** mh-edit-again should add Fcc More generally, `mh-edit-again' now merges the components file into the draft (closes SF #1708292). *** Loses changes when message column goes from 1 to 2 digits Call `mh-process-or-undo-commands' before running inc to insure we do not lose any pending changes (closes SF #2321115). *** mh-yank-cur-msg fails in emacs 23 Replace usage of `set-buffer' with `with-current-buffer' (closes SF #2830504). *** Folder pack action (Fp) missing in show mode Add missing key binding for `mh-show-pack-folder' (closes SF #3466086). * Changes in MH-E 8.3.1 This version of MH-E fixes typos in the documentation and is packaged with GNU Emacs 24.1 * Changes in MH-E 8.3 In 2010, the version control system (VCS) of Emacs was upgraded from CVS to Bazaar. In 2011, the MH-E team followed suit and upgraded the MH-E repository at SourceForge from CVS to Bazaar as well. The result is version 8.3 of MH-E, which includes needed changes to the build scripts. Otherwise, this is a small release that includes mostly internal changes from the Emacs team. One of these changes manifests itself in the user interface--you can now complete folders with abbreviations, meaning that `+f/b/b TAB' can complete to `+foo/bar/baz'. Also, RFC 2047-encoded Subject header fields in replies are now decoded. It also fixes compilation warnings in XEmacs 21.5.31, as well as an error when running XEmacs 21.5.31 in a terminal. Another implication of the VCS change is that users who download MH-E from SourceForge and explicitly load MH-E will have to be change their `load-path' to "/path/to/mh-e/emacs/trunk/lisp/mh-e" instead. Note the addition of "trunk." ** Bug Fixes in MH-E 8.3 *** Make mh-showing a legitimate minor mode The `mh-showing-mode' variable is now defined with `define-minor-mode' (closes SF #482666). *** Desktop fails to restore MH-Folder buffers When restoring MH folders from ".emacs.desktop", Emacs now opens them in the expected `mh-folder' mode instead of `dired-mode' (closes SF #1510145) *** *MH-E Log* buffer can point to removed directory This was caused by using `set-buffer' instead of `with-current-buffer.' This has been fixed thanks to Stefan Monnier (closes SF #1903293). * Changes in MH-E 8.2 Version 8.2 of MH-E appeared in GNU Emacs 23.1. This is a small release that includes internal changes from the Emacs team. A new hook, `mh-pack-folder-hook', has been added. There is a known bug where you can't attach attachments in Emacs 21. This will be fixed in 8.2.1. ** New Variables in MH-E 8.2 *** mh-pack-folder-hook The `mh-pack-folder-hook' is run by `F p' (`mh-pack-folder') after renumbering the messages. Hook functions can access the current folder name with `mh-current-folder'. ** Bug Fixes in MH-E 8.2 *** New version of mh-mm-save-part Several functions have been updated with code from Gnus 5.11 (closes SF #2235022). * Changes in MH-E 8.1 Version 8.1 fixes some issues with forwarding messages, respects the MH environment variable, adds the abilities to use aliases with GPG and show HTML even though it is discouraged. A new hook, `mh-annotate-msg-hook', has been added. ** New Features in MH-E 8.1 *** Showing HTML When Text Is the Preferred Alternative The `:' (`mh-show-preferred-alternative') function displays the message with the default preferred alternative. This is as if `mm-discouraged-alternatives' was set to nil (closes SF #1777321). ** New Variables in MH-E 8.1 *** mh-annotate-msg-hook The `mh-annotate-msg-hook' hook is run whenever a message is sent and after the scan lines and message are annotated. Hook functions can access the current folder name with `mh-current-folder' and obtain the message numbers of the annotated messages with `mh-annotate-list' (closes SF #2032269). ** Bug Fixes in MH-E 8.1 *** Can't Use Aliases with GPG GPG requires e-mail addresses, not aliases. So resolve aliases before passing addresses to GPG/PGP (closes SF #649226). *** mh-mml-forward-message: Disposition Should Be Inline The `f' (`mh-forward') function now forwards messages as inline attachments (closes SF #1378993). *** Illegal Filename Characters on Windows Filesystems The X-Image-URL cache created filenames with invalid characters on Windows. This has been fixed with assistance from Darel Henman (closes SF #1396499). *** Make Many Header Fields Invisible A vast landscape of header fields are now invisible. You may wish to browse `mh-invisible-header-fields-default' and clean up your `mh-invisible-header-fields' option. A permanent bug (SF #1916032) has been created where you can submit header fields that should be rendered invisible (closes SF #1701231). *** mh-forward Includes Messages in Reverse Order The `f' (`mh-forward') function now includes messages in ascending order (closes SF #1730393). *** Compile Fails on XEmacs 21.5 beta 28 This has been fixed with help from Henrique Martins (closes SF #1749774). *** Rename Variant mu-mh to gnu-mh The GNU mailutils MH variant was named inconsistently. The variant has been renamed to gnu-mh throughout. Thanks to Darel Henman (closes SF #1768928). *** Respect MH environment Variable Even if the MH environment variable was set, an error was generated if "~/.mh_profile" was missing. This has been fixed thanks to Xavier Maillard (closes SF #1946861). *** Enhance mh-mairix-regexp-builder Additional items have been added to the Mairix search string in order to support org-mode. Thanks to Nick Dokos (closes SF #1965704). *** mh-mh-to-mime and mh-mh-to-mime-undo Reset Modes The functions `mh-mh-to-mime' and `mh-mh-to-mime-undo' would reset the buffer to fundamental mode. This has been fixed thanks to Sergey Poznyakoff (closes SF #1966722). * Changes in MH-E 8.0.3 Version 8.0.3 fixes errors in sending messages and in running spam filter commands in certain circumstances. ** Bug Fixes in MH-E 8.0.3 *** mh-send-args Cannot Be nil If `mh-send-uses-spost-flag' was set, an error would prevent the sending of messages. This has been fixed (closes SF #1564742). *** Missing Quotes in sa-learn Command Line This has been fixed (closes SF #1565460). *** Errors Associated with mh-junk-background The Spamassassin filter commands were used inconsistently and incorrectly; if `mh-junk-background' were nil, not all of the updating would happen correctly. In the other back-ends such as bogofilter and SpamProbe, a value of t for `mh-junk-background' would cause the commands associated with these filters to fail. These problems have been fixed (closes SF #1594802). * Changes in MH-E 8.0.2 Version 8.0.2 fixes the tool bar and `F n' on XEmacs, and `K a' on GNU mailutils. ** Bug Fixes in MH-E 8.0.2 *** Tool Bar Not Displayed in XEmacs The MH-E tool bar didn't show up in XEmacs; now it does. Thanks to Ted Phelps (closes SF #1506846). *** mh-mime-save-parts Assumes -store Default It was assumed that -store was the default for both mhn and mhstore. This has been fixed by using -store except when using nmh. Thanks to Sergey Poznyakoff (closes SF #1513140). *** F-n Doesn't Work The fix for SF #1499712 broke `F n' (`mh-index-new-messages') on XEmacs since a regular expression that XEmacs could not handle was added. This regexp has been fixed (closes SF #1514424). * Changes in MH-E 8.0.1 Version 8.0.1 works around a couple of bugs in GNU mailutils, spost, and Windows. MH-E now requires the use of version 1.0 of mailutils due to a bug in the folder command. ** Bug Fixes in MH-E 8.0.1 *** Infinite Loop When Searching (mailutils) The GNU mailutils folder command displays output when a folder doesn't exist. MH-E didn't expect this and responded with an infinite loop during searches. While this bug has since been fixed in mailutils, MH-E has been modified to work anyway (closes SF #1499712). *** spost Doesn't Have -msgid or -mime Flags The post replacement spost does not support the -msgid or -mime flags. A new variable `mh-send-uses-spost-flag' was added to control the use of these flags (closes SF #1486726). *** <2> in Search Folders Illegal in Windows The <2> suffix to the search folder names contain illegal filename characters in Windows. These cause searches to fail on Windows. This has been fixed by changing the suffix to -2 (closes SF #1507002). * Changes in MH-E 8.0 Version 8.0 supports GNU mailutils, S/MIME, picons, which-func-mode, sports an improved interface for hiding header fields, improves upon the MH variant detection, improves folder completion, makes the pick search equivalent to the other types of searches, spruces up the tool bar, creates the correct MIME type when including OpenOffice documents, works on a Mac, adds colors to buttons for signed or encrypted messages, incorporates new features introduced in Emacs 22.1, fixes a bunch of bugs, and best of all, comes with an updated manual! Internally, MH-E now sports a new software organization which will help future maintainability. As a side-effect, the number of XEmacs compilation warnings has plummeted from hundreds to just three. CVS users will notice that MH-E has been migrated from the CVS repository from SourceForge to Savannah (but only for those files that were already part of Emacs). As a result, the location of MH-E in the load-path has changed, and mh-e-autoloads.el was renamed to mh-autoloads.el. See section INSTALL in the README for details. While this migration will benefit maintainers, it will also benefit users: CVS Emacs users will not have to check out MH-E separately and welcome faster MH-E updates, and CVS MH-E users will welcome faster MH-E updates from Emacs developers. Read section CVS MH-E INSTALL in the README for details. While not related to this release, the MH-E mailing lists are now gatewayed at gmane.org (closes SF #979308). If you want to see the release notes for the alpha and beta releases leading up this release, please see: http://cvs.savannah.gnu.org/viewvc/emacs/emacs/etc/MH-E-NEWS?revision=1.25&view=markup ** New Features in MH-E 8.0 *** GNU mailutils Support MH-E now supports GNU mailutils 0.4 and higher versions. *** S/MIME Support MH-E now supports S/MIME using Gnus 5.10.6 or higher. *** Picon Support In addition to the other methods of displaying an icon for the sender of a message, MH-E can now display images from a picon directory. The directory search path is found in the `mh-picon-directory-list' variable. More documentation is found in the "facedb" sections in the xfaces man page. *** Catchup Command There is a new `F c' (`mh-catchup') command that marks all unread messages in the current folder as read. *** Use which-func-mode to Display Folder in Index Mode Turning on `which-func-mode' displays the folder name of the message under the cursor in index folders (closes SF #855520). *** Quick Key Help The `?' (`mh-help') function now displays the help in its own buffer called *MH-E Help* (closes SF #493740 and SF #656631). *** Search Unification The old `F s' behavior of adding messages to the search sequence has been removed. The `F i' keybinding was deprecated and the new `F s' (`mh-search') command is used to initiate either indexed or pick searches. Within the MH-Search buffer (renamed from MH-Pick), the command `C-c C-p' (`mh-pick-do-search') now runs pick on the given folder recursively and displays the results in a search folder like the other search methods (closes SF #829207). *** Entry Points Have Moved Emacs 21 users must now add `(require 'mh-autoloads)' because the entry points (such as `mh-rmail' and `mh-smail') have moved to different files which have made the autoloads that come with Emacs inaccurate. This change was necessary because the code was reorganized to remove circular dependencies, to make the code more stable and maintainable, and to reduce the time to load MH-E. *** MH-Folder Keymap Changes There is now a keymap for the printing functions whose prefix is `P'. The command `l' (`mh-print-msg') has been replaced with `P l' although we suggest you use the new `P p' instead. Key 7.4.4 8.0 ; - mh-toggle-mh-decode-mime-flag l mh-print-msg - / f mh-narrow-to-from - / r mh-narrow-to-range - / g - mh-narrow-to-range / m - mh-narrow-to-from F c - mh-catchup F i mh-index-search - F s mh-search-folder mh-search K e - mh-display-with-external-viewer K t - mh-toggle-mime-buttons P ? - mh-prefix-help P C - mh-ps-print-toggle-color P F - mh-ps-print-toggle-faces P f - mh-ps-print-msg-file P l - mh-print-msg P p - mh-ps-print-msg *** MH-Letter Keymap Changes The change where `mh-letter-mode' derives from `mail-mode' adds a few keybindings. Some are interesting: experiment! Only the keybinding changes for MH-E functions are listed here. Most of the changes have to do with the renaming of the functions with "mhn" in them to "mh" because nmh doesn't use `mhn'. The names were also made consistent with the family of "mml" functions. The type of signing or encryption has been generalized so the method is now an option rather than a part of the function's name. The option is `mh-mml-method-default' and choices include PGP (MIME), PGP, S/MIME, or none. Key 7.4.4 8.0 C-c C-e mh-edit-mhn mh-mh-to-mime C-c RET C-e mh-mml-secure-message-encrypt-pgpmime mh-mml-secure-message-encrypt C-c RET C-g - mh-mh-compose-anon-ftp C-c RET C-n - mh-mml-unsecure-message C-c RET C-s mh-mml-secure-message-sign-pgpmime mh-mml-secure-message-sign C-c RET C-t - mh-mh-compose-external-compressed-tar C-c RET C-u mh-revert-mhn-edit mh-mh-to-mime-undo C-c RET C-x - mh-mh-compose-external-type C-c RET e mh-mml-secure-message-encrypt-pgpmime Prefix Command C-c RET e e - mh-mml-secure-message-encrypt C-c RET e s - mh-mml-secure-message-signencrypt C-c RET g - mh-mh-compose-anon-ftp C-c RET n - mh-mml-unsecure-message C-c RET s - Prefix Command C-c RET s e - mh-mml-secure-message-signencrypt C-c RET s s - mh-mml-secure-message-sign C-c RET t - mh-mh-compose-external-compressed-tar C-c RET u mh-revert-mhn-edit mh-mh-to-mime-undo C-c RET x - mh-mh-compose-external-type C-c C-f C-a - mh-to-field C-c C-f C-l - mh-to-field C-c C-f RET - mh-to-field C-c C-f a - mh-to-field C-c C-f l - mh-to-field C-c C-f m - mh-to-field *** MH-Search Keymap Changes These are the changes associated with the new search mode. The command `C-c C-c' (`mh-index-do-search') now performs the standard indexed search, while `C-c C-p' (`mh-pick-do-search') runs pick as before, only better! The `mh-to-field' keybindings were adjusted to be consistent with those in the MH-Letter mode. Key 7.4.4 8.0 C-c C-c mh-do-search mh-index-do-search C-c C-f C-d mh-to-field - C-c C-f C-f mh-to-field - C-c C-f C-r mh-to-field - C-c C-f RET - mh-to-field C-c C-f d mh-to-field - C-c C-f f mh-to-field - C-c C-f m - mh-to-field C-c C-f r mh-to-field - C-c TAB mh-index-do-search - *** Updates to X-Image-URL Now support the use of `curl' and `fetch' as alternatives to `wget' to obtain the image. The display of images are controlled with the `mh-show-use-xface-flag' option while the `mh-fetch-x-image-url' option controls how the images are fetched. The default of `mh-fetch-x-image-url' has been changed to "Never Fetch." Those of you who like the value of "Ask Before Fetching" will have to customize this option (closes SF #831278). WARNING: There are security concerns with this feature. Please read the documentation for these options carefully before changing the default. *** Updates to mh-identity-list Note that the field names found in `mh-identity-list' that refer to the fields in `mh-identity-handlers' have changed in an incompatible way from 7.4.4. In general, the symbolic names now have a ":" prefix to avoid collisions with header fields. Before starting Emacs, edit your .emacs and insert ":" before "signature" if you have defined it. You can change your attribution in replies with the new "Attribution Verb" field, and you can set your default GPG user ID with the "GPG key ID" field. Signatures can now be read from the `mh-signature-file-name' variable, or come from a function, in addition to a named file. If you write your own function, variables that you can use include `mh-signature-separator-regexp', `mh-signature-separator', and `mh-signature-separator-p'. The handling of these fields has been moved into a new `mh-identity-handlers' option, 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. For this reason, don't name a header field "Default". If you point your signature at a vCard file with a vcf suffix, then it will be incorporated as a vCard body part (closes SF #802723). *** Updates to Speedbar The speedbar now renders the folders with unseen messages in boldface which makes them easier to identify (closes SF #623369). *** Updates to mh-msg-is-in-seq Can now specify an alternate message number to `S s' (`mh-msg-is-in-seq') with a prefix argument. *** Updates to mh-to-field-choices In MH-Letter mode, you can use the `C-c C-f' (`mh-to-field') prefix to go to and insert fields. The fields `Reply-To:', `Mail-Reply-To:', `Mail-Followup-To:' can now be created via the `C-r', `C-a' (for author), and `C-l' keys respectively. The key for the `From:' field has been renamed from `C-r' to `C-m' for consistency with `mail-mode' (closes SF #1400139). *** Change Content-Type Renderer on the Fly in MH-Show Buffer This has been implemented by adding the key binding `K e' (`mh-display-with-external-viewer'). For inline text/html parts, buttons aren't displayed by default. In that case use `K t' (`mh-toggle-mime-buttons') to display the button before viewing it with an external browser (closes SF #839318). *** MH-E No Longer Calls install-mh The new variant detection code makes use of `mhparam' which assumes that your MH environment has already been set up. The code to call `install-mh', which could no longer be run anyway, was removed. *** Add :package-version Keyword to Options This `defcustom', `defgroup', and `defface' keyword was introduced in Emacs 22.1. MH-E has been extended to take advantage of it. With this keyword, you can now use `M-x customize-changed-options' to see what options in MH-E have changed between versions of Emacs. In a future version of Emacs, you'll be able to see changes between MH-E versions as well (closes SF #1452724). *** Render Signature and vCard in Italics This has been implemented. Use `mh-show-signature-face' to customize the face used (closes SF #802722). *** Derive mh-letter-mode from mail-mode MH-Letter mode is now derived from `mail-mode'. We were able to delete a lot of code. In return, there are a few `mail-mode' commands that are available that may or may not be useful and the `mail-mode-hook' is run (closes SF #1385571). *** Remove Emacs 20 Support As it turns out, we had already added some code that didn't work on Emacs 20. However, now we've formalized it and removed code that was present solely for Emacs 20 support (closes SF #1359240). *** Glimpse Support Removed Since glimpse isn't free, we cannot mention it. Glimpse has been removed from the option `mh-indexer-choices' (closes SF #831276). *** Use run-hook-with-args We use normal hooks whenever possible and do not use `run-hook-with-args' (with one documented exception) (closes SF #643702). ** New Variables in MH-E 8.0 *** mh-after-commands-processed-hook Hook run by `x' (`mh-execute-commands') after performing outstanding refile and delete requests. *** mh-alias-reloaded-hook Invoked by `mh-alias-reload' after reloading aliases. *** mh-auto-fields-prompt-flag On means to prompt before sending if fields in `mh-auto-fields-list' are inserted. *** mh-before-commands-processed-hook Renamed from `mh-folder-updated-hook'. It wasn't clear whether `mh-folder-updated-hook' was run before or after the commands were executed. We now provide both with clear names. *** mh-compose-forward-as-mime-flag On means that messages are forwarded as attachments (closes SF #827203). *** mh-default-folder-for-message-function Function to select a default folder for refiling or `Fcc:'. *** mh-forward-hook Invoked on the forwarded letter by `f' (`mh-forward'). *** mh-highlight-citation-style Renamed from `mh-highlight-citation-p' since it wasn't a boolean. The new name is also more descriptive. *** mh-identity-handlers Handler functions for fields in `mh-identity-list'. *** mh-insert-signature-hook Renamed from `mh-letter-insert-signature-hook' since most of the other hooks do not carry the mode in the prefix and because the new name is equally clear. *** mh-invisible-header-fields-default List of hidden header fields. The header fields listed in this option are hidden, although you can check off any field that you would like to see. Header fields that you would like to hide that aren't listed can be added to the `mh-invisible-header-fields' option (closes SF #752045). The option `mh-visible-header-fields' has been deleted. *** mh-junk-background If on, spam programs are run in background. This used to be the default behavior but this could overwhelm a system if many messages were black- or whitelisted at once. The spam programs are now run in the foreground, but this option can be used to put them back in the background. *** mh-junk-disposition Renamed from `mh-junk-mail-folder' since this variable can accept values other than folder names. *** mh-kill-folder-suppress-prompt-hooks Renamed from `mh-kill-folder-suppress-prompt-hook'. By convention, abnormal hooks, which this is, either have a -function or -hooks suffix. *** mh-mhl-format-file Renamed from `mhl-formfile' to put it in the MH-E namespace and to be consistent with other similar options. *** mh-mh-to-mime-hook Renamed from `mh-edit-mhn-hook'. We have a family of `mh-mml-to-mime' functions and variables; the older mhn functions and variables were renamed to have a consistent `mh-mh-to-mime' prefix. *** mh-mml-method-default Default method to use in security tags. *** mh-new-messages-folders Renamed from `mh-index-new-messages-folders' for clarity. *** mh-path Additional list of directories to search for MH. *** mh-redist-full-contents-flag On means the `dist' command needs entire letter for redistribution. This was previously a variable. It's now an option. *** mh-search-mode-hook Renamed from `mh-pick-mode-hook' as part of the `mh-index.el'/`mh-pick.el' merge into `mh-search.el'. *** mh-search-program Renamed from `mh-index-program' as part of the `mh-index.el'/`mh-pick.el' merge into `mh-search.el'. *** mh-signature-separator-flag On means a signature separator should be inserted. It is not recommended that you change this option since various mail user agents, including MH-E, use the separator to present the signature differently, and to suppress the signature when replying or yanking a letter into a draft. *** mh-sortm-args Additional arguments for `sortm'. This was previously an internal variable. It's now an user-customizable option. *** mh-speed-update-interval Renamed from `mh-speed-flists-interval' for clarity. *** mh-ticked-messages-folders Renamed from `mh-index-ticked-messages-folders' for clarity. *** mh-variant Specifies the variant used by MH-E. The default setting of this option is `Auto-detect' which means that MH-E will automatically choose the first of nmh, MH, or GNU mailutils that it finds in the directories listed in `mh-path', `mh-sys-path', and `exec-path'. If, for example, you have both nmh and mailutils installed and `mh-variant-in-use' was initialized to nmh but you want to use mailutils, then you can set this option to `mailutils'. When this variable is changed, MH-E resets `mh-progs', `mh-lib', `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use' accordingly. If you've set these variables in your .emacs, it is strongly suggested that you comment them out. The MH detection code has been completely rewritten and it is very likely that you no longer to set them and their setting may confuse other MH-E settings. *** mh-xemacs-tool-bar-position Renamed from `mh-xemacs-toolbar-position' per GNU Emacs naming conventions. *** mh-xemacs-use-tool-bar-flag Renamed from `mh-xemacs-use-toolbar-flag' per GNU Emacs naming conventions. *** mh-yank-behavior Renamed from `mh-yank-from-start-of-msg' for clarity. ** Variables Deleted in MH-E 8.0 *** mh-alias-system-aliases System definitions should not be a user option. *** mh-edit-mhn-hook Renamed to `mh-mh-to-mime-hook'. *** mh-folder-updated-hook Renamed to `mh-before-commands-processed-hook'. *** mh-highlight-citation-p Renamed to `mh-highlight-citation-style'. *** mh-index-new-messages-folders Renamed to `mh-new-messages-folders'. *** mh-index-program Renamed to `mh-search-program'. *** mh-index-ticked-messages-folders Renamed to `mh-ticked-messages-folders'. *** mh-junk-mail-folder Since this variable can accept values other than folder names, it was renamed to `mh-junk-disposition' to more accurately reflect the content. *** mh-kill-folder-suppress-prompt-hook Renamed to `mh-kill-folder-suppress-prompt-hooks'. *** mh-letter-insert-signature-hook Renamed to `mh-insert-signature-hook'. *** mh-pick-mode-hook Renamed to `mh-search-mode-hook'. *** mh-show-use-goto-addr-flag This flag was redundant with and inconsistent with `goto-address-highlight-p' at the same time, so we removed it. Please customize `goto-address-highlight-p' if you wish to turn off email address and URL highlighting. *** mh-speed-flists-interval Renamed to `mh-speed-update-interval'. *** mh-speed-run-flists-flag Deleted since setting `mh-speed-flists-interval' to 0 accomplishes the same thing. *** mh-visible-header-fields Deleted since it would hide new header fields you might want to see. *** mh-xemacs-toolbar-position Renamed to `mh-xemacs-tool-bar-position'. *** mh-xemacs-use-toolbar-flag Renamed to `mh-xemacs-use-tool-bar-flag'. *** mh-yank-from-start-of-msg Renamed to `mh-yank-behavior'. *** mhl-formfile Renamed to `mh-mhl-format-file'. ** New Faces in MH-E 8.0 *** mh-folder-address Renamed from `mh-folder-address-face' per new Emacs conventions. *** mh-folder-body Renamed from `mh-folder-body-face' per new Emacs conventions. *** mh-folder-cur-msg-number Renamed from `mh-folder-cur-msg-number-face' per new Emacs conventions. *** mh-folder-date Renamed from `mh-folder-date-face' per new Emacs conventions. *** mh-folder-deleted Renamed from `mh-folder-deleted-face' per new Emacs conventions. *** mh-folder-followup Renamed from `mh-folder-followup-face' per new Emacs conventions. *** mh-folder-msg-number Renamed from `mh-folder-msg-number-face' per new Emacs conventions. *** mh-folder-refiled Renamed from `mh-folder-refiled-face' per new Emacs conventions. *** mh-folder-sent-to-me-hint Fontification hint face in messages sent directly to us. *** mh-folder-sent-to-me-sender Sender face in messages sent directly to us. *** mh-folder-subject Renamed from `mh-folder-subject-face' per new Emacs conventions. *** mh-folder-tick Renamed from `mh-folder-tick-face' per new Emacs conventions. *** mh-folder-to Renamed from `mh-folder-to-face' per new Emacs conventions. *** mh-letter-header-field Renamed from `mh-letter-header-field-face' per new Emacs conventions. *** mh-search-folder Renamed from `mh-index-folder-face'. *** mh-show-cc Renamed from `mh-show-cc-face' per new Emacs conventions. *** mh-show-date Renamed from `mh-show--face' per new Emacs conventions. *** mh-show-from Renamed from `mh-show-from-face' per new Emacs conventions. *** mh-show-header Renamed from `mh-show-header-face' per new Emacs conventions. *** mh-show-pgg-bad Face used to highlight a bad PGG signature. *** mh-show-pgg-good Face used to highlight a good PGG signature. *** mh-show-pgg-unknown Face used to highlight a PGG signature whose status is unknown. This face is also used for a signature when the signer is untrusted. *** mh-show-signature Face used to highlight the signature. *** mh-show-subject Renamed from `mh-show-subject-face' per new Emacs conventions. *** mh-show-to Renamed from `mh-show-to-face' per new Emacs conventions. *** mh-show-xface Renamed from `mh-show-xface-face' per new Emacs conventions. *** mh-speedbar-folder Renamed from `mh-speedbar-folder-face' per new Emacs conventions. *** mh-speedbar-folder-with-unseen-messages Renamed from `mh-speedbar-folder-with-unseen-messages-face' per new Emacs conventions. *** mh-speedbar-selected-folder Renamed from `mh-speedbar-selected-folder-face' per new Emacs conventions. *** mh-speedbar-selected-folder-with-unseen-messages Renamed from `mh-speedbar-selected-folder-with-unseen-messages-face' per new Emacs conventions. ** Faces Deleted in MH-E 8.0 *** mh-folder-address-face Renamed to `mh-folder-address' per new Emacs conventions. *** mh-folder-body-face Renamed to `mh-folder-body' per new Emacs conventions. *** mh-folder-cur-msg-face Deleted. Not used. *** mh-folder-cur-msg-number-face Renamed to `mh-folder-cur-msg-number' per new Emacs conventions. *** mh-folder-date-face Renamed to `mh-folder-date' per new Emacs conventions. *** mh-folder-deleted-face Renamed to `mh-folder-deleted' per new Emacs conventions. *** mh-folder-followup-face Renamed to `mh-folder-followup' per new Emacs conventions. *** mh-folder-msg-number-face Renamed to `mh-folder-msg-number' per new Emacs conventions. *** mh-folder-refiled-face Renamed to `mh-folder-refiled' per new Emacs conventions. *** mh-folder-subject-face Renamed to `mh-folder-subject' per new Emacs conventions. *** mh-folder-tick-face Renamed to `mh-folder-tick' per new Emacs conventions. *** mh-folder-to-face Renamed to `mh-folder-to' per new Emacs conventions. *** mh-index-folder-face Renamed to `mh-search-folder'. *** mh-letter-header-field-face Renamed to `mh-letter-header-field' per new Emacs conventions. *** mh-show-cc-face Renamed to `mh-show-cc' per new Emacs conventions. *** mh-show-date-face Renamed to `mh-show-date' per new Emacs conventions. *** mh-show-from-face Renamed to `mh-show-from' per new Emacs conventions. *** mh-show-header-face Renamed to `mh-show-header' per new Emacs conventions. *** mh-show-subject-face Renamed to `mh-show-subject' per new Emacs conventions. *** mh-show-to-face Renamed to `mh-show-to' per new Emacs conventions. *** mh-show-xface-face Renamed to `mh-show-xface' per new Emacs conventions. *** mh-speedbar-folder-face Renamed to `mh-speedbar-folder' per new Emacs conventions. *** mh-speedbar-folder-with-unseen-messages-face Renamed to `mh-speedbar-folder-with-unseen-messages' per new Emacs conventions. *** mh-speedbar-selected-folder-face Renamed to `mh-speedbar-selected-folder' per new Emacs conventions. *** mh-speedbar-selected-folder-with-unseen-messages-face Renamed to `mh-speedbar-selected-folder-with-unseen-messages' per new Emacs conventions. ** Bug Fixes in MH-E 8.0 *** Face Variable Names Now Follow Current Conventions The -face suffix has been dropped from all face names. *** Swish Fixes Items in swish indexes that aren't mail messages are now handled more gracefully. *** Spamassassin Fixes If you use spamassassin, there was an error when you tried to junk mail if the option `mh-junk-background' was set. This has been fixed. *** Mairix Support Indexing now compatible with Mairix version 0.12 and later. *** mh-extract-rejected-mail Can't Do MIME (and Other Formats) Now handles qmail and exim bounces (addresses SF #404965). *** mh-rmail Hangs in XEmacs We've determined that MH-E is incompatible with some versions of XEmacs (21.5.9-21.5.16). More recent versions work fine. If you think our list is too broad, please let us know which version of XEmacs you are using (closes SF #644321). *** Completions Offered by mh-refile-message Are Not Sorted This behavior is no longer observed (closes SF #698734). *** Add Message-ID to Outgoing Messages If you replied to a message in your `+outbox', an `In-Reply-To:' header field was created that broke threading at the recipient's end. We now add a `Message-ID:' to outgoing messages which fixes this (closes SF #725425). *** Inconsistent Prompts Emacs changed their defaults in prompts from "Prompt: [value]" to "Prompt (default value): ". All MH-E prompts have been updated to comply with the new standard and are therefore now consistent throughout the application (closes SF #730470, SF #1275933). *** Empty Shell Comments Confuse mh-mhn-directive-present-p If you had a string that matched the regexp "^# $" in your draft, it would cause an error. This has been fixed (closes SF #762458). *** Quote Hashes When mhbuild Directives Used A related bug, if you had empty shell comments but inserted your own directives, you'd get another error from mhbuild. This has been fixed by quoting the hash ("^# $") like this "##" before submitting to mhbuild (closes SF #762464). *** Inconsistent Usage in Scan Formatting Variables The variables: mh-note-cur mh-note-deleted mh-note-dist mh-note-forw mh-note-refiled mh-note-repl mh-note-seq used to contain strings. Although only the first character was read, the entire string would be inserted which may have caused problems. These variables have been converted to character constants so that only a single character can be inserted into the scan line (closes SF #770772). *** Bad Handling of Aliases That Conflict With Local User Names If a user name existed both locally and in the aliases file, the local user would be flashed, but the alias would be used when sending. This has been fixed so that the user name that is flashed is the same as the name that is sent (closes SF #772595). *** Initialization Fails If ~/Mail Exists MH-E no longer calls `install-mh' so this issue has gone away (closes SF #835192). *** Not Re-prompted to Sign After Pass Phrase Typo If there were errors when sending a signed message (like getting the pass phrase wrong), the MML markup remained in the draft buffer. The draft buffer is now restored if there is an error (closes SF #839303). *** Font-lock Gets Confused in MH-Letter Buffer If a user manually moved the cursor to the end of the header field separator line (by mouse click or keyboard navigation) and hit Enter to start typing their message, any line in the body with a colon would be fontified with a gray background. This has been fixed (closes SF #855479). *** RETURN Causes Infinite Loop in mh-letter This behavior is no longer observed (closes SF #887346). *** mh-refile-msg Fails to Suggest Folder for Empty Message If you received a message with an empty body from someone who is listed in your aliases file, `o' (`mh-refile-msg') failed to suggest the correct folder. This has been fixed (closes SF #917096). *** Missing Headers When Replying to All User needed to edit `replgroupcomps' (closes SF #918194). *** Error Visiting Folder With no Unseen Messages If you visited a folder without unseen messages and the option "flist: -noshowzero" is present in your `~/.mh_profile', you'd get an error. This has been fixed (closes SF #933954). *** Error Message When Trying to Send Using MH-E This behavior is no longer observed (closes SF #1002103). *** mh-find-path Doesn't Use mhparam MH-E no longer peeks into the MH profile `~/.mh_profile' directly. It uses `mhparam' instead (closes SF #1016027). *** rmmproc Refile Complains No Such Message MH-E would get confused about which folder to delete messages from if you were refiling and deleting messages at the same time. This has been fixed (closes SF #1023959). *** auto-mode-alist Updated MH-E originally updated auto-mode-alist to set the major mode of drafts. Now that we explicitly set the mode, there is no reason to do this, and this behavior caused problems for people who didn't use MH-E who were editing files that looked like MH message files (closes SF #1032353). *** ! Doesn't Do Regions Now it does (closes SF #1046330). *** mh-show-unquote-From Fails (read-only buffer) MH-E quotes the `From ' header field that is inserted by MTAs. However, it was trying to do this in a read-only buffer. This has been fixed (closes SF #1089870). *** Whitespace in pick Expressions The `C-u / s RET' command now works. In addition, you can now add whitespace to any of the limiting (/) commands (closes SF #1122655). *** mh-index-previous-folder Does Not Work Correctly If your cursor was on an item below a folder heading and you used `M-TAB' (`mh-index-previous-folder'), you would move to the previous folder heading. This has been fixed (closes SF #1126188). *** Default Identity Prevents Insertion of Auto Fields Auto insertion of an identity now occurs even when the default identity is used (closes SF #1204506). *** mh-compose-forward and Default Message Number `mh-compose-forward' will now default to the sent message in the sent folder and the `cur' message in other folders. It also takes ranges of messages and can include multiple messages at a time (closes SF #1205890). *** Better Handling of Empty cur Sequence If you refiled a message into a folder and then used `F r' (`mh-rescan-folder') in that folder, your cursor would be taken to the first message. The cursor now stays where it was (closes SF #1207247). *** mh-customize Uses Group mh, Not mh-e The `mh' customization group alias has been deleted to avoid some problems that were found (closes SF #1213716). *** "Args out of range" Error in Displaying Message This behavior is no longer observed (closes SF #1227504). *** Front-and-back Truncation in mailto: Rendering This behavior is no longer observed (closes SF #1227510). *** Name of the Draft File in mh-comp.el MH is documented to use the draft file. If you use a draft file for something else (like Sylpheed), then use draft folders (closes SF #1231483). *** font-lock Error in mh-letter-mode An error in MH-E was introduced as a result of a change in CVS Emacs. This has been fixed (closes SF #1241017). *** Msg Display Broken After Displaying Msg with Inline Image Messages with inline images no longer trim certain message header fields (closes SF #1306141). *** mh-visit-folder Munges font-lock-keywords MH-E broke highlighting in Gnus buffers. This was actually a problem in CVS Emacs 22 and has been fixed there (closes SF #1393879). *** Illegal Filename Chars for W32 Filesystems Windows users who view `X-Image-URL:' images could not cache the images since the cached image file names had illegal characters. This has been fixed (closes SF #1396499). *** mh-send Doesn't Handle mml Insertions Via mail-user-agent Can now forward messages in Gnus if MH-E is your `mail-user-agent' (closes SF #1399307). *** Can't Narrow to Subject with Regexp Chars The command `/ s' could not limit subjects that had special pick characters (such as [, *, $, .). This has been fixed (closes SF #1432548). *** `/ s' Can Miss the Original Mail The command `/ s' failed to include the message with the "Re:" in the Subject. This has been fixed (closes SF #1438369). *** mhparam -components Fails on mailutils This error prevented MH-E from loading when using GNU mailutils. GNU mailutils drops the `s' in this argument, so we did too since -component still works in nmh and MH (closes SF #1446985). *** `/ s' Still Has Problems With []'d Mail On XEmacs, subjects that had special characters would prevent `/ s' from narrowing to the given subject. These characters are now quoted correctly in XEmacs (closes SF #1447598). *** Variable mh-send-args Is a String, Not a List This was causing errors when sending under GNU mailutils. The internal variable `mh-send-args' is now a list which fixes the problem (closes SF #1448604). *** Update Icons Most of the tool bar icons have been replaced by GTK or GNOME 2 icons (closes SF #1452715). *** Strip Build Number From emacs-version in X-Mailer This has been done (closes SF #1466481). *** Rename Function and Variable Definers If you had ever shown help for an MH-E symbol that was both a function or variable, you might have found that the hyperlink to the file brought you to the wrong definition. This has been fixed by renaming the macros `mh-defgroup', `mh-defcustom', `mh-defface', `mh-defun-compat', and `mh-defmacro-compat' to `defgroup-mh', `defcustom-mh', `defface-mh', `defun-mh', `defmacro-mh' respectively (closes SF #1472029). *** mh-insert-letter Uses Wrong Default If you had used `C-c TAB' (`mh-insert-letter') to insert a letter into your draft, specified a different folder, and chose the default message number, you got the wrong message. This has been fixed (closes SF #1473729). * Changes in MH-E 7.4.4 Version 7.4.4 addresses programmatic issues from the FSF and prepares MH-E for inclusion into an impending GNU Emacs release (22.1). There are no user-visible changes (unless you are using XEmacs on DOS or don't have the cl package installed). Filenames are now unique in their first 8 characters (DOS 8.3 requirement). The runtime dependency on the cl package has been removed. Desktop saving and restoration code moved here from desktop.el. * Changes in MH-E 7.4.3 Version 7.4.3 fixes the problem where `mh-identity-list' was not getting set from .emacs. * Changes in MH-E 7.4.2 Version 7.4.2 fixes the accidental dependence on nmh (closes SF #791021). * Changes in MH-E 7.4.1 Version 7.4.1 fixes the Makefile so it no longer tries to compile mh-unit.el. * Changes in MH-E 7.4 Version 7.4 contains many new useful features including arbitrary MH range handling, new draft features such as draft form editing, as well as sequence propagation and manipulation. We've also fixed bugs and added a handful of new variables. ** New Features in MH-E 7.4 *** Add Arbitrary Ranges to MH-E UI MH-E now handles any legal MH range (such as last:5 or 4 8 10-12) wherever you're prompted for a message number or sequence (closes SF #728638). *** Remove Prompting in mh-send Brian Reid's original mhe didn't do prompting anywhere but used forms instead. While we won't go that far, we eliminated prompting where a form is already involved, such as in composing a message. The new customization variable `mh-compose-prompt-flag' can be set to t to get the original behavior (closes SF #745622). *** Use TAB to Switch Fields in Header When composing a message, TAB and SHIFT-TAB can be used to move quickly between header fields. The new customization variable, `mh-compose-skipped-header-fields', contains a list of header fields that are skipped and truncated if they are too long (closes SF #745627). *** Alias Completion in Composition Buffer Aliases can be completed in the draft with "M-TAB (mh-letter-complete)". Or, if the customization variable `mh-compose-space-does-completion-flag' is set to t, then a "SPC (mh-letter-complete-or-space)" with do the same thing. If `mh-alias-flash-on-comma' is non-nil, ", (mh-letter-confirm-address)" will show the alias expansion in the minibuffer (closes SF #745634). *** Auto Fields Should be Inserted During Send Fields that were inserted by the multiple personality code when the draft was sent now insert the header fields when the draft is composed to give you a chance to edit them (closes SF #747890). *** mh-index-tick-messages The command "F ' (mh-index-ticked-messages)" creates a buffer with all messages ticked with "' (mh-toggle-tick)" in the folders listed in the new customization variable `mh-index-ticked-messages-folders'. Chances are that if you set `mh-index-new-messages-folders', you'll want to set `mh-index-ticked-messages-folders' accordingly. In addition, a general function, "F q (mh-index-sequenced-messages)" has been provided that displays messages in the `mh-unseen-seq' in the folders listed `mh-index-new-messages-folders', unless a prefix argument is given, in which case you can provide both a list of folders and a sequence (closes SF #718833). *** Narrow to Region If there is a region, "/ r (mh-narrow-to-range)" will only consider those messages in the region. In addition, there is now a stack of folder limits which can be popped with "/ w (mh-widen)". With a prefix arg, all the restrictions are popped off of the stack (closes SF #732823). *** Narrow to Ticked Sequence The buffer can now be narrowed to ticked messages with "S ' (mh-narrow-to-tick)" (closes SF #732825). *** Display Multiple Buttons for multipart/alternative A new customizable variable, `mh-display-buttons-for-alternatives-flag', was added to display buttons for the alternatives. The default value is nil to retain the current behavior (closes SF #741288). *** Identity Menu Changes A menu item has been added that inserts custom fields if the To or Cc header fields match `mh-auto-fields-list'. ** New Variables in MH-E 7.4 *** mh-alias-local-users-prefix This string is prepended to the real names of users from the passwd file. If nil, use the username string unmodified instead of the real name from the gecos field of the passwd file. *** mh-alias-passwd-gecos-comma-separator-flag Non-nil means the gecos field in the passwd file uses comma as a separator. Used to construct aliases for users in the passwd file." *** mh-interpret-number-as-range-flag Non-nil means interpret a number as a range. If the variable is non-nil, and you use an integer, N, when asked for a range to scan, then MH-E uses the range "last:N". *** mh-kill-folder-suppress-prompt-hook This new hook is invoked at the beginning of the `F k (mh-kill-folder)' command. It is a list of functions to be called, with no arguments, which should return a value of non-nil if you should not be asked if you're sure that you want to remove the folder. This is useful for folders that are easily regenerated. The default value of `mh-index-p' suppresses the prompt on folders generated by an index search. WARNING: Use this hook with care. If there is a bug in your hook which returns t on +inbox and you hit `F k' by accident in the +inbox buffer, you will not be happy. *** mh-refile-preserves-sequences-flag Non-nil means that sequences are preserved when messages are refiled. If this variable is non-nil and a message belonging to a sequence other than cur or Previous-Sequence (see mh-profile 5) is refiled then it is put in the same sequence in the destination folder. Additional sequences that should not to be preserved can be specified by setting `mh-unpropagated-sequences' appropriately. *** mh-visible-header-fields Customize this instead of `mh-visible-headers', which is now a defvar. This was done to mimic the relationship between `mh-invisible-header-fields' and `mh-invisible-fields'. ** Variables Deleted in MH-E 7.4 *** mh-visible-headers See the paragraph for `mh-visible-header-fields' above. ** Bug Fixes in MH-E 7.4 *** Aliases Constantly Reloaded The system aliases are not loaded as often as they were, so the completion speed has been dramatically improved if your passwd file is large (closes SF #693859). *** Folders in MH-Index View Not Saved When you perform a search to produce an MH-Index buffer, the folders that contain the messages are shown. If the MH-Index buffer was deleted, or Emacs was restarted and the corresponding folder rescanned, the folder information would be lost. This has been fixed by saving the information in a file called ".mhe_index" (closes SF #701762). *** Ticking Messages in +mhe-index/new If a new message in a buffer created by "F n" was ticked (with "'"), the message would not be added to the tick sequence in the source folder. This has been fixed so that any sequence changes in any index folder (from within MH-E of course) are now reflected back to the corresponding source folder (closes SF #709664). *** Custom Vars Set by a Function The default setting of customization variable `mh-summary-height' is now `nil' which means MH-E will change the size dynamically according to the size of the frame (closes SF #723267). *** Folder Completion Slow The first folder completion was very slow. This has been fixed (closes SF #730426). *** Tick Sequence Persistent When Refiled Sequences are now preserved when messages are refiled (closes SF #737128). *** Auto-inserted Header Fields Inconsistent For consistency, all automatically inserted header fields (such as X-Mailer and X-Face) are added when the draft is first presented to you. This also gives you a chance to edit or delete them if necessary (closes SF #745624). Note that we would be distressed if you deleted the X-Mailer field. *** Toolbar Spec Error The following message appeared when displaying a message in XEmacs: Signaling: (error "Toolbar spec must be list or nil" ) This has been fixed (closes SF #745655). *** mh-index-search Doesn't Find Short Acronyms Swish typically ignores words with fewer than four letters, but will still look for acronyms. Unfortunately, MH-E was downcasing the input words which defeated this feature. This has been fixed (closes SF #755718). * Changes in MH-E 7.3 This release includes the new features of an index view of unseen messages in all folders, spam software support, relative folder specification @ support, marking messages, recipient handling by mh-default-folder-list, Face and X-Image-URL header field support, and Fcc completion. Function arguments have been unified. Bugs have been fixed. ** New Features in MH-E 7.3 *** Unified Function Arguments Any function with MSG-OR-SEQ in its docstring uses the displayed message by default for this argument. However, if a prefix argument is provided, then the user is prompted for a message sequence. If the variable `transient-mark-mode' is non-nil and the mark is active, then the function operates on the messages in the selected region. In a program, MSG-OR-SEQ can be a message number, a list of message numbers, a region in a cons cell, or a sequence. *** MH-Index View of Unseen Messages Use "F n (mh-index-new-messages)" or Folder -> View New Messages menu item to display messages in the `mh-unseen-seq' sequence in folders specified by `mh-index-new-messages-folders'. With a prefix argument, enter a space-separated list of folders, or nothing to search all folders. Like other MH-Index folders, use "v (mh-index-visit-folder)" if you wish to visit the original folder with the unseen message. This is usually not necessary since the original message is annotated if you reply, deleted if you delete the message, or refiled if you refile the message (closes SF #701756). *** Spam Software Support MH-E now supports several spam filters including Bogofilter, SpamProbe, and SpamAssassin. Spam that is mistakenly considered to be good mail can be reclassified as spam with "J b (mh-junk-blacklist)". Conversely, good mail that is accidentally considered to be spam can be reclassified with "J w (mh-junk-whitelist)" (closes SF #669518). If a message is blacklisted, and `mh-junk-mail-folder' is a string, then the message is refiled to that folder. If this variable is nil, the message is deleted. If a message is whitelisted, then the message is refiled to `mh-inbox'. To change the spam program being used, customize `mh-junk-program'. This should only be necessary if you have multiple filters on your system and MH-E picked the wrong one. These customization variables are found in the new customization group `mh-junk'. The documentation for the following functions describes what setup is needed for the different spam fighting programs: - `mh-bogofilter-blacklist' - `mh-spamprobe-blacklist' - `mh-spamassassin-blacklist' *** Relative Folder Specification @ Supported You can now use the relative folder marker @ in folder names (closes SF #666774). *** Marking Messages Messages can now be highlighted with "' (mh-toggle-tick)", Sequence -> Toggle Tick Mark menu item or the "Toggle tick mark" button. These messages are added to the "tick" sequence, although this sequence can be changed in `mh-tick-seq'. The highlighting effect can be modified by customizing `mh-folder-tick-face' (closes SF #623367). There is also a new keybinding "/ ' (mh-narrow-to-tick)" and menu item Sequence -> Narrow to Tick Sequence to narrow the view to the highlighted messages. *** mh-default-folder-list Now Takes Recipients If you wish to file a message based upon the recipient of a message (such as a mailing list), you can now indicate that when filling out the address in the `mh-default-folder-list' customization variable. *** Face Header Field Supported In addition to the X-Face header field, the Face header field, which can display color images, is now supported. As a bonus, the external xface-e21 library is no longer required. *** X-Image-URL Support Images specified in X-Image-URL header fields are now supported. See the customization variable `mh-fetch-x-image-url' to enable this support. *** Fcc Completion Folders in Fcc fields in message drafts can now be completed with M-TAB. ** New Variables in MH-E 7.3 Variables that have been added to MH-E that have not been discussed elsewhere are listed here. *** mh-auto-fields-list Alist of addresses for which header lines are automatically inserted. When a regular expression matches in the To or cc fields of a message, the corresponding header field is automatically inserted in the message header. It also allows the automatic setting of an identity (using `mh-insert-identity') to set an alternate identity when sending messages to a certain person or mailing list. Since this is a more general use of `mh-insert-mail-followup-to-flag' and `mh-insert-mail-followup-to-list', these variables have been removed. *** mh-show-xface-face Face for displaying the X-Face image. *** mh-xemacs-toolbar-position This customization variable allows the user to place the toolbar on the four edges of the frame. *** mh-xemacs-use-toolbar-flag This customization variable is used to enable or disable the toolbar under XEmacs. ** Variables Deleted in MH-E 7.3 Variables that have been removed from MH-E that have not been discussed elsewhere are listed here. *** mh-decode-content-transfer-encoded-message-flag No longer needed since the external program mimencode is no longer used. *** mh-index-show-hook This hook was never used, so it was removed. *** mh-tool-bar-reply-3-buttons-flag Obsolete. This functionality is present `mh-tool-bar-folder-buttons'. ** Bug Fixes in MH-E 7.3 *** Can't Refile Message Messages with invalid addresses were causing errors in ali which prevented the refiling of messages. The ali error is now shown in the "*MH-E Log*" buffer and refiling suggests the last folder used (closes SF #680388). *** Empty Body Triggers Duped Header If the body was empty the header would be treated like the body and was therefore displayed twice. This has been fixed (closes SF #681162). *** mml or mhl Directives Not Always Processed The mml and mhl directives used to create body parts were not processed if one re-edited a draft, or if they added the directives manually. The directives are now always processed upon sending the letter. You may still, of course, use "C-c C-m m (mh-mml-to-mime)" or "C-c C-e (mh-edit-mhn)" to manually create the MIME body parts from the directives and then send the draft. *** mh-alias-grab-from-field Fails MH-E was adding aliases with angle brackets around the address when there wasn't a phrase (usually, the user's name), to go with it. This caused ali to fail which caused problems in MH-E. This is probably a bug in ali, but MH-E no longer inserts angle brackets around the address unless there is a phrase, which avoids the problem (closes SF #690216). *** XEmacs Fixes MH-E is now fully supported under XEmacs and compiles without any warnings. In particular, the following now work under XEmacs: - X-Face, Face, and X-Image-URL header fields - MH-E logo in mode line - Emphasis (bold, italics, etc.) - Smilies - Toolbar *** Indexed Folders Should Respect mh-show-threads-flag Indexed folders are now threaded if `mh-show-threads-flag' is non-nil (closes SF #709667). *** Threading Index View Loses Folder Info This has been fixed (closes SF #709672). *** No Undo Information When Re-editing Drafts Undo is turned on in the draft buffer when using "e (mh-edit-again)" (closes SF #712777). *** Forwarded base64-encoded Messages Are Incorrectly Displayed This has been fixed (closes SF #681518). *** Append to *MH-E Log* Buffer The last 100 lines of log messages are kept in the *MH-E Log* buffer. Previously, the buffer was erased every time it was written (closes SF #685476). In addition, many of the MH-E commands now send their output into this buffer instead of a plethora of other special-purpose buffers. *** mh-inc-folder Complains if No Mail and No Current Message The function `mh-inc-folder' no longer calls `mh-show' if point is not on a valid scan line. This keeps `mh-inc-folder' from complaining (closes SF #678115). *** Folder Normalization Strips Leading Slash Leading "/" characters in folder names entered by the user were being lost. This has been fixed (closes SF #676890). *** Print Header Doesn't Show Message When printing a sequence, the header simply indicated that a sequence, but not which one, was being printed and did not show the message number. This has been fixed. If more than one message is printed, a page of the scan lines is printed and its header indicates the sequence or message range. The pages with the actual messages all set the header to the folder and message displayed on that page. *** Aliases Constantly Reloaded Empty lists are now handled properly (closes SF #693859). *** Remove RCS Keywords Removed RCS keywords per Emacs conventions (closes SF #680731). *** Replace Mimencode MH-E was enhanced to decode message based on charset and Content-Transfer-Encoding. This eliminates the need for the external program mimencode (closes SF #674857). * Changes in MH-E 7.2 This release includes the new features of filing hints, hierarchical file name completion, indexed search and pick integration, unification between `mh-visit-folder' and the speedbar, a displayed message indicator, buffer name organization, support for mairix indexed search, and last but not least, the MH-E logo has been added to the mode line. Code that handles sequences and message regions runs faster. Bugs have been fixed. ** New Features in MH-E 7.2 *** Filing Hints When you file a message, MH-E now looks for an alias corresponding to the address of the sender and offers that as a default folder (closes SF #657096). The new variable `mh-default-folder-prefix' can be used to put these folders in a sub-folder. The new variable `mh-default-folder-must-exist-flag' means to suppress the suggested folder (thereby providing the previous folder used) if the folder doesn't already exist. The new variable `mh-default-folder-list' can be used to map additional addresses and folders. *** Hierarchical File Name Completion When you completed filenames in the past, you were presented with a list of all your folders at all depths in the tree. Now you are presented with only one level at a time (closes SF #664821). As a result, the variables `mh-auto-folder-collect-flag' and `mh-folder-list-change-hook' are obsolete. *** Indexed Search and Pick Integration The indexed and pick searches have been integrated (closes SF #664816). Both "F s (mh-search-folder)" and "F i (mh-index-search)" use the pick template for forming queries. To submit the query, use "C-c C-c (mh-do-search)" which will use the query method you selected. If you change your mind while forming the query, you can use "C-c C-i (mh-index-do-search)" or "C-c C-p (mh-pick-do-search)" to submit the query using the respective method. Second, the results from a pick search are now saved in a sub-folder of +mhe-index like an indexed search. Third, `pick' is now a valid choice for `mh-index-program'. *** mh-visit-folder Metamorphosis Continues When visiting a folder from the speedbar, only the unseen messages are shown if there are unseen messages. If there aren't any unseen messages, all of the messages are shown if there are fewer than `mh-large-folder' messages; otherwise, the user is prompted for the range of messages to display. The "F v (mh-visit-folder)" command has been modified to mimic this behavior. Use a prefix arg to force the message range prompt. *** Displayed Message Indicator In graphical Emacs, the message that is shown is marked by a triangle in the fringe. In textual Emacs, there is a ">" in the first column (closes SF #664824). *** Buffer Name Organization All ephemeral buffer names start with " *mh" while all interesting buffers start with "*MH-E ". The "*Folders*", "*Sequences*", and "*Recipients*" buffers were therefore renamed to "*MH-E Folders*", "*MH-E Sequences*" and "*MH-E Recipients*" respectively (programmers should see mh-utils.el for the names of the new constants). Also, the output of MH commands is saved in the "*MH-E Log*" buffer. *** mh-index-program Add choices for `mairix' and `pick'. *** Logo Displayed on Mode Line ** New Variables in MH-E 7.2 The new variables have been discussed elsewhere. ** Bug Fixes in MH-E 7.2 *** mh-decode-content-transfer-encoded-message Messages that had been encoded with base64 were not decoded. This has been fixed with this new function (closes SF #674190). As a result, the variable `mh-decode-quoted-printable-flag' has been renamed to `mh-decode-content-transfer-encoded-message-flag'. *** mh-kill-folder Now restores previous window configuration (closes SF #664828). *** mh-mime-display MH-E was not using the charset defined in the content-type header. This meant that mail in a different charset would not be properly displayed. This has been fixed (closes SF #655123). *** mh-read-address In XEmacs and Emacs20, this function would always prompt using "To: " instead of using the command argument. This has been fixed (closes SF #670913). *** mh-rmail Unseen messages are now shown in addition to new ones (closes SF #667542). *** mh-scan-msg-overflow-regexp Change the variable so that a space is always maintained in the beginning of the scan line. *** mh-swish-execute-search The example configuration file in the docstring didn't show the backslash in the FileRules filename. If the example had been used literally by the user, no files would be indexed! This has been fixed (closes SF #665888). *** mh-thread-refile The "T o (mh-thread-refile)" command did not provide refiling hints like `mh-refile-msg'. This has been fixed (closes SF #664829). *** mh-toggle-threads If the threaded view was modified and then toggled, the standard view may not have been accurate (as it contained a potentially old first message to last message range). This has been fixed (closes SF #626117). *** mh-tool-bar-show-set, mh-tool-bar-letter-set, mh-tool-bar-folder-set Clicking the customize and help buttons now deletes the other windows in the frame. *** mh-version The "M-x mh-version" command displayed "Aliasfile: aliases". This has been fixed (closes SF #664467). See Buffer Name Organization above. * Changes in MH-E 7.1 This release includes the new features of multiple identities and alias completion. In addition, indexed searching has been revamped. Various other features have been added and a few bugs were fixed. ** New Features in MH-E 7.1 *** Multiple Identities MH-E now supports multiple identities (closes SF #628782). That means that you can have different From and Organization header fields (or any other header field of your choice) as well as different signatures depending on your context. Usually, the contexts are home and work. Add your identities to the variable `mh-identity-list' and set the default identity with the variable `mh-identity-default'. Your identity can be switched on the fly by using the Identity menu or by calling "M-x mh-insert-identity RET". This functionality can be customized within the mh-identity group. *** Alias Completion and Harvesting The contributed file mh-alias.el has been rewritten and incorporated into MH-E. By default, aliases are culled from the system files "/etc/nmh/MailAliases," "/usr/lib/mh/MailAliases," and "/etc/passwd" (see `mh-alias-system-aliases') and from your "AliasFile" MH profile component. These aliases are then used for completion in the minibuffer when entering addresses. Within the header of the message draft, "M-TAB (mh-letter-complete)" is used to do alias completion. The package also provides for alias creation based upon the From header field of the current message. Use the lasso button (mh-alias-grab-from-field). This functionality can be customized within the mh-alias group. *** Index Folder Updates The results of an index search "F i (mh-index-search)" are now stored in a bona fide folder so that you can refile messages and reply to messages directly from the result folder. This folder is a sub-folder of +mhe-index and the name is based upon the search string (closes SF #623321). If a prefix argument is given then the search in the current index buffer is redone. The index folder lists the names of the source folders as before. However, instead of using RET on the name of the folder to visit the folder, use "v (mh-show-index-visit-folder)" anywhere within the results to visit that folder narrowed to the results of the search. Additional functions have been added to navigate including "TAB (mh-index-next-folder)", and "SHIFT-TAB (mh-index-previous-folder)." *** mh-visit-folder Interface Updated A change was made to the prompting of the message range. In general, you can use the same format for messages and sequences as you can in MH with a single exception: a single number means to scan that many messages, rather than scan that message number. This turns out to be much more useful than visiting a single message and is consistent with Gnus and the MH-E speedbar (closes SF #655891). If mh-visit-folder is called non-interactively and RANGE is nil then all messages are displayed. This behavior is now documented and provides backwards compatibility. *** Threading Improvements After incorporating new mail into a threaded folder, unseen messages can be spread about. Two new functions have been added to make it easier to find them: these are "M-n (mh-next-unread-msg)" and "M-p (mh-previous-unread-msg)" (closes SF #630328) Two new functions were added to delete and refile threads. They are "T d (mh-thread-delete)" and "T o (mh-thread-refile)" respectively (closes SF #630493). In addition, the key "k" used to be bound to the function `mh-delete-subject': it is now bound to `mh-show-delete-subject-or-thread'. New functions to navigate threads include "T u (mh-thread-ancestor)", which can jump to the root message of the current thread given an optional argument, "T n (mh-thread-next-sibling)", and "T p (mh-thread-previous-sibling)" *** Refiling of Messages in Region If mark is active and `transient-mark-mode' is enabled then all the messages in the region are refiled. *** vCard Handling If a signature cannot be identified, but there is a vCard attachment, then that vCard will be presented as a signature (closes SF #649216). *** New Info Added to mh-version Information about Gnus versions available at both compile time and run time has been added. ** New Variables in MH-E 7.1 The defcustom groups were reorganized. Rather than iterate the specific changes here, you are invited to browse the groups with "M-x mh-customize RET". *** mh-alias-completion-ignore-case-flag Non-nil means don't consider case significant in MH alias completion. This is the default in plain MH, so it is the default here as well. It can be useful to set this to t if, for example, you use lowercase aliases for people and uppercase for mailing lists. *** mh-alias-expand-aliases-flag Non-nil means to expand aliases entered in the minibuffer. In other words, aliases entered in the minibuffer will be expanded to the full address in the message draft. By default, this expansion is not performed. *** mh-alias-flash-on-comma Specify whether to flash the translation of the alias or warn if there isn't a translation of the alias. *** mh-alias-insert-file Filename to use to store new MH-E aliases. This variable can also be a list of filenames, in which case MH-E will prompt for one of them. If nil, the default, then MH-E will use the first file found in the "AliasFile" component of the MH profile. *** mh-alias-insertion-location Specifies where new aliases are entered in alias files. Options are sorted alphabetically (the default), at the top of the file or at the bottom. *** mh-alias-local-users If t, local users are completed in MH-E To: and Cc: prompts. If you set this variable to a string, it will be executed to generate a password file. A value of "ypcat passwd" is helpful if NIS is in use. *** mh-alias-system-aliases A list of system files from which to cull aliases. If these files are modified, they are automatically reread. This list need include only system aliases and the passwd file, since personal alias files listed in your "AliasFile" MH profile component are automatically included. *** mh-identity-default Default identity to use when `mh-letter-mode' is called. *** mh-identity-list List holding MH-E identity. *** mh-invisible-header-fields Simple user interface to change `mh-invisible-headers'. *** mh-letter-complete-function Function to call when completing outside of fields specific to aliases. By default, it is bound to 'ispell-complete-word. *** mh-show-threads-flag Non-nil means new folders start in threaded mode. Threading large number of messages can be time consuming. So if the flag is non-nil then threading will be done only if the number of messages being threaded is less than `mh-large-folder' (closes SF #646794). *** mh-tool-bar-folder-buttons Buttons to include in MH-E folder/show toolbar. *** mh-tool-bar-letter-buttons Buttons to include in MH-E letter toolbar. ** Bug Fixes in MH-E 7.1 *** mh-get-new-mail Call new function `mh-add-cur-notation' to undo the work of `mh-remove-cur-notation' if there was no new mail (closes SF #647681). *** mh-set-cmd-note No longer updates the default `mh-cmd-note' value. This resulted in the misplacement of the current mark when the message number width changed (closes SF #643701). * Changes in MH-E 7.0 This is a major release which includes a lot of new features including improved MIME handling, speedbar folder browsing, and indexed searching. In this version, MH-E runs under XEmacs, passes checkdoc, and compiles clean under all supported platforms. The "passes checkdoc" feature above required changing the name of several user-visible variables. It is likely that this affects you. Please be sure to see the table at the end of these notes and rename your variables accordingly. MH-E has been written mh-e, Mh-e, MH-e and MH-E. We have decided that the proper term should be MH-E. Please try to use MH-E in your writing. ** New Features in MH-E 7.0 *** Speedbar There is now support for the speedbar. Try "M-x speedbar" (closes SF #503727). Press the middle mouse button on the `+' icons to open a folder, middle mouse button on a folder name to open the folder. Folders with unseen messages are shown in bold, so this is a handy way to browse new messages that you have filed with procmail or slocal. See the new customization variable `mh-large-folder,' which controls when the speedbar asks for how many messages to scan when opening a large folder and `mh-speed-run-flists-flag' whose default value of t means to use the flists command to populate the count of unseen and total messages in each folder. *** Indexed Search Interoperability with swish++, swish, glimpse, and namazu has been added to enable lightening-fast searches of your mail. If none of these are present, grep is used. Try "F i (mh-index-search)". For more information, read the documentation for the functions `mh-swish++-execute-search,' `mh-swish-execute-search,' `mh-namazu-execute-search,' or `mh-glimpse-execute-search' depending on your preferred indexing program to see what kind of setup is needed to generate the index. *** Threading Use "T t (mh-toggle-threads)" to view the threads in the folder. Use it again to return to a non-threaded view. *** Brief Help Use "? (mh-help)" and "X ? (mh-prefix-help)," where X is a prefix character, for a brief synopsis in the minibuffer of frequently used commands. In the MH-Letter or MH-Pick buffers, use "C-c ? (mh-help)" (closes SF #493740). *** Folder Keymap Shared by Show Buffer You can now use the MH-Folder mode commands from the MH-Show buffer. Because of this, the MH-Show buffer is now read-only (closes SF #493749 and SF #527946) and you now have to use "M (mh-modify)" to edit a message. *** Better Scanning You no longer have to modify your scan format if your folders have more than 9999 messages in them. If you've only modified your scan format file to allow for the wider message numbers, consider using the default behavior of MH-E and simplify your MH-E configuration considerably (closes SF #635791). To do this, you may have to remove your modifications of `mh-scan.*-regexp' and `mh-cmd-note' and your customization of `mh-scan-format-file'. You may still want the updated format files for running MH commands outside of MH-E; the default of `mh-scan-format-file' will cause them to be ignored. If you prefer fixed-width message numbers, set the new customization variable to nil , set this variable to nil and call `mh-set-cmd-note' with the width specified by the scan format in `mh-scan-format-file'. For example, the default width is 4, so you would use "(mh-set-cmd-note 4)" if `mh-scan-format-file' were nil. *** X-Face MH-E now displays the content of the X-Face header field in the From field. When sending a message, an X-Face field is appended to the header if it doesn't already exist and "~/.face" is present. See the new customization variables `mh-show-use-xface-flag' and `mh-x-face-file' (closes SF #480770). MH-E depends on the external x-face package found in ftp://ftp.jpl.org/pub/elisp/ to do this. The `uncompface' binary is also required to be in the execute PATH. It can be obtained from: http://freshmeat.net/redir/compface/1439/url_tgz/compface-1.4.tar.gz. It has also been observed that if you don't see the faces, you might have to do this (for unknown reasons): mv /usr/local/include/compface.h /usr/include/ *** Graphical Smileys Smiley's are now converted to cute little images. See the new customization variable `mh-graphical-smileys-flag.' *** Text Emphasis ASCII formatting is now converted to the appropriate font. For example, _underline_ is underlined, *bold* appears in bold, /italic/ appears in italic, etc. See `gnus-emphasis-alist' for the whole list. See the new customization variables `mh-decode-mime' and `mh-graphical-emphasis-flag.' *** Attachment Handling Inline attachments are now displayed. Regular attachments appear as buttons in show buffer. Use "K TAB (mh-next-button)" or "K SHIFT-TAB (mh-prev-button)" to cycle through these buttons. Use "K v (mh-folder-toggle-mime-part)" to view, "K o (mh-folder-save-mime-part)" to save one part or "K-a (mh-save-mime-parts)" to save all parts, or "K i (mh-folder-inline-mime-part)" to view the attachment inline. See the new customization variable `mh-decode-mime' for additional information. Other customization variables that affect this new feature include `mh-store-mime-parts-default-directory' and `mh-display-buttons-for-inline-parts-flag'. HTML documents can be viewed inline if Gnus v5.10 and w3 or w3m lisp packages are present. Set the customization variable `mm-text-html-renderer' accordingly (closes SF #453352). *** Quoted-printable Handling Quoted-printable body parts are now decoded. *** More Choices for `mh-yank-from-start-of-msg' Historically, if this variable was t, the entire message, with full headers would be included and every line would begin with `mh-ins-buf-prefix.' This usage is deprecated in favor of the setting `supercite' below. The default has been changed to `attribution.' The following symbols are now understood: `body': yank the message minus the header. `supercite': include the entire message, with full headers. This also causes the invocation of `sc-cite-original' without the setting of `mail-citation-hook', now deprecated practice. `autosupercite': do as for `supercite' automatically when show buffer matches the message being replied-to. `attribution': yank the message minus the header and add a simple attribution line at the top. `autoattrib': do as for `attribution' automatically when show buffer matches the message being replied-to. There is a new customization variable called `mh-extract-from-attribution-verb' which is used for attribution which provides a method for setting a different language. *** Use Gnus mml Instead of mhn When inserting attachments into a message draft, Gnus mml directives are now used instead of mhn directives. One beneficial side-effect of this is that attachments can now appear inline as well as separate. The new customization variable `mh-compose-insertion' controls whether Gnus or mhn is used to insert MIME message directives in messages (default: 'gnus, if the mml library exists). *** Content-Type Now Obtained Automatically The value of the Content-Type no longer needs to be entered by the user. *** Attachments Automatically Included Upon Send You no longer have to run "C-c C-e (mh-edit-mhn)" before sending a message with attachments--this is done automatically when you send the message with "C-c C-c (mh-send-letter)". There is, however, a new key binding "C-c C-m m (mh-mml-to-mime)" which is analogous to "C-c C-e (mh-edit-mhn)". *** GPG Handling Messages that have been signed or encrypted with GPG are verified and decrypted automatically. To sign or encrypt a message, use "C-c RET C-s (mh-mml-secure-message-sign-pgpmime)" and "C-c C-m C-e (mh-mml-secure-message-encrypt-pgpmime)." You need Gnus version 5.10 for this feature. These functions are provided by the pgg.el package. Users report "flashing" with the pgg.el package and prefer the gpg.el package instead. To use gpg.el instead of the pgg.el package you need: (setq mml2015-use 'gpg) To mimic automatic encryption in gpg.el, use: (setq mm-verify-option 'always) (setq mm-decrypt-option 'always) The venerable mailcrypt package is also an option. However, now that show buffers are read-only, mailcrypt version 3.5.6 and older fail when they attempt to decrypt the contents. *** Mail-Followup-To Header Field Support for this controversial field has been added because nmh supports it (closes SF #627035). If you want to add it to outgoing mail for selected mailing lists, add those mailing lists to the new customization variable `mh-insert-mail-followup-to-list.' If you think this field is evil, set the new customization variable `mh-insert-mail-followup-to-flag' to nil. *** Gnus Issues If you update Gnus, you must recompile MH-E. Note that if you are running the stock version of MH-E that comes with Emacs or the MH-E package on a Debian GNU/Linux, this is done for you. ** New Variables in MH-E 7.0 New customization variables not mentioned earlier include: *** mh-letter-insert-signature-hook Invoked at the beginning of the "C-c C-s (mh-insert-signature)" command. Can be used to determine which signature file to use based on message content. On return, if `mh-signature-file-name' is non-nil that file will be inserted at the current point in the buffer. *** mh-show-maximum-size Maximum size of message (in bytes) to display automatically. Provides an opportunity to skip over large messages which may be slow to load. Use a value of 0 to display all messages automatically regardless of size (closes SF #488696). *** mh-tool-bar-reply-3-buttons-flag Non-nil means use three buttons for reply commands in tool-bar. If you have room on your tool-bar because you are using a large font, you may set this variable to expand the single reply button into three buttons that won't lead to minibuffer prompt about who to reply to. ** Bug Fixes in MH-E 7.0 *** mh-delete-msg, mh-refile-msg, mh-undo Mandrake Linux includes XEmacs initialization code that binds `transient-mark-mode' which causes problems in MH-E. These problems have been fixed (closes SF #541915). *** mh-edit-again This would sometimes yield a read-only buffer. This has been fixed (closes SF #624283 and SF #625538). *** mh-forward When using nmh, always specify -mime so as to preserve the original message(s). *** mh-inc-folder If you had narrowed to a sequence and then incorporated new mail, those new messages would not be present in your +inbox when you widened. This has been fixed (closes SF #489430, SF #489437, SF #629233). *** mh-insert-letter No longer uses mhl to include a message as this mangled the header and gave supercite fits (closes SF #629153). *** mh-letter-mode "M-q (fill-paragraph)" now fills quoted paragraphs (for example, starting with "> ") correctly (closes SF #489927). *** mh-next-undeleted-msg, mh-previous-undeleted-msg If there are no more undeleted messages the point remains at its original position and a message is produced (closes SF #494304). *** mh-pick-mode Now calls `mh-pick-mode-hook' as documented. *** mh-put-msg-in-seq Now puts all messages in region in sequence (closes SF #630324). *** mh-refile-msg, mh-write-msg-to-file These functions stomped on the variables that held the name of the last file and folder respectively for the other function. This has been fixed so that the last folder or file name is preserved (closes SF #580772). *** mh-region-to-sequence If the region in MH-Folder was set with "C-x h (mark-whole-buffer)", you couldn't perform operations on all of the messages as you would expect. This has been fixed (closes SF #621632). *** mh-reply Performing an undo the first thing after replying would blank out the entire draft. Now just the insertion of the yanked message is undone leaving the header and signature intact for additional editing (closes SF #623693). *** mh-show-mode Now calls `mh-show-mode-hook' as documented (closes SF #627222). *** mh-subject-thread-to-sequence Make 'subject sequence a real one, exported to MH. This means you can, for example, mh-forward it. But it also shows up with a mark in the scan output (closes SF #489445). *** Other Bug Fixes The following bugs have also been closed: SF #495450: Folder buffer read-only after inc SF #489706: mh-page-msg bombs out SF #580772: mh-last-destination is overloaded *** Variables renamed to conform with Emacs coding conventions The coding conventions require that boolean variables end in -flag. The following two tables show which variables were affected (closes SF #627015). Customization Variables (defcustom) Old Name New Name mh-auto-folder-collect mh-auto-folder-collect-flag mh-bury-show-buffer mh-bury-show-buffer-flag mh-clean-message-header mh-clean-message-header-flag mh-decode-quoted-printable mh-decode-quoted-printable-flag mh-delete-yanked-msg-window mh-delete-yanked-msg-window-flag mh-do-not-confirm mh-do-not-confirm-flag mh-highlight-citation-p mh-highlight-citation mh-insert-x-mailer-p mh-insert-x-mailer-flag mh-print-background mh-print-background-flag mh-recenter-summary-p mh-recenter-summary-flag mh-recursive-folders mh-recursive-folders-flag mh-reply-show-message-p mh-reply-show-message-flag mh-show-use-goto-addr mh-show-use-goto-addr-flag mh-update-sequences-after-mh-show mh-update-sequences-after-mh-show-flag Regular Variables (defvar) Old Name New Name mh-mhn-compose-insert-p mh-mhn-compose-insert-flag mh-nmh-p mh-nmh-flag mh-page-to-next-msg-p mh-page-to-next-msg-flag * Changes in mh-e 6.1 This is a minor release which includes a few bug fixes. The distribution now includes the ChangeLog. ** New Features in mh-e 6.1 *** Fontification Unseen messages now displayed in bold. *** Viewing folders and sequences The folder and sequence listings that "F l (mh-list-folders)" and "S l (mh-list-sequences)" create are now displayed in view mode. ** Bug Fixes in mh-e 6.1 *** mh-folder-unseen-seq-name Byte compilation failed when initializing this variable when the user's MH environment was not set up. This has been fixed (closes Debian #140232 and Debian #140817). *** mh-forward When forwarding a sequence, the mode of the draft would not be set to MH-Letter correctly. This has been fixed (closes SF #489448). *** mh-insert-prefix-string Fixed to work under XEmacs. Thanks to Will Partain . *** mh-quit mh-quit now cleans up the buffers named `mh-temp-buffer,' 'mh-temp-folders-buffer' and 'mh-temp-sequences-buffer.' * Changes in mh-e 6.0 mh-e is now maintained at SourceForge (see http://mh-e.sourceforge.net/). This is where you need to go to obtain new versions of mh-e, report bugs and receive support. The maintainers have moved much of their personal configurations into the codebase, so you may find that you may be able to reduce your mh-e customizations as well. There are several incompatibilities in this version from older versions. Please read the following notes carefully for details. Pay particular attention to the key binding changes in the MH-Folder section. If you have customized your scan format, you will want to read about the new variable `mh-scan-format-file'. The manual could not be updated in time for this release. It will be updated in the near future. If the Preface in your manual indicates the older version (version 1.3, for mh-e version 5.0.2), please check the following page occasionally for an update: https://sourceforge.net/project/showfiles.php?group_id=13357 ** New Features in mh-e 6.0 *** Customization mh-e now uses the customize feature of Emacs. Use "M-x customize-group mh RET" to customize mh-e. *** Menus All mh-e modes now provide menus that contain most mh-e functions. *** Toolbars All mh-e modes now have toolbar buttons for oft-used functions (Emacs 21). *** Fontification All mh-e buffers now have font-lock keywords. To use, either call (turn-on-font-lock) from the appropriate hook, or set `global-font-lock-mode' to t. To customize, use "M-x customize-apropos-faces ^mh RET". If you have customized your scan lines, you will have to update your scan regexps. The existing regexps were changed to extract a match so you will have to add appropriate grouping constructs to take advantage of the fontification. Your old settings will continue to work, but the folder will not be fontified. For example: (setq mh-good-msg-regexp "^\\(.....\\)[^D^]") You will most likely have to update the new variable `mh-scan-subject-regexp' as well. There is another new variable `mh-scan-date-regexp' which you may also find useful. Run "M-x apropos mh.*regexp" for a complete list. *** mail-user-agent support You can now set `mail-user-agent' to `mh-e-user-agent' so that packages that need to send mail will use mh-e (closes SF #406883, SF #470024). *** replgroupcomps support If you reply to `cc' or `all' and you use nmh, the nmh repl option -group will be used. This means that the file `replgroupcomps' will be used. If you have customized `replcomps', you will definitely want to either copy `$NMH_LIB/replgroupcomps' to your mail directory and modify it the same way that you modified your `replcomps' file, or simply copy your `replcomps' file to `replgroupcomps'. *** MH-Folder mode The variable `mh-summary-height' used to have a default of 4. It now varies from 4 to 10 depending on the height of the frame. Clicking the mouse on a message shows that message. Delete, refile and undo now operate on a region (but only if `transient-mark-mode' is non-nil). SPC (mh-page-msg) now displays the message if it is not already visible. If the bottom of a message is showing, SPC (mh-page-msg) moves to the next message (respecting the direction you are moving through the folder). The threading commands "T u (mh-next-unseen-subject-thread)", "T t (mh-toggle-subject-thread)", "T s (mh-narrow-to-subject-thread)", and "T k (mh-delete-subject-thread)" have been added. These functions do not offer threading in the true sense of the word, but do allow some manipulation by subject. Major, major keymap changes. This was done to free up movement commands in the buffer, and to provide for additional features, such as the threading commands. At the same time, better and more consistent mnemonics were realized that should make it easier to remember key bindings. Added new sub-keymaps for folder commands, sequence commands, extraction commands, and digest commands which begin with F, S, X, and D, respectively. These sub-keymaps allowed some consistency (e.g., especially with l(ist) and k(ill)). Here are the actual changes and rationale: Old New Rationale e - Deleted. Already have x. Now used by mh-edit-again. j - Deleted. Already have g. M-a e Better mnemonic. Matches rmail. Frees movement command. M-e E Better mnemonic. Consistent with e. - S Why not? mh-sort-folder. M-f Fv Frees movement command M-f Ff Alias (keep?) M-f Fo Alias (keep?) M-k Fk No reason but to keep with folder commands M-l Fl No reason but to keep with folder commands M-p Fp No reason but to keep with folder commands M-r Fr Frees movement command M-s Fs No reason but to keep with folder commands M-u Fu No reason but to keep with folder commands M-% Sd Better mnemonic M-# Sk Better mnemonic M-q Sl Better mnemonic C-xn Sn Frees up standard key binding % Sp Better mnemonic for putting a message in a sequence ? Ss Shows sequences that message is in C-xw Sw Frees up standard key binding M-n Xs Better mnemonic (extract shar) M-n Xu Better mnemonic (extract uuencode) M-SPC D SPC Frees mark command M-\177 D \177 No reason but to keep with digest commands M-b Db Frees movement command As the number of variables increases, it is becoming important to organize the mh-e namespace. Several variables having to do with the format of scan lines were renamed, as follows: Old New mh-good-msg-regexp mh-scan-good-msg-regexp mh-deleted-msg-regexp mh-scan-deleted-msg-regexp mh-refiled-msg-regexp mh-scan-refiled-msg-regexp mh-valid-scan-line mh-scan-valid-regexp mh-cur-scan-msg-regexp mh-scan-cur-msg-number-regexp - mh-scan-cur-msg-regexp - mh-scan-rcpt-regexp - mh-scan-format-regexp mh-msg-number-regexp mh-scan-msg-number-regexp mh-msg-search-regexp mh-scan-msg-search-regexp *** MH-Show mode While the MIME support is not complete, quoted-printable body parts are now decoded. Some MTAs quote From at the beginning of the line with a ">". The ">" is now removed in the display, but not on disk. *** MH-Letter mode New function "C-c C-o (mh-split-line)" splits lines in a draft preserving the fill prefix and indentation. This is useful when responding to several sentences in a single paragraph separately. "M-q (fill-paragraph)" can now be used on the message that is being replied to. The fill prefix such as "> " is preserved. You no longer have to run "C-c C-e (mh-edit-mhn)" manually as this is now done automatically when the message is sent. The X-Mailer header field is now added to messages as they are sent. "C-c C-m C-i (mh-mhn-compose-insertion)" now makes a pretty good guess at the type of file using the `file' command and no longer asks the user for the media type. If the necessary version of `file' is not available, the user is asked for the media type as before; however, the list of media types is now taken from the system mailcap if available. Failing that, the built-in list of types has been supplemented so in most cases the type you need should be present (closes SF #406883, #441179). ** New Variables in mh-e 6.0 New variables not mentioned earlier include: *** mh-insert-x-mailer-p Default value of t means that an X-Mailer header field should be added. *** mh-reply-show-message-p 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 "~/.mh_profile." *** mh-scan-format-file Specifies the format file to pass to the scan program. If t, the format string will be taken from the either `mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or nmh is in use. If nil, the default scan output will be used. If you customize the scan format, you may need to modify a few variables containing regexps that mh-e uses to identify specific portions of the output. Use `M-x apropos RET mh-scan.*regexp' to obtain a list of these variables. *** mh-scan-format-mh Scan format string for MH, provided to the scan program via the -format arg. This format is identical to the default except that additional hints for fontification have been added to the sixth column. *** mh-scan-format-nmh Scan format string for nmh, provided to the scan program via the -format arg. This format is identical to the default except that additional hints for fontification have been added to the sixth column. *** mh-show-use-goto-addr Non-nil means URLs and e-mail addresses are highlighted using goto-addr in MH-Show buffer. *** mh-letter-fill-column Fill column to use in `mh-letter-mode'. This is useful to make the lines a bit shorter to allow for quoting in replies. *** mh-folder-updated-hook Invoked when the actions in a folder (such as moves and deletes) are performed. Variables that are useful in this hook include `mh-delete-list' and `mh-refile-list' which can be used to see which changes are being made to current folder, `mh-current-folder'. *** mh-unseen-updated-hook Invoked after the unseen sequence has been updated. The variable `mh-seen-list' can be used to obtain the list of messages which will be removed from the unseen sequence ** Bug Fixes in mh-e 6.0 *** mh-edit-again and mh-extract-rejected-mail Now insert a header separator (--------) which packages such as mailcrypt expect. *** mh-find-progs Now uses `mhparam' to set `mh-lib-progs' and `mh-lib'. Added more directories to `mh-progs' so that mh-e can autoconfigure in more environments. Chances are that you no longer have to set these variables, and if you do, you will only have to set `mh-progs'. Unless, of course, you are using an ancient version of MH that doesn't have `mhparam'. *** mh-folder-mode-map The DEL// change in Emacs 21 broke `mh-previous-page'. This has been fixed (closes SF #228907). *** mh-forward If you had "forw: -mime" to your .mh_profile, forwarding a message resulted in: Search failed: "^------- Forwarded Message" In addition, the Subject field was not filled in. This has been fixed (closes SF #223603). *** mh-kill-folder The user is now always prompted before this action; the variable `mh-do-not-confirm' is no longer consulted here. Therefore users who wanted to set `mh-do-not-confirm' but didn't because of the `mh-kill-folder' dependency may now do so. *** mh-make-folder-mode-line Properly deals with folders that do not have any lines in them. Prints "no msgs" instead of "0 msgs". Does not try to print a range when there are no messages. *** mh-mhn-compose-insertion Now gets the MIME type automatically (assuming the local file command supports the -i and -b options). If this use of the file command is not supported, the list of MIME types has been expanded to use the system's mailcap file. *** mh-nmh-p This variable (t when nmh is in use rather than MH) assumed that the string "nmh" is in `mh-lib-progs' or `mh-lib'. This has been fixed (closes SF #441776). *** mh-refile-msg No longer lets you specify an empty folder (closes SF #476824). *** mh-regenerate-headers Now suppresses "scan: bad message list" messages. *** mh-print-msg This function was looking for `mhl' in the wrong place on nmh on Redhat LINUX 7.0. This has been fixed (closes SF #481128). *** mh-show Now updates `cur' sequence after a message is shown (closes SF #481772). *** mh-showing Renamed variable and function to `mh-showing-mode' to conform with minor mode conventions. Added optional arg to function so it would behave like a normal minor mode: no or nil arg toggles mode, 0 arg turns off, non-nil turns on. This fixed the error that occurred when `desktop-create-buffer' recreated mh-e buffers because it was calling `mh-showing' with an arg. *** mh-version Fixed for nmh. Now displays mh-e version correctly. Cleaned up output and display `mh-progs', etc. *** mh-widen Now attempts to stay on the same message number (closes SF #480922). No longer wipes out pending deletes and refiles without warning (closes SF #481036). * Changes in mh-e 5.0.2 This version contains additional minor changes to integrate it with reporter.el (requires reporter.el version 3.1c or later) and Emacs 19.30. The mh-goto-msg function is much faster, which also speeds up several other operations. * Changes in mh-e 5.0.1 This version contains minor changes from mh-e 5.0 to integrate it with Emacs 19.29. * User-visible changes to mh-e 5.0 Note: This being a major release, there are many internal changes. This document lists only changes to the external interfaces of mh-e. When upgrading, you must either explicitly reload the new versions of all mh-e files that are already loaded or restart your Emacs. ** Major Changes and New Features in mh-e 5.0 The emphasis for this release has been on consistency and documentation. Many documentation strings were enhanced. Documentation strings were changed to comments for internal functions and variables. *** There is now proper documentation in the form of a 75-page users manual. The Texinfo source is mh-e.texi; the formatted Info document is mh-e.info. *** There is a new command `mh-update-sequences', which updates MH's idea of what messages are in the Unseen sequence and what is the current folder and message. `mh-quit' calls it. While `mh-execute-commands' has always done this updating as a side effect, the new function is faster. *** The MH profile entry "Inbox:" is supported. *** If the show-buffer is modified, the user is queried before mh-e reuses the buffer to show a different message. This buffer is also auto-saved and backed up correctly. *** `mh-store-buffer' is significantly more robust. It now handles messages created by a wide variety of packaging software. The status message for `uudecode' includes the name of the file created. An error is signaled if the subprocess exits with a non-zero status. *** `mh-search-folder' behaves predictably, adding messages found to the `search' sequence. It correctly handles the case of no messages found. *** `mh-burst-digest' (`M-b') now only rescans the part of the folder affected by the burst. It is now much faster in a large folder. ** New Hooks and Customization Variables in mh-e 5.0 *** `mh-default-folder-for-message-function': new name for the old `mh-msg-folder-hook', which wasn't a hook. The old name was confusing, leading people to think they could use `add-hook' with it, when actually `setq' is the correct way. *** `mh-sortm-args': When this variable is used has changed. Now `mh-sortm-args' is passed if there IS a prefix argument to `mh-sort-folder'. The assumption is that for arguments you normally want, you would specify them in an MH profile entry. *** `mh-mhn-args': new hook, a list of additional arguments to pass to the `mhn' program if `mh-edit-mhn' is given a prefix argument. *** `mh-edit-mhn-hook': new hook called by `mh-edit-mhn', the function that formats MIME messages. *** `mh-folder-list-change-hook': new hook, called whenever the cached list of folders, `mh-folder-list', is changed. *** `mh-find-path-hook': new hook, called when entering mh-e. *** `mh-repl-formfile': new variable, used to change the format file used by `mh-reply' from the default of "replcomps". *** New variables to customize the scan format and notating: `mh-note-deleted', `mh-note-refiled', `mh-note-seq', `mh-note-cur', `mh-note-copied', `mh-note-printed'. ** Key Binding Changes in mh-e 5.0 *** `RET' runs `mh-show' for consistency with the Finder and Info. The old binding `.' still works, but `RET' is now the standard binding. *** `M-<' now runs `mh-first-msg' for consistency with `M->', which runs `mh-last-msg'. *** `C-c C-f C-d' in MH-Letter mode moves to a Dcc: header field. *** `C-c C-f C-r' in MH-Letter mode moves to a From: header field. *** `g' is now the standard binding for `mh-goto-msg'. The old binding `j' still works. ** Other Improvements and Changes to mh-e 5.0 *** `mh-lpr-command-format' no longer passes the "-p" argument to `lpr' by default. The mail header typically has the date anyway. *** When prompting for a sequence name, if no sequences have been used yet, mh-e will offer the first sequence the current message is in. *** The patterns of more mailers are recognized by `mh-extract-rejected-mail'. *** `mh-insert-prefix-string' no longer wraps the call to the `mail-citation-hook' function in a `save-excursion' so the hook writer can choose whether to leave point at the beginning or the end of the yanked text. *** `mh-write-msg-to-file': The prompt now refers to "message" or "message body" depending on which will be written. (This is controlled by a prefix argument.) The file defaults to the last-used file instead of supplying only the directory name. *** mh-e uses message ranges when running MH commands. Thus "rmm 1 2 3 4 6" is now "rmm 1-4 6". This change makes it less likely to overflow system argument list limits, and it might be faster, too. ** Bug Fixes to mh-e 5.0 *** mh-e's idea of the unseen sequence now stays in sync with MH's better. *** Functions that are supposed to find fields in the message header no longer look in the message body. *** mh-e would sometimes fail to remove the "%" from a scan line when the message was removed from a sequence if the message was also in the Previous sequence. *** The variable `mh-inc-prog' is now correctly used in all places. *** `mh-pipe-msg' runs the process in the correct directory. *** A partially scanned folder will no longer lose the "/select" annotation when you execute marked deletes and refiles with `x'. * Changes to mh-e 4.0 This file is automatically generated from news-mh-e.txinfo. Do not edit. [MH-E-ONEWS has been incorporated here and removed. news-mh-e.txinfo is no longer available.] Note: there are many internal changes to mh-e in this release. If you have the previous version loaded into your Emacs, you will probably not be able to load this version on top of it. ** New Features in mh-e 4.0 *** Background folder collection. The first time you are prompted for a folder, you must wait while mh-e collects the names of all existing folders. Now however, if you abort, collecting will continue in the background, and you can do something else in Emacs until the collection completes. Normally, mh-e will begin collecting folders names in the background when you first load it; you can disable this feature by setting `mh-auto-folder-collect' to nil. *** There is support for composing MIME messages using the `mhn' program from MH 6.8. See the documentation string for mh-edit-mhn. (While composing a letter, type `C-h k C-c C-e'.) See also mhn(1). There is as yet no support for reading MIME messages. *** `mh-show', typically on `.', repositions to the start of the message if the message is already visible. It used to do nothing in this case. *** The function `mh-unshar-msg' is renamed `mh-store-msg'. It now does uudecoding, too. Someday it should do MIME. It remembers the last directory you used and offers it as the default for next time. *** New function `mh-header-display', on `,', displays the message with all headers, including those normally not displayed. Type `.' to display the message normally again. *** New function `mh-list-sequences' lists the sequences in use in the current folder. *** New function `mh-version' displays version information about MH and mh-e. Please use the output in bug reports. *** `mh-quit' now burys the folder buffer and show buffer. ** New hooks and customization variables in mh-e 4.0 *** `mh-pick-mode-hook': new hook called by new mode `mh-pick-mode'. The pick buffer didn't used to have its own mode. Another advantage of `mh-pick-mode' is that `C-h m' works in the pick buffer. *** `mail-citation-hook': new variable for supercite. *** `mh-refile-msg-hook': new hook called by `mh-refile-msg' (and `mh-refile-or-write-again' when refiling). *** `mh-msg-folder-hook': new hook used by `mh-refile-msg' and `mh-to-fcc' to provide a default folder for user prompt. *** `mh-show-hook': new hook called by `mh-show'. *** `mh-delete-msg-hook': new hook called by `mh-delete-msg'. *** `mh-show-mode-hook': new hook called by new mode `mh-show-mode' for `show-' buffers. *** `mh-comp-formfile': new variable so can customize `components' file. *** `mh-sortm-args': new variable, a list of extra arguments to be passed to sortm by `mh-sort-folder'. Give an argument to `mh-sort-folder' to suppress this behavior. *** `mh-send-prog': new variable so can customize name of `send' program in case of name conflicts. *** `mh-scan-prog': new variable so can customize name of `scan' program to generate custom effects. *** `mh-inc-prog': new variable so can customize name of `inc' program to do fancy management of incoming messages. *** `mh-forwarded-letter-subject': new function used by `mh-forward' to compute the Subject line of the new message. It is a small function which can be replaced by the user for customization. Uses the new variable `mh-forward-subject-format', which allows some simple customizations without rewriting even `mh-forwarded-letter-subject'. *** `mh-new-draft-cleaned-headers': new variable, header lines removed by `mh-edit-again' and `mh-extract-rejected-mail' before offering a message as a new draft. *** `mh-signature-file-name': new variable used by `mh-insert-signature' to so can customize name of the file to insert. *** `mh-read-address': new function called to read all To: and Cc: addresses. *** `mh-msg-folder-hook': new hook used by `mh-refile-msg' and `mh-to-fcc' to provide a default folder for user prompt. ** Key binding changes in mh-e 4.0 *** `,' runs new function `mh-header-display'. It is like `.' but it displays *all* the headers. *** `M-#' runs the new function `mh-delete-seq'. One used to have to type `C-u M-%' to delete a sequence. *** `<' no longer does `mh-first-msg', but `M->' now does `mh-last-msg'. This allows first and last to be consistent (`>' was taken) and is more likely to be discovered by chance anyway. *** `M-d' runs `mh-redistribute', `r' runs `mh-reply' (on the theory that the more commonly used function should be easier to type, and the obscure action of redistributing can be harder to type). *** `M-o' changed to `C-o' (`mh-write-msg-to-file'). It was interfering with arrow keys for some people. *** `M-n' now runs `mh-store-msg' (formerly `mh-unshar-msg'). *** `b' no longer runs `mh-quit'; use `q' instead. `b' may be used in a future version for something else. ** Minor improvements to mh-e 4.0 *** The mh-e code is now divided into multiple Emacs Lisp files, so it starts up faster because Emacs doesn't have to load all of it at once. (This change also makes it easier for the maintainer to manage things.) *** When searching for the directory containing the MH programs, search the user's PATH in addition to the built-in directories, to increase the chance of finding the MH programs. *** The subject for a forwarded message no longer has ugly square brackets around it. *** The name of the folder is no longer appears twice in the show buffer mode line. *** When typing a folder name in the minibuffer, parent folders complete to the trailing slash (/), for easier typing of subfolders. *** The folder buffer mode name changed from `mh-e scan' or `mh-e show' to `MH-Folder', which makes the hook name easier to guess. Added `mh-showing' to `minor-mode-alist' so there is still an indication in the mode line of whether messages will be shown automatically. *** `mh-rename-seq' does completion on the old sequence name. *** If called by a user who has never used MH on this system before, mh-e runs the MH program `install-mh' to get them set up. *** Undo history for previous messages is not kept to avoid wasting memory. *** The internal temp buffer used by mh-e has `buffer-offer-save' explicitly nil. This change benefits people who change the `buffer-offer-save' default. ** Bug fixes to mh-e 4.0 *** `mh-to-field': don't bomb if no To: field. *** `mh-get-new-mail': restore annotations, e.g., cur, even if no new mail. *** `mh-rename-seq': verify that the new seq name was accepted by `mark' before updating state. *** `mh-internal-seq': the Previous sequence is not notated, since it would notate everything scanned. *** `mh-read-draft': don't call `find-file-noselect' so an `auto-mode-alist' doesn't trigger `mh-letter-mode-hook' twice. Faster, too. *** `mh-show': If user moves onto a message that doesn't exist, don't leave the cursor in the show pane. *** `mh-delete-scan-msgs': use `equal', not `=', on the result of `mh-get-msg-num', since it may be nil. *** `mh-get-field': do anchored search so searching for `reply-to:' doesn't find `in-reply-to:'. *** `mh-widen': do nothing if not narrowed. *** `mh-clean-message-header': find end of headers even if no body. This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . Local variables: mode: outline paragraph-separate: "[ ]*$" end: mh-e-8.5/emacs/0002755000175000000620000000000012114520723012463 5ustar wohlerstaffmh-e-8.5/emacs/trunk/0002755000175000000620000000000012114520723013626 5ustar wohlerstaffmh-e-8.5/emacs/trunk/lisp/0002755000175000000620000000000012114520723014575 5ustar wohlerstaffmh-e-8.5/emacs/trunk/lisp/mh-e/0002755000175000000620000000000012114520723015423 5ustar wohlerstaffmh-e-8.5/emacs/trunk/lisp/mh-e/mh-seq.el0000644000175000000620000012031712114520723017141 0ustar wohlerstaff;;; mh-seq.el --- MH-E sequences support ;; Copyright (C) 1993, 1995, 2001-2013 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Sequences are stored in the alist `mh-seq-list' in the form: ;; ((seq-name msgs ...) (seq-name msgs ...) ...) ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (require 'mh-scan) (require 'font-lock) ;;; Variables (defvar mh-last-seq-used nil "Name of seq to which a msg was last added.") (defvar mh-non-seq-mode-line-annotation nil "Saved value of `mh-mode-line-annotation' when narrowed to a seq.") (make-variable-buffer-local 'mh-non-seq-mode-line-annotation) (defvar mh-internal-seqs '(answered cur deleted forwarded printed)) ;;; Macros (defsubst mh-make-seq (name msgs) "Create sequence NAME with the given MSGS." (cons name msgs)) (defsubst mh-seq-name (sequence) "Extract sequence name from the given SEQUENCE." (car sequence)) ;;; MH-Folder Commands ;; Alphabetical. ;;;###mh-autoload (defun mh-catchup (range) "Delete RANGE from the \"unseen\" sequence. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Catchup" (cons (point-min) (point-max))))) (mh-delete-msg-from-seq range mh-unseen-seq)) ;;;###mh-autoload (defun mh-delete-msg-from-seq (range sequence &optional internal-flag) "Delete RANGE from SEQUENCE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. In a program, non-nil INTERNAL-FLAG means do not inform MH of the change." (interactive (list (mh-interactive-range "Delete") (mh-read-seq-default "Delete from" t) nil)) (let ((entry (mh-find-seq sequence)) (user-sequence-flag (not (mh-internal-seq sequence))) (folders-changed (list mh-current-folder)) (msg-list ())) (when entry (mh-iterate-on-range msg range (push msg msg-list) ;; Calling "mark" repeatedly takes too long. So we will pretend here ;; that we are just modifying an internal sequence... (when (memq msg (cdr entry)) (mh-remove-sequence-notation msg (not user-sequence-flag))) (mh-delete-a-msg-from-seq msg sequence t)) ;; ... and here we will "mark" all the messages at one go. (unless internal-flag (mh-undefine-sequence sequence msg-list)) (when (and mh-index-data (not internal-flag)) (setq folders-changed (append folders-changed (mh-index-delete-from-sequence sequence msg-list)))) (when (and (eq sequence mh-unseen-seq) (mh-speed-flists-active-p)) (apply #'mh-speed-flists t folders-changed))))) ;;;###mh-autoload (defun mh-delete-seq (sequence) "Delete SEQUENCE. You are prompted for the sequence to delete. Note that this deletes only the sequence, not the messages in the sequence. If you want to delete the messages, use \"\\[universal-argument] \\[mh-delete-msg]\"." (interactive (list (mh-read-seq-default "Delete" t))) (let ((msg-list (mh-seq-to-msgs sequence)) (internal-flag (mh-internal-seq sequence)) (folders-changed (list mh-current-folder))) (mh-iterate-on-range msg sequence (mh-remove-sequence-notation msg internal-flag)) (mh-undefine-sequence sequence '("all")) (mh-delete-seq-locally sequence) (when mh-index-data (setq folders-changed (append folders-changed (mh-index-delete-from-sequence sequence msg-list)))) (when (and (eq sequence mh-unseen-seq) (mh-speed-flists-active-p)) (apply #'mh-speed-flists t folders-changed)))) ;; Shush compiler. (defvar view-exit-action) ;;;###mh-autoload (defun mh-list-sequences () "List all sequences in folder. The list appears in a buffer named \"*MH-E Sequences*\"." (interactive) (let ((folder mh-current-folder) (temp-buffer mh-sequences-buffer) (seq-list mh-seq-list) (max-len 0)) (with-output-to-temp-buffer temp-buffer (with-current-buffer temp-buffer (erase-buffer) (message "Listing sequences ...") (insert "Sequences in folder " folder ":\n") (let ((seq-list seq-list)) (while seq-list (setq max-len (max (length (symbol-name (mh-seq-name (pop seq-list)))) max-len))) (setq max-len (+ 2 max-len))) (while seq-list (let ((name (mh-seq-name (car seq-list))) (sorted-seq-msgs (mh-coalesce-msg-list (sort (copy-sequence (mh-seq-msgs (car seq-list))) '<))) name-spec) (insert (setq name-spec (format (format "%%%ss:" max-len) name))) (while sorted-seq-msgs (let ((next-element (format " %s" (pop sorted-seq-msgs)))) (when (>= (+ (current-column) (length next-element)) (window-width)) (insert "\n") (insert (format (format "%%%ss" (length name-spec)) ""))) (insert next-element))) (insert "\n")) (setq seq-list (cdr seq-list))) (goto-char (point-min)) (mh-view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing sequences...done"))))) ;;;###mh-autoload (defun mh-msg-is-in-seq (message) "Display the sequences in which the current message appears. Use a prefix argument to display the sequences in which another MESSAGE appears." (interactive "P") (if (not message) (setq message (mh-get-msg-num t))) (let* ((dest-folder (loop for seq in mh-refile-list when (member message (cdr seq)) return (car seq) finally return nil)) (deleted-flag (unless dest-folder (member message mh-delete-list)))) (message "Message %d%s is in sequences: %s" message (cond (dest-folder (format " (to be refiled to %s)" dest-folder)) (deleted-flag (format " (to be deleted)")) (t "")) (mapconcat 'concat (mh-list-to-string (mh-seq-containing-msg message t)) " ")))) ;; Shush compiler. (mh-do-in-xemacs (defvar tool-bar-mode)) (defvar tool-bar-map) ;;;###mh-autoload (defun mh-narrow-to-seq (sequence) "Restrict display to messages in SEQUENCE. You are prompted for the name of the sequence. What this command does is show only those messages that are in the selected sequence in the MH-Folder buffer. In addition, it limits further MH-E searches to just those messages. When you want to widen the view to all your messages again, use \\[mh-widen]." (interactive (list (mh-read-seq "Narrow to" t))) (with-mh-folder-updating (t) (cond ((mh-seq-to-msgs sequence) (mh-remove-all-notation) (let ((eob (point-max)) (msg-at-cursor (mh-get-msg-num nil))) (push mh-thread-scan-line-map mh-thread-scan-line-map-stack) (setq mh-thread-scan-line-map (make-hash-table :test #'eql)) (mh-copy-seq-to-eob sequence) (push (buffer-substring-no-properties (point-min) eob) mh-folder-view-stack) (delete-region (point-min) eob) (mh-notate-deleted-and-refiled) (mh-notate-cur) (when msg-at-cursor (mh-goto-msg msg-at-cursor t t)) (setq mh-non-seq-mode-line-annotation mh-mode-line-annotation) (setq mh-mode-line-annotation (symbol-name sequence)) (mh-make-folder-mode-line) (mh-recenter nil) (when (and (boundp 'tool-bar-mode) tool-bar-mode) (set (make-local-variable 'tool-bar-map) mh-folder-seq-tool-bar-map) (when (buffer-live-p (get-buffer mh-show-buffer)) (with-current-buffer mh-show-buffer (set (make-local-variable 'tool-bar-map) mh-show-seq-tool-bar-map)))) (push 'widen mh-view-ops))) (t (error "No messages in sequence %s" (symbol-name sequence)))))) ;;;###mh-autoload (defun mh-narrow-to-tick () "Limit to ticked messages. What this command does is show only those messages that are in the \"tick\" sequence (which you can customize via the `mh-tick-seq' option) in the MH-Folder buffer. In addition, it limits further MH-E searches to just those messages. When you want to widen the view to all your messages again, use \\[mh-widen]." (interactive) (cond ((not mh-tick-seq) (error "Enable ticking by customizing `mh-tick-seq'")) ((null (mh-seq-msgs (mh-find-seq mh-tick-seq))) (message "No messages in %s sequence" mh-tick-seq)) (t (mh-narrow-to-seq mh-tick-seq)))) ;;;###mh-autoload (defun mh-put-msg-in-seq (range sequence) "Add RANGE to SEQUENCE\\. Give this command a RANGE and you can add all the messages in a sequence to another sequence (for example, \"\\[universal-argument] \\[mh-put-msg-in-seq] SourceSequence RET DestSequence RET\"). Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Add messages from") (mh-read-seq-default "Add to" nil))) (unless (mh-valid-seq-p sequence) (error "Can't put message in invalid sequence %s" sequence)) (let* ((internal-seq-flag (mh-internal-seq sequence)) (original-msgs (mh-seq-msgs (mh-find-seq sequence))) (folders (list mh-current-folder)) (msg-list (mh-range-to-msg-list range))) (mh-add-msgs-to-seq msg-list sequence nil t) (mh-iterate-on-range m range (unless (memq m original-msgs) (mh-add-sequence-notation m internal-seq-flag))) (if (not internal-seq-flag) (setq mh-last-seq-used sequence)) (when mh-index-data (setq folders (append folders (mh-index-add-to-sequence sequence msg-list)))) (when (and (eq sequence mh-unseen-seq) (mh-speed-flists-active-p)) (apply #'mh-speed-flists t folders)))) ;;;###mh-autoload (defun mh-toggle-tick (range) "Toggle tick mark of RANGE. This command adds messages to the \"tick\" sequence (which you can customize via the option `mh-tick-seq'). This sequence can be viewed later with the \\[mh-index-ticked-messages] command. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Tick"))) (unless mh-tick-seq (error "Enable ticking by customizing `mh-tick-seq'")) (let* ((tick-seq (mh-find-seq mh-tick-seq)) (tick-seq-msgs (mh-seq-msgs tick-seq)) (ticked ()) (unticked ())) (mh-iterate-on-range msg range (cond ((member msg tick-seq-msgs) (push msg unticked) (setcdr tick-seq (delq msg (cdr tick-seq))) (when (null (cdr tick-seq)) (setq mh-last-seq-used nil)) (mh-remove-sequence-notation msg (mh-colors-in-use-p))) (t (push msg ticked) (setq mh-last-seq-used mh-tick-seq) (let ((mh-seq-list (cons `(,mh-tick-seq ,msg) mh-seq-list))) (mh-add-sequence-notation msg (mh-colors-in-use-p)))))) (mh-add-msgs-to-seq ticked mh-tick-seq nil t) (mh-undefine-sequence mh-tick-seq unticked) (when mh-index-data (mh-index-add-to-sequence mh-tick-seq ticked) (mh-index-delete-from-sequence mh-tick-seq unticked)))) ;;;###mh-autoload (defun mh-widen (&optional all-flag) "Remove last restriction. Each limit or sequence restriction can be undone in turn with this command. Give this command a prefix argument ALL-FLAG to remove all limits and sequence restrictions." (interactive "P") (let ((msg (mh-get-msg-num nil))) (when mh-folder-view-stack (cond (all-flag (while (cdr mh-view-ops) (setq mh-view-ops (cdr mh-view-ops))) (when (eq (car mh-view-ops) 'widen) (setq mh-view-ops (cdr mh-view-ops)))) ((mh-valid-view-change-operation-p 'widen) nil) ((memq 'widen mh-view-ops) (while (not (eq (car mh-view-ops) 'widen)) (setq mh-view-ops (cdr mh-view-ops))) (setq mh-view-ops (cdr mh-view-ops))) (t (error "Widening is not applicable"))) ;; If ALL-FLAG is non-nil then rewind stacks (when all-flag (while (cdr mh-thread-scan-line-map-stack) (setq mh-thread-scan-line-map-stack (cdr mh-thread-scan-line-map-stack))) (while (cdr mh-folder-view-stack) (setq mh-folder-view-stack (cdr mh-folder-view-stack)))) (setq mh-thread-scan-line-map (pop mh-thread-scan-line-map-stack)) (with-mh-folder-updating (t) (delete-region (point-min) (point-max)) (insert (pop mh-folder-view-stack)) (mh-remove-all-notation) (setq mh-mode-line-annotation mh-non-seq-mode-line-annotation) (mh-make-folder-mode-line)) (if msg (mh-goto-msg msg t t)) (mh-notate-deleted-and-refiled) (mh-notate-user-sequences) (mh-notate-cur) (mh-recenter nil))) (when (and (null mh-folder-view-stack) (boundp 'tool-bar-mode) tool-bar-mode) (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map) (when (buffer-live-p (get-buffer mh-show-buffer)) (with-current-buffer mh-show-buffer (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map))))) ;;; Support Routines (defvar mh-sequence-history ()) ;;;###mh-autoload (defun mh-read-seq-default (prompt not-empty) "Read and return sequence name with default narrowed or previous sequence. PROMPT is the prompt to use when reading. If NOT-EMPTY is non-nil then a non-empty sequence is read." (mh-read-seq prompt not-empty (or mh-last-seq-used (car (mh-seq-containing-msg (mh-get-msg-num nil) nil))))) (defun mh-read-seq (prompt not-empty &optional default) "Read and return a sequence name. Prompt with PROMPT, raise an error if the sequence is empty and the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT sequence. A reply of '%' defaults to the first sequence containing the current message." (let* ((input (completing-read (format "%s sequence%s: " prompt (if default (format " (default %s)" default) "")) (mh-seq-names mh-seq-list) nil nil nil 'mh-sequence-history)) (seq (cond ((equal input "%") (car (mh-seq-containing-msg (mh-get-msg-num t) nil))) ((equal input "") default) (t (intern input)))) (msgs (mh-seq-to-msgs seq))) (if (and (null msgs) not-empty) (error "No messages in sequence %s" seq)) seq)) (defun mh-internal-seq (name) "Return non-nil if NAME is the name of an internal MH-E sequence." (or (memq name mh-internal-seqs) (eq name mh-unseen-seq) (and (mh-colors-in-use-p) mh-tick-seq (eq name mh-tick-seq)) (eq name mh-previous-seq) (mh-folder-name-p name))) ;;;###mh-autoload (defun mh-valid-seq-p (name) "Return non-nil if NAME is a valid MH sequence name." (and (symbolp name) (string-match "^[a-zA-Z][a-zA-Z0-9]*$" (symbol-name name)))) ;;;###mh-autoload (defun mh-find-seq (name) "Return sequence NAME." (assoc name mh-seq-list)) ;;;###mh-autoload (defun mh-seq-to-msgs (seq) "Return a list of the messages in SEQ." (mh-seq-msgs (mh-find-seq seq))) (defun mh-seq-containing-msg (msg &optional include-internal-flag) "Return a list of the sequences containing MSG. If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences in list." (let ((l mh-seq-list) (seqs ())) (while l (and (memq msg (mh-seq-msgs (car l))) (or include-internal-flag (not (mh-internal-seq (mh-seq-name (car l))))) (setq seqs (cons (mh-seq-name (car l)) seqs))) (setq l (cdr l))) seqs)) ;;;###mh-autoload (defun mh-define-sequence (seq msgs) "Define the SEQ to contain the list of MSGS. Do not mark pseudo-sequences or empty sequences. Signals an error if SEQ is an invalid name." (if (and msgs (mh-valid-seq-p seq) (not (mh-folder-name-p seq))) (save-excursion (mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero" "-sequence" (symbol-name seq) (mh-coalesce-msg-list msgs))))) ;;;###mh-autoload (defun mh-undefine-sequence (seq msgs) "Remove from the SEQ the list of MSGS." (when (and (mh-valid-seq-p seq) msgs) (apply #'mh-exec-cmd "mark" mh-current-folder "-delete" "-sequence" (symbol-name seq) (mh-coalesce-msg-list msgs)))) ;;;###mh-autoload (defun mh-add-msgs-to-seq (msgs seq &optional internal-flag dont-annotate-flag) "Add MSGS to SEQ. Remove duplicates and keep sequence sorted. If optional INTERNAL-FLAG is non-nil, do not mark the message in the scan listing or inform MH of the addition. If DONT-ANNOTATE-FLAG is non-nil then the annotations in the folder buffer are not updated." (let ((entry (mh-find-seq seq)) (internal-seq-flag (mh-internal-seq seq))) (if (and msgs (atom msgs)) (setq msgs (list msgs))) (if (null entry) (setq mh-seq-list (cons (mh-make-seq seq (mh-canonicalize-sequence msgs)) mh-seq-list)) (if msgs (setcdr entry (mh-canonicalize-sequence (append msgs (mh-seq-msgs entry)))))) (unless internal-flag (mh-add-to-sequence seq msgs) (when (not dont-annotate-flag) (mh-iterate-on-range msg msgs (unless (memq msg (cdr entry)) (mh-add-sequence-notation msg internal-seq-flag))))))) (defun mh-add-to-sequence (seq msgs) "The sequence SEQ is augmented with the messages in MSGS." ;; Add to a SEQUENCE each message the list of MSGS. (if (and (mh-valid-seq-p seq) (not (mh-folder-name-p seq))) (if msgs (apply 'mh-exec-cmd "mark" mh-current-folder "-add" "-sequence" (symbol-name seq) (mh-coalesce-msg-list msgs))))) (defun mh-canonicalize-sequence (msgs) "Sort MSGS in decreasing order and remove duplicates." (let* ((sorted-msgs (sort (copy-sequence msgs) '>)) (head sorted-msgs)) (while (cdr head) (if (= (car head) (cadr head)) (setcdr head (cddr head)) (setq head (cdr head)))) sorted-msgs)) (defun mh-delete-a-msg-from-seq (msg sequence internal-flag) "Delete MSG from SEQUENCE. If INTERNAL-FLAG is non-nil, then do not inform MH of the change." (let ((entry (mh-find-seq sequence))) (when (and entry (memq msg (mh-seq-msgs entry))) (if (not internal-flag) (mh-undefine-sequence sequence (list msg))) (setcdr entry (delq msg (mh-seq-msgs entry)))))) (defun mh-delete-seq-locally (seq) "Remove MH-E's record of SEQ." (let ((entry (mh-find-seq seq))) (setq mh-seq-list (delq entry mh-seq-list)))) (defun mh-copy-seq-to-eob (seq) "Copy SEQ to the end of the buffer." ;; It is quite involved to write something which will work at any place in ;; the buffer, so we will write something which works only at the end of ;; the buffer. If we ever need to insert sequences in the middle of the ;; buffer, this will need to be fixed. (save-excursion (let* ((msgs (mh-seq-to-msgs seq)) (coalesced-msgs (mh-coalesce-msg-list msgs))) (goto-char (point-max)) (save-restriction (narrow-to-region (point) (point)) (mh-regenerate-headers coalesced-msgs t) (cond ((memq 'unthread mh-view-ops) ;; Populate restricted scan-line map (mh-remove-all-notation) (mh-iterate-on-range msg (cons (point-min) (point-max)) (setf (gethash msg mh-thread-scan-line-map) (mh-thread-parse-scan-line))) ;; Remove scan lines and read results from pre-computed tree (delete-region (point-min) (point-max)) (mh-thread-print-scan-lines (mh-thread-generate mh-current-folder ())) (mh-notate-user-sequences)) (mh-index-data (mh-index-insert-folder-headers))))))) ;;;###mh-autoload (defun mh-valid-view-change-operation-p (op) "Check if the view change operation can be performed. OP is one of 'widen and 'unthread." (cond ((eq (car mh-view-ops) op) (pop mh-view-ops)) (t nil))) ;;; Ranges (defvar mh-range-seq-names) (defvar mh-range-history ()) (defvar mh-range-completion-map (copy-keymap minibuffer-local-completion-map)) (define-key mh-range-completion-map " " 'self-insert-command) ;;;###mh-autoload (defun mh-interactive-range (range-prompt &optional default) "Return interactive specification for message, sequence, range or region. By convention, the name of this argument is RANGE. If variable `transient-mark-mode' is non-nil and the mark is active, then this function returns a cons-cell of the region. If optional prefix argument is provided, then prompt for message range with RANGE-PROMPT. A list of messages in that range is returned. If a MH range is given, say something like last:20, then a list containing the messages in that range is returned. If DEFAULT non-nil then it is returned. Otherwise, the message number at point is returned. This function is usually used with `mh-iterate-on-range' in order to provide a uniform interface to MH-E functions." (cond ((mh-mark-active-p t) (cons (region-beginning) (region-end))) (current-prefix-arg (mh-read-range range-prompt nil nil t t)) (default default) (t (mh-get-msg-num t)))) ;;;###mh-autoload (defun mh-read-range (prompt &optional folder default expand-flag ask-flag number-as-range-flag) "Read a message range with PROMPT. If FOLDER is non-nil then a range is read from that folder, otherwise use `mh-current-folder'. If DEFAULT is a string then use that as default range to return. If DEFAULT is nil then ask user with default answer a range based on the sequences that seem relevant. Finally if DEFAULT is t, try to avoid prompting the user. Unseen messages, if present, are returned. If the folder has fewer than `mh-large-folder' messages then \"all\" messages are returned. Finally as a last resort prompt the user. If EXPAND-FLAG is non-nil then a list of message numbers corresponding to the input is returned. If this list is empty then an error is raised. If EXPAND-FLAG is nil just return the input string. In this case we don't check if the range is empty. If ASK-FLAG is non-nil, then the user is always queried for a range of messages. If ASK-FLAG is nil, then the function checks if the unseen sequence is non-empty. If that is the case, `mh-unseen-seq', or the list of messages in it depending on the value of EXPAND, is returned. Otherwise if the folder has fewer than `mh-large-folder' messages then the list of messages corresponding to \"all\" is returned. If neither of the above holds then as a last resort the user is queried for a range of messages. If NUMBER-AS-RANGE-FLAG is non-nil, then if a number, N is read as input, it is interpreted as the range \"last:N\". This function replaces the existing function `mh-read-msg-range'. Calls to: (mh-read-msg-range folder flag) should be replaced with: (mh-read-range \"Suitable prompt\" folder t nil flag mh-interpret-number-as-range-flag)" (setq default (or default mh-last-seq-used (car (mh-seq-containing-msg (mh-get-msg-num nil) t))) prompt (format "%s range" prompt)) (let* ((folder (or folder mh-current-folder)) (guess (eq default t)) (counts (and guess (mh-folder-size folder))) (unseen (and counts (> (cadr counts) 0))) (large (and counts mh-large-folder (> (car counts) mh-large-folder))) (default (cond ((and guess large) (format "last:%s" mh-large-folder)) ((and guess (not large)) "all") ((stringp default) default) ((symbolp default) (symbol-name default)))) (prompt (cond ((and guess large default) (format "%s (folder has %s messages, default %s)" prompt (car counts) default)) ((and guess large) (format "%s (folder has %s messages)" prompt (car counts))) (default (format "%s (default %s)" prompt default)))) (minibuffer-local-completion-map mh-range-completion-map) (seq-list (if (eq folder mh-current-folder) mh-seq-list (mh-read-folder-sequences folder nil))) (mh-range-seq-names (append '(("first") ("last") ("all") ("prev") ("next")) (mh-seq-names seq-list))) (input (cond ((and (not ask-flag) unseen) (symbol-name mh-unseen-seq)) ((and (not ask-flag) (not large)) "all") (t (completing-read (format "%s: " prompt) 'mh-range-completion-function nil nil nil 'mh-range-history default)))) msg-list) (when (and number-as-range-flag (string-match "^[ \t]*\\([0-9]+\\)[ \t]*$" input)) (setq input (concat "last:" (match-string 1 input)))) (cond ((not expand-flag) input) ((assoc (intern input) seq-list) (cdr (assoc (intern input) seq-list))) ((setq msg-list (mh-translate-range folder input)) msg-list) (t (error "No messages in range %s" input))))) ;;;###mh-autoload (defun mh-range-to-msg-list (range) "Return a list of messages for RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (let (msg-list) (mh-iterate-on-range msg range (push msg msg-list)) (nreverse msg-list))) ;;;###mh-autoload (defun mh-translate-range (folder expr) "In FOLDER, translate the string EXPR to a list of messages numbers." (save-excursion (let ((strings (delete "" (split-string expr "[ \t\n]"))) (result ())) (ignore-errors (apply #'mh-exec-cmd-quiet nil "mhpath" folder strings) (set-buffer mh-temp-buffer) (goto-char (point-min)) (while (re-search-forward "/\\([0-9]*\\)$" nil t) (push (string-to-number (match-string 1)) result)) (nreverse result))))) (defun mh-range-completion-function (string predicate flag) "Programmable completion of message ranges. STRING is the user input that is to be completed. PREDICATE if non-nil is a function used to filter the possible choices and FLAG determines whether the completion is over." (let* ((candidates mh-range-seq-names) (last-char (and (not (equal string "")) (aref string (1- (length string))))) (last-word (cond ((null last-char) "") ((memq last-char '(? ?- ?:)) "") (t (car (last (split-string string "[ -:]+")))))) (prefix (substring string 0 (- (length string) (length last-word))))) (cond ((eq flag nil) (let ((res (try-completion last-word candidates predicate))) (cond ((null res) nil) ((eq res t) t) (t (concat prefix res))))) ((eq flag t) (all-completions last-word candidates predicate)) ((eq flag 'lambda) (loop for x in candidates when (equal x last-word) return t finally return nil))))) (defun mh-seq-names (seq-list) "Return an alist containing the names of the SEQ-LIST." (mapcar (lambda (entry) (list (symbol-name (mh-seq-name entry)))) seq-list)) (defun mh-folder-size (folder) "Find size of FOLDER." (if mh-flists-present-flag (mh-folder-size-flist folder) (mh-folder-size-folder folder))) (defun mh-folder-size-flist (folder) "Find size of FOLDER using \"flist\"." (with-temp-buffer (call-process (expand-file-name "flist" mh-progs) nil t nil "-showzero" "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq)) (goto-char (point-min)) (multiple-value-bind (folder unseen total) (values-list (mh-parse-flist-output-line (buffer-substring (point) (mh-line-end-position)))) (list total unseen folder)))) (defun mh-folder-size-folder (folder) "Find size of FOLDER using \"folder\"." (with-temp-buffer (let ((u (length (cdr (assoc mh-unseen-seq (mh-read-folder-sequences folder nil)))))) (call-process (expand-file-name "folder" mh-progs) nil t nil "-norecurse" folder) (goto-char (point-min)) (if (re-search-forward " has \\([0-9]+\\) " nil t) (list (string-to-number (match-string 1)) u folder) (list 0 u folder))))) ;;;###mh-autoload (defun mh-parse-flist-output-line (line &optional current-folder) "Parse LINE to generate folder name, unseen messages and total messages. If CURRENT-FOLDER is non-nil then it contains the current folder name and it is used to avoid problems in corner cases involving folders whose names end with a '+' character." (with-temp-buffer (insert line) (goto-char (point-max)) (let (folder unseen total p) (when (search-backward " out of " (point-min) t) (setq total (string-to-number (buffer-substring-no-properties (match-end 0) (mh-line-end-position)))) (when (search-backward " in sequence " (point-min) t) (setq p (point)) (when (search-backward " has " (point-min) t) (setq unseen (string-to-number (buffer-substring-no-properties (match-end 0) p))) (while (eq (char-after) ? ) (backward-char)) (setq folder (buffer-substring-no-properties (point-min) (1+ (point)))) (when (and (equal (aref folder (1- (length folder))) ?+) (equal current-folder folder)) (setq folder (substring folder 0 (1- (length folder))))) (list (format "+%s" folder) unseen total))))))) ;;;###mh-autoload (defun mh-read-folder-sequences (folder save-refiles) "Read and return the predefined sequences for a FOLDER. If SAVE-REFILES is non-nil, then keep the sequences that note messages to be refiled." (let ((seqs ())) (cond (save-refiles (mh-mapc (function (lambda (seq) ; Save the refiling sequences (if (mh-folder-name-p (mh-seq-name seq)) (setq seqs (cons seq seqs))))) mh-seq-list))) (save-excursion (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list")) (progn ;; look for name in line of form "cur: 4" or "myseq (private): 23" (while (re-search-forward "^[^: ]+" nil t) (setq seqs (cons (mh-make-seq (intern (buffer-substring (match-beginning 0) (match-end 0))) (mh-read-msg-list)) seqs))) (delete-region (point-min) (point))))) ; avoid race with ; mh-process-daemon seqs)) (defun mh-read-msg-list () "Return a list of message numbers from point to the end of the line. Expands ranges into set of individual numbers." (let ((msgs ()) (end-of-line (point-at-eol)) num) (while (re-search-forward "[0-9]+" end-of-line t) (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-number (buffer-substring (match-beginning 0) (match-end 0))))) (if (< num2 num) (error "Bad message range: %d-%d" num num2)) (while (<= num num2) (setq msgs (cons num msgs)) (setq num (1+ num))))) ((not (zerop num)) ;"pick" outputs "0" to mean no match (setq msgs (cons num msgs))))) msgs)) ;;; Notation ;;;###mh-autoload (defun mh-notate (msg notation offset) "Mark MSG with the character NOTATION at position OFFSET. Null MSG means the message at cursor. If NOTATION is nil then no change in the buffer occurs." (save-excursion (if (or (null msg) (mh-goto-msg msg t t)) (with-mh-folder-updating (t) (beginning-of-line) (forward-char offset) (let* ((change-stack-flag (and (equal offset (+ mh-cmd-note mh-scan-field-destination-offset)) (not (eq notation mh-note-seq)))) (msg (and change-stack-flag (or msg (mh-get-msg-num nil)))) (stack (and msg (gethash msg mh-sequence-notation-history))) (notation (or notation (char-after)))) (if stack ;; The presence of the stack tells us that we don't need to ;; notate the message, since the notation would be replaced ;; by a sequence notation. So we will just put the notation ;; at the bottom of the stack. If the sequence is deleted, ;; the correct notation will be shown. (setf (gethash msg mh-sequence-notation-history) (reverse (cons notation (cdr (reverse stack))))) ;; Since we don't have any sequence notations in the way, just ;; notate the scan line. (delete-char 1) (insert notation)) (when change-stack-flag (mh-thread-update-scan-line-map msg notation offset))))))) ;;;###mh-autoload (defun mh-notate-cur () "Mark the MH sequence cur. In addition to notating the current message with `mh-note-cur' the function uses `overlay-arrow-position' to put a marker in the fringe." (let ((cur (car (mh-seq-to-msgs 'cur)))) (when (and cur (mh-goto-msg cur t t)) (beginning-of-line) (when (looking-at mh-scan-good-msg-regexp) (mh-notate nil mh-note-cur mh-cmd-note)) (setq mh-arrow-marker (set-marker mh-arrow-marker (point))) (setq overlay-arrow-position mh-arrow-marker)))) ;;;###mh-autoload (defun mh-remove-cur-notation () "Remove old cur notation." (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) (save-excursion (when (and cur-msg (mh-goto-msg cur-msg t t) (looking-at mh-scan-cur-msg-number-regexp)) (mh-notate nil ? mh-cmd-note) (setq overlay-arrow-position nil))))) ;; FIXME? We may want to clear all notations and add one for current-message ;; and process user sequences. ;;;###mh-autoload (defun mh-notate-deleted-and-refiled () "Notate messages marked for deletion or refiling. Messages to be deleted are given by `mh-delete-list' while messages to be refiled are present in `mh-refile-list'." (let ((refiled-hash (make-hash-table)) (deleted-hash (make-hash-table))) (dolist (msg mh-delete-list) (setf (gethash msg deleted-hash) t)) (dolist (dest-msg-list mh-refile-list) (dolist (msg (cdr dest-msg-list)) (setf (gethash msg refiled-hash) t))) (mh-iterate-on-messages-in-region msg (point-min) (point-max) (cond ((gethash msg refiled-hash) (mh-notate nil mh-note-refiled mh-cmd-note)) ((gethash msg deleted-hash) (mh-notate nil mh-note-deleted mh-cmd-note)))))) ;;;###mh-autoload (defun mh-notate-user-sequences (&optional range) "Mark user-defined sequences in RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use; if nil all messages are notated." (unless range (setq range (cons (point-min) (point-max)))) (let ((seqs mh-seq-list) (msg-hash (make-hash-table))) (dolist (seq seqs) (dolist (msg (mh-seq-msgs seq)) (push (car seq) (gethash msg msg-hash)))) (mh-iterate-on-range msg range (loop for seq in (gethash msg msg-hash) do (mh-add-sequence-notation msg (mh-internal-seq seq)))))) (defun mh-add-sequence-notation (msg internal-seq-flag) "Add sequence notation to the MSG on the current line. If INTERNAL-SEQ-FLAG is non-nil, then refontify the scan line if font-lock is turned on." (with-mh-folder-updating (t) (save-excursion (beginning-of-line) (if internal-seq-flag (progn ;; Change the buffer so that if transient-mark-mode is active ;; and there is an active region it will get deactivated as in ;; the case of user sequences. (mh-notate nil nil mh-cmd-note) (when font-lock-mode (font-lock-fontify-region (point) (mh-line-end-position)))) (forward-char (+ mh-cmd-note mh-scan-field-destination-offset)) (let ((stack (gethash msg mh-sequence-notation-history))) (setf (gethash msg mh-sequence-notation-history) (cons (char-after) stack))) (mh-notate nil mh-note-seq (+ mh-cmd-note mh-scan-field-destination-offset)))))) (defun mh-remove-sequence-notation (msg internal-seq-flag &optional all) "Remove sequence notation from the MSG on the current line. If INTERNAL-SEQ-FLAG is non-nil, then `font-lock' was used to highlight the sequence. In that case, no notation needs to be removed. Otherwise the effect of inserting `mh-note-seq' needs to be reversed. If ALL is non-nil, then all sequence marks on the scan line are removed." (with-mh-folder-updating (t) ;; This takes care of internal sequences... (mh-notate nil nil mh-cmd-note) (unless internal-seq-flag ;; ... and this takes care of user sequences. (let ((stack (gethash msg mh-sequence-notation-history))) (while (and all (cdr stack)) (setq stack (cdr stack))) (when stack (save-excursion (beginning-of-line) (forward-char (+ mh-cmd-note mh-scan-field-destination-offset)) (delete-char 1) (insert (car stack)))) (setf (gethash msg mh-sequence-notation-history) (cdr stack)))))) ;;;###mh-autoload (defun mh-remove-all-notation () "Remove all notations on all scan lines that MH-E introduces." (save-excursion (setq overlay-arrow-position nil) (goto-char (point-min)) (mh-iterate-on-range msg (cons (point-min) (point-max)) (mh-notate nil ? mh-cmd-note) (mh-remove-sequence-notation msg nil t)) (clrhash mh-sequence-notation-history))) ;; XXX Unused, delete, or create bind key? (defun mh-rename-seq (sequence new-name) "Rename SEQUENCE to have NEW-NAME." (interactive (list (mh-read-seq "Old" t) (intern (read-string "New sequence name: ")))) (let ((old-seq (mh-find-seq sequence))) (or old-seq (error "Sequence %s does not exist" sequence)) ;; Create new sequence first, since it might raise an error. (mh-define-sequence new-name (mh-seq-msgs old-seq)) (mh-undefine-sequence sequence (mh-seq-msgs old-seq)) (rplaca old-seq new-name))) (provide 'mh-seq) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-seq.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-autoloads.el0000644000175000000620000001572212114520723020347 0ustar wohlerstaff;;; mh-autoloads.el --- automatically extracted external autoloads for MH-E ;; Copyright (C) 2003-2012 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Keywords: mail ;;; Commentary: ;; If you installed MH-E separately from Emacs, you can set up its entry ;; points using the following in your .emacs file: ;; (require 'mh-autoloads) ;;; Change Log: ;;; Code: ;;;### (autoloads (mh-version) "mh-e" "mh-e.el" (20786 37831)) ;;; Generated autoloads from mh-e.el (put 'mh-progs 'risky-local-variable t) (put 'mh-lib 'risky-local-variable t) (put 'mh-lib-progs 'risky-local-variable t) (autoload 'mh-version "mh-e" "\ Display version information about MH-E and the MH mail handling system. \(fn)" t nil) ;;;*** ;;;### (autoloads (mh-folder-mode mh-nmail mh-rmail) "mh-folder" ;;;;;; "mh-folder.el" (20786 37831)) ;;; Generated autoloads from mh-folder.el (autoload 'mh-rmail "mh-folder" "\ Incorporate new mail with MH. Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, the Emacs interface to the MH mail system. \(fn &optional ARG)" t nil) (autoload 'mh-nmail "mh-folder" "\ Check for new mail in inbox folder. Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, the Emacs interface to the MH mail system. \(fn &optional ARG)" t nil) (autoload 'mh-folder-mode "mh-folder" "\ Major MH-E mode for \"editing\" an MH folder scan listing.\\ You can show the message the cursor is pointing to, and step through the messages. Messages can be marked for deletion or refiling into another folder; these commands are executed all at once with a separate command. Options that control this mode can be changed with \\[customize-group]; specify the \"mh\" group. In particular, please see the `mh-scan-format-file' option if you wish to modify scan's format. When a folder is visited, the hook `mh-folder-mode-hook' is run. Ranges ====== Many commands that operate on individual messages, such as `mh-forward' or `mh-refile-msg' take a RANGE argument. This argument can be used in several ways. If you provide the prefix argument (\\[universal-argument]) to these commands, then you will be prompted for the message range. This can be any valid MH range which can include messages, sequences, and the abbreviations (described in the mh(1) man page): - Indicates all messages in the range to , inclusive. The range must be nonempty. :N :+N :-N Up to N messages beginning with (or ending with) message num. Num may be any of the predefined symbols: first, prev, cur, next or last. first:N prev:N next:N last:N The first, previous, next or last messages, if they exist. all All of the messages. For example, a range that shows all of these things is `1 2 3 5-10 last:5 unseen'. If the option `transient-mark-mode' is set to t and you set a region in the MH-Folder buffer, then the MH-E command will perform the operation on all messages in that region. \\{mh-folder-mode-map} \(fn)" t nil) ;;;*** ;;;### (autoloads nil nil ("mh-acros.el" "mh-alias.el" "mh-buffers.el" ;;;;;; "mh-compat.el" "mh-funcs.el" "mh-gnus.el" "mh-identity.el" ;;;;;; "mh-inc.el" "mh-junk.el" "mh-letter.el" "mh-limit.el" "mh-loaddefs.el" ;;;;;; "mh-mime.el" "mh-print.el" "mh-scan.el" "mh-search.el" "mh-seq.el" ;;;;;; "mh-show.el" "mh-speed.el" "mh-thread.el" "mh-tool-bar.el" ;;;;;; "mh-utils.el" "mh-xface.el") (20786 41381 954754)) ;;;*** ;;;### (autoloads (mh-fully-kill-draft mh-send-letter mh-user-agent-compose ;;;;;; mh-smail-batch mh-smail-other-window mh-smail) "mh-comp" ;;;;;; "mh-comp.el" (20786 37831)) ;;; Generated autoloads from mh-comp.el (autoload 'mh-smail "mh-comp" "\ Compose a message with the MH mail system. See `mh-send' for more details on composing mail. \(fn)" t nil) (autoload 'mh-smail-other-window "mh-comp" "\ Compose a message with the MH mail system in other window. See `mh-send' for more details on composing mail. \(fn)" t nil) (autoload 'mh-smail-batch "mh-comp" "\ Compose a message with the MH mail system. This function does not prompt the user for any header fields, and thus is suitable for use by programs that want to create a mail buffer. Users should use \\[mh-smail] to compose mail. Optional arguments for setting certain fields include TO, SUBJECT, and OTHER-HEADERS. Additional arguments are IGNORED. This function remains for Emacs 21 compatibility. New applications should use `mh-user-agent-compose'. \(fn &optional TO SUBJECT OTHER-HEADERS &rest IGNORED)" nil nil) (define-mail-user-agent 'mh-e-user-agent 'mh-user-agent-compose 'mh-send-letter 'mh-fully-kill-draft 'mh-before-send-letter-hook) (autoload 'mh-user-agent-compose "mh-comp" "\ Set up mail composition draft with the MH mail system. This is the `mail-user-agent' entry point to MH-E. This function conforms to the contract specified by `define-mail-user-agent' which means that this function should accept the same arguments as `compose-mail'. The optional arguments TO and SUBJECT specify recipients and the initial Subject field, respectively. OTHER-HEADERS is an alist specifying additional header fields. Elements look like (HEADER . VALUE) where both HEADER and VALUE are strings. CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and RETURN-ACTION and any additional arguments are IGNORED. \(fn &optional TO SUBJECT OTHER-HEADERS CONTINUE SWITCH-FUNCTION YANK-ACTION SEND-ACTIONS RETURN-ACTION &rest IGNORED)" nil nil) (autoload 'mh-send-letter "mh-comp" "\ Save draft and send message. When you are all through editing a message, you send it with this command. You can give a prefix argument ARG to monitor the first stage of the delivery; this output can be found in a buffer called \"*MH-E Mail Delivery*\". The hook `mh-before-send-letter-hook' is run at the beginning of this command. For example, if you want to check your spelling in your message before sending, add the function `ispell-message'. Unless `mh-insert-auto-fields' had previously been called manually, the function `mh-insert-auto-fields' is called to insert fields based upon the recipients. If fields are added, you are given a chance to see and to confirm these fields before the message is actually sent. You can do away with this confirmation by turning off the option `mh-auto-fields-prompt-flag'. In case the MH \"send\" program is installed under a different name, use `mh-send-prog' to tell MH-E the name. The hook `mh-annotate-msg-hook' is run after annotating the message and scan line. \(fn &optional ARG)" t nil) (autoload 'mh-fully-kill-draft "mh-comp" "\ Quit editing and delete draft message. If for some reason you are not happy with the draft, you can use this command to kill the draft buffer and delete the draft message. Use the command \\[kill-buffer] if you don't want to delete the draft message. \(fn)" t nil) ;;;*** (provide 'mh-autoloads) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t ;; End: ;;; mh-autoloads.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-alias.el0000644000175000000620000006665412114520723017457 0ustar wohlerstaff;;; mh-alias.el --- MH-E mail alias completion and expansion ;; Copyright (C) 1994-1997, 2001-2013 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (require 'goto-addr) (defvar mh-alias-alist 'not-read "Alist of MH aliases.") (defvar mh-alias-blind-alist nil "Alist of MH aliases that are blind lists.") (defvar mh-alias-passwd-alist nil "Alist of aliases extracted from passwd file and their expansions.") (defvar mh-alias-tstamp nil "Time aliases were last loaded.") (defvar mh-alias-read-address-map (let ((map (copy-keymap minibuffer-local-completion-map))) (define-key map "," 'mh-alias-minibuffer-confirm-address) (define-key map " " 'self-insert-command) map)) (defvar mh-alias-system-aliases '("/etc/nmh/MailAliases" "/etc/mh/MailAliases" "/usr/lib/mh/MailAliases" "/usr/share/mailutils/mh/MailAliases" "/etc/passwd") "*A list of system files which are a source of aliases. If these files are modified, they are automatically reread. This list need include only system aliases and the passwd file, since personal alias files listed in your \"Aliasfile:\" MH profile component are automatically included. You can update the alias list manually using \\[mh-alias-reload].") ;;; Alias Loading (defun mh-alias-tstamp (arg) "Check whether alias files have been modified. Return t if any file listed in the Aliasfile MH profile component has been modified since the timestamp. If ARG is non-nil, set timestamp with the current time." (if arg (let ((time (current-time))) (setq mh-alias-tstamp (list (nth 0 time) (nth 1 time)))) (let ((stamp)) (car (memq t (mapcar (function (lambda (file) (when (and file (file-exists-p file)) (setq stamp (nth 5 (file-attributes file))) (or (> (car stamp) (car mh-alias-tstamp)) (and (= (car stamp) (car mh-alias-tstamp)) (> (cadr stamp) (cadr mh-alias-tstamp))))))) (mh-alias-filenames t))))))) (defun mh-alias-filenames (arg) "Return list of filenames that contain aliases. The filenames come from the Aliasfile profile component and are expanded. If ARG is non-nil, filenames listed in `mh-alias-system-aliases' are appended." (or mh-progs (mh-find-path)) (save-excursion (let* ((filename (mh-profile-component "Aliasfile")) (filelist (and filename (split-string filename "[ \t]+"))) (userlist (mapcar (function (lambda (file) (if (and mh-user-path file (file-exists-p (expand-file-name file mh-user-path))) (expand-file-name file mh-user-path)))) filelist))) (if arg (if (stringp mh-alias-system-aliases) (append userlist (list mh-alias-system-aliases)) (append userlist mh-alias-system-aliases)) userlist)))) (defun mh-alias-gecos-name (gecos-name username comma-separator) "Return a usable address string from a GECOS-NAME and USERNAME. Use only part of the GECOS-NAME up to the first comma if COMMA-SEPARATOR is non-nil." (let ((res gecos-name)) ;; Keep only string until first comma if COMMA-SEPARATOR is t. (if (and comma-separator (string-match "^\\([^,]+\\)," res)) (setq res (match-string 1 res))) ;; Replace "&" with capitalized username (if (string-match "&" res) (setq res (mh-replace-regexp-in-string "&" (capitalize username) res))) ;; Remove " character (if (string-match "\"" res) (setq res (mh-replace-regexp-in-string "\"" "" res))) ;; If empty string, use username instead (if (string-equal "" res) (setq res username)) ;; Surround by quotes if doesn't consist of simple characters (if (not (string-match "^[ a-zA-Z0-9-]+$" res)) (setq res (concat "\"" res "\""))) res)) (defun mh-alias-local-users () "Return an alist of local users from /etc/passwd. Exclude all aliases already in `mh-alias-alist' from \"ali\"" (let (passwd-alist) (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (cond ((eq mh-alias-local-users t) (if (file-readable-p "/etc/passwd") (insert-file-contents "/etc/passwd"))) ((stringp mh-alias-local-users) (insert mh-alias-local-users "\n") (shell-command-on-region (point-min) (point-max) mh-alias-local-users t) (goto-char (point-min)))) (while (< (point) (point-max)) (cond ((looking-at "\\([^:]*\\):[^:]*:\\([^:]*\\):[^:]*:\\([^:]*\\):") (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)) (alias-translation (if (string-equal username realname) (concat "<" username ">") (concat realname " <" username ">")))) (when (not (mh-assoc-string alias-name mh-alias-alist t)) (setq passwd-alist (cons (list alias-name alias-translation) passwd-alist))))))) (forward-line 1))) passwd-alist)) (defun mh-alias-reload () "Reload MH aliases. Since aliases are updated frequently, MH-E reloads aliases automatically whenever an alias lookup occurs if an alias source has changed. Sources include files listed in your \"Aliasfile:\" profile component and your password file if option `mh-alias-local-users' is turned on. However, you can reload your aliases manually by calling this command directly. This function runs `mh-alias-reloaded-hook' after the aliases have been loaded." (interactive) (save-excursion (message "Loading MH aliases...") (mh-alias-tstamp t) (mh-exec-cmd-quiet t "ali" "-nolist" "-nouser") (setq mh-alias-alist nil) (setq mh-alias-blind-alist nil) (while (< (point) (point-max)) (cond ((looking-at "^[ \t]")) ;Continuation line ((looking-at "\\(.+\\): .+: .*$") ; A new -blind- MH alias (when (not (mh-assoc-string (match-string 1) mh-alias-blind-alist t)) (setq mh-alias-blind-alist (cons (list (match-string 1)) mh-alias-blind-alist)) (setq mh-alias-alist (cons (list (match-string 1)) mh-alias-alist)))) ((looking-at "\\(.+\\): .*$") ; A new MH alias (when (not (mh-assoc-string (match-string 1) mh-alias-alist t)) (setq mh-alias-alist (cons (list (match-string 1)) mh-alias-alist))))) (forward-line 1))) (when mh-alias-local-users (setq mh-alias-passwd-alist (mh-alias-local-users)) ;; Update aliases with local users, but leave existing aliases alone. (let ((local-users mh-alias-passwd-alist) user) (while local-users (setq user (car local-users)) (if (not (mh-assoc-string (car user) mh-alias-alist t)) (setq mh-alias-alist (append mh-alias-alist (list user)))) (setq local-users (cdr local-users))))) (run-hooks 'mh-alias-reloaded-hook) (message "Loading MH aliases...done")) ;;;###mh-autoload (defun mh-alias-reload-maybe () "Load new MH aliases." (if (or (eq mh-alias-alist 'not-read) ; Doesn't exist? (mh-alias-tstamp nil)) ; Out of date? (mh-alias-reload))) ;;; Alias Expansion (defun mh-alias-ali (alias &optional user) "Return ali expansion for ALIAS. ALIAS must be a string for a single alias. If USER is t, then assume ALIAS is an address and call ali -user. ali returns the string unchanged if not defined. The same is done here." (condition-case err (save-excursion (let ((user-arg (if user "-user" "-nouser"))) (mh-exec-cmd-quiet t "ali" user-arg "-nolist" alias)) (goto-char (point-max)) (if (looking-at "^$") (delete-char -1)) (buffer-substring (point-min)(point-max))) (error (progn (message "%s" (error-message-string err)) alias)))) ;;;###mh-autoload (defun mh-alias-expand (alias) "Return expansion for ALIAS. Blind aliases or users from /etc/passwd are not expanded." (cond ((mh-assoc-string alias mh-alias-blind-alist t) alias) ; Don't expand a blind alias ((mh-assoc-string alias mh-alias-passwd-alist t) (cadr (mh-assoc-string alias mh-alias-passwd-alist t))) (t (mh-alias-ali alias)))) (mh-require 'crm nil t) ; completing-read-multiple (mh-require 'multi-prompt nil t) ;;;###mh-autoload (defun mh-read-address (prompt) "Read an address from the minibuffer with PROMPT." (mh-alias-reload-maybe) (if (not mh-alias-alist) ; If still no aliases, just prompt (read-string prompt) (let* ((minibuffer-local-completion-map mh-alias-read-address-map) (completion-ignore-case mh-alias-completion-ignore-case-flag) (the-answer (cond ((fboundp 'completing-read-multiple) (mh-funcall-if-exists completing-read-multiple prompt mh-alias-alist nil nil)) ((featurep 'multi-prompt) (mh-funcall-if-exists multi-prompt "," nil prompt mh-alias-alist nil nil)) (t (split-string (completing-read prompt mh-alias-alist nil nil) ","))))) (if (not mh-alias-expand-aliases-flag) (mapconcat 'identity the-answer ", ") ;; Loop over all elements, checking if in passwd alias or blind first (mapconcat 'mh-alias-expand the-answer ",\n "))))) ;;;###mh-autoload (defun mh-alias-minibuffer-confirm-address () "Display the alias expansion if `mh-alias-flash-on-comma' is non-nil." (interactive) (when mh-alias-flash-on-comma (save-excursion (let* ((case-fold-search t) (beg (mh-beginning-of-word)) (the-name (buffer-substring-no-properties beg (point)))) (if (mh-assoc-string the-name mh-alias-alist t) (message "%s -> %s" the-name (mh-alias-expand the-name)) ;; Check if it was a single word likely to be an alias (if (and (equal mh-alias-flash-on-comma 1) (not (string-match " " the-name))) (message "No alias for %s" the-name)))))) (self-insert-command 1)) ;;;###mh-autoload (defun mh-alias-letter-expand-alias () "Expand mail alias before point." (mh-alias-reload-maybe) (let* ((begin (mh-beginning-of-word)) (end (save-excursion (goto-char begin) (mh-beginning-of-word -1)))) (when (>= end (point)) (list begin (if (fboundp 'completion-at-point) end (point)) (if (not mh-alias-expand-aliases-flag) mh-alias-alist (lambda (string pred action) (case action ((nil) (let ((res (try-completion string mh-alias-alist pred))) (if (or (eq res t) (and (stringp res) (eq t (try-completion res mh-alias-alist pred)))) (or (mh-alias-expand (if (stringp res) res string)) res) res))) ((t) (all-completions string mh-alias-alist pred)) ((lambda) (mh-test-completion string mh-alias-alist pred))))))))) ;;; Alias File Updating (defun mh-alias-suggest-alias (string &optional no-comma-swap) "Suggest an alias for STRING. Don't reverse the order of strings separated by a comma if NO-COMMA-SWAP is non-nil." (cond ((string-match "^<\\(.*\\)>$" string) ;; -> recurse, stripping brackets. (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) ((string-match "^\\sw+$" string) ;; One word -> downcase it. (downcase string)) ((string-match "^\\(\\sw+\\)\\s-+\\(\\sw+\\)$" string) ;; Two words -> first.last (downcase (format "%s.%s" (match-string 1 string) (match-string 2 string)))) ((string-match "^\\([-a-zA-Z0-9._]+\\)@[-a-zA-z0-9_]+\\.+[a-zA-Z0-9]+$" string) ;; email only -> downcase username (downcase (match-string 1 string))) ((string-match "^\"\\(.*\\)\".*" string) ;; "Some name" -> recurse -> "Some name" (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) ((string-match "^\\(.*\\) +<.*>$" string) ;; Some name -> recurse -> Some name (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) ((string-match (concat goto-address-mail-regexp " +(\\(.*\\))$") string) ;; somename@foo.bar (Some name) -> recurse -> Some name (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) ((string-match "^\\(Dr\\|Prof\\)\\.? +\\(.*\\)" string) ;; Strip out title (mh-alias-suggest-alias (match-string 2 string) no-comma-swap)) ((string-match "^\\(.*\\), +\\(Jr\\.?\\|II+\\)$" string) ;; Strip out tails with comma (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) ((string-match "^\\(.*\\) +\\(Jr\\.?\\|II+\\)$" string) ;; Strip out tails (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) ((string-match "^\\(\\sw+\\) +[A-Z]\\.? +\\(.*\\)$" string) ;; Strip out initials (mh-alias-suggest-alias (format "%s %s" (match-string 1 string) (match-string 2 string)) no-comma-swap)) ((and (not no-comma-swap) (string-match "^\\([^,]+\\), +\\(.*\\)$" string)) ;; Reverse order of comma-separated fields to handle: ;; From: "Galbraith, Peter" ;; but don't this for a name string extracted from the passwd file ;; with mh-alias-passwd-gecos-comma-separator-flag set to nil. (mh-alias-suggest-alias (format "%s %s" (match-string 2 string) (match-string 1 string)) no-comma-swap)) (t ;; Output string, with spaces replaced by dots. (mh-alias-canonicalize-suggestion string)))) (defun mh-alias-canonicalize-suggestion (string) "Process STRING to replace spaces by periods. First all spaces and commas are replaced by periods. Then every run of consecutive periods are replaced with a single period. Finally the string is converted to lower case." (with-temp-buffer (insert string) ;; Replace spaces with periods (goto-char (point-min)) (while (re-search-forward " +" nil t) (replace-match "." nil nil)) ;; Replace commas with periods (goto-char (point-min)) (while (re-search-forward ",+" nil t) (replace-match "." nil nil)) ;; Replace consecutive periods with a single period (goto-char (point-min)) (while (re-search-forward "\\.\\.+" nil t) (replace-match "." nil nil)) ;; Convert to lower case (downcase-region (point-min) (point-max)) ;; Whew! all done... (buffer-string))) (defun mh-alias-which-file-has-alias (alias file-list) "Return the name of writable file which defines ALIAS from list FILE-LIST." (with-current-buffer (get-buffer-create mh-temp-buffer) (let ((the-list file-list) (found)) (while the-list (erase-buffer) (when (file-writable-p (car file-list)) (insert-file-contents (car file-list)) (if (re-search-forward (concat "^" (regexp-quote alias) ":") nil t) (setq found (car file-list) the-list nil) (setq the-list (cdr the-list))))) found))) (defun mh-alias-insert-file (&optional alias) "Return filename which should be used to add ALIAS. The value of the option `mh-alias-insert-file' is used if non-nil\; otherwise the value of the \"Aliasfile:\" profile component is used. If the alias already exists, try to return the name of the file that contains it." (cond ((and mh-alias-insert-file (listp mh-alias-insert-file)) (if (not (elt mh-alias-insert-file 1)) ; Only one entry, use it (car mh-alias-insert-file) (if (or (not alias) (string-equal alias (mh-alias-ali alias))) ;alias doesn't exist (completing-read "Alias file: " (mapcar 'list mh-alias-insert-file) nil t) (or (mh-alias-which-file-has-alias alias mh-alias-insert-file) (completing-read "Alias file: " (mapcar 'list mh-alias-insert-file) nil t))))) ((and mh-alias-insert-file (stringp mh-alias-insert-file)) mh-alias-insert-file) (t ;; writable ones returned from (mh-alias-filenames): (let ((autolist (delq nil (mapcar (lambda (file) (if (and (file-writable-p file) (not (string-equal file "/etc/passwd"))) file)) (mh-alias-filenames t))))) (cond ((not autolist) (error "No writable alias file; set `mh-alias-insert-file' or the \"Aliasfile:\" profile component")) ((not (elt autolist 1)) ; Only one entry, use it (car autolist)) ((or (not alias) (string-equal alias (mh-alias-ali alias))) ;alias doesn't exist (completing-read "Alias file: " (mapcar 'list autolist) nil t)) (t (or (mh-alias-which-file-has-alias alias autolist) (completing-read "Alias file: " (mapcar 'list autolist) nil t)))))))) ;;;###mh-autoload (defun mh-alias-address-to-alias (address) "Return the ADDRESS alias if defined, or nil." (let* ((aliases (mh-alias-ali address t))) (if (string-equal aliases address) nil ; ali returned same string -> no. ;; Double-check that we have an individual alias. This means that the ;; alias doesn't expand into a list (of which this address is part). (car (delq nil (mapcar (function (lambda (alias) (let ((recurse (mh-alias-ali alias nil))) (if (string-match ".*,.*" recurse) nil alias)))) (split-string aliases ", +"))))))) ;;;###mh-autoload (defun mh-alias-for-from-p () "Return t if sender's address has a corresponding alias." (mh-alias-reload-maybe) (save-excursion (if (not (mh-folder-line-matches-show-buffer-p)) nil ;No corresponding show buffer (if (eq major-mode 'mh-folder-mode) (set-buffer mh-show-buffer)) (let ((from-header (mh-extract-from-header-value))) (and from-header (mh-alias-address-to-alias from-header)))))) (defun mh-alias-add-alias-to-file (alias address &optional file) "Add ALIAS for ADDRESS in alias FILE without alias check or prompts. Prompt for alias file if not provided and there is more than one candidate. If the alias exists already, you will have the choice of inserting the new alias before or after the old alias. In the former case, this alias will be used when sending mail to this alias. In the latter case, the alias serves as an additional folder name hint when filing messages." (if (not file) (setq file (mh-alias-insert-file alias))) (with-current-buffer (find-file-noselect file) (goto-char (point-min)) (let ((alias-search (concat alias ":")) (letter) (case-fold-search t)) (cond ;; Search for exact match (if we had the same alias before) ((re-search-forward (concat "^" (regexp-quote alias-search) " *\\(.*\\)") nil t) (let ((answer (read-string (format (concat "Alias %s exists; insert new address " "[b]efore or [a]fter: ") (match-string 1)))) (case-fold-search t)) (cond ((string-match "^b" answer)) ((string-match "^a" answer) (forward-line 1)) (t (error "Unrecognized response"))))) ;; No, so sort-in at the right place ;; search for "^alias", then "^alia", etc. ((eq mh-alias-insertion-location 'sorted) (setq letter (substring alias-search -1) alias-search (substring alias-search 0 -1)) (while (and (not (equal alias-search "")) (not (re-search-forward (concat "^" (regexp-quote alias-search)) nil t))) (setq letter (substring alias-search -1) alias-search (substring alias-search 0 -1))) ;; Next, move forward to sort alphabetically for following letters (beginning-of-line) (while (re-search-forward (concat "^" (regexp-quote alias-search) "[a-" letter "]") nil t) (forward-line 1))) ((eq mh-alias-insertion-location 'bottom) (goto-char (point-max))) ((eq mh-alias-insertion-location 'top) (goto-char (point-min))))) (beginning-of-line) (insert (format "%s: %s\n" alias address)) (save-buffer))) (defun mh-alias-add-alias (alias address) "Add ALIAS for ADDRESS in personal alias file. This function prompts you for an alias and address. If the alias exists already, you will have the choice of inserting the new alias before or after the old alias. In the former case, this alias will be used when sending mail to this alias. In the latter case, the alias serves as an additional folder name hint when filing messages." (interactive "P\nP") (mh-alias-reload-maybe) (setq alias (completing-read "Alias: " mh-alias-alist nil nil alias)) (if (and address (string-match "^<\\(.*\\)>$" address)) (setq address (match-string 1 address))) (setq address (read-string "Address: " address)) (if (string-match "^<\\(.*\\)>$" address) (setq address (match-string 1 address))) (let ((address-alias (mh-alias-address-to-alias address)) (alias-address (mh-alias-expand alias))) (if (string-equal alias-address alias) (setq alias-address nil)) (cond ((and (equal alias address-alias) (equal address alias-address)) (message "Already defined as %s" alias-address)) (address-alias (if (y-or-n-p (format "Address has alias %s; set new one? " address-alias)) (mh-alias-add-alias-to-file alias address))) (t (mh-alias-add-alias-to-file alias address))))) ;;;###mh-autoload (defun mh-alias-grab-from-field () "Add alias for the sender of the current message." (interactive) (mh-alias-reload-maybe) (save-excursion (cond ((mh-folder-line-matches-show-buffer-p) (set-buffer mh-show-buffer)) ((and (eq major-mode 'mh-folder-mode) (mh-get-msg-num nil)) (set-buffer (get-buffer-create mh-temp-buffer)) (insert-file-contents (mh-msg-filename (mh-get-msg-num t)))) ((eq major-mode 'mh-folder-mode) (error "Cursor not pointing to a message"))) (let* ((address (or (mh-extract-from-header-value) (error "Message has no From: header"))) (alias (mh-alias-suggest-alias address))) (mh-alias-add-alias alias address)))) (defun mh-alias-add-address-under-point () "Insert an alias for address under point." (interactive) (let ((address (goto-address-find-address-at-point))) (if address (mh-alias-add-alias nil address) (message "No email address found under point")))) (defun mh-alias-apropos (regexp) "Show all aliases or addresses that match a regular expression REGEXP." (interactive "sAlias regexp: ") (if mh-alias-local-users (mh-alias-reload-maybe)) (let ((matches "") (group-matches "") (passwd-matches)) (save-excursion (message "Reading MH aliases...") (mh-exec-cmd-quiet t "ali" "-nolist" "-nouser") (message "Parsing MH aliases...") (while (re-search-forward regexp nil t) (beginning-of-line) (cond ((looking-at "^[ \t]") ;Continuation line (setq group-matches (concat group-matches (buffer-substring (save-excursion (or (re-search-backward "^[^ \t]" nil t) (point))) (progn (if (re-search-forward "^[^ \t]" nil t) (forward-char -1)) (point)))))) (t (setq matches (concat matches (buffer-substring (point)(progn (end-of-line)(point))) "\n"))))) (message "Parsing MH aliases...done") (when mh-alias-local-users (message "Making passwd aliases...") (setq passwd-matches (mapconcat (lambda (elem) (if (or (string-match regexp (car elem)) (string-match regexp (cadr elem))) (format "%s: %s\n" (car elem) (cadr elem)))) mh-alias-passwd-alist "")) (message "Making passwd aliases...done"))) (if (and (string-equal "" matches) (string-equal "" group-matches) (string-equal "" passwd-matches)) (message "No matches") (with-output-to-temp-buffer mh-aliases-buffer (if (not (string-equal "" matches)) (princ matches)) (when (not (string-equal group-matches "")) (princ "\nGroup Aliases:\n\n") (princ group-matches)) (when (not (string-equal passwd-matches "")) (princ "\nLocal User Aliases:\n\n") (princ passwd-matches)))))) (defun mh-folder-line-matches-show-buffer-p () "Return t if the message under point in folder-mode is in the show buffer. Return nil in any other circumstance (no message under point, no show buffer, the message in the show buffer doesn't match." (and (eq major-mode 'mh-folder-mode) (mh-get-msg-num nil) mh-show-buffer (get-buffer mh-show-buffer) (buffer-file-name (get-buffer mh-show-buffer)) (string-match ".*/\\([0-9]+\\)$" (buffer-file-name (get-buffer mh-show-buffer))) (string-equal (match-string 1 (buffer-file-name (get-buffer mh-show-buffer))) (int-to-string (mh-get-msg-num nil))))) (provide 'mh-alias) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-alias.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-acros.el0000644000175000000620000003076312114520723017465 0ustar wohlerstaff;;; mh-acros.el --- macros used in MH-E ;; Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; This file contains all macros that are used in more than one file. ;; If you run "make recompile" in Bazaar Emacs and see the message ;; "Source is newer than compiled," it is a sign that macro probably ;; needs to be moved here. ;; Historically, it was so named with a silent "m" so that it would be ;; compiled first. Otherwise, "make recompile" in Bazaar Emacs would use ;; compiled files with stale macro definitions. Later, no-byte-compile ;; was added to the Local Variables section to avoid this problem and ;; because it's pointless to compile a file full of macros. But we ;; kept the name. ;;; Change Log: ;;; Code: (require 'cl) ;;; Compatibility ;;;###mh-autoload (defmacro mh-require-cl () "Macro to load \"cl\" if needed. Emacs coding conventions require that the \"cl\" package not be required at runtime. However, the \"cl\" package in Emacs 21.4 and earlier left \"cl\" routines in their macro expansions. In particular, the expansion of (setf (gethash ...) ...) used functions in \"cl\" at run time. This macro recognizes that and loads \"cl\" appropriately." (if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash) `(require 'cl) `(eval-when-compile (require 'cl)))) ;;;###mh-autoload (defmacro mh-do-in-gnu-emacs (&rest body) "Execute BODY if in GNU Emacs." (declare (debug t)) (unless (featurep 'xemacs) `(progn ,@body))) (put 'mh-do-in-gnu-emacs 'lisp-indent-hook 'defun) ;;;###mh-autoload (defmacro mh-do-in-xemacs (&rest body) "Execute BODY if in XEmacs." (declare (debug t)) (when (featurep 'xemacs) `(progn ,@body))) (put 'mh-do-in-xemacs 'lisp-indent-hook 'defun) ;;;###mh-autoload (defmacro mh-funcall-if-exists (function &rest args) "Call FUNCTION with ARGS as parameters if it exists." (when (fboundp function) `(when (fboundp ',function) (funcall ',function ,@args)))) ;;;###mh-autoload (defmacro defun-mh (name function arg-list &rest body) "Create function NAME. If FUNCTION exists, then NAME becomes an alias for FUNCTION. Otherwise, create function NAME with ARG-LIST and BODY." (let ((defined-p (fboundp function))) (if defined-p `(defalias ',name ',function) `(defun ,name ,arg-list ,@body)))) (put 'defun-mh 'lisp-indent-function 'defun) (put 'defun-mh 'doc-string-elt 4) ;;;###mh-autoload (defmacro defmacro-mh (name macro arg-list &rest body) "Create macro NAME. If MACRO exists, then NAME becomes an alias for MACRO. Otherwise, create macro NAME with ARG-LIST and BODY." (let ((defined-p (fboundp macro))) (if defined-p `(defalias ',name ',macro) `(defmacro ,name ,arg-list ,@body)))) (put 'defmacro-mh 'lisp-indent-function 'defun) (put 'defmacro-mh 'doc-string-elt 4) ;;; Miscellaneous ;;;###mh-autoload (defmacro mh-make-local-hook (hook) "Make HOOK local if needed. XEmacs and versions of GNU Emacs before 21.1 require `make-local-hook' to be called." (when (and (fboundp 'make-local-hook) (not (get 'make-local-hook 'byte-obsolete-info))) `(make-local-hook ,hook))) ;;;###mh-autoload (defmacro mh-mark-active-p (check-transient-mark-mode-flag) "A macro that expands into appropriate code in XEmacs and nil in GNU Emacs. In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if variable `transient-mark-mode' is active." (cond ((featurep 'xemacs) ;XEmacs `(and (boundp 'zmacs-regions) zmacs-regions (region-active-p))) ((not check-transient-mark-mode-flag) ;GNU Emacs `(and (boundp 'mark-active) mark-active)) (t ;GNU Emacs `(and (boundp 'transient-mark-mode) transient-mark-mode (boundp 'mark-active) mark-active)))) ;; Shush compiler. (mh-do-in-xemacs (defvar struct) (defvar x) (defvar y)) ;;;###mh-autoload (defmacro mh-defstruct (name-spec &rest fields) "Replacement for `defstruct' from the \"cl\" package. The `defstruct' in the \"cl\" library produces compiler warnings, and generates code that uses functions present in \"cl\" at run-time. This is a partial replacement, that avoids these issues. NAME-SPEC declares the name of the structure, while FIELDS describes the various structure fields. Lookup `defstruct' for more details." (let* ((struct-name (if (atom name-spec) name-spec (car name-spec))) (conc-name (or (and (consp name-spec) (cadr (assoc :conc-name (cdr name-spec)))) (format "%s-" struct-name))) (predicate (intern (format "%s-p" struct-name))) (constructor (or (and (consp name-spec) (cadr (assoc :constructor (cdr name-spec)))) (intern (format "make-%s" struct-name)))) (field-names (mapcar #'(lambda (x) (if (atom x) x (car x))) fields)) (field-init-forms (mapcar #'(lambda (x) (and (consp x) (cadr x))) fields)) (struct (gensym "S")) (x (gensym "X")) (y (gensym "Y"))) `(progn (defun* ,constructor (&key ,@(mapcar* #'(lambda (x y) (list x y)) field-names field-init-forms)) (list (quote ,struct-name) ,@field-names)) (defun ,predicate (arg) (and (consp arg) (eq (car arg) (quote ,struct-name)))) ,@(loop for x from 1 for y in field-names collect `(defmacro ,(intern (format "%s%s" conc-name y)) (z) (list 'nth ,x z))) (quote ,struct-name)))) ;;;###mh-autoload (defmacro with-mh-folder-updating (save-modification-flag &rest body) "Format is (with-mh-folder-updating (SAVE-MODIFICATION-FLAG) &body BODY). Execute BODY, which can modify the folder buffer without having to worry about file locking or the read-only flag, and return its result. If SAVE-MODIFICATION-FLAG is non-nil, the buffer's modification flag is unchanged, otherwise it is cleared." (declare (debug t)) (setq save-modification-flag (car save-modification-flag)) ; CL style `(prog1 (let ((mh-folder-updating-mod-flag (buffer-modified-p)) (buffer-read-only nil) (buffer-file-name nil)) ;don't let the buffer get locked (prog1 (progn ,@body) (mh-set-folder-modified-p mh-folder-updating-mod-flag))) ,@(if (not save-modification-flag) '((mh-set-folder-modified-p nil))))) (put 'with-mh-folder-updating 'lisp-indent-hook 'defun) ;;;###mh-autoload (defmacro mh-in-show-buffer (show-buffer &rest body) "Format is (mh-in-show-buffer (SHOW-BUFFER) &body BODY). Display buffer SHOW-BUFFER in other window and execute BODY in it. Stronger than `save-excursion', weaker than `save-window-excursion'." (declare (debug t)) (setq show-buffer (car show-buffer)) ; CL style `(let ((mh-in-show-buffer-saved-window (selected-window))) (switch-to-buffer-other-window ,show-buffer) (if mh-bury-show-buffer-flag (bury-buffer (current-buffer))) (unwind-protect (progn ,@body) (select-window mh-in-show-buffer-saved-window)))) (put 'mh-in-show-buffer 'lisp-indent-hook 'defun) ;;;###mh-autoload (defmacro mh-do-at-event-location (event &rest body) "Switch to the location of EVENT and execute BODY. After BODY has been executed return to original window. The modification flag of the buffer in the event window is preserved." (declare (debug t)) (let ((event-window (make-symbol "event-window")) (event-position (make-symbol "event-position")) (original-window (make-symbol "original-window")) (original-position (make-symbol "original-position")) (modified-flag (make-symbol "modified-flag"))) `(save-excursion (let* ((,event-window (or (mh-funcall-if-exists posn-window (event-start ,event)) (mh-funcall-if-exists event-window ,event))) (,event-position (or (mh-funcall-if-exists posn-point (event-start ,event)) (mh-funcall-if-exists event-closest-point ,event))) (,original-window (selected-window)) (,original-position (progn (set-buffer (window-buffer ,event-window)) (point-marker))) (,modified-flag (buffer-modified-p)) (buffer-read-only nil)) (unwind-protect (progn (select-window ,event-window) (goto-char ,event-position) ,@body) (set-buffer-modified-p ,modified-flag) (goto-char ,original-position) (set-marker ,original-position nil) (select-window ,original-window)))))) (put 'mh-do-at-event-location 'lisp-indent-hook 'defun) ;;; Sequences and Ranges ;;;###mh-autoload (defsubst mh-seq-msgs (sequence) "Extract messages from the given SEQUENCE." (cdr sequence)) ;;;###mh-autoload (defmacro mh-iterate-on-messages-in-region (var begin end &rest body) "Iterate over region. VAR is bound to the message on the current line as we loop starting from BEGIN till END. In each step BODY is executed. If VAR is nil then the loop is executed without any binding." (declare (debug (symbolp body))) (unless (symbolp var) (error "Can not bind the non-symbol %s" var)) (let ((binding-needed-flag var)) `(save-excursion (goto-char ,begin) (beginning-of-line) (while (and (<= (point) ,end) (not (eobp))) (when (looking-at mh-scan-valid-regexp) (let ,(if binding-needed-flag `((,var (mh-get-msg-num t))) ()) ,@body)) (forward-line 1))))) (put 'mh-iterate-on-messages-in-region 'lisp-indent-hook 'defun) ;;;###mh-autoload (defmacro mh-iterate-on-range (var range &rest body) "Iterate an operation over a region or sequence. VAR is bound to each message in turn in a loop over RANGE, which can be a message number, a list of message numbers, a sequence, a region in a cons cell, or a MH range (something like last:20) in a string. In each iteration, BODY is executed. The parameter RANGE is usually created with `mh-interactive-range' in order to provide a uniform interface to MH-E functions." (declare (debug (symbolp body))) (unless (symbolp var) (error "Can not bind the non-symbol %s" var)) (let ((binding-needed-flag var) (msgs (make-symbol "msgs")) (seq-hash-table (make-symbol "seq-hash-table"))) `(cond ((numberp ,range) (when (mh-goto-msg ,range t t) (let ,(if binding-needed-flag `((,var ,range)) ()) ,@body))) ((and (consp ,range) (numberp (car ,range)) (numberp (cdr ,range))) (mh-iterate-on-messages-in-region ,var (car ,range) (cdr ,range) ,@body)) (t (let ((,msgs (cond ((and ,range (symbolp ,range)) (mh-seq-to-msgs ,range)) ((stringp ,range) (mh-translate-range mh-current-folder ,range)) (t ,range))) (,seq-hash-table (make-hash-table))) (dolist (msg ,msgs) (setf (gethash msg ,seq-hash-table) t)) (mh-iterate-on-messages-in-region v (point-min) (point-max) (when (gethash v ,seq-hash-table) (let ,(if binding-needed-flag `((,var v)) ()) ,@body)))))))) (put 'mh-iterate-on-range 'lisp-indent-hook 'defun) (provide 'mh-acros) ;; Local Variables: ;; no-byte-compile: t ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-acros.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-compat.el0000644000175000000620000003500412114520723017632 0ustar wohlerstaff;;; mh-compat.el --- make MH-E compatible with various versions of Emacs ;; Copyright (C) 2006-2013 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: ;; This is a good place to gather code that is used for compatibility ;; between different versions of Emacs. Please document which versions ;; of Emacs that the defsubst, defalias, or defmacro applies. That ;; way, it's easy to occasionally go through this file and see which ;; macros we can retire. ;; Please use mh-gnus.el when providing compatibility with different ;; versions of Gnus. ;; Items are listed alphabetically (except for mh-require which is ;; needed sooner it would normally appear). (require 'mh-acros) (mh-do-in-gnu-emacs (defalias 'mh-require 'require)) (mh-do-in-xemacs (defun mh-require (feature &optional filename noerror) "If feature FEATURE is not loaded, load it from FILENAME. If FEATURE is not a member of the list `features', then the feature is not loaded; so load the file FILENAME. If FILENAME is omitted, the printname of FEATURE is used as the file name. If the optional third argument NOERROR is non-nil, then return nil if the file is not found instead of signaling an error. Simulate NOERROR argument in XEmacs which lacks it." (if (not (featurep feature)) (if filename (load filename noerror t) (load (format "%s" feature) noerror t))))) (defun-mh mh-assoc-string assoc-string (key list case-fold) "Like `assoc' but specifically for strings. Case is ignored if CASE-FOLD is non-nil. This function is used by Emacs versions that lack `assoc-string', introduced in Emacs 22." (if case-fold (assoc-ignore-case key list) (assoc key list))) ;; For XEmacs. (defalias 'mh-cancel-timer (if (fboundp 'cancel-timer) 'cancel-timer 'delete-itimer)) ;; Emacs 24 renamed flet to cl-flet. (defalias 'mh-cl-flet (if (fboundp 'cl-flet) 'cl-flet 'flet)) (defun mh-display-color-cells (&optional display) "Return the number of color cells supported by DISPLAY. This function is used by XEmacs to return 2 when `device-color-cells' or `display-color-cells' returns nil. This happens when compiling or running on a tty and causes errors since `display-color-cells' is expected to return an integer." (cond ((fboundp 'display-color-cells) ; GNU Emacs, XEmacs 21.5b28 (or (display-color-cells display) 2)) ((fboundp 'device-color-cells) ; XEmacs 21.4 (or (device-color-cells display) 2)) (t 2))) (defmacro mh-display-completion-list (completions &optional common-substring) "Display the list of COMPLETIONS. See documentation for `display-completion-list' for a description of the arguments COMPLETIONS and perhaps COMMON-SUBSTRING. This macro is used by Emacs versions that lack a COMMON-SUBSTRING argument, introduced in Emacs 22." (if (< emacs-major-version 22) `(display-completion-list ,completions) `(display-completion-list ,completions ,common-substring))) (defmacro mh-face-foreground (face &optional frame inherit) "Return the foreground color name of FACE, or nil if unspecified. See documentation for `face-foreground' for a description of the arguments FACE, FRAME, and perhaps INHERIT. This macro is used by Emacs versions that lack an INHERIT argument, introduced in Emacs 22." (if (< emacs-major-version 22) `(face-foreground ,face ,frame) `(face-foreground ,face ,frame ,inherit))) (defmacro mh-face-background (face &optional frame inherit) "Return the background color name of face, or nil if unspecified. See documentation for `back-foreground' for a description of the arguments FACE, FRAME, and INHERIT. This macro is used by Emacs versions that lack an INHERIT argument, introduced in Emacs 22." (if (< emacs-major-version 22) `(face-background ,face ,frame) `(face-background ,face ,frame ,inherit))) (defun-mh mh-font-lock-add-keywords font-lock-add-keywords (mode keywords &optional how) "XEmacs does not have `font-lock-add-keywords'. This function returns nil on that system.") (defun-mh mh-image-load-path-for-library image-load-path-for-library (library image &optional path no-error) "Return a suitable search path for images used by LIBRARY. It searches for IMAGE in `image-load-path' (excluding \"`data-directory'/images\") and `load-path', followed by a path suitable for LIBRARY, which includes \"../../etc/images\" and \"../etc/images\" relative to the library file itself, and then in \"`data-directory'/images\". Then this function returns a list of directories which contains first the directory in which IMAGE was found, followed by the value of `load-path'. If PATH is given, it is used instead of `load-path'. If NO-ERROR is non-nil and a suitable path can't be found, don't signal an error. Instead, return a list of directories as before, except that nil appears in place of the image directory. Here is an example that uses a common idiom to provide compatibility with versions of Emacs that lack the variable `image-load-path': ;; Shush compiler. (defvar image-load-path) (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\")) (image-load-path (cons (car load-path) (when (boundp 'image-load-path) image-load-path)))) (mh-tool-bar-folder-buttons-init))" (unless library (error "No library specified")) (unless image (error "No image specified")) (let (image-directory image-directory-load-path) ;; Check for images in image-load-path or load-path. (let ((img image) (dir (or ;; Images in image-load-path. (mh-image-search-load-path image) ;; Images in load-path. (locate-library image))) parent) ;; Since the image might be in a nested directory (for ;; example, mail/attach.pbm), adjust `image-directory' ;; accordingly. (when dir (setq dir (file-name-directory dir)) (while (setq parent (file-name-directory img)) (setq img (directory-file-name parent) dir (expand-file-name "../" dir)))) (setq image-directory-load-path dir)) ;; If `image-directory-load-path' isn't Emacs's image directory, ;; it's probably a user preference, so use it. Then use a ;; relative setting if possible; otherwise, use ;; `image-directory-load-path'. (cond ;; User-modified image-load-path? ((and image-directory-load-path (not (equal image-directory-load-path (file-name-as-directory (expand-file-name "images" data-directory))))) (setq image-directory image-directory-load-path)) ;; Try relative setting. ((let (library-name d1ei d2ei) ;; First, find library in the load-path. (setq library-name (locate-library library)) (if (not library-name) (error "Cannot find library %s in load-path" library)) ;; And then set image-directory relative to that. (setq ;; Go down 2 levels. d2ei (file-name-as-directory (expand-file-name (concat (file-name-directory library-name) "../../etc/images"))) ;; Go down 1 level. d1ei (file-name-as-directory (expand-file-name (concat (file-name-directory library-name) "../etc/images")))) (setq image-directory ;; Set it to nil if image is not found. (cond ((file-exists-p (expand-file-name image d2ei)) d2ei) ((file-exists-p (expand-file-name image d1ei)) d1ei))))) ;; Use Emacs's image directory. (image-directory-load-path (setq image-directory image-directory-load-path)) (no-error (message "Could not find image %s for library %s" image library)) (t (error "Could not find image %s for library %s" image library))) ;; Return an augmented `path' or `load-path'. (nconc (list image-directory) (delete image-directory (copy-sequence (or path load-path)))))) (defun-mh mh-image-search-load-path image-search-load-path (file &optional path) "Emacs 21 and XEmacs don't have `image-search-load-path'. This function returns nil on those systems." nil) ;; For XEmacs. (defalias 'mh-line-beginning-position (if (fboundp 'line-beginning-position) 'line-beginning-position 'point-at-bol)) ;; For XEmacs. (defalias 'mh-line-end-position (if (fboundp 'line-end-position) 'line-end-position 'point-at-eol)) (mh-require 'mailabbrev nil t) (defun-mh mh-mail-abbrev-make-syntax-table mail-abbrev-make-syntax-table () "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'. This function returns nil on those systems." nil) (defmacro mh-define-obsolete-variable-alias (obsolete-name current-name &optional when docstring) "Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete. See documentation for `define-obsolete-variable-alias' for a description of the arguments OBSOLETE-NAME, CURRENT-NAME, and perhaps WHEN and DOCSTRING. This macro is used by XEmacs that lacks WHEN and DOCSTRING arguments." (if (featurep 'xemacs) `(define-obsolete-variable-alias ,obsolete-name ,current-name) `(define-obsolete-variable-alias ,obsolete-name ,current-name ,when ,docstring))) (defmacro mh-make-obsolete-variable (obsolete-name current-name &optional when access-type) "Make the byte-compiler warn that OBSOLETE-NAME is obsolete. See documentation for `make-obsolete-variable' for a description of the arguments OBSOLETE-NAME, CURRENT-NAME, and perhaps WHEN and ACCESS-TYPE. This macro is used by XEmacs that lacks WHEN and ACCESS-TYPE arguments." (if (featurep 'xemacs) `(make-obsolete-variable ,obsolete-name ,current-name) `(make-obsolete-variable ,obsolete-name ,current-name ,when ,access-type))) (defmacro mh-make-obsolete-variable (obsolete-name current-name &optional when access-type) "Make the byte-compiler warn that OBSOLETE-NAME is obsolete. See documentation for `make-obsolete-variable' for a description of the arguments OBSOLETE-NAME, CURRENT-NAME, and perhaps WHEN and ACCESS-TYPE. This macro is used by XEmacs that lacks WHEN and ACCESS-TYPE arguments and by Emacs versions that lack ACCESS-TYPE, introduced in Emacs 24." (if (featurep 'xemacs) `(make-obsolete-variable ,obsolete-name ,current-name) (if (< emacs-major-version 24) `(make-obsolete-variable ,obsolete-name ,current-name ,when) `(make-obsolete-variable ,obsolete-name ,current-name ,when ,access-type)))) (defun-mh mh-match-string-no-properties match-string-no-properties (num &optional string) "Return string of text matched by last search, without text properties. This function is used by XEmacs that lacks `match-string-no-properties'. The function `buffer-substring-no-properties' is used instead. The argument STRING is ignored." (buffer-substring-no-properties (match-beginning num) (match-end num))) (defun-mh mh-replace-regexp-in-string replace-regexp-in-string (regexp rep string &optional fixedcase literal subexp start) "Replace REGEXP with REP everywhere in STRING and return result. This function is used by XEmacs that lacks `replace-regexp-in-string'. The function `replace-in-string' is used instead. The arguments FIXEDCASE, SUBEXP, and START, used by `replace-in-string' are ignored." (replace-in-string string regexp rep literal)) (defun-mh mh-test-completion test-completion (string collection &optional predicate) "Return non-nil if STRING is a valid completion. XEmacs does not have `test-completion'. This function returns nil on that system." nil) ;; Copy of constant from url-util.el in Emacs 22; needed by Emacs 21. (if (not (boundp 'url-unreserved-chars)) (defconst mh-url-unreserved-chars '( ?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z ?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?- ?_ ?. ?! ?~ ?* ?' ?\( ?\)) "A list of characters that are _NOT_ reserved in the URL spec. This is taken from RFC 2396.")) (defun-mh mh-url-hexify-string url-hexify-string (str) "Escape characters in a string. This is a copy of `url-hexify-string' from url-util.el in Emacs 22; needed by Emacs 21." (mapconcat (lambda (char) ;; Fixme: use a char table instead. (if (not (memq char mh-url-unreserved-chars)) (if (> char 255) (error "Hexifying multibyte character %s" str) (format "%%%02X" char)) (char-to-string char))) str "")) (defun-mh mh-view-mode-enter view-mode-enter (&optional return-to exit-action) "Enter View mode. This function is used by XEmacs that lacks `view-mode-enter'. The function `view-mode' is used instead. The arguments RETURN-TO and EXIT-ACTION are ignored." ;; Shush compiler. (if return-to nil) (if exit-action nil) (view-mode 1)) (defun-mh mh-window-full-height-p window-full-height-p (&optional WINDOW) "Return non-nil if WINDOW is not the result of a vertical split. This function is defined in XEmacs as it lacks `window-full-height-p'. The values of the functions `window-height' and `frame-height' are compared instead. The argument WINDOW is ignored." (= (1+ (window-height)) (frame-height))) (defmacro mh-write-file-functions () "Return `write-file-functions' if it exists. Otherwise return `local-write-file-hooks'. This macro exists purely for compatibility. The former symbol is used in Emacs 22 onward while the latter is used in previous versions and XEmacs." (if (boundp 'write-file-functions) ''write-file-functions ;Emacs 22 on ''local-write-file-hooks)) ;XEmacs (provide 'mh-compat) ;; Local Variables: ;; no-byte-compile: t ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-compat.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-loaddefs.el0000644000175000000620000032046712114520723020142 0ustar wohlerstaff;;; mh-loaddefs.el --- automatically extracted internal autoloads for MH-E ;; ;; Copyright (C) 2003-2012 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Keywords: mail ;;; Commentary: ;;; Change Log: ;;; Code: ;;;### (autoloads (mh-alias-grab-from-field 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-expand mh-alias-reload-maybe) "mh-alias" ;;;;;; "mh-alias.el" (20731 1727)) ;;; Generated autoloads from mh-alias.el (autoload 'mh-alias-reload-maybe "mh-alias" "\ Load new MH aliases. \(fn)" nil nil) (autoload 'mh-alias-expand "mh-alias" "\ Return expansion for ALIAS. Blind aliases or users from /etc/passwd are not expanded. \(fn ALIAS)" nil nil) (autoload 'mh-read-address "mh-alias" "\ Read an address from the minibuffer with PROMPT. \(fn PROMPT)" nil nil) (autoload 'mh-alias-minibuffer-confirm-address "mh-alias" "\ Display the alias expansion if `mh-alias-flash-on-comma' is non-nil. \(fn)" t nil) (autoload 'mh-alias-letter-expand-alias "mh-alias" "\ Expand mail alias before point. \(fn)" nil nil) (autoload 'mh-alias-address-to-alias "mh-alias" "\ Return the ADDRESS alias if defined, or nil. \(fn ADDRESS)" nil nil) (autoload 'mh-alias-for-from-p "mh-alias" "\ Return t if sender's address has a corresponding alias. \(fn)" nil nil) (autoload 'mh-alias-grab-from-field "mh-alias" "\ Add alias for the sender of the current message. \(fn)" t nil) ;;;*** ;;;### (autoloads (mh-insert-auto-fields mh-show-buffer-message-number ;;;;;; mh-send mh-reply mh-redistribute mh-forward mh-extract-rejected-mail ;;;;;; mh-edit-again) "mh-comp" "mh-comp.el" (20786 37831)) ;;; Generated autoloads from mh-comp.el (autoload 'mh-edit-again "mh-comp" "\ Edit a MESSAGE to send it again. If you don't complete a draft for one reason or another, and if the draft buffer is no longer available, you can pick your draft up again with this command. If you don't use a draft folder, your last \"draft\" file will be used. If you use draft folders, you'll need to visit the draft folder with \"\\[mh-visit-folder] drafts \", use \\[mh-next-undeleted-msg] to move to the appropriate message, and then use \\[mh-edit-again] to prepare the message for editing. This command can also be used to take messages that were sent to you and to send them to more people. Don't use this command to re-edit a message from a Mailer-Daemon who complained that your mail wasn't posted for some reason or another (see `mh-extract-rejected-mail'). The default message is the current message. See also `mh-send'. \(fn MESSAGE)" t nil) (autoload 'mh-extract-rejected-mail "mh-comp" "\ Edit a MESSAGE that was returned by the mail system. This command prepares the message for editing by removing the Mailer-Daemon envelope and unneeded header fields. Fix whatever addressing problem you had, and send the message again with \\[mh-send-letter]. The default message is the current message. See also `mh-send'. \(fn MESSAGE)" t nil) (autoload 'mh-forward "mh-comp" "\ Forward message. You are prompted for the TO and CC recipients. You are given a draft to edit that looks like it would if you had run the MH command \"forw\". You can then add some text. You can forward several messages by using a RANGE. All of the messages in the range are inserted into your draft. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. The hook `mh-forward-hook' is called on the draft. See also `mh-compose-forward-as-mime-flag', `mh-forward-subject-format', and `mh-send'. \(fn TO CC &optional RANGE)" t nil) (autoload 'mh-redistribute "mh-comp" "\ Redistribute a message. This command is similar in function to forwarding mail, but it does not allow you to edit the message, nor does it add your name to the \"From\" header field. It appears to the recipient as if the message had come from the original sender. When you run this command, you are prompted for the TO and CC recipients. The default MESSAGE is the current message. Also investigate the command \\[mh-edit-again] for another way to redistribute messages. See also `mh-redist-full-contents-flag'. The hook `mh-annotate-msg-hook' is run after annotating the message and scan line. \(fn TO CC &optional MESSAGE)" t nil) (autoload 'mh-reply "mh-comp" "\ Reply to a MESSAGE. When you reply to a message, you are first prompted with \"Reply to whom?\" (unless the optional argument REPLY-TO is provided). You have several choices here. Response Reply Goes To from The person who sent the message. This is the default, so is sufficient. to Replies to the sender, plus all recipients in the \"To:\" header field. all cc Forms a reply to the addresses in the \"Mail-Followup-To:\" header field if one exists; otherwise forms a reply to the sender, plus all recipients. Depending on your answer, \"repl\" is given a different argument to form your reply. Specifically, a choice of \"from\" or none at all runs \"repl -nocc all\", and a choice of \"to\" runs \"repl -cc to\". Finally, either \"cc\" or \"all\" runs \"repl -cc all -nocc me\". Two windows are then created. One window contains the message to which you are replying in an MH-Show buffer. Your draft, in MH-Letter mode (*note `mh-letter-mode'), is in the other window. If the reply draft was not one that you expected, check the things that affect the behavior of \"repl\" which include the \"repl:\" profile component and the \"replcomps\" and \"replgroupcomps\" files. If you supply a prefix argument INCLUDEP, the message you are replying to is inserted in your reply after having first been run through \"mhl\" with the format file \"mhl.reply\". Alternatively, you can customize the option `mh-yank-behavior' and choose one of its \"Automatically\" variants to do the same thing. If you do so, the prefix argument has no effect. Another way to include the message automatically in your draft is to use \"repl: -filter repl.filter\" in your MH profile. If you wish to customize the header or other parts of the reply draft, please see \"repl\" and \"mh-format\". See also `mh-reply-show-message-flag', `mh-reply-default-reply-to', and `mh-send'. \(fn MESSAGE &optional REPLY-TO INCLUDEP)" t nil) (autoload 'mh-send "mh-comp" "\ Compose a message. Your letter appears in an Emacs buffer whose mode is MH-Letter (see `mh-letter-mode'). The arguments TO, CC, and SUBJECT can be used to prefill the draft fields or suppress the prompts if `mh-compose-prompt-flag' is on. They are also passed to the function set in the option `mh-compose-letter-function'. See also `mh-insert-x-mailer-flag' and `mh-letter-mode-hook'. Outside of an MH-Folder buffer (`mh-folder-mode'), you must call either \\[mh-smail] or \\[mh-smail-other-window] to compose a new message. \(fn TO CC SUBJECT)" t nil) (autoload 'mh-show-buffer-message-number "mh-comp" "\ Message number of displayed message in corresponding show buffer. Return nil if show buffer not displayed. If in `mh-letter-mode', don't display the message number being replied to, but rather the message number of the show buffer associated with our originating folder buffer. Optional argument BUFFER can be used to specify the buffer. \(fn &optional BUFFER)" nil nil) (autoload 'mh-insert-auto-fields "mh-comp" "\ Insert custom fields if recipient is found in `mh-auto-fields-list'. Once the header contains one or more recipients, you may run this command to insert these fields manually. However, if you use this command, the automatic insertion when the message is sent is disabled. In a program, set buffer-local `mh-insert-auto-fields-done-local' if header fields were added. If NON-INTERACTIVE is non-nil, perform actions quietly and only if `mh-insert-auto-fields-done-local' is nil. Return t if fields added; otherwise return nil. \(fn &optional NON-INTERACTIVE)" t nil) ;;;*** ;;;### (autoloads (mh-msg-filename mh-refile-a-msg mh-delete-a-msg ;;;;;; mh-folder-from-address mh-prompt-for-refile-folder mh-next-msg ;;;;;; mh-reset-threads-and-narrowing mh-regenerate-headers mh-process-or-undo-commands ;;;;;; mh-scan-folder mh-make-folder-mode-line mh-set-folder-modified-p ;;;;;; mh-outstanding-commands-p mh-recenter mh-goto-cur-msg mh-update-sequences ;;;;;; mh-write-msg-to-file mh-visit-folder mh-undo mh-toggle-showing ;;;;;; mh-rescan-folder mh-refile-or-write-again mh-refile-msg mh-quit ;;;;;; mh-previous-unread-msg mh-previous-undeleted-msg mh-previous-page ;;;;;; mh-prev-button mh-page-msg mh-next-unread-msg mh-next-undeleted-msg ;;;;;; mh-next-button mh-modify mh-last-msg mh-inc-folder mh-goto-msg ;;;;;; mh-first-msg mh-execute-commands mh-delete-msg-no-motion ;;;;;; mh-delete-msg) "mh-folder" "mh-folder.el" (20786 37831)) ;;; Generated autoloads from mh-folder.el (autoload 'mh-delete-msg "mh-folder" "\ Delete RANGE\\. To mark a message for deletion, use this command. A \"D\" is placed by the message in the scan window, and the next undeleted message is displayed. If the previous command had been \\[mh-previous-undeleted-msg], then the next message displayed is the first undeleted message previous to the message just deleted. Use \\[mh-next-undeleted-msg] to force subsequent \\[mh-delete-msg] commands to move forward to the next undeleted message after deleting the message under the cursor. The hook `mh-delete-msg-hook' is called after you mark a message for deletion. For example, a past maintainer of MH-E used this once when he kept statistics on his mail usage. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE)" t nil) (autoload 'mh-delete-msg-no-motion "mh-folder" "\ Delete RANGE, don't move to next message. This command marks the RANGE for deletion but leaves the cursor at the current message in case you wish to perform other operations on the message. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE)" t nil) (autoload 'mh-execute-commands "mh-folder" "\ Perform outstanding operations\\. If you've marked messages to be refiled, deleted, blacklisted, or whitelisted and you want to go ahead and perform these operations on these messages, use this command. Many MH-E commands that may affect the numbering of the messages (such as \\[mh-rescan-folder] or \\[mh-pack-folder]) will ask if you want to perform these operations first and then either run this command for you or undo the pending operations. This function runs `mh-before-commands-processed-hook' before the commands are processed and `mh-after-commands-processed-hook' after the commands are processed. \(fn)" t nil) (autoload 'mh-first-msg "mh-folder" "\ Display first message. \(fn)" t nil) (autoload 'mh-goto-msg "mh-folder" "\ Go to a message\\. You can enter the message NUMBER either before or after typing \\[mh-goto-msg]. In the latter case, Emacs prompts you. In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means return nil instead of signaling an error if message does not exist; in this case, the cursor is positioned near where the message would have been. Non-nil third argument DONT-SHOW means not to show the message. \(fn NUMBER &optional NO-ERROR-IF-NO-MESSAGE DONT-SHOW)" t nil) (autoload 'mh-inc-folder "mh-folder" "\ Incorporate new mail into a folder. You can incorporate mail from any file into the current folder by specifying a prefix argument; you'll be prompted for the name of the FILE to use as well as the destination FOLDER The hook `mh-inc-folder-hook' is run after incorporating new mail. Do not call this function from outside MH-E; use \\[mh-rmail] instead. \(fn &optional FILE FOLDER)" t nil) (autoload 'mh-last-msg "mh-folder" "\ Display last message. \(fn)" t nil) (autoload 'mh-modify "mh-folder" "\ Edit message. There are times when you need to edit a message. For example, you may need to fix a broken Content-Type header field. You can do this with this command. It displays the raw message in an editable buffer. When you are done editing, save and kill the buffer as you would any other. From a program, edit MESSAGE; nil means edit current message. \(fn &optional MESSAGE)" t nil) (autoload 'mh-next-button "mh-folder" "\ Go to the next button. If the end of the buffer is reached then the search wraps over to the start of the buffer. If an optional prefix argument BACKWARD-FLAG is given, the cursor will move to the previous button. \(fn &optional BACKWARD-FLAG)" t nil) (autoload 'mh-next-undeleted-msg "mh-folder" "\ Display next message. This command can be given a prefix argument COUNT to specify how many unread messages to skip. In a program, pause for a second after printing message if we are at the last undeleted message and optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil. \(fn &optional COUNT WAIT-AFTER-COMPLAINING-FLAG)" t nil) (autoload 'mh-next-unread-msg "mh-folder" "\ Display next unread message. This command can be given a prefix argument COUNT to specify how many unread messages to skip. \(fn &optional COUNT)" t nil) (autoload 'mh-page-msg "mh-folder" "\ Display next page in message. You can give this command a prefix argument that specifies the number of LINES to scroll. This command will also show the next undeleted message if it is used at the bottom of a message. \(fn &optional LINES)" t nil) (autoload 'mh-prev-button "mh-folder" "\ Go to the previous button. If the beginning of the buffer is reached then the search wraps over to the end of the buffer. \(fn)" t nil) (autoload 'mh-previous-page "mh-folder" "\ Display next page in message. You can give this command a prefix argument that specifies the number of LINES to scroll. \(fn &optional LINES)" t nil) (autoload 'mh-previous-undeleted-msg "mh-folder" "\ Display previous message. This command can be given a prefix argument COUNT to specify how many unread messages to skip. In a program, pause for a second after printing message if we are at the last undeleted message and optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil. \(fn &optional COUNT WAIT-AFTER-COMPLAINING-FLAG)" t nil) (autoload 'mh-previous-unread-msg "mh-folder" "\ Display previous unread message. This command can be given a prefix argument COUNT to specify how many unread messages to skip. \(fn &optional COUNT)" t nil) (autoload 'mh-quit "mh-folder" "\ Quit the current MH-E folder. When you want to quit using MH-E and go back to editing, you can use this command. This buries the buffers of the current MH-E folder and restores the buffers that were present when you first ran \\[mh-rmail]. It also removes any MH-E working buffers whose name begins with \" *mh-\" or \"*MH-E \". You can later restore your MH-E session by selecting the \"+inbox\" buffer or by running \\[mh-rmail] again. The two hooks `mh-before-quit-hook' and `mh-quit-hook' are called by this function. The former one is called before the quit occurs, so you might use it to perform any MH-E operations; you could perform some query and abort the quit or call `mh-execute-commands', for example. The latter is not run in an MH-E context, so you might use it to modify the window setup. \(fn)" t nil) (autoload 'mh-refile-msg "mh-folder" "\ Refile (output) RANGE into FOLDER. You are prompted for the folder name. Note that this command can also be used to create folders. If you specify a folder that does not exist, you will be prompted to create it. The hook `mh-refile-msg-hook' is called after a message is marked to be refiled. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. In a program, the variables `mh-last-destination' and `mh-last-destination-folder' are not updated if DONT-UPDATE-LAST-DESTINATION-FLAG is non-nil. \(fn RANGE FOLDER &optional DONT-UPDATE-LAST-DESTINATION-FLAG)" t nil) (autoload 'mh-refile-or-write-again "mh-folder" "\ Repeat last output command. If you are refiling several messages into the same folder, you can use this command to repeat the last refile (\\[mh-refile-msg]) or write (\\[mh-write-msg-to-file]). You can use a range. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. In a program, a non-nil INTERACTIVE-FLAG means that the function was called interactively. \(fn RANGE &optional INTERACTIVE-FLAG)" t nil) (autoload 'mh-rescan-folder "mh-folder" "\ Rescan folder\\. This command is useful to grab all messages in your \"+inbox\" after processing your new mail for the first time. If you don't want to rescan the entire folder, this command will accept a RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will ask if you want to process refiles or deletes first and then either run \\[mh-execute-commands] for you or undo the pending refiles and deletes. In a program, the processing of outstanding commands is not performed if DONT-EXEC-PENDING is non-nil. \(fn &optional RANGE DONT-EXEC-PENDING)" t nil) (autoload 'mh-toggle-showing "mh-folder" "\ Toggle between MH-Folder and MH-Folder Show modes. This command switches between MH-Folder mode and MH-Folder Show mode. MH-Folder mode turns off the associated show buffer so that you can perform operations on the messages quickly without reading them. This is an excellent way to prune out your junk mail or to refile a group of messages to another folder for later examination. \(fn)" t nil) (autoload 'mh-undo "mh-folder" "\ Undo pending deletes or refiles in RANGE. If you've deleted a message or refiled it, but changed your mind, you can cancel the action before you've executed it. Use this command to undo a refile on or deletion of a single message. You can also undo refiles and deletes for messages that are found in a given RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE)" t nil) (autoload 'mh-visit-folder "mh-folder" "\ Visit FOLDER. When you want to read the messages that you have refiled into folders, use this command to visit the folder. You are prompted for the folder name. The folder buffer will show just unseen messages if there are any; otherwise, it will show all the messages in the buffer as long there are fewer than `mh-large-folder' messages. If there are more, then you are prompted for a range of messages to scan. You can provide a prefix argument in order to specify a RANGE of messages to show when you visit the folder. In this case, regions are not used to specify the range and `mh-large-folder' is ignored. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. Note that this command can also be used to create folders. If you specify a folder that does not exist, you will be prompted to create it. Do not call this function from outside MH-E; use \\[mh-rmail] instead. If, in a program, RANGE is nil (the default), then all messages in FOLDER are displayed. If an index buffer is being created then INDEX-DATA is used to initialize the index buffer specific data structures. \(fn FOLDER &optional RANGE INDEX-DATA)" t nil) (autoload 'mh-write-msg-to-file "mh-folder" "\ Append MESSAGE to end of FILE\\. You are prompted for the filename. If the file already exists, the message is appended to it. You can also write the message to the file without the header by specifying a prefix argument NO-HEADER. Subsequent writes to the same file can be made with the command \\[mh-refile-or-write-again]. \(fn MESSAGE FILE NO-HEADER)" t nil) (autoload 'mh-update-sequences "mh-folder" "\ Flush MH-E's state out to MH. This function updates the sequence specified by your \"Unseen-Sequence:\" profile component, \"cur\", and the sequence listed by the `mh-tick-seq' option which is \"tick\" by default. The message at the cursor is used for \"cur\". \(fn)" t nil) (autoload 'mh-goto-cur-msg "mh-folder" "\ Position the cursor at the current message. When optional argument MINIMAL-CHANGES-FLAG is non-nil, the function doesn't recenter the folder buffer. \(fn &optional MINIMAL-CHANGES-FLAG)" nil nil) (autoload 'mh-recenter "mh-folder" "\ Like recenter but with three improvements: - At the end of the buffer it tries to show fewer empty lines. - operates only if the current buffer is in the selected window. (Commands like `save-some-buffers' can make this false.) - nil ARG means recenter as if prefix argument had been given. \(fn ARG)" nil nil) (autoload 'mh-outstanding-commands-p "mh-folder" "\ Return non-nil if there are outstanding deletes or refiles. \(fn)" nil nil) (autoload 'mh-set-folder-modified-p "mh-folder" "\ Mark current folder as modified or unmodified according to FLAG. \(fn FLAG)" nil nil) (autoload 'mh-make-folder-mode-line "mh-folder" "\ Set the fields of the mode line for a folder buffer. The optional argument is now obsolete and IGNORED. It used to be used to pass in what is now stored in the buffer-local variable `mh-mode-line-annotation'. \(fn &optional IGNORED)" nil nil) (autoload 'mh-scan-folder "mh-folder" "\ Scan FOLDER over RANGE. After the scan is performed, switch to the buffer associated with FOLDER. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. The processing of outstanding commands is not performed if DONT-EXEC-PENDING is non-nil. \(fn FOLDER RANGE &optional DONT-EXEC-PENDING)" nil nil) (autoload 'mh-process-or-undo-commands "mh-folder" "\ If FOLDER has outstanding commands, then either process or discard them. Called by functions like `mh-sort-folder', so also invalidate show buffer. \(fn FOLDER)" nil nil) (autoload 'mh-regenerate-headers "mh-folder" "\ Scan folder over RANGE. If UPDATE, append the scan lines, otherwise replace. \(fn RANGE &optional UPDATE)" nil nil) (autoload 'mh-reset-threads-and-narrowing "mh-folder" "\ Reset all variables pertaining to threads and narrowing. Also removes all content from the folder buffer. \(fn)" nil nil) (autoload 'mh-next-msg "mh-folder" "\ Move backward or forward to the next undeleted message in the buffer. If optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil and we are at the last message, then wait for a second after telling the user that there aren't any more unread messages. \(fn &optional WAIT-AFTER-COMPLAINING-FLAG)" nil nil) (autoload 'mh-prompt-for-refile-folder "mh-folder" "\ Prompt the user for a folder in which the message should be filed. The folder is returned as a string. The default folder name is generated by the option `mh-default-folder-for-message-function' if it is non-nil or `mh-folder-from-address'. \(fn)" nil nil) (autoload 'mh-folder-from-address "mh-folder" "\ Derive folder name from sender. The name of the folder is derived as follows: a) The folder name associated with the first address found in the list `mh-default-folder-list' is used. Each element in this list contains a \"Check Recipient\" item. If this item is turned on, then the address is checked against the recipient instead of the sender. This is useful for mailing lists. b) An alias prefixed by `mh-default-folder-prefix' corresponding to the address is used. The prefix is used to prevent clutter in your mail directory. Return nil if a folder name was not derived, or if the variable `mh-default-folder-must-exist-flag' is t and the folder does not exist. \(fn)" nil nil) (autoload 'mh-delete-a-msg "mh-folder" "\ Delete MESSAGE. If MESSAGE is nil then the message at point is deleted. The hook `mh-delete-msg-hook' is called after you mark a message for deletion. For example, a past maintainer of MH-E used this once when he kept statistics on his mail usage. \(fn MESSAGE)" nil nil) (autoload 'mh-refile-a-msg "mh-folder" "\ Refile MESSAGE in FOLDER. If MESSAGE is nil then the message at point is refiled. Folder is a symbol, not a string. The hook `mh-refile-msg-hook' is called after a message is marked to be refiled. \(fn MESSAGE FOLDER)" nil nil) (autoload 'mh-msg-filename "mh-folder" "\ Return the file name of MSG in FOLDER (default current folder). \(fn MSG &optional FOLDER)" nil nil) ;;;*** ;;;### (autoloads (mh-undo-folder mh-store-msg mh-sort-folder mh-pipe-msg ;;;;;; mh-page-digest-backwards mh-page-digest mh-pack-folder mh-list-folders ;;;;;; mh-kill-folder mh-copy-msg mh-burst-digest) "mh-funcs" "mh-funcs.el" ;;;;;; (20731 1727)) ;;; Generated autoloads from mh-funcs.el (autoload 'mh-burst-digest "mh-funcs" "\ Break up digest into separate messages\\. This command uses the MH command \"burst\" to break out each message in the digest into its own message. Using this command, you can quickly delete unwanted messages, like this: Once the digest is split up, toggle out of MH-Folder Show mode with \\[mh-toggle-showing] so that the scan lines fill the screen and messages aren't displayed. Then use \\[mh-delete-msg] to quickly delete messages that you don't want to read (based on the \"Subject:\" header field). You can also burst the digest to reply directly to the people who posted the messages in the digest. One problem you may encounter is that the \"From:\" header fields are preceded with a \">\" so that your reply can't create the \"To:\" field correctly. In this case, you must correct the \"To:\" field yourself. \(fn)" t nil) (autoload 'mh-copy-msg "mh-funcs" "\ Copy RANGE to FOLDER\\. If you wish to copy a message to another folder, you can use this command (see the \"-link\" argument to \"refile\"). Like the command \\[mh-refile-msg], this command prompts you for the name of the target folder and you can specify a range. Note that unlike the command \\[mh-refile-msg], the copy takes place immediately. The original copy remains in the current folder. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE FOLDER)" t nil) (autoload 'mh-kill-folder "mh-funcs" "\ Remove folder. Remove all of the messages (files) within the current folder, and then remove the folder (directory) itself. Run the abnormal hook `mh-kill-folder-suppress-prompt-hooks'. The hook functions are called with no arguments and should return a non-nil value to suppress the normal prompt when you remove a folder. This is useful for folders that are easily regenerated. \(fn)" t nil) (autoload 'mh-list-folders "mh-funcs" "\ List mail folders. \(fn)" t nil) (autoload 'mh-pack-folder "mh-funcs" "\ Pack folder\\. This command packs the folder, removing gaps from the numbering sequence. If you don't want to rescan the entire folder afterward, this command will accept a RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will ask if you want to process refiles or deletes first and then either run \\[mh-execute-commands] for you or undo the pending refiles and deletes. The hook `mh-pack-folder-hook' is run after the folder is packed; see its documentation for variables it can use. \(fn RANGE)" t nil) (autoload 'mh-page-digest "mh-funcs" "\ Display next message in digest. \(fn)" t nil) (autoload 'mh-page-digest-backwards "mh-funcs" "\ Display previous message in digest. \(fn)" t nil) (autoload 'mh-pipe-msg "mh-funcs" "\ Pipe message through shell command COMMAND. You are prompted for the Unix command through which you wish to run your message. If you give a prefix argument INCLUDE-HEADER to this command, the message header is included in the text passed to the command. \(fn COMMAND INCLUDE-HEADER)" t nil) (autoload 'mh-sort-folder "mh-funcs" "\ Sort folder. By default, messages are sorted by date. The option `mh-sortm-args' holds extra arguments to pass on to the command \"sortm\" when a prefix argument EXTRA-ARGS is used. \(fn &optional EXTRA-ARGS)" t nil) (autoload 'mh-store-msg "mh-funcs" "\ Unpack message created with \"uudecode\" or \"shar\". The default DIRECTORY for extraction is the current directory; however, you have a chance to specify a different extraction directory. The next time you use this command, the default directory is the last directory you used. If you would like to change the initial default directory, customize the option `mh-store-default-directory', change the value from \"Current\" to \"Directory\", and then enter the name of the directory for storing the content of these messages. \(fn DIRECTORY)" t nil) (autoload 'mh-undo-folder "mh-funcs" "\ Undo all refiles and deletes in the current folder. Arguments are IGNORED (for `revert-buffer'). \(fn &rest IGNORED)" t nil) ;;;*** ;;;### (autoloads (mh-identity-handler-bottom mh-identity-handler-top ;;;;;; mh-identity-insert-attribution-verb mh-identity-handler-attribution-verb ;;;;;; mh-identity-handler-signature mh-identity-handler-gpg-identity ;;;;;; mh-insert-identity mh-identity-add-menu mh-identity-make-menu) ;;;;;; "mh-identity" "mh-identity.el" (20731 1727)) ;;; Generated autoloads from mh-identity.el (autoload 'mh-identity-make-menu "mh-identity" "\ Build the Identity menu. This should be called any time `mh-identity-list' or `mh-auto-fields-list' change. See `mh-identity-add-menu'. \(fn)" nil nil) (autoload 'mh-identity-add-menu "mh-identity" "\ Add the current Identity menu. See `mh-identity-make-menu'. \(fn)" nil nil) (autoload 'mh-insert-identity "mh-identity" "\ Insert fields specified by given IDENTITY. In a program, do not insert fields if MAYBE-INSERT is non-nil, `mh-identity-default' is non-nil, and fields have already been inserted. See `mh-identity-list'. \(fn IDENTITY &optional MAYBE-INSERT)" t nil) (autoload 'mh-identity-handler-gpg-identity "mh-identity" "\ 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. \(fn FIELD ACTION &optional VALUE)" nil nil) (autoload 'mh-identity-handler-signature "mh-identity" "\ Process header FIELD \":signature\". The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. \(fn FIELD ACTION &optional VALUE)" nil nil) (autoload 'mh-identity-handler-attribution-verb "mh-identity" "\ Process header FIELD \":attribution-verb\". The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. \(fn FIELD ACTION &optional VALUE)" nil nil) (autoload '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'. \(fn VALUE)" nil nil) (autoload 'mh-identity-handler-top "mh-identity" "\ 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. \(fn FIELD ACTION &optional VALUE)" nil nil) (autoload 'mh-identity-handler-bottom "mh-identity" "\ 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. \(fn FIELD ACTION &optional VALUE)" nil nil) ;;;*** ;;;### (autoloads (mh-inc-spool-make) "mh-inc" "mh-inc.el" (20731 ;;;;;; 1727)) ;;; Generated autoloads from mh-inc.el (autoload 'mh-inc-spool-make "mh-inc" "\ Make all commands and defines keys for contents of `mh-inc-spool-list'. \(fn)" nil nil) ;;;*** ;;;### (autoloads (mh-spamprobe-whitelist mh-spamprobe-blacklist ;;;;;; mh-bogofilter-whitelist mh-bogofilter-blacklist mh-spamassassin-identify-spammers ;;;;;; mh-spamassassin-whitelist mh-spamassassin-blacklist mh-junk-process-whitelist ;;;;;; mh-junk-whitelist mh-junk-process-blacklist mh-junk-blacklist-disposition ;;;;;; mh-junk-blacklist) "mh-junk" "mh-junk.el" (20731 1727)) ;;; Generated autoloads from mh-junk.el (autoload 'mh-junk-blacklist "mh-junk" "\ Blacklist RANGE as spam. This command trains the spam program in use (see the option `mh-junk-program') with the content of RANGE and then handles the message(s) as specified by the option `mh-junk-disposition'. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. For more information about using your particular spam fighting program, see: - `mh-spamassassin-blacklist' - `mh-bogofilter-blacklist' - `mh-spamprobe-blacklist' \(fn RANGE)" t nil) (autoload 'mh-junk-blacklist-disposition "mh-junk" "\ Determines the fate of the selected spam. \(fn)" nil nil) (autoload 'mh-junk-process-blacklist "mh-junk" "\ Blacklist RANGE as spam. This command trains the spam program in use (see the option `mh-junk-program') with the content of RANGE and then handles the message(s) as specified by the option `mh-junk-disposition'. \(fn RANGE)" nil nil) (autoload 'mh-junk-whitelist "mh-junk" "\ Whitelist RANGE as ham. This command reclassifies the RANGE as ham if it were incorrectly classified as spam (see the option `mh-junk-program'). It then refiles the message into the \"+inbox\" folder. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE)" t nil) (autoload 'mh-junk-process-whitelist "mh-junk" "\ Whitelist RANGE as ham. This command reclassifies the RANGE as ham if it were incorrectly classified as spam (see the option `mh-junk-program'). \(fn RANGE)" nil nil) (autoload 'mh-spamassassin-blacklist "mh-junk" "\ Blacklist MSG with SpamAssassin. SpamAssassin is one of the more popular spam filtering programs. Get it from your local distribution or from the SpamAssassin web site at URL `http://spamassassin.org/'. To use SpamAssassin, add the following recipes to \".procmailrc\": PATH=$PATH:/usr/bin/mh MAILDIR=$HOME/`mhparam Path` # Fight spam with SpamAssassin. :0fw | spamc # Anything with a spam level of 10 or more is junked immediately. :0: * ^X-Spam-Level: .......... /dev/null :0: * ^X-Spam-Status: Yes spam/. If you don't use \"spamc\", use \"spamassassin -P -a\". Note that one of the recipes above throws away messages with a score greater than or equal to 10. Here's how you can determine a value that works best for you. First, run \"spamassassin -t\" on every mail message in your archive and use Gnumeric to verify that the average plus the standard deviation of good mail is under 5, the SpamAssassin default for \"spam\". Using Gnumeric, sort the messages by score and view the messages with the highest score. Determine the score which encompasses all of your interesting messages and add a couple of points to be conservative. Add that many dots to the \"X-Spam-Level:\" header field above to send messages with that score down the drain. In the example above, messages with a score of 5-9 are set aside in the \"+spam\" folder for later review. The major weakness of rules-based filters is a plethora of false positives so it is worthwhile to check. If SpamAssassin classifies a message incorrectly, or is unsure, you can use the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist]. The command \\[mh-junk-blacklist] adds a \"blacklist_from\" entry to \"~/spamassassin/user_prefs\", deletes the message, and sends the message to the Razor, so that others might not see this spam. If the \"sa-learn\" command is available, the message is also recategorized as spam. The command \\[mh-junk-whitelist] adds a \"whitelist_from\" rule to the \"~/.spamassassin/user_prefs\" file. If the \"sa-learn\" command is available, the message is also recategorized as ham. Over time, you'll observe that the same host or domain occurs repeatedly in the \"blacklist_from\" entries, so you might think that you could avoid future spam by blacklisting all mail from a particular domain. The utility function `mh-spamassassin-identify-spammers' helps you do precisely that. This function displays a frequency count of the hosts and domains in the \"blacklist_from\" entries from the last blank line in \"~/.spamassassin/user_prefs\" to the end of the file. This information can be used so that you can replace multiple \"blacklist_from\" entries with a single wildcard entry such as: blacklist_from *@*amazingoffersdirect2u.com In versions of SpamAssassin (2.50 and on) that support a Bayesian classifier, \\[mh-junk-blacklist] uses the program \"sa-learn\" to recategorize the message as spam. Neither MH-E, nor SpamAssassin, rebuilds the database after adding words, so you will need to run \"sa-learn --rebuild\" periodically. This can be done by adding the following to your crontab: 0 * * * * sa-learn --rebuild > /dev/null 2>&1 \(fn MSG)" nil nil) (autoload 'mh-spamassassin-whitelist "mh-junk" "\ Whitelist MSG with SpamAssassin. The \\[mh-junk-whitelist] command adds a \"whitelist_from\" rule to the \"~/.spamassassin/user_prefs\" file. If the \"sa-learn\" command is available, the message is also recategorized as ham. See `mh-spamassassin-blacklist' for more information. \(fn MSG)" nil nil) (autoload 'mh-spamassassin-identify-spammers "mh-junk" "\ Identify spammers who are repeat offenders. This function displays a frequency count of the hosts and domains in the \"blacklist_from\" entries from the last blank line in \"~/.spamassassin/user_prefs\" to the end of the file. This information can be used so that you can replace multiple \"blacklist_from\" entries with a single wildcard entry such as: blacklist_from *@*amazingoffersdirect2u.com \(fn)" t nil) (autoload 'mh-bogofilter-blacklist "mh-junk" "\ Blacklist MSG with bogofilter. Bogofilter is a Bayesian spam filtering program. Get it from your local distribution or from the bogofilter web site at URL `http://bogofilter.sourceforge.net/'. Bogofilter is taught by running: bogofilter -n < good-message on every good message, and bogofilter -s < spam-message on every spam message. This is called a full training; three other training methods are described in the FAQ that is distributed with bogofilter. Note that most Bayesian filters need 1000 to 5000 of each type of message to start doing a good job. To use bogofilter, add the following recipes to \".procmailrc\": PATH=$PATH:/usr/bin/mh MAILDIR=$HOME/`mhparam Path` # Fight spam with bogofilter. :0fw | bogofilter -3 -e -p :0: * ^X-Bogosity: Yes, tests=bogofilter spam/. :0: * ^X-Bogosity: Unsure, tests=bogofilter spam/unsure/. If bogofilter classifies a message incorrectly, or is unsure, you can use the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update bogofilter's training. The \"Bogofilter FAQ\" suggests that you run the following occasionally to shrink the database: bogoutil -d wordlist.db | bogoutil -l wordlist.db.new mv wordlist.db wordlist.db.prv mv wordlist.db.new wordlist.db The \"Bogofilter tuning HOWTO\" describes how you can fine-tune Bogofilter. \(fn MSG)" nil nil) (autoload 'mh-bogofilter-whitelist "mh-junk" "\ Whitelist MSG with bogofilter. See `mh-bogofilter-blacklist' for more information. \(fn MSG)" nil nil) (autoload 'mh-spamprobe-blacklist "mh-junk" "\ Blacklist MSG with SpamProbe. SpamProbe is a Bayesian spam filtering program. Get it from your local distribution or from the SpamProbe web site at URL `http://spamprobe.sourceforge.net'. To use SpamProbe, add the following recipes to \".procmailrc\": PATH=$PATH:/usr/bin/mh MAILDIR=$HOME/`mhparam Path` # Fight spam with SpamProbe. :0 SCORE=| spamprobe receive :0 wf | formail -I \"X-SpamProbe: $SCORE\" :0: *^X-SpamProbe: SPAM spam/. If SpamProbe classifies a message incorrectly, you can use the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update SpamProbe's training. \(fn MSG)" nil nil) (autoload 'mh-spamprobe-whitelist "mh-junk" "\ Whitelist MSG with SpamProbe. See `mh-spamprobe-blacklist' for more information. \(fn MSG)" nil nil) ;;;*** ;;;### (autoloads (mh-letter-toggle-header-field-display-button mh-complete-word ;;;;;; mh-position-on-field mh-letter-next-header-field mh-yank-cur-msg ;;;;;; mh-insert-signature mh-letter-mode) "mh-letter" "mh-letter.el" ;;;;;; (20731 1727)) ;;; Generated autoloads from mh-letter.el (autoload 'mh-letter-mode "mh-letter" "\ Mode for composing letters in MH-E\\. When you have finished composing, type \\[mh-send-letter] to send the message using the MH mail handling system. There are two types of tags used by MH-E when composing MIME messages: MML and MH. The option `mh-compose-insertion' controls what type of tags are inserted by MH-E commands. These tags can be converted to MIME body parts by running \\[mh-mh-to-mime] for MH-style directives or \\[mh-mml-to-mime] for MML tags. Options that control this mode can be changed with \\[customize-group]; specify the \"mh-compose\" group. When a message is composed, the hooks `text-mode-hook', `mail-mode-hook', and `mh-letter-mode-hook' are run (in that order). \\{mh-letter-mode-map} \(fn)" t nil) (autoload 'mh-insert-signature "mh-letter" "\ Insert signature in message. This command inserts your signature at the current cursor location. By default, the text of your signature is taken from the file \"~/.signature\". You can read from other sources by changing the option `mh-signature-file-name'. A signature separator (\"-- \") will be added if the signature block does not contain one and `mh-signature-separator-flag' is on. The hook `mh-insert-signature-hook' is run after the signature is inserted. Hook functions may access the actual name of the file or the function used to insert the signature with `mh-signature-file-name'. The signature can also be inserted using Identities (see `mh-identity-list'). In a program, you can pass in a signature FILE. \(fn &optional FILE)" t nil) (autoload 'mh-yank-cur-msg "mh-letter" "\ Insert the current message into the draft buffer. It is often useful to insert a snippet of text from a letter that someone mailed to provide some context for your reply. This command does this by adding an attribution, yanking a portion of text from the message to which you're replying, and inserting `mh-ins-buf-prefix' (`> ') before each line. The attribution consists of the sender's name and email address followed by the content of the option `mh-extract-from-attribution-verb'. You can also turn on the option `mh-delete-yanked-msg-window-flag' to delete the window containing the original message after yanking it to make more room on your screen for your reply. You can control how the message to which you are replying is yanked into your reply using `mh-yank-behavior'. If this isn't enough, you can gain full control over the appearance of the included text by setting `mail-citation-hook' to a function that modifies it. For example, if you set this hook to `trivial-cite' (which is NOT part of Emacs), set `mh-yank-behavior' to \"Body and Header\" (see URL `http://shasta.cs.uiuc.edu/~lrclause/tc.html'). Note that if `mail-citation-hook' is set, `mh-ins-buf-prefix' is not inserted. If the option `mh-yank-behavior' is set to one of the supercite flavors, the hook `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not inserted. \(fn)" t nil) (autoload 'mh-letter-next-header-field "mh-letter" "\ Cycle to the next header field. If we are at the last header field go to the start of the message body. \(fn)" nil nil) (autoload 'mh-position-on-field "mh-letter" "\ Move to the end of the FIELD in the header. Move to end of entire header if FIELD not found. Returns non-nil if FIELD was found. The optional second arg is for pre-version 4 compatibility and is IGNORED. \(fn FIELD &optional IGNORED)" nil nil) (autoload 'mh-complete-word "mh-letter" "\ Complete WORD from CHOICES. Any match found replaces the text from BEGIN to END. \(fn WORD CHOICES BEGIN END)" nil nil) (autoload 'mh-letter-toggle-header-field-display-button "mh-letter" "\ Toggle header field display at location of EVENT. This function does the same thing as `mh-letter-toggle-header-field-display' except that it is callable from a mouse button. \(fn EVENT)" t nil) ;;;*** ;;;### (autoloads (mh-narrow-to-to mh-narrow-to-subject mh-narrow-to-range ;;;;;; mh-narrow-to-from mh-narrow-to-cc mh-delete-subject-or-thread ;;;;;; mh-delete-subject) "mh-limit" "mh-limit.el" (20731 1727)) ;;; Generated autoloads from mh-limit.el (autoload 'mh-delete-subject "mh-limit" "\ Delete messages with same subject\\. To delete messages faster, you can use this command to delete all the messages with the same subject as the current message. This command puts these messages in a sequence named \"subject\". You can undo this action by using \\[mh-undo] with a prefix argument and then specifying the \"subject\" sequence. \(fn)" t nil) (autoload 'mh-delete-subject-or-thread "mh-limit" "\ Delete messages with same subject or thread\\. To delete messages faster, you can use this command to delete all the messages with the same subject as the current message. This command puts these messages in a sequence named \"subject\". You can undo this action by using \\[mh-undo] with a prefix argument and then specifying the \"subject\" sequence. However, if the buffer is displaying a threaded view of the folder then this command behaves like \\[mh-thread-delete]. \(fn)" t nil) (autoload 'mh-narrow-to-cc "mh-limit" "\ Limit to messages with the same \"Cc:\" field. With a prefix argument, edit PICK-EXPR. Use \\\\[mh-widen] to undo this command. \(fn &optional PICK-EXPR)" t nil) (autoload 'mh-narrow-to-from "mh-limit" "\ Limit to messages with the same \"From:\" field. With a prefix argument, edit PICK-EXPR. Use \\\\[mh-widen] to undo this command. \(fn &optional PICK-EXPR)" t nil) (autoload 'mh-narrow-to-range "mh-limit" "\ Limit to RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. Use \\\\[mh-widen] to undo this command. \(fn RANGE)" t nil) (autoload 'mh-narrow-to-subject "mh-limit" "\ Limit to messages with same subject. With a prefix argument, edit PICK-EXPR. The string Re: is removed from the search. Use \\\\[mh-widen] to undo this command. \(fn &optional PICK-EXPR)" t nil) (autoload 'mh-narrow-to-to "mh-limit" "\ Limit to messages with the same \"To:\" field. With a prefix argument, edit PICK-EXPR. Use \\\\[mh-widen] to undo this command. \(fn &optional PICK-EXPR)" t nil) ;;;*** ;;;### (autoloads (mh-destroy-postponed-handles mh-mime-cleanup mh-have-file-command ;;;;;; mh-file-mime-type mh-mh-directive-present-p mh-mml-tag-present-p ;;;;;; mh-mml-unsecure-message mh-mml-to-mime mh-mml-secure-message-signencrypt ;;;;;; mh-mml-secure-message-sign mh-mml-secure-message-encrypt ;;;;;; mh-mh-to-mime-undo mh-mh-to-mime mh-mh-compose-external-type ;;;;;; mh-mh-compose-external-compressed-tar mh-mh-compose-anon-ftp ;;;;;; mh-compose-insertion mh-mml-forward-message mh-compose-forward ;;;;;; mh-display-emphasis mh-display-smileys mh-add-missing-mime-version-header ;;;;;; mh-goto-next-button mh-mime-display mh-decode-message-subject ;;;;;; mh-decode-message-header mh-toggle-mime-buttons mh-toggle-mh-decode-mime-flag ;;;;;; mh-mime-save-parts mh-folder-toggle-mime-part mh-folder-save-mime-part ;;;;;; mh-folder-inline-mime-part mh-display-with-external-viewer ;;;;;; mh-buffer-data) "mh-mime" "mh-mime.el" (20731 1727)) ;;; Generated autoloads from mh-mime.el (autoload 'mh-buffer-data "mh-mime" "\ Convenience macro to get the MIME data structures of the current buffer. \(fn)" nil (quote macro)) (autoload 'mh-display-with-external-viewer "mh-mime" "\ View attachment externally. If Emacs does not know how to view an attachment, you could save it into a file and then run some program to open it. It is easier, however, to launch the program directly from MH-E with this command. While you'll most likely use this to view spreadsheets and documents, it is also useful to use your browser to view HTML attachments with higher fidelity than what Emacs can provide. This command displays the attachment associated with the button under the cursor. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. You can provide a numeric prefix argument PART-INDEX to view the attachment labeled with that number. This command tries to provide a reasonable default for the viewer by calling the Emacs function `mailcap-mime-info'. This function usually reads the file \"/etc/mailcap\". \(fn PART-INDEX)" t nil) (autoload 'mh-folder-inline-mime-part "mh-mime" "\ Show attachment verbatim. You can view the raw contents of an attachment with this command. This command displays (or hides) the contents of the attachment associated with the button under the cursor verbatim. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. You can also provide a numeric prefix argument PART-INDEX to view the attachment labeled with that number. \(fn PART-INDEX)" t nil) (autoload 'mh-folder-save-mime-part "mh-mime" "\ Save (output) attachment. This command saves the attachment associated with the button under the cursor. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. You can also provide a numeric prefix argument PART-INDEX to save the attachment labeled with that number. This command prompts you for a filename and suggests a specific name if it is available. \(fn PART-INDEX)" t nil) (autoload 'mh-folder-toggle-mime-part "mh-mime" "\ View attachment. This command displays (or hides) the attachment associated with the button under the cursor. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. This command has the advantage over related commands of working from the MH-Folder buffer. You can also provide a numeric prefix argument PART-INDEX to view the attachment labeled with that number. If Emacs does not know how to display the attachment, then Emacs offers to save the attachment in a file. \(fn PART-INDEX)" t nil) (autoload 'mh-mime-save-parts "mh-mime" "\ Save attachments. You can save all of the attachments at once with this command. The attachments are saved in the directory specified by the option `mh-mime-save-parts-default-directory' unless you use a prefix argument PROMPT in which case you are prompted for the directory. These directories may be superseded by MH profile components, since this function calls on \"mhstore\" (\"mhn\") to do the work. \(fn PROMPT)" t nil) (autoload 'mh-toggle-mh-decode-mime-flag "mh-mime" "\ Toggle the value of `mh-decode-mime-flag'. \(fn)" t nil) (autoload 'mh-toggle-mime-buttons "mh-mime" "\ Toggle option `mh-display-buttons-for-inline-parts-flag'. \(fn)" t nil) (autoload 'mh-decode-message-header "mh-mime" "\ Decode RFC2047 encoded message header fields. \(fn)" nil nil) (autoload 'mh-decode-message-subject "mh-mime" "\ Decode RFC2047 encoded message header fields. \(fn)" nil nil) (autoload 'mh-mime-display "mh-mime" "\ Display (and possibly decode) MIME handles. Optional argument, PRE-DISSECTED-HANDLES is a list of MIME handles. If present they are displayed otherwise the buffer is parsed and then displayed. \(fn &optional PRE-DISSECTED-HANDLES)" nil nil) (autoload 'mh-goto-next-button "mh-mime" "\ Search for next button satisfying criterion. If BACKWARD-FLAG is non-nil search backward in the buffer for a mime button. If CRITERION is a function or a symbol which has a function binding then that function must return non-nil at the button we stop. \(fn BACKWARD-FLAG &optional CRITERION)" nil nil) (autoload 'mh-add-missing-mime-version-header "mh-mime" "\ Some mail programs don't put a MIME-Version header. I have seen this only in spam, so maybe we shouldn't fix this ;-) \(fn)" nil nil) (autoload 'mh-display-smileys "mh-mime" "\ Display smileys. \(fn)" nil nil) (autoload 'mh-display-emphasis "mh-mime" "\ Display graphical emphasis. \(fn)" nil nil) (autoload 'mh-compose-forward "mh-mime" "\ Add tag to forward a message. You are prompted for a content DESCRIPTION, the name of the FOLDER in which the messages to forward are located, and a RANGE of messages, which defaults to the current message in that folder. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. The option `mh-compose-insertion' controls what type of tags are inserted. \(fn &optional DESCRIPTION FOLDER RANGE)" t nil) (autoload 'mh-mml-forward-message "mh-mime" "\ Forward a message as attachment. The function will prompt the user for a DESCRIPTION, a FOLDER and MESSAGE number. \(fn DESCRIPTION FOLDER MESSAGE)" nil nil) (autoload 'mh-compose-insertion "mh-mime" "\ Add tag to include a file such as an image or sound. You are prompted for the filename containing the object, the media type if it cannot be determined automatically, and a content description. If you're using MH-style directives, you will also be prompted for additional attributes. The option `mh-compose-insertion' controls what type of tags are inserted. Optional argument INLINE means make it an inline attachment. \(fn &optional INLINE)" t nil) (autoload 'mh-mh-compose-anon-ftp "mh-mime" "\ Add tag to include anonymous ftp reference to a file. You can have your message initiate an \"ftp\" transfer when the recipient reads the message. You are prompted for the remote HOST and FILENAME, the media TYPE, and the content DESCRIPTION. See also \\[mh-mh-to-mime]. \(fn HOST FILENAME TYPE DESCRIPTION)" t nil) (autoload 'mh-mh-compose-external-compressed-tar "mh-mime" "\ Add tag to include anonymous ftp reference to a compressed tar file. In addition to retrieving the file via anonymous \"ftp\" as per the command \\[mh-mh-compose-anon-ftp], the file will also be uncompressed and untarred. You are prompted for the remote HOST and FILENAME and the content DESCRIPTION. See also \\[mh-mh-to-mime]. \(fn HOST FILENAME DESCRIPTION)" t nil) (autoload 'mh-mh-compose-external-type "mh-mime" "\ Add tag to refer to a remote file. This command is a general utility for referencing external files. In fact, all of the other commands that insert directives to access external files call this command. You are prompted for the ACCESS-TYPE, remote HOST and FILENAME, and content TYPE. If you provide a prefix argument, you are also prompted for a content DESCRIPTION, ATTRIBUTES, PARAMETERS, and a COMMENT. See also \\[mh-mh-to-mime]. \(fn ACCESS-TYPE HOST FILENAME TYPE &optional DESCRIPTION ATTRIBUTES PARAMETERS COMMENT)" t nil) (autoload 'mh-mh-to-mime "mh-mime" "\ Compose MIME message from MH-style directives. Typically, you send a message with attachments just like any other message. However, you may take a sneak preview of the MIME encoding if you wish by running this command. If you wish to pass additional arguments to \"mhbuild\" (\"mhn\") to affect how it builds your message, use the option `mh-mh-to-mime-args'. For example, you can build a consistency check into the message by setting `mh-mh-to-mime-args' to \"-check\". The recipient of your message can then run \"mhbuild -check\" on the message--\"mhbuild\" (\"mhn\") will complain if the message has been corrupted on the way. This command only consults this option when given a prefix argument EXTRA-ARGS. The hook `mh-mh-to-mime-hook' is called after the message has been formatted. The effects of this command can be undone by running \\[mh-mh-to-mime-undo]. \(fn &optional EXTRA-ARGS)" t nil) (autoload 'mh-mh-to-mime-undo "mh-mime" "\ Undo effects of \\[mh-mh-to-mime]. It does this by reverting to a backup file. You are prompted to confirm this action, but you can avoid the confirmation by adding a prefix argument NOCONFIRM. \(fn NOCONFIRM)" t nil) (autoload 'mh-mml-secure-message-encrypt "mh-mime" "\ Add tag to encrypt the message. A proper multipart message is created for you when you send the message. Use the command \\[mh-mml-unsecure-message] to remove this tag. Use a prefix argument METHOD to be prompted for one of the possible security methods (see `mh-mml-method-default'). \(fn METHOD)" t nil) (autoload 'mh-mml-secure-message-sign "mh-mime" "\ Add tag to sign the message. A proper multipart message is created for you when you send the message. Use the command \\[mh-mml-unsecure-message] to remove this tag. Use a prefix argument METHOD to be prompted for one of the possible security methods (see `mh-mml-method-default'). \(fn METHOD)" t nil) (autoload 'mh-mml-secure-message-signencrypt "mh-mime" "\ Add tag to encrypt and sign the message. A proper multipart message is created for you when you send the message. Use the command \\[mh-mml-unsecure-message] to remove this tag. Use a prefix argument METHOD to be prompted for one of the possible security methods (see `mh-mml-method-default'). \(fn METHOD)" t nil) (autoload 'mh-mml-to-mime "mh-mime" "\ Compose MIME message from MML tags. Typically, you send a message with attachments just like any other message. However, you may take a sneak preview of the MIME encoding if you wish by running this command. This action can be undone by running \\[undo]. \(fn)" t nil) (autoload 'mh-mml-unsecure-message "mh-mime" "\ Remove any secure message tags. \(fn)" t nil) (autoload 'mh-mml-tag-present-p "mh-mime" "\ Check if the current buffer has text which may be a MML tag. \(fn)" nil nil) (autoload 'mh-mh-directive-present-p "mh-mime" "\ Check if the text between BEGIN and END might be a MH-style directive. The optional argument BEGIN defaults to the beginning of the buffer, while END defaults to the end of the buffer. \(fn &optional BEGIN END)" nil nil) (autoload 'mh-file-mime-type "mh-mime" "\ Return MIME type of FILENAME from file command. Returns nil if file command not on system. \(fn FILENAME)" nil nil) (autoload 'mh-have-file-command "mh-mime" "\ Return t if 'file' command is on the system. 'file -i' is used to get MIME type of composition insertion. \(fn)" nil nil) (autoload 'mh-mime-cleanup "mh-mime" "\ Free the decoded MIME parts. \(fn)" nil nil) (autoload 'mh-destroy-postponed-handles "mh-mime" "\ Free MIME data for externally displayed MIME parts. \(fn)" nil nil) ;;;*** ;;;### (autoloads (mh-print-msg mh-ps-print-toggle-color mh-ps-print-toggle-faces ;;;;;; mh-ps-print-msg-file mh-ps-print-msg) "mh-print" "mh-print.el" ;;;;;; (20731 1727)) ;;; Generated autoloads from mh-print.el (autoload 'mh-ps-print-msg "mh-print" "\ Print RANGE\\. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will print inline text attachments but will not decrypt messages. However, when a message is displayed in an MH-Show buffer, then that buffer is used verbatim for printing with the caveat that only text attachments, if opened inline, are printed. Therefore, encrypted messages can be printed by showing and decrypting them first. MH-E uses the \"ps-print\" package to do the printing, so you can customize the printing further by going to the `ps-print' customization group. This command does not use the options `mh-lpr-command-format' or `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] and \\[mh-ps-print-toggle-faces]. \(fn RANGE)" t nil) (autoload 'mh-ps-print-msg-file "mh-print" "\ Print RANGE to FILE\\. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will print inline text attachments but will not decrypt messages. However, when a message is displayed in an MH-Show buffer, then that buffer is used verbatim for printing with the caveat that only text attachments, if opened inline, are printed. Therefore, encrypted messages can be printed by showing and decrypting them first. MH-E uses the \"ps-print\" package to do the printing, so you can customize the printing further by going to the `ps-print' customization group. This command does not use the options `mh-lpr-command-format' or `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] and \\[mh-ps-print-toggle-faces]. \(fn RANGE FILE)" t nil) (autoload 'mh-ps-print-toggle-faces "mh-print" "\ Toggle whether printing is done with faces or not. When faces are enabled, the printed message will look very similar to the message in the MH-Show buffer. \(fn)" t nil) (autoload 'mh-ps-print-toggle-color "mh-print" "\ Toggle whether color is used in printing messages. Colors are emulated on black-and-white printers with shades of gray. This might produce illegible output, even if your screen colors only use shades of gray. If this is the case, try using this command to toggle between color, no color, and a black and white representation of the colors and see which works best. You change this setting permanently by customizing the option `ps-print-color-p'. \(fn)" t nil) (autoload 'mh-print-msg "mh-print" "\ Print RANGE the old fashioned way\\. The message is formatted with \"mhl\" (see option `mh-mhl-format-file') and printed with the \"lpr\" command (see option `mh-lpr-command-format'). Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. Consider using \\[mh-ps-print-msg] instead. \(fn RANGE)" t nil) ;;;*** ;;;### (autoloads (mh-msg-num-width-to-column mh-msg-num-width mh-scan-format ;;;;;; mh-set-cmd-note mh-scan-msg-search-regexp mh-scan-msg-number-regexp) ;;;;;; "mh-scan" "mh-scan.el" (20731 1727)) ;;; Generated autoloads from mh-scan.el (autoload 'mh-scan-msg-number-regexp "mh-scan" "\ Return value of variable `mh-scan-msg-number-regexp'. \(fn)" nil nil) (autoload 'mh-scan-msg-search-regexp "mh-scan" "\ Return value of variable `mh-scan-msg-search-regexp'. \(fn)" nil nil) (autoload 'mh-set-cmd-note "mh-scan" "\ Set `mh-cmd-note' to COLUMN. Note that columns in Emacs start with 0. \(fn COLUMN)" nil nil) (autoload 'mh-scan-format "mh-scan" "\ Return the output format argument for the scan program. \(fn)" nil nil) (autoload 'mh-msg-num-width "mh-scan" "\ Return the width of the largest message number in this FOLDER. \(fn FOLDER)" nil nil) (autoload 'mh-msg-num-width-to-column "mh-scan" "\ Return the column for notations given message number WIDTH. Note that columns in Emacs start with 0. If `mh-scan-format-file' is set to \"Use MH-E scan Format\" this means that either `mh-scan-format-mh' or `mh-scan-format-nmh' are in use. This function therefore assumes that the first column is empty (to provide room for the cursor), the following WIDTH columns contain the message number, and the column for notations comes after that. \(fn WIDTH)" nil nil) ;;;*** ;;;### (autoloads (mh-index-update-maps mh-index-read-data mh-index-delete-from-sequence ;;;;;; mh-index-add-to-sequence mh-create-sequence-map mh-index-create-sequences ;;;;;; mh-index-execute-commands mh-search-p mh-index-create-imenu-index ;;;;;; mh-index-delete-folder-headers mh-index-insert-folder-headers ;;;;;; mh-index-group-by-folder mh-index-visit-folder mh-index-previous-folder ;;;;;; mh-index-next-folder mh-index-sequenced-messages mh-index-ticked-messages ;;;;;; mh-index-new-messages mh-search) "mh-search" "mh-search.el" ;;;;;; (20770 26526)) ;;; Generated autoloads from mh-search.el (autoload 'mh-search "mh-search" "\ Search your MH mail. This command helps you find messages in your entire corpus of mail. You can search 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. Out of the box, MH-E uses \"pick\" to find messages. With a little extra effort, you can set an indexing program which rewards you with extremely quick results. The drawback is that sometimes the index does not contain the words you're looking for. You can still use \"pick\" in these situations. You are prompted for the FOLDER to search. This can be \"all\" to search all folders. Note that the search works recursively on the listed folder. Next, an MH-Search buffer appears where you can enter search criteria SEARCH-REGEXP. 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. 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-Search provides commands like \\[mh-to-field] to help you fill in the blanks.\\ 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-search-mode-hook', which is called when \\[mh-search] is run on a new pattern.\\ To perform the search, type \\[mh-index-do-search]. Sometimes you're searching for text that is either not indexed, or hasn't been indexed yet. In this case you can override the default method with the pick method by running the command \\[mh-pick-do-search]. 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.\\ The appearance of the heading can be modified by customizing the face `mh-search-folder'. You can jump back and forth between the headings using the commands \\[mh-index-next-folder] and \\[mh-index-previous-folder]. In addition, the command \\[mh-index-visit-folder] 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 command \\[mh-index-visit-folder] is useful to find the actual message number of an interesting message, or to view surrounding messages with the command \\[mh-rescan-folder]. Because this folder is temporary, you'll probably get in the habit of killing it when you're done with \\[mh-kill-folder]. You can regenerate the results by running this command with a prefix argument REDO-SEARCH-FLAG. Note: 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\" Configuring Indexed Searches The command \\[mh-search] runs the command defined by the option `mh-search-program'. 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\". The documentation for the following commands describe how to set up the various indexing programs to use with MH-E. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - `mh-pick-execute-search' - `mh-grep-execute-search' In a program, if FOLDER is \"+\" or nil, 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. \(fn FOLDER SEARCH-REGEXP &optional REDO-SEARCH-FLAG WINDOW-CONFIG)" t nil) (autoload 'mh-index-new-messages "mh-search" "\ Display unseen messages. If you use a program such as \"procmail\" to use \"rcvstore\" to file your incoming mail automatically, you can display new, unseen, messages using this command. All messages in the \"unseen\" sequence from the folders in `mh-new-messages-folders' are listed. With a prefix argument, enter a space-separated list of FOLDERS, or nothing to search all folders. \(fn FOLDERS)" t nil) (autoload 'mh-index-ticked-messages "mh-search" "\ Display ticked messages. All messages in `mh-tick-seq' from the folders in `mh-ticked-messages-folders' are listed. With a prefix argument, enter a space-separated list of FOLDERS, or nothing to search all folders. \(fn FOLDERS)" t nil) (autoload 'mh-index-sequenced-messages "mh-search" "\ Display messages in any sequence. All messages from the FOLDERS in `mh-new-messages-folders' in the SEQUENCE you provide are listed. With a prefix argument, enter a space-separated list of folders at the prompt, or nothing to search all folders. \(fn FOLDERS SEQUENCE)" t nil) (autoload 'mh-index-next-folder "mh-search" "\ Jump to the next folder marker. With non-nil optional argument BACKWARD-FLAG, jump to the previous group of results. \(fn &optional BACKWARD-FLAG)" t nil) (autoload 'mh-index-previous-folder "mh-search" "\ Jump to the previous folder marker. \(fn)" t nil) (autoload 'mh-index-visit-folder "mh-search" "\ Visit original folder from where the message at point was found. \(fn)" t nil) (autoload 'mh-index-group-by-folder "mh-search" "\ Partition the messages based on source folder. Returns an alist with the folder names in the car and the cdr being the list of messages originally from that folder. \(fn)" nil nil) (autoload 'mh-index-insert-folder-headers "mh-search" "\ Annotate the search results with original folder names. \(fn)" nil nil) (autoload 'mh-index-delete-folder-headers "mh-search" "\ Delete the folder headers. \(fn)" nil nil) (autoload 'mh-index-create-imenu-index "mh-search" "\ Create alist of folder names and positions in index folder buffers. \(fn)" nil nil) (autoload 'mh-search-p "mh-search" "\ Non-nil means that this folder was generated by searching. \(fn)" nil nil) (autoload 'mh-index-execute-commands "mh-search" "\ Perform the outstanding operations on the actual messages. The copies in the searched folder are then deleted, refiled, blacklisted and whitelisted to get the desired result. Before processing the messages we make sure that the message is identical to the one that the user has marked in the index buffer. \(fn)" nil nil) (autoload 'mh-index-create-sequences "mh-search" "\ Mirror sequences present in source folders in index folder. \(fn)" nil nil) (autoload 'mh-create-sequence-map "mh-search" "\ Return a map from msg number to list of sequences in which it is present. SEQ-LIST is an assoc list whose keys are sequence names and whose cdr is the list of messages in that sequence. \(fn SEQ-LIST)" nil nil) (autoload 'mh-index-add-to-sequence "mh-search" "\ Add to SEQ the messages in the list MSGS. This function updates the source folder sequences. Also makes an attempt to update the source folder buffer if we have it open. \(fn SEQ MSGS)" nil nil) (autoload 'mh-index-delete-from-sequence "mh-search" "\ Delete from SEQ the messages in MSGS. This function updates the source folder sequences. Also makes an attempt to update the source folder buffer if present. \(fn SEQ MSGS)" nil nil) (autoload 'mh-index-read-data "mh-search" "\ Read index data from file. \(fn)" nil nil) (autoload 'mh-index-update-maps "mh-search" "\ Annotate all as yet unannotated messages in FOLDER with their MD5 hash. As a side effect msg -> checksum map is updated. Optional argument ORIGIN-MAP is a hashtable which maps each message in the index folder to the original folder and message from whence it was copied. If present the checksum -> (origin-folder, origin-index) map is updated too. \(fn FOLDER &optional ORIGIN-MAP)" nil nil) ;;;*** ;;;### (autoloads (mh-remove-all-notation mh-notate-user-sequences ;;;;;; mh-notate-deleted-and-refiled mh-remove-cur-notation mh-notate-cur ;;;;;; mh-notate mh-read-folder-sequences mh-parse-flist-output-line ;;;;;; mh-translate-range mh-range-to-msg-list mh-read-range mh-interactive-range ;;;;;; mh-valid-view-change-operation-p mh-add-msgs-to-seq mh-undefine-sequence ;;;;;; mh-define-sequence mh-seq-to-msgs mh-find-seq mh-valid-seq-p ;;;;;; mh-read-seq-default mh-widen mh-toggle-tick mh-put-msg-in-seq ;;;;;; mh-narrow-to-tick mh-narrow-to-seq mh-msg-is-in-seq mh-list-sequences ;;;;;; mh-delete-seq mh-delete-msg-from-seq mh-catchup) "mh-seq" ;;;;;; "mh-seq.el" (20731 1727)) ;;; Generated autoloads from mh-seq.el (autoload 'mh-catchup "mh-seq" "\ Delete RANGE from the \"unseen\" sequence. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE)" t nil) (autoload 'mh-delete-msg-from-seq "mh-seq" "\ Delete RANGE from SEQUENCE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. In a program, non-nil INTERNAL-FLAG means do not inform MH of the change. \(fn RANGE SEQUENCE &optional INTERNAL-FLAG)" t nil) (autoload 'mh-delete-seq "mh-seq" "\ Delete SEQUENCE. You are prompted for the sequence to delete. Note that this deletes only the sequence, not the messages in the sequence. If you want to delete the messages, use \"\\[universal-argument] \\[mh-delete-msg]\". \(fn SEQUENCE)" t nil) (autoload 'mh-list-sequences "mh-seq" "\ List all sequences in folder. The list appears in a buffer named \"*MH-E Sequences*\". \(fn)" t nil) (autoload 'mh-msg-is-in-seq "mh-seq" "\ Display the sequences in which the current message appears. Use a prefix argument to display the sequences in which another MESSAGE appears. \(fn MESSAGE)" t nil) (autoload 'mh-narrow-to-seq "mh-seq" "\ Restrict display to messages in SEQUENCE. You are prompted for the name of the sequence. What this command does is show only those messages that are in the selected sequence in the MH-Folder buffer. In addition, it limits further MH-E searches to just those messages. When you want to widen the view to all your messages again, use \\[mh-widen]. \(fn SEQUENCE)" t nil) (autoload 'mh-narrow-to-tick "mh-seq" "\ Limit to ticked messages. What this command does is show only those messages that are in the \"tick\" sequence (which you can customize via the `mh-tick-seq' option) in the MH-Folder buffer. In addition, it limits further MH-E searches to just those messages. When you want to widen the view to all your messages again, use \\[mh-widen]. \(fn)" t nil) (autoload 'mh-put-msg-in-seq "mh-seq" "\ Add RANGE to SEQUENCE\\. Give this command a RANGE and you can add all the messages in a sequence to another sequence (for example, \"\\[universal-argument] \\[mh-put-msg-in-seq] SourceSequence RET DestSequence RET\"). Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE SEQUENCE)" t nil) (autoload 'mh-toggle-tick "mh-seq" "\ Toggle tick mark of RANGE. This command adds messages to the \"tick\" sequence (which you can customize via the option `mh-tick-seq'). This sequence can be viewed later with the \\[mh-index-ticked-messages] command. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE)" t nil) (autoload 'mh-widen "mh-seq" "\ Remove last restriction. Each limit or sequence restriction can be undone in turn with this command. Give this command a prefix argument ALL-FLAG to remove all limits and sequence restrictions. \(fn &optional ALL-FLAG)" t nil) (autoload 'mh-read-seq-default "mh-seq" "\ Read and return sequence name with default narrowed or previous sequence. PROMPT is the prompt to use when reading. If NOT-EMPTY is non-nil then a non-empty sequence is read. \(fn PROMPT NOT-EMPTY)" nil nil) (autoload 'mh-valid-seq-p "mh-seq" "\ Return non-nil if NAME is a valid MH sequence name. \(fn NAME)" nil nil) (autoload 'mh-find-seq "mh-seq" "\ Return sequence NAME. \(fn NAME)" nil nil) (autoload 'mh-seq-to-msgs "mh-seq" "\ Return a list of the messages in SEQ. \(fn SEQ)" nil nil) (autoload 'mh-define-sequence "mh-seq" "\ Define the SEQ to contain the list of MSGS. Do not mark pseudo-sequences or empty sequences. Signals an error if SEQ is an invalid name. \(fn SEQ MSGS)" nil nil) (autoload 'mh-undefine-sequence "mh-seq" "\ Remove from the SEQ the list of MSGS. \(fn SEQ MSGS)" nil nil) (autoload 'mh-add-msgs-to-seq "mh-seq" "\ Add MSGS to SEQ. Remove duplicates and keep sequence sorted. If optional INTERNAL-FLAG is non-nil, do not mark the message in the scan listing or inform MH of the addition. If DONT-ANNOTATE-FLAG is non-nil then the annotations in the folder buffer are not updated. \(fn MSGS SEQ &optional INTERNAL-FLAG DONT-ANNOTATE-FLAG)" nil nil) (autoload 'mh-valid-view-change-operation-p "mh-seq" "\ Check if the view change operation can be performed. OP is one of 'widen and 'unthread. \(fn OP)" nil nil) (autoload 'mh-interactive-range "mh-seq" "\ Return interactive specification for message, sequence, range or region. By convention, the name of this argument is RANGE. If variable `transient-mark-mode' is non-nil and the mark is active, then this function returns a cons-cell of the region. If optional prefix argument is provided, then prompt for message range with RANGE-PROMPT. A list of messages in that range is returned. If a MH range is given, say something like last:20, then a list containing the messages in that range is returned. If DEFAULT non-nil then it is returned. Otherwise, the message number at point is returned. This function is usually used with `mh-iterate-on-range' in order to provide a uniform interface to MH-E functions. \(fn RANGE-PROMPT &optional DEFAULT)" nil nil) (autoload 'mh-read-range "mh-seq" "\ Read a message range with PROMPT. If FOLDER is non-nil then a range is read from that folder, otherwise use `mh-current-folder'. If DEFAULT is a string then use that as default range to return. If DEFAULT is nil then ask user with default answer a range based on the sequences that seem relevant. Finally if DEFAULT is t, try to avoid prompting the user. Unseen messages, if present, are returned. If the folder has fewer than `mh-large-folder' messages then \"all\" messages are returned. Finally as a last resort prompt the user. If EXPAND-FLAG is non-nil then a list of message numbers corresponding to the input is returned. If this list is empty then an error is raised. If EXPAND-FLAG is nil just return the input string. In this case we don't check if the range is empty. If ASK-FLAG is non-nil, then the user is always queried for a range of messages. If ASK-FLAG is nil, then the function checks if the unseen sequence is non-empty. If that is the case, `mh-unseen-seq', or the list of messages in it depending on the value of EXPAND, is returned. Otherwise if the folder has fewer than `mh-large-folder' messages then the list of messages corresponding to \"all\" is returned. If neither of the above holds then as a last resort the user is queried for a range of messages. If NUMBER-AS-RANGE-FLAG is non-nil, then if a number, N is read as input, it is interpreted as the range \"last:N\". This function replaces the existing function `mh-read-msg-range'. Calls to: (mh-read-msg-range folder flag) should be replaced with: (mh-read-range \"Suitable prompt\" folder t nil flag mh-interpret-number-as-range-flag) \(fn PROMPT &optional FOLDER DEFAULT EXPAND-FLAG ASK-FLAG NUMBER-AS-RANGE-FLAG)" nil nil) (autoload 'mh-range-to-msg-list "mh-seq" "\ Return a list of messages for RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. \(fn RANGE)" nil nil) (autoload 'mh-translate-range "mh-seq" "\ In FOLDER, translate the string EXPR to a list of messages numbers. \(fn FOLDER EXPR)" nil nil) (autoload 'mh-parse-flist-output-line "mh-seq" "\ Parse LINE to generate folder name, unseen messages and total messages. If CURRENT-FOLDER is non-nil then it contains the current folder name and it is used to avoid problems in corner cases involving folders whose names end with a '+' character. \(fn LINE &optional CURRENT-FOLDER)" nil nil) (autoload 'mh-read-folder-sequences "mh-seq" "\ Read and return the predefined sequences for a FOLDER. If SAVE-REFILES is non-nil, then keep the sequences that note messages to be refiled. \(fn FOLDER SAVE-REFILES)" nil nil) (autoload 'mh-notate "mh-seq" "\ Mark MSG with the character NOTATION at position OFFSET. Null MSG means the message at cursor. If NOTATION is nil then no change in the buffer occurs. \(fn MSG NOTATION OFFSET)" nil nil) (autoload 'mh-notate-cur "mh-seq" "\ Mark the MH sequence cur. In addition to notating the current message with `mh-note-cur' the function uses `overlay-arrow-position' to put a marker in the fringe. \(fn)" nil nil) (autoload 'mh-remove-cur-notation "mh-seq" "\ Remove old cur notation. \(fn)" nil nil) (autoload 'mh-notate-deleted-and-refiled "mh-seq" "\ Notate messages marked for deletion or refiling. Messages to be deleted are given by `mh-delete-list' while messages to be refiled are present in `mh-refile-list'. \(fn)" nil nil) (autoload 'mh-notate-user-sequences "mh-seq" "\ Mark user-defined sequences in RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use; if nil all messages are notated. \(fn &optional RANGE)" nil nil) (autoload 'mh-remove-all-notation "mh-seq" "\ Remove all notations on all scan lines that MH-E introduces. \(fn)" nil nil) ;;;*** ;;;### (autoloads (mh-gnus-article-highlight-citation mh-show-addr ;;;;;; mh-show-mode mh-show-font-lock-keywords-with-cite mh-show-font-lock-keywords ;;;;;; mh-invalidate-show-buffer mh-clean-msg-header mh-display-msg ;;;;;; mh-start-of-uncleaned-message mh-maybe-show mh-show-preferred-alternative ;;;;;; mh-header-display mh-show) "mh-show" "mh-show.el" (20731 ;;;;;; 1727)) ;;; Generated autoloads from mh-show.el (autoload 'mh-show "mh-show" "\ Display message\\. If the message under the cursor is already displayed, this command scrolls to the beginning of the message. MH-E normally hides a lot of the superfluous header fields that mailers add to a message, but if you wish to see all of them, use the command \\[mh-header-display]. Two hooks can be used to control how messages are displayed. The first hook, `mh-show-mode-hook', is called early on in the process of the message display. It is usually used to perform some action on the message's content. The second hook, `mh-show-hook', is the last thing called after messages are displayed. It's used to affect the behavior of MH-E in general or when `mh-show-mode-hook' is too early. From a program, optional argument MESSAGE can be used to display an alternative message. The optional argument REDISPLAY-FLAG forces the redisplay of the message even if the show buffer was already displaying the correct message. See the \"mh-show\" customization group for a litany of options that control what displayed messages look like. \(fn &optional MESSAGE REDISPLAY-FLAG)" t nil) (autoload 'mh-header-display "mh-show" "\ Display message with all header fields\\. Use the command \\[mh-show] to show the message normally again. \(fn)" t nil) (autoload 'mh-show-preferred-alternative "mh-show" "\ Display message with the default preferred alternative. This is as if `mm-discouraged-alternatives' is set to nil. Use the command \\[mh-show] to show the message normally again. \(fn)" t nil) (autoload 'mh-maybe-show "mh-show" "\ Display message at cursor, but only if in show mode. If optional arg MSG is non-nil, display that message instead. \(fn &optional MSG)" nil nil) (autoload 'mh-start-of-uncleaned-message "mh-show" "\ Position uninteresting headers off the top of the window. \(fn)" nil nil) (autoload 'mh-display-msg "mh-show" "\ Display MSG-NUM of FOLDER-NAME. Sets the current buffer to the show buffer. \(fn MSG-NUM FOLDER-NAME)" nil nil) (autoload 'mh-clean-msg-header "mh-show" "\ Flush extraneous lines in message header. Header is cleaned from START to the end of the message header. INVISIBLE-HEADERS contains a regular expression specifying lines to delete from the header. VISIBLE-HEADERS contains a regular expression specifying the lines to display. INVISIBLE-HEADERS is ignored if VISIBLE-HEADERS is non-nil. \(fn START INVISIBLE-HEADERS VISIBLE-HEADERS)" nil nil) (autoload 'mh-invalidate-show-buffer "mh-show" "\ Invalidate the show buffer so we must update it to use it. \(fn)" nil nil) (autoload 'mh-show-font-lock-keywords "mh-show" "\ Return variable `mh-show-font-lock-keywords'. \(fn)" nil nil) (autoload 'mh-show-font-lock-keywords-with-cite "mh-show" "\ Return variable `mh-show-font-lock-keywords-with-cite'. \(fn)" nil nil) (autoload 'mh-show-mode "mh-show" "\ Major mode for showing messages in MH-E.\\ Email addresses and URLs in the message are highlighted if the option `goto-address-highlight-p' is on, which it is by default. To view the web page for a highlighted URL or to send a message using a highlighted email address, use the middle mouse button or \\[goto-address-at-point]. See Info node `(mh-e)Sending Mail' to see how to configure Emacs to send the message using MH-E. The hook `mh-show-mode-hook' is called upon entry to this mode. See also `mh-folder-mode'. \\{mh-show-mode-map} \(fn)" t nil) (autoload 'mh-show-addr "mh-show" "\ Use `goto-address'. \(fn)" nil nil) (autoload 'mh-gnus-article-highlight-citation "mh-show" "\ Highlight cited text in current buffer using Gnus. \(fn)" t nil) ;;;*** ;;;### (autoloads (mh-speed-add-folder mh-speed-invalidate-map mh-speed-flists ;;;;;; mh-folder-speedbar-buttons) "mh-speed" "mh-speed.el" (20731 ;;;;;; 1727)) ;;; Generated autoloads from mh-speed.el (autoload 'mh-folder-speedbar-buttons "mh-speed" "\ Interface function to create MH-E speedbar buffer. BUFFER is the MH-E buffer for which the speedbar buffer is to be created. \(fn BUFFER)" nil nil) (defalias 'mh-show-speedbar-buttons 'mh-folder-speedbar-buttons) (defalias 'mh-letter-speedbar-buttons 'mh-folder-speedbar-buttons) (autoload 'mh-speed-flists "mh-speed" "\ Execute flists -recurse and update message counts. If FORCE is non-nil the timer is reset. Any number of optional FOLDERS can be specified. If specified, flists is run only for that one folder. \(fn FORCE &rest FOLDERS)" t nil) (autoload 'mh-speed-invalidate-map "mh-speed" "\ Remove FOLDER from various optimization caches. \(fn FOLDER)" t nil) (autoload 'mh-speed-add-folder "mh-speed" "\ Add FOLDER since it is being created. The function invalidates the latest ancestor that is present. \(fn FOLDER)" nil nil) ;;;*** ;;;### (autoloads (mh-thread-forget-message mh-thread-add-spaces ;;;;;; mh-thread-find-msg-subject mh-thread-update-scan-line-map ;;;;;; mh-thread-print-scan-lines mh-thread-generate mh-thread-parse-scan-line ;;;;;; mh-thread-inc mh-toggle-threads mh-thread-refile mh-thread-previous-sibling ;;;;;; mh-thread-next-sibling mh-thread-delete mh-thread-ancestor) ;;;;;; "mh-thread" "mh-thread.el" (20731 1727)) ;;; Generated autoloads from mh-thread.el (autoload 'mh-thread-ancestor "mh-thread" "\ Display ancestor of current message. If you do not care for the way a particular thread has turned, you can move up the chain of messages with this command. This command can also take a prefix argument THREAD-ROOT-FLAG to jump to the message that started everything. \(fn &optional THREAD-ROOT-FLAG)" t nil) (autoload 'mh-thread-delete "mh-thread" "\ Delete thread. \(fn)" t nil) (autoload 'mh-thread-next-sibling "mh-thread" "\ Display next sibling. With non-nil optional argument PREVIOUS-FLAG jump to the previous sibling. \(fn &optional PREVIOUS-FLAG)" t nil) (autoload 'mh-thread-previous-sibling "mh-thread" "\ Display previous sibling. \(fn)" t nil) (autoload 'mh-thread-refile "mh-thread" "\ Refile (output) thread into FOLDER. \(fn FOLDER)" t nil) (autoload 'mh-toggle-threads "mh-thread" "\ Toggle threaded view of folder. \(fn)" t nil) (autoload 'mh-thread-inc "mh-thread" "\ Update thread tree for FOLDER. All messages after START-POINT are added to the thread tree. \(fn FOLDER START-POINT)" nil nil) (autoload 'mh-thread-parse-scan-line "mh-thread" "\ Parse a scan line. If optional argument STRING is given then that is assumed to be the scan line. Otherwise uses the line at point as the scan line to parse. \(fn &optional STRING)" nil nil) (autoload 'mh-thread-generate "mh-thread" "\ Scan FOLDER to get info for threading. Only information about messages in MSG-LIST are added to the tree. \(fn FOLDER MSG-LIST)" nil nil) (autoload 'mh-thread-print-scan-lines "mh-thread" "\ Print scan lines in THREAD-TREE in threaded mode. \(fn THREAD-TREE)" nil nil) (autoload 'mh-thread-update-scan-line-map "mh-thread" "\ In threaded view update `mh-thread-scan-line-map'. MSG is the message being notated with NOTATION at OFFSET. \(fn MSG NOTATION OFFSET)" nil nil) (autoload 'mh-thread-find-msg-subject "mh-thread" "\ Find canonicalized subject of MSG. This function can only be used the folder is threaded. \(fn MSG)" nil nil) (autoload 'mh-thread-add-spaces "mh-thread" "\ Add COUNT spaces to each scan line in `mh-thread-scan-line-map'. \(fn COUNT)" nil nil) (autoload 'mh-thread-forget-message "mh-thread" "\ Forget the message INDEX from the threading tables. \(fn INDEX)" nil nil) ;;;*** ;;;### (autoloads (mh-signature-separator-p mh-letter-skip-leading-whitespace-in-header-field ;;;;;; mh-letter-toggle-header-field-display mh-letter-skipped-header-field-p ;;;;;; mh-letter-hide-all-skipped-fields mh-header-field-end mh-header-field-beginning ;;;;;; mh-mail-header-end mh-goto-header-end mh-goto-header-field ;;;;;; mh-get-header-field mh-extract-from-header-value mh-in-header-p ;;;;;; mh-prompt-for-folder mh-folder-completion-function mh-speed-flists-active-p ;;;;;; mh-expand-file-name mh-folder-name-p mh-remove-from-sub-folders-cache ;;;;;; mh-sub-folders mh-folder-list mh-clear-sub-folders-cache ;;;;;; mh-get-msg-num mh-lessp mh-coalesce-msg-list mh-prefix-help ;;;;;; mh-help mh-set-help mh-ephem-message mh-find-path mh-logo-display ;;;;;; mh-replace-string mh-quote-pick-expr mh-mapc mh-make-local-vars ;;;;;; mh-delete-line mh-colors-in-use-p mh-colors-available-p mh-beginning-of-word ;;;;;; mh-search-from-end) "mh-utils" "mh-utils.el" (20731 1727)) ;;; Generated autoloads from mh-utils.el (autoload 'mh-search-from-end "mh-utils" "\ Return the position of last occurrence of CHAR in STRING. If CHAR is not present in STRING then return nil. The function is used in lieu of `search' in the CL package. \(fn CHAR STRING)" nil nil) (autoload 'mh-beginning-of-word "mh-utils" "\ Return position of the N th word backwards. \(fn &optional N)" nil nil) (autoload 'mh-colors-available-p "mh-utils" "\ Check if colors are available in the Emacs being used. \(fn)" nil nil) (autoload 'mh-colors-in-use-p "mh-utils" "\ Check if colors are being used in the folder buffer. \(fn)" nil nil) (autoload 'mh-delete-line "mh-utils" "\ Delete the next LINES lines. \(fn LINES)" nil nil) (autoload 'mh-make-local-vars "mh-utils" "\ Initialize local variables according to the variable-value PAIRS. \(fn &rest PAIRS)" nil nil) (autoload 'mh-mapc "mh-utils" "\ Apply FUNCTION to each element of LIST for side effects only. \(fn FUNCTION LIST)" nil nil) (autoload 'mh-quote-pick-expr "mh-utils" "\ Quote `mh-pick-regexp-chars' in PICK-EXPR. PICK-EXPR is a list of strings. Return nil if PICK-EXPR is nil. \(fn PICK-EXPR)" nil nil) (autoload 'mh-replace-string "mh-utils" "\ Replace all occurrences of OLD with NEW in the current buffer. Ignores case when searching for OLD. \(fn OLD NEW)" nil nil) (autoload 'mh-logo-display "mh-utils" "\ Modify mode line to display MH-E logo. \(fn)" nil nil) (autoload 'mh-find-path "mh-utils" "\ Set variables from user's MH profile. This function sets `mh-user-path' from your \"Path:\" MH profile component (but defaults to \"Mail\" if one isn't present), `mh-draft-folder' from \"Draft-Folder:\", `mh-unseen-seq' from \"Unseen-Sequence:\", `mh-previous-seq' from \"Previous-Sequence:\", and `mh-inbox' from \"Inbox:\" (defaults to \"+inbox\"). The hook `mh-find-path-hook' is run after these variables have been set. This hook can be used the change the value of these variables if you need to run with different values between MH and MH-E. \(fn)" nil nil) (autoload 'mh-ephem-message "mh-utils" "\ Display STRING in the minibuffer momentarily. \(fn STRING)" nil nil) (autoload 'mh-set-help "mh-utils" "\ Set help messages. The MESSAGES are assumed to be an associative array. It is used to show help for the most common commands in the current mode. The key is a prefix char. The value is one or more strings which are concatenated together and displayed in a help buffer if ? is pressed after the prefix character. The special key nil is used to display the non-prefixed commands. The substitutions described in `substitute-command-keys' are performed as well. If optional argument DEFAULT is non-nil, then these messages will be used if help is asked for an unknown mode. \(fn MESSAGES &optional DEFAULT)" nil nil) (autoload 'mh-help "mh-utils" "\ Display cheat sheet for the MH-E commands. See `mh-set-help' for setting the help messages. HELP-MESSAGES are used instead if given. This is a list of one or more strings which are concatenated together and displayed in a help buffer. \(fn &optional HELP-MESSAGES)" t nil) (autoload 'mh-prefix-help "mh-utils" "\ Display cheat sheet for the commands of the current prefix in minibuffer. \(fn)" t nil) (autoload 'mh-coalesce-msg-list "mh-utils" "\ Given a list of MESSAGES, return a list of message number ranges. This is the inverse of `mh-read-msg-list', which expands ranges. Message lists passed to MH programs should be processed by this function to avoid exceeding system command line argument limits. \(fn MESSAGES)" nil nil) (autoload 'mh-lessp "mh-utils" "\ Return the lesser of two message indicators MSG1 and MSG2. Strings are \"smaller\" than numbers. Valid values are things like \"cur\", \"last\", 1, and 1820. \(fn MSG1 MSG2)" nil nil) (autoload 'mh-get-msg-num "mh-utils" "\ Return the message number of the displayed message. If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is not pointing to a message. \(fn ERROR-IF-NO-MESSAGE)" nil nil) (autoload 'mh-clear-sub-folders-cache "mh-utils" "\ Clear `mh-sub-folders-cache'. \(fn)" nil nil) (autoload 'mh-folder-list "mh-utils" "\ Return FOLDER and its descendants. FOLDER may have a + prefix. Returns a list of strings without the + prefix. If FOLDER is nil, then all folders are considered. For example, if your Mail directory only contains the folders +inbox, +outbox, +lists, and +lists/mh-e, then (mh-folder-list nil) => (\"inbox\" \"lists\" \"lists/mh-e\" \"outbox\") (mh-folder-list \"+lists\") => (\"lists\" \"lists/mh-e\") Respects the value of `mh-recursive-folders-flag'. If this flag is nil, and the sub-folders have not been explicitly viewed, then they will not be returned. \(fn FOLDER)" nil nil) (autoload 'mh-sub-folders "mh-utils" "\ Find the subfolders of FOLDER. The function avoids running folders unnecessarily by caching the results of the actual folders call. If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a slash is added to each of the sub-folder names that may have nested folders within them. \(fn FOLDER &optional ADD-TRAILING-SLASH-FLAG)" nil nil) (autoload 'mh-remove-from-sub-folders-cache "mh-utils" "\ Remove FOLDER and its parent from `mh-sub-folders-cache'. FOLDER should be unconditionally removed from the cache. Also the last ancestor of FOLDER present in the cache must be removed as well. To see why this is needed assume we have a folder +foo which has a single sub-folder qux. Now we create the folder +foo/bar/baz. Here we will need to invalidate the cached sub-folders of +foo, otherwise completion on +foo won't tell us about the option +foo/bar! \(fn FOLDER)" nil nil) (autoload 'mh-folder-name-p "mh-utils" "\ Return non-nil if NAME is the name of a folder. A name (a string or symbol) can be a folder name if it begins with \"+\". \(fn NAME)" nil nil) (autoload 'mh-expand-file-name "mh-utils" "\ Expand FILENAME like `expand-file-name', but also handle MH folder names. Any filename that starts with '+' is treated as a folder name. See `expand-file-name' for description of DEFAULT. \(fn FILENAME &optional DEFAULT)" nil nil) (autoload 'mh-speed-flists-active-p "mh-utils" "\ Check if speedbar is running with message counts enabled. \(fn)" nil nil) (autoload 'mh-folder-completion-function "mh-utils" "\ Programmable completion for folder names. NAME is the partial folder name that has been input. PREDICATE if non-nil is a function that is used to filter the possible choices. FLAG is nil to indicate `try-completion', t for `all-completions', or the symbol lambda for `test-completion'. See Info node `(elisp) Programmed Completion' for details. \(fn NAME PREDICATE FLAG)" nil nil) (autoload 'mh-prompt-for-folder "mh-utils" "\ Prompt for a folder name with PROMPT. Returns the folder's name as a string. DEFAULT is used if the folder exists and the user types return. If the CAN-CREATE flag is t, then a folder is created if it doesn't already exist. If optional argument DEFAULT-STRING is non-nil, use it in the prompt instead of DEFAULT. If ALLOW-ROOT-FOLDER-FLAG is non-nil then the function will accept the folder +, which means all folders when used in searching. \(fn PROMPT DEFAULT CAN-CREATE &optional DEFAULT-STRING ALLOW-ROOT-FOLDER-FLAG)" nil nil) (autoload 'mh-in-header-p "mh-utils" "\ Return non-nil if the point is in the header of a draft message. \(fn)" nil nil) (autoload 'mh-extract-from-header-value "mh-utils" "\ Extract From: string from header. \(fn)" nil nil) (autoload 'mh-get-header-field "mh-utils" "\ Find and return the body of FIELD in the mail header. Returns the empty string if the field is not in the header of the current buffer. \(fn FIELD)" nil nil) (autoload 'mh-goto-header-field "mh-utils" "\ Move to FIELD in the message header. Move to the end of the FIELD name, which should end in a colon. Returns t if found, nil if not. \(fn FIELD)" nil nil) (autoload 'mh-goto-header-end "mh-utils" "\ Move the cursor ARG lines after the header. \(fn ARG)" nil nil) (autoload 'mh-mail-header-end "mh-utils" "\ Substitute for `mail-header-end' that doesn't widen the buffer. In MH-E we frequently need to find the end of headers in nested messages, where the buffer has been narrowed. This function works in this situation. \(fn)" nil nil) (autoload 'mh-header-field-beginning "mh-utils" "\ Move to the beginning of the current header field. Handles RFC 822 continuation lines. \(fn)" nil nil) (autoload 'mh-header-field-end "mh-utils" "\ Move to the end of the current header field. Handles RFC 822 continuation lines. \(fn)" nil nil) (autoload 'mh-letter-hide-all-skipped-fields "mh-utils" "\ Hide all skipped fields. \(fn)" nil nil) (autoload 'mh-letter-skipped-header-field-p "mh-utils" "\ Check if FIELD is to be skipped. \(fn FIELD)" nil nil) (autoload 'mh-letter-toggle-header-field-display "mh-utils" "\ Toggle display of header field at point. Use this command to display truncated header fields. This command is a toggle so entering it again will hide the field. This command takes a prefix argument ARG: if negative then the field is hidden, if positive then the field is displayed. \(fn ARG)" t nil) (autoload 'mh-letter-skip-leading-whitespace-in-header-field "mh-utils" "\ Skip leading whitespace in a header field. If the header field doesn't have at least one space after the colon then a space character is added. \(fn)" nil nil) (autoload 'mh-signature-separator-p "mh-utils" "\ Return non-nil if buffer includes \"^-- $\". \(fn)" nil nil) ;;;*** ;;;### (autoloads (mh-set-x-image-cache-directory mh-show-xface) ;;;;;; "mh-xface" "mh-xface.el" (20770 26526)) ;;; Generated autoloads from mh-xface.el (autoload 'mh-show-xface "mh-xface" "\ Display X-Face. \(fn)" nil nil) (autoload 'mh-set-x-image-cache-directory "mh-xface" "\ Set the DIRECTORY where X-Image-URL images are cached. This is only done if `mh-x-image-cache-directory' is nil. \(fn DIRECTORY)" nil nil) ;;;*** ;;;### (autoloads nil nil ("mh-buffers.el" "mh-compat.el" "mh-e.el" ;;;;;; "mh-gnus.el" "mh-tool-bar.el") (20786 41379 224877)) ;;;*** ;;;### (autoloads (mh-iterate-on-range mh-iterate-on-messages-in-region ;;;;;; mh-do-at-event-location mh-in-show-buffer with-mh-folder-updating ;;;;;; mh-defstruct mh-mark-active-p mh-make-local-hook defmacro-mh ;;;;;; defun-mh mh-funcall-if-exists mh-do-in-xemacs mh-do-in-gnu-emacs ;;;;;; mh-require-cl) "mh-acros" "mh-acros.el" (20770 26526)) ;;; Generated autoloads from mh-acros.el (autoload 'mh-require-cl "mh-acros" "\ Macro to load \"cl\" if needed. Emacs coding conventions require that the \"cl\" package not be required at runtime. However, the \"cl\" package in Emacs 21.4 and earlier left \"cl\" routines in their macro expansions. In particular, the expansion of (setf (gethash ...) ...) used functions in \"cl\" at run time. This macro recognizes that and loads \"cl\" appropriately. \(fn)" nil (quote macro)) (autoload 'mh-do-in-gnu-emacs "mh-acros" "\ Execute BODY if in GNU Emacs. \(fn &rest BODY)" nil (quote macro)) (autoload 'mh-do-in-xemacs "mh-acros" "\ Execute BODY if in XEmacs. \(fn &rest BODY)" nil (quote macro)) (autoload 'mh-funcall-if-exists "mh-acros" "\ Call FUNCTION with ARGS as parameters if it exists. \(fn FUNCTION &rest ARGS)" nil (quote macro)) (autoload 'defun-mh "mh-acros" "\ Create function NAME. If FUNCTION exists, then NAME becomes an alias for FUNCTION. Otherwise, create function NAME with ARG-LIST and BODY. \(fn NAME FUNCTION ARG-LIST &rest BODY)" nil (quote macro)) (autoload 'defmacro-mh "mh-acros" "\ Create macro NAME. If MACRO exists, then NAME becomes an alias for MACRO. Otherwise, create macro NAME with ARG-LIST and BODY. \(fn NAME MACRO ARG-LIST &rest BODY)" nil (quote macro)) (autoload 'mh-make-local-hook "mh-acros" "\ Make HOOK local if needed. XEmacs and versions of GNU Emacs before 21.1 require `make-local-hook' to be called. \(fn HOOK)" nil (quote macro)) (autoload 'mh-mark-active-p "mh-acros" "\ A macro that expands into appropriate code in XEmacs and nil in GNU Emacs. In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if variable `transient-mark-mode' is active. \(fn CHECK-TRANSIENT-MARK-MODE-FLAG)" nil (quote macro)) (autoload 'mh-defstruct "mh-acros" "\ Replacement for `defstruct' from the \"cl\" package. The `defstruct' in the \"cl\" library produces compiler warnings, and generates code that uses functions present in \"cl\" at run-time. This is a partial replacement, that avoids these issues. NAME-SPEC declares the name of the structure, while FIELDS describes the various structure fields. Lookup `defstruct' for more details. \(fn NAME-SPEC &rest FIELDS)" nil (quote macro)) (autoload 'with-mh-folder-updating "mh-acros" "\ Format is (with-mh-folder-updating (SAVE-MODIFICATION-FLAG) &body BODY). Execute BODY, which can modify the folder buffer without having to worry about file locking or the read-only flag, and return its result. If SAVE-MODIFICATION-FLAG is non-nil, the buffer's modification flag is unchanged, otherwise it is cleared. \(fn SAVE-MODIFICATION-FLAG &rest BODY)" nil (quote macro)) (autoload 'mh-in-show-buffer "mh-acros" "\ Format is (mh-in-show-buffer (SHOW-BUFFER) &body BODY). Display buffer SHOW-BUFFER in other window and execute BODY in it. Stronger than `save-excursion', weaker than `save-window-excursion'. \(fn SHOW-BUFFER &rest BODY)" nil (quote macro)) (autoload 'mh-do-at-event-location "mh-acros" "\ Switch to the location of EVENT and execute BODY. After BODY has been executed return to original window. The modification flag of the buffer in the event window is preserved. \(fn EVENT &rest BODY)" nil (quote macro)) (defsubst mh-seq-msgs (sequence) "\ Extract messages from the given SEQUENCE." (cdr sequence)) (autoload 'mh-iterate-on-messages-in-region "mh-acros" "\ Iterate over region. VAR is bound to the message on the current line as we loop starting from BEGIN till END. In each step BODY is executed. If VAR is nil then the loop is executed without any binding. \(fn VAR BEGIN END &rest BODY)" nil (quote macro)) (autoload 'mh-iterate-on-range "mh-acros" "\ Iterate an operation over a region or sequence. VAR is bound to each message in turn in a loop over RANGE, which can be a message number, a list of message numbers, a sequence, a region in a cons cell, or a MH range (something like last:20) in a string. In each iteration, BODY is executed. The parameter RANGE is usually created with `mh-interactive-range' in order to provide a uniform interface to MH-E functions. \(fn VAR RANGE &rest BODY)" nil (quote macro)) ;;;*** (provide 'mh-loaddefs) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t ;; End: ;;; mh-loaddefs.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-tool-bar.el0000644000175000000620000005256312114520723020077 0ustar wohlerstaff;;; mh-tool-bar.el --- MH-E tool bar support ;; Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: (require 'mh-e) (mh-do-in-gnu-emacs (require 'tool-bar)) (mh-do-in-xemacs (require 'toolbar)) ;;; Tool Bar Commands (defun mh-tool-bar-search (&optional arg) "Interactively call `mh-tool-bar-search-function'. Optional argument ARG is not used." (interactive "P") (call-interactively mh-tool-bar-search-function)) (defun mh-tool-bar-customize () "Call `mh-customize' from the tool bar." (interactive) (mh-customize t)) (defun mh-tool-bar-folder-help () "Visit \"(mh-e)Top\"." (interactive) (info "(mh-e)Top") (delete-other-windows)) (defun mh-tool-bar-letter-help () "Visit \"(mh-e)Editing Drafts\"." (interactive) (info "(mh-e)Editing Drafts") (delete-other-windows)) (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) "Generate FUNCTION that replies to RECIPIENT. If FOLDER-BUFFER-FLAG is nil then the function generated... When INCLUDE-FLAG is non-nil, include message body being replied to." `(defun ,function (&optional arg) ,(format "Reply to \"%s\".\nWhen ARG is non-nil include message in reply." recipient) (interactive "P") ,(if folder-buffer-flag nil '(set-buffer mh-show-folder-buffer)) (mh-reply (mh-get-msg-num nil) ,recipient arg))) (mh-tool-bar-reply-generator mh-tool-bar-reply-from "from" t) (mh-tool-bar-reply-generator mh-show-tool-bar-reply-from "from" nil) (mh-tool-bar-reply-generator mh-tool-bar-reply-to "to" t) (mh-tool-bar-reply-generator mh-show-tool-bar-reply-to "to" nil) (mh-tool-bar-reply-generator mh-tool-bar-reply-all "all" t) (mh-tool-bar-reply-generator mh-show-tool-bar-reply-all "all" nil) ;;; Tool Bar Creation ;; Shush compiler. (defvar image-load-path) (defmacro mh-tool-bar-define (defaults &rest buttons) "Define a tool bar for MH-E. DEFAULTS is the list of buttons that are present by default. It is a list of lists where the sublists are of the following form: (:KEYWORD FUNC1 FUNC2 FUNC3 ...) Here :KEYWORD is one of :folder or :letter. If it is :folder then the default buttons in the folder and show mode buffers are being specified. If it is :letter then the default buttons in the letter mode are listed. FUNC1, FUNC2, FUNC3, ... are the names of the functions that the buttons would execute. Each element of BUTTONS is a list consisting of four mandatory items and one optional item as follows: (FUNCTION MODES ICON DOC &optional ENABLE-EXPR) where, FUNCTION is the name of the function that will be executed when the button is clicked. MODES is a list of symbols. List elements must be from \"folder\", \"letter\" and \"sequence\". If \"folder\" is present then the button is available in the folder and show buffer. If the name of FUNCTION is of the form \"mh-foo\", where foo is some arbitrary string, then we check if the function `mh-show-foo' exists. If it exists then that function is used in the show buffer. Otherwise the original function `mh-foo' is used in the show buffer as well. Presence of \"sequence\" is handled similar to the above. The only difference is that the button is shown only when the folder is narrowed to a sequence. If \"letter\" is present in MODES, then the button is available during draft editing and runs FUNCTION when clicked. ICON is the icon that is drawn in the button. DOC is the documentation for the button. It is used in tool-tips and in providing other help to the user. GNU Emacs uses only the first line of the string. So the DOC should be formatted such that the first line is useful and complete without the rest of the string. Optional item ENABLE-EXPR is an arbitrary lisp expression. If it evaluates to nil, then the button is inactive, otherwise it is active. If it isn't present then the button is always active." ;; The following variable names have been carefully chosen to make code ;; generation easier. Modifying the names should be done carefully. (let (folder-buttons folder-docs folder-button-setter sequence-button-setter show-buttons show-button-setter show-seq-button-setter letter-buttons letter-docs letter-button-setter folder-defaults letter-defaults folder-vectors show-vectors letter-vectors) (dolist (x defaults) (cond ((eq (car x) :folder) (setq folder-defaults (cdr x))) ((eq (car x) :letter) (setq letter-defaults (cdr x))))) (dolist (button buttons) (unless (and (listp button) (or (equal (length button) 4) (equal (length button) 5))) (error "Incorrect MH-E tool-bar button specification: %s" button)) (let* ((name (nth 0 button)) (name-str (symbol-name name)) (icon (nth 2 button)) (xemacs-icon (mh-do-in-xemacs `(cdr (assoc (quote ,(intern icon)) mh-xemacs-icon-map)))) (full-doc (nth 3 button)) (doc (if (string-match "\\(.*\\)\n" full-doc) (match-string 1 full-doc) full-doc)) (enable-expr (if (eql (length button) 4) t (nth 4 button))) (modes (nth 1 button)) functions show-sym) (when (memq 'letter modes) (setq functions `(:letter ,name))) (when (or (memq 'folder modes) (memq 'sequence modes)) (setq functions (append `(,(if (memq 'folder modes) :folder :sequence) ,name) functions)) (setq show-sym (if (string-match "^mh-\\(.*\\)$" name-str) (intern (concat "mh-show-" (match-string 1 name-str))) name)) (setq functions (append `(,(if (memq 'folder modes) :show :show-seq) ,(if (fboundp show-sym) show-sym name)) functions))) (do ((functions functions (cddr functions))) ((null functions)) (let* ((type (car functions)) (function (cadr functions)) (type1 (substring (symbol-name type) 1)) (vector-list (cond ((eq type :show) 'show-vectors) ((eq type :show-seq) 'show-vectors) ((eq type :letter) 'letter-vectors) (t 'folder-vectors))) (list (cond ((eq type :letter) 'mh-tool-bar-letter-buttons) (t 'mh-tool-bar-folder-buttons))) (key (intern (concat "mh-" type1 "-tool-bar-" name-str))) (setter (intern (concat type1 "-button-setter"))) (mbuttons (cond ((eq type :letter) 'letter-buttons) ((eq type :show) 'show-buttons) ((eq type :show-seq) 'show-buttons) (t 'folder-buttons))) (docs (cond ((eq mbuttons 'letter-buttons) 'letter-docs) ((eq mbuttons 'folder-buttons) 'folder-docs)))) (add-to-list vector-list `(vector ,xemacs-icon ',function t ,full-doc)) (add-to-list setter `(when (member ',name ,list) (mh-funcall-if-exists tool-bar-add-item ,icon ',function ',key :help ,doc :enable ',enable-expr))) (add-to-list mbuttons name) (if docs (add-to-list docs doc)))))) (setq folder-buttons (nreverse folder-buttons) letter-buttons (nreverse letter-buttons) show-buttons (nreverse show-buttons) letter-docs (nreverse letter-docs) folder-docs (nreverse folder-docs) folder-vectors (nreverse folder-vectors) show-vectors (nreverse show-vectors) letter-vectors (nreverse letter-vectors)) (dolist (x folder-defaults) (unless (memq x folder-buttons) (error "Folder defaults contains unknown button %s" x))) (dolist (x letter-defaults) (unless (memq x letter-buttons) (error "Letter defaults contains unknown button %s" x))) `(eval-when (compile load eval) ;; GNU Emacs tool bar specific code (mh-do-in-gnu-emacs (defun mh-buffer-exists-p (mode) "Test whether a buffer with major mode MODE is present." (loop for buf in (buffer-list) when (with-current-buffer buf (eq major-mode mode)) return t)) ;; Tool bar initialization functions (defun mh-tool-bar-folder-buttons-init () (when (mh-buffer-exists-p 'mh-folder-mode) (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) (image-load-path (cons (car load-path) (when (boundp 'image-load-path) image-load-path)))) (setq mh-folder-tool-bar-map (let ((tool-bar-map (make-sparse-keymap))) ,@(nreverse folder-button-setter) tool-bar-map)) (setq mh-folder-seq-tool-bar-map (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map))) ,@(nreverse sequence-button-setter) tool-bar-map)) (setq mh-show-tool-bar-map (let ((tool-bar-map (make-sparse-keymap))) ,@(nreverse show-button-setter) tool-bar-map)) (setq mh-show-seq-tool-bar-map (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map))) ,@(nreverse show-seq-button-setter) tool-bar-map))))) (defun mh-tool-bar-letter-buttons-init () (when (mh-buffer-exists-p 'mh-letter-mode) (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) (image-load-path (cons (car load-path) (when (boundp 'image-load-path) image-load-path)))) (setq mh-letter-tool-bar-map (let ((tool-bar-map (make-sparse-keymap))) ,@(nreverse letter-button-setter) tool-bar-map))))) ;; Custom setter functions (defun mh-tool-bar-update (mode default-map sequence-map) "Update `tool-bar-map' in all buffers of MODE. Use SEQUENCE-MAP if display is limited; DEFAULT-MAP otherwise." (loop for buf in (buffer-list) do (with-current-buffer buf (if (eq mode major-mode) (let ((map (if mh-folder-view-stack sequence-map default-map))) ;; Yes, make-local-variable is necessary since we ;; get here during initialization when loading ;; mh-e.el, after the +inbox buffer has been ;; created, but before mh-folder-mode has run and ;; created the local map. (set (make-local-variable 'tool-bar-map) map)))))) (defun mh-tool-bar-folder-buttons-set (symbol value) "Construct tool bar for `mh-folder-mode' and `mh-show-mode'." (set-default symbol value) (mh-tool-bar-folder-buttons-init) (mh-tool-bar-update 'mh-folder-mode mh-folder-tool-bar-map mh-folder-seq-tool-bar-map) (mh-tool-bar-update 'mh-show-mode mh-show-tool-bar-map mh-show-seq-tool-bar-map)) (defun mh-tool-bar-letter-buttons-set (symbol value) "Construct tool bar for `mh-letter-mode'." (set-default symbol value) (mh-tool-bar-letter-buttons-init) (mh-tool-bar-update 'mh-letter-mode mh-letter-tool-bar-map mh-letter-tool-bar-map))) ;; XEmacs specific code (mh-do-in-xemacs (defvar mh-tool-bar-folder-vector-map (list ,@(loop for button in folder-buttons for vector in folder-vectors collect `(cons ',button ,vector)))) (defvar mh-tool-bar-show-vector-map (list ,@(loop for button in show-buttons for vector in show-vectors collect `(cons ',button ,vector)))) (defvar mh-tool-bar-letter-vector-map (list ,@(loop for button in letter-buttons for vector in letter-vectors collect `(cons ',button ,vector)))) (defvar mh-tool-bar-folder-buttons) (defvar mh-tool-bar-show-buttons) (defvar mh-tool-bar-letter-buttons) ;; Custom setter functions (defun mh-tool-bar-letter-buttons-set (symbol value) (set-default symbol value) (when mh-xemacs-has-tool-bar-flag (setq mh-tool-bar-letter-buttons (loop for b in value collect (cdr (assoc b mh-tool-bar-letter-vector-map)))))) (defun mh-tool-bar-folder-buttons-set (symbol value) (set-default symbol value) (when mh-xemacs-has-tool-bar-flag (setq mh-tool-bar-folder-buttons (loop for b in value collect (cdr (assoc b mh-tool-bar-folder-vector-map)))) (setq mh-tool-bar-show-buttons (loop for b in value collect (cdr (assoc b mh-tool-bar-show-vector-map)))))) (defun mh-tool-bar-init (mode) "Install tool bar in MODE." (when mh-xemacs-use-tool-bar-flag (let ((tool-bar (cond ((eq mode :folder) mh-tool-bar-folder-buttons) ((eq mode :letter) mh-tool-bar-letter-buttons) ((eq mode :show) mh-tool-bar-show-buttons))) (height 37) (width 40) (buffer (current-buffer))) (cond ((eq mh-xemacs-tool-bar-position 'top) (set-specifier top-toolbar tool-bar buffer) (set-specifier top-toolbar-visible-p t) (set-specifier top-toolbar-height height)) ((eq mh-xemacs-tool-bar-position 'bottom) (set-specifier bottom-toolbar tool-bar buffer) (set-specifier bottom-toolbar-visible-p t) (set-specifier bottom-toolbar-height height)) ((eq mh-xemacs-tool-bar-position 'left) (set-specifier left-toolbar tool-bar buffer) (set-specifier left-toolbar-visible-p t) (set-specifier left-toolbar-width width)) ((eq mh-xemacs-tool-bar-position 'right) (set-specifier right-toolbar tool-bar buffer) (set-specifier right-toolbar-visible-p t) (set-specifier right-toolbar-width width)) (t (set-specifier default-toolbar tool-bar buffer))))))) ;; Declare customizable tool bars (custom-declare-variable 'mh-tool-bar-folder-buttons '(list ,@(mapcar (lambda (x) `(quote ,x)) folder-defaults)) "List of buttons to include in MH-Folder tool bar." :group 'mh-tool-bar :set 'mh-tool-bar-folder-buttons-set :type '(set ,@(loop for x in folder-buttons for y in folder-docs collect `(const :tag ,y ,x))) ;;:package-version '(MH-E "7.1") ) (custom-declare-variable 'mh-tool-bar-letter-buttons '(list ,@(mapcar (lambda (x) `(quote ,x)) letter-defaults)) "List of buttons to include in MH-Letter tool bar." :group 'mh-tool-bar :set 'mh-tool-bar-letter-buttons-set :type '(set ,@(loop for x in letter-buttons for y in letter-docs collect `(const :tag ,y ,x))) ;;:package-version '(MH-E "7.1") )))) ;; The icon names are duplicated in the Makefile and mh-xemacs.el. (mh-tool-bar-define ((:folder mh-inc-folder mh-mime-save-parts mh-previous-undeleted-msg mh-page-msg mh-next-undeleted-msg mh-delete-msg mh-refile-msg mh-undo mh-execute-commands mh-toggle-tick mh-reply mh-alias-grab-from-field mh-send mh-rescan-folder mh-tool-bar-search mh-visit-folder mh-tool-bar-customize mh-tool-bar-folder-help mh-widen) (:letter mh-send-letter save-buffer mh-fully-kill-draft mh-compose-insertion ispell-message undo clipboard-kill-region clipboard-kill-ring-save clipboard-yank mh-tool-bar-customize mh-tool-bar-letter-help)) ;; Folder/Show buffer buttons (mh-inc-folder (folder) "mail/inbox" "Incorporate new mail in Inbox This button runs `mh-inc-folder' which drags any new mail into your Inbox folder") (mh-mime-save-parts (folder) "attach" "Save MIME parts from this message This button runs `mh-mime-save-parts' which saves a message's different parts into separate files") (mh-previous-undeleted-msg (folder) "left-arrow" "Go to the previous undeleted message This button runs `mh-previous-undeleted-msg'") (mh-page-msg (folder) "next-page" "Page the current message forwards This button runs `mh-page-msg'") (mh-next-undeleted-msg (folder) "right-arrow" "Go to the next undeleted message The button runs `mh-next-undeleted-msg'") (mh-delete-msg (folder) "delete" "Mark this message for deletion This button runs `mh-delete-msg'") (mh-refile-msg (folder) "mail/move" "Refile this message This button runs `mh-refile-msg'") (mh-undo (folder) "undo" "Undo last operation This button runs `undo'" (mh-outstanding-commands-p)) (mh-execute-commands (folder) "data-save" "Perform moves and deletes This button runs `mh-execute-commands'" (mh-outstanding-commands-p)) (mh-toggle-tick (folder) "mail/flag-for-followup" "Toggle tick mark This button runs `mh-toggle-tick'") (mh-toggle-showing (folder) "show" "Toggle showing message This button runs `mh-toggle-showing'") (mh-reply (folder) "mail/reply" "Reply to this message This button runs `mh-reply'") (mh-tool-bar-reply-from (folder) "mail/reply-from" "Reply to \"from\"") (mh-tool-bar-reply-to (folder) "mail/reply-to" "Reply to \"to\"") (mh-tool-bar-reply-all (folder) "mail/reply-all" "Reply to \"all\"") (mh-alias-grab-from-field (folder) "contact" "Create alias for sender This button runs `mh-alias-grab-from-field'" (and (mh-extract-from-header-value) (not (mh-alias-for-from-p)))) (mh-send (folder) "mail/compose" "Compose new message This button runs `mh-send'") (mh-rescan-folder (folder) "refresh" "Rescan this folder This button runs `mh-rescan-folder'") (mh-pack-folder (folder) "mail/repack" "Repack this folder This button runs `mh-pack-folder'") (mh-tool-bar-search (folder) "search" "Search This button runs `mh-tool-bar-search-function'") (mh-visit-folder (folder) "open" "Visit other folder This button runs `mh-visit-folder'") ;; Letter buffer buttons (mh-send-letter (letter) "mail/send" "Send this letter") (save-buffer (letter) "save" "Save current buffer to its file" (buffer-modified-p)) (mh-fully-kill-draft (letter) "delete" "Kill this draft") (mh-compose-insertion (letter) "attach" "Insert attachment") (ispell-message (letter) "spell" "Check spelling") (undo (letter) "undo" "Undo last operation") (clipboard-kill-region (letter) "cut" "Cut (kill) text in region") (clipboard-kill-ring-save (letter) "copy" "Copy text in region") (clipboard-yank (letter) "paste" "Paste (yank) text cut or copied earlier") ;; Common buttons (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences") (mh-tool-bar-folder-help (folder) "help" "Help! (general help) This button runs `info'") (mh-tool-bar-letter-help (letter) "help" "Help! (general help) This button runs `info'") ;; Folder narrowed to sequence buttons (mh-widen (sequence) "zoom-out" "Widen from the sequence This button runs `mh-widen'")) (provide 'mh-tool-bar) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-tool-bar.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-letter.el0000644000175000000620000011532412114520723017652 0ustar wohlerstaff;;; mh-letter.el --- MH-Letter mode ;; Copyright (C) 1993, 1995, 1997, 2000-2013 Free Software Foundation, ;; Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Mode for composing and sending a draft message. ;; Functions that would ordinarily be in here that are needed by ;; mh-show.el should be placed in the Message Utilities section in ;; mh-utils.el. That will help prevent the loading of this file until ;; a message is actually composed. ;;; Change Log: ;;; Code: (require 'mh-e) (require 'gnus-util) ;; Dynamically-created functions not found in mh-loaddefs.el. (autoload 'mh-tool-bar-letter-buttons-init "mh-tool-bar") (autoload 'mh-tool-bar-init "mh-tool-bar") (autoload 'mml-insert-tag "mml") ;;; Variables (defvar mh-letter-complete-function-alist '((bcc . mh-alias-letter-expand-alias) (cc . mh-alias-letter-expand-alias) (dcc . mh-alias-letter-expand-alias) (fcc . mh-folder-expand-at-point) (from . mh-alias-letter-expand-alias) (mail-followup-to . mh-alias-letter-expand-alias) (mail-reply-to . mh-alias-letter-expand-alias) (reply-to . mh-alias-letter-expand-alias) (to . mh-alias-letter-expand-alias)) "Alist of header fields and completion functions to use.") (defvar mh-yank-hooks nil "Obsolete hook for modifying a citation just inserted in the mail buffer. Each hook function can find the citation between point and mark. And each hook function should leave point and mark around the citation text as modified. This is a normal hook, misnamed for historical reasons. It is obsolete and is only used if `mail-citation-hook' is nil.") (mh-make-obsolete-variable 'mh-yank-hooks 'mail-citation-hook "19.34") ;;; Letter Menu (easy-menu-define mh-letter-menu mh-letter-mode-map "Menu for MH-E letter mode." '("Letter" ["Send This Draft" mh-send-letter t] ["Split Current Line" mh-open-line t] ["Check Recipient" mh-check-whom t] ["Yank Current Message" mh-yank-cur-msg t] ["Insert a Message..." mh-insert-letter t] ["Insert Signature" mh-insert-signature t] ("Encrypt/Sign Message" ["Sign Message" mh-mml-secure-message-sign mh-pgp-support-flag] ["Encrypt Message" mh-mml-secure-message-encrypt mh-pgp-support-flag] ["Sign+Encrypt Message" mh-mml-secure-message-signencrypt mh-pgp-support-flag] ["Disable Security" mh-mml-unsecure-message mh-pgp-support-flag] "--" "Security Method" ["PGP (MIME)" (setq mh-mml-method-default "pgpmime") :style radio :selected (equal mh-mml-method-default "pgpmime")] ["PGP" (setq mh-mml-method-default "pgp") :style radio :selected (equal mh-mml-method-default "pgp")] ["S/MIME" (setq mh-mml-method-default "smime") :style radio :selected (equal mh-mml-method-default "smime")] "--" ["Save Method as Default" (customize-save-variable 'mh-mml-method-default mh-mml-method-default) t] ) ["Compose Insertion..." mh-compose-insertion t] ["Compose Compressed tar (MH)..." mh-mh-compose-external-compressed-tar t] ["Compose Get File (MH)..." mh-mh-compose-anon-ftp t] ["Compose Forward..." mh-compose-forward t] ;; The next two will have to be merged. But I also need to make sure the ;; user can't mix tags of both types. ["Pull in All Compositions (MH)" mh-mh-to-mime (mh-mh-directive-present-p)] ["Pull in All Compositions (MML)" mh-mml-to-mime (mh-mml-tag-present-p)] ["Revert to Non-MIME Edit (MH)" mh-mh-to-mime-undo (equal mh-compose-insertion 'mh)] ["Kill This Draft" mh-fully-kill-draft t])) ;;; MH-Letter Keys ;; If this changes, modify mh-letter-mode-help-messages accordingly, above. (gnus-define-keys mh-letter-mode-map " " mh-letter-complete-or-space "," mh-letter-confirm-address "\C-c?" mh-help "\C-c\C-\\" mh-fully-kill-draft ;if no C-q "\C-c\C-^" mh-insert-signature ;if no C-s "\C-c\C-c" mh-send-letter "\C-c\C-d" mh-insert-identity "\C-c\C-e" mh-mh-to-mime "\C-c\C-f\C-a" mh-to-field "\C-c\C-f\C-b" mh-to-field "\C-c\C-f\C-c" mh-to-field "\C-c\C-f\C-d" mh-to-field "\C-c\C-f\C-f" mh-to-fcc "\C-c\C-f\C-l" mh-to-field "\C-c\C-f\C-m" mh-to-field "\C-c\C-f\C-r" mh-to-field "\C-c\C-f\C-s" mh-to-field "\C-c\C-f\C-t" mh-to-field "\C-c\C-fa" mh-to-field "\C-c\C-fb" mh-to-field "\C-c\C-fc" mh-to-field "\C-c\C-fd" mh-to-field "\C-c\C-ff" mh-to-fcc "\C-c\C-fl" mh-to-field "\C-c\C-fm" mh-to-field "\C-c\C-fr" mh-to-field "\C-c\C-fs" mh-to-field "\C-c\C-ft" mh-to-field "\C-c\C-i" mh-insert-letter "\C-c\C-m\C-e" mh-mml-secure-message-encrypt "\C-c\C-m\C-f" mh-compose-forward "\C-c\C-m\C-g" mh-mh-compose-anon-ftp "\C-c\C-m\C-i" mh-compose-insertion "\C-c\C-m\C-m" mh-mml-to-mime "\C-c\C-m\C-n" mh-mml-unsecure-message "\C-c\C-m\C-s" mh-mml-secure-message-sign "\C-c\C-m\C-t" mh-mh-compose-external-compressed-tar "\C-c\C-m\C-u" mh-mh-to-mime-undo "\C-c\C-m\C-x" mh-mh-compose-external-type "\C-c\C-mee" mh-mml-secure-message-encrypt "\C-c\C-mes" mh-mml-secure-message-signencrypt "\C-c\C-mf" mh-compose-forward "\C-c\C-mg" mh-mh-compose-anon-ftp "\C-c\C-mi" mh-compose-insertion "\C-c\C-mm" mh-mml-to-mime "\C-c\C-mn" mh-mml-unsecure-message "\C-c\C-mse" mh-mml-secure-message-signencrypt "\C-c\C-mss" mh-mml-secure-message-sign "\C-c\C-mt" mh-mh-compose-external-compressed-tar "\C-c\C-mu" mh-mh-to-mime-undo "\C-c\C-mx" mh-mh-compose-external-type "\C-c\C-o" mh-open-line "\C-c\C-q" mh-fully-kill-draft "\C-c\C-s" mh-insert-signature "\C-c\C-t" mh-letter-toggle-header-field-display "\C-c\C-w" mh-check-whom "\C-c\C-y" mh-yank-cur-msg "\C-c\M-d" mh-insert-auto-fields "\M-\t" mh-letter-complete "\t" mh-letter-next-header-field-or-indent [backtab] mh-letter-previous-header-field) ;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el. ;;; MH-Letter Help Messages ;; Group messages logically, more or less. (defvar mh-letter-mode-help-messages '((nil "Send letter: \\[mh-send-letter] " "Open line: \\[mh-open-line]\n" "Kill letter: \\[mh-fully-kill-draft] " "Check recipients: \\[mh-check-whom]\n\n" "Insert:\n" " Current message: \\[mh-yank-cur-msg]\n" " Attachment: \\[mh-compose-insertion]\n" " Message to forward: \\[mh-compose-forward]\n" " Signature: \\[mh-insert-signature]\n\n" "Security:\n" " Encrypt message: \\[mh-mml-secure-message-encrypt]\n" " Sign message: \\[mh-mml-secure-message-sign]\n" " Sign+Encrypt message: \\[mh-mml-secure-message-signencrypt]")) "Key binding cheat sheet. This is an associative array which is used to show the most common commands. The key is a prefix char. The value is one or more strings which are concatenated together and displayed in the minibuffer if ? is pressed after the prefix character. The special key nil is used to display the non-prefixed commands. The substitutions described in `substitute-command-keys' are performed as well.") ;;; MH-Letter Font Lock (defvar mh-letter-font-lock-keywords `(,@(mh-show-font-lock-keywords-with-cite) (mh-font-lock-field-data (1 'mh-letter-header-field prepend t))) "Additional expressions to highlight in MH-Letter buffers.") (defun mh-font-lock-field-data (limit) "Find header field region between point and LIMIT." (and (< (point) (mh-letter-header-end)) (< (point) limit) (let ((end (min limit (mh-letter-header-end))) (point (point)) data-end data-begin field) (end-of-line) (setq data-end (if (re-search-forward "^[^ \t]" end t) (match-beginning 0) end)) (goto-char (1- data-end)) (if (not (re-search-backward "\\(^[^ \t][^:]*\\):[ \t]*" nil t)) (setq data-begin (point-min)) (setq data-begin (match-end 0)) (setq field (match-string 1))) (setq data-begin (max point data-begin)) (goto-char (if (equal point data-end) (1+ data-end) data-end)) (cond ((and field (mh-letter-skipped-header-field-p field)) (set-match-data nil) nil) (t (set-match-data (list data-begin data-end data-begin data-end)) t))))) (defun mh-letter-header-end () "Find the end of the message header. This function is to be used only for font locking. It works by searching for `mh-mail-header-separator' in the buffer." (save-excursion (goto-char (point-min)) (cond ((equal mh-mail-header-separator "") (point-min)) ((search-forward (format "\n%s\n" mh-mail-header-separator) nil t) (mh-line-beginning-position 0)) (t (point-min))))) ;;; MH-Letter Mode ;; Shush compiler. (mh-do-in-xemacs (defvar font-lock-defaults)) ;; Ensure new buffers won't get this mode if default major-mode is nil. (put 'mh-letter-mode 'mode-class 'special) ;;;###mh-autoload (define-derived-mode mh-letter-mode mail-mode "MH-Letter" "Mode for composing letters in MH-E\\. When you have finished composing, type \\[mh-send-letter] to send the message using the MH mail handling system. There are two types of tags used by MH-E when composing MIME messages: MML and MH. The option `mh-compose-insertion' controls what type of tags are inserted by MH-E commands. These tags can be converted to MIME body parts by running \\[mh-mh-to-mime] for MH-style directives or \\[mh-mml-to-mime] for MML tags. Options that control this mode can be changed with \\[customize-group]; specify the \"mh-compose\" group. When a message is composed, the hooks `text-mode-hook', `mail-mode-hook', and `mh-letter-mode-hook' are run (in that order). \\{mh-letter-mode-map}" (mh-find-path) (make-local-variable 'mh-send-args) (make-local-variable 'mh-annotate-char) (make-local-variable 'mh-annotate-field) (make-local-variable 'mh-previous-window-config) (make-local-variable 'mh-sent-from-folder) (make-local-variable 'mh-sent-from-msg) (mh-do-in-gnu-emacs (unless mh-letter-tool-bar-map (mh-tool-bar-letter-buttons-init)) (if (boundp 'tool-bar-map) (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))) (mh-do-in-xemacs (mh-tool-bar-init :letter)) ;; Set the local value of mh-mail-header-separator according to what is ;; present in the buffer... (set (make-local-variable 'mh-mail-header-separator) (save-excursion (goto-char (mh-mail-header-end)) (buffer-substring-no-properties (point) (mh-line-end-position)))) (make-local-variable 'mail-header-separator) (setq mail-header-separator mh-mail-header-separator) ;override sendmail.el (mh-set-help mh-letter-mode-help-messages) (setq buffer-invisibility-spec '((vanish . t) t)) (set (make-local-variable 'line-move-ignore-invisible) t) ;; Enable undo since a show-mode buffer might have been reused. (buffer-enable-undo) (make-local-variable 'font-lock-defaults) (cond ((or (equal mh-highlight-citation-style 'font-lock) (equal mh-highlight-citation-style 'gnus)) ;; Let's use font-lock even if gnus is used in show-mode. The reason ;; is that gnus uses static text properties which are not appropriate ;; for a buffer that will be edited. So the choice here is either fontify ;; the citations and header... (setq font-lock-defaults '(mh-letter-font-lock-keywords t))) (t ;; ...or the header only (setq font-lock-defaults '((mh-show-font-lock-keywords) t)))) (easy-menu-add mh-letter-menu) ;; Maybe we want to use the existing Mail menu from mail-mode in ;; 9.0; in the mean time, let's remove it since the redundancy will ;; only produce confusion. (define-key mh-letter-mode-map [menu-bar mail] 'undefined) (mh-do-in-xemacs (easy-menu-remove mail-menubar-menu)) (setq fill-column mh-letter-fill-column) (add-hook 'completion-at-point-functions 'mh-letter-completion-at-point nil 'local) ;; If text-mode-hook turned on auto-fill, tune it for messages (when auto-fill-function (make-local-variable 'auto-fill-function) (setq auto-fill-function 'mh-auto-fill-for-letter))) ;;; MH-Letter Commands ;; Alphabetical. ;; See also mh-comp.el and mh-mime.el. (defun mh-check-whom () "Verify recipients, showing expansion of any aliases. This command expands aliases so you can check the actual address(es) in the alias. A new buffer named \"*MH-E Recipients*\" is created with the output of \"whom\"." (interactive) (let ((file-name buffer-file-name)) (save-buffer) (message "Checking recipients...") (mh-in-show-buffer (mh-recipients-buffer) (bury-buffer (current-buffer)) (erase-buffer) (mh-exec-cmd-output "whom" t file-name)) (message "Checking recipients...done"))) (defun mh-insert-letter (folder message verbatim) "Insert a message. This command prompts you for the FOLDER and MESSAGE number, which defaults to the current message in that folder. It then inserts the message, indented by `mh-ins-buf-prefix' (\"> \") unless `mh-yank-behavior' is set to one of the supercite flavors in which case supercite is used to format the message. Certain undesirable header fields (see `mh-invisible-header-fields-compiled') are removed before insertion. If given a prefix argument VERBATIM, the header is left intact, the message is not indented, and \"> \" is not inserted before each line. This command leaves the mark before the letter and point after it." (interactive (let* ((folder (mh-prompt-for-folder "Message from" mh-sent-from-folder nil)) (default (if (equal folder mh-sent-from-folder) (or mh-sent-from-msg (nth 0 (mh-translate-range folder "cur"))) (nth 0 (mh-translate-range folder "cur")))) (message (read-string (concat "Message number" (or (and default (format " (default %d): " default)) ": ")) nil nil (if (numberp default) (int-to-string default) default)))) (list folder message current-prefix-arg))) (if (equal message "") (error "No message number given")) (save-restriction (narrow-to-region (point) (point)) (let ((start (point-min))) (insert-file-contents (expand-file-name message (mh-expand-file-name folder))) (when (not verbatim) (mh-clean-msg-header start mh-invisible-header-fields-compiled nil) (goto-char (point-max)) ;Needed for sc-cite-original (push-mark) ;Needed for sc-cite-original (goto-char (point-min)) ;Needed for sc-cite-original (mh-insert-prefix-string mh-ins-buf-prefix))))) ;;;###mh-autoload (defun mh-insert-signature (&optional file) "Insert signature in message. This command inserts your signature at the current cursor location. By default, the text of your signature is taken from the file \"~/.signature\". You can read from other sources by changing the option `mh-signature-file-name'. A signature separator (\"-- \") will be added if the signature block does not contain one and `mh-signature-separator-flag' is on. The hook `mh-insert-signature-hook' is run after the signature is inserted. Hook functions may access the actual name of the file or the function used to insert the signature with `mh-signature-file-name'. The signature can also be inserted using Identities (see `mh-identity-list'). In a program, you can pass in a signature FILE." (interactive) (save-excursion (insert "\n") (let ((mh-signature-file-name (or file mh-signature-file-name)) (mh-mh-p (mh-mh-directive-present-p)) (mh-mml-p (mh-mml-tag-present-p))) (save-restriction (narrow-to-region (point) (point)) (cond ((mh-file-is-vcard-p mh-signature-file-name) (if (equal mh-compose-insertion 'mml) (insert "<#part type=\"text/x-vcard\" filename=\"" mh-signature-file-name "\" disposition=inline description=VCard>\n<#/part>") (insert "#text/x-vcard; name=\"" (file-name-nondirectory mh-signature-file-name) "\" [VCard] " (expand-file-name mh-signature-file-name)))) (t (cond (mh-mh-p (insert "#\n" "Content-Description: Signature\n")) (mh-mml-p (mml-insert-tag 'part 'type "text/plain" 'disposition "inline" 'description "Signature"))) (cond ((null mh-signature-file-name)) ((and (stringp mh-signature-file-name) (file-readable-p mh-signature-file-name)) (insert-file-contents mh-signature-file-name)) ((functionp mh-signature-file-name) (funcall mh-signature-file-name))))) (save-restriction (widen) (run-hooks 'mh-insert-signature-hook)) (goto-char (point-min)) (when (and (not (mh-file-is-vcard-p mh-signature-file-name)) mh-signature-separator-flag (> (point-max) (point-min)) (not (mh-signature-separator-p))) (cond (mh-mh-p (forward-line 2)) (mh-mml-p (forward-line 1))) (insert mh-signature-separator)) (if (not (> (point-max) (point-min))) (message "No signature found"))))) (force-mode-line-update)) (defun mh-letter-completion-at-point () "Return the completion data at point for MH letters. This provides alias and folder completion in header fields according to `mh-letter-complete-function-alist' and falls back on `mh-letter-complete-function-alist' elsewhere." (let ((func (and (mh-in-header-p) (cdr (assoc (mh-letter-header-field-at-point) mh-letter-complete-function-alist))))) (if func (or (funcall func) #'ignore) mh-letter-complete-function))) ;; TODO Now that completion-at-point performs the task of ;; mh-letter-complete, perhaps mh-letter-complete along with ;; mh-complete-word should be rewritten as a more general function for ;; XEmacs, renamed to mh-completion-at-point, and moved to ;; mh-compat.el. (defun-mh mh-letter-complete completion-at-point () "Perform completion on header field or word preceding point. If the field contains addresses (for example, \"To:\" or \"Cc:\") or folders (for example, \"Fcc:\") then this command will provide alias completion. In the body of the message, this command runs `mh-letter-complete-function' instead, which is set to `ispell-complete-word' by default." (interactive) (let ((data (mh-letter-completion-at-point))) (cond ((functionp data) (funcall data)) ((consp data) (let ((start (nth 0 data)) (end (nth 1 data)) (table (nth 2 data))) (mh-complete-word (buffer-substring-no-properties start end) table start end)))))) (defun mh-letter-complete-or-space (arg) "Perform completion or insert space. Turn on the option `mh-compose-space-does-completion-flag' to use this command to perform completion in the header. Otherwise, a space is inserted; use a prefix argument ARG to specify more than one space." (interactive "p") (let ((end-of-prev (save-excursion (goto-char (mh-beginning-of-word)) (mh-beginning-of-word -1)))) (cond ((not mh-compose-space-does-completion-flag) (self-insert-command arg)) ;; FIXME: This > test is redundant now that all the completion ;; functions do it anyway. ((> (point) end-of-prev) (self-insert-command arg)) ((let ((mh-letter-complete-function nil)) (mh-letter-completion-at-point)) (mh-letter-complete)) (t (self-insert-command arg))))) (defun mh-letter-confirm-address () "Flash alias expansion. Addresses are separated by a comma\; when you press the comma, this command flashes the alias expansion in the minibuffer if `mh-alias-flash-on-comma' is turned on." (interactive) (cond ((not (mh-in-header-p)) (self-insert-command 1)) ((eq (cdr (assoc (mh-letter-header-field-at-point) mh-letter-complete-function-alist)) 'mh-alias-letter-expand-alias) (mh-alias-reload-maybe) (mh-alias-minibuffer-confirm-address)) (t (self-insert-command 1)))) (defun mh-letter-next-header-field-or-indent (arg) "Cycle to next field. Within the header of the message, this command moves between fields that are highlighted with the face `mh-letter-header-field', skipping those fields listed in `mh-compose-skipped-header-fields'. After the last field, this command then moves point to the message body before cycling back to the first field. If point is already past the first line of the message body, then this command indents by calling `indent-relative' with the given prefix argument ARG." (interactive "P") (let ((header-end (save-excursion (goto-char (mh-mail-header-end)) (forward-line) (point)))) (if (> (point) header-end) (indent-relative arg) (mh-letter-next-header-field)))) (defun mh-letter-previous-header-field () "Cycle to the previous header field. This command moves backwards between the fields and cycles to the body of the message after the first field. Unlike the command \\[mh-letter-next-header-field-or-indent], it will always take point to the last field from anywhere in the body." (interactive) (let ((header-end (mh-mail-header-end))) (if (>= (point) header-end) (goto-char header-end) (mh-header-field-beginning)) (cond ((re-search-backward mh-letter-header-field-regexp nil t) (if (mh-letter-skipped-header-field-p (match-string 1)) (mh-letter-previous-header-field) (goto-char (match-end 0)) (mh-letter-skip-leading-whitespace-in-header-field))) (t (goto-char header-end) (forward-line))))) (defun mh-open-line () "Insert a newline and leave point before it. This command is similar to the command \\[open-line] in that it inserts a newline after point. It differs in that it also inserts the right number of quoting characters and spaces so that the next line begins in the same column as it was. This is useful when breaking up paragraphs in replies." (interactive) (let ((column (current-column)) (prefix (mh-current-fill-prefix))) (if (> (length prefix) column) (message "Sorry, point seems to be within the line prefix") (newline 2) (insert prefix) (while (> column (current-column)) (insert " ")) (forward-line -1)))) (defun mh-to-fcc (&optional folder) "Move to \"Fcc:\" header field. This command will prompt you for the FOLDER name in which to file a copy of the draft." (interactive (list (mh-prompt-for-folder "Fcc" (or (and mh-default-folder-for-message-function (save-excursion (goto-char (point-min)) (funcall mh-default-folder-for-message-function))) "") t))) (let ((last-input-event ?\C-f)) (expand-abbrev) (save-excursion (mh-to-field) (insert (if (mh-folder-name-p folder) (substring folder 1) folder))))) (defvar mh-to-field-choices '(("a" . "Mail-Reply-To:") ("b" . "Bcc:") ("c" . "Cc:") ("d" . "Dcc:") ("f" . "Fcc:") ("l" . "Mail-Followup-To:") ("m" . "From:") ("r" . "Reply-To:") ("s" . "Subject:") ("t" . "To:")) "Alist of (final-character . field-name) choices for `mh-to-field'.") (defun mh-to-field () "Move to specified header field. The field is indicated by the previous keystroke (the last keystroke of the command) according to the list in the variable `mh-to-field-choices'. Create the field if it does not exist. Set the mark to point before moving." (interactive) (expand-abbrev) (let ((target (cdr (or (assoc (char-to-string (logior last-input-event ?`)) mh-to-field-choices) ;; also look for a char for version 4 compat (assoc (logior last-input-event ?`) mh-to-field-choices)))) (case-fold-search t)) (push-mark) (cond ((mh-position-on-field target) (let ((eol (point))) (skip-chars-backward " \t") (delete-region (point) eol)) (if (and (not (eq (logior last-input-event ?`) ?s)) (save-excursion (backward-char 1) (not (looking-at "[:,]")))) (insert ", ") (insert " "))) (t (if (mh-position-on-field "To:") (forward-line 1)) (insert (format "%s \n" target)) (backward-char 1))))) ;;;###mh-autoload (defun mh-yank-cur-msg () "Insert the current message into the draft buffer. It is often useful to insert a snippet of text from a letter that someone mailed to provide some context for your reply. This command does this by adding an attribution, yanking a portion of text from the message to which you're replying, and inserting `mh-ins-buf-prefix' (`> ') before each line. The attribution consists of the sender's name and email address followed by the content of the option `mh-extract-from-attribution-verb'. You can also turn on the option `mh-delete-yanked-msg-window-flag' to delete the window containing the original message after yanking it to make more room on your screen for your reply. You can control how the message to which you are replying is yanked into your reply using `mh-yank-behavior'. If this isn't enough, you can gain full control over the appearance of the included text by setting `mail-citation-hook' to a function that modifies it. For example, if you set this hook to `trivial-cite' (which is NOT part of Emacs), set `mh-yank-behavior' to \"Body and Header\" (see URL `http://shasta.cs.uiuc.edu/~lrclause/tc.html'). Note that if `mail-citation-hook' is set, `mh-ins-buf-prefix' is not inserted. If the option `mh-yank-behavior' is set to one of the supercite flavors, the hook `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not inserted." (interactive) (let ((show-buffer)) (if (and mh-sent-from-folder (with-current-buffer mh-sent-from-folder mh-show-buffer) (setq show-buffer (with-current-buffer mh-sent-from-folder (get-buffer mh-show-buffer))) mh-sent-from-msg) (let ((to-point (point)) (to-buffer (current-buffer))) (if mh-delete-yanked-msg-window-flag (with-current-buffer mh-sent-from-folder (delete-windows-on show-buffer))) ;; Find displayed message (with-current-buffer show-buffer (let* ((from-attr (mh-extract-from-attribution)) (yank-region (mh-mark-active-p nil)) (mh-ins-str (cond ((and yank-region (or (eq 'supercite mh-yank-behavior) (eq 'autosupercite mh-yank-behavior) (eq t mh-yank-behavior))) ;; supercite needs the full header (concat (buffer-substring (point-min) (mh-mail-header-end)) "\n" (buffer-substring (region-beginning) (region-end)))) (yank-region (buffer-substring (region-beginning) (region-end))) ((or (eq 'body mh-yank-behavior) (eq 'attribution mh-yank-behavior) (eq 'autoattrib mh-yank-behavior)) (buffer-substring (save-excursion (goto-char (point-min)) (mh-goto-header-end 1) (point)) (point-max))) ((or (eq 'supercite mh-yank-behavior) (eq 'autosupercite mh-yank-behavior) (eq t mh-yank-behavior)) (buffer-substring (point-min) (point-max))) (t (buffer-substring (point) (point-max)))))) (with-current-buffer to-buffer (save-restriction (narrow-to-region to-point to-point) (insert (mh-filter-out-non-text mh-ins-str)) (goto-char (point-max)) ;Needed for sc-cite-original (push-mark) ;Needed for sc-cite-original (goto-char (point-min)) ;Needed for sc-cite-original (mh-insert-prefix-string mh-ins-buf-prefix) (when (or (eq 'attribution mh-yank-behavior) (eq 'autoattrib mh-yank-behavior)) (insert from-attr) (mh-identity-insert-attribution-verb nil) (insert "\n\n")) ;; If the user has selected a region, he has already "edited" the ;; text, so leave the cursor at the end of the yanked text. In ;; either case, leave a mark at the opposite end of the included ;; text to make it easy to jump or delete to the other end of the ;; text. (push-mark) (goto-char (point-max)) (if (null yank-region) (mh-exchange-point-and-mark-preserving-active-mark))))))) (error "There is no current message")))) ;;; Support Routines (defun mh-auto-fill-for-letter () "Perform auto-fill for message. Header is treated specially by inserting a tab before continuation lines." (if (mh-in-header-p) (let ((fill-prefix "\t")) (do-auto-fill)) (do-auto-fill))) (defun mh-filter-out-non-text (string) "Return STRING but without adornments such as MIME buttons and smileys." (with-temp-buffer ;; Insert the string to filter (insert string) (goto-char (point-min)) ;; Remove the MIME buttons (let ((can-move-forward t) (in-button nil)) (while can-move-forward (cond ((and (not (get-text-property (point) 'mh-data)) in-button) (delete-region (1- (point)) (point)) (setq in-button nil)) ((get-text-property (point) 'mh-data) (delete-region (point) (save-excursion (forward-line) (point))) (setq in-button t)) (t (setq can-move-forward (= (forward-line) 0)))))) ;; Return the contents without properties... This gets rid of emphasis ;; and smileys (buffer-substring-no-properties (point-min) (point-max)))) (defun mh-current-fill-prefix () "Return the `fill-prefix' on the current line as a string." (save-excursion (beginning-of-line) ;; This assumes that the major-mode sets up adaptive-fill-regexp ;; correctly such as mh-letter-mode or sendmail.el's mail-mode. But ;; perhaps I should use the variable and simply inserts its value here, ;; and set it locally in a let scope. --psg (if (re-search-forward adaptive-fill-regexp nil t) (match-string 0) ""))) ;;;###mh-autoload (defun mh-letter-next-header-field () "Cycle to the next header field. If we are at the last header field go to the start of the message body." (let ((header-end (mh-mail-header-end))) (cond ((>= (point) header-end) (goto-char (point-min))) ((< (point) (progn (beginning-of-line) (re-search-forward mh-letter-header-field-regexp (mh-line-end-position) t) (point))) (beginning-of-line)) (t (end-of-line))) (cond ((re-search-forward mh-letter-header-field-regexp header-end t) (if (mh-letter-skipped-header-field-p (match-string 1)) (mh-letter-next-header-field) (mh-letter-skip-leading-whitespace-in-header-field))) (t (goto-char header-end) (forward-line))))) ;;;###mh-autoload (defun mh-position-on-field (field &optional ignored) "Move to the end of the FIELD in the header. Move to end of entire header if FIELD not found. Returns non-nil if FIELD was found. The optional second arg is for pre-version 4 compatibility and is IGNORED." (cond ((mh-goto-header-field field) (mh-header-field-end) t) ((mh-goto-header-end 0) nil))) (defun mh-letter-header-field-at-point () "Return the header field name at point. A symbol is returned whose name is the string obtained by downcasing the field name." (save-excursion (end-of-line) (and (re-search-backward mh-letter-header-field-regexp nil t) (intern (downcase (match-string 1)))))) (defun mh-folder-expand-at-point () "Do folder name completion in Fcc header field." (let* ((beg (mh-beginning-of-word)) (end (save-excursion (goto-char beg) (mh-beginning-of-word -1)))) (when (>= end (point)) (list beg (if (fboundp 'completion-at-point) end (point)) #'mh-folder-completion-function)))) ;;;###mh-autoload (defun mh-complete-word (word choices begin end) "Complete WORD from CHOICES. Any match found replaces the text from BEGIN to END." (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-buffer (mh-display-completion-list (all-completions word choices) ;; The `common-substring' arg only works if it's a prefix. (unless (and (functionp choices) (let ((bounds (funcall choices word nil '(boundaries . "")))) (and (eq 'boundaries (car-safe bounds)) (< 0 (cadr bounds))))) word))) (ignore-errors (kill-buffer completions-buffer)) (delete-region begin end) (insert completion)))))) (defun mh-file-is-vcard-p (file) "Return t if FILE is a .vcf vcard." (let ((case-fold-search t)) (and (stringp file) (file-exists-p file) (or (and (not (mh-have-file-command)) (not (null (string-match "\.vcf$" file)))) (string-equal "text/x-vcard" (mh-file-mime-type file)))))) ;;;###mh-autoload (defun mh-letter-toggle-header-field-display-button (event) "Toggle header field display at location of EVENT. This function does the same thing as `mh-letter-toggle-header-field-display' except that it is callable from a mouse button." (interactive "e") (mh-do-at-event-location event (mh-letter-toggle-header-field-display nil))) (defun mh-extract-from-attribution () "Extract phrase or comment from From header field." (save-excursion (if (not (mh-goto-header-field "From: ")) nil (skip-chars-forward " ") (cond ((looking-at "\"\\([^\"\n]+\\)\" \\(<.+>\\)") (format "%s %s " (match-string 1)(match-string 2))) ((looking-at "\\([^<\n]+<.+>\\)$") (format "%s " (match-string 1))) ((looking-at "\\([^ ]+@[^ ]+\\) +(\\(.+\\))$") (format "%s <%s> " (match-string 2)(match-string 1))) ((looking-at " *\\(.+\\)$") (format "%s " (match-string 1))))))) (defun mh-insert-prefix-string (mh-ins-string) "Insert prefix string before each line in buffer. The inserted letter is cited using `sc-cite-original' if `mh-yank-behavior' is one of 'supercite or 'autosupercite. Otherwise, simply insert MH-INS-STRING before each line." (goto-char (point-min)) (cond ((or (eq mh-yank-behavior 'supercite) (eq mh-yank-behavior 'autosupercite)) (sc-cite-original)) (mail-citation-hook (run-hooks 'mail-citation-hook)) (mh-yank-hooks ;old hook name (run-hooks 'mh-yank-hooks)) (t (or (bolp) (forward-line 1)) (while (< (point) (point-max)) (insert mh-ins-string) (forward-line 1)) (goto-char (point-min))))) ;leave point like sc-cite-original (provide 'mh-letter) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-letter.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-speed.el0000644000175000000620000005661012114520723017455 0ustar wohlerstaff;;; mh-speed.el --- MH-E speedbar support ;; Copyright (C) 2002-2013 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Future versions should only use flists. ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (require 'gnus-util) (require 'speedbar) (require 'timer) ;; Global variables. (defvar mh-speed-refresh-flag nil) (defvar mh-speed-last-selected-folder nil) (defvar mh-speed-folder-map (make-hash-table :test #'equal)) (defvar mh-speed-flists-cache (make-hash-table :test #'equal)) (defvar mh-speed-flists-process nil) (defvar mh-speed-flists-timer nil) (defvar mh-speed-partial-line "") ;;; Speedbar Hook (unless (member 'mh-speed-stealth-update (cdr (assoc "files" speedbar-stealthy-function-list))) ;; Is changing constant lists in elisp safe? (setq speedbar-stealthy-function-list (copy-tree speedbar-stealthy-function-list)) (push 'mh-speed-stealth-update (cdr (assoc "files" speedbar-stealthy-function-list)))) ;;; Speedbar Menus (defvar mh-folder-speedbar-menu-items '("--" ["Visit Folder" mh-speed-view (with-current-buffer speedbar-buffer (get-text-property (mh-line-beginning-position) 'mh-folder))] ["Expand Nested Folders" mh-speed-expand-folder (and (get-text-property (mh-line-beginning-position) 'mh-children-p) (not (get-text-property (mh-line-beginning-position) 'mh-expanded)))] ["Contract Nested Folders" mh-speed-contract-folder (and (get-text-property (mh-line-beginning-position) 'mh-children-p) (get-text-property (mh-line-beginning-position) 'mh-expanded))] ["Refresh Speedbar" mh-speed-refresh t]) "Extra menu items for speedbar.") (defvar mh-show-speedbar-menu-items mh-folder-speedbar-menu-items) (defvar mh-letter-speedbar-menu-items mh-folder-speedbar-menu-items) ;;; Speedbar Keys (defvar mh-folder-speedbar-key-map (speedbar-make-specialized-keymap) "Specialized speedbar keymap for MH-E buffers.") (gnus-define-keys mh-folder-speedbar-key-map "+" mh-speed-expand-folder "-" mh-speed-contract-folder "\r" mh-speed-view "r" mh-speed-refresh) (defvar mh-show-speedbar-key-map mh-folder-speedbar-key-map) (defvar mh-letter-speedbar-key-map mh-folder-speedbar-key-map) ;;; Speedbar Commands ;; Alphabetical. (defalias 'mh-speed-contract-folder 'mh-speed-toggle) (defalias 'mh-speed-expand-folder 'mh-speed-toggle) (defun mh-speed-refresh () "Regenerates the list of folders in the speedbar. Run this command if you've added or deleted a folder, or want to update the unseen message count before the next automatic update." (interactive) (mh-speed-flists t) (mh-speed-invalidate-map "")) (defun mh-speed-stealth-update (&optional force) "Do stealth update. With non-nil FORCE, the update is always carried out." (cond ((with-current-buffer speedbar-buffer (get-text-property (point-min) 'mh-level)) ;; Execute this hook and *don't* run anything else (mh-speed-update-current-folder force) nil) ;; Otherwise on to your regular programming (t t))) (defun mh-speed-toggle (&rest ignored) "Toggle the display of child folders in the speedbar. The optional arguments from speedbar are IGNORED." (interactive) (declare (ignore args)) (beginning-of-line) (let ((parent (get-text-property (point) 'mh-folder)) (kids-p (get-text-property (point) 'mh-children-p)) (expanded (get-text-property (point) 'mh-expanded)) (level (get-text-property (point) 'mh-level)) (point (point)) start-region) (speedbar-with-writable (cond ((not kids-p) nil) (expanded (forward-line) (setq start-region (point)) (while (and (get-text-property (point) 'mh-level) (> (get-text-property (point) 'mh-level) level)) (let ((folder (get-text-property (point) 'mh-folder))) (when (gethash folder mh-speed-folder-map) (set-marker (gethash folder mh-speed-folder-map) nil) (remhash folder mh-speed-folder-map))) (forward-line)) (delete-region start-region (point)) (forward-line -1) (speedbar-change-expand-button-char ?+) (add-text-properties (mh-line-beginning-position) (1+ (line-beginning-position)) '(mh-expanded nil))) (t (forward-line) (mh-speed-add-buttons parent (1+ level)) (goto-char point) (speedbar-change-expand-button-char ?-) (add-text-properties (mh-line-beginning-position) (1+ (line-beginning-position)) `(mh-expanded t))))))) (defun mh-speed-view (&rest ignored) "Visits the selected folder just as if you had used \\\\[mh-visit-folder]. The optional arguments from speedbar are IGNORED." (interactive) (declare (ignore args)) (let* ((folder (get-text-property (mh-line-beginning-position) 'mh-folder)) (range (and (stringp folder) (mh-read-range "Scan" folder t nil nil mh-interpret-number-as-range-flag)))) (when (stringp folder) (speedbar-with-attached-buffer (mh-visit-folder folder range) (delete-other-windows))))) ;;; Support Routines ;;;###mh-autoload (defun mh-folder-speedbar-buttons (buffer) "Interface function to create MH-E speedbar buffer. BUFFER is the MH-E buffer for which the speedbar buffer is to be created." (unless (get-text-property (point-min) 'mh-level) (erase-buffer) (clrhash mh-speed-folder-map) (speedbar-make-tag-line 'bracket ?+ 'mh-speed-toggle nil " " 'ignore nil 'mh-speedbar-folder 0) (forward-line -1) (setf (gethash nil mh-speed-folder-map) (set-marker (or (gethash nil mh-speed-folder-map) (make-marker)) (1+ (mh-line-beginning-position)))) (add-text-properties (mh-line-beginning-position) (1+ (line-beginning-position)) `(mh-folder nil mh-expanded nil mh-children-p t mh-level 0)) (mh-speed-stealth-update t) (when (> mh-speed-update-interval 0) (mh-speed-flists nil)))) ;;;###mh-autoload (defalias 'mh-show-speedbar-buttons 'mh-folder-speedbar-buttons) ;;;###mh-autoload (defalias 'mh-letter-speedbar-buttons 'mh-folder-speedbar-buttons) (defmacro mh-speed-select-attached-frame () "Compatibility macro to handle speedbar versions 0.11a and 0.14beta4." (cond ((fboundp 'dframe-select-attached-frame) '(dframe-select-attached-frame speedbar-frame)) ((boundp 'speedbar-attached-frame) '(select-frame speedbar-attached-frame)) (t (error "Installed speedbar version not supported by MH-E")))) (defun mh-speed-update-current-folder (force) "Update speedbar highlighting of the current folder. The function tries to be smart so that work done is minimized. The currently highlighted folder is cached and no highlighting happens unless it changes. Also highlighting is suspended while the speedbar frame is selected. Otherwise you get the disconcerting behavior of folders popping open on their own when you are trying to navigate around in the speedbar buffer. The update is always carried out if FORCE is non-nil." (let* ((lastf (selected-frame)) (newcf (save-excursion (mh-speed-select-attached-frame) (prog1 (mh-speed-extract-folder-name (buffer-name)) (select-frame lastf)))) (lastb (current-buffer)) (case-fold-search t)) (when (or force (and mh-speed-refresh-flag (not (eq lastf speedbar-frame))) (and (stringp newcf) (equal (substring newcf 0 1) "+") (not (equal newcf mh-speed-last-selected-folder)))) (setq mh-speed-refresh-flag nil) (select-frame speedbar-frame) (set-buffer speedbar-buffer) ;; Remove highlight from previous match... (mh-speed-highlight mh-speed-last-selected-folder 'mh-speedbar-folder) ;; If we found a match highlight it... (when (mh-speed-goto-folder newcf) (mh-speed-highlight newcf 'mh-speedbar-selected-folder)) (setq mh-speed-last-selected-folder newcf) (speedbar-position-cursor-on-line) (set-window-point (frame-first-window speedbar-frame) (point)) (set-buffer lastb) (select-frame lastf)) (when (eq lastf speedbar-frame) (setq mh-speed-refresh-flag t)))) (defun mh-speed-highlight (folder face) "Set FOLDER to FACE." (save-excursion (speedbar-with-writable (goto-char (gethash folder mh-speed-folder-map (point))) (beginning-of-line) (if (re-search-forward "([1-9][0-9]*/[0-9]+)" (mh-line-end-position) t) (setq face (mh-speed-bold-face face)) (setq face (mh-speed-normal-face face))) (beginning-of-line) (when (re-search-forward "\\[.\\] " (mh-line-end-position) t) (put-text-property (point) (mh-line-end-position) 'face face))))) (defun mh-speed-normal-face (face) "Return normal face for given FACE." (cond ((eq face 'mh-speedbar-folder-with-unseen-messages) 'mh-speedbar-folder) ((eq face 'mh-speedbar-selected-folder-with-unseen-messages) 'mh-speedbar-selected-folder) (t face))) (defun mh-speed-bold-face (face) "Return bold face for given FACE." (cond ((eq face 'mh-speedbar-folder) 'mh-speedbar-folder-with-unseen-messages) ((eq face 'mh-speedbar-selected-folder) 'mh-speedbar-selected-folder-with-unseen-messages) (t face))) (defun mh-speed-goto-folder (folder) "Move point to line containing FOLDER. The function will expand out parent folders of FOLDER if needed." (let ((prefix folder) (suffix-list ()) (last-slash t)) (while (and (not (gethash prefix mh-speed-folder-map)) last-slash) (setq last-slash (mh-search-from-end ?/ prefix)) (when (integerp last-slash) (push (substring prefix (1+ last-slash)) suffix-list) (setq prefix (substring prefix 0 last-slash)))) (let ((prefix-position (gethash prefix mh-speed-folder-map))) (if prefix-position (goto-char prefix-position) (goto-char (point-min)) (mh-speed-toggle) (unless (get-text-property (point) 'mh-expanded) (mh-speed-toggle)) (goto-char (gethash prefix mh-speed-folder-map)))) (while suffix-list ;; We always need atleast one toggle. We need two if the directory list ;; is stale since a folder was added. (when (equal prefix (get-text-property (mh-line-beginning-position) 'mh-folder)) (mh-speed-toggle) (unless (get-text-property (point) 'mh-expanded) (mh-speed-toggle))) (setq prefix (format "%s/%s" prefix (pop suffix-list))) (goto-char (gethash prefix mh-speed-folder-map (point)))) (beginning-of-line) (equal folder (get-text-property (point) 'mh-folder)))) (defun mh-speed-extract-folder-name (buffer) "Given an MH-E BUFFER find the folder that should be highlighted. Do the right thing for the different kinds of buffers that MH-E uses." (with-current-buffer buffer (cond ((eq major-mode 'mh-folder-mode) mh-current-folder) ((eq major-mode 'mh-show-mode) (set-buffer mh-show-folder-buffer) mh-current-folder) ((eq major-mode 'mh-letter-mode) (when (string-match mh-user-path buffer-file-name) (let* ((rel-path (substring buffer-file-name (match-end 0))) (directory-end (mh-search-from-end ?/ rel-path))) (when directory-end (format "+%s" (substring rel-path 0 directory-end))))))))) (defun mh-speed-add-buttons (folder level) "Add speedbar button for FOLDER which is at indented by LEVEL amount." (let ((folder-list (mh-sub-folders folder))) (mapc (lambda (f) (let* ((folder-name (format "%s%s%s" (or folder "+") (if folder "/" "") (car f))) (counts (gethash folder-name mh-speed-flists-cache))) (speedbar-with-writable (speedbar-make-tag-line 'bracket (if (cdr f) ?+ ? ) 'mh-speed-toggle nil (format "%s%s" (car f) (if counts (format " (%s/%s)" (car counts) (cdr counts)) "")) 'mh-speed-view nil (if (and counts (> (car counts) 0)) 'mh-speedbar-folder-with-unseen-messages 'mh-speedbar-folder) level) (save-excursion (forward-line -1) (setf (gethash folder-name mh-speed-folder-map) (set-marker (or (gethash folder-name mh-speed-folder-map) (make-marker)) (1+ (mh-line-beginning-position)))) (add-text-properties (mh-line-beginning-position) (1+ (mh-line-beginning-position)) `(mh-folder ,folder-name mh-expanded nil mh-children-p ,(not (not (cdr f))) ,@(if counts `(mh-count (,(car counts) . ,(cdr counts))) ()) mh-level ,level)))))) folder-list))) (defvar mh-speed-current-folder nil) (defvar mh-speed-flists-folder nil) (defmacro mh-process-kill-without-query (process) "PROCESS can be killed without query on Emacs exit. Avoid using `process-kill-without-query' if possible since it is now obsolete." (if (fboundp 'set-process-query-on-exit-flag) `(set-process-query-on-exit-flag ,process nil) `(process-kill-without-query ,process))) ;;;###mh-autoload (defun mh-speed-flists (force &rest folders) "Execute flists -recurse and update message counts. If FORCE is non-nil the timer is reset. Any number of optional FOLDERS can be specified. If specified, flists is run only for that one folder." (interactive (list t)) (when force (when mh-speed-flists-timer (mh-cancel-timer mh-speed-flists-timer) (setq mh-speed-flists-timer nil)) (when (and (processp mh-speed-flists-process) (not (eq (process-status mh-speed-flists-process) 'exit))) (set-process-filter mh-speed-flists-process t) (kill-process mh-speed-flists-process) (setq mh-speed-partial-line "") (setq mh-speed-flists-process nil))) (setq mh-speed-flists-folder folders) (unless mh-speed-flists-timer (setq mh-speed-flists-timer (run-at-time nil (if (> mh-speed-update-interval 0) mh-speed-update-interval nil) (lambda () (unless (and (processp mh-speed-flists-process) (not (eq (process-status mh-speed-flists-process) 'exit))) (setq mh-speed-current-folder (concat (if mh-speed-flists-folder (substring (car (reverse mh-speed-flists-folder)) 1) (with-temp-buffer (call-process (expand-file-name "folder" mh-progs) nil '(t nil) nil "-fast") (buffer-substring (point-min) (1- (point-max))))) "+")) (setq mh-speed-flists-process (apply #'start-process "*flists*" nil (expand-file-name "flists" mh-progs) (if mh-speed-flists-folder "-noall" "-all") "-sequence" (symbol-name mh-unseen-seq) (or mh-speed-flists-folder '("-recurse")))) ;; Run flists on all folders the next time around... (setq mh-speed-flists-folder nil) (mh-process-kill-without-query mh-speed-flists-process) (set-process-filter mh-speed-flists-process 'mh-speed-parse-flists-output))))))) ;; Copied from mh-make-folder-list-filter... ;; XXX Refactor to use mh-make-folder-list-filer? (defun mh-speed-parse-flists-output (process output) "Parse the incremental results from flists. PROCESS is the flists process and OUTPUT is the results that must be handled next." (let ((prevailing-match-data (match-data)) (position 0) line-end line folder unseen total) (unwind-protect (while (setq line-end (string-match "\n" output position)) (setq line (format "%s%s" mh-speed-partial-line (substring output position line-end)) mh-speed-partial-line "") (multiple-value-setq (folder unseen total) (values-list (mh-parse-flist-output-line line mh-speed-current-folder))) (when (and folder unseen total (let ((old-pair (gethash folder mh-speed-flists-cache))) (or (not (equal (car old-pair) unseen)) (not (equal (cdr old-pair) total))))) (setf (gethash folder mh-speed-flists-cache) (cons unseen total)) (when (buffer-live-p (get-buffer speedbar-buffer)) (with-current-buffer speedbar-buffer (speedbar-with-writable (when (get-text-property (point-min) 'mh-level) (let ((pos (gethash folder mh-speed-folder-map)) face) (when pos (goto-char pos) (goto-char (mh-line-beginning-position)) (cond ((null (get-text-property (point) 'mh-count)) (goto-char (mh-line-end-position)) (setq face (get-text-property (1- (point)) 'face)) (insert (format " (%s/%s)" unseen total)) (mh-speed-highlight 'unknown face) (goto-char (mh-line-beginning-position)) (add-text-properties (point) (1+ (point)) `(mh-count (,unseen . ,total)))) ((not (equal (get-text-property (point) 'mh-count) (cons unseen total))) (goto-char (mh-line-end-position)) (setq face (get-text-property (1- (point)) 'face)) (re-search-backward " " (mh-line-beginning-position) t) (delete-region (point) (mh-line-end-position)) (insert (format " (%s/%s)" unseen total)) (mh-speed-highlight 'unknown face) (goto-char (mh-line-beginning-position)) (add-text-properties (point) (1+ (point)) `(mh-count (,unseen . ,total)))))))))))) (setq position (1+ line-end))) (set-match-data prevailing-match-data)) (setq mh-speed-partial-line (substring output position)))) ;;;###mh-autoload (defun mh-speed-invalidate-map (folder) "Remove FOLDER from various optimization caches." (interactive (list "")) (with-current-buffer speedbar-buffer (let* ((speedbar-update-flag nil) (last-slash (mh-search-from-end ?/ folder)) (parent (if last-slash (substring folder 0 last-slash) nil)) (parent-position (gethash parent mh-speed-folder-map)) (parent-change nil)) (when parent-position (let ((parent-kids (mh-sub-folders parent))) (cond ((null parent-kids) (setq parent-change ?+)) ((and (null (cdr parent-kids)) (equal (if last-slash (substring folder (1+ last-slash)) (substring folder 1)) (caar parent-kids))) (setq parent-change ? )))) (goto-char parent-position) (when (equal (get-text-property (mh-line-beginning-position) 'mh-folder) parent) (when (get-text-property (mh-line-beginning-position) 'mh-expanded) (mh-speed-toggle)) (when parent-change (speedbar-with-writable (mh-speedbar-change-expand-button-char parent-change) (add-text-properties (mh-line-beginning-position) (1+ (mh-line-beginning-position)) `(mh-children-p ,(equal parent-change ?+))))) (mh-speed-highlight mh-speed-last-selected-folder 'mh-speedbar-folder) (setq mh-speed-last-selected-folder nil) (setq mh-speed-refresh-flag t))) (when (equal folder "") (mh-clear-sub-folders-cache))))) ;; Make it slightly more general to allow for [ ] buttons to be ;; changed to [+]. (defun mh-speedbar-change-expand-button-char (char) "Change the expansion button character to CHAR for the current line." (save-excursion (beginning-of-line) (if (re-search-forward "\\[.\\]" (mh-line-end-position) t) (speedbar-with-writable (backward-char 2) (delete-char 1) (insert-char char 1 t) (put-text-property (point) (1- (point)) 'invisible nil) ;; make sure we fix the image on the text here. (mh-funcall-if-exists speedbar-insert-image-button-maybe (- (point) 2) 3))))) ;;;###mh-autoload (defun mh-speed-add-folder (folder) "Add FOLDER since it is being created. The function invalidates the latest ancestor that is present." (with-current-buffer speedbar-buffer (let ((speedbar-update-flag nil) (last-slash (mh-search-from-end ?/ folder)) (ancestor folder) (ancestor-pos nil)) (block while-loop (while last-slash (setq ancestor (substring ancestor 0 last-slash)) (setq ancestor-pos (gethash ancestor mh-speed-folder-map)) (when ancestor-pos (return-from while-loop)) (setq last-slash (mh-search-from-end ?/ ancestor)))) (unless ancestor-pos (setq ancestor nil)) (goto-char (or ancestor-pos (gethash nil mh-speed-folder-map))) (speedbar-with-writable (mh-speedbar-change-expand-button-char ?+) (add-text-properties (mh-line-beginning-position) (1+ (mh-line-beginning-position)) `(mh-children-p t))) (when (get-text-property (mh-line-beginning-position) 'mh-expanded) (mh-speed-toggle)) (setq mh-speed-refresh-flag t)))) (provide 'mh-speed) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-speed.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-e.el0000644000175000000620000044241512114520723016603 0ustar wohlerstaff;;; mh-e.el --- GNU Emacs interface to the MH mail system ;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2013 Free ;; Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Version: 8.5 ;; Keywords: mail ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; MH-E is an Emacs interface to the MH mail system. ;; MH-E is supported in GNU Emacs 21 and higher, as well as XEmacs 21 ;; (except for versions 21.5.9-21.5.16). It is compatible with MH ;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils ;; 1.0 and higher. Gnus is also required; version 5.10 or higher is ;; recommended. ;; MH (Message Handler) is a powerful mail reader. See ;; http://rand-mh.sourceforge.net/. ;; N.B. MH must have been compiled with the MHE compiler flag or several ;; features necessary for MH-E will be missing from MH commands, specifically ;; the -build switch to repl and forw. ;; How to use: ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands. ;; C-u M-x mh-rmail to visit any folder. ;; M-x mh-smail to send mail. From within the mail reader, "s" works, too. ;; Your .emacs might benefit from these bindings: ;; (global-set-key "\C-cr" 'mh-rmail) ;; (global-set-key "\C-xm" 'mh-smail) ;; (global-set-key "\C-x4m" 'mh-smail-other-window) ;; If Emacs can't find mh-rmail or mh-smail, add the following to ~/.emacs: ;; (require 'mh-autoloads) ;; If you want to customize MH-E before explicitly loading it, add this: ;; (require 'mh-cus-load) ;; Mailing Lists: ;; mh-e-users@lists.sourceforge.net ;; mh-e-announce@lists.sourceforge.net ;; mh-e-devel@lists.sourceforge.net ;; Subscribe by sending a "subscribe" message to ;; -request@lists.sourceforge.net, or by using the web interface at ;; https://sourceforge.net/mail/?group_id=13357 ;; Bug Reports: ;; https://sourceforge.net/tracker/?group_id=13357&atid=113357 ;; Include the output of M-x mh-version in the bug report unless ;; you're 110% sure we won't ask for it. ;; Feature Requests: ;; https://sourceforge.net/tracker/?group_id=13357&atid=363357 ;; Support: ;; https://sourceforge.net/tracker/?group_id=13357&atid=213357 ;;; Change Log: ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982. ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985. ;; Rewritten for GNU Emacs, James Larus, 1985. ;; Modified by Stephen Gildea, 1988. ;; Maintenance picked up by Bill Wohler and the ;; SourceForge Crew , 2001. ;;; Code: ;; Provide functions to the rest of MH-E. However, mh-e.el must not ;; use any definitions in files that require mh-e from mh-loaddefs, ;; for if it does it will introduce a require loop. (require 'mh-loaddefs) (mh-require-cl) (require 'mh-buffers) (require 'mh-compat) (mh-do-in-xemacs (require 'mh-xemacs)) (mh-font-lock-add-keywords 'emacs-lisp-mode (eval-when-compile `((,(concat "(\\(" ;; Function declarations (use font-lock-function-name-face). "\\(def\\(un\\|macro\\)-mh\\)\\|" ;; Variable declarations (use font-lock-variable-name-face). "\\(def\\(custom\\|face\\)-mh\\)\\|" ;; Group declarations (use font-lock-type-face). "\\(defgroup-mh\\)" "\\)\\>" ;; Any whitespace and defined object. "[ \t'\(]*" "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?") (1 font-lock-keyword-face) (7 (cond ((match-beginning 2) font-lock-function-name-face) ((match-beginning 4) font-lock-variable-name-face) (t font-lock-type-face)) nil t))))) ;;; Global Variables ;; Try to keep variables local to a single file. Provide accessors if ;; variables are shared. Use this section as a last resort. (defconst mh-version "8.5" "Version number of MH-E.") ;; Variants (defvar mh-sys-path '("/usr/local/nmh/bin" ; nmh default "/usr/local/bin/mh/" "/usr/local/mh/" "/usr/bin/mh/" ; Ultrix 4.2, Linux "/usr/new/mh/" ; Ultrix < 4.2 "/usr/contrib/mh/bin/" ; BSDI "/usr/pkg/bin/" ; NetBSD "/usr/local/bin/" "/usr/local/bin/mu-mh/" ; GNU mailutils MH - default "/usr/bin/mu-mh/") ; GNU mailutils MH - packaged "List of directories to search for variants of the MH variant. The list `exec-path' is searched in addition to this list. There's no need for users to modify this list. Instead add extra directories to the customizable variable `mh-path'.") (defvar mh-variants nil "List describing known MH variants. Do not access this variable directly as it may not have yet been initialized. Use the function `mh-variants' instead.") (defvar mh-variant-in-use nil "The MH variant currently in use; a string with variant and version number. This differs from `mh-variant' when the latter is set to \"autodetect\".") (defvar mh-progs nil "Directory containing MH commands, such as inc, repl, and rmm.") ;;;###autoload (put 'mh-progs 'risky-local-variable t) (defvar mh-lib nil "Directory containing the MH library. This directory contains, among other things, the components file.") ;;;###autoload (put 'mh-lib 'risky-local-variable t) (defvar mh-lib-progs nil "Directory containing MH helper programs. This directory contains, among other things, the mhl program.") ;;;###autoload (put 'mh-lib-progs 'risky-local-variable t) ;; Profile Components (defvar mh-draft-folder nil "Cached value of the \"Draft-Folder:\" MH profile component. Name of folder containing draft messages. Do not use a draft folder if nil.") (defvar mh-inbox nil "Cached value of the \"Inbox:\" MH profile component. Set to \"+inbox\" if no such component. Name of the Inbox folder.") (defvar mh-user-path nil "Cached value of the \"Path:\" MH profile component. User's mail folder directory.") ;; Maps declared here so that they can be used in docstrings. (defvar mh-folder-mode-map (make-keymap) "Keymap for MH-Folder mode.") (defvar mh-folder-seq-tool-bar-map nil "Keymap for MH-Folder tool bar.") (defvar mh-folder-tool-bar-map nil "Keymap for MH-Folder tool bar.") (defvar mh-inc-spool-map (make-sparse-keymap) "Keymap for MH-E's mh-inc-spool commands.") (defvar mh-letter-mode-map (copy-keymap text-mode-map) "Keymap for MH-Letter mode.") (defvar mh-letter-tool-bar-map nil "Keymap for MH-Letter tool bar.") (defvar mh-search-mode-map (make-sparse-keymap) "Keymap for MH-Search mode.") (defvar mh-show-mode-map (make-sparse-keymap) "Keymap MH-Show mode.") (defvar mh-show-seq-tool-bar-map nil "Keymap for MH-Show tool bar.") (defvar mh-show-tool-bar-map nil "Keymap for MH-Show tool bar.") ;; MH-Folder Locals (alphabetical) (defvar mh-arrow-marker nil "Marker for arrow display in fringe.") (defvar mh-blacklist nil "List of messages to use to train the junk filter. This variable can be used by `mh-before-commands-processed-hook'.") (defvar mh-colors-available-flag nil "Non-nil means colors are available.") (defvar mh-current-folder nil "Name of current folder, a string.") (defvar mh-delete-list nil "List of message numbers to delete. This variable can be used by `mh-before-commands-processed-hook'.") (defvar mh-folder-view-stack nil "Stack of previous folder views.") (defvar mh-index-data nil "Info about index search results.") (defvar mh-index-previous-search nil) (defvar mh-index-msg-checksum-map nil) (defvar mh-index-checksum-origin-map nil) (defvar mh-index-sequence-search-flag nil) (defvar mh-mode-line-annotation nil "Message range displayed in buffer.") (defvar mh-next-direction 'forward "Direction to move to next message.") (defvar mh-previous-window-config nil "Window configuration before MH-E command.") (defvar mh-refile-list nil "List of folder names in `mh-seq-list'. This variable can be used by `mh-before-commands-processed-hook'.") (defvar mh-seen-list nil "List of displayed messages to be removed from the \"Unseen\" sequence.") (defvar mh-seq-list nil "Alist of this folder's sequences. Elements have the form (SEQUENCE . MESSAGES).") (defvar mh-sequence-notation-history nil "Remember original notation that is overwritten by `mh-note-seq'.") (defvar mh-show-buffer nil "Buffer that displays message for this folder.") (define-minor-mode mh-showing-mode "Minor mode to show the message in a separate window." ;; FIXME: maybe this should be moved to mh-show.el. :lighter " Show") (defvar mh-view-ops nil "Stack of operations that change the folder view. These operations include narrowing or threading.") (defvar mh-whitelist nil "List of messages to use to train the junk filter. This variable can be used by `mh-before-commands-processed-hook'.") ;; MH-Show Locals (alphabetical) (defvar mh-globals-hash (make-hash-table) "Keeps track of MIME data on a per buffer basis.") (defvar mh-show-folder-buffer nil "Keeps track of folder whose message is being displayed.") ;; MH-Letter Locals (defvar mh-folders-changed nil "Lists which folders were affected by deletes and refiles. This list will always include the current folder `mh-current-folder'. This variable can be used by `mh-after-commands-processed-hook'.") (defvar mh-mail-header-separator "--------" "*Line used by MH to separate headers from text in messages being composed. This variable should not be used directly in programs. Programs should use `mail-header-separator' instead. `mail-header-separator' is initialized to `mh-mail-header-separator' in `mh-letter-mode'; in other contexts, you may have to perform this initialization yourself. Do not make this a regular expression as it may be the argument to `insert' and it is passed through `regexp-quote' before being used by functions like `re-search-forward'.") (defvar mh-sent-from-folder nil "Folder of msg assoc with this letter.") (defvar mh-sent-from-msg nil "Number of msg assoc with this letter.") ;; Sequences (defvar mh-unseen-seq nil "Cached value of the \"Unseen-Sequence:\" MH profile component. Name of the Unseen sequence.") (defvar mh-previous-seq nil "Cached value of the \"Previous-Sequence:\" MH profile component. Name of the Previous sequence.") ;; Etc. (alphabetical) (defvar mh-flists-present-flag nil "Non-nil means that we have \"flists\".") (defvar mh-index-data-file ".mhe_index" "MH-E specific file where index search info is stored.") (defvar mh-letter-header-field-regexp "^\\([A-Za-z][A-Za-z0-9-]*\\):") (defvar mh-page-to-next-msg-flag nil "Non-nil means next SPC or whatever goes to next undeleted message.") (defvar mh-pgp-support-flag (not (not (locate-library "mml2015"))) "Non-nil means PGP support is available.") (defvar mh-signature-separator "-- \n" "Text of a signature separator. A signature separator is used to separate the body of a message from the signature. This can be used by user agents such as MH-E to render the signature differently or to suppress the inclusion of the signature in a reply. Use `mh-signature-separator-regexp' when searching for a separator.") (defvar mh-signature-separator-regexp "^-- $" "This regular expression matches the signature separator. See `mh-signature-separator'.") (defvar mh-thread-scan-line-map nil "Map of message index to various parts of the scan line.") (make-variable-buffer-local 'mh-thread-scan-line-map) (defvar mh-thread-scan-line-map-stack nil "Old map of message index to various parts of the scan line. This is the original map that is stored when the folder is narrowed.") (make-variable-buffer-local 'mh-thread-scan-line-map-stack) (defvar mh-x-mailer-string nil "*String containing the contents of the X-Mailer header field. If nil, this variable is initialized to show the version of MH-E, Emacs, and MH the first time a message is composed.") ;;; MH-E Entry Points (eval-when-compile (require 'gnus)) (defmacro mh-macro-expansion-time-gnus-version () "Return Gnus version available at macro expansion time. The macro evaluates the Gnus version at macro expansion time. If MH-E was compiled then macro expansion happens at compile time." gnus-version) (defun mh-run-time-gnus-version () "Return Gnus version available at run time." (require 'gnus) gnus-version) ;;;###autoload (defun mh-version () "Display version information about MH-E and the MH mail handling system." (interactive) (set-buffer (get-buffer-create mh-info-buffer)) (erase-buffer) ;; MH-E version. (insert "MH-E " mh-version "\n\n") ;; MH-E compilation details. (insert "MH-E compilation details:\n") (let* ((compiled-mhe (byte-code-function-p (symbol-function 'mh-version))) (gnus-compiled-version (if compiled-mhe (mh-macro-expansion-time-gnus-version) "N/A"))) (insert " Byte compiled:\t\t" (if compiled-mhe "yes" "no") "\n" " Gnus (compile-time):\t" gnus-compiled-version "\n" " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n")) ;; Emacs version. (insert (emacs-version) "\n\n") ;; MH version. (if mh-variant-in-use (insert mh-variant-in-use "\n" " mh-progs:\t" mh-progs "\n" " mh-lib:\t" mh-lib "\n" " mh-lib-progs:\t" mh-lib-progs "\n\n") (insert "No MH variant detected\n")) ;; Linux version. (condition-case () (call-process "uname" nil t nil "-a") (file-error)) (goto-char (point-min)) (display-buffer mh-info-buffer)) ;;; Support Routines (defun mh-list-to-string (l) "Flatten the list L and make every element of the new list into a string." (nreverse (mh-list-to-string-1 l))) (defun mh-list-to-string-1 (l) "Flatten the list L and make every element of the new list into a string." (let (new-list) (dolist (element l) (cond ((null element)) ((symbolp element) (push (symbol-name element) new-list)) ((numberp element) (push (int-to-string element) new-list)) ((equal element "")) ((stringp element) (push element new-list)) ((listp element) (setq new-list (nconc (mh-list-to-string-1 element) new-list))) (t (error "Bad element: %s" element)))) new-list)) ;;; MH-E Process Support (defvar mh-index-max-cmdline-args 500 "Maximum number of command line args.") (defun mh-xargs (cmd &rest args) "Partial imitation of xargs. The current buffer contains a list of strings, one on each line. The function will execute CMD with ARGS and pass the first `mh-index-max-cmdline-args' strings to it. This is repeated till all the strings have been used." (goto-char (point-min)) (let ((current-buffer (current-buffer))) (with-temp-buffer (let ((out (current-buffer))) (set-buffer current-buffer) (while (not (eobp)) (let ((arg-list (reverse args)) (count 0)) (while (and (not (eobp)) (< count mh-index-max-cmdline-args)) (push (buffer-substring-no-properties (point) (mh-line-end-position)) arg-list) (incf count) (forward-line)) (apply #'call-process cmd nil (list out nil) nil (nreverse arg-list)))) (erase-buffer) (insert-buffer-substring out))))) ;; XXX This should be applied anywhere MH-E calls out to /bin/sh. (defun mh-quote-for-shell (string) "Quote STRING for /bin/sh. Adds double-quotes around entire string and quotes the characters \\, `, and $ with a backslash." (concat "\"" (loop for x across string concat (format (if (memq x '(?\\ ?` ?$)) "\\%c" "%c") x)) "\"")) (defun mh-exec-cmd (command &rest args) "Execute mh-command COMMAND with ARGS. The side effects are what is desired. Any output is assumed to be an error and is shown to the user. The output is not read or parsed by MH-E." (with-current-buffer (get-buffer-create mh-log-buffer) (let* ((initial-size (mh-truncate-log-buffer)) (start (point)) (args (mh-list-to-string args))) (apply 'call-process (expand-file-name command mh-progs) nil t nil args) (when (> (buffer-size) initial-size) (save-excursion (goto-char start) (insert "Errors when executing: " command) (loop for arg in args do (insert " " arg)) (insert "\n")) (save-window-excursion (switch-to-buffer-other-window mh-log-buffer) (sit-for 5)))))) (defun mh-exec-cmd-error (env command &rest args) "In environment ENV, execute mh-command COMMAND with ARGS. ENV is nil or a string of space-separated \"var=value\" elements. Signals an error if process does not complete successfully." (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (let ((process-environment process-environment)) ;; XXX: We should purge the list that split-string returns of empty ;; strings. This can happen in XEmacs if leading or trailing spaces ;; are present. (dolist (elem (if (stringp env) (split-string env " ") ())) (push elem process-environment)) (mh-handle-process-error command (apply #'call-process (expand-file-name command mh-progs) nil t nil (mh-list-to-string args)))))) (defun mh-exec-cmd-daemon (command filter &rest args) "Execute MH command COMMAND in the background. If FILTER is non-nil then it is used to process the output otherwise the default filter `mh-process-daemon' is used. See `set-process-filter' for more details of FILTER. ARGS are passed to COMMAND as command line arguments." (with-current-buffer (get-buffer-create mh-log-buffer) (mh-truncate-log-buffer)) (let* ((process-connection-type nil) (process (apply 'start-process command nil (expand-file-name command mh-progs) (mh-list-to-string args)))) (set-process-filter process (or filter 'mh-process-daemon)) process)) (defun mh-exec-cmd-env-daemon (env command filter &rest args) "In environment ENV, execute mh-command COMMAND in the background. ENV is nil or a string of space-separated \"var=value\" elements. Signals an error if process does not complete successfully. If FILTER is non-nil then it is used to process the output otherwise the default filter `mh-process-daemon' is used. See `set-process-filter' for more details of FILTER. ARGS are passed to COMMAND as command line arguments." (let ((process-environment process-environment)) (dolist (elem (if (stringp env) (split-string env " ") ())) (push elem process-environment)) (apply #'mh-exec-cmd-daemon command filter args))) (defun mh-process-daemon (process output) "PROCESS daemon that puts OUTPUT into a temporary buffer. Any output from the process is displayed in an asynchronous pop-up window." (with-current-buffer (get-buffer-create mh-log-buffer) (insert-before-markers output) (display-buffer mh-log-buffer))) (defun mh-exec-cmd-quiet (raise-error command &rest args) "Signal RAISE-ERROR if COMMAND with ARGS fails. Execute MH command COMMAND with ARGS. ARGS is a list of strings. Return at start of mh-temp buffer, where output can be parsed and used. Returns value of `call-process', which is 0 for success, unless RAISE-ERROR is non-nil, in which case an error is signaled if `call-process' returns non-0." (set-buffer (get-buffer-create mh-temp-buffer)) (erase-buffer) (let ((value (apply 'call-process (expand-file-name command mh-progs) nil t nil args))) (goto-char (point-min)) (if raise-error (mh-handle-process-error command value) value))) (defun mh-exec-cmd-output (command display &rest args) "Execute MH command COMMAND with DISPLAY flag and ARGS. Put the output into buffer after point. Set mark after inserted text. Output is expected to be shown to user, not parsed by MH-E." (push-mark (point) t) (apply 'call-process (expand-file-name command mh-progs) nil t display (mh-list-to-string args)) ;; The following is used instead of 'exchange-point-and-mark because the ;; latter activates the current region (between point and mark), which ;; turns on highlighting. So prior to this bug fix, doing "inc" would ;; highlight a region containing the new messages, which is undesirable. ;; The bug wasn't seen in emacs21 but still occurred in XEmacs21.4. (mh-exchange-point-and-mark-preserving-active-mark)) ;; Shush compiler. (mh-do-in-xemacs (defvar mark-active)) (defun mh-exchange-point-and-mark-preserving-active-mark () "Put the mark where point is now, and point where the mark is now. This command works even when the mark is not active, and preserves whether the mark is active or not." (interactive nil) (let ((is-active (and (boundp 'mark-active) mark-active))) (let ((omark (mark t))) (if (null omark) (error "No mark set in this buffer")) (set-mark (point)) (goto-char omark) (if (boundp 'mark-active) (setq mark-active is-active)) nil))) (defun mh-exec-lib-cmd-output (command &rest args) "Execute MH library command COMMAND with ARGS. Put the output into buffer after point. Set mark after inserted text." (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args)) (defun mh-handle-process-error (command status) "Raise error if COMMAND returned non-zero STATUS, otherwise return STATUS." (if (equal status 0) status (goto-char (point-min)) (insert (if (integerp status) (format "%s: exit code %d\n" command status) (format "%s: %s\n" command status))) (let ((error-message (buffer-substring (point-min) (point-max)))) (with-current-buffer (get-buffer-create mh-log-buffer) (mh-truncate-log-buffer) (insert error-message))) (error "%s failed, check buffer %s for error message" command mh-log-buffer))) ;;; MH-E Customization Support Routines ;; Shush compiler (Emacs 21 and XEmacs). (defvar customize-package-emacs-version-alist) ;; Temporary function and data structure used customization. ;; These will be unbound after the options are defined. (defmacro mh-strip-package-version (args) "Strip :package-version keyword and its value from ARGS. In Emacs versions that support the :package-version keyword, ARGS is returned unchanged." `(if (boundp 'customize-package-emacs-version-alist) ,args (let (seen) (loop for keyword in ,args if (cond ((eq keyword ':package-version) (setq seen t) nil) (seen (setq seen nil) nil) (t t)) collect keyword)))) (defmacro defgroup-mh (symbol members doc &rest args) "Declare SYMBOL as a customization group containing MEMBERS. See documentation for `defgroup' for a description of the arguments SYMBOL, MEMBERS, DOC and ARGS. This macro is used by Emacs versions that lack the :package-version keyword, introduced in Emacs 22." (declare (doc-string 3)) `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args))) (put 'defgroup-mh 'lisp-indent-function 'defun) (defmacro defcustom-mh (symbol value doc &rest args) "Declare SYMBOL as a customizable variable that defaults to VALUE. See documentation for `defcustom' for a description of the arguments SYMBOL, VALUE, DOC and ARGS. This macro is used by Emacs versions that lack the :package-version keyword, introduced in Emacs 22." (declare (doc-string 3)) `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args))) (put 'defcustom-mh 'lisp-indent-function 'defun) (defmacro defface-mh (face spec doc &rest args) "Declare FACE as a customizable face that defaults to SPEC. See documentation for `defface' for a description of the arguments FACE, SPEC, DOC and ARGS. This macro is used by Emacs versions that lack the :package-version keyword, introduced in Emacs 22." (declare (doc-string 3)) `(defface ,face ,spec ,doc ,@(mh-strip-package-version args))) (put 'defface-mh 'lisp-indent-function 'defun) ;;; Variant Support (defcustom-mh mh-path nil "*Additional list of directories to search for MH. See `mh-variant'." :group 'mh-e :type '(repeat (directory)) :package-version '(MH-E . "8.0")) (defun mh-variants () "Return a list of installed variants of MH on the system. This function looks for MH in `mh-sys-path', `mh-path' and `exec-path'. The format of the list of variants that is returned is described by the variable `mh-variants'." (if mh-variants mh-variants (let ((list-unique)) ;; Make a unique list of directories, keeping the given order. ;; We don't want the same MH variant to be listed multiple times. (loop for dir in (append mh-path mh-sys-path exec-path) do (setq dir (file-chase-links (directory-file-name dir))) (add-to-list 'list-unique dir)) (loop for dir in (nreverse list-unique) do (when (and dir (file-directory-p dir) (file-readable-p dir)) (let ((variant (mh-variant-info dir))) (if variant (add-to-list 'mh-variants variant))))) mh-variants))) (defun mh-variant-info (dir) "Return MH variant found in DIR, or nil if none present." (let ((tmp-buffer (get-buffer-create mh-temp-buffer))) (with-current-buffer tmp-buffer (cond ((mh-variant-mh-info dir)) ((mh-variant-nmh-info dir)) ((mh-variant-gnu-mh-info dir)))))) (defun mh-variant-mh-info (dir) "Return info for MH variant in DIR assuming a temporary buffer is set up." ;; MH does not have the -version option. ;; Its version number is included in the output of "-help" as: ;; ;; version: MH 6.8.4 #2[UCI] (burrito) of Fri Jan 15 20:01:39 EST 1999 ;; options: [ATHENA] [BIND] [DUMB] [LIBLOCKFILE] [LOCALE] [MAILGROUP] [MHE] ;; [MHRC] [MIME] [MORE='"/usr/bin/sensible-pager"'] [NLINK_HACK] ;; [NORUSERPASS] [OVERHEAD] [POP] [POPSERVICE='"pop-3"'] [RENAME] ;; [RFC1342] [RPATHS] [RPOP] [SENDMTS] [SMTP] [SOCKETS] ;; [SPRINTFTYPE=int] [SVR4] [SYS5] [SYS5DIR] [TERMINFO] ;; [TYPESIG=void] [UNISTD] [UTK] [VSPRINTF] (let ((mhparam (expand-file-name "mhparam" dir))) (when (mh-file-command-p mhparam) (erase-buffer) (call-process mhparam nil '(t nil) nil "-help") (goto-char (point-min)) (when (search-forward-regexp "version: MH \\(\\S +\\)" nil t) (let ((version (format "MH %s" (match-string 1)))) (erase-buffer) (call-process mhparam nil '(t nil) nil "libdir") (goto-char (point-min)) (when (search-forward-regexp "^.*$" nil t) (let ((libdir (match-string 0))) `(,version (variant mh) (mh-lib-progs ,libdir) (mh-lib ,libdir) (mh-progs ,dir) (flists nil))))))))) (defun mh-variant-gnu-mh-info (dir) "Return info for GNU mailutils MH variant in DIR. This assumes that a temporary buffer is set up." ;; 'mhparam -version' output: ;; mhparam (GNU mailutils 0.3.2) (let ((mhparam (expand-file-name "mhparam" dir))) (when (mh-file-command-p mhparam) (erase-buffer) (call-process mhparam nil '(t nil) nil "-version") (goto-char (point-min)) (when (search-forward-regexp "mhparam (\\(GNU [Mm]ailutils \\S +\\))" nil t) (let ((version (match-string 1)) (mh-progs dir)) `(,version (variant gnu-mh) (mh-lib-progs ,(mh-profile-component "libdir")) (mh-lib ,(mh-profile-component "etcdir")) (mh-progs ,dir) (flists ,(file-exists-p (expand-file-name "flists" dir))))))))) (defun mh-variant-nmh-info (dir) "Return info for nmh variant in DIR assuming a temporary buffer is set up." ;; `mhparam -version' outputs: ;; mhparam -- nmh-1.1-RC1 [compiled on chaak at Fri Jun 20 11:03:28 PDT 2003] (let ((mhparam (expand-file-name "mhparam" dir))) (when (mh-file-command-p mhparam) (erase-buffer) (call-process mhparam nil '(t nil) nil "-version") (goto-char (point-min)) (when (search-forward-regexp "mhparam -- nmh-\\(\\S +\\)" nil t) (let ((version (format "nmh %s" (match-string 1))) (mh-progs dir)) `(,version (variant nmh) (mh-lib-progs ,(mh-profile-component "libdir")) (mh-lib ,(mh-profile-component "etcdir")) (mh-progs ,dir) (flists ,(file-exists-p (expand-file-name "flists" dir))))))))) (defun mh-file-command-p (file) "Return t if file FILE is the name of a executable regular file." (and (file-regular-p file) (file-executable-p file))) (defun mh-variant-set-variant (variant) "Set up the system variables for the MH variant named VARIANT. If VARIANT is a string, use that key in the alist returned by the function `mh-variants'. If VARIANT is a symbol, select the first entry that matches that variant." (cond ((stringp variant) ;e.g. "nmh 1.1-RC1" (when (assoc variant (mh-variants)) (let* ((alist (cdr (assoc variant (mh-variants)))) (lib-progs (cadr (assoc 'mh-lib-progs alist))) (lib (cadr (assoc 'mh-lib alist))) (progs (cadr (assoc 'mh-progs alist))) (flists (cadr (assoc 'flists alist)))) ;;(set-default mh-variant variant) (setq mh-x-mailer-string nil mh-flists-present-flag flists mh-lib-progs lib-progs mh-lib lib mh-progs progs mh-variant-in-use variant)))) ((symbolp variant) ;e.g. 'nmh (pick the first match) (loop for variant-list in (mh-variants) when (eq variant (cadr (assoc 'variant (cdr variant-list)))) return (let* ((version (car variant-list)) (alist (cdr variant-list)) (lib-progs (cadr (assoc 'mh-lib-progs alist))) (lib (cadr (assoc 'mh-lib alist))) (progs (cadr (assoc 'mh-progs alist))) (flists (cadr (assoc 'flists alist)))) ;;(set-default mh-variant flavor) (setq mh-x-mailer-string nil mh-flists-present-flag flists mh-lib-progs lib-progs mh-lib lib mh-progs progs mh-variant-in-use version) t))))) (defun mh-variant-p (&rest variants) "Return t if variant is any of VARIANTS. Currently known variants are 'MH, 'nmh, and 'gnu-mh." (let ((variant-in-use (cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants)))))) (not (null (member variant-in-use variants))))) (defun mh-profile-component (component) "Return COMPONENT value from mhparam, or nil if unset." (save-excursion ;; MH and nmh use -components, GNU mailutils MH uses -component. ;; Since MH and nmh work with an unambiguous prefix, the `s' is ;; dropped here. (mh-exec-cmd-quiet nil "mhparam" "-component" component) (mh-profile-component-value component))) (defun mh-profile-component-value (component) "Find and return the value of COMPONENT in the current buffer. Returns nil if the component is not in the buffer." (let ((case-fold-search t)) (goto-char (point-min)) (cond ((not (re-search-forward (format "^%s:" component) nil t)) nil) ((looking-at "[\t ]*$") nil) (t (re-search-forward "[\t ]*\\([^\t \n].*\\)$" nil t) (let ((start (match-beginning 1))) (end-of-line) (buffer-substring start (point))))))) (defun mh-variant-set (variant) "Set the MH variant to VARIANT. Sets `mh-progs', `mh-lib', `mh-lib-progs' and `mh-flists-present-flag'. If the VARIANT is \"autodetect\", then first try nmh, then MH and finally GNU mailutils MH." (interactive (list (completing-read "MH variant: " (mapcar (lambda (x) (list (car x))) (mh-variants)) nil t))) ;; TODO Remove mu-mh backwards compatibility in 9.0. (when (and (stringp variant) (string-match "^mu-mh" variant)) (message (format "%s\n%s; %s" "The variant name mu-mh has been renamed to gnu-mh" "and will be removed in MH-E 9.0" "try M-x customize-option mh-variant")) (sit-for 5) (setq variant (concat "gnu-mh" (substring variant (match-end 0))))) (let ((valid-list (mapcar (lambda (x) (car x)) (mh-variants)))) (cond ((eq variant 'none)) ((eq variant 'autodetect) (cond ((mh-variant-set-variant 'nmh) (message "%s installed as MH variant" mh-variant-in-use)) ((mh-variant-set-variant 'mh) (message "%s installed as MH variant" mh-variant-in-use)) ((mh-variant-set-variant 'gnu-mh) (message "%s installed as MH variant" mh-variant-in-use)) (t (message "No MH variant found on the system")))) ((member variant valid-list) (when (not (mh-variant-set-variant variant)) (message "Warning: %s variant not found. Autodetecting..." variant) (mh-variant-set 'autodetect))) (t (message "Unknown variant %s; use %s" variant (mapconcat (lambda (x) (format "%s" (car x))) (mh-variants) " or ")))))) (defcustom-mh mh-variant 'autodetect "*Specifies the variant used by MH-E. The default setting of this option is \"Auto-detect\" which means that MH-E will automatically choose the first of nmh, MH, or GNU mailutils MH that it finds in the directories listed in `mh-path' (which you can customize), `mh-sys-path', and `exec-path'. If MH-E can't find MH at all, you may have to customize `mh-path' and add the directory in which the command \"mhparam\" is located. If, on the other hand, you have both nmh and GNU mailutils MH installed (for example) and `mh-variant-in-use' was initialized to nmh but you want to use GNU mailutils MH, then you can set this option to \"gnu-mh\". When this variable is changed, MH-E resets `mh-progs', `mh-lib', `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use' accordingly. Prior to version 8, it was often necessary to set some of these variables in \"~/.emacs\"; now it is no longer necessary and can actually cause problems." :type `(radio (const :tag "Auto-detect" autodetect) ,@(mapcar (lambda (x) `(const ,(car x))) (mh-variants))) :set (lambda (symbol value) (set-default symbol value) ;Done in mh-variant-set-variant! (mh-variant-set value)) :group 'mh-e :package-version '(MH-E . "8.0")) ;;; MH-E Customization ;; All of the defgroups, defcustoms, and deffaces in MH-E are found ;; here. This makes it possible to customize modules that aren't ;; loaded yet. It also makes it easier to organize the customization ;; groups. ;; This section contains the following sub-sections: ;; 1. MH-E Customization Groups ;; These are the customization group definitions. Every group has a ;; associated manual node. The ordering is alphabetical, except for ;; the groups mh-faces and mh-hooks which are last . ;; 2. MH-E Customization ;; These are the actual customization variables. There is a ;; sub-section for each group in the MH-E Customization Groups ;; section, in the same order, separated by page breaks. Within ;; each section, variables are sorted alphabetically. ;; 3. Hooks ;; All hooks must be placed in the mh-hook group; in addition, add ;; the group associated with the manual node in which the hook is ;; described. Since the mh-hook group appears near the end of this ;; section, the hooks will appear at the end of these other groups. ;; 4. Faces ;; All faces must be placed in the mh-faces group; in addition, add ;; the group associated with the manual node in which the face is ;; described. Since the mh-faces group appears near the end of this ;; section, the faces will appear at the end of these other groups. (defun mh-customize (&optional delete-other-windows-flag) "Customize MH-E variables. If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other windows in the frame are removed." (interactive "P") (customize-group 'mh-e) (when delete-other-windows-flag (delete-other-windows))) (if (boundp 'customize-package-emacs-version-alist) (add-to-list 'customize-package-emacs-version-alist '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1") ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1") ("7.4" . "22.1") ("8.0" . "22.1")))) ;;; MH-E Customization Groups (defgroup-mh 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 :package-version '(MH-E . "8.0")) (defgroup-mh mh-alias nil "Aliases." :link '(custom-manual "(mh-e)Aliases") :prefix "mh-alias-" :group 'mh-e :package-version '(MH-E . "7.1")) (defgroup-mh mh-folder nil "Organizing your mail with folders." :prefix "mh-" :link '(custom-manual "(mh-e)Folders") :group 'mh-e :package-version '(MH-E . "7.1")) (defgroup-mh mh-folder-selection nil "Folder selection." :prefix "mh-" :link '(custom-manual "(mh-e)Folder Selection") :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-identity nil "Identities." :link '(custom-manual "(mh-e)Identities") :prefix "mh-identity-" :group 'mh-e :package-version '(MH-E . "7.1")) (defgroup-mh mh-inc nil "Incorporating your mail." :prefix "mh-inc-" :link '(custom-manual "(mh-e)Incorporating Mail") :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-junk nil "Dealing with junk mail." :link '(custom-manual "(mh-e)Junk") :prefix "mh-junk-" :group 'mh-e :package-version '(MH-E . "7.3")) (defgroup-mh mh-letter nil "Editing a draft." :prefix "mh-" :link '(custom-manual "(mh-e)Editing Drafts") :group 'mh-e :package-version '(MH-E . "7.1")) (defgroup-mh mh-ranges nil "Ranges." :prefix "mh-" :link '(custom-manual "(mh-e)Ranges") :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-scan-line-formats nil "Scan line formats." :link '(custom-manual "(mh-e)Scan Line Formats") :prefix "mh-" :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-search nil "Searching." :link '(custom-manual "(mh-e)Searching") :prefix "mh-search-" :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-sending-mail nil "Sending mail." :prefix "mh-" :link '(custom-manual "(mh-e)Sending Mail") :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-sequences nil "Sequences." :prefix "mh-" :link '(custom-manual "(mh-e)Sequences") :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-show nil "Reading your mail." :prefix "mh-" :link '(custom-manual "(mh-e)Reading Mail") :group 'mh-e :package-version '(MH-E . "7.1")) (defgroup-mh mh-speedbar nil "The speedbar." :prefix "mh-speed-" :link '(custom-manual "(mh-e)Speedbar") :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-thread nil "Threading." :prefix "mh-thread-" :link '(custom-manual "(mh-e)Threading") :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-tool-bar nil "The tool bar" :link '(custom-manual "(mh-e)Tool Bar") :prefix "mh-" :group 'mh-e :package-version '(MH-E . "8.0")) (defgroup-mh mh-hooks nil "MH-E hooks." :link '(custom-manual "(mh-e)Top") :prefix "mh-" :group 'mh-e :package-version '(MH-E . "7.1")) (defgroup-mh mh-faces nil "Faces used in MH-E." :link '(custom-manual "(mh-e)Top") :prefix "mh-" :group 'faces :group 'mh-e :package-version '(MH-E . "7.1")) ;;; MH-E Customization ;; See Variant Support, above, for mh-e group. ;;; Aliases (:group 'mh-alias) (defcustom-mh mh-alias-completion-ignore-case-flag t "*Non-nil means don't consider case significant in MH alias completion. As MH ignores case in the aliases, so too does MH-E. However, you may turn off this option to make case significant which can be used to segregate completion of your aliases. You might use lowercase for mailing lists and uppercase for people." :type 'boolean :group 'mh-alias :package-version '(MH-E . "7.1")) (defcustom-mh mh-alias-expand-aliases-flag nil "*Non-nil means to expand aliases entered in the minibuffer. In other words, aliases entered in the minibuffer will be expanded to the full address in the message draft. By default, this expansion is not performed." :type 'boolean :group 'mh-alias :package-version '(MH-E . "7.1")) (defcustom-mh mh-alias-flash-on-comma t "*Specify whether to flash address or warn on translation. This option controls the behavior when a [comma] is pressed while entering aliases or addresses. The default setting flashes the address associated with an address in the minibuffer briefly, but does not display a warning if the alias is not found." :type '(choice (const :tag "Flash but Don't Warn If No Alias" t) (const :tag "Flash and Warn If No Alias" 1) (const :tag "Don't Flash Nor Warn If No Alias" nil)) :group 'mh-alias :package-version '(MH-E . "7.1")) (defcustom-mh mh-alias-insert-file nil "*Filename used to store a new MH-E alias. The default setting of this option is \"Use Aliasfile Profile Component\". This option can also hold the name of a file or a list a file names. If this option is set to a list of file names, or the \"Aliasfile:\" profile component contains more than one file name, MH-E will prompt for one of them when MH-E adds an alias." :type '(choice (const :tag "Use Aliasfile Profile Component" nil) (file :tag "Alias File") (repeat :tag "List of Alias Files" file)) :group 'mh-alias :package-version '(MH-E . "7.1")) (defcustom-mh mh-alias-insertion-location 'sorted "Specifies where new aliases are entered in alias files. This option is set to \"Alphabetical\" by default. If you organize your alias file in other ways, then adding aliases to the \"Top\" or \"Bottom\" of your alias file might be more appropriate." :type '(choice (const :tag "Alphabetical" sorted) (const :tag "Top" top) (const :tag "Bottom" bottom)) :group 'mh-alias :package-version '(MH-E . "7.1")) (defcustom-mh mh-alias-local-users t "*Non-nil means local users are added to alias completion. Aliases are created from \"/etc/passwd\" entries with a user ID larger than a magical number, typically 200. This can be a handy tool on a machine where you and co-workers exchange messages. These aliases have the form \"local.first.last\" if a real name is present in the password file. Otherwise, the alias will have the form \"local.login\". If you're on a system with thousands of users you don't know, and the loading of local aliases slows MH-E down noticeably, then turn this option off. This option also takes a string which is executed to generate the password file. For example, use \"ypcat passwd\" to obtain the NIS password file." :type '(choice (boolean) (string)) :group 'mh-alias :package-version '(MH-E . "7.1")) (defcustom-mh mh-alias-local-users-prefix "local." "*String prefixed to the real names of users from the password file. This option can also be set to \"Use Login\". For example, consider the following password file entry: psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh The following settings of this option will produce the associated aliases: \"local.\" local.peter.galbraith \"\" peter.galbraith Use Login psg This option has no effect if variable `mh-alias-local-users' is turned off." :type '(choice (const :tag "Use Login" nil) (string)) :group 'mh-alias :package-version '(MH-E . "7.4")) (defcustom-mh mh-alias-passwd-gecos-comma-separator-flag t "*Non-nil means the gecos field in the password file uses a comma separator. In the example in `mh-alias-local-users-prefix', commas are used to separate different values within the so-called gecos field. This is a fairly common usage. However, in the rare case that the gecos field in your password file is not separated by commas and whose contents may contain commas, you can turn this option off." :type 'boolean :group 'mh-alias :package-version '(MH-E . "7.4")) ;;; Organizing Your Mail with Folders (:group 'mh-folder) (defcustom-mh mh-new-messages-folders t "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. See also `mh-recursive-folders-flag'." :type '(choice (const :tag "Inbox" t) (const :tag "All" nil) (repeat :tag "Choose Folders" (string :tag "Folder"))) :group 'mh-folder :package-version '(MH-E . "8.0")) (defcustom-mh mh-ticked-messages-folders t "Folders searched for `mh-tick-seq'. 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. See also `mh-recursive-folders-flag'." :type '(choice (const :tag "Inbox" t) (const :tag "All" nil) (repeat :tag "Choose Folders" (string :tag "Folder"))) :group 'mh-folder :package-version '(MH-E . "8.0")) (defcustom-mh mh-large-folder 200 "The number of messages that indicates a large folder. If a folder is deemed to be large, that is the number of messages in it exceed this value, then confirmation is needed when it is visited. Even when `mh-show-threads-flag' is non-nil, the folder is not automatically threaded, if it is large. If set to nil all folders are treated as if they are small." :type '(choice (const :tag "No Limit") integer) :group 'mh-folder :package-version '(MH-E . "7.0")) (defcustom-mh mh-recenter-summary-flag nil "*Non-nil means to recenter the summary window. If this option is turned on, recenter the summary window when the show window is toggled off." :type 'boolean :group 'mh-folder :package-version '(MH-E . "7.0")) (defcustom-mh mh-recursive-folders-flag nil "*Non-nil means that commands which operate on folders do so recursively." :type 'boolean :group 'mh-folder :package-version '(MH-E . "7.0")) (defcustom-mh mh-sortm-args nil "*Additional arguments for \"sortm\"\\. This option is consulted when a prefix argument is used with \\[mh-sort-folder]. Normally default arguments to \"sortm\" are specified in the MH profile. This option may be used to provide an alternate view. For example, \"'(\"-nolimit\" \"-textfield\" \"subject\")\" is a useful setting." :type 'string :group 'mh-folder :package-version '(MH-E . "8.0")) ;;; Folder Selection (:group 'mh-folder-selection) (defcustom-mh mh-default-folder-for-message-function nil "Function to select a default folder for refiling or \"Fcc:\". When this function is called, the current buffer contains the message being refiled and point is at the start of the message. This function should return the default folder as a string with a leading \"+\" sign. It can also return nil so that the last folder name is used as the default, or an empty string to suppress the default entirely." :type 'function :group 'mh-folder-selection :package-version '(MH-E . "8.0")) (defcustom-mh mh-default-folder-list nil "*List of addresses and folders. The folder name associated with the first address found in this list is used as the default for `mh-refile-msg' and similar functions. Each element in this list contains a \"Check Recipient\" item. If this item is turned on, then the address is checked against the recipient instead of the sender. This is useful for mailing lists. See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more information." :type '(repeat (list (regexp :tag "Address") (string :tag "Folder") (boolean :tag "Check Recipient"))) :group 'mh-folder-selection :package-version '(MH-E . "7.2")) (defcustom-mh mh-default-folder-must-exist-flag t "*Non-nil means guessed folder name must exist to be used. If the derived folder does not exist, and this option is on, then the last folder name used is suggested. This is useful if you get mail from various people for whom you have an alias, but file them all in the same project folder. See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more information." :type 'boolean :group 'mh-folder-selection :package-version '(MH-E . "7.2")) (defcustom-mh mh-default-folder-prefix "" "*Prefix used for folder names generated from aliases. The prefix is used to prevent clutter in your mail directory. See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more information." :type 'string :group 'mh-folder-selection :package-version '(MH-E . "7.2")) ;;; Identities (:group 'mh-identity) (eval-and-compile (unless (fboundp 'mh-identity-make-menu-no-autoload) (defun mh-identity-make-menu-no-autoload () "Temporary definition. Real definition will take effect when mh-identity is loaded." nil))) (defcustom-mh mh-identity-list nil "*List of identities. 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 \". If you use an initial with a period, then you must quote your name as in '\"First I. Last\" '. 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" (choice (cons :tag "From Field" (const "From") (string :tag "Value")) (cons :tag "Organization Field" (const "Organization") (string :tag "Value")) (cons :tag "Other Field" (string :tag "Field") (string :tag "Value")) (cons :tag "Attribution Verb" (const ":attribution-verb") (string :tag "Value")) (cons :tag "Signature" (const :tag "Signature" ":signature") (choice (const :tag "mh-signature-file-name" nil) (file) (function))) (cons :tag "GPG Key ID" (const :tag "GPG Key ID" ":pgg-default-user-id") (string :tag "Value")))))) :set (lambda (symbol value) (set-default symbol value) (mh-identity-make-menu-no-autoload)) :group 'mh-identity :package-version '(MH-E . "7.1")) (defcustom-mh mh-auto-fields-list nil "List of recipients for which header lines are automatically inserted. 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") (repeat :tag "Add at least one item below" (choice (cons :tag "Identity" (const ":identity") ,(append '(radio) (mapcar (function (lambda (arg) `(const ,arg))) (mapcar 'car mh-identity-list)))) (cons :tag "Fcc Field" (const "fcc") (string :tag "Value")) (cons :tag "Mail-Followup-To Field" (const "Mail-Followup-To") (string :tag "Value")) (cons :tag "Other Field" (string :tag "Field") (string :tag "Value")))))) :group 'mh-identity :package-version '(MH-E . "7.3")) (defcustom-mh mh-auto-fields-prompt-flag t "*Non-nil means to prompt before sending if fields inserted. See `mh-auto-fields-list'." :type 'boolean :group 'mh-identity :package-version '(MH-E . "8.0")) (defcustom-mh mh-identity-default nil "Default identity to use when `mh-letter-mode' is called. See `mh-identity-list'." :type (append '(radio) (cons '(const :tag "None" nil) (mapcar (function (lambda (arg) `(const ,arg))) (mapcar 'car mh-identity-list)))) :group 'mh-identity :package-version '(MH-E . "7.1")) (defcustom-mh mh-identity-handlers '(("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 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 :package-version '(MH-E . "8.0")) ;;; Incorporating Your Mail (:group 'mh-inc) (defcustom-mh mh-inc-prog "inc" "*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 :package-version '(MH-E . "6.0")) (eval-and-compile (unless (fboundp 'mh-inc-spool-make-no-autoload) (defun mh-inc-spool-make-no-autoload () "Temporary definition. Real definition will take effect when mh-inc is loaded." nil))) (defcustom-mh mh-inc-spool-list nil "*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 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@stop.mail-abuse.org mh-e 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\". You can use \"xbuffy\" to automate the incorporation of this mail using the Emacs 22 command \"emacsclient\" as follows: box ~/mail/mh-e title mh-e origMode polltime 10 headertime 0 command emacsclient --eval '(mh-inc-spool-mh-e)' In XEmacs, the command \"gnuclient\" is used in a similar fashion." :type '(repeat (list (file :tag "Spool File") (string :tag "Folder") (character :tag "Key Binding"))) :set (lambda (symbol value) (set-default symbol value) (mh-inc-spool-make-no-autoload)) :group 'mh-inc :package-version '(MH-E . "7.3")) ;;; Dealing with Junk Mail (:group 'mh-junk) (defvar mh-junk-choice nil "Chosen spam fighting program.") ;; Available spam filter interfaces (defvar mh-junk-function-alist '((spamassassin mh-spamassassin-blacklist mh-spamassassin-whitelist) (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist) (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist)) "Available choices of spam programs to use. This is an alist. For each element there are functions that blacklist a message as spam and whitelist a message incorrectly classified as spam.") (defun mh-junk-choose (symbol value) "Choose spam program to use. The function is always called with SYMBOL bound to `mh-junk-program' and VALUE bound to the new value of `mh-junk-program'. The function sets the variable `mh-junk-choice' in addition to `mh-junk-program'." (set symbol value) ;XXX shouldn't this be set-default? (setq mh-junk-choice (or value (loop for element in mh-junk-function-alist until (executable-find (symbol-name (car element))) finally return (car element))))) (defcustom-mh 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. Note that this option is used as the \"display\" argument in the call to `call-process'. Therefore, turning on this option means setting its value to \"0\". You can also set its value to t to direct the programs' output to the \"*MH-E Log*\" buffer; this may be useful for debugging." :type '(choice (const :tag "Off" nil) (const :tag "On" 0)) :group 'mh-junk :package-version '(MH-E . "8.0")) (defcustom-mh mh-junk-disposition nil "Disposition of junk mail." :type '(choice (const :tag "Delete Spam" nil) (string :tag "Spam Folder")) :group 'mh-junk :package-version '(MH-E . "8.0")) (defcustom-mh 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\"." :type '(choice (const :tag "Auto-detect" nil) (const :tag "SpamAssassin" spamassassin) (const :tag "Bogofilter" bogofilter) (const :tag "SpamProbe" spamprobe)) :set 'mh-junk-choose :group 'mh-junk :package-version '(MH-E . "7.3")) ;;; Editing a Draft (:group 'mh-letter) (defcustom-mh mh-compose-insertion (if (locate-library "mml") 'mml 'mh) "Type of tags used when composing MIME messages. In addition to MH-style directives, MH-E also supports MML (MIME Meta Language) tags. (see Info node `(emacs-mime)Composing'). This option can be used to choose between them. By default, this option is set to \"MML\" if it is supported since it provides a lot more functionality. This option can also be set to \"MH\" if MH-style directives are preferred." :type '(choice (const :tag "MML" mml) (const :tag "MH" mh)) :group 'mh-letter :package-version '(MH-E . "7.0")) (defcustom-mh mh-compose-skipped-header-fields '("From" "Organization" "References" "In-Reply-To" "X-Face" "Face" "X-Image-URL" "X-Mailer") "List of header fields to skip over when navigating in draft." :type '(repeat (string :tag "Field")) :group 'mh-letter :package-version '(MH-E . "7.4")) (defcustom-mh mh-compose-space-does-completion-flag nil "*Non-nil means \\\\[mh-letter-complete-or-space] does completion in message header." :type 'boolean :group 'mh-letter :package-version '(MH-E . "7.4")) (defcustom-mh mh-delete-yanked-msg-window-flag nil "*Non-nil means delete any window displaying the message. This deletes the window containing the original message after yanking it with \\\\[mh-yank-cur-msg] to make more room on your screen for your reply." :type 'boolean :group 'mh-letter :package-version '(MH-E . "7.0")) (defcustom-mh mh-extract-from-attribution-verb "wrote:" "*Verb to use for attribution when a message is yanked by \\\\[mh-yank-cur-msg]. The attribution consists of the sender's name and email address followed by the content of this option. This option can be set to \"wrote:\", \"a écrit:\", and \"schrieb:\". You can also use the \"Custom String\" menu item to enter your own verb." :type '(choice (const "wrote:") (const "a écrit:") (const "schrieb:") (string :tag "Custom String")) :group 'mh-letter :package-version '(MH-E . "7.0")) (defcustom-mh mh-ins-buf-prefix "> " "*String to put before each line of a yanked or inserted message. The prefix \"> \" is the default setting of this option. I suggest that you not modify this option since it is used by many mailers and news readers: messages are far easier to read if several included messages have all been indented by the same string. This prefix is not inserted if you use one of the supercite flavors of `mh-yank-behavior' or you have added a `mail-citation-hook'." :type 'string :group 'mh-letter :package-version '(MH-E . "6.0")) (defcustom-mh mh-letter-complete-function 'ispell-complete-word "*Function to call when completing outside of address or folder fields. In the body of the message, \\\\[mh-letter-complete] runs this function, which is set to \"ispell-complete-word\" by default." :type '(choice function (const nil)) :group 'mh-letter :package-version '(MH-E . "7.1")) (defcustom-mh mh-letter-fill-column 72 "*Fill column to use in MH Letter mode. By default, this option is 72 to allow others to quote your message without line wrapping." :type 'integer :group 'mh-letter :package-version '(MH-E . "6.0")) (defcustom-mh mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none") "Default method to use in security tags. This option is used to select between a variety of mail security mechanisms. The default is \"PGP (MIME)\" if it is supported\; otherwise, the default is \"None\". Other mechanisms include vanilla \"PGP\" and \"S/MIME\". The `pgg' customization group may have some settings which may interest you (see Info node `(pgg)'). In particular, I turn on the option `pgg-encrypt-for-me' so that all messages I encrypt are encrypted with my public key as well. If you keep a copy of all of your outgoing mail with a \"Fcc:\" header field, this setting is vital so that you can read the mail you write!" :type '(choice (const :tag "PGP (MIME)" "pgpmime") (const :tag "PGP" "pgp") (const :tag "S/MIME" "smime") (const :tag "None" "none")) :group 'mh-letter :package-version '(MH-E . "8.0")) (defcustom-mh mh-signature-file-name "~/.signature" "*Source of user's signature. By default, the text of your signature is taken from the file \"~/.signature\". You can read from other sources by changing this option. This file may contain a vCard in which case an attachment is added with the vCard. This option may also be a symbol, in which case that function is called. You may not want a signature separator to be added for you; instead you may want to insert one yourself. Options that you may find useful to do this include `mh-signature-separator' (when inserting a signature separator) and `mh-signature-separator-regexp' (for finding said separator). The function `mh-signature-separator-p', which reports t if the buffer contains a separator, may be useful as well. The signature is inserted into your message with the command \\\\[mh-insert-signature] or with the option `mh-identity-list'." :type 'file :group 'mh-letter :package-version '(MH-E . "6.0")) (defcustom-mh mh-signature-separator-flag t "*Non-nil means a signature separator should be inserted. It is not recommended that you change this option since various mail user agents, including MH-E, use the separator to present the signature differently, and to suppress the signature when replying or yanking a letter into a draft." :type 'boolean :group 'mh-letter :package-version '(MH-E . "8.0")) (defcustom-mh mh-x-face-file "~/.face" "*File containing face header field to insert in outgoing mail. If the file starts with either of the strings \"X-Face:\", \"Face:\" or \"X-Image-URL:\" then the contents are added to the message header verbatim. Otherwise it is assumed that the file contains the value of the \"X-Face:\" header field. The \"X-Face:\" header field, which is a low-resolution, black and white image, can be generated using the \"compface\" command (see URL `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). The \"Online X-Face Converter\" is a useful resource for quick conversion of images into \"X-Face:\" header fields (see URL `http://www.dairiki.org/xface/'). Use the \"make-face\" script to convert a JPEG image to the higher resolution, color, \"Face:\" header field (see URL `http://quimby.gnus.org/circus/face/make-face'). The URL of any image can be used for the \"X-Image-URL:\" field and no processing of the image is required. To prevent the setting of any of these header fields, either set `mh-x-face-file' to nil, or simply ensure that the file defined by this option doesn't exist." :type 'file :group 'mh-letter :package-version '(MH-E . "7.0")) (defcustom-mh mh-yank-behavior 'attribution "*Controls which part of a message is yanked by \\\\[mh-yank-cur-msg]. To include the entire message, including the entire header, use \"Body and Header\". Use \"Body\" to yank just the body without the header. To yank only the portion of the message following the point, set this option to \"Below Point\". Choose \"Invoke supercite\" to pass the entire message and header through supercite. If the \"Body With Attribution\" setting is used, then the message minus the header is yanked and a simple attribution line is added at the top using the value of the option `mh-extract-from-attribution-verb'. This is the default. If the \"Invoke supercite\" or \"Body With Attribution\" settings are used, the \"-noformat\" argument is passed to the \"repl\" program to override a \"-filter\" or \"-format\" argument. These settings also have \"Automatically\" variants that perform the action automatically when you reply so that you don't need to use \\[mh-yank-cur-msg] at all. Note that this automatic action is only performed if the show buffer matches the message being replied to. People who use the automatic variants tend to turn on the option `mh-delete-yanked-msg-window-flag' as well so that the show window is never displayed. If the show buffer has a region, the option `mh-yank-behavior' is ignored unless its value is one of Attribution variants in which case the attribution is added to the yanked region. If this option is set to one of the supercite flavors, the hook `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not inserted." :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 "Body With Attribution" attribution) (const :tag "Body With Attribution, Automatically" autoattrib)) :group 'mh-letter :package-version '(MH-E . "8.0")) ;;; Ranges (:group 'mh-ranges) (defcustom-mh mh-interpret-number-as-range-flag t "*Non-nil means interpret a number as a range. Since one of the most frequent ranges used is \"last:N\", MH-E will interpret input such as \"200\" as \"last:200\" if this option is on (which is the default). If you need to scan just the message 200, then use the range \"200:200\"." :type 'boolean :group 'mh-ranges :package-version '(MH-E . "7.4")) ;;; Scan Line Formats (:group 'mh-scan-line-formats) (eval-and-compile (unless (fboundp 'mh-adaptive-cmd-note-flag-check) (defun mh-adaptive-cmd-note-flag-check (symbol value) "Temporary definition. Real definition, below, uses variables that aren't defined yet." (set-default symbol value)))) (defcustom-mh mh-adaptive-cmd-note-flag t "*Non-nil means that the message number width is determined dynamically. If you've created your own format to handle long message numbers, you'll be pleased to know you no longer need it since MH-E adapts its internal format based upon the largest message number if this option is on (the default). This option may only be turned on when `mh-scan-format-file' is set to \"Use MH-E scan Format\". If you prefer fixed-width message numbers, turn off this option and call `mh-set-cmd-note' with the width specified by your format file \(see `mh-scan-format-file'). For example, the default width is 4, so you would use \"(mh-set-cmd-note 4)\"." :type 'boolean :group 'mh-scan-line-formats :set 'mh-adaptive-cmd-note-flag-check :package-version '(MH-E . "7.0")) (defun mh-scan-format-file-check (symbol value) "Check if desired setting is valid. Throw an error if user tries to set `mh-scan-format-file' to anything but t when `mh-adaptive-cmd-note-flag' is on. Otherwise, set SYMBOL to VALUE." (if (and (not (eq value t)) mh-adaptive-cmd-note-flag) (error "%s %s" "You must turn off `mh-adaptive-cmd-note-flag'" "unless you use \"Use MH-E scan Format\"") (set-default symbol value))) (defcustom-mh mh-scan-format-file t "Specifies the format file to pass to the scan program. The default setting for this option is \"Use MH-E scan Format\". This means that the format string will be taken from the either `mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or nmh (or GNU mailutils MH) is in use. This setting also enables you to turn on the `mh-adaptive-cmd-note-flag' option. You can also set this option to \"Use Default scan Format\" to get the same output as you would get if you ran \"scan\" from the shell. If you have a format file that you want MH-E to use but not MH, you can set this option to \"Specify a scan Format File\" and enter the name of your format file. If you change the format of the scan lines you'll need to tell MH-E how to parse the new format. As you will see, quite a lot of variables are involved to do that. Use \"\\[apropos] RET mh-scan.*regexp\" to obtain a list of these variables. You will also have to call `mh-set-cmd-note' if your notations are not in column 4 (columns in Emacs start with 0)." :type '(choice (const :tag "Use MH-E scan Format" t) (const :tag "Use Default scan Format" nil) (file :tag "Specify a scan Format File")) :group 'mh-scan-line-formats :set 'mh-scan-format-file-check :package-version '(MH-E . "6.0")) (defun mh-adaptive-cmd-note-flag-check (symbol value) "Check if desired setting is valid. Throw an error if user tries to turn on `mh-adaptive-cmd-note-flag' when `mh-scan-format-file' isn't t. Otherwise, set SYMBOL to VALUE." (if (and value (not (eq mh-scan-format-file t))) (error "%s %s" "Can't turn on unless `mh-scan-format-file'" "is set to \"Use MH-E scan Format\"") (set-default symbol value))) (defcustom-mh mh-scan-prog "scan" "*Program used to scan messages. The name of the program that generates a listing of one line per message is held in this option. Unless this variable contains an absolute pathname, it is assumed to be in the `mh-progs' directory. You may link another program to `scan' (see \"mh-profile(5)\") to produce a different type of listing." :type 'string :group 'mh-scan-line-formats :package-version '(MH-E . "6.0")) (make-variable-buffer-local 'mh-scan-prog) ;;; Searching (:group 'mh-search) (defcustom-mh mh-search-program nil "Search program that MH-E shall use. The default setting of this option 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\". More information about setting up an indexing program to use with MH-E can be found in the documentation of `mh-search'." :type '(choice (const :tag "Auto-detect" nil) (const :tag "swish++" swish++) (const :tag "swish-e" swish) (const :tag "mairix" mairix) (const :tag "namazu" namazu) (const :tag "pick" pick) (const :tag "grep" grep)) :group 'mh-search :package-version '(MH-E . "8.0")) ;;; Sending Mail (:group 'mh-sending-mail) (defcustom-mh mh-compose-forward-as-mime-flag t "*Non-nil means that messages are forwarded as attachments. By default, this option is on which means that the forwarded messages are included as attachments. If you would prefer to forward your messages verbatim (as text, inline), then turn off this option. Forwarding messages verbatim works well for short, textual messages, but your recipient won't be able to view any non-textual attachments that were in the forwarded message. Be aware that if you have \"forw: -mime\" in your MH profile, then forwarded messages will always be included as attachments regardless of the settings of this option." :type 'boolean :group 'mh-sending-mail :package-version '(MH-E . "8.0")) (defcustom-mh mh-compose-letter-function nil "Invoked when starting a new draft. However, it is the last function called before you edit your message. The consequence of this is that you can write a function to write and send the message for you. This function is passed three arguments: the contents of the TO, SUBJECT, and CC header fields." :type '(choice (const nil) function) :group 'mh-sending-mail :package-version '(MH-E . "6.0")) (defcustom-mh mh-compose-prompt-flag nil "*Non-nil means prompt for header fields when composing a new draft." :type 'boolean :group 'mh-sending-mail :package-version '(MH-E . "7.4")) (defcustom-mh mh-forward-subject-format "%s: %s" "*Format string for forwarded message subject. This option is a string which includes two escapes (\"%s\"). The first \"%s\" is replaced with the sender of the original message, and the second one is replaced with the original \"Subject:\"." :type 'string :group 'mh-sending-mail :package-version '(MH-E . "6.0")) (defcustom-mh mh-insert-x-mailer-flag t "*Non-nil means append an \"X-Mailer:\" header field to the header. This header field includes the version of MH-E and Emacs that you are using. If you don't want to participate in our marketing, you can turn this option off." :type 'boolean :group 'mh-sending-mail :package-version '(MH-E . "7.0")) (defcustom-mh mh-redist-full-contents-flag nil "*Non-nil means the \"dist\" command needs entire letter for redistribution. This option must be turned on if \"dist\" requires the whole letter for redistribution, which is the case if \"send\" is compiled with the BERK option (which many people abhor). If you find that MH will not allow you to redistribute a message that has been redistributed before, turn off this option." :type 'boolean :group 'mh-sending-mail :package-version '(MH-E . "8.0")) (defcustom-mh mh-reply-default-reply-to nil "*Sets the person or persons to whom a reply will be sent. This option is set to \"Prompt\" by default so that you are prompted for the recipient of a reply. If you find that most of the time that you specify \"cc\" when you reply to a message, set this option to \"cc\". Other choices include \"from\", \"to\", or \"all\". You can always edit the recipients in the draft." :type '(choice (const :tag "Prompt" nil) (const "from") (const "to") (const "cc") (const "all")) :group 'mh-sending-mail :package-version '(MH-E . "6.0")) (defcustom-mh mh-reply-show-message-flag t "*Non-nil means the MH-Show buffer is displayed when replying. If you include the message automatically, you can hide the MH-Show buffer by turning off this option. See also `mh-reply'." :type 'boolean :group 'mh-sending-mail :package-version '(MH-E . "7.0")) ;;; Sequences (:group 'mh-sequences) ;; If `mh-unpropagated-sequences' becomes a defcustom, add the following to ;; the docstring: "Additional sequences that should not to be preserved can be ;; specified by setting `mh-unpropagated-sequences' appropriately." XXX (defcustom-mh mh-refile-preserves-sequences-flag t "*Non-nil means that sequences are preserved when messages are refiled. If a message is in any sequence (except \"Previous-Sequence:\" and \"cur\") when it is refiled, then it will still be in those sequences in the destination folder. If this behavior is not desired, then turn off this option." :type 'boolean :group 'mh-sequences :package-version '(MH-E . "7.4")) (defcustom-mh mh-tick-seq 'tick "The name of the MH sequence for ticked messages. You can customize this option if you already use the \"tick\" sequence for your own use. You can also disable all of the ticking functions by choosing the \"Disable Ticking\" item but there isn't much advantage to that." :type '(choice (const :tag "Disable Ticking" nil) symbol) :group 'mh-sequences :package-version '(MH-E . "7.3")) (defcustom-mh mh-update-sequences-after-mh-show-flag t "*Non-nil means flush MH sequences to disk after message is shown\\. Three sequences are maintained internally by MH-E and pushed out to MH when a message is shown. They include the sequence specified by your \"Unseen-Sequence:\" profile entry, \"cur\", and the sequence listed by the option `mh-tick-seq' which is \"tick\" by default. If you do not like this behavior, turn off this option. You can then update the state manually with the \\[mh-execute-commands], \\[mh-quit], or \\[mh-update-sequences] commands." :type 'boolean :group 'mh-sequences :package-version '(MH-E . "7.0")) (defcustom-mh mh-whitelist-preserves-sequences-flag t "*Non-nil means that sequences are preserved when messages are whitelisted. If a message is in any sequence (except \"Previous-Sequence:\" and \"cur\") when it is whitelisted, then it will still be in those sequences in the destination folder. If this behavior is not desired, then turn off this option." :type 'boolean :group 'mh-sequences :package-version '(MH-E . "8.4")) ;;; Reading Your Mail (:group 'mh-show) (defcustom-mh mh-bury-show-buffer-flag t "*Non-nil means show buffer is buried. One advantage of not burying the show buffer is that one can delete the show buffer more easily in an electric buffer list because of its proximity to its associated MH-Folder buffer. Try running \\[electric-buffer-list] to see what I mean." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-clean-message-header-flag t "*Non-nil means remove extraneous header fields. See also `mh-invisible-header-fields-default' and `mh-invisible-header-fields'." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-decode-mime-flag (not (not (locate-library "mm-decode"))) "*Non-nil means attachments are handled\\. MH-E can handle attachments as well if the Gnus `mm-decode' library is present. If so, this option will be on. Otherwise, you'll see the MIME body parts rather than text or attachments. There isn't much point in turning off this option; however, you can inspect it if it appears that the body parts are not being interpreted correctly or toggle it with the command \\[mh-toggle-mh-decode-mime-flag] to view the raw message. This option also controls the display of quoted-printable messages and other graphical widgets. See the options `mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-display-buttons-for-alternatives-flag nil "*Non-nil means display buttons for all alternative attachments. Sometimes, a mail program will produce multiple alternatives of the attachment in increasing degree of faithfulness to the original content. By default, only the preferred alternative is displayed. If this option is on, then the preferred part is shown inline and buttons are shown for each of the other alternatives." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.4")) (defcustom-mh mh-display-buttons-for-inline-parts-flag nil "*Non-nil means display buttons for all inline attachments\\. The sender can request that attachments should be viewed inline so that they do not really appear like an attachment at all to the reader. Most of the time, this is desirable, so by default MH-E suppresses the buttons for inline attachments. On the other hand, you may receive code or HTML which the sender has added to his message as inline attachments so that you can read them in MH-E. In this case, it is useful to see the buttons so that you know you don't have to cut and paste the code into a file; you can simply save the attachment. If you want to make the buttons visible for inline attachments, you can use the command \\[mh-toggle-mime-buttons] to toggle the visibility of these buttons. You can turn on these buttons permanently by turning on this option. MH-E cannot display all attachments inline however. It can display text (including HTML) and images." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-do-not-confirm-flag nil "*Non-nil means non-reversible commands do not prompt for confirmation. Commands such as `mh-pack-folder' prompt to confirm whether to process outstanding moves and deletes or not before continuing. Turning on this option means that these actions will be performed--which is usually desired but cannot be retracted--without question." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-fetch-x-image-url nil "*Control fetching of \"X-Image-URL:\" header field image. Ths option controls the fetching of the \"X-Image-URL:\" header field image with the following values: Ask Before Fetching You are prompted before the image is fetched. MH-E will remember your reply and will either use the already fetched image the next time the same URL is encountered or silently skip it if you didn't fetch it the first time. This is a good setting. Never Fetch Images are never fetched and only displayed if they are already present in the cache. This is the default. There isn't a value of \"Always Fetch\" for privacy and DOS (denial of service) reasons. For example, fetching a URL can tip off a spammer that you've read his email (which is why you shouldn't blindly answer yes if you've set this option to \"Ask Before Fetching\"). Someone may also flood your network and fill your disk drive by sending a torrent of messages, each specifying a unique URL to a very large file. The cache of images is found in the directory \".mhe-x-image-cache\" within your MH directory. You can add your own face to the \"From:\" field too. See Info node `(mh-e)Picture'. This setting only has effect if the option `mh-show-use-xface-flag' is turned on." :type '(choice (const :tag "Ask Before Fetching" ask) (const :tag "Never Fetch" nil)) :group 'mh-show :package-version '(MH-E . "7.3")) (defcustom-mh mh-graphical-smileys-flag t "*Non-nil means graphical smileys are displayed. It is a long standing custom to inject body language using a cornucopia of punctuation, also known as the \"smileys\". MH-E can render these as graphical widgets if this option is turned on, which it is by default. Smileys include patterns such as :-) and ;-). This option is disabled if the option `mh-decode-mime-flag' is turned off." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-graphical-emphasis-flag t "*Non-nil means graphical emphasis is displayed. A few typesetting features are indicated in ASCII text with certain characters. If your terminal supports it, MH-E can render these typesetting directives naturally if this option is turned on, which it is by default. For example, _underline_ will be underlined, *bold* will appear in bold, /italics/ will appear in italics, and so on. See the option `gnus-emphasis-alist' for the whole list. This option is disabled if the option `mh-decode-mime-flag' is turned off." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-highlight-citation-style 'gnus "Style for highlighting citations. If the sender of the message has cited other messages in his message, then MH-E will highlight these citations to emphasize the sender's actual response. This option can be customized to change the highlighting style. The \"Multicolor\" method uses a different color for each indentation while the \"Monochrome\" method highlights all citations in red. To disable highlighting of citations entirely, choose \"None\"." :type '(choice (const :tag "Multicolor" gnus) (const :tag "Monochrome" font-lock) (const :tag "None" nil)) :group 'mh-show :package-version '(MH-E . "8.0")) ;; These entries have been intentionally excluded by the developers. ;; "Comments:" ; RFC 2822 - show this one ;; "Fax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ ;; "Mail-System-Version:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ ;; "Mailer:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ ;; "Organization:" ; ;; "Phone:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ ;; "Reply-By:" ; RFC 2156 ;; "Reply-To:" ; RFC 2822 ;; "Sender:" ; ;; "User-Agent:" ; Similar to X-Mailer, so display it. ;; "X-Mailer:" ; ;; "X-Operator:" ; Similar to X-Mailer, so display it ;; Keep fields alphabetized with case folding. Use M-:(setq ;; sort-fold-case t) from the minibuffer to accomplish this. ;; Mention source, if known. (defvar mh-invisible-header-fields-internal '( "Abuse-Reports-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Accept-Language:" "AcceptLanguage:" "Accreditor:" ; Habeas "Also-Control:" ; H. Spencer: News Article Format and Transmission, June 1994 "Alternate-recipient:" ; RFC 2156 "Approved-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Approved:" ; RFC 1036 "Article-Names:" ; H. Spencer: News Article Format and Transmission, June 1994 "Article-Updates:" ; H. Spencer: News Article Format and Transmission, June 1994 "Authentication-Results:" "Auto-forwarded:" ; RFC 2156 "Autoforwarded:" ; RFC 2156 "Bestservhost:" "Bounces-To:" "Bounces_to:" "Bytes:" "Cancel-Key:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Cancel-Lock:" ; NNTP posts "Comment:" ; Shows up with DomainKeys "Content-" ; RFC 2045, 1123, 1766, 1864, 2045, 2110, 2156, 2183, 2912 "Control:" ; RFC 1036 "Conversion-With-Loss:" ; RFC 2156 "Conversion:" ; RFC 2156 "Delivered-To:" ; Egroups/yahoogroups mailing list manager "Delivery-Date:" ; RFC 2156 "Delivery:" "Discarded-X400-" ; RFC 2156 "Disclose-Recipients:" ; RFC 2156 "Disposition-Notification-Options:" ; RFC 2298 "Disposition-Notification-To:" ; RFC 2298 "Distribution:" ; RFC 1036 "DKIM-" ; http://antispam.yahoo.com/domainkeys "DL-Expansion-History:" ; RFC 2156 "DomainKey-" ; http://antispam.yahoo.com/domainkeys "DomainKey-Signature:" "Encoding:" ; RFC 1505 "Envelope-to:" "Errors-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Expires:" ; RFC 1036 "Expiry-Date:" ; RFC 2156 "Face:" ; Gnus Face header "Followup-To:" ; RFC 1036 "For-Approval:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "For-Comment:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "For-Handling:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Forwarded:" ; MH "From " ; sendmail "Generate-Delivery-Report:" ; RFC 2156 "Importance:" ; RFC 2156, 2421 "In-Reply-To:" ; RFC 2822 "Incomplete-Copy:" ; RFC 2156 "Keywords:" ; RFC 2822 "Language:" ; RFC 2156 "Lines:" ; RFC 1036 "List-" ; RFC 2369, 2919 "Mail-Copies-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Mail-Followup-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Mail-from:" ; MH "Mail-Reply-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Mailing-List:" ; Egroups/yahoogroups mailing list manager "Message-Content:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Message-Id:" ; RFC 822 "Message-Type:" ; RFC 2156 "Mime-Version" ; RFC 2045 "Msgid:" "NNTP-" ; News "Obsoletes:" ; RFC 2156 "Old-Return-Path:" "OpenPGP:" "Original-Encoded-Information-Types:" ; RFC 2156 "Original-Lines:" ; mail to news "Original-Newsgroups:" ; mail to news "Original-NNTP-" ; mail to news "Original-Path:" ; mail to news "Original-Received:" ; mail to news "Original-Recipient:" ; RFC 2298 "Original-To:" ; mail to news "Original-X-" ; mail to news "Origination-Client:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Originator:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "P1-Content-Type:" ; X400 "P1-Message-Id:" ; X400 "P1-Recipient:" ; X400 "Path:" ; RFC 1036 "Pics-Label:" ; W3C "Posted-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Precedence:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Prev-Resent" ; MH "Prevent-NonDelivery-Report:" ; RFC 2156 "Priority:" ; RFC 2156 "Read-Receipt-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Received-SPF:" ; Gmail "Received:" ; RFC 822 "References:" ; RFC 2822 "Registered-Mail-Reply-Requested-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Remailed-" ; MH "Replaces:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Replied:" ; MH "Resent-" ; RFC 2822 "Return-Path:" ; RFC 822 "Return-Receipt-Requested:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Return-Receipt-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Seal-Send-Time:" "See-Also:" ; H. Spencer: News Article Format and Transmission, June 1994 "Sensitivity:" ; RFC 2156, 2421 "Speech-Act:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Status:" ; sendmail "Supersedes:" ; H. Spencer: News Article Format and Transmission, June 1994 "Telefax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Thread-" "Thread-Index:" "Thread-Topic:" "Translated-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Translation-Of:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "Ua-Content-Id:" ; X400 "Via:" ; MH "X-Abuse-and-DMCA-" "X-Abuse-Info:" "X-Accept-Language:" ; Netscape/Mozilla "X-Ack:" "X-ACL-Warn:" ; http://www.exim.org "X-Admin:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Administrivia-To:" "X-AMAZON" ; Amazon.com "X-AnalysisOut:" ; Exchange "X-AntiAbuse:" ; cPanel "X-Antivirus-Scanner:" "X-AOL-IP:" ; AOL WebMail "X-Apparently-From:" ; MS Outlook "X-Apparently-To:" ; Egroups/yahoogroups mailing list manager "X-Attribution:" "X-AuditID:" "X-Authenticated-Info:" ; Verizon.net? "X-Authenticated-Sender:" ; AT&T Message Center (webmail) "X-Authentication-Info:" ; verizon.net? "X-Authentication-Warning:" ; sendmail "X-Authority-Analysis:" "X-Auto-Response-Suppress:" ; Exchange "X-Barracuda-" ; Barracuda spam scores "X-Bayes-Prob:" ; IEEE spam filter "X-Beenthere:" ; Mailman mailing list manager "X-BFI:" "X-Bigfish:" "X-Bogosity:" ; bogofilter "X-BPS1:" ; http://www.boggletools.com "X-BPS2:" ; http://www.boggletools.com "X-Brightmail-Tracker:" ; Brightmail "X-BrightmailFiltered:" ; Brightmail "X-Bugzilla-" ; Bugzilla "X-Cam-" ; Cambridge scanners "X-Campaign-Id:" "X-Campaign:" "X-Campaignid:" "X-CanIt-Geo:" ; IEEE spam filter "X-Cloudmark-SP-" ; Cloudmark (www.cloudmark.com) "X-Comment:" ; AT&T Mailennium "X-Complaints-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Completed:" "X-Confirm-Reading-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Content-Filtered-By:" "X-ContentStamp:" ; NetZero "X-Country-Chain:" ; http://www.declude.com/x-note.htm "X-Cr-Hashedpuzzle:" "X-Cr-Puzzleid:" "X-Cron-Env:" "X-DCC-" ; SpamAssassin "X-Declude-" ; http://www.declude.com/x-note.htm "X-Dedicated:" "X-Delivered" "X-Destination-ID:" "X-detected-operating-system:" ; GNU.ORG? "X-DH-Virus-" "X-DMCA" "X-DocGen-Version:" ; DocGen "X-Domain:" "X-Echelon-Distraction" "X-EFL-Spamscore:" ; MIT alumni spam filtering "X-eGroups-" ; Egroups/yahoogroups mailing list manager "X-EID:" "X-ELNK-Trace:" ; Earthlink mailer "X-EM-" ; Some ecommerce software "X-Email-Type-Id:" ; Paypal http://www.paypal.com "X-Enigmail-Version:" "X-Envelope-Date:" ; GNU mailutils "X-Envelope-From:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Envelope-Sender:" "X-Envelope-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-EviteMessageId:" ; evite.com "X-Evolution:" ; Evolution mail client "X-ExtLoop" "X-Face:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Facebook" ; Facebook "X-FB-SS:" "X-fmx-" "X-Folder:" ; Spam "X-Forwarded-" ; Google+ "X-From-Line" "X-FuHaFi:" ; http://www.gmx.net/ "X-Generated-By:" ; launchpad.net "X-Gmail-" ; Gmail "X-Gnus-Mail-Source:" ; gnus "X-Google-" ; Google mail "X-Google-Sender-Auth:" "X-Greylist:" ; milter-greylist-1.2.1 "X-Habeas-" ; http://www.returnpath.net "X-Hashcash:" ; hashcash "X-Headers-End:" ; SpamCop "X-HPL-" "X-HR-" "X-HTTP-UserAgent:" "X-Hz" ; Hertz "X-Identity:" ; http://www.declude.com/x-note.htm "X-IEEE-UCE-" ; IEEE spam filter "X-Image-URL:" "X-IMAP:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Info:" ; NTMail "X-IronPort-" ; IronPort AV "X-ISI-4-30-3-MailScanner:" "X-J2-" "X-Jira-Fingerprint:" ; JIRA "X-Junkmail-" ; RCN? "X-Juno-" ; Juno "X-Key:" "X-Launchpad-" ; plaunchpad.net "X-List-Host:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-List-Subscribe:" ; Unknown mailing list managers "X-List-Unsubscribe:" ; Unknown mailing list managers "X-Listprocessor-" ; ListProc(tm) by CREN "X-Listserver:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Loop:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Lrde-Mailscanner:" "X-Lumos-SenderID:" ; Roving ConstantContact "X-mail_abuse_inquiries:" ; http://www.salesforce.com "X-Mail-from:" ; fastmail.fm "X-MAIL-INFO:" ; NetZero "X-Mailer_" "X-MailFlowPolicy:" ; Cisco Email Security (formerly IronPort; http://www.ironport.com) "X-Mailing-List:" ; Unknown mailing list managers "X-MailingID:" "X-Mailman-Approved-At:" ; Mailman mailing list manager "X-Mailman-Version:" ; Mailman mailing list manager "X-MailScanner" ; ListProc(tm) by CREN "X-Mailutils-Message-Id" ; GNU Mailutils "X-Majordomo:" ; Majordomo mailing list manager "X-Match:" "X-MaxCode-Template:" ; Paypal http://www.paypal.com "X-MB-Message-" ; AOL WebMail "X-MDaemon-Deliver-To:" "X-MDRemoteIP:" "X-ME-Bayesian:" ; http://www.newmediadevelopment.net/page.cfm/parent/Client-Area/content/Managing-spam/ "X-Message-Id" "X-Message-Type:" "X-MessageWall-Score:" ; Unknown mailing list manager, AUC TeX "X-MHE-Checksum:" ; Checksum added during index search "X-MIME-Autoconverted:" ; sendmail "X-MIMEOLE:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/sendmail "X-MIMETrack:" "X-Mms-" ; T-Mobile pictures "X-Mozilla-Status:" ; Netscape/Mozilla "X-MS-" ; MS Outlook "X-Msmail-" ; MS Outlook "X-MSMail-Priority" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-MXL-Hash:" "X-NAI-Spam-" ; Network Associates Inc. SpamKiller "X-News:" ; News "X-Newsreader:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-No-Archive:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Notes-Item:" ; Lotus Notes Domino structured header "X-Notification-" ; Google+ "X-Notifications:" ; Google+ "X-OperatingSystem:" "X-Oracle-Calendar:" ; Oracle calendar invitations "X-ORBL:" "X-Orcl-Content-Type:" "X-Organization:" "X-Original-Arrival-Type:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Original-Complaints-To:" "X-Original-Date:" ; SourceForge mailing list manager "X-Original-To:" "X-Original-Trace:" "X-OriginalArrivalTime:" ; Hotmail "X-Originating-Email:" ; Hotmail "X-Originating-IP:" ; Hotmail "X-pair-" "X-PGP:" "X-PID:" "X-PMG-" "X-PMX-Version:" "X-Policyd-Weight:" ; policyd-weight (Postfix) "X-Postfilter:" "X-Priority:" ; MS Outlook "X-Proofpoint-" ; Proofpoint mail filter "X-Provags-ID:" "X-PSTN-" "X-Qotd-" ; User added "X-RCPT-TO:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Received-Date:" "X-Received:" "X-Report-Abuse-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Request-" "X-Resolved-to:" ; fastmail.fm "X-Return-Path-Hint:" ; Roving ConstantContact "X-RIM-" ; Research In Motion (i.e. BlackBerry) "X-RM" "X-RocketYMMF:" ; Yahoo "X-Roving-" ; Roving ConstantContact "X-SA-Exim-" ; Exim SpamAssassin "X-Sasl-enc:" ; Apple Mail "X-SBClass:" ; Spam "X-SBNote:" ; Spam "X-SBPass:" ; Spam "X-SBRS:" "X-SBRule:" ; Spam "X-Scanned-By:" "X-Sender-ID:" ; Google+ "X-Sender:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Sendergroup:" ; Cisco Email Security (formerly IronPort; http://www.ironport.com) "X-Server-Date:" "X-Server-Uuid:" "X-Service-Code:" "X-SFDC-" ; http://www.salesforce.com "X-Sieve:" ; Sieve filtering "X-SMFBL:" "X-SMHeaderMap:" "X-SMTP-" "X-Source" "X-Spam-" ; SpamAssassin "X-Spam:" ; Exchange "X-SpamBouncer:" ; Spam "X-SPF-" "X-Status" "X-Submission-Address:" "X-Submissions-To:" "X-Sun-Charset:" "X-Telecom-Digest" "X-TM-IMSS-Message-ID:" ; http://www.trendmicro.com "X-Trace:" "X-UID" "X-UIDL:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Unity" "X-UNTD-" ; NetZero "X-URI:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-URL:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-USANET-" ; usa.net "X-Usenet-Provider" "X-UserInfo1:" "X-VGI-OESCD:" "X-VirtualServer:" "X-VirtualServerGroup:" "X-Virus-" ; "X-Vms-To:" "X-VSMLoop:" ; NTMail "X-WebTV-Signature:" "X-Wss-Id:" ; Worldtalk gateways "X-X-Sender:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-XPT-XSL-Name:" ; Paypal http://www.paypal.com "X-xsi-" "X-XWALL-" ; http://www.dataenter.co.at/doc/xwall_undocumented_config.htm "X-Y-GMX-Trusted:" ; http://www.gmx.net/ "X-Yahoo" "X-Yahoo-Newman-" "X-YMail-" "X-ZixNet:" "X400-" ; X400 "Xref:" ; RFC 1036 ) "List of default header fields that are not to be shown. Do not alter this variable directly. Instead, add entries from here that you would like to be displayed in `mh-invisible-header-fields-default' and add entries to hide in `mh-invisible-header-fields'.") (eval-and-compile (unless (fboundp 'mh-invisible-headers) (defun mh-invisible-headers () "Temporary definition. Real definition, below, uses variables that aren't defined yet." nil))) (defvar mh-delay-invisible-header-generation-flag t "Non-nil means to delay the generation of invisible header fields. Because the function `mh-invisible-headers' uses both `mh-invisible-header-fields' and `mh-invisible-header-fields', it cannot be run until both variables have been initialized.") (defcustom-mh mh-invisible-header-fields nil "*Additional header fields to hide. Header fields that you would like to hide that aren't listed in `mh-invisible-header-fields-default' can be added to this option with a couple of caveats. Regular expressions are not allowed. Unique fields should have a \":\" suffix; otherwise, the element can be used to render invisible an entire class of fields that start with the same prefix. If you think a header field should be generally ignored, please update SF #1916032 (see URL `https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357'). See also `mh-clean-message-header-flag'." :type '(repeat (string :tag "Header field")) :set (lambda (symbol value) (set-default symbol value) (mh-invisible-headers)) :group 'mh-show :package-version '(MH-E . "7.1")) (defcustom-mh mh-invisible-header-fields-default nil "*List of hidden header fields. The header fields listed in this option are hidden, although you can check off any field that you would like to see. Header fields that you would like to hide that aren't listed can be added to the option `mh-invisible-header-fields'. See also `mh-clean-message-header-flag'. If you think a header field should be added to this list, please update SF #1916032 (see URL `https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357')." :type `(set ,@(mapcar (lambda (x) `(const ,x)) mh-invisible-header-fields-internal)) :set (lambda (symbol value) (set-default symbol value) (mh-invisible-headers)) :group 'mh-show :package-version '(MH-E . "8.0")) (defvar mh-invisible-header-fields-compiled nil "*Regexp matching lines in a message header that are not to be shown. Do not alter this variable directly. Instead, customize `mh-invisible-header-fields-default' checking for fields normally hidden that you wish to display, and add extra entries to hide in `mh-invisible-header-fields'.") (defun mh-invisible-headers () "Make or remake the variable `mh-invisible-header-fields-compiled'. Done using `mh-invisible-header-fields-internal' as input, from which entries from `mh-invisible-header-fields-default' are removed and entries from `mh-invisible-header-fields' are added." (let ((fields mh-invisible-header-fields-internal)) (when mh-invisible-header-fields-default ;; Remove entries from `mh-invisible-header-fields-default' (setq fields (loop for x in fields unless (member x mh-invisible-header-fields-default) collect x))) (when (and (boundp 'mh-invisible-header-fields) mh-invisible-header-fields) (dolist (x mh-invisible-header-fields) (unless (member x fields) (setq fields (cons x fields))))) (if fields (setq mh-invisible-header-fields-compiled (concat "^" ;; workaround for insufficient default (let ((max-specpdl-size 1000)) (regexp-opt fields t)))) (setq mh-invisible-header-fields-compiled nil)))) ;; Compile invisible header fields. (mh-invisible-headers) (defcustom-mh mh-lpr-command-format "lpr -J '%s'" "*Command used to print\\. This option contains the Unix command line which performs the actual printing for the \\[mh-print-msg] command. The string can contain one escape, \"%s\", which is replaced by the name of the folder and the message number and is useful for print job names. I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a nice header and adds a bit of margin so the text fits within my printer's margins. This options is not used by the commands \\[mh-ps-print-msg] or \\[mh-ps-print-msg-file]." :type 'string :group 'mh-show :package-version '(MH-E . "6.0")) (defcustom-mh mh-max-inline-image-height nil "*Maximum inline image height if \"Content-Disposition:\" is not present. Some older mail programs do not insert this needed plumbing to tell MH-E whether to display the attachments inline or not. If this is the case, MH-E will display these images inline if they are smaller than the window. However, you might want to allow larger images to be displayed inline. To do this, you can change the options `mh-max-inline-image-width' and `mh-max-inline-image-height' from their default value of zero to a large number. The size of your screen is a good choice for these numbers." :type '(choice (const nil) integer) :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-max-inline-image-width nil "*Maximum inline image width if \"Content-Disposition:\" is not present. Some older mail programs do not insert this needed plumbing to tell MH-E whether to display the attachments inline or not. If this is the case, MH-E will display these images inline if they are smaller than the window. However, you might want to allow larger images to be displayed inline. To do this, you can change the options `mh-max-inline-image-width' and `mh-max-inline-image-height' from their default value of zero to a large number. The size of your screen is a good choice for these numbers." :type '(choice (const nil) integer) :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-mhl-format-file nil "*Specifies the format file to pass to the \"mhl\" program. Normally MH-E takes care of displaying messages itself (rather than calling an MH program to do the work). If you'd rather have \"mhl\" display the message (within MH-E), change this option from its default value of \"Use Default mhl Format (Printing Only)\". You can set this option to \"Use Default mhl Format\" to get the same output as you would get if you ran \"mhl\" from the shell. If you have a format file that you want MH-E to use, you can set this option to \"Specify an mhl Format File\" and enter the name of your format file. Your format file should specify a non-zero value for \"overflowoffset\" to allow MH-E to parse the header. Note that \"mhl\" is always used for printing and forwarding; in this case, the value of this option is consulted if you have specified a format file." :type '(choice (const :tag "Use Default mhl Format (Printing Only)" nil) (const :tag "Use Default mhl Format" t) (file :tag "Specify an mhl Format File")) :group 'mh-show :package-version '(MH-E . "8.0")) (defcustom-mh mh-mime-save-parts-default-directory t "Default directory to use for \\\\[mh-mime-save-parts]. The default value for this option is \"Prompt Always\" so that you are always prompted for the directory in which to save the attachments. However, if you usually use the same directory within a session, then you can set this option to \"Prompt the First Time\" to avoid the prompt each time. you can make this directory permanent by choosing \"Directory\" and entering the directory's name." :type '(choice (const :tag "Prompt the First Time" nil) (const :tag "Prompt Always" t) directory) :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-print-background-flag nil "*Non-nil means messages should be printed in the background\\. Normally messages are printed in the foreground. If this is slow on your system, you may elect to turn off this option to print in the background. WARNING: If you do this, do not delete the message until it is printed or else the output may be truncated. This option is not used by the commands \\[mh-ps-print-msg] or \\[mh-ps-print-msg-file]." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-show-maximum-size 0 "*Maximum size of message (in bytes) to display automatically. This option provides an opportunity to skip over large messages which may be slow to load. The default value of 0 means that all message are shown regardless of size." :type 'integer :group 'mh-show :package-version '(MH-E . "8.0")) (defcustom-mh mh-show-use-xface-flag (>= emacs-major-version 21) "*Non-nil means display face images in MH-show buffers. MH-E can display the content of \"Face:\", \"X-Face:\", and \"X-Image-URL:\" header fields. If any of these fields occur in the header of your message, the sender's face will appear in the \"From:\" header field. If more than one of these fields appear, then the first field found in the order \"Face:\", \"X-Face:\", and \"X-Image-URL:\" will be used. The option `mh-show-use-xface-flag' is used to turn this feature on and off. This feature will be turned on by default if your system supports it. The first header field used, if present, is the Gnus-specific \"Face:\" field. The \"Face:\" field appeared in GNU Emacs 21 and XEmacs. For more information, see URL `http://quimby.gnus.org/circus/face/'. Next is the traditional \"X-Face:\" header field. The display of this field requires the \"uncompface\" program (see URL `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent versions of XEmacs have internal support for \"X-Face:\" images. If your version of XEmacs does not, then you'll need both \"uncompface\" and the x-face package (see URL `ftp://ftp.jpl.org/pub/elisp/'). Finally, MH-E will display images referenced by the \"X-Image-URL:\" header field if neither the \"Face:\" nor the \"X-Face:\" fields are present. The display of the images requires \"wget\" (see URL `http://www.gnu.org/software/wget/wget.html'), \"fetch\", or \"curl\" to fetch the image and the \"convert\" program from the ImageMagick suite (see URL `http://www.imagemagick.org/'). Of the three header fields this is the most efficient in terms of network usage since the image doesn't need to be transmitted with every single mail. The option `mh-fetch-x-image-url' controls the fetching of the \"X-Image-URL:\" header field image." :type 'boolean :group 'mh-show :package-version '(MH-E . "7.0")) (defcustom-mh mh-store-default-directory nil "*Default directory for \\\\[mh-store-msg]. If you would like to change the initial default directory, customize this option, change the value from \"Current\" to \"Directory\", and then enter the name of the directory for storing the content of these messages." :type '(choice (const :tag "Current" nil) directory) :group 'mh-show :package-version '(MH-E . "6.0")) (defcustom-mh mh-summary-height nil "*Number of lines in MH-Folder buffer (including the mode line). The default value of this option is \"Automatic\" which means that the MH-Folder buffer will maintain the same proportional size if the frame is resized. If you'd prefer a fixed height, then choose the \"Fixed Size\" option and enter the number of lines you'd like to see." :type '(choice (const :tag "Automatic" nil) (integer :tag "Fixed Size")) :group 'mh-show :package-version '(MH-E . "7.4")) ;;; The Speedbar (:group 'mh-speedbar) (defcustom-mh mh-speed-update-interval 60 "Time between speedbar updates in seconds. Set to 0 to disable automatic update." :type 'integer :group 'mh-speedbar :package-version '(MH-E . "8.0")) ;;; Threading (:group 'mh-thread) (defcustom-mh mh-show-threads-flag nil "*Non-nil means new folders start in threaded mode. Threading large number of messages can be time consuming so this option is turned off by default. If you turn this option on, then threading will be done only if the number of messages being threaded is less than `mh-large-folder'." :type 'boolean :group 'mh-thread :package-version '(MH-E . "7.1")) ;;; The Tool Bar (:group 'mh-tool-bar) ;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined ;; dynamically in mh-tool-bar.el. (defcustom-mh mh-tool-bar-search-function 'mh-search "*Function called by the tool bar search button. By default, this is set to `mh-search'. You can also choose \"Other Function\" from the \"Value Menu\" and enter a function of your own choosing." :type '(choice (const mh-search) (function :tag "Other Function")) :group 'mh-tool-bar :package-version '(MH-E . "7.0")) ;; XEmacs has a couple of extra customizations... (mh-do-in-xemacs (defcustom-mh mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag "*If non-nil, use tool bar. This option controls whether to show the MH-E icons at all. By default, this option is turned on if the window system supports tool bars. If your system doesn't support tool bars, then you won't be able to turn on this option." :type 'boolean :group 'mh-tool-bar :set (lambda (symbol value) (if (and (eq value t) (not mh-xemacs-has-tool-bar-flag)) (error "Tool bar not supported")) (set-default symbol value)) :package-version '(MH-E . "7.3")) (defcustom-mh mh-xemacs-tool-bar-position nil "*Tool bar location. This option controls the placement of the tool bar along the four edges of the frame. You can choose from one of \"Same As Default Tool Bar\", \"Top\", \"Bottom\", \"Left\", or \"Right\". If this variable is set to anything other than \"Same As Default Tool Bar\" and the default tool bar is in a different location, then two tool bars will be displayed: the MH-E tool bar and the default tool bar." :type '(radio (const :tag "Same As Default Tool Bar" :value nil) (const :tag "Top" :value top) (const :tag "Bottom" :value bottom) (const :tag "Left" :value left) (const :tag "Right" :value right)) :group 'mh-tool-bar :package-version '(MH-E . "7.3"))) ;;; Hooks (:group 'mh-hooks + group where hook described) (defcustom-mh mh-after-commands-processed-hook nil "Hook run by \\\\[mh-execute-commands] after performing outstanding refile and delete requests. Variables that are useful in this hook include `mh-folders-changed', which lists which folders were affected by deletes and refiles. This list will always include the current folder, which is also available in `mh-current-folder'." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "8.0")) (defcustom-mh mh-alias-reloaded-hook nil "Hook run by `mh-alias-reload' after loading aliases." :type 'hook :group 'mh-hooks :group 'mh-alias :package-version '(MH-E . "8.0")) (defcustom-mh mh-annotate-msg-hook nil "Hook run whenever a message is sent and after the scan lines and message are annotated. Hook functions can access the current folder name with `mh-current-folder' and obtain the message numbers of the annotated messages with `mh-annotate-list'." :type 'hook :group 'mh-hooks :group 'mh-sending-mail :package-version '(MH-E . "8.1")) (defcustom-mh mh-before-commands-processed-hook nil "Hook run by \\\\[mh-execute-commands] before performing outstanding refile and delete requests. Variables that are useful in this hook include `mh-delete-list', `mh-refile-list', `mh-blacklist', and `mh-whitelist' which can be used to see which changes will be made to the current folder, `mh-current-folder'." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "8.0")) (defcustom-mh mh-before-quit-hook nil "Hook run by \\\\[mh-quit] before quitting MH-E. This hook is called before the quit occurs, so you might use it to perform any MH-E operations; you could perform some query and abort the quit or call `mh-execute-commands', for example. See also `mh-quit-hook'." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "6.0")) (defcustom-mh mh-before-send-letter-hook nil "Hook run at the beginning of the \\\\[mh-send-letter] command. For example, if you want to check your spelling in your message before sending, add the `ispell-message' function." :type 'hook :options '(ispell-message) :group 'mh-hooks :group 'mh-letter :package-version '(MH-E . "6.0")) (defcustom-mh mh-blacklist-msg-hook nil "Hook run by \\\\[mh-junk-blacklist] after marking each message for blacklisting." :type 'hook :group 'mh-hooks :group 'mh-show :package-version '(MH-E . "8.4")) (defcustom-mh mh-delete-msg-hook nil "Hook run by \\\\[mh-delete-msg] after marking each message for deletion. For example, a past maintainer of MH-E used this once when he kept statistics on his mail usage." :type 'hook :group 'mh-hooks :group 'mh-show :package-version '(MH-E . "6.0")) (defcustom-mh mh-find-path-hook nil "Hook run by `mh-find-path' after reading the user's MH profile. This hook can be used the change the value of the variables that `mh-find-path' sets if you need to run with different values between MH and MH-E." :type 'hook :group 'mh-hooks :group 'mh-e :package-version '(MH-E . "7.0")) (defcustom-mh mh-folder-mode-hook nil "Hook run by `mh-folder-mode' when visiting a new folder." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "6.0")) (defcustom-mh mh-forward-hook nil "Hook run by `mh-forward' on a forwarded letter." :type 'hook :group 'mh-hooks :group 'mh-sending-mail :package-version '(MH-E . "8.0")) (defcustom-mh mh-inc-folder-hook nil "Hook run by \\\\[mh-inc-folder] after incorporating mail into a folder." :type 'hook :group 'mh-hooks :group 'mh-inc :package-version '(MH-E . "6.0")) (defcustom-mh mh-insert-signature-hook nil "Hook run by \\\\[mh-insert-signature] after signature has been inserted. Hook functions may access the actual name of the file or the function used to insert the signature with `mh-signature-file-name'." :type 'hook :group 'mh-hooks :group 'mh-letter :package-version '(MH-E . "8.0")) (mh-define-obsolete-variable-alias 'mh-kill-folder-suppress-prompt-hooks 'mh-kill-folder-suppress-prompt-functions "24.3") (defcustom-mh mh-kill-folder-suppress-prompt-functions '(mh-search-p) "Abnormal hook run at the beginning of \\\\[mh-kill-folder]. The hook functions are called with no arguments and should return a non-nil value to suppress the normal prompt when you remove a folder. This is useful for folders that are easily regenerated. The default value of `mh-search-p' suppresses the prompt on folders generated by searching. WARNING: Use this hook with care. If there is a bug in your hook which returns t on \"+inbox\" and you hit \\[mh-kill-folder] by accident in the \"+inbox\" folder, you will not be happy." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "7.4")) (defcustom-mh mh-letter-mode-hook nil "Hook run by `mh-letter-mode' on a new letter. This hook allows you to do some processing before editing a letter. For example, you may wish to modify the header after \"repl\" has done its work, or you may have a complicated \"components\" file and need to tell MH-E where the cursor should go." :type 'hook :group 'mh-hooks :group 'mh-sending-mail :package-version '(MH-E . "6.0")) (defcustom-mh mh-mh-to-mime-hook nil "Hook run on the formatted letter by \\\\[mh-mh-to-mime]." :type 'hook :group 'mh-hooks :group 'mh-letter :package-version '(MH-E . "8.0")) (defcustom-mh mh-search-mode-hook nil "Hook run upon entry to `mh-search-mode'\\. 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 this hook which is called when \\[mh-search] is run on a new pattern." :type 'hook :group 'mh-hooks :group 'mh-search :package-version '(MH-E . "8.0")) (defcustom-mh mh-pack-folder-hook nil "Hook run by \\\\[mh-pack-folder] after renumbering the messages. Hook functions can access the current folder name with `mh-current-folder'." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "8.2")) (defcustom-mh mh-quit-hook nil "Hook run by \\\\[mh-quit] after quitting MH-E. This hook is not run in an MH-E context, so you might use it to modify the window setup. See also `mh-before-quit-hook'." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "6.0")) (defcustom-mh mh-refile-msg-hook nil "Hook run by \\\\[mh-refile-msg] after marking each message for refiling." :type 'hook :group 'mh-hooks :group 'mh-folder :package-version '(MH-E . "6.0")) (defcustom-mh mh-show-hook nil "Hook run after \\\\[mh-show] shows a message. It is the last thing called after messages are displayed. It's used to affect the behavior of MH-E in general or when `mh-show-mode-hook' is too early. See `mh-show-mode-hook'." :type 'hook :group 'mh-hooks :group 'mh-show :package-version '(MH-E . "6.0")) (defcustom-mh mh-show-mode-hook nil "Hook run upon entry to `mh-show-mode'. This hook is called early on in the process of the message display. It is usually used to perform some action on the message's content. See `mh-show-hook'." :type 'hook :group 'mh-hooks :group 'mh-show :package-version '(MH-E . "6.0")) (defcustom-mh mh-unseen-updated-hook nil "Hook run after the unseen sequence has been updated. The variable `mh-seen-list' can be used by this hook to obtain the list of messages which were removed from the unseen sequence." :type 'hook :group 'mh-hooks :group 'mh-sequences :package-version '(MH-E . "6.0")) (defcustom-mh mh-whitelist-msg-hook nil "Hook run by \\\\[mh-junk-whitelist] after marking each message for whitelisting." :type 'hook :group 'mh-hooks :group 'mh-show :package-version '(MH-E . "8.4")) ;;; Faces (:group 'mh-faces + group where faces described) (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-")) ;; To add a new face: ;; 1. Add entry to variable mh-face-data. ;; 2. Create face using defface-mh (which removes min-color spec and ;; :package-version keyword where these are not supported), ;; accessing face data with function mh-face-data. ;; 3. Add inherit argument to function mh-face-data if applicable. (defvar mh-face-data '((mh-folder-followup ((((class color) (background light)) (:foreground "blue3")) (((class color) (background dark)) (:foreground "LightGoldenRod")) (t (:bold t)))) (mh-folder-msg-number ((((class color) (min-colors 64) (background light)) (:foreground "snow4")) (((class color) (min-colors 64) (background dark)) (:foreground "snow3")) (((class color) (background light)) (:foreground "purple")) (((class color) (background dark)) (:foreground "cyan")))) (mh-folder-refiled ((((class color) (min-colors 64) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 64) (background dark)) (:foreground "LightGoldenrod")) (((class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) (:foreground "Gray90" :bold t :italic t)) (((class grayscale) (background dark)) (:foreground "DimGray" :bold t :italic t)) (t (:bold t :italic t)))) (mh-folder-subject ((((class color) (background light)) (:foreground "blue4")) (((class color) (background dark)) (:foreground "yellow")) (t (:bold t)))) (mh-folder-tick ((((class color) (background light)) (:background "#dddf7e")) (((class color) (background dark)) (:background "#dddf7e")) (t (:underline t)))) (mh-folder-to ((((class color) (min-colors 64) (background light)) (:foreground "RosyBrown")) (((class color) (min-colors 64) (background dark)) (:foreground "LightSalmon")) (((class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) (((class grayscale) (background dark)) (:foreground "LightGray" :italic t)) (t (:italic t)))) (mh-letter-header-field ((((class color) (background light)) (:background "gray90")) (((class color) (background dark)) (:background "gray10")) (t (:bold t)))) (mh-search-folder ((((class color) (background light)) (:foreground "dark green" :bold t)) (((class color) (background dark)) (:foreground "indian red" :bold t)) (t (:bold t)))) (mh-show-cc ((((class color) (min-colors 64) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 64) (background dark)) (:foreground "LightGoldenrod")) (((class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) (:foreground "Gray90" :bold t :italic t)) (((class grayscale) (background dark)) (:foreground "DimGray" :bold t :italic t)) (t (:bold t :italic t)))) (mh-show-date ((((class color) (min-colors 64) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 64) (background dark)) (:foreground "PaleGreen")) (((class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "Gray90" :bold t)) (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) (t (:bold t :underline t)))) (mh-show-from ((((class color) (background light)) (:foreground "red3")) (((class color) (background dark)) (:foreground "cyan")) (t (:bold t)))) (mh-show-header ((((class color) (min-colors 64) (background light)) (:foreground "RosyBrown")) (((class color) (min-colors 64) (background dark)) (:foreground "LightSalmon")) (((class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) (((class grayscale) (background dark)) (:foreground "LightGray" :italic t)) (t (:italic t)))) (mh-show-pgg-bad ((t (:bold t :foreground "DeepPink1")))) (mh-show-pgg-good ((t (:bold t :foreground "LimeGreen")))) (mh-show-pgg-unknown ((t (:bold t :foreground "DarkGoldenrod2")))) (mh-show-signature ((t (:italic t)))) (mh-show-to ((((class color) (background light)) (:foreground "SaddleBrown")) (((class color) (background dark)) (:foreground "burlywood")) (((class grayscale) (background light)) (:foreground "DimGray" :underline t)) (((class grayscale) (background dark)) (:foreground "LightGray" :underline t)) (t (:underline t)))) (mh-speedbar-folder ((((class color) (background light)) (:foreground "blue4")) (((class color) (background dark)) (:foreground "light blue")))) (mh-speedbar-selected-folder ((((class color) (background light)) (:foreground "red1" :underline t)) (((class color) (background dark)) (:foreground "red1" :underline t)) (t (:underline t))))) "MH-E face data. Used by function `mh-face-data' which returns spec that is consumed by `defface-mh'.") (require 'cus-face) (defvar mh-inherit-face-flag (assq :inherit custom-face-attributes) "Non-nil means that the `defface' :inherit keyword is available. The :inherit keyword is available on all supported versions of GNU Emacs and XEmacs from at least 21.5.23 on.") (defvar mh-min-colors-defined-flag (and (not (featurep 'xemacs)) (>= emacs-major-version 22)) "Non-nil means `defface' supports min-colors display requirement.") (defun mh-face-data (face &optional inherit) "Return spec for FACE. See `defface' for the spec definition. If INHERIT is non-nil and `defface' supports the :inherit keyword, return INHERIT literally; otherwise, return spec for FACE from the variable `mh-face-data'. This isn't a perfect implementation. In the case that the :inherit keyword is not supported, any additional attributes in the inherit parameter are not added to the returned spec. Furthermore, when `mh-min-colors-defined-flag' is nil, this function finds display entries with \"min-colors\" requirements and either removes the \"min-colors\" requirement or strips the display entirely if the display does not support the number of specified colors." (let ((spec (if (and inherit mh-inherit-face-flag) inherit (or (cadr (assq face mh-face-data)) (error "Could not find %s in mh-face-data" face))))) (if mh-min-colors-defined-flag spec (let ((cells (mh-display-color-cells)) new-spec) ;; Remove entries with min-colors, or delete them if we have ;; fewer colors than they specify. (loop for entry in (reverse spec) do (let ((requirement (if (eq (car entry) t) nil (assq 'min-colors (car entry))))) (if requirement (when (>= cells (nth 1 requirement)) (setq new-spec (cons (cons (delq requirement (car entry)) (cdr entry)) new-spec))) (setq new-spec (cons entry new-spec))))) new-spec)))) (defface-mh mh-folder-address (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) "Recipient face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-blacklisted (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) "Blacklisted message face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.4")) (defface-mh mh-folder-body (mh-face-data 'mh-folder-msg-number '((((class color)) (:inherit mh-folder-msg-number)) (t (:inherit mh-folder-msg-number :italic t)))) "Body text face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-cur-msg-number (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number :bold t)))) "Current message number face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-date (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) "Date face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-deleted (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) "Deleted message face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-followup (mh-face-data 'mh-folder-followup) "\"Re:\" face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-msg-number (mh-face-data 'mh-folder-msg-number) "Message number face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-refiled (mh-face-data 'mh-folder-refiled) "Refiled message face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-sent-to-me-hint (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date)))) "Fontification hint face in messages sent directly to us. The detection of messages sent to us is governed by the scan format `mh-scan-format-nmh' and the regular expression `mh-scan-sent-to-me-sender-regexp'." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-sent-to-me-sender (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup)))) "Sender face in messages sent directly to us. The detection of messages sent to us is governed by the scan format `mh-scan-format-nmh' and the regular expression `mh-scan-sent-to-me-sender-regexp'." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-subject (mh-face-data 'mh-folder-subject) "Subject face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-tick (mh-face-data 'mh-folder-tick) "Ticked message face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-to (mh-face-data 'mh-folder-to) "\"To:\" face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.0")) (defface-mh mh-folder-whitelisted (mh-face-data 'mh-folder-refiled '((t (:inherit mh-folder-refiled)))) "Whitelisted message face." :group 'mh-faces :group 'mh-folder :package-version '(MH-E . "8.4")) (defface-mh mh-letter-header-field (mh-face-data 'mh-letter-header-field) "Editable header field value face in draft buffers." :group 'mh-faces :group 'mh-letter :package-version '(MH-E . "8.0")) (defface-mh mh-search-folder (mh-face-data 'mh-search-folder) "Folder heading face in MH-Folder buffers created by searches." :group 'mh-faces :group 'mh-search :package-version '(MH-E . "8.0")) (defface-mh mh-show-cc (mh-face-data 'mh-show-cc) "Face used to highlight \"cc:\" header fields." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-date (mh-face-data 'mh-show-date) "Face used to highlight \"Date:\" header fields." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-from (mh-face-data 'mh-show-from) "Face used to highlight \"From:\" header fields." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-header (mh-face-data 'mh-show-header) "Face used to deemphasize less interesting header fields." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad) "Bad PGG signature face." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-pgg-good (mh-face-data 'mh-show-pgg-good) "Good PGG signature face." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown) "Unknown or untrusted PGG signature face." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-signature (mh-face-data 'mh-show-signature) "Signature face." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-subject (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) "Face used to highlight \"Subject:\" header fields." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-to (mh-face-data 'mh-show-to) "Face used to highlight \"To:\" header fields." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-show-xface (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight))))) "X-Face image face. The background and foreground are used in the image." :group 'mh-faces :group 'mh-show :package-version '(MH-E . "8.0")) (defface-mh mh-speedbar-folder (mh-face-data 'mh-speedbar-folder) "Basic folder face." :group 'mh-faces :group 'mh-speedbar :package-version '(MH-E . "8.0")) (defface-mh mh-speedbar-folder-with-unseen-messages (mh-face-data 'mh-speedbar-folder '((t (:inherit mh-speedbar-folder :bold t)))) "Folder face when folder contains unread messages." :group 'mh-faces :group 'mh-speedbar :package-version '(MH-E . "8.0")) (defface-mh mh-speedbar-selected-folder (mh-face-data 'mh-speedbar-selected-folder) "Selected folder face." :group 'mh-faces :group 'mh-speedbar :package-version '(MH-E . "8.0")) (defface-mh mh-speedbar-selected-folder-with-unseen-messages (mh-face-data 'mh-speedbar-selected-folder '((t (:inherit mh-speedbar-selected-folder :bold t)))) "Selected folder face when folder contains unread messages." :group 'mh-faces :group 'mh-speedbar :package-version '(MH-E . "8.0")) (provide 'mh-e) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-e.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-scan.el0000644000175000000620000004675212114520723017307 0ustar wohlerstaff;;; mh-scan.el --- MH-E scan line constants and utilities ;; Copyright (C) 1993, 1995, 1997, 2000-2013 Free Software Foundation, ;; Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; This file contains constants and a few functions for interpreting ;; scan lines. ;;; Change Log: ;;; Code: (require 'mh-e) ;;; Scan Formats ;; The following scan formats are passed to the scan program if the setting of ;; `mh-scan-format-file' is t. They are identical except the later one makes ;; use of the nmh `decode' function to decode RFC 2047 encodings. If you just ;; want to change the column of the notations, use the `mh-set-cmd-note' ;; function. (defvar mh-scan-format-mh (concat "%4(msg)" "%<(cur)+%| %>" "%<{replied}-" "%?(nonnull(comp{to}))%<(mymbox{to})t%>" "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>" "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>" "%?(nonnull(comp{newsgroups}))n%>" "%<(zero) %>" "%02(mon{date})/%02(mday{date})%<{date} %|*%>" "%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>" "%<(zero)%17(friendly{from})%> " "%{subject}%<{body}<<%{body}%>") "*Scan format string for MH. This string is passed to the scan program via the -format argument. This format is identical to the default except that additional hints for fontification have been added to the fifth column (remember that in Emacs, the first column is 0). The values of the fifth column, in priority order, are: \"-\" if the message has been replied to, t if an address on the To: line matches one of the mailboxes of the current user, \"c\" if the Cc: line matches, \"b\" if the Bcc: line matches, and \"n\" if a non-empty Newsgroups: header is present.") (defvar mh-scan-format-nmh (concat "%4(msg)" "%<(cur)+%| %>" "%<{replied}-" "%?(nonnull(comp{to}))%<(mymbox{to})t%>" "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>" "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>" "%?(nonnull(comp{newsgroups}))n%>" "%<(zero) %>" "%02(mon{date})/%02(mday{date})%<{date} %|*%>" "%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>" "%<(zero)%17(decode(friendly{from}))%> " "%(decode{subject})%<{body}<<%{body}%>") "*Scan format string for nmh. This string is passed to the scan program via the -format arg. This format is identical to the default except that additional hints for fontification have been added to the fifth column (remember that in Emacs, the first column is 0). The values of the fifth column, in priority order, are: \"-\" if the message has been replied to, t if an address on the To: field matches one of the mailboxes of the current user, \"c\" if the Cc: field matches, \"b\" if the Bcc: field matches, and \"n\" if a non-empty Newsgroups: field is present.") ;;; Regular Expressions ;; Alphabetical. (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" "This regular expression matches the message body fragment. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least one parenthesized expression which matches the body text as in the default of \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this regular expression is not correct, the body fragment will not be highlighted with the face `mh-folder-body'.") (defvar mh-scan-blacklisted-msg-regexp "^\\( *[0-9]+\\)B" "This regular expression matches blacklisted (spam) messages. It must match from the beginning of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least one parenthesized expression which matches the message number as in the default of \"^\\\\( *[0-9]+\\\\)B\". This expression includes the leading space within parenthesis since it looks better to highlight it as well. The highlighting is done with the face `mh-folder-blacklisted'. This regular expression should be correct as it is needed by non-fontification functions. See also `mh-note-blacklisted'.") (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*" "This regular expression matches the current message. It must match from the beginning of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least one parenthesized expression which matches the message number as in the default of \"^\\\\( *[0-9]+\\\\+\\\\).*\". This expression includes the leading space and current message marker \"+\" within the parenthesis since it looks better to highlight these items as well. The highlighting is done with the face `mh-folder-cur-msg-number'. This regular expression should be correct as it is needed by non-fontification functions. See also `mh-note-cur'.") (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" "This regular expression matches a valid date. It must not be anchored to the beginning or the end of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain only one parenthesized expression which matches the date field as in the default of \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular expression is not correct, the date will not be highlighted with the face `mh-folder-date'.") (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D" "This regular expression matches deleted messages. It must match from the beginning of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least one parenthesized expression which matches the message number as in the default of \"^\\\\( *[0-9]+\\\\)D\". This expression includes the leading space within the parenthesis since it looks better to highlight it as well. The highlighting is done with the face `mh-folder-deleted'. This regular expression should be correct as it is needed by non-fontification functions. See also `mh-note-deleted'.") (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^^DBW0-9]" "This regular expression matches \"good\" messages. It must match from the beginning of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least one parenthesized expression which matches the message number as in the default of \"^\\\\( *[0-9]+\\\\)[^^DBW0-9]\". This expression includes the leading space within the parenthesis since it looks better to highlight it as well. The highlighting is done with the face `mh-folder-msg-number'. This regular expression should be correct as it is needed by non-fontification functions.") (defvar mh-scan-msg-format-regexp "%\\([0-9]*\\)(msg)" "This regular expression finds the message number width in a scan format. Note that the message number must be placed in a parenthesized expression as in the default of \"%\\\\([0-9]*\\\\)(msg)\". This variable is only consulted if `mh-scan-format-file' is set to \"Use MH-E scan Format\".") (defvar mh-scan-msg-format-string "%d" "This is a format string for width of the message number in a scan format. Use \"0%d\" for zero-filled message numbers. This variable is only consulted if `mh-scan-format-file' is set to \"Use MH-E scan Format\".") (defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)" "This regular expression extracts the message number. It must match from the beginning of the line. Note that the message number must be placed in a parenthesized expression as in the default of \"^ *\\\\([0-9]+\\\\)\".") (defvar mh-scan-msg-overflow-regexp "^[?0-9][0-9]" "This regular expression matches overflowed message numbers.") (defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]" "This regular expression matches a particular message. It is a format string; use \"%d\" to represent the location of the message number within the expression as in the default of \"^[^0-9]*%d[^0-9]\".") (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" "This regular expression specifies the recipient in messages you sent. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain two parenthesized expressions. The first is expected to match the \"To:\" that the default scan format file generates. The second is expected to match the recipient's name as in the default of \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular expression is not correct, the \"To:\" string will not be highlighted with the face `mh-folder-to' and the recipient will not be highlighted with the face `mh-folder-address'") (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^" "This regular expression matches refiled messages. It must match from the beginning of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least one parenthesized expression which matches the message number as in the default of \"^\\\\( *[0-9]+\\\\)\\\\^\". This expression includes the leading space within the parenthesis since it looks better to highlight it as well. The highlighting is done with the face `mh-folder-refiled'. This regular expression should be correct as it is needed by non-fontification functions. See also `mh-note-refiled'.") (defvar mh-scan-sent-to-me-sender-regexp "^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)" "This regular expression matches messages sent to us. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least two parenthesized expressions. The first should match the fontification hint (see `mh-scan-format-nmh') and the second should match the user name as in the default of ^ *[0-9]+.\\\\([bct]\\\\).....[ ]*\\\\(..................\\\\) If this regular expression is not correct, the notation hints will not be highlighted with the face `mh-mh-folder-sent-to-me-hint' and the sender will not be highlighted with the face `mh-folder-sent-to-me-sender'.") (defvar mh-scan-subject-regexp "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" "This regular expression matches the subject. It must match from the beginning of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least three parenthesized expressions. The first is expected to match the \"Re:\" string, if any, and is highlighted with the face `mh-folder-followup'. The second matches an optional bracketed number after \"Re:\", such as in \"Re[2]:\" (and is thus a sub-expression of the first expression) and the third is expected to match the subject line itself which is highlighted with the face `mh-folder-subject'. For example, the default (broken on multiple lines for readability) is ^ *[0-9]+........[ ]*................... \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* \\\\([^<\\n]*\\\\) This regular expression should be correct as it is needed by non-fontification functions.") (defvar mh-scan-valid-regexp "^ *[0-9]" "This regular expression describes a valid scan line. This is used to eliminate error messages that are occasionally produced by \"inc\".") (defvar mh-scan-whitelisted-msg-regexp "^\\( *[0-9]+\\)W" "This regular expression matches whitelisted (non-spam) messages. It must match from the beginning of the line. Note that the default setting of `mh-folder-font-lock-keywords' expects this expression to contain at least one parenthesized expression which matches the message number as in the default of \"^\\\\( *[0-9]+\\\\)W\". This expression includes the leading space within parenthesis since it looks better to highlight it as well. The highlighting is done with the face `mh-folder-whitelisted'. This regular expression should be correct as it is needed by non-fontification functions. See also `mh-note-whitelisted'.") ;;; Widths, Offsets and Columns (defvar mh-cmd-note 4 "Column for notations. This variable should be set with the function `mh-set-cmd-note'. This variable may be updated dynamically if `mh-adaptive-cmd-note-flag' is on. Note that columns in Emacs start with 0.") (make-variable-buffer-local 'mh-cmd-note) (defvar mh-scan-cmd-note-width 1 "Number of columns consumed by the cmd-note field in `mh-scan-format'. This column will have one of the values: \" \", \"^\", \"D\", \"B\", \"W\", \"+\", where \" \" is the default value, \"^\" is the `mh-note-refiled' character, \"D\" is the `mh-note-deleted' character, \"B\" is the `mh-note-blacklisted' character, \"W\" is the `mh-note-whitelisted' character, and \"+\" is the `mh-note-cur' character.") (defvar mh-scan-destination-width 1 "Number of columns consumed by the destination field in `mh-scan-format'. This column will have one of \" \", \"%\", \"-\", \"t\", \"c\", \"b\", or \"n\" in it. \" \" blank space is the default character. \"%\" indicates that the message in a named MH sequence. \"-\" indicates that the message has been annotated with a replied field. \"t\" indicates that the message contains mymbox in the To: field. \"c\" indicates that the message contains mymbox in the Cc: field. \"b\" indicates that the message contains mymbox in the Bcc: field. \"n\" indicates that the message contains a Newsgroups: field.") (defvar mh-scan-date-width 5 "Number of columns consumed by the date field in `mh-scan-format'. This column will typically be of the form mm/dd.") (defvar mh-scan-date-flag-width 1 "Number of columns consumed to flag (in)valid dates in `mh-scan-format'. This column will have \" \" for valid and \"*\" for invalid or missing dates.") (defvar mh-scan-from-mbox-width 17 "Number of columns consumed with the \"From:\" line in `mh-scan-format'. This column will have a friendly name or e-mail address of the originator, or a \"To: address\" for outgoing e-mail messages.") (defvar mh-scan-from-mbox-sep-width 2 "Number of columns consumed by whitespace after from-mbox in `mh-scan-format'. This column will only ever have spaces in it.") (defvar mh-scan-field-destination-offset (+ mh-scan-cmd-note-width) "The offset from the `mh-cmd-note' for the destination column.") (defvar mh-scan-field-from-start-offset (+ mh-scan-cmd-note-width mh-scan-destination-width mh-scan-date-width mh-scan-date-flag-width) "The offset from the `mh-cmd-note' to find the start of \"From:\" address.") (defvar mh-scan-field-from-end-offset (+ mh-scan-field-from-start-offset mh-scan-from-mbox-width) "The offset from the `mh-cmd-note' to find the end of \"From:\" address.") (defvar mh-scan-field-subject-start-offset (+ mh-scan-cmd-note-width mh-scan-destination-width mh-scan-date-width mh-scan-date-flag-width mh-scan-from-mbox-width mh-scan-from-mbox-sep-width) "The offset from the `mh-cmd-note' to find the start of the subject.") ;;; Notation ;; Alphabetical. (defvar mh-note-blacklisted ?B "Messages that have been blacklisted are marked by this character. See also `mh-scan-blacklisted-msg-regexp'.") (defvar mh-note-cur ?+ "The current message (in MH, not in MH-E) is marked by this character. See also `mh-scan-cur-msg-number-regexp'.") (defvar mh-note-copied ?C "Messages that have been copied are marked by this character.") (defvar mh-note-deleted ?D "Messages that have been deleted are marked by this character. See also `mh-scan-deleted-msg-regexp'.") (defvar mh-note-dist ?R "Messages that have been redistributed are marked by this character.") (defvar mh-note-forw ?F "Messages that have been forwarded are marked by this character.") (defvar mh-note-printed ?P "Messages that have been printed are marked by this character.") (defvar mh-note-refiled ?^ "Messages that have been refiled are marked by this character. See also `mh-scan-refiled-msg-regexp'.") (defvar mh-note-repl ?- "Messages that have been replied to are marked by this character.") (defvar mh-note-seq ?% "Messages in a user-defined sequence are marked by this character. Messages in the \"search\" sequence are marked by this character as well.") (defvar mh-note-whitelisted ?W "Messages that have been whitelisted are marked by this character. See also `mh-scan-whitelisted-msg-regexp'.") ;;; Utilities ;;;###mh-autoload (defun mh-scan-msg-number-regexp () "Return value of variable `mh-scan-msg-number-regexp'." mh-scan-msg-number-regexp) ;;;###mh-autoload (defun mh-scan-msg-search-regexp () "Return value of variable `mh-scan-msg-search-regexp'." mh-scan-msg-search-regexp) ;;;###mh-autoload (defun mh-set-cmd-note (column) "Set `mh-cmd-note' to COLUMN. Note that columns in Emacs start with 0." (setq mh-cmd-note column)) ;;;###mh-autoload (defun mh-scan-format () "Return the output format argument for the scan program." (if (equal mh-scan-format-file t) (list "-format" (if (mh-variant-p 'nmh 'gnu-mh) (list (mh-update-scan-format mh-scan-format-nmh mh-cmd-note)) (list (mh-update-scan-format mh-scan-format-mh mh-cmd-note)))) (if (not (equal mh-scan-format-file nil)) (list "-form" mh-scan-format-file)))) (defun mh-update-scan-format (fmt width) "Return a scan format with the (msg) width in the FMT replaced with WIDTH. The message number width portion of the format is discovered using `mh-scan-msg-format-regexp'. Its replacement is controlled with `mh-scan-msg-format-string'." (or (and (string-match mh-scan-msg-format-regexp fmt) (let ((begin (match-beginning 1)) (end (match-end 1))) (concat (substring fmt 0 begin) (format mh-scan-msg-format-string width) (substring fmt end)))) fmt)) ;;;###mh-autoload (defun mh-msg-num-width (folder) "Return the width of the largest message number in this FOLDER." (or mh-progs (mh-find-path)) (let ((tmp-buffer (get-buffer-create mh-temp-buffer)) (width 0)) (with-current-buffer tmp-buffer (erase-buffer) (apply 'call-process (expand-file-name mh-scan-prog mh-progs) nil '(t nil) nil (list folder "last" "-format" "%(msg)")) (goto-char (point-min)) (if (re-search-forward mh-scan-msg-number-regexp nil 0 1) (setq width (length (buffer-substring (match-beginning 1) (match-end 1)))))) width)) ;;;###mh-autoload (defun mh-msg-num-width-to-column (width) "Return the column for notations given message number WIDTH. Note that columns in Emacs start with 0. If `mh-scan-format-file' is set to \"Use MH-E scan Format\" this means that either `mh-scan-format-mh' or `mh-scan-format-nmh' are in use. This function therefore assumes that the first column is empty (to provide room for the cursor), the following WIDTH columns contain the message number, and the column for notations comes after that." (if (eq mh-scan-format-file t) (max (1+ width) 2) (error "%s %s" "Can't call `mh-msg-num-width-to-column' when" "`mh-scan-format-file' is not set to \"Use MH-E scan Format\""))) (provide 'mh-scan) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-scan.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-funcs.el0000644000175000000620000003545412114520723017476 0ustar wohlerstaff;;; mh-funcs.el --- MH-E functions not everyone will use right away ;; Copyright (C) 1993, 1995, 2001-2013 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Putting these functions in a separate file lets MH-E start up faster, ;; since less Lisp code needs to be loaded all at once. ;; Please add the functions in alphabetical order. If only one or two ;; small support routines are needed, place them with the function; ;; otherwise, create a separate section for them. ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-scan) ;;;###mh-autoload (defun mh-burst-digest () "Break up digest into separate messages\\. This command uses the MH command \"burst\" to break out each message in the digest into its own message. Using this command, you can quickly delete unwanted messages, like this: Once the digest is split up, toggle out of MH-Folder Show mode with \\[mh-toggle-showing] so that the scan lines fill the screen and messages aren't displayed. Then use \\[mh-delete-msg] to quickly delete messages that you don't want to read (based on the \"Subject:\" header field). You can also burst the digest to reply directly to the people who posted the messages in the digest. One problem you may encounter is that the \"From:\" header fields are preceded with a \">\" so that your reply can't create the \"To:\" field correctly. In this case, you must correct the \"To:\" field yourself." (interactive) (let ((digest (mh-get-msg-num t))) (mh-process-or-undo-commands mh-current-folder) (mh-set-folder-modified-p t) ; lock folder while bursting (message "Bursting digest...") (mh-exec-cmd "burst" mh-current-folder digest "-inplace") (with-mh-folder-updating (t) (beginning-of-line) (delete-region (point) (point-max))) (mh-regenerate-headers (format "%d-last" digest) t) (mh-goto-cur-msg) (message "Bursting digest...done"))) ;;;###mh-autoload (defun mh-copy-msg (range folder) "Copy RANGE to FOLDER\\. If you wish to copy a message to another folder, you can use this command (see the \"-link\" argument to \"refile\"). Like the command \\[mh-refile-msg], this command prompts you for the name of the target folder and you can specify a range. Note that unlike the command \\[mh-refile-msg], the copy takes place immediately. The original copy remains in the current folder. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Copy") (mh-prompt-for-folder "Copy to" "" t))) (let ((msg-list (let ((result ())) (mh-iterate-on-range msg range (mh-notate nil mh-note-copied mh-cmd-note) (push msg result)) result))) (mh-exec-cmd "refile" (mh-coalesce-msg-list msg-list) "-link" "-src" mh-current-folder folder))) ;;;###mh-autoload (defun mh-kill-folder () "Remove folder. Remove all of the messages (files) within the current folder, and then remove the folder (directory) itself. Run the abnormal hook `mh-kill-folder-suppress-prompt-hooks'. The hook functions are called with no arguments and should return a non-nil value to suppress the normal prompt when you remove a folder. This is useful for folders that are easily regenerated." (interactive) (if (or (run-hook-with-args-until-success 'mh-kill-folder-suppress-prompt-hooks) (yes-or-no-p (format "Remove folder %s (and all included messages)? " mh-current-folder))) (let ((folder mh-current-folder) (window-config mh-previous-window-config)) (mh-set-folder-modified-p t) ; lock folder to kill it (mh-exec-cmd-daemon "rmf" 'mh-rmf-daemon folder) (when (boundp 'mh-speed-folder-map) (mh-speed-invalidate-map folder)) (mh-remove-from-sub-folders-cache folder) (mh-set-folder-modified-p nil) ; so kill-buffer doesn't complain (if (and mh-show-buffer (get-buffer mh-show-buffer)) (kill-buffer mh-show-buffer)) (if (get-buffer folder) (kill-buffer folder)) (when window-config (set-window-configuration window-config)) (message "Folder %s removed" folder)) (message "Folder not removed"))) (defun mh-rmf-daemon (process output) "The rmf PROCESS puts OUTPUT in temporary buffer. Display the results only if something went wrong." (set-buffer (get-buffer-create mh-temp-buffer)) (insert-before-markers output) (when (save-excursion (goto-char (point-min)) (re-search-forward "^rmf: " (point-max) t)) (display-buffer mh-temp-buffer))) ;; Shush compiler. (defvar view-exit-action) ;;;###mh-autoload (defun mh-list-folders () "List mail folders." (interactive) (let ((temp-buffer mh-folders-buffer)) (with-output-to-temp-buffer temp-buffer (with-current-buffer temp-buffer (erase-buffer) (message "Listing folders...") (mh-exec-cmd-output "folders" t (if mh-recursive-folders-flag "-recurse" "-norecurse")) (goto-char (point-min)) (mh-view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing folders...done"))))) ;;;###mh-autoload (defun mh-pack-folder (range) "Pack folder\\. This command packs the folder, removing gaps from the numbering sequence. If you don't want to rescan the entire folder afterward, this command will accept a RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will ask if you want to process refiles or deletes first and then either run \\[mh-execute-commands] for you or undo the pending refiles and deletes. The hook `mh-pack-folder-hook' is run after the folder is packed; see its documentation for variables it can use." (interactive (list (if current-prefix-arg (mh-read-range "Scan" mh-current-folder t nil t mh-interpret-number-as-range-flag) '("all")))) (let ((threaded-flag (memq 'unthread mh-view-ops))) (mh-pack-folder-1 range) (mh-goto-cur-msg) (when mh-index-data (mh-index-update-maps mh-current-folder)) (cond (threaded-flag (mh-toggle-threads)) (mh-index-data (mh-index-insert-folder-headers)))) (run-hooks 'mh-pack-folder-hook) (message "Packing folder...done")) (defun mh-pack-folder-1 (range) "Close and pack the current folder. Display RANGE after packing, or the entire folder if RANGE is nil." (mh-process-or-undo-commands mh-current-folder) (message "Packing folder...") (mh-set-folder-modified-p t) ; lock folder while packing (save-excursion (mh-exec-cmd-quiet t "folder" mh-current-folder "-pack" "-norecurse" "-fast")) (mh-reset-threads-and-narrowing) (mh-regenerate-headers range)) ;;;###mh-autoload (defun mh-page-digest () "Display next message in digest." (interactive) (mh-in-show-buffer (mh-show-buffer) ;; Go to top of screen (in case user moved point). (move-to-window-line 0) (let ((case-fold-search nil)) ;; Search for blank line and then for From: (or (and (search-forward "\n\n" nil t) (re-search-forward "^From:" nil t)) (error "No more messages in digest"))) ;; Go back to previous blank line, then forward to the first non-blank. (search-backward "\n\n" nil t) (forward-line 2) (mh-recenter 0))) ;;;###mh-autoload (defun mh-page-digest-backwards () "Display previous message in digest." (interactive) (mh-in-show-buffer (mh-show-buffer) ;; Go to top of screen (in case user moved point). (move-to-window-line 0) (let ((case-fold-search nil)) (beginning-of-line) (or (and (search-backward "\n\n" nil t) (re-search-backward "^From:" nil t)) (error "No previous message in digest"))) ;; Go back to previous blank line, then forward to the first non-blank. (if (search-backward "\n\n" nil t) (forward-line 2)) (mh-recenter 0))) ;;;###mh-autoload (defun mh-pipe-msg (command include-header) "Pipe message through shell command COMMAND. You are prompted for the Unix command through which you wish to run your message. If you give a prefix argument INCLUDE-HEADER to this command, the message header is included in the text passed to the command." (interactive (list (read-string "Shell command on message: ") current-prefix-arg)) (let ((msg-file-to-pipe (mh-msg-filename (mh-get-msg-num t))) (message-directory default-directory)) (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (insert-file-contents msg-file-to-pipe) (goto-char (point-min)) (if (not include-header) (search-forward "\n\n")) (let ((default-directory message-directory)) (shell-command-on-region (point) (point-max) command nil))))) ;;;###mh-autoload (defun mh-sort-folder (&optional extra-args) "Sort folder. By default, messages are sorted by date. The option `mh-sortm-args' holds extra arguments to pass on to the command \"sortm\" when a prefix argument EXTRA-ARGS is used." (interactive "P") (mh-process-or-undo-commands mh-current-folder) (setq mh-next-direction 'forward) (mh-set-folder-modified-p t) ; lock folder while sorting (message "Sorting folder...") (let ((threaded-flag (memq 'unthread mh-view-ops))) (mh-exec-cmd "sortm" mh-current-folder (if extra-args mh-sortm-args)) (when mh-index-data (mh-index-update-maps mh-current-folder)) (message "Sorting folder...done") (mh-scan-folder mh-current-folder "all") (cond (threaded-flag (mh-toggle-threads)) (mh-index-data (mh-index-insert-folder-headers))))) ;;;###mh-autoload (defun mh-store-msg (directory) "Unpack message created with \"uudecode\" or \"shar\". The default DIRECTORY for extraction is the current directory; however, you have a chance to specify a different extraction directory. The next time you use this command, the default directory is the last directory you used. If you would like to change the initial default directory, customize the option `mh-store-default-directory', change the value from \"Current\" to \"Directory\", and then enter the name of the directory for storing the content of these messages." (interactive (list (let ((udir (or mh-store-default-directory default-directory))) (read-directory-name "Store message in directory: " udir udir nil)))) (let ((msg-file-to-store (mh-msg-filename (mh-get-msg-num t)))) (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (insert-file-contents msg-file-to-store) (mh-store-buffer directory)))) (defun mh-store-buffer (directory) "Unpack buffer created with \"uudecode\" or \"shar\". See `mh-store-msg' for a description of DIRECTORY." (interactive (list (let ((udir (or mh-store-default-directory default-directory))) (read-directory-name "Store buffer in directory: " udir udir nil)))) (let ((store-directory (expand-file-name directory)) (sh-start (save-excursion (goto-char (point-min)) (if (re-search-forward "^#![ \t]*/bin/sh\\|^#\\|^: " nil t) (progn ;; The "cut here" pattern was removed from above ;; because it seemed to hurt more than help. ;; But keep this to make it easier to put it back. (if (looking-at "^[^a-z0-9\"]*cut here\\b") (forward-line 1)) (beginning-of-line) (if (looking-at "^[#:]....+\n\\( ?\n\\)?end$") nil ;most likely end of a uuencode (point)))))) (command "sh") (uudecode-filename "(unknown filename)") log-begin) (if (not sh-start) (save-excursion (goto-char (point-min)) (if (re-search-forward "^begin [0-7]+ " nil t) (setq uudecode-filename (buffer-substring (point) (progn (end-of-line) (point))))))) (with-current-buffer (get-buffer-create mh-log-buffer) (setq log-begin (mh-truncate-log-buffer)) (if (not (file-directory-p store-directory)) (progn (insert "mkdir " directory "\n") (call-process "mkdir" nil mh-log-buffer t store-directory))) (insert "cd " directory "\n") (setq mh-store-default-directory directory) (if (not sh-start) (progn (setq command "uudecode") (insert uudecode-filename " being uudecoded...\n")))) (set-window-start (display-buffer mh-log-buffer) log-begin) ;watch progress (let ((default-directory (file-name-as-directory store-directory))) (if (equal (call-process-region sh-start (point-max) command nil mh-log-buffer t) 0) (with-current-buffer mh-log-buffer (insert "\n(mh-store finished)\n")) (error "Error occurred during execution of %s" command))))) ;;;###mh-autoload (defun mh-undo-folder (&rest ignored) "Undo all refiles and deletes in the current folder. Arguments are IGNORED (for `revert-buffer')." (interactive) (cond ((or mh-do-not-confirm-flag (yes-or-no-p "Undo all commands in folder? ")) (setq mh-delete-list nil mh-refile-list nil mh-seq-list nil mh-next-direction 'forward) (with-mh-folder-updating (nil) (mh-remove-all-notation))) (t (message "Commands not undone")))) (provide 'mh-funcs) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-funcs.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-comp.el0000644000175000000620000014251612114520723017314 0ustar wohlerstaff;;; mh-comp.el --- MH-E functions for composing and sending messages ;; Copyright (C) 1993, 1995, 1997, 2000-2013 Free Software Foundation, ;; Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; This file includes the functions in the MH-Folder maps that get us ;; into MH-Letter mode, as well the functions in the MH-Letter mode ;; that are used to send the mail. Other that those, functions that ;; are needed in mh-letter.el should be found there. ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-gnus) ;needed because mh-gnus.el not compiled (require 'mh-scan) (require 'sendmail) (autoload 'easy-menu-add "easymenu") (autoload 'mml-insert-tag "mml") ;;; Site Customization (defvar mh-send-prog "send" "Name of the MH send program. Some sites need to change this because of a name conflict.") (defvar mh-send-uses-spost-flag nil "Non-nil means \"send\" uses \"spost\" to submit messages. If the value of \"postproc:\" is \"spost\", you may need to set this variable to t to tell MH-E to avoid using features of \"post\" that are not supported by \"spost\". You'll know that you'll need to do this if sending mail fails with an error of \"spost: -msgid unknown\".") (defvar mh-redist-background nil "If non-nil redist will be done in background like send. This allows transaction log to be visible if -watch, -verbose or -snoop are used.") ;;; Variables (defvar mh-comp-formfile "components" "Name of file to be used as a skeleton for composing messages. Default is \"components\". If not an absolute file name, the file is searched for first in the user's MH directory, then in the system MH lib directory.") (defvar mh-repl-formfile "replcomps" "Name of file to be used as a skeleton for replying to messages. Default is \"replcomps\". If not an absolute file name, the file is searched for first in the user's MH directory, then in the system MH lib directory.") (defvar mh-repl-group-formfile "replgroupcomps" "Name of file to be used as a skeleton for replying to messages. Default is \"replgroupcomps\". This file is used to form replies to the sender and all recipients of a message. Only used if `(mh-variant-p 'nmh)' is non-nil. If not an absolute file name, the file is searched for first in the user's MH directory, then in the system MH lib directory.") (defvar mh-rejected-letter-start (format "^%s$" (regexp-opt '("Content-Type: message/rfc822" ;MIME MDN "------ This is a copy of the message, including all the headers. ------";from exim "--- Below this line is a copy of the message."; from qmail " ----- Unsent message follows -----" ;from sendmail V5 " --------Unsent Message below:" ; from sendmail at BU " ----- Original message follows -----" ;from sendmail V8 "------- Unsent Draft" ;from MH itself "---------- Original Message ----------" ;from zmailer " --- The unsent message follows ---" ;from AIX mail system " Your message follows:" ;from MMDF-II "Content-Description: Returned Content" ;1993 KJ sendmail )))) (defvar mh-new-draft-cleaned-headers "^Date:\\|^Received:\\|^Message-Id:\\|^From:\\|^Sender:\\|^Errors-To:\\|^Delivery-Date:\\|^Return-Path:" "Regexp of header lines to remove before offering a message as a new draft\\. Used by the \\[mh-edit-again] and \\[mh-extract-rejected-mail] commands.") (defvar mh-letter-mode-syntax-table (let ((syntax-table (make-syntax-table text-mode-syntax-table))) (modify-syntax-entry ?% "." syntax-table) syntax-table) "Syntax table used by MH-E while in MH-Letter mode.") (defvar mh-regexp-in-field-syntax-table nil "Specify a syntax table for `mh-regexp-in-field-p' to use.") (defvar mh-fcc-syntax-table (let ((syntax-table (make-syntax-table text-mode-syntax-table))) (modify-syntax-entry ?+ "w" syntax-table) (modify-syntax-entry ?/ "w" syntax-table) syntax-table) "Syntax table used by MH-E while searching an Fcc field.") (defvar mh-addr-syntax-table (let ((syntax-table (make-syntax-table text-mode-syntax-table))) (modify-syntax-entry ?! "w" syntax-table) (modify-syntax-entry ?# "w" syntax-table) (modify-syntax-entry ?$ "w" syntax-table) (modify-syntax-entry ?% "w" syntax-table) (modify-syntax-entry ?& "w" syntax-table) (modify-syntax-entry ?' "w" syntax-table) (modify-syntax-entry ?* "w" syntax-table) (modify-syntax-entry ?+ "w" syntax-table) (modify-syntax-entry ?- "w" syntax-table) (modify-syntax-entry ?/ "w" syntax-table) (modify-syntax-entry ?= "w" syntax-table) (modify-syntax-entry ?? "w" syntax-table) (modify-syntax-entry ?^ "w" syntax-table) (modify-syntax-entry ?_ "w" syntax-table) (modify-syntax-entry ?` "w" syntax-table) (modify-syntax-entry ?{ "w" syntax-table) (modify-syntax-entry ?| "w" syntax-table) (modify-syntax-entry ?} "w" syntax-table) (modify-syntax-entry ?~ "w" syntax-table) (modify-syntax-entry ?. "w" syntax-table) (modify-syntax-entry ?@ "w" syntax-table) syntax-table) "Syntax table used by MH-E while searching an address field.") (defvar mh-send-args "" "Extra args to pass to \"send\" command.") (defvar mh-annotate-char nil "Character to use to annotate `mh-sent-from-msg'.") (defvar mh-annotate-field nil "Field name for message annotation.") (defvar mh-annotate-list nil "Messages annotated, either a sequence name or a list of message numbers. This variable can be used by `mh-annotate-msg-hook'.") (defvar mh-insert-auto-fields-done-local nil "Buffer-local variable set when `mh-insert-auto-fields' called successfully.") (make-variable-buffer-local 'mh-insert-auto-fields-done-local) ;;; MH-E Entry Points ;;;###autoload (defun mh-smail () "Compose a message with the MH mail system. See `mh-send' for more details on composing mail." (interactive) (mh-find-path) (call-interactively 'mh-send)) ;;;###autoload (defun mh-smail-other-window () "Compose a message with the MH mail system in other window. See `mh-send' for more details on composing mail." (interactive) (mh-find-path) (call-interactively 'mh-send-other-window)) (defun mh-send-other-window (to cc subject) "Compose a message in another window. See `mh-send' for more information and a description of how the TO, CC, and SUBJECT arguments are used." (interactive (list (mh-interactive-read-address "To: ") (mh-interactive-read-address "Cc: ") (mh-interactive-read-string "Subject: "))) (let ((pop-up-windows t)) (mh-send-sub to cc subject (current-window-configuration)))) (defvar mh-error-if-no-draft nil) ;raise error over using old draft ;;;###autoload (defun mh-smail-batch (&optional to subject other-headers &rest ignored) "Compose a message with the MH mail system. This function does not prompt the user for any header fields, and thus is suitable for use by programs that want to create a mail buffer. Users should use \\[mh-smail] to compose mail. Optional arguments for setting certain fields include TO, SUBJECT, and OTHER-HEADERS. Additional arguments are IGNORED. This function remains for Emacs 21 compatibility. New applications should use `mh-user-agent-compose'." (mh-find-path) (let ((mh-error-if-no-draft t)) (mh-send (or to "") "" (or subject "")))) ;;;###autoload (define-mail-user-agent 'mh-e-user-agent 'mh-user-agent-compose 'mh-send-letter 'mh-fully-kill-draft 'mh-before-send-letter-hook) ;;;###autoload (defun mh-user-agent-compose (&optional to subject other-headers continue switch-function yank-action send-actions return-action &rest ignored) "Set up mail composition draft with the MH mail system. This is the `mail-user-agent' entry point to MH-E. This function conforms to the contract specified by `define-mail-user-agent' which means that this function should accept the same arguments as `compose-mail'. The optional arguments TO and SUBJECT specify recipients and the initial Subject field, respectively. OTHER-HEADERS is an alist specifying additional header fields. Elements look like (HEADER . VALUE) where both HEADER and VALUE are strings. CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and RETURN-ACTION and any additional arguments are IGNORED." (mh-find-path) (let ((mh-error-if-no-draft t)) (mh-send to "" subject) (while other-headers (mh-insert-fields (concat (car (car other-headers)) ":") (cdr (car other-headers))) (setq other-headers (cdr other-headers))))) ;; Shush compiler. (mh-do-in-xemacs (defvar sendmail-coding-system)) ;;;###autoload (defun mh-send-letter (&optional arg) "Save draft and send message. When you are all through editing a message, you send it with this command. You can give a prefix argument ARG to monitor the first stage of the delivery\; this output can be found in a buffer called \"*MH-E Mail Delivery*\". The hook `mh-before-send-letter-hook' is run at the beginning of this command. For example, if you want to check your spelling in your message before sending, add the function `ispell-message'. Unless `mh-insert-auto-fields' had previously been called manually, the function `mh-insert-auto-fields' is called to insert fields based upon the recipients. If fields are added, you are given a chance to see and to confirm these fields before the message is actually sent. You can do away with this confirmation by turning off the option `mh-auto-fields-prompt-flag'. In case the MH \"send\" program is installed under a different name, use `mh-send-prog' to tell MH-E the name. The hook `mh-annotate-msg-hook' is run after annotating the message and scan line." (interactive "P") (run-hooks 'mh-before-send-letter-hook) (if (and (mh-insert-auto-fields t) mh-auto-fields-prompt-flag (goto-char (point-min))) (if (not (y-or-n-p "Auto fields inserted, send? ")) (error "Send aborted"))) (cond ((mh-mh-directive-present-p) (mh-mh-to-mime)) ((or (mh-mml-tag-present-p) (not (mh-ascii-buffer-p))) (mh-mml-to-mime))) (save-buffer) (message "Sending...") (let ((draft-buffer (current-buffer)) (file-name buffer-file-name) (config mh-previous-window-config) (coding-system-for-write (if (and (local-variable-p 'buffer-file-coding-system (current-buffer)) ;XEmacs needs two args ;; We're not sure why, but buffer-file-coding-system ;; tends to get set to undecided-unix. (not (memq buffer-file-coding-system '(undecided undecided-unix undecided-dos)))) buffer-file-coding-system (or (and (boundp 'sendmail-coding-system) sendmail-coding-system) (and (default-boundp 'buffer-file-coding-system) (default-value 'buffer-file-coding-system)) 'iso-latin-1)))) ;; Older versions of spost do not support -msgid and -mime. (unless mh-send-uses-spost-flag ;; Adding a Message-ID field looks good, makes it easier to search for ;; message in your +outbox, and best of all doesn't break threading for ;; the recipient if you reply to a message in your +outbox. (setq mh-send-args (concat "-msgid " mh-send-args)) ;; The default BCC encapsulation will make a MIME message unreadable. ;; With nmh use the -mime arg to prevent this. (if (and (mh-variant-p 'nmh) (mh-goto-header-field "Bcc:") (mh-goto-header-field "Content-Type:")) (setq mh-send-args (concat "-mime " mh-send-args)))) (cond (arg (pop-to-buffer mh-mail-delivery-buffer) (erase-buffer) (mh-exec-cmd-output mh-send-prog t "-nodraftfolder" "-watch" "-nopush" (split-string mh-send-args) file-name) (goto-char (point-max)) ; show the interesting part (recenter -1) (set-buffer draft-buffer)) ; for annotation below (t (mh-exec-cmd-daemon mh-send-prog nil "-nodraftfolder" "-noverbose" (split-string mh-send-args) file-name))) (if mh-annotate-char (mh-annotate-msg mh-sent-from-msg mh-sent-from-folder mh-annotate-char "-component" mh-annotate-field "-text" (format "\"%s %s\"" (mh-get-header-field "To:") (mh-get-header-field "Cc:")))) (cond ((or (not arg) (y-or-n-p "Kill draft buffer? ")) (kill-buffer draft-buffer) (if config (set-window-configuration config)))) (if arg (message "Sending...done") (message "Sending...backgrounded")))) ;;;###autoload (defun mh-fully-kill-draft () "Quit editing and delete draft message. If for some reason you are not happy with the draft, you can use this command to kill the draft buffer and delete the draft message. Use the command \\[kill-buffer] if you don't want to delete the draft message." (interactive) (if (y-or-n-p "Kill draft message? ") (let ((config mh-previous-window-config)) (if (file-exists-p buffer-file-name) (delete-file buffer-file-name)) (set-buffer-modified-p nil) (kill-buffer (buffer-name)) (message "") (if config (set-window-configuration config))) (error "Message not killed"))) ;;; MH-Folder Commands ;; Alphabetical. ;;;###mh-autoload (defun mh-edit-again (message) "Edit a MESSAGE to send it again. If you don't complete a draft for one reason or another, and if the draft buffer is no longer available, you can pick your draft up again with this command. If you don't use a draft folder, your last \"draft\" file will be used. If you use draft folders, you'll need to visit the draft folder with \"\\[mh-visit-folder] drafts \", use \\[mh-next-undeleted-msg] to move to the appropriate message, and then use \\[mh-edit-again] to prepare the message for editing. This command can also be used to take messages that were sent to you and to send them to more people. Don't use this command to re-edit a message from a Mailer-Daemon who complained that your mail wasn't posted for some reason or another (see `mh-extract-rejected-mail'). The default message is the current message. See also `mh-send'." (interactive (list (mh-get-msg-num t))) (let* ((from-folder mh-current-folder) (config (current-window-configuration)) (draft (cond ((and mh-draft-folder (equal from-folder mh-draft-folder)) (pop-to-buffer (find-file-noselect (mh-msg-filename message)) t) (rename-buffer (format "draft-%d" message)) ;; Make buffer writable... (setq buffer-read-only nil) ;; If buffer was being used to display the message reinsert ;; from file... (when (eq major-mode 'mh-show-mode) (erase-buffer) (insert-file-contents buffer-file-name)) (buffer-name)) (t (mh-read-draft "clean-up" (mh-msg-filename message) nil))))) (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil) (mh-insert-header-separator) ;; Merge in components (mh-mapc (function (lambda (header-field) (let ((field (car header-field)) (value (cdr header-field)) (case-fold-search t)) (cond ;; Address field ((string-match field "^To$\\|^Cc$\\|^From$") (cond ((not (mh-goto-header-field (concat field ":"))) ;; Header field does not exist, add it (mh-goto-header-end 0) (insert field ": " value "\n")) ((string-equal value "") ;; Header field already exists and no value ) (t ;; Header field exists and we have a value (let (address mailbox (alias (mh-alias-expand value))) (and alias (setq address (ietf-drums-parse-address alias)) (setq mailbox (car address))) ;; XXX - Need to parse all addresses out of field (if (and (not (mh-regexp-in-field-p (concat "\\b" (regexp-quote value) "\\b") field)) mailbox (not (mh-regexp-in-field-p (concat "\\b" (regexp-quote mailbox) "\\b") field))) (insert " " value ",")) )))) ((string-match field "^Fcc$") ;; Folder reference (mh-modify-header-field field value)) ;; Text field, that's an easy case (t (mh-modify-header-field field value)))))) (mh-components-to-list (mh-find-components))) (goto-char (point-min)) (save-buffer) (mh-compose-and-send-mail draft "" from-folder nil nil nil nil nil nil config) (mh-letter-mode-message) (mh-letter-adjust-point))) (defun mh-extract-header-field () "Extract field name and field value from the field at point. Returns a list of field name and value (which may be null)." (let ((end (save-excursion (mh-header-field-end) (point)))) (if (looking-at mh-letter-header-field-regexp) (save-excursion (goto-char (match-end 1)) (forward-char 1) (skip-chars-forward " \t") (cons (match-string-no-properties 1) (buffer-substring-no-properties (point) end)))))) (defun mh-components-to-list (components) "Convert the COMPONENTS file to a list of field names and values." (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (insert-file-contents components) (goto-char (point-min)) (let ((header-fields nil)) (while (mh-in-header-p) (setq header-fields (append header-fields (list (mh-extract-header-field)))) (mh-header-field-end) (forward-char 1) ) header-fields))) ;;;###mh-autoload (defun mh-extract-rejected-mail (message) "Edit a MESSAGE that was returned by the mail system. This command prepares the message for editing by removing the Mailer-Daemon envelope and unneeded header fields. Fix whatever addressing problem you had, and send the message again with \\[mh-send-letter]. The default message is the current message. See also `mh-send'." (interactive (list (mh-get-msg-num t))) (let ((from-folder mh-current-folder) (config (current-window-configuration)) (draft (mh-read-draft "extraction" (mh-msg-filename message) nil))) (goto-char (point-min)) (cond ((re-search-forward mh-rejected-letter-start nil t) (skip-chars-forward " \t\n") (delete-region (point-min) (point)) (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)) (t (message "Does not appear to be a rejected letter"))) (mh-insert-header-separator) (goto-char (point-min)) (save-buffer) (mh-compose-and-send-mail draft "" from-folder message (mh-get-header-field "To:") (mh-get-header-field "From:") (mh-get-header-field "Cc:") nil nil config) (mh-letter-mode-message))) ;;;###mh-autoload (defun mh-forward (to cc &optional range) "Forward message. You are prompted for the TO and CC recipients. You are given a draft to edit that looks like it would if you had run the MH command \"forw\". You can then add some text. You can forward several messages by using a RANGE. All of the messages in the range are inserted into your draft. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. The hook `mh-forward-hook' is called on the draft. See also `mh-compose-forward-as-mime-flag', `mh-forward-subject-format', and `mh-send'." (interactive (list (mh-interactive-read-address "To: ") (mh-interactive-read-address "Cc: ") (mh-interactive-range "Forward"))) (let* ((folder mh-current-folder) (msgs (mh-range-to-msg-list range)) (config (current-window-configuration)) (fwd-msg-file (mh-msg-filename (car msgs) folder)) ;; forw always leaves file in "draft" since it doesn't have -draft (draft-name (expand-file-name "draft" mh-user-path)) (draft (cond ((or (not (file-exists-p draft-name)) (y-or-n-p "The file draft exists; discard it? ")) (mh-exec-cmd "forw" "-build" (if (and (mh-variant-p 'nmh) mh-compose-forward-as-mime-flag) "-mime") mh-current-folder (mh-coalesce-msg-list msgs)) (prog1 (mh-read-draft "" draft-name t) (mh-insert-fields "To:" to "Cc:" cc) (save-buffer))) (t (mh-read-draft "" draft-name nil))))) (let (orig-from orig-subject) (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (insert-file-contents fwd-msg-file) (setq orig-from (mh-get-header-field "From:")) (setq orig-subject (mh-get-header-field "Subject:"))) (let ((forw-subject (mh-forwarded-letter-subject orig-from orig-subject))) (mh-insert-fields "Subject:" forw-subject) (goto-char (point-min)) ;; Set the local value of mh-mail-header-separator according to what is ;; present in the buffer... (set (make-local-variable 'mh-mail-header-separator) (save-excursion (goto-char (mh-mail-header-end)) (buffer-substring-no-properties (point) (mh-line-end-position)))) (set (make-local-variable 'mail-header-separator) mh-mail-header-separator) ;override sendmail.el ;; If using MML, translate MH-style directive (if (equal mh-compose-insertion 'mml) (save-excursion (goto-char (mh-mail-header-end)) (while (re-search-forward "^#forw \\[\\([^]]+\\)\\] \\(+\\S-+\\) \\(.*\\)$" (point-max) t) (let ((description (if (equal (match-string 1) "forwarded messages") "forwarded message %d" (match-string 1))) (msgs (split-string (match-string 3))) (i 0)) (beginning-of-line) (delete-region (point) (progn (forward-line 1) (point))) (dolist (msg msgs) (setq i (1+ i)) (mh-mml-forward-message (format description i) folder msg) ;; Was inserted before us, move to end of file to preserve order (goto-char (point-max))))))) ;; Position just before forwarded message. (if (re-search-forward "^------- Forwarded Message" nil t) (forward-line -1) (goto-char (mh-mail-header-end)) (forward-line 1)) (delete-other-windows) (mh-add-msgs-to-seq msgs 'forwarded t) (mh-compose-and-send-mail draft "" folder msgs to forw-subject cc mh-note-forw "Forwarded:" config) (mh-letter-mode-message) (mh-letter-adjust-point) (run-hooks 'mh-forward-hook))))) (defun mh-forwarded-letter-subject (from subject) "Return a Subject suitable for a forwarded message. Original message has headers FROM and SUBJECT." (let ((addr-start (string-match "<" from)) (comment (string-match "(" from))) (cond ((and addr-start (> addr-start 0)) ;; Full Name (setq from (substring from 0 (1- addr-start)))) (comment ;; luser@host (Full Name) (setq from (substring from (1+ comment) (1- (length from))))))) (format mh-forward-subject-format from subject)) ;;;###mh-autoload (defun mh-redistribute (to cc &optional message) "Redistribute a message. This command is similar in function to forwarding mail, but it does not allow you to edit the message, nor does it add your name to the \"From\" header field. It appears to the recipient as if the message had come from the original sender. When you run this command, you are prompted for the TO and CC recipients. The default MESSAGE is the current message. Also investigate the command \\[mh-edit-again] for another way to redistribute messages. See also `mh-redist-full-contents-flag'. The hook `mh-annotate-msg-hook' is run after annotating the message and scan line." (interactive (list (mh-read-address "Redist-To: ") (mh-read-address "Redist-Cc: ") (mh-get-msg-num t))) (or message (setq message (mh-get-msg-num t))) (save-window-excursion (let ((folder mh-current-folder) (draft (mh-read-draft "redistribution" (if mh-redist-full-contents-flag (mh-msg-filename message) nil) nil))) (mh-goto-header-end 0) (insert "Resent-To: " to "\n") (if (not (equal cc "")) (insert "Resent-cc: " cc "\n")) (mh-clean-msg-header (point-min) "^Message-Id:\\|^Received:\\|^Return-Path:\\|^Sender:\\|^Date:\\|^From:" nil) (save-buffer) (message "Redistributing...") (let ((env "mhdist=1")) ;; Setup environment... (setq env (concat env " mhaltmsg=" (if mh-redist-full-contents-flag buffer-file-name (mh-msg-filename message folder)))) (unless mh-redist-full-contents-flag (setq env (concat env " mhannotate=1"))) ;; Redistribute... (if mh-redist-background (mh-exec-cmd-env-daemon env mh-send-prog nil buffer-file-name) (mh-exec-cmd-error env mh-send-prog "-push" buffer-file-name)) ;; Annotate... (mh-annotate-msg message folder mh-note-dist "-component" "Resent:" "-text" (format "\"%s %s\"" to cc))) (kill-buffer draft) (message "Redistributing...done")))) ;;;###mh-autoload (defun mh-reply (message &optional reply-to includep) "Reply to a MESSAGE. When you reply to a message, you are first prompted with \"Reply to whom?\" (unless the optional argument REPLY-TO is provided). You have several choices here. Response Reply Goes To from The person who sent the message. This is the default, so is sufficient. to Replies to the sender, plus all recipients in the \"To:\" header field. all cc Forms a reply to the addresses in the \"Mail-Followup-To:\" header field if one exists; otherwise forms a reply to the sender, plus all recipients. Depending on your answer, \"repl\" is given a different argument to form your reply. Specifically, a choice of \"from\" or none at all runs \"repl -nocc all\", and a choice of \"to\" runs \"repl -cc to\". Finally, either \"cc\" or \"all\" runs \"repl -cc all -nocc me\". Two windows are then created. One window contains the message to which you are replying in an MH-Show buffer. Your draft, in MH-Letter mode (*note `mh-letter-mode'), is in the other window. If the reply draft was not one that you expected, check the things that affect the behavior of \"repl\" which include the \"repl:\" profile component and the \"replcomps\" and \"replgroupcomps\" files. If you supply a prefix argument INCLUDEP, the message you are replying to is inserted in your reply after having first been run through \"mhl\" with the format file \"mhl.reply\". Alternatively, you can customize the option `mh-yank-behavior' and choose one of its \"Automatically\" variants to do the same thing. If you do so, the prefix argument has no effect. Another way to include the message automatically in your draft is to use \"repl: -filter repl.filter\" in your MH profile. If you wish to customize the header or other parts of the reply draft, please see \"repl\" and \"mh-format\". See also `mh-reply-show-message-flag', `mh-reply-default-reply-to', and `mh-send'." (interactive (list (mh-get-msg-num t) (let ((minibuffer-help-form "from => Sender only\nto => Sender and primary recipients\ncc or all => Sender and all recipients")) (or mh-reply-default-reply-to (completing-read "Reply to whom (default from): " '(("from") ("to") ("cc") ("all")) nil t))) current-prefix-arg)) (let* ((folder mh-current-folder) (show-buffer mh-show-buffer) (config (current-window-configuration)) (group-reply (or (equal reply-to "cc") (equal reply-to "all"))) (form-file (cond ((and (mh-variant-p 'nmh 'gnu-mh) group-reply (stringp mh-repl-group-formfile)) mh-repl-group-formfile) ((stringp mh-repl-formfile) mh-repl-formfile) (t nil)))) (message "Composing a reply...") (mh-exec-cmd "repl" "-build" "-noquery" "-nodraftfolder" (if form-file (list "-form" form-file)) mh-current-folder message (cond ((or (equal reply-to "from") (equal reply-to "")) '("-nocc" "all")) ((equal reply-to "to") '("-cc" "to")) (group-reply (if (mh-variant-p 'nmh 'gnu-mh) '("-group" "-nocc" "me") '("-cc" "all" "-nocc" "me")))) (cond ((or (eq mh-yank-behavior 'autosupercite) (eq mh-yank-behavior 'autoattrib)) '("-noformat")) (includep '("-filter" "mhl.reply")) (t '()))) (let ((draft (mh-read-draft "reply" (expand-file-name "reply" mh-user-path) t))) (delete-other-windows) (save-buffer) (let ((to (mh-get-header-field "To:")) (subject (mh-get-header-field "Subject:")) (cc (mh-get-header-field "Cc:"))) (goto-char (point-min)) (mh-goto-header-end 1) (or includep (not mh-reply-show-message-flag) (mh-in-show-buffer (show-buffer) (mh-display-msg message folder))) (mh-add-msgs-to-seq message 'answered t) (message "Composing a reply...done") (mh-compose-and-send-mail draft "" folder message to subject cc mh-note-repl "Replied:" config)) (when (and (or (eq 'autosupercite mh-yank-behavior) (eq 'autoattrib mh-yank-behavior)) (eq (mh-show-buffer-message-number) mh-sent-from-msg)) (undo-boundary) (mh-yank-cur-msg)) (mh-letter-mode-message)))) ;;;###mh-autoload (defun mh-send (to cc subject) "Compose a message. Your letter appears in an Emacs buffer whose mode is MH-Letter (see `mh-letter-mode'). The arguments TO, CC, and SUBJECT can be used to prefill the draft fields or suppress the prompts if `mh-compose-prompt-flag' is on. They are also passed to the function set in the option `mh-compose-letter-function'. See also `mh-insert-x-mailer-flag' and `mh-letter-mode-hook'. Outside of an MH-Folder buffer (`mh-folder-mode'), you must call either \\[mh-smail] or \\[mh-smail-other-window] to compose a new message." (interactive (list (mh-interactive-read-address "To: ") (mh-interactive-read-address "Cc: ") (mh-interactive-read-string "Subject: "))) (let ((config (current-window-configuration))) (delete-other-windows) (mh-send-sub to cc subject config))) ;;; Support Routines (defun mh-interactive-read-address (prompt) "Read an address. If `mh-compose-prompt-flag' is non-nil, then read an address with PROMPT. Otherwise return the empty string." (if mh-compose-prompt-flag (mh-read-address prompt) "")) (defun mh-interactive-read-string (prompt) "Read a string. If `mh-compose-prompt-flag' is non-nil, then read a string with PROMPT. Otherwise return the empty string." (if mh-compose-prompt-flag (read-string prompt) "")) ;;;###mh-autoload (defun mh-show-buffer-message-number (&optional buffer) "Message number of displayed message in corresponding show buffer. Return nil if show buffer not displayed. If in `mh-letter-mode', don't display the message number being replied to, but rather the message number of the show buffer associated with our originating folder buffer. Optional argument BUFFER can be used to specify the buffer." (save-excursion (if buffer (set-buffer buffer)) (cond ((eq major-mode 'mh-show-mode) (let ((number-start (mh-search-from-end ?/ buffer-file-name))) (string-to-number (substring buffer-file-name (1+ number-start))))) ((and (eq major-mode 'mh-folder-mode) mh-show-buffer (get-buffer mh-show-buffer)) (mh-show-buffer-message-number mh-show-buffer)) ((and (eq major-mode 'mh-letter-mode) mh-sent-from-folder (get-buffer mh-sent-from-folder)) (mh-show-buffer-message-number mh-sent-from-folder)) (t nil)))) (defun mh-find-components () "Return the path to the components file." (let (components) (cond ((file-exists-p (setq components (expand-file-name mh-comp-formfile mh-user-path))) components) ((file-exists-p (setq components (expand-file-name mh-comp-formfile mh-lib))) components) (t (error "Can't find %s in %s or %s" mh-comp-formfile mh-user-path mh-lib))))) (defun mh-send-sub (to cc subject config) "Do the real work of composing and sending a letter. Expects the TO, CC, and SUBJECT fields as arguments. CONFIG is the window configuration before sending mail." (let ((folder mh-current-folder) (msg-num (mh-get-msg-num nil))) (message "Composing a message...") (let ((draft (mh-read-draft "message" (mh-find-components) nil))) (mh-insert-fields "To:" to "Subject:" subject "Cc:" cc) (goto-char (point-max)) (mh-compose-and-send-mail draft "" folder msg-num to subject cc nil nil config) (mh-letter-mode-message) (mh-letter-adjust-point)))) (defun mh-read-draft (use initial-contents delete-contents-file) "Read draft file into a draft buffer and make that buffer the current one. USE is a message used for prompting about the intended use of the message. INITIAL-CONTENTS is filename that is read into an empty buffer, or nil if buffer should not be modified. Delete the initial-contents file if DELETE-CONTENTS-FILE flag is set. Returns the draft folder's name. If the draft folder facility is enabled in ~/.mh_profile, a new buffer is used each time and saved in the draft folder. The draft file can then be reused." (cond (mh-draft-folder (let ((orig-default-dir default-directory) (draft-file-name (mh-new-draft-name))) (pop-to-buffer (generate-new-buffer (format "draft-%s" (file-name-nondirectory draft-file-name)))) (condition-case () (insert-file-contents draft-file-name t) (file-error)) (setq default-directory orig-default-dir))) (t (let ((draft-name (expand-file-name "draft" mh-user-path))) (pop-to-buffer "draft") ; Create if necessary (if (buffer-modified-p) (if (y-or-n-p "Draft has been modified; kill anyway? ") (set-buffer-modified-p nil) (error "Draft preserved"))) (setq buffer-file-name draft-name) (clear-visited-file-modtime) (unlock-buffer) (cond ((and (file-exists-p draft-name) (not (equal draft-name initial-contents))) (insert-file-contents draft-name) (delete-file draft-name)))))) (cond ((and initial-contents (or (zerop (buffer-size)) (if (y-or-n-p (format "A draft exists. Use for %s? " use)) (if mh-error-if-no-draft (error "A prior draft exists")) t))) (erase-buffer) (insert-file-contents initial-contents) (if delete-contents-file (delete-file initial-contents)))) (auto-save-mode 1) (if mh-draft-folder (save-buffer)) ; Do not reuse draft name (buffer-name)) (defun mh-new-draft-name () "Return the pathname of folder for draft messages." (save-excursion (mh-exec-cmd-quiet t "mhpath" mh-draft-folder "new") (buffer-substring (point-min) (1- (point-max))))) (defun mh-insert-fields (&rest name-values) "Insert the NAME-VALUES pairs in the current buffer. If the field exists, append the value to it. Do not insert any pairs whose value is the empty string." (let ((case-fold-search t)) (while name-values (let ((field-name (car name-values)) (value (car (cdr name-values)))) (if (not (string-match "^.*:$" field-name)) (setq field-name (concat field-name ":"))) (cond ((or (null value) (equal value "")) nil) ((mh-position-on-field field-name) (insert " " (or value ""))) (t (insert field-name " " value "\n"))) (setq name-values (cdr (cdr name-values))))))) (defun mh-compose-and-send-mail (draft send-args sent-from-folder sent-from-msg to subject cc annotate-char annotate-field config) "Edit and compose a draft message in buffer DRAFT and send or save it. SEND-ARGS is the argument passed to the send command. SENT-FROM-FOLDER is buffer containing scan listing of current folder, or nil if none exists. SENT-FROM-MSG is the message number or sequence name or nil. The TO, SUBJECT, and CC fields are passed to the `mh-compose-letter-function'. If ANNOTATE-CHAR is non-null, it is used to notate the scan listing of the message. In that case, the ANNOTATE-FIELD is used to build a string for `mh-annotate-msg'. CONFIG is the window configuration to restore after sending the letter." (pop-to-buffer draft) (mh-letter-mode) ;; Insert identity. (mh-insert-identity mh-identity-default t) (mh-identity-make-menu) (mh-identity-add-menu) ;; Cleanup possibly RFC2047 encoded subject header (mh-decode-message-subject) ;; Insert extra fields. (mh-insert-x-mailer) (mh-insert-x-face) (mh-letter-hide-all-skipped-fields) (setq mh-sent-from-folder sent-from-folder) (setq mh-sent-from-msg sent-from-msg) (setq mh-send-args send-args) (setq mh-annotate-char annotate-char) (setq mh-annotate-field annotate-field) (setq mh-previous-window-config config) (setq mode-line-buffer-identification (list " {%b}")) (mh-logo-display) (mh-make-local-hook 'kill-buffer-hook) (add-hook 'kill-buffer-hook 'mh-tidy-draft-buffer nil t) (run-hook-with-args 'mh-compose-letter-function to subject cc)) (defun mh-insert-x-mailer () "Append an X-Mailer field to the header. The versions of MH-E, Emacs, and MH are shown." ;; Lazily initialize mh-x-mailer-string. (when (and mh-insert-x-mailer-flag (null mh-x-mailer-string)) (setq mh-x-mailer-string (format "MH-E %s; %s; %sEmacs %s" mh-version mh-variant-in-use (if (featurep 'xemacs) "X" "GNU ") (cond ((not (featurep 'xemacs)) (string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?" emacs-version) (match-string 0 emacs-version)) ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?" emacs-version) (match-string 0 emacs-version)) (t (format "%s.%s" emacs-major-version emacs-minor-version)))))) ;; Insert X-Mailer, but only if it doesn't already exist. (save-excursion (when (and mh-insert-x-mailer-flag (null (mh-goto-header-field "X-Mailer"))) (mh-insert-fields "X-Mailer:" mh-x-mailer-string)))) (defun mh-insert-x-face () "Append X-Face, Face or X-Image-URL field to header. If the field already exists, this function does nothing." (when (and (file-exists-p mh-x-face-file) (file-readable-p mh-x-face-file)) (save-excursion (unless (or (mh-position-on-field "X-Face") (mh-position-on-field "Face") (mh-position-on-field "X-Image-URL")) (save-excursion (goto-char (+ (point) (cadr (insert-file-contents mh-x-face-file)))) (if (not (looking-at "^")) (insert "\n"))) (unless (looking-at "\\(X-Face\\|Face\\|X-Image-URL\\): ") (insert "X-Face: ")))))) (defun mh-tidy-draft-buffer () "Run when a draft buffer is destroyed." (let ((buffer (get-buffer mh-recipients-buffer))) (if buffer (kill-buffer buffer)))) (defun mh-letter-mode-message () "Display a help message for users of `mh-letter-mode'. This should be the last function called when composing the draft." (message "%s" (substitute-command-keys (concat "Type \\[mh-send-letter] to send message, " "\\[mh-help] for help")))) (defun mh-letter-adjust-point () "Move cursor to first header field if are using the no prompt mode." (unless mh-compose-prompt-flag (goto-char (point-max)) (mh-letter-next-header-field))) (defun mh-annotate-msg (msg folder note &rest args) "Mark MSG in FOLDER with character NOTE and annotate message with ARGS. MSG can be a message number, a list of message numbers, or a sequence. The hook `mh-annotate-msg-hook' is run after annotating; see its documentation for variables it can use." (apply 'mh-exec-cmd "anno" folder (if (listp msg) (append msg args) (cons msg args))) (save-excursion (cond ((get-buffer folder) ; Buffer may be deleted (set-buffer folder) (mh-iterate-on-range nil msg (mh-notate nil note (+ mh-cmd-note mh-scan-field-destination-offset)))))) (let ((mh-current-folder folder) ;; mh-annotate-list is a sequence name or a list of message numbers (mh-annotate-list (if (numberp msg) (list msg) msg))) (run-hooks 'mh-annotate-msg-hook))) (defun mh-insert-header-separator () "Insert `mh-mail-header-separator', if absent." (save-excursion (goto-char (point-min)) (rfc822-goto-eoh) (if (looking-at "$") (insert mh-mail-header-separator)))) ;;;###mh-autoload (defun mh-insert-auto-fields (&optional non-interactive) "Insert custom fields if recipient is found in `mh-auto-fields-list'. Once the header contains one or more recipients, you may run this command to insert these fields manually. However, if you use this command, the automatic insertion when the message is sent is disabled. In a program, set buffer-local `mh-insert-auto-fields-done-local' if header fields were added. If NON-INTERACTIVE is non-nil, perform actions quietly and only if `mh-insert-auto-fields-done-local' is nil. Return t if fields added; otherwise return nil." (interactive) (when (or (not non-interactive) (not mh-insert-auto-fields-done-local)) (save-excursion (when (and (or (mh-goto-header-field "To:") (mh-goto-header-field "cc:"))) (let ((list mh-auto-fields-list) (fields-inserted nil)) (while list (let ((regexp (nth 0 (car list))) (entries (nth 1 (car list)))) (when (mh-regexp-in-field-p regexp "To:" "cc:") (setq mh-insert-auto-fields-done-local t) (setq fields-inserted t) (if (not non-interactive) (message "Fields for %s added" regexp)) (let ((entry-list entries)) (while entry-list (let ((field (caar entry-list)) (value (cdar entry-list))) (cond ((equal ":identity" field) (when ;;(and (not mh-identity-local) ;; Bug 1204506. But do we need to be able ;; to set an identity manually that won't be ;; overridden by mh-insert-auto-fields? (assoc value mh-identity-list) ;;) (mh-insert-identity value))) (t (mh-modify-header-field field value (equal field "From"))))) (setq entry-list (cdr entry-list)))))) (setq list (cdr list))) fields-inserted))))) (defun mh-modify-header-field (field value &optional overwrite-flag) "To header FIELD add VALUE. If OVERWRITE-FLAG is non-nil then the old value, if present, is discarded." (cond ((and overwrite-flag (mh-goto-header-field (concat field ":"))) (insert " " value) (delete-region (point) (mh-line-end-position))) ((and (not overwrite-flag) (mh-regexp-in-field-p (concat "\\b" (regexp-quote value) "\\b") field)) ;; Already there, do nothing. ) ((and (not overwrite-flag) (mh-goto-header-field (concat field ":"))) (insert " " value ",")) (t (mh-goto-header-end 0) (insert field ": " value "\n")))) (defun mh-regexp-in-field-p (regexp &rest fields) "Non-nil means REGEXP was found in FIELDS." (let ((old-syntax-table (syntax-table))) (unwind-protect (save-excursion (let ((search-result nil)) (while fields (let ((field (car fields)) (syntax-table mh-regexp-in-field-syntax-table)) (if (null syntax-table) (let ((case-fold-search t)) (cond ((string-match field "^To$\\|^[BD]?cc$\\|^From$") (setq syntax-table mh-addr-syntax-table)) ((string-match field "^Fcc$") (setq syntax-table mh-fcc-syntax-table)) (t (setq syntax-table (syntax-table))) ))) (if (and (mh-goto-header-field field) (set-syntax-table syntax-table) (re-search-forward regexp (save-excursion (mh-header-field-end)(point)) t)) (setq fields nil search-result t) (setq fields (cdr fields))) (set-syntax-table old-syntax-table))) search-result)) (set-syntax-table old-syntax-table)))) (defun mh-ascii-buffer-p () "Check if current buffer is entirely composed of ASCII. The function doesn't work for XEmacs since `find-charset-region' doesn't exist there." (loop for charset in (mh-funcall-if-exists find-charset-region (point-min) (point-max)) unless (eq charset 'ascii) return nil finally return t)) (provide 'mh-comp) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-comp.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-search.el0000644000175000000620000022741112114520723017621 0ustar wohlerstaff;;; mh-search --- MH-Search mode ;; Copyright (C) 1993, 1995, 2001-2013 Free Software Foundation, Inc. ;; Author: Indexed search by Satyaki Das ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Mode used to compose search criteria. ;; (1) The following search engines are supported: ;; swish++ ;; swish-e ;; mairix ;; namazu ;; pick ;; grep ;; (2) To use this package, you first have to build an index. Please ;; read the documentation for `mh-search' to get started. That ;; documentation will direct you to the specific instructions for ;; your particular searcher. ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (require 'gnus-util) (require 'imenu) (defvar mh-searcher nil "Cached value of chosen search program.") (defvar mh-search-function nil "Function which executes the search program.") (defvar mh-search-next-result-function nil "Function to parse the next line of output. Expected to return a list of three strings: name of the folder, message number, and optionally the match.") (defvar mh-search-regexp-builder nil "Function used to construct search regexp.") (defvar mh-index-folder "+mhe-index" "Folder that contains the folders resulting from the index searches.") (defvar mh-flists-results-folder "sequence" "Subfolder for `mh-index-folder' where flists output is placed.") (defvar mh-flists-sequence) (defvar mh-flists-called-flag nil) ;;; MH-Folder Commands ;;;###mh-autoload (defun mh-search (folder search-regexp &optional redo-search-flag window-config) "Search your MH mail. This command helps you find messages in your entire corpus of mail. You can search 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. Out of the box, MH-E uses \"pick\" to find messages. With a little extra effort, you can set an indexing program which rewards you with extremely quick results. The drawback is that sometimes the index does not contain the words you're looking for. You can still use \"pick\" in these situations. You are prompted for the FOLDER to search. This can be \"all\" to search all folders. Note that the search works recursively on the listed folder. Next, an MH-Search buffer appears where you can enter search criteria SEARCH-REGEXP. 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. 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-Search provides commands like \\[mh-to-field] to help you fill in the blanks.\\ 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-search-mode-hook', which is called when \\[mh-search] is run on a new pattern.\\ To perform the search, type \\[mh-index-do-search]. Sometimes you're searching for text that is either not indexed, or hasn't been indexed yet. In this case you can override the default method with the pick method by running the command \\[mh-pick-do-search]. 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.\\ The appearance of the heading can be modified by customizing the face `mh-search-folder'. You can jump back and forth between the headings using the commands \\[mh-index-next-folder] and \\[mh-index-previous-folder]. In addition, the command \\[mh-index-visit-folder] 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 command \\[mh-index-visit-folder] is useful to find the actual message number of an interesting message, or to view surrounding messages with the command \\[mh-rescan-folder]. Because this folder is temporary, you'll probably get in the habit of killing it when you're done with \\[mh-kill-folder]. You can regenerate the results by running this command with a prefix argument REDO-SEARCH-FLAG. Note: 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\" Configuring Indexed Searches The command \\[mh-search] runs the command defined by the option `mh-search-program'. 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\". The documentation for the following commands describe how to set up the various indexing programs to use with MH-E. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - `mh-pick-execute-search' - `mh-grep-execute-search' In a program, if FOLDER is \"+\" or nil, 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 (progn (mh-find-path) ;; Yes, we do want to call mh-search-choose every time in case the ;; user has switched the searcher manually. (unless (mh-search-choose (and current-prefix-arg mh-index-previous-search (cadr mh-index-previous-search))) (error "No search program found")) (or (and current-prefix-arg mh-index-sequence-search-flag) (and current-prefix-arg (car mh-index-previous-search)) (mh-prompt-for-folder "Search" "+" nil "all" t))) (or (and current-prefix-arg (caddr mh-index-previous-search)) mh-search-regexp-builder (read-string (format "%s regexp: " (upcase-initials (symbol-name mh-searcher))))) current-prefix-arg (if (and (not (and current-prefix-arg (caddr mh-index-previous-search))) mh-search-regexp-builder) (current-window-configuration) nil))) (block mh-search ;; Redoing a sequence search? (when (and redo-search-flag mh-index-data mh-index-sequence-search-flag (not mh-flists-called-flag)) (let ((mh-flists-called-flag t)) (apply #'mh-index-sequenced-messages mh-index-previous-search)) (return-from mh-search)) ;; We have fancy query parsing. (when (symbolp search-regexp) (mh-search-folder folder window-config) (return-from mh-search)) ;; Begin search proper. (mh-checksum-choose) (let ((result-count 0) (old-window-config (or window-config mh-previous-window-config)) (previous-search mh-index-previous-search) (index-folder (format "%s/%s" mh-index-folder (mh-index-generate-pretty-name search-regexp)))) ;; Create a new folder for the search results or recreate the old one... (if (and redo-search-flag mh-index-previous-search) (let ((buffer-name (buffer-name (current-buffer)))) (mh-process-or-undo-commands buffer-name) (save-excursion (mh-exec-cmd-quiet nil "rmf" buffer-name)) (mh-exec-cmd-quiet nil "folder" "-create" "-fast" buffer-name) (setq index-folder buffer-name)) (setq index-folder (mh-index-new-folder index-folder search-regexp))) (let ((folder-path (format "%s%s" mh-user-path (substring folder 1))) (folder-results-map (make-hash-table :test #'equal)) (origin-map (make-hash-table :test #'equal))) ;; Run search program... (message "Executing %s... " mh-searcher) (funcall mh-search-function folder-path search-regexp) ;; Parse searcher output. (message "Processing %s output... " mh-searcher) (goto-char (point-min)) (loop for next-result = (funcall mh-search-next-result-function) while next-result do (unless (eq next-result 'error) (unless (gethash (car next-result) folder-results-map) (setf (gethash (car next-result) folder-results-map) (make-hash-table :test #'equal))) (setf (gethash (cadr next-result) (gethash (car next-result) folder-results-map)) t))) ;; Copy the search results over. (maphash #'(lambda (folder msgs) (let ((cur (car (mh-translate-range folder "cur"))) (msgs (sort (loop for msg being the hash-keys of msgs collect msg) #'<))) (mh-exec-cmd "refile" msgs "-src" folder "-link" index-folder) ;; Restore cur to old value, that refile changed (when cur (mh-exec-cmd-quiet nil "mark" folder "-add" "-zero" "-sequence" "cur" (format "%s" cur))) (loop for msg in msgs do (incf result-count) (setf (gethash result-count origin-map) (cons folder msg))))) folder-results-map) ;; Vist the results folder. (mh-visit-folder index-folder () (list folder-results-map origin-map)) (goto-char (point-min)) (forward-line) (mh-update-sequences) (mh-recenter nil) ;; Update the speedbar, if needed. (when (mh-speed-flists-active-p) (mh-speed-flists t mh-current-folder)) ;; Maintain history. (when (or (and redo-search-flag previous-search) window-config) (setq mh-previous-window-config old-window-config)) (setq mh-index-previous-search (list folder mh-searcher search-regexp)) ;; Write out data to disk. (unless mh-flists-called-flag (mh-index-write-data)) (message "%s found %s matches in %s folders" (upcase-initials (symbol-name mh-searcher)) (loop for msg-hash being the hash-values of mh-index-data sum (hash-table-count msg-hash)) (loop for msg-hash being the hash-values of mh-index-data count (> (hash-table-count msg-hash) 0))))))) ;; Shush compiler. (mh-do-in-xemacs (defvar pick-folder)) (defun mh-search-folder (folder window-config) "Search FOLDER for messages matching a pattern. 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))) (switch-to-buffer-other-window "search-pattern") (if (or (zerop (buffer-size)) (not (y-or-n-p "Reuse pattern? "))) (mh-make-pick-template) (message "")) (mh-make-local-vars 'mh-current-folder folder 'mh-previous-window-config window-config) (message "%s" (substitute-command-keys (concat "Type \\[mh-index-do-search] to search messages, " "\\[mh-pick-do-search] to use pick, " "\\[mh-help] for help"))))) (defun mh-make-pick-template () "Initialize the current buffer with a template for a pick pattern." (let ((inhibit-read-only t)) (erase-buffer)) (insert "From: \n" "To: \n" "Cc: \n" "Date: \n" "Subject: \n" "---------\n") (mh-search-mode) (goto-char (point-min)) (dotimes (i 5) (add-text-properties (point) (1+ (point)) '(front-sticky t)) (add-text-properties (- (mh-line-end-position) 2) (1- (mh-line-end-position)) '(rear-nonsticky t)) (add-text-properties (point) (1- (mh-line-end-position)) '(read-only t)) (forward-line)) (add-text-properties (point) (1+ (point)) '(front-sticky t)) (add-text-properties (point) (1- (mh-line-end-position)) '(read-only t)) (goto-char (point-max))) ;; Sequence Searches ;;;###mh-autoload (defun mh-index-new-messages (folders) "Display unseen messages. If you use a program such as \"procmail\" to use \"rcvstore\" to file your incoming mail automatically, you can display new, unseen, messages using this command. All messages in the \"unseen\" sequence from the folders in `mh-new-messages-folders' are listed. With a prefix argument, enter a space-separated list of FOLDERS, or nothing to search all folders." (interactive (list (if current-prefix-arg (split-string (read-string "Search folder(s) (default all): ")) mh-new-messages-folders))) (mh-index-sequenced-messages folders mh-unseen-seq)) ;;;###mh-autoload (defun mh-index-ticked-messages (folders) "Display ticked messages. All messages in `mh-tick-seq' from the folders in `mh-ticked-messages-folders' are listed. With a prefix argument, enter a space-separated list of FOLDERS, or nothing to search all folders." (interactive (list (if current-prefix-arg (split-string (read-string "Search folder(s) (default all): ")) mh-ticked-messages-folders))) (mh-index-sequenced-messages folders mh-tick-seq)) ;; Shush compiler. (mh-do-in-xemacs (defvar mh-mairix-folder) (defvar mh-flists-search-folders)) ;;;###mh-autoload (defun mh-index-sequenced-messages (folders sequence) "Display messages in any sequence. All messages from the FOLDERS in `mh-new-messages-folders' in the SEQUENCE you provide are listed. With a prefix argument, enter a space-separated list of folders at the prompt, or nothing to search all folders." (interactive (list (if current-prefix-arg (split-string (read-string "Search folder(s) (default all): ")) mh-new-messages-folders) (mh-read-seq-default "Search" nil))) (unless sequence (setq sequence mh-unseen-seq)) (let* ((mh-flists-search-folders folders) (mh-flists-sequence sequence) (mh-flists-called-flag t) (mh-searcher 'flists) (mh-search-function 'mh-flists-execute) (mh-search-next-result-function 'mh-mairix-next-result) (mh-mairix-folder mh-user-path) (mh-search-regexp-builder nil) (new-folder (format "%s/%s/%s" mh-index-folder mh-flists-results-folder sequence)) (window-config (if (equal new-folder mh-current-folder) mh-previous-window-config (current-window-configuration))) (redo-flag nil) message) (cond ((buffer-live-p (get-buffer new-folder)) ;; The destination folder is being visited. Trick `mh-search' ;; into thinking that the folder resulted from a previous search. (set-buffer new-folder) (setq mh-index-previous-search (list folders mh-searcher sequence)) (setq redo-flag t)) ((mh-folder-exists-p new-folder) ;; Folder exists but we don't have it open. That means they are ;; stale results from a old flists search. Clear it out. (mh-exec-cmd-quiet nil "rmf" new-folder))) (setq message (mh-search "+" mh-flists-results-folder redo-flag window-config) mh-index-sequence-search-flag t mh-index-previous-search (list folders mh-searcher sequence)) (mh-index-write-data) (when (stringp message) (message "%s" message)))) (defvar mh-flists-search-folders) (defun mh-flists-execute (&rest ignored) "Execute flists. Search for messages belonging to `mh-flists-sequence' in the folders specified by `mh-flists-search-folders'. If `mh-recursive-folders-flag' is t, then the folders are searched recursively. All arguments are IGNORED." (set-buffer (get-buffer-create mh-temp-index-buffer)) (erase-buffer) (unless (executable-find "sh") (error "Didn't find sh")) (with-temp-buffer (let ((seq (symbol-name mh-flists-sequence))) (insert "for folder in `" (expand-file-name "flists" mh-progs) " " (cond ((eq mh-flists-search-folders t) (mh-quote-for-shell mh-inbox)) ((eq mh-flists-search-folders nil) "") ((listp mh-flists-search-folders) (loop for folder in mh-flists-search-folders concat (concat " " (mh-quote-for-shell folder))))) (if mh-recursive-folders-flag " -recurse" "") " -sequence " seq " -noshowzero -fast` ; do\n" (expand-file-name "mhpath" mh-progs) " \"+$folder\" " seq "\n" "done\n")) (call-process-region (point-min) (point-max) "sh" nil (get-buffer mh-temp-index-buffer)))) ;; Navigation ;;;###mh-autoload (defun mh-index-next-folder (&optional backward-flag) "Jump to the next folder marker. With non-nil optional argument BACKWARD-FLAG, jump to the previous group of results." (interactive "P") (if (null mh-index-data) (message "Only applicable in an MH-E index search buffer") (let ((point (point))) (forward-line (if backward-flag 0 1)) (cond ((if backward-flag (re-search-backward "^+" (point-min) t) (re-search-forward "^+" (point-max) t)) (beginning-of-line)) ((and (if backward-flag (goto-char (point-max)) (goto-char (point-min))) nil)) ((if backward-flag (re-search-backward "^+" (point-min) t) (re-search-forward "^+" (point-max) t)) (beginning-of-line)) (t (goto-char point)))))) ;;;###mh-autoload (defun mh-index-previous-folder () "Jump to the previous folder marker." (interactive) (mh-index-next-folder t)) ;;;###mh-autoload (defun mh-index-visit-folder () "Visit original folder from where the message at point was found." (interactive) (unless mh-index-data (error "Not in an index folder")) (let (folder msg) (save-excursion (cond ((and (bolp) (eolp)) (ignore-errors (forward-line -1)) (setq msg (mh-get-msg-num t))) ((equal (char-after (mh-line-beginning-position)) ?+) (setq folder (buffer-substring-no-properties (mh-line-beginning-position) (mh-line-end-position)))) (t (setq msg (mh-get-msg-num t))))) (when (not folder) (setq folder (car (gethash (gethash msg mh-index-msg-checksum-map) mh-index-checksum-origin-map)))) (when (or (not (get-buffer folder)) (y-or-n-p (format "Reuse buffer displaying %s? " folder))) (mh-visit-folder folder (loop for x being the hash-keys of (gethash folder mh-index-data) when (mh-msg-exists-p x folder) collect x))))) ;;; Search Menu (easy-menu-define mh-pick-menu mh-search-mode-map "Menu for MH-E Search" '("Search" ["Perform Search" mh-index-do-search t] ["Search with pick" mh-pick-do-search t])) ;;; MH-Search Keys ;; If this changes, modify mh-search-mode-help-messages accordingly, below. (gnus-define-keys mh-search-mode-map "\C-c?" mh-help "\C-c\C-c" mh-index-do-search "\C-c\C-p" mh-pick-do-search "\C-c\C-f\C-b" mh-to-field "\C-c\C-f\C-c" mh-to-field "\C-c\C-f\C-m" mh-to-field "\C-c\C-f\C-s" mh-to-field "\C-c\C-f\C-t" mh-to-field "\C-c\C-fb" mh-to-field "\C-c\C-fc" mh-to-field "\C-c\C-fm" mh-to-field "\C-c\C-fs" mh-to-field "\C-c\C-ft" mh-to-field) ;;; MH-Search Help Messages ;; Group messages logically, more or less. (defvar mh-search-mode-help-messages '((nil "Perform search: \\[mh-index-do-search]\n" "Search with pick: \\[mh-pick-do-search]\n\n" "Move to a field by typing C-c C-f C-\n" "where is the first letter of the desired field\n" "(except for From: which uses \"m\").")) "Key binding cheat sheet. This is an associative array which is used to show the most common commands. The key is a prefix char. The value is one or more strings which are concatenated together and displayed in the minibuffer if ? is pressed after the prefix character. The special key nil is used to display the non-prefixed commands. The substitutions described in `substitute-command-keys' are performed as well.") ;;; MH-Search Mode (put 'mh-search-mode 'mode-class 'special) (define-derived-mode mh-search-mode fundamental-mode "MH-Search" "Mode for creating search templates in MH-E.\\ 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. To perform the search, type \\[mh-index-do-search]. Sometimes you're searching for text that is either not indexed, or hasn't been indexed yet. In this case you can override the default method with the pick method by running the command \\[mh-pick-do-search]. The hook `mh-search-mode-hook' is called upon entry to this mode. \\{mh-search-mode-map}" (easy-menu-add mh-pick-menu) (mh-set-help mh-search-mode-help-messages)) ;;; MH-Search Commands (defun mh-index-do-search (&optional searcher) "Find messages using `mh-search-program'. If optional argument SEARCHER is present, use it instead of `mh-search-program'." (interactive) (unless (mh-search-choose searcher) (error "No search program found")) (let* ((regexp-list (mh-pick-parse-search-buffer)) (pattern (funcall mh-search-regexp-builder regexp-list))) (if pattern (mh-search mh-current-folder pattern nil mh-previous-window-config) (error "No search terms")))) (defun mh-pick-do-search () "Find messages using \"pick\". Uses the pick method described in `mh-pick-execute-search'." (interactive) (mh-index-do-search 'pick)) (defun mh-pick-parse-search-buffer () "Parse the search buffer contents. The function returns an alist. The car of each element is either the header name to search in or nil to search the whole message. The cdr of the element is the pattern to search." (save-excursion (let ((pattern-list ()) (in-body-flag nil) start begin) (goto-char (point-min)) (while (not (eobp)) (if (search-forward "--------" (mh-line-end-position) t) (setq in-body-flag t) (beginning-of-line) (setq begin (point)) (setq start (if in-body-flag (point) (search-forward ":" (mh-line-end-position) t) (point))) (push (cons (and (not in-body-flag) (intern (downcase (buffer-substring-no-properties begin (1- start))))) (mh-index-parse-search-regexp (buffer-substring-no-properties start (mh-line-end-position)))) pattern-list)) (forward-line)) pattern-list))) (defun mh-index-parse-search-regexp (input-string) "Construct parse tree for INPUT-STRING. All occurrences of &, |, ! and ~ in INPUT-STRING are replaced by AND, OR and NOT as appropriate. Then the resulting string is parsed." (let (input) (with-temp-buffer (insert input-string) ;; replace tabs (mh-replace-string "\t" " ") ;; synonyms of AND (mh-replace-string " AND " " and ") (mh-replace-string "&" " and ") (mh-replace-string " -and " " and ") ;; synonyms of OR (mh-replace-string " OR " " or ") (mh-replace-string "|" " or ") (mh-replace-string " -or " " or ") ;; synonyms of NOT (mh-replace-string " NOT " " not ") (mh-replace-string "!" " not ") (mh-replace-string "~" " not ") (mh-replace-string " -not " " not ") ;; synonyms of left brace (mh-replace-string "(" " ( ") (mh-replace-string " -lbrace " " ( ") ;; synonyms of right brace (mh-replace-string ")" " ) ") (mh-replace-string " -rbrace " " ) ") ;; get the normalized input (setq input (format "( %s )" (buffer-substring (point-min) (point-max))))) (let ((tokens (mh-index-add-implicit-ops (split-string input))) (op-stack ()) (operand-stack ()) oper1) (dolist (token tokens) (cond ((equal token "(") (push 'paren op-stack)) ((equal token "not") (push 'not op-stack)) ((equal token "or") (push 'or op-stack)) ((equal token "and") (push 'and op-stack)) ((equal token ")") (multiple-value-setq (op-stack operand-stack) (values-list (mh-index-evaluate op-stack operand-stack))) (when (eq (car op-stack) 'not) (setq op-stack (cdr op-stack)) (push `(not ,(pop operand-stack)) operand-stack)) (when (eq (car op-stack) 'and) (setq op-stack (cdr op-stack)) (setq oper1 (pop operand-stack)) (push `(and ,(pop operand-stack) ,oper1) operand-stack))) ((eq (car op-stack) 'not) (setq op-stack (cdr op-stack)) (push `(not ,token) operand-stack) (when (eq (car op-stack) 'and) (setq op-stack (cdr op-stack)) (setq oper1 (pop operand-stack)) (push `(and ,(pop operand-stack) ,oper1) operand-stack))) ((eq (car op-stack) 'and) (setq op-stack (cdr op-stack)) (push `(and ,(pop operand-stack) ,token) operand-stack)) (t (push token operand-stack)))) (prog1 (pop operand-stack) (when (or op-stack operand-stack) (error "Invalid regexp: %s" input)))))) (defun mh-index-add-implicit-ops (tokens) "Add implicit operators in the list TOKENS." (let ((result ()) (literal-seen nil) current) (while tokens (setq current (pop tokens)) (cond ((or (equal current ")") (equal current "and") (equal current "or")) (setq literal-seen nil) (push current result)) ((and literal-seen (push "and" result) (setq literal-seen nil) nil)) (t (push current result) (unless (or (equal current "(") (equal current "not")) (setq literal-seen t))))) (nreverse result))) (defun mh-index-evaluate (op-stack operand-stack) "Read expression till starting paren based on OP-STACK and OPERAND-STACK." (block mh-index-evaluate (let (op oper1) (while op-stack (setq op (pop op-stack)) (cond ((eq op 'paren) (return-from mh-index-evaluate (list op-stack operand-stack))) ((eq op 'not) (push `(not ,(pop operand-stack)) operand-stack)) ((or (eq op 'and) (eq op 'or)) (setq oper1 (pop operand-stack)) (push `(,op ,(pop operand-stack) ,oper1) operand-stack)))) (error "Ran out of tokens")))) ;;; Indexing Functions ;; Support different search programs (defvar mh-search-choices '((swish++ mh-swish++-binary mh-swish++-execute-search mh-swish++-next-result mh-swish++-regexp-builder) (swish mh-swish-binary mh-swish-execute-search mh-swish-next-result nil) (mairix mh-mairix-binary mh-mairix-execute-search mh-mairix-next-result mh-mairix-regexp-builder) (namazu mh-namazu-binary mh-namazu-execute-search mh-namazu-next-result nil) (pick mh-pick-binary mh-pick-execute-search mh-pick-next-result mh-pick-regexp-builder) (grep mh-grep-binary mh-grep-execute-search mh-grep-next-result nil)) "List of possible searcher choices.") (defun mh-search-choose (&optional searcher) "Choose a searching function. The side-effects of this function are that the variables `mh-searcher', `mh-search-function', and `mh-search-next-result-function' are set according to the first searcher in `mh-search-choices' present on the system. If optional argument SEARCHER is present, use it instead of `mh-search-program'." (block nil (let ((program-alist (cond (searcher (list (assoc searcher mh-search-choices))) (mh-search-program (list (assoc mh-search-program mh-search-choices))) (t mh-search-choices)))) (while program-alist (let* ((current (pop program-alist)) (executable (symbol-value (cadr current)))) (when executable (setq mh-searcher (car current)) (setq mh-search-function (nth 2 current)) (setq mh-search-next-result-function (nth 3 current)) (setq mh-search-regexp-builder (nth 4 current)) (return mh-searcher)))) nil))) ;;; Swish++ (defvar mh-swish++-binary (or (executable-find "search++") (executable-find "search"))) (defvar mh-swish++-directory ".swish++") (defvar mh-swish-folder nil) (defun mh-swish++-execute-search (folder-path search-regexp) "Execute swish++. 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: 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: 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 - 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\". In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (set-buffer (get-buffer-create mh-temp-index-buffer)) (erase-buffer) (unless mh-swish++-binary (error "Set `mh-swish++-binary' appropriately")) (call-process mh-swish++-binary nil '(t nil) nil "-m" "10000" (format "-i%s%s/swish++.index" mh-user-path mh-swish++-directory) search-regexp) (goto-char (point-min)) (setq mh-swish-folder (let ((last-char (substring folder-path (1- (length folder-path))))) (if (equal last-char "/") folder-path (format "%s/" folder-path))))) (defalias 'mh-swish++-next-result 'mh-swish-next-result) (defun mh-swish++-regexp-builder (regexp-list) "Generate query for swish++. REGEXP-LIST is an alist of fields and values." (let ((regexp "")) (dolist (elem regexp-list) (when (cdr elem) (setq regexp (concat regexp " and " (if (car elem) "(" "") (if (car elem) (symbol-name (car elem)) "") (if (car elem) " = " "") (mh-swish++-print-regexp (cdr elem)) (if (car elem) ")" ""))))) (substring regexp 4))) (defun mh-swish++-print-regexp (expr) "Return infix expression corresponding to EXPR." (cond ((atom expr) (format "%s" expr)) ((eq (car expr) 'not) (format "(not %s)" (mh-swish++-print-regexp (cadr expr)))) (t (format "(%s %s %s)" (mh-swish++-print-regexp (cadr expr)) (symbol-name (car expr)) (mh-swish++-print-regexp (caddr expr)))))) ;;; Swish (defvar mh-swish-binary (executable-find "swish-e")) (defvar mh-swish-directory ".swish") (defun mh-swish-execute-search (folder-path search-regexp) "Execute swish-e. 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 Use the following command line to generate the swish index. Run this daily from cron: swish-e -c /home/user/Mail/.swish/config In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (set-buffer (get-buffer-create mh-temp-index-buffer)) (erase-buffer) (unless mh-swish-binary (error "Set `mh-swish-binary' appropriately")) (call-process mh-swish-binary nil '(t nil) nil "-w" search-regexp "-f" (format "%s%s/index" mh-user-path mh-swish-directory)) (goto-char (point-min)) (setq mh-swish-folder (let ((last-char (substring folder-path (1- (length folder-path))))) (if (equal last-char "/") folder-path (format "%s/" folder-path))))) (defun mh-swish-next-result () "Get the next result from swish output." (prog1 (block nil (when (or (eobp) (equal (char-after (point)) ?.)) (return nil)) (when (equal (char-after (point)) ?#) (return 'error)) (let* ((start (search-forward " " (mh-line-end-position) t)) (end (search-forward " " (mh-line-end-position) t))) (unless (and start end) (return 'error)) (setq end (1- end)) (unless (file-exists-p (buffer-substring-no-properties start end)) (return 'error)) (unless (search-backward "/" start t) (return 'error)) (list (let* ((s (buffer-substring-no-properties start (1+ (point))))) (unless (string-match mh-swish-folder s) (return 'error)) (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))) (let* ((s (buffer-substring-no-properties (1+ (point)) end)) (n (ignore-errors (string-to-number s)))) (if n n (return 'error))) nil))) (forward-line))) ;;; Mairix (defvar mh-mairix-binary (executable-find "mairix")) (defvar mh-mairix-directory ".mairix") (defvar mh-mairix-folder nil) (defun mh-mairix-execute-search (folder-path search-regexp-list) "Execute mairix. 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: base=/home/user/Mail # 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=mh 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 In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used to search." (set-buffer (get-buffer-create mh-temp-index-buffer)) (erase-buffer) (unless mh-mairix-binary (error "Set `mh-mairix-binary' appropriately")) (apply #'call-process mh-mairix-binary nil '(t nil) nil "-r" "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) search-regexp-list) (goto-char (point-min)) (setq mh-mairix-folder (let ((last-char (substring folder-path (1- (length folder-path))))) (if (equal last-char "/") folder-path (format "%s/" folder-path))))) (defun mh-mairix-next-result () "Return next result from mairix output." (prog1 (block nil (when (or (eobp) (and (bolp) (eolp))) (return nil)) (unless (eq (char-after) ?/) (return 'error)) (let ((start (point)) end msg-start) (setq end (mh-line-end-position)) (unless (search-forward mh-mairix-folder end t) (return 'error)) (goto-char (match-beginning 0)) (unless (equal (point) start) (return 'error)) (goto-char end) (unless (search-backward "/" start t) (return 'error)) (setq msg-start (1+ (point))) (goto-char start) (unless (search-forward mh-user-path end t) (return 'error)) (list (format "+%s" (buffer-substring-no-properties (point) (1- msg-start))) (string-to-number (buffer-substring-no-properties msg-start end)) nil))) (forward-line))) (defun mh-mairix-regexp-builder (regexp-list) "Generate query for mairix. REGEXP-LIST is an alist of fields and values." (let ((result ())) (dolist (pair regexp-list) (when (cdr pair) (push (concat (cond ((eq (car pair) 'to) "t:") ((eq (car pair) 'from) "f:") ((eq (car pair) 'cc) "c:") ((eq (car pair) 'to-or-cc) "tc:") ((eq (car pair) 'address) "a:") ((eq (car pair) 'subject) "s:") ((eq (car pair) 'subject-or-body) "bs:") ((eq (car pair) 'date) "d:") ((eq (car pair) 'message-id) "m:") ((eq (car pair) 'message-body) "b:") ((eq (car pair) 'message-size) "z:") ((eq (car pair) 'message-attachment-name) "n:") ((eq (car pair) 'message-flags) "F:") (t "")) (let ((sop (cdr (mh-mairix-convert-to-sop* (cdr pair)))) (final "")) (dolist (conjunct sop) (let ((expr-list (cdr conjunct)) (expr-string "")) (dolist (e expr-list) (setq expr-string (concat expr-string "," (if (atom e) "" "~") (if (atom e) e (cadr e))))) (setq final (concat final "/" (substring expr-string 1))))) (substring final 1))) result))) result)) (defun mh-mairix-convert-to-sop* (expr) "Convert EXPR to sum of product form." (cond ((atom expr) `(or (and ,expr))) ((eq (car expr) 'or) (cons 'or (loop for e in (mapcar #'mh-mairix-convert-to-sop* (cdr expr)) append (cdr e)))) ((eq (car expr) 'and) (let ((conjuncts (mapcar #'mh-mairix-convert-to-sop* (cdr expr))) result next-factor) (setq result (pop conjuncts)) (while conjuncts (setq next-factor (pop conjuncts)) (setq result (let ((res ())) (dolist (t1 (cdr result)) (dolist (t2 (cdr next-factor)) (push `(and ,@(cdr t1) ,@(cdr t2)) res))) (cons 'or res)))) result)) ((atom (cadr expr)) `(or (and ,expr))) ((eq (caadr expr) 'not) (mh-mairix-convert-to-sop* (cadadr expr))) ((eq (caadr expr) 'and) (mh-mairix-convert-to-sop* `(or ,@(mapcar #'(lambda (x) `(not ,x)) (cdadr expr))))) ((eq (caadr expr) 'or) (mh-mairix-convert-to-sop* `(and ,@(mapcar #'(lambda (x) `(not ,x)) (cdadr expr))))) (t (error "Unreachable: %s" expr)))) ;;; Namazu (defvar mh-namazu-binary (executable-find "namazu")) (defvar mh-namazu-directory ".namazu") (defvar mh-namazu-folder nil) (defun mh-namazu-execute-search (folder-path search-regexp) "Execute namazu. 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)\"; 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: mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ -q /home/user/Mail 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) (error "Namazu directory %s not present" namazu-index-directory)) (unless (executable-find mh-namazu-binary) (error "Set `mh-namazu-binary' appropriately")) (set-buffer (get-buffer-create mh-temp-index-buffer)) (erase-buffer) (call-process mh-namazu-binary nil '(t nil) nil "-alR" search-regexp namazu-index-directory) (goto-char (point-min)) (setq mh-namazu-folder (let ((last (substring folder-path (1- (length folder-path))))) (if (equal last "/") folder-path (format "%s/" folder-path)))))) (defun mh-namazu-next-result () "Get the next result from namazu output." (prog1 (block nil (when (eobp) (return nil)) (let ((file-name (buffer-substring-no-properties (point) (mh-line-end-position)))) (unless (equal (string-match mh-namazu-folder file-name) 0) (return 'error)) (unless (file-exists-p file-name) (return 'error)) (string-match mh-user-path file-name) (let* ((folder/msg (substring file-name (match-end 0))) (mark (mh-search-from-end ?/ folder/msg))) (unless mark (return 'error)) (list (format "+%s" (substring folder/msg 0 mark)) (let ((n (ignore-errors (string-to-number (substring folder/msg (1+ mark)))))) (if n n (return 'error))) nil)))) (forward-line))) ;;; Pick (defvar mh-index-pick-folder) (defvar mh-pick-binary "pick") (defconst mh-pick-single-dash '(cc date from subject to) "Search components that are supported by single-dash option in pick.") (defun mh-pick-execute-search (folder-path search-regexp) "Execute pick. Read \"pick(1)\" or the section Finding Messages with pick in the MH book to find out more about how to enter the criteria (see URL `http://www.ics.uci.edu/~mh/book/mh/finpic.htm'). In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (set-buffer (get-buffer-create mh-temp-index-buffer)) (erase-buffer) (let ((folders (mh-folder-list (substring folder-path (length mh-user-path))))) (loop for folder in folders do (setq folder (concat "+" folder)) (insert folder "\n") (apply #'call-process (expand-file-name "pick" mh-progs) nil '(t nil) nil folder "-list" search-regexp))) (goto-char (point-min))) (defun mh-pick-next-result () "Return the next pick search result." (prog1 (block nil (when (eobp) (return nil)) (when (search-forward-regexp "^\+" (mh-line-end-position) t) (setq mh-index-pick-folder (buffer-substring-no-properties (mh-line-beginning-position) (mh-line-end-position))) (return 'error)) (unless (search-forward-regexp "^[1-9][0-9]*$" (mh-line-end-position) t) (return 'error)) (list mh-index-pick-folder (string-to-number (buffer-substring-no-properties (mh-line-beginning-position) (mh-line-end-position))) nil)) (forward-line))) ;; All implementations of pick have special options -cc, -date, -from and ;; -subject that allow to search for corresponding components. Any other ;; component is searched using option --COMPNAME, for example: `pick ;; --x-mailer mh-e'. Mailutils "pick" supports this option using a certain ;; kludge, but it prefers the following syntax for this purpose: ;; "--component=COMPNAME --pattern=PATTERN". ;; -- Sergey Poznyakoff, Aug 2003 (defun mh-pick-regexp-builder (pattern-list) "Generate pick search expression from PATTERN-LIST." (let ((result ())) (dolist (pattern pattern-list) (when (cdr pattern) (setq result `(,@result "-and" "-lbrace" ,@(mh-pick-construct-regexp (if (and (mh-variant-p 'gnu-mh) (car pattern)) (format "--pattern=%s" (cdr pattern)) (cdr pattern)) (if (car pattern) (cond ((mh-variant-p 'gnu-mh) (format "--component=%s" (car pattern))) ((member (car pattern) mh-pick-single-dash) (format "-%s" (car pattern))) (t (format "--%s" (car pattern)))) "-search")) "-rbrace")))) (cdr result))) (defun mh-pick-construct-regexp (expr component) "Construct pick compatible expression corresponding to EXPR. COMPONENT is the component to search." (cond ((atom expr) (list component expr)) ((eq (car expr) 'and) `("-lbrace" ,@(mh-pick-construct-regexp (cadr expr) component) "-and" ,@(mh-pick-construct-regexp (caddr expr) component) "-rbrace")) ((eq (car expr) 'or) `("-lbrace" ,@(mh-pick-construct-regexp (cadr expr) component) "-or" ,@(mh-pick-construct-regexp (caddr expr) component) "-rbrace")) ((eq (car expr) 'not) `("-lbrace" "-not" ,@(mh-pick-construct-regexp (cadr expr) component) "-rbrace")) (t (error "Unknown operator %s seen" (car expr))))) ;;; Grep (defvar mh-grep-binary (executable-find "grep")) (defun mh-grep-execute-search (folder-path search-regexp) "Execute grep. Unlike the other search methods, this method does not use the MH-Search buffer. Instead, you simply enter a regular expression in the minibuffer. For help in constructing regular expressions, see your man page for \"grep\". In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (set-buffer (get-buffer-create mh-temp-index-buffer)) (erase-buffer) (call-process mh-grep-binary nil '(t nil) nil "-i" "-r" search-regexp folder-path) (goto-char (point-min))) (defun mh-grep-next-result () "Read the next result. Parse it and return the message folder, message index and the match. If no other matches left then return nil. If the current record is invalid return 'error." (prog1 (block nil (when (eobp) (return nil)) (let ((eol-pos (mh-line-end-position)) (bol-pos (mh-line-beginning-position)) folder-start msg-end) (goto-char bol-pos) (unless (search-forward mh-user-path eol-pos t) (return 'error)) (setq folder-start (point)) (unless (search-forward ":" eol-pos t) (return 'error)) (let ((match (buffer-substring-no-properties (point) eol-pos))) (forward-char -1) (setq msg-end (point)) (unless (search-backward "/" folder-start t) (return 'error)) (list (format "+%s" (buffer-substring-no-properties folder-start (point))) (let ((n (ignore-errors (string-to-number (buffer-substring-no-properties (1+ (point)) msg-end))))) (if n n (return 'error))) match)))) (forward-line))) ;;; Folder Utilities ;;;###mh-autoload (defun mh-index-group-by-folder () "Partition the messages based on source folder. Returns an alist with the folder names in the car and the cdr being the list of messages originally from that folder." (save-excursion (goto-char (point-min)) (let ((result-table (make-hash-table :test #'equal))) (loop for msg being the hash-keys of mh-index-msg-checksum-map do (push msg (gethash (car (gethash (gethash msg mh-index-msg-checksum-map) mh-index-checksum-origin-map)) result-table))) (loop for x being the hash-keys of result-table collect (cons x (nreverse (gethash x result-table))))))) ;;;###mh-autoload (defun mh-index-insert-folder-headers () "Annotate the search results with original folder names." (let ((cur-msg (mh-get-msg-num nil)) (old-buffer-modified-flag (buffer-modified-p)) (buffer-read-only nil) current-folder last-folder) (goto-char (point-min)) (while (not (eobp)) (setq current-folder (car (gethash (gethash (mh-get-msg-num nil) mh-index-msg-checksum-map) mh-index-checksum-origin-map))) (when (and current-folder (not (equal current-folder last-folder))) (insert (if last-folder "\n" "") current-folder "\n") (setq last-folder current-folder)) (forward-line)) (when cur-msg (mh-notate-cur) (mh-goto-msg cur-msg t)) (set-buffer-modified-p old-buffer-modified-flag)) (mh-index-create-imenu-index)) ;;;###mh-autoload (defun mh-index-delete-folder-headers () "Delete the folder headers." (let ((cur-msg (mh-get-msg-num nil)) (old-buffer-modified-flag (buffer-modified-p)) (buffer-read-only nil)) (while (and (not cur-msg) (not (eobp))) (forward-line) (setq cur-msg (mh-get-msg-num nil))) (goto-char (point-min)) (while (not (eobp)) (if (or (char-equal (char-after) ?+) (char-equal (char-after) 10)) (delete-region (point) (progn (forward-line) (point))) (forward-line))) (when cur-msg (mh-goto-msg cur-msg t t)) (set-buffer-modified-p old-buffer-modified-flag))) (mh-require 'which-func nil t) ;; Shush compiler. (defvar which-func-mode) ; < Emacs 22, XEmacs ;;;###mh-autoload (defun mh-index-create-imenu-index () "Create alist of folder names and positions in index folder buffers." (save-excursion (if (boundp 'which-func-mode) (setq which-func-mode t)) (let ((alist ())) (goto-char (point-min)) (while (re-search-forward "^+" nil t) (save-excursion (beginning-of-line) (push (cons (buffer-substring-no-properties (point) (mh-line-end-position)) (point-marker)) alist))) (setq imenu--index-alist (nreverse alist))))) ;;;###mh-autoload (defun mh-search-p () "Non-nil means that this folder was generated by searching." mh-index-data) ;; Shush compiler (mh-do-in-xemacs (defvar mh-speed-flists-inhibit-flag)) ;;;###mh-autoload (defun mh-index-execute-commands () "Perform the outstanding operations on the actual messages. The copies in the searched folder are then deleted, refiled, blacklisted and whitelisted to get the desired result. Before processing the messages we make sure that the message is identical to the one that the user has marked in the index buffer." (save-excursion (let ((folders ()) (mh-speed-flists-inhibit-flag t)) (maphash (lambda (folder msgs) (push folder folders) (if (not (get-buffer folder)) ;; If source folder not open, just delete the messages... (apply #'mh-exec-cmd "rmm" folder (mh-coalesce-msg-list msgs)) ;; Otherwise delete the messages in the source buffer... (with-current-buffer folder (let ((old-refile-list mh-refile-list) (old-delete-list mh-delete-list) (old-blacklist mh-blacklist) (old-whitelist mh-whitelist)) (setq mh-refile-list nil mh-delete-list msgs mh-blacklist nil mh-whitelist nil) (unwind-protect (mh-execute-commands) (setq mh-refile-list (mapcar (lambda (x) (cons (car x) (loop for y in (cdr x) unless (memq y msgs) collect y))) old-refile-list) mh-delete-list (loop for x in old-delete-list unless (memq x msgs) collect x) mh-blacklist (loop for x in old-blacklist unless (memq x msgs) collect x) mh-whitelist (loop for x in old-whitelist unless (memq x msgs) collect x)) (mh-set-folder-modified-p (mh-outstanding-commands-p)) (when (mh-outstanding-commands-p) (mh-notate-deleted-and-refiled))))))) (mh-index-matching-source-msgs (append (loop for x in mh-refile-list append (cdr x)) mh-delete-list mh-blacklist mh-whitelist) t)) folders))) (defun mh-index-generate-pretty-name (string) "Given STRING generate a name which is suitable for use as a folder name. White space from the beginning and end are removed. All spaces in the name are replaced with underscores and all / are replaced with $. If STRING is longer than 20 it is truncated too. STRING could be a list of strings in which case they are concatenated to construct the base name." (with-temp-buffer (if (stringp string) (insert string) (when (car string) (insert (car string))) (dolist (s (cdr string)) (insert "_" s))) (setq string (mh-replace-string "-lbrace" " ")) (setq string (mh-replace-string "-rbrace" " ")) (setq string (mh-replace-string "-search" " ")) (subst-char-in-region (point-min) (point-max) ?( ? t) (subst-char-in-region (point-min) (point-max) ?) ? t) (subst-char-in-region (point-min) (point-max) ?- ? t) (goto-char (point-min)) (while (and (not (eobp)) (memq (char-after) '(? ?\t ?\n ?\r ?_))) (delete-char 1)) (goto-char (point-max)) (while (and (not (bobp)) (memq (char-before) '(? ?\t ?\n ?\r ?_))) (delete-char -1)) (subst-char-in-region (point-min) (point-max) ? ?_ t) (subst-char-in-region (point-min) (point-max) ?\t ?_ t) (subst-char-in-region (point-min) (point-max) ?\n ?_ t) (subst-char-in-region (point-min) (point-max) ?\r ?_ t) (subst-char-in-region (point-min) (point-max) ?/ ?$ t) (let ((out (truncate-string-to-width (buffer-string) 20))) (cond ((eq mh-searcher 'flists) (format "%s/%s" mh-flists-results-folder mh-flists-sequence)) ((equal out mh-flists-results-folder) (concat out "1")) (t out))))) (defun mh-folder-exists-p (folder) "Check if FOLDER exists." (and (mh-folder-name-p folder) (save-excursion (with-temp-buffer (mh-exec-cmd-output "folder" nil "-fast" "-nocreate" folder) (goto-char (point-min)) ;; Strip + from folder; use optional + in regexp. (looking-at (format "+?%s" (substring folder 1))))))) (defun mh-msg-exists-p (msg folder) "Check if MSG exists in FOLDER." (file-exists-p (format "%s%s/%s" mh-user-path (substring folder 1) msg))) (defun mh-index-new-folder (name search-regexp) "Return a folder name based on NAME for search results of SEARCH-REGEXP. If folder NAME already exists and was generated for the same SEARCH-REGEXP then it is reused. Otherwise if the folder NAME was generated from a different search then check if NAME-2 can be used. Otherwise try NAME-3. This is repeated till we find a new folder name. If the folder returned doesn't exist then it is created." (unless (mh-folder-name-p name) (error "The argument should be a valid MH folder name")) (let ((chosen-name (loop for i from 1 for candidate = (if (equal i 1) name (format "%s-%s" name i)) when (or (not (mh-folder-exists-p candidate)) (equal (mh-index-folder-search-regexp candidate) search-regexp)) return candidate))) ;; Do pending refiles/deletes... (when (get-buffer chosen-name) (mh-process-or-undo-commands chosen-name)) ;; Recreate folder... (save-excursion (mh-exec-cmd-quiet nil "rmf" chosen-name)) (mh-exec-cmd-quiet nil "folder" "-create" "-fast" chosen-name) (mh-remove-from-sub-folders-cache chosen-name) (when (boundp 'mh-speed-folder-map) (mh-speed-add-folder chosen-name)) chosen-name)) (defun mh-index-folder-search-regexp (folder) "If FOLDER was created by a index search, return the search regexp. Return nil if FOLDER doesn't exist or the .mhe_index file is garbled." (ignore-errors (with-temp-buffer (insert-file-contents (format "%s%s/%s" mh-user-path (substring folder 1) mh-index-data-file)) (goto-char (point-min)) (forward-list 3) (cadr (read (current-buffer)))))) ;;; Sequence Support ;;;###mh-autoload (defun mh-index-create-sequences () "Mirror sequences present in source folders in index folder." (let ((seq-hash (make-hash-table :test #'equal)) (seq-list ())) (loop for folder being the hash-keys of mh-index-data do (setf (gethash folder seq-hash) (mh-create-sequence-map (mh-read-folder-sequences folder nil)))) (dolist (msg (mh-translate-range mh-current-folder "all")) (let* ((checksum (gethash msg mh-index-msg-checksum-map)) (pair (gethash checksum mh-index-checksum-origin-map)) (ofolder (car pair)) (omsg (cdr pair))) (loop for seq in (ignore-errors (gethash omsg (gethash ofolder seq-hash))) do (if (assoc seq seq-list) (push msg (cdr (assoc seq seq-list))) (push (list seq msg) seq-list))))) (loop for seq in seq-list do (apply #'mh-exec-cmd "mark" mh-current-folder "-sequence" (symbol-name (car seq)) "-add" (mapcar #'(lambda (x) (format "%s" x)) (cdr seq)))))) ;;;###mh-autoload (defun mh-create-sequence-map (seq-list) "Return a map from msg number to list of sequences in which it is present. SEQ-LIST is an assoc list whose keys are sequence names and whose cdr is the list of messages in that sequence." (loop with map = (make-hash-table) for seq in seq-list when (and (not (memq (car seq) (mh-unpropagated-sequences))) (mh-valid-seq-p (car seq))) do (loop for msg in (cdr seq) do (push (car seq) (gethash msg map))) finally return map)) ;;;###mh-autoload (defun mh-index-add-to-sequence (seq msgs) "Add to SEQ the messages in the list MSGS. This function updates the source folder sequences. Also makes an attempt to update the source folder buffer if we have it open." ;; Don't need to do anything for cur (save-excursion (when (and (not (memq seq (mh-unpropagated-sequences))) (mh-valid-seq-p seq)) (let ((folders ()) (mh-speed-flists-inhibit-flag t)) (maphash (lambda (folder msgs) (push folder folders) ;; Add messages to sequence in source folder... (apply #'mh-exec-cmd-quiet nil "mark" folder "-add" "-nozero" "-sequence" (symbol-name seq) (mapcar (lambda (x) (format "%s" x)) (mh-coalesce-msg-list msgs))) ;; Update source folder buffer if we have it open... (when (get-buffer folder) (with-current-buffer folder (mh-put-msg-in-seq msgs seq)))) (mh-index-matching-source-msgs msgs)) folders)))) ;;;###mh-autoload (defun mh-index-delete-from-sequence (seq msgs) "Delete from SEQ the messages in MSGS. This function updates the source folder sequences. Also makes an attempt to update the source folder buffer if present." (save-excursion (when (and (not (memq seq (mh-unpropagated-sequences))) (mh-valid-seq-p seq)) (let ((folders ()) (mh-speed-flists-inhibit-flag t)) (maphash (lambda (folder msgs) (push folder folders) ;; Remove messages from sequence in source folder... (apply #'mh-exec-cmd-quiet nil "mark" folder "-del" "-nozero" "-sequence" (symbol-name seq) (mapcar (lambda (x) (format "%s" x)) (mh-coalesce-msg-list msgs))) ;; Update source folder buffer if we have it open... (when (get-buffer folder) (with-current-buffer folder (mh-delete-msg-from-seq msgs seq t)))) (mh-index-matching-source-msgs msgs)) folders)))) (defvar mh-unpropagated-sequences '(cur range subject search) "List of sequences that aren't preserved.") (defun mh-unpropagated-sequences () "Return a list of sequences that aren't propagated to the source folders. It is just the sequences in the variable `mh-unpropagated-sequences' in addition to the Previous-Sequence (see mh-profile 5)." (if mh-previous-seq (cons mh-previous-seq mh-unpropagated-sequences) mh-unpropagated-sequences)) (defun mh-index-matching-source-msgs (msgs &optional delete-from-index-data) "Return a table of original messages and folders for messages in MSGS. If optional argument DELETE-FROM-INDEX-DATA is non-nil, then each of the messages, whose counter-part is found in some source folder, is removed from `mh-index-data'." (let ((table (make-hash-table :test #'equal))) (dolist (msg msgs) (let* ((checksum (gethash msg mh-index-msg-checksum-map)) (pair (gethash checksum mh-index-checksum-origin-map))) (when (and checksum (car pair) (cdr pair) (mh-index-match-checksum (cdr pair) (car pair) checksum)) (push (cdr pair) (gethash (car pair) table)) (when delete-from-index-data (remhash (cdr pair) (gethash (car pair) mh-index-data)))))) table)) (defun mh-index-match-checksum (msg folder checksum) "Check if MSG in FOLDER has X-MHE-Checksum header value of CHECKSUM." (with-temp-buffer (mh-exec-cmd-output mh-scan-prog nil "-width" "80" "-format" "%{x-mhe-checksum}\n" folder msg) (goto-char (point-min)) (string-equal (buffer-substring-no-properties (point) (mh-line-end-position)) checksum))) ;;; Serialization of Index Data (defun mh-index-write-data () "Write index data to file." (ignore-errors (unless (eq major-mode 'mh-folder-mode) (error "Can't be called from folder in \"%s\"" major-mode)) (let ((data mh-index-data) (msg-checksum-map mh-index-msg-checksum-map) (checksum-origin-map mh-index-checksum-origin-map) (previous-search mh-index-previous-search) (sequence-search-flag mh-index-sequence-search-flag) (outfile (concat buffer-file-name mh-index-data-file)) (print-length nil) (print-level nil)) (with-temp-file outfile (mh-index-write-hashtable data (lambda (x) (loop for y being the hash-keys of x collect y))) (mh-index-write-hashtable msg-checksum-map #'identity) (mh-index-write-hashtable checksum-origin-map #'identity) (pp previous-search (current-buffer)) (insert "\n") (pp sequence-search-flag (current-buffer)) (insert "\n"))))) (defun mh-index-write-hashtable (table proc) "Write TABLE to `current-buffer'. PROC is used to serialize the values corresponding to the hash table keys." (pp (loop for x being the hash-keys of table collect (cons x (funcall proc (gethash x table)))) (current-buffer)) (insert "\n")) ;;;###mh-autoload (defun mh-index-read-data () "Read index data from file." (ignore-errors (unless (eq major-mode 'mh-folder-mode) (error "Can't be called from folder in \"%s\"" major-mode)) (let ((infile (concat buffer-file-name mh-index-data-file)) t1 t2 t3 t4 t5) (with-temp-buffer (insert-file-contents-literally infile) (goto-char (point-min)) (setq t1 (mh-index-read-hashtable (lambda (data) (loop with table = (make-hash-table :test #'equal) for x in data do (setf (gethash x table) t) finally return table))) t2 (mh-index-read-hashtable #'identity) t3 (mh-index-read-hashtable #'identity) t4 (read (current-buffer)) t5 (read (current-buffer)))) (setq mh-index-data t1 mh-index-msg-checksum-map t2 mh-index-checksum-origin-map t3 mh-index-previous-search t4 mh-index-sequence-search-flag t5)))) (defun mh-index-read-hashtable (proc) "From BUFFER read a hash table serialized as a list. PROC is used to convert the value to actual data." (loop with table = (make-hash-table :test #'equal) for pair in (read (current-buffer)) do (setf (gethash (car pair) table) (funcall proc (cdr pair))) finally return table)) ;;; Checksum Routines ;; A few different checksum programs are supported. The supported ;; programs are: ;; 1. md5sum ;; 2. md5 ;; 3. openssl ;; To add support for your favorite checksum program add a clause to ;; the cond statement in mh-checksum-choose. This should set the ;; variable mh-checksum-cmd to the command line needed to run the ;; checksum program and should set mh-checksum-parser to a function ;; which returns a cons cell containing the message number and ;; checksum string. (defvar mh-checksum-cmd) (defvar mh-checksum-parser) (defun mh-checksum-choose () "Check if a program to create a checksum is present." (unless (boundp 'mh-checksum-cmd) (let ((exec-path (append '("/sbin" "/usr/sbin") exec-path))) (cond ((executable-find "md5sum") (setq mh-checksum-cmd (list (executable-find "md5sum"))) (setq mh-checksum-parser #'mh-md5sum-parser)) ((executable-find "openssl") (setq mh-checksum-cmd (list (executable-find "openssl") "md5")) (setq mh-checksum-parser #'mh-openssl-parser)) ((executable-find "md5") (setq mh-checksum-cmd (list (executable-find "md5"))) (setq mh-checksum-parser #'mh-md5-parser)) (t (error "No suitable checksum program")))))) (defun mh-md5sum-parser () "Parse md5sum output." (let ((begin (mh-line-beginning-position)) (end (mh-line-end-position)) first-space last-slash) (setq first-space (search-forward " " end t)) (goto-char end) (setq last-slash (search-backward "/" begin t)) (cond ((and first-space last-slash) (cons (string-to-number (buffer-substring-no-properties (1+ last-slash) end)) (buffer-substring-no-properties begin (1- first-space)))) (t (cons nil nil))))) (defun mh-openssl-parser () "Parse openssl output." (let ((begin (mh-line-beginning-position)) (end (mh-line-end-position)) last-space last-slash) (goto-char end) (setq last-space (search-backward " " begin t)) (setq last-slash (search-backward "/" begin t)) (cond ((and last-slash last-space) (cons (string-to-number (buffer-substring-no-properties (1+ last-slash) (1- last-space))) (buffer-substring-no-properties (1+ last-space) end)))))) (defalias 'mh-md5-parser 'mh-openssl-parser) ;;;###mh-autoload (defun mh-index-update-maps (folder &optional origin-map) "Annotate all as yet unannotated messages in FOLDER with their MD5 hash. As a side effect msg -> checksum map is updated. Optional argument ORIGIN-MAP is a hashtable which maps each message in the index folder to the original folder and message from whence it was copied. If present the checksum -> (origin-folder, origin-index) map is updated too." (clrhash mh-index-msg-checksum-map) ;; Clear temp buffer (with-current-buffer (get-buffer-create mh-temp-checksum-buffer) (erase-buffer) ;; Run scan to check if any messages needs MD5 annotations at all (with-temp-buffer (mh-exec-cmd-output mh-scan-prog nil "-width" "80" "-format" "%(msg)\n%{x-mhe-checksum}\n" folder "all") (goto-char (point-min)) (let (msg checksum) (while (not (eobp)) (setq msg (buffer-substring-no-properties (point) (mh-line-end-position))) (forward-line) (save-excursion (cond ((not (string-match "^[0-9]*$" msg))) ((eolp) ;; need to compute checksum (set-buffer mh-temp-checksum-buffer) (insert mh-user-path (substring folder 1) "/" msg "\n")) (t ;; update maps (setq checksum (buffer-substring-no-properties (point) (mh-line-end-position))) (let ((msg (string-to-number msg))) (set-buffer folder) (mh-index-update-single-msg msg checksum origin-map))))) (forward-line)))) ;; Run checksum program if needed (unless (and (eobp) (bobp)) (apply #'mh-xargs mh-checksum-cmd) (goto-char (point-min)) (while (not (eobp)) (let* ((intermediate (funcall mh-checksum-parser)) (msg (car intermediate)) (checksum (cdr intermediate))) (when msg ;; annotate (mh-exec-cmd "anno" folder msg "-component" "X-MHE-Checksum" "-nodate" "-text" checksum "-inplace") ;; update maps (with-current-buffer folder (mh-index-update-single-msg msg checksum origin-map))) (forward-line))))) (mh-index-write-data)) (defun mh-index-update-single-msg (msg checksum origin-map) "Update various maps for one message. MSG is a index folder message, CHECKSUM its MD5 hash and ORIGIN-MAP, if non-nil, a hashtable containing which maps each message in the index folder to the folder and message that it was copied from. The function updates the hash tables `mh-index-msg-checksum-map' and `mh-index-checksum-origin-map'. This function should only be called in the appropriate index folder buffer." (cond ((gethash checksum mh-index-checksum-origin-map) (when origin-map (let* ((intermediate (gethash msg origin-map)) (ofolder (car intermediate)) (omsg (cdr intermediate))) ;; This is most probably a duplicate. So eliminate it. (call-process "rm" nil nil nil (format "%s%s/%s" mh-user-path (substring mh-current-folder 1) msg)) (when (gethash ofolder mh-index-data) (remhash omsg (gethash ofolder mh-index-data)))))) (t (setf (gethash msg mh-index-msg-checksum-map) checksum) (when (and origin-map (gethash msg origin-map)) (setf (gethash checksum mh-index-checksum-origin-map) (gethash msg origin-map)))))) (provide 'mh-search) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-search ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-print.el0000644000175000000620000002203112114520723017477 0ustar wohlerstaff;;; mh-print.el --- MH-E printing support ;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Jeffrey C Honig ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-scan) (require 'ps-print) (defvar mh-ps-print-color-option ps-print-color-p "Specify how buffer's text color is printed. Valid values are: nil - Do not print colors. t - Print colors. black-white - Print colors on black/white printer. See also `ps-black-white-faces'. Any other value is treated as t. This variable is initialized from `ps-print-color-p'.") (defvar mh-ps-print-func 'ps-spool-buffer-with-faces "Function to use to spool a buffer. Sensible choices are the functions `ps-spool-buffer' and `ps-spool-buffer-with-faces'.") ;;;###mh-autoload (defun mh-ps-print-msg (range) "Print RANGE\\. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will print inline text attachments but will not decrypt messages. However, when a message is displayed in an MH-Show buffer, then that buffer is used verbatim for printing with the caveat that only text attachments, if opened inline, are printed. Therefore, encrypted messages can be printed by showing and decrypting them first. MH-E uses the \"ps-print\" package to do the printing, so you can customize the printing further by going to the `ps-print' customization group. This command does not use the options `mh-lpr-command-format' or `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] and \\[mh-ps-print-toggle-faces]." (interactive (list (mh-interactive-range "Print"))) (mh-ps-print-range range nil)) (defun mh-ps-print-range (range file) "Print RANGE to FILE. This is the function that actually does the work. If FILE is nil, then the messages are spooled to the printer." (mh-iterate-on-range msg range (unwind-protect (mh-ps-spool-msg msg)) (mh-notate msg mh-note-printed mh-cmd-note)) (ps-despool file)) (defun mh-ps-spool-msg (msg) "Spool MSG." (let* ((folder mh-current-folder) (buffer (mh-in-show-buffer (mh-show-buffer) (if (not (equal (mh-msg-filename msg folder) buffer-file-name)) (get-buffer-create mh-temp-buffer))))) (unwind-protect (save-excursion (if buffer (let ((mh-show-buffer buffer)) (mh-display-msg msg folder))) (mh-ps-spool-buffer (if buffer buffer mh-show-buffer))) (if buffer (kill-buffer buffer))))) (defun mh-ps-spool-buffer (buffer) "Spool BUFFER." (with-current-buffer buffer (let ((ps-print-color-p mh-ps-print-color-option) (ps-left-header (list (concat "(" (mh-get-header-field "Subject:") ")") (concat "(" (mh-get-header-field "From:") ")"))) (ps-right-header (list "/pagenumberstring load" (concat "(" (mh-get-header-field "Date:") ")")))) (funcall mh-ps-print-func)))) ;;;###mh-autoload (defun mh-ps-print-msg-file (range file) "Print RANGE to FILE\\. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will print inline text attachments but will not decrypt messages. However, when a message is displayed in an MH-Show buffer, then that buffer is used verbatim for printing with the caveat that only text attachments, if opened inline, are printed. Therefore, encrypted messages can be printed by showing and decrypting them first. MH-E uses the \"ps-print\" package to do the printing, so you can customize the printing further by going to the `ps-print' customization group. This command does not use the options `mh-lpr-command-format' or `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] and \\[mh-ps-print-toggle-faces]." (interactive (list (mh-interactive-range "Print") (mh-ps-print-preprint 1))) (mh-ps-print-range range file)) (defun mh-ps-print-preprint (prefix-arg) "Provide a better default file name for `ps-print-preprint'. Pass along the PREFIX-ARG to it." (let ((buffer-file-name (format "mh-%s" (substring (buffer-name) 1)))) (ps-print-preprint prefix-arg))) ;;;###mh-autoload (defun mh-ps-print-toggle-faces () "Toggle whether printing is done with faces or not. When faces are enabled, the printed message will look very similar to the message in the MH-Show buffer." (interactive) (if (eq mh-ps-print-func 'ps-spool-buffer-with-faces) (progn (setq mh-ps-print-func 'ps-spool-buffer) (message "Printing without faces")) (setq mh-ps-print-func 'ps-spool-buffer-with-faces) (message "Printing with faces"))) ;;;###mh-autoload (defun mh-ps-print-toggle-color () "Toggle whether color is used in printing messages. Colors are emulated on black-and-white printers with shades of gray. This might produce illegible output, even if your screen colors only use shades of gray. If this is the case, try using this command to toggle between color, no color, and a black and white representation of the colors and see which works best. You change this setting permanently by customizing the option `ps-print-color-p'." (interactive) (if (eq mh-ps-print-color-option nil) (progn (setq mh-ps-print-color-option 'black-white) (message "Colors will be printed as black & white")) (if (eq mh-ps-print-color-option 'black-white) (progn (setq mh-ps-print-color-option t) (message "Colors will be printed")) (setq mh-ps-print-color-option nil) (message "Colors will not be printed")))) ;; Old non-PS based printing ;;;###mh-autoload (defun mh-print-msg (range) "Print RANGE the old fashioned way\\. The message is formatted with \"mhl\" (see option `mh-mhl-format-file') and printed with the \"lpr\" command (see option `mh-lpr-command-format'). Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. Consider using \\[mh-ps-print-msg] instead." (interactive (list (mh-interactive-range "Print"))) (message "Printing...") (let (msgs) ;; Gather message numbers and add them to "printed" sequence. (mh-iterate-on-range msg range (mh-add-msgs-to-seq msg 'printed t) (mh-notate nil mh-note-printed mh-cmd-note) (push msg msgs)) (setq msgs (nreverse msgs)) ;; Print scan listing if we have more than one message. (if (> (length msgs) 1) (let* ((msgs-string (mapconcat 'identity (mh-list-to-string (mh-coalesce-msg-list msgs)) " ")) (lpr-command (format mh-lpr-command-format (cond ((listp range) (format "Folder: %s, Messages: %s" mh-current-folder msgs-string)) ((symbolp range) (format "Folder: %s, Sequence: %s" mh-current-folder range))))) (scan-command (format "scan %s | %s" msgs-string lpr-command))) (if mh-print-background-flag (mh-exec-cmd-daemon shell-file-name nil "-c" scan-command) (call-process shell-file-name nil nil nil "-c" scan-command)))) ;; Print the messages (dolist (msg msgs) (let* ((mhl-command (format "%s %s %s" (expand-file-name "mhl" mh-lib-progs) (if mh-mhl-format-file (format " -form %s" mh-mhl-format-file) "") (mh-msg-filename msg))) (lpr-command (format mh-lpr-command-format (format "%s/%s" mh-current-folder msg))) (print-command (format "%s | %s" mhl-command lpr-command))) (if mh-print-background-flag (mh-exec-cmd-daemon shell-file-name nil "-c" print-command) (call-process shell-file-name nil nil nil "-c" print-command))))) (message "Printing...done")) (provide 'mh-print) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-print.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-mime.el0000644000175000000620000022424512114520723017305 0ustar wohlerstaff;;; mh-mime.el --- MH-E MIME support ;; Copyright (C) 1993, 1995, 2001-2013 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Message composition of MIME message is done with either MH-style ;; directives for mhn or mhbuild (MH 6.8 or later) or MML (MIME Meta ;; Language) tags. ;; TODO: ;; Paragraph code should not fill # lines if MIME enabled. ;; Implement mh-auto-mh-to-mime (if non-nil, \\[mh-send-letter] ;; invokes mh-mh-to-mime automatically before sending.) ;; Actually, instead of mh-auto-mh-to-mime, ;; should read automhnproc from profile. ;; MIME option to mh-forward command to move to content-description ;; insertion point. ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-gnus) ;needed because mh-gnus.el not compiled (require 'font-lock) (require 'gnus-util) (require 'mailcap) (require 'mm-decode) (require 'mm-view) (require 'mml) (autoload 'article-emphasize "gnus-art") (autoload 'gnus-eval-format "gnus-spec") (autoload 'mail-content-type-get "mail-parse") (autoload 'mail-decode-encoded-word-string "mail-parse") (autoload 'mail-header-parse-content-type "mail-parse") (autoload 'mail-header-strip "mail-parse") (autoload 'mail-strip-quoted-names "mail-utils") (autoload 'message-options-get "message") (autoload 'message-options-set "message") (autoload 'message-options-set-recipient "message") (autoload 'mm-decode-body "mm-bodies") (autoload 'mm-uu-dissect "mm-uu") (autoload 'mml-unsecure-message "mml-sec") (autoload 'rfc2047-decode-region "rfc2047") (autoload 'widget-convert-button "wid-edit") ;;; Variables ;; This has to be a macro, since we do: (setf (mh-buffer-data) ...) ;;;###mh-autoload (defmacro mh-buffer-data () "Convenience macro to get the MIME data structures of the current buffer." `(gethash (current-buffer) mh-globals-hash)) ;; Structure to keep track of MIME handles on a per buffer basis. (mh-defstruct (mh-buffer-data (:conc-name mh-mime-) (:constructor mh-make-buffer-data)) (handles ()) ; List of MIME handles (handles-cache (make-hash-table)) ; Cache to avoid multiple decodes of ; nested messages (parts-count 0) ; The button number is generated from ; this number (part-index-hash (make-hash-table))) ; Avoid incrementing the part number ; for nested messages (defvar mh-mm-inline-media-tests `(("image/jpeg" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'jpeg handle))) ("image/png" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'png handle))) ("image/gif" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'gif handle))) ("image/tiff" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'tiff handle)) ) ("image/xbm" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'xbm handle))) ("image/x-xbitmap" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'xbm handle))) ("image/xpm" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'xpm handle))) ("image/x-pixmap" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'xpm handle))) ("image/bmp" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'bmp handle))) ("image/x-portable-bitmap" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p 'pbm handle))) ("text/plain" mm-inline-text identity) ("text/enriched" mm-inline-text identity) ("text/richtext" mm-inline-text identity) ("text/x-patch" mm-display-patch-inline (lambda (handle) (locate-library "diff-mode"))) ("application/emacs-lisp" mm-display-elisp-inline identity) ("application/x-emacs-lisp" mm-display-elisp-inline identity) ("text/html" ,(if (fboundp 'mm-inline-text-html) 'mm-inline-text-html 'mm-inline-text) (lambda (handle) (or (and (boundp 'mm-inline-text-html-renderer) mm-inline-text-html-renderer) (and (boundp 'mm-text-html-renderer) mm-text-html-renderer)))) ("text/x-vcard" mh-mm-inline-text-vcard (lambda (handle) (or (featurep 'vcard) (locate-library "vcard")))) ("message/delivery-status" mm-inline-text identity) ("message/rfc822" mh-mm-inline-message identity) ;;("message/partial" mm-inline-partial identity) ;;("message/external-body" mm-inline-external-body identity) ("text/.*" mm-inline-text identity) ("audio/wav" mm-inline-audio (lambda (handle) (and (or (featurep 'nas-sound) (featurep 'native-sound)) (device-sound-enabled-p)))) ("audio/au" mm-inline-audio (lambda (handle) (and (or (featurep 'nas-sound) (featurep 'native-sound)) (device-sound-enabled-p)))) ("application/pgp-signature" ignore identity) ("application/x-pkcs7-signature" ignore identity) ("application/pkcs7-signature" ignore identity) ("application/x-pkcs7-mime" ignore identity) ("application/pkcs7-mime" ignore identity) ("multipart/alternative" ignore identity) ("multipart/mixed" ignore identity) ("multipart/related" ignore identity) ;; Disable audio and image ("audio/.*" ignore ignore) ("image/.*" ignore ignore) ;; Default to displaying as text (".*" mm-inline-text mh-mm-readable-p)) "Alist of media types/tests saying whether types can be displayed inline.") (defvar mh-mime-save-parts-directory nil "Default to use for `mh-mime-save-parts-default-directory'. Set from last use.") ;; Copied from gnus-art.el (should be checked for other cool things that can ;; be added to the buttons) (defvar mh-mime-button-commands '((mh-press-button "\r" "Toggle Display"))) (defvar mh-mime-button-map (let ((map (make-sparse-keymap))) (unless (>= (string-to-number emacs-version) 21) ;; XEmacs doesn't care. (set-keymap-parent map mh-show-mode-map)) (mh-do-in-gnu-emacs (define-key map [mouse-2] 'mh-push-button)) (mh-do-in-xemacs (define-key map '(button2) 'mh-push-button)) (dolist (c mh-mime-button-commands) (define-key map (cadr c) (car c))) map)) (defvar mh-mime-button-line-format-alist '((?T long-type ?s) (?d description ?s) (?p index ?s) (?e dots ?s))) (defvar mh-mime-button-line-format "%{%([%p. %d%T]%)%}%e\n") (defvar mh-mime-security-button-pressed nil) (defvar mh-mime-security-button-line-format "%{%([[%t:%i]%D]%)%}\n") (defvar mh-mime-security-button-end-line-format "%{%([[End of %t]%D]%)%}\n") (defvar mh-mime-security-button-line-format-alist '((?t type ?s) (?i info ?s) (?d details ?s) (?D pressed-details ?s))) (defvar mh-mime-security-button-map (let ((map (make-sparse-keymap))) (unless (>= (string-to-number emacs-version) 21) (set-keymap-parent map mh-show-mode-map)) (define-key map "\r" 'mh-press-button) (mh-do-in-gnu-emacs (define-key map [mouse-2] 'mh-push-button)) (mh-do-in-xemacs (define-key map '(button2) 'mh-push-button)) map)) ;;; MH-Folder Commands ;; Alphabetical. ;;;###mh-autoload (defun mh-display-with-external-viewer (part-index) "View attachment externally. If Emacs does not know how to view an attachment, you could save it into a file and then run some program to open it. It is easier, however, to launch the program directly from MH-E with this command. While you'll most likely use this to view spreadsheets and documents, it is also useful to use your browser to view HTML attachments with higher fidelity than what Emacs can provide. This command displays the attachment associated with the button under the cursor. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. You can provide a numeric prefix argument PART-INDEX to view the attachment labeled with that number. This command tries to provide a reasonable default for the viewer by calling the Emacs function `mailcap-mime-info'. This function usually reads the file \"/etc/mailcap\"." (interactive "P") (when (consp part-index) (setq part-index (car part-index))) (mh-folder-mime-action part-index #'(lambda () (let* ((part (get-text-property (point) 'mh-data)) (type (mm-handle-media-type part)) (methods (mapcar (lambda (x) (list (cdr (assoc 'viewer x)))) (mailcap-mime-info type 'all))) (def (caar methods)) (prompt (format "Viewer%s: " (if def (format " (default %s)" def) ""))) (method (completing-read prompt methods nil nil nil nil def)) (folder mh-show-folder-buffer) (buffer-read-only nil)) (when (string-match "^[^% \t]+$" method) (setq method (concat method " %s"))) (mh-cl-flet ((mm-handle-set-external-undisplayer (handle function) (mh-handle-set-external-undisplayer folder handle function))) (unwind-protect (mm-display-external part method) (set-buffer-modified-p nil))))) nil)) ;;;###mh-autoload (defun mh-folder-inline-mime-part (part-index) "Show attachment verbatim. You can view the raw contents of an attachment with this command. This command displays (or hides) the contents of the attachment associated with the button under the cursor verbatim. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. You can also provide a numeric prefix argument PART-INDEX to view the attachment labeled with that number." (interactive "P") (when (consp part-index) (setq part-index (car part-index))) (mh-folder-mime-action part-index #'mh-mime-inline-part nil)) (defun mh-mime-inline-part () "Toggle display of the raw MIME part." (interactive) (let* ((buffer-read-only nil) (data (get-text-property (point) 'mh-data)) (inserted-flag (get-text-property (point) 'mh-mime-inserted)) (displayed-flag (mm-handle-displayed-p data)) (point (point)) start end) (cond ((and data (not inserted-flag) (not displayed-flag)) (let ((contents (mm-get-part data))) (add-text-properties (mh-line-beginning-position) (mh-line-end-position) '(mh-mime-inserted t)) (setq start (point-marker)) (forward-line 1) (mm-insert-inline data contents) (setq end (point-marker)) (add-text-properties start (progn (goto-char start) (mh-line-end-position)) `(mh-region (,start . ,end))))) ((and data (or inserted-flag displayed-flag)) (mh-press-button) (message "MIME part already inserted"))) (goto-char point) (set-buffer-modified-p nil))) ;;;###mh-autoload (defun mh-folder-save-mime-part (part-index) "Save (output) attachment. This command saves the attachment associated with the button under the cursor. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. You can also provide a numeric prefix argument PART-INDEX to save the attachment labeled with that number. This command prompts you for a filename and suggests a specific name if it is available." (interactive "P") (when (consp part-index) (setq part-index (car part-index))) (mh-folder-mime-action part-index #'mh-mime-save-part nil)) (defun mh-mime-save-part () "Save MIME part at point." (interactive) (let ((data (get-text-property (point) 'mh-data))) (when data (let ((mm-default-directory (file-name-as-directory (or mh-mime-save-parts-directory default-directory)))) (mh-mm-save-part data) (setq mh-mime-save-parts-directory mm-default-directory))))) ;;;###mh-autoload (defun mh-folder-toggle-mime-part (part-index) "View attachment. This command displays (or hides) the attachment associated with the button under the cursor. If the cursor is not located over a button, then the cursor first moves to the next button, wrapping to the beginning of the message if necessary. This command has the advantage over related commands of working from the MH-Folder buffer. You can also provide a numeric prefix argument PART-INDEX to view the attachment labeled with that number. If Emacs does not know how to display the attachment, then Emacs offers to save the attachment in a file." (interactive "P") (when (consp part-index) (setq part-index (car part-index))) (mh-folder-mime-action part-index #'mh-press-button t)) ;;;###mh-autoload (defun mh-mime-save-parts (prompt) "Save attachments. You can save all of the attachments at once with this command. The attachments are saved in the directory specified by the option `mh-mime-save-parts-default-directory' unless you use a prefix argument PROMPT in which case you are prompted for the directory. These directories may be superseded by MH profile components, since this function calls on \"mhstore\" (\"mhn\") to do the work." (interactive "P") (let ((msg (if (eq major-mode 'mh-show-mode) (mh-show-buffer-message-number) (mh-get-msg-num t))) (folder (if (eq major-mode 'mh-show-mode) mh-show-folder-buffer mh-current-folder)) (command (if (mh-variant-p 'nmh) "mhstore" "mhn")) (directory (cond ((and (or prompt (equal nil mh-mime-save-parts-default-directory) (equal t mh-mime-save-parts-default-directory)) (not mh-mime-save-parts-directory)) (read-directory-name "Store in directory: " nil nil t)) ((and (or prompt (equal t mh-mime-save-parts-default-directory)) mh-mime-save-parts-directory) (read-directory-name (format "Store in directory (default %s): " mh-mime-save-parts-directory) "" mh-mime-save-parts-directory t "")) ((stringp mh-mime-save-parts-default-directory) mh-mime-save-parts-default-directory) (t mh-mime-save-parts-directory)))) (if (and (equal directory "") mh-mime-save-parts-directory) (setq directory mh-mime-save-parts-directory)) (if (not (file-directory-p directory)) (message "No directory specified") (if (equal nil mh-mime-save-parts-default-directory) (setq mh-mime-save-parts-directory directory)) (with-current-buffer (get-buffer-create mh-log-buffer) (cd directory) (setq mh-mime-save-parts-directory directory) (let ((initial-size (mh-truncate-log-buffer))) (apply 'call-process (expand-file-name command mh-progs) nil t nil (mh-list-to-string (list folder msg "-auto" (if (not (mh-variant-p 'nmh)) "-store")))) (if (> (buffer-size) initial-size) (save-window-excursion (switch-to-buffer-other-window mh-log-buffer) (sit-for 3)))))))) ;;;###mh-autoload (defun mh-toggle-mh-decode-mime-flag () "Toggle the value of `mh-decode-mime-flag'." (interactive) (setq mh-decode-mime-flag (not mh-decode-mime-flag)) (mh-show nil t) (message "%s" (if mh-decode-mime-flag "Processing attachments normally" "Displaying raw message"))) ;;;###mh-autoload (defun mh-toggle-mime-buttons () "Toggle option `mh-display-buttons-for-inline-parts-flag'." (interactive) (setq mh-display-buttons-for-inline-parts-flag (not mh-display-buttons-for-inline-parts-flag)) (mh-show nil t)) ;;; MIME Display Routines (defun mh-mm-inline-message (handle) "Display message, HANDLE. The function decodes the message and displays it. It avoids decoding the same message multiple times." (let ((b (point)) (clean-message-header mh-clean-message-header-flag) (invisible-headers mh-invisible-header-fields-compiled) (visible-headers nil)) (save-excursion (save-restriction (narrow-to-region b b) (mm-insert-part handle) (mh-mime-display (or (gethash handle (mh-mime-handles-cache (mh-buffer-data))) (setf (gethash handle (mh-mime-handles-cache (mh-buffer-data))) (let ((handles (mm-dissect-buffer nil))) (if handles (mh-mm-uu-dissect-text-parts handles) (setq handles (mm-uu-dissect))) (setf (mh-mime-handles (mh-buffer-data)) (mh-mm-merge-handles handles (mh-mime-handles (mh-buffer-data)))) handles)))) (goto-char (point-min)) (mh-show-xface) (cond (clean-message-header (mh-clean-msg-header (point-min) invisible-headers visible-headers) (goto-char (point-min))) (t (mh-start-of-uncleaned-message))) (mh-decode-message-header) (mh-show-addr) ;; The other highlighting types don't need anything special (when (eq mh-highlight-citation-style 'gnus) (mh-gnus-article-highlight-citation)) (goto-char (point-min)) (insert "\n------- Forwarded Message\n\n") (mh-display-smileys) (mh-display-emphasis) (mm-handle-set-undisplayer handle `(lambda () (let (buffer-read-only) (if (fboundp 'remove-specifier) ;; This is only valid on XEmacs. (mapcar (lambda (prop) (remove-specifier (face-property 'default prop) (current-buffer))) '(background background-pixmap foreground))) (delete-region ,(point-min-marker) ,(point-max-marker))))))))) ;;;###mh-autoload (defun mh-decode-message-header () "Decode RFC2047 encoded message header fields." (when mh-decode-mime-flag (let ((buffer-read-only nil)) (rfc2047-decode-region (point-min) (mh-mail-header-end))))) ;;;###mh-autoload (defun mh-decode-message-subject () "Decode RFC2047 encoded message header fields." (when mh-decode-mime-flag (save-excursion (let ((buffer-read-only nil)) (rfc2047-decode-region (progn (mh-goto-header-field "Subject:") (point)) (progn (mh-header-field-end) (point))))))) ;;;###mh-autoload (defun mh-mime-display (&optional pre-dissected-handles) "Display (and possibly decode) MIME handles. Optional argument, PRE-DISSECTED-HANDLES is a list of MIME handles. If present they are displayed otherwise the buffer is parsed and then displayed." (let ((handles ()) (folder mh-show-folder-buffer) (raw-message-data (buffer-string))) (mh-cl-flet ((mm-handle-set-external-undisplayer (handle function) (mh-handle-set-external-undisplayer folder handle function))) (goto-char (point-min)) (unless (search-forward "\n\n" nil t) (goto-char (point-max)) (insert "\n\n")) (condition-case err (progn ;; If needed dissect the current buffer (if pre-dissected-handles (setq handles pre-dissected-handles) (if (setq handles (mm-dissect-buffer nil)) (mh-mm-uu-dissect-text-parts handles) (setq handles (mm-uu-dissect))) (setf (mh-mime-handles (mh-buffer-data)) (mh-mm-merge-handles handles (mh-mime-handles (mh-buffer-data)))) (unless handles (mh-decode-message-body))) (cond ((and handles (or (not (stringp (car handles))) (cdr handles))) ;; Go to start of message body (goto-char (point-min)) (or (search-forward "\n\n" nil t) (goto-char (point-max))) ;; Delete the body (delete-region (point) (point-max)) ;; Display the MIME handles (mh-mime-display-part handles)) (t (mh-signature-highlight)))) (error (message "Could not display body: %s" (error-message-string err)) (delete-region (point-min) (point-max)) (insert raw-message-data)))))) (defun mh-decode-message-body () "Decode message based on charset. If message has been encoded for transfer take that into account." (let (ct charset cte) (goto-char (point-min)) (re-search-forward "\n\n" nil t) (save-restriction (narrow-to-region (point-min) (point)) (setq ct (ignore-errors (mail-header-parse-content-type (message-fetch-field "Content-Type" t))) charset (mail-content-type-get ct 'charset) cte (message-fetch-field "Content-Transfer-Encoding"))) (when (stringp cte) (setq cte (mail-header-strip cte))) (when (or (not ct) (equal (car ct) "text/plain")) (save-restriction (narrow-to-region (min (1+ (mh-mail-header-end)) (point-max)) (point-max)) (mm-decode-body charset (and cte (intern (downcase (gnus-strip-whitespace cte)))) (car ct)))))) (defun mh-mime-display-part (handle) "Decides the viewer to call based on the type of HANDLE." (cond ((null handle) nil) ((not (stringp (car handle))) (mh-mime-display-single handle)) ((equal (car handle) "multipart/alternative") (mh-mime-display-alternative (cdr handle))) ((and mh-pgp-support-flag (or (equal (car handle) "multipart/signed") (equal (car handle) "multipart/encrypted"))) (mh-mime-display-security handle)) (t (mh-mime-display-mixed (cdr handle))))) (defun mh-mime-display-mixed (handles) "Display the list of MIME parts, HANDLES recursively." (mapcar #'mh-mime-display-part handles)) (defun mh-mime-display-alternative (handles) "Choose among the alternatives, HANDLES the part that will be displayed. If no part is preferred then all the parts are displayed." (let* ((preferred (mm-preferred-alternative handles)) (others (loop for x in handles unless (eq x preferred) collect x))) (cond ((and preferred (stringp (car preferred))) (mh-mime-display-part preferred) (mh-mime-maybe-display-alternatives others)) (preferred (save-restriction (narrow-to-region (point) (if (eobp) (point) (1+ (point)))) (mh-mime-display-single preferred) (mh-mime-maybe-display-alternatives others) (goto-char (point-max)))) (t (mh-mime-display-mixed handles))))) (defun mh-mime-maybe-display-alternatives (alternatives) "Show buttons for ALTERNATIVES. If `mh-mime-display-alternatives-flag' is non-nil then display buttons for alternative parts that are usually suppressed." (when (and mh-display-buttons-for-alternatives-flag alternatives) (insert "\n----------------------------------------------------\n") (insert "Alternatives:\n") (dolist (x alternatives) (insert "\n") (mh-insert-mime-button x (mh-mime-part-index x) nil)) (insert "\n----------------------------------------------------\n"))) (defun mh-mime-display-security (handle) "Display PGP encrypted/signed message, HANDLE." (save-restriction (narrow-to-region (point) (point)) (insert "\n") (mh-insert-mime-security-button handle) (mh-mime-display-mixed (cdr handle)) (insert "\n") (let ((mh-mime-security-button-line-format mh-mime-security-button-end-line-format)) (mh-insert-mime-security-button handle)) (mh-mm-set-handle-multipart-parameter handle 'mh-region (cons (point-min-marker) (point-max-marker))))) (defun mh-mime-display-single (handle) "Display a leaf node, HANDLE in the MIME tree." (let* ((type (mm-handle-media-type handle)) (small-image-flag (mh-small-image-p handle)) (attachmentp (equal (car (mm-handle-disposition handle)) "attachment")) (inlinep (and (equal (car (mm-handle-disposition handle)) "inline") (mm-inlinable-p handle) (mm-inlined-p handle))) (displayp (or inlinep ; show if inline OR (mh-inline-vcard-p handle); inline vcard OR (and (not attachmentp) ; if not an attachment (or small-image-flag ; and small image ; and user wants inline (and (not (equal (mm-handle-media-supertype handle) "image")) (mm-inlinable-p handle) (mm-inlined-p handle))))))) (save-restriction (narrow-to-region (point) (if (eobp) (point) (1+ (point)))) (cond ((and mh-pgp-support-flag (equal type "application/pgp-signature")) nil) ; skip signatures as they are already handled... ((not displayp) (insert "\n") (mh-insert-mime-button handle (mh-mime-part-index handle) nil)) ((and displayp (not mh-display-buttons-for-inline-parts-flag)) (or (mm-display-part handle) (mm-display-part handle)) (mh-signature-highlight handle)) ((and displayp mh-display-buttons-for-inline-parts-flag) (insert "\n") (mh-insert-mime-button handle (mh-mime-part-index handle) nil) (forward-line -1) (mh-mm-display-part handle))) (goto-char (point-max))))) ;; There is a bug in Gnus inline image display due to which an extra line ;; gets inserted every time it is viewed. To work around that problem we are ;; using an extra property 'mh-region to remember the region that is added ;; when the button is clicked. The region is then deleted to make sure that ;; no extra lines get inserted. (defun mh-mm-display-part (handle) "Toggle display of button for MIME part, HANDLE." (beginning-of-line) (let ((id (get-text-property (point) 'mh-part)) (point (point)) (window (selected-window)) (mail-parse-charset 'nil) (mail-parse-ignored-charsets nil) region buffer-read-only) (save-excursion (unwind-protect (let ((win (get-buffer-window (current-buffer) t))) (when win (select-window win)) (goto-char point) (if (mm-handle-displayed-p handle) ;; This will remove the part. (progn ;; Delete the button and displayed part (if any) (let ((region (get-text-property point 'mh-region))) (when region (mh-funcall-if-exists remove-images (car region) (cdr region))) (mm-display-part handle) (when region (delete-region (car region) (cdr region)))) ;; Delete button (if it still remains). This happens for ;; externally displayed parts where the previous step does ;; nothing. (unless (eolp) (delete-region (point) (progn (forward-line) (point))))) (save-restriction (delete-region (point) (progn (forward-line 1) (point))) (narrow-to-region (point) (point)) ;; Maybe we need another unwind-protect here. (when (equal (mm-handle-media-supertype handle) "image") (insert "\n")) (when (and (not (eq (ignore-errors (mm-display-part handle)) 'inline)) (equal (mm-handle-media-supertype handle) "image")) (goto-char (point-min)) (delete-char 1)) (when (equal (mm-handle-media-supertype handle) "text") (when (eq mh-highlight-citation-style 'gnus) (mh-gnus-article-highlight-citation)) (mh-display-smileys) (mh-display-emphasis) (mh-signature-highlight handle)) (setq region (cons (progn (goto-char (point-min)) (point-marker)) (progn (goto-char (point-max)) (point-marker))))))) (when (window-live-p window) (select-window window)) (goto-char point) (beginning-of-line) (mh-insert-mime-button handle id (mm-handle-displayed-p handle)) (goto-char point) (when region (add-text-properties (mh-line-beginning-position) (mh-line-end-position) `(mh-region ,region))))))) (defun mh-mime-part-index (handle) "Generate the button number for MIME part, HANDLE. Notice that a hash table is used to display the same number when buttons need to be displayed multiple times (for instance when nested messages are opened)." (or (gethash handle (mh-mime-part-index-hash (mh-buffer-data))) (setf (gethash handle (mh-mime-part-index-hash (mh-buffer-data))) (incf (mh-mime-parts-count (mh-buffer-data)))))) (defun mh-small-image-p (handle) "Decide whether HANDLE is a \"small\" image that can be displayed inline. This is only useful if a Content-Disposition header is not present." (let ((media-test (caddr (assoc (car (mm-handle-type handle)) mh-mm-inline-media-tests))) (mm-inline-large-images t)) (and media-test (equal (mm-handle-media-supertype handle) "image") (funcall media-test handle) ; Since mm-inline-large-images is T, ; this only tells us if the image is ; something that emacs can display (let* ((image (mm-get-image handle))) (or (mh-do-in-xemacs (and (mh-funcall-if-exists glyphp image) (< (glyph-width image) (or mh-max-inline-image-width (window-pixel-width))) (< (glyph-height image) (or mh-max-inline-image-height (window-pixel-height))))) (mh-do-in-gnu-emacs (let ((size (mh-funcall-if-exists image-size image))) (and size (< (cdr size) (or mh-max-inline-image-height (1- (window-height)))) (< (car size) (or mh-max-inline-image-width (window-width))))))))))) (defun mh-inline-vcard-p (handle) "Decide if HANDLE is a vcard that must be displayed inline." (let ((type (mm-handle-type handle))) (and (or (featurep 'vcard) (fboundp 'vcard-pretty-print)) (consp type) (equal (car type) "text/x-vcard") (save-excursion (save-restriction (widen) (goto-char (point-min)) (not (mh-signature-separator-p))))))) (defun mh-signature-highlight (&optional handle) "Highlight message signature in HANDLE. The optional argument, HANDLE is a MIME handle if the function is being used to highlight the signature in a MIME part." (let ((regexp (cond ((not handle) "^-- $") ((not (and (equal (mm-handle-media-supertype handle) "text") (equal (mm-handle-media-subtype handle) "html"))) "^-- $") ((eq (mh-mm-text-html-renderer) 'lynx) "^ --$") (t "^--$")))) (save-excursion (goto-char (point-max)) (when (re-search-backward regexp nil t) (mh-do-in-gnu-emacs (let ((ov (make-overlay (point) (point-max)))) (overlay-put ov 'face 'mh-show-signature) (overlay-put ov 'evaporate t))) (mh-do-in-xemacs (set-extent-property (make-extent (point) (point-max)) 'face 'mh-show-signature)))))) ;;; Button Display ;; Shush compiler. (mh-do-in-xemacs (defvar dots) (defvar type) (defvar ov)) (defun mh-insert-mime-button (handle index displayed) "Insert MIME button for HANDLE. INDEX is the part number that will be DISPLAYED. It is also used by commands like \"K v\" which operate on individual MIME parts." ;; The button could be displayed by a previous decode. In that case ;; undisplay it if we need a hidden button. (when (and (mm-handle-displayed-p handle) (not displayed)) (mm-display-part handle)) (let ((name (or (mail-content-type-get (mm-handle-type handle) 'name) (mail-content-type-get (mm-handle-disposition handle) 'filename) (mail-content-type-get (mm-handle-type handle) 'url) "")) (type (mm-handle-media-type handle)) (description (mail-decode-encoded-word-string (or (mm-handle-description handle) ""))) (dots (if (or displayed (mm-handle-displayed-p handle)) " " "...")) long-type begin end) (if (string-match ".*/" name) (setq name (substring name (match-end 0)))) (setq long-type (concat type (and (not (equal name "")) (concat "; " name)))) (unless (equal description "") (setq long-type (concat " --- " long-type))) (unless (bolp) (insert "\n")) (setq begin (point)) (gnus-eval-format mh-mime-button-line-format mh-mime-button-line-format-alist `(,@(mh-gnus-local-map-property mh-mime-button-map) mh-callback mh-mm-display-part mh-part ,index mh-data ,handle)) (setq end (point)) (widget-convert-button 'link begin end :mime-handle handle :action 'mh-widget-press-button :button-keymap mh-mime-button-map :help-echo "Mouse-2 click or press RET (in show buffer) to toggle display") (dolist (ov (mh-funcall-if-exists overlays-in begin end)) (mh-funcall-if-exists overlay-put ov 'evaporate t)))) ;; Shush compiler. (defvar mm-verify-function-alist) ; < Emacs 22 (defvar mm-decrypt-function-alist) ; < Emacs 22 (mh-do-in-xemacs (defvar pressed-details)) (defun mh-insert-mime-security-button (handle) "Display buttons for PGP message, HANDLE." (let* ((protocol (mh-mm-handle-multipart-ctl-parameter handle 'protocol)) (crypto-type (or (nth 2 (assoc protocol mm-verify-function-alist)) (nth 2 (assoc protocol mm-decrypt-function-alist)) "Unknown")) (type (concat crypto-type (if (equal (car handle) "multipart/signed") " Signed" " Encrypted") " Part")) (info (or (mh-mm-handle-multipart-ctl-parameter handle 'gnus-info) "Undecided")) (details (mh-mm-handle-multipart-ctl-parameter handle 'gnus-details)) 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 mh-mime-security-button-line-format mh-mime-security-button-line-format-alist `(,@(mh-gnus-local-map-property mh-mime-security-button-map) mh-button-pressed ,mh-mime-security-button-pressed mh-callback mh-mime-security-press-button mh-line-format ,mh-mime-security-button-line-format mh-data ,handle)) (setq end (point)) (widget-convert-button 'link begin end :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)) (when (equal info "Failed") (let* ((type (if (equal (car handle) "multipart/signed") "verification" "decryption")) (warning (if (equal type "decryption") "(passphrase may be incorrect)" ""))) (message "%s %s failed %s" crypto-type type warning))))) (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) ((string-match "Failed" info) ;Decryption failed or signature invalid 'mh-show-pgg-bad) ((string-match "Undecided" info);Unprocessed mail 'mh-show-pgg-unknown) ((string-match "Untrusted" info);Key not trusted 'mh-show-pgg-unknown) (t 'mh-show-pgg-good))) ;;; Button Handlers (defun mh-folder-mime-action (part-index action include-security-flag) "Go to PART-INDEX and carry out ACTION. If PART-INDEX is nil then go to the next part in the buffer. The search for the next buffer wraps around if end of buffer is reached. If argument INCLUDE-SECURITY-FLAG is non-nil then include security info buttons when searching for a suitable parts." (unless mh-showing-mode (mh-show)) (mh-in-show-buffer (mh-show-buffer) (let ((criterion (cond (part-index (lambda (p) (let ((part (get-text-property p 'mh-part))) (and (integerp part) (= part part-index))))) (t (lambda (p) (if include-security-flag (get-text-property p 'mh-data) (integerp (get-text-property p 'mh-part))))))) (point (point))) (cond ((and (get-text-property point 'mh-part) (or (null part-index) (= (get-text-property point 'mh-part) part-index))) (funcall action)) ((and (get-text-property point 'mh-data) include-security-flag (null part-index)) (funcall action)) (t (mh-goto-next-button nil criterion) (if (= (point) point) (message "No matching MIME part found") (funcall action))))))) ;;;###mh-autoload (defun mh-goto-next-button (backward-flag &optional criterion) "Search for next button satisfying criterion. If BACKWARD-FLAG is non-nil search backward in the buffer for a mime button. If CRITERION is a function or a symbol which has a function binding then that function must return non-nil at the button we stop." (unless (or (and (symbolp criterion) (fboundp criterion)) (functionp criterion)) (setq criterion (lambda (x) t))) ;; Move to the next button in the buffer satisfying criterion (goto-char (or (save-excursion (beginning-of-line) ;; Find point before current button (let ((point-before-current-button (save-excursion (while (get-text-property (point) 'mh-data) (unless (= (forward-line (if backward-flag 1 -1)) 0) (if backward-flag (goto-char (point-min)) (goto-char (point-max))))) (point)))) ;; Skip over current button (while (and (get-text-property (point) 'mh-data) (not (if backward-flag (bobp) (eobp)))) (forward-line (if backward-flag -1 1))) ;; Stop at next MIME button if any exists. (block loop (while (/= (progn (unless (= (forward-line (if backward-flag -1 1)) 0) (if backward-flag (goto-char (point-max)) (goto-char (point-min))) (beginning-of-line)) (point)) point-before-current-button) (when (and (get-text-property (point) 'mh-data) (funcall criterion (point))) (return-from loop (point)))) nil))) (point)))) (defun mh-widget-press-button (widget el) "Callback for widget, WIDGET. Parameter EL is unused." (goto-char (widget-get widget :from)) (mh-press-button)) (defun mh-press-button () "View contents of button. This command is a toggle so if you use it again on the same attachment, the attachment is hidden." (interactive) (let ((mm-inline-media-tests mh-mm-inline-media-tests) (data (get-text-property (point) 'mh-data)) (function (get-text-property (point) 'mh-callback)) (buffer-read-only nil) (folder mh-show-folder-buffer)) (mh-cl-flet ((mm-handle-set-external-undisplayer (handle function) (mh-handle-set-external-undisplayer folder handle function))) (when (and function (eolp)) (backward-char)) (unwind-protect (and function (funcall function data)) (set-buffer-modified-p nil))))) (defun mh-push-button (event) "Click MIME button for EVENT. If the MIME part is visible then it is removed. Otherwise the part is displayed. This function is called when the mouse is used to click the MIME button." (interactive "e") (mh-do-at-event-location event (let ((folder mh-show-folder-buffer) (mm-inline-media-tests mh-mm-inline-media-tests) (data (get-text-property (point) 'mh-data)) (function (get-text-property (point) 'mh-callback))) (mh-cl-flet ((mm-handle-set-external-undisplayer (handle func) (mh-handle-set-external-undisplayer folder handle func))) (and function (funcall function data)))))) (defun mh-handle-set-external-undisplayer (folder handle function) "Replacement for `mm-handle-set-external-undisplayer'. This is only called in recent versions of Gnus. The MIME handles are stored in data structures corresponding to MH-E folder buffer FOLDER instead of in Gnus (as in the original). The MIME part, HANDLE is associated with the undisplayer FUNCTION." (if (mh-mm-keep-viewer-alive-p handle) (let ((new-handle (copy-sequence handle))) (mm-handle-set-undisplayer new-handle function) (mm-handle-set-undisplayer handle nil) (with-current-buffer folder (push new-handle (mh-mime-handles (mh-buffer-data))))) (mm-handle-set-undisplayer handle function))) (defun mh-mime-security-press-button (handle) "Callback from security button for part HANDLE." (if (mh-mm-handle-multipart-ctl-parameter handle 'gnus-info) (mh-mime-security-show-details handle) (let ((region (mh-mm-handle-multipart-ctl-parameter handle 'mh-region)) point) (setq point (point)) (goto-char (car region)) (delete-region (car region) (cdr region)) (with-current-buffer (mh-mm-handle-multipart-ctl-parameter handle 'buffer) (let* ((mm-verify-option 'known) (mm-decrypt-option 'known) (new (mh-mm-possibly-verify-or-decrypt (cdr handle) handle))) (unless (eq new (cdr handle)) (mh-mm-destroy-parts (cdr handle)) (setcdr handle new)))) (mh-mime-display-security handle) (goto-char point)))) ;; I rewrote the security part because Gnus doesn't seem to ever minimize ;; the button. That is once the mime-security button is pressed there seems ;; to be no way of getting rid of the inserted text. (defun mh-mime-security-show-details (handle) "Toggle display of detailed security info for HANDLE." (let ((details (mh-mm-handle-multipart-ctl-parameter handle 'gnus-details))) (when details (let ((mh-mime-security-button-pressed (not (get-text-property (point) 'mh-button-pressed))) (mh-mime-security-button-line-format (get-text-property (point) 'mh-line-format))) (forward-char -1) (while (eq (get-text-property (point) 'mh-line-format) mh-mime-security-button-line-format) (forward-char -1)) (forward-char) (save-restriction (narrow-to-region (point) (point)) (mh-insert-mime-security-button handle)) (delete-region (point) (or (text-property-not-all (point) (point-max) 'mh-line-format mh-mime-security-button-line-format) (point-max))) (forward-line -1))))) ;;; Miscellaneous Article Washing ;;;###mh-autoload (defun mh-add-missing-mime-version-header () "Some mail programs don't put a MIME-Version header. I have seen this only in spam, so maybe we shouldn't fix this ;-)" (save-excursion (goto-char (point-min)) (re-search-forward "\n\n" nil t) (save-restriction (narrow-to-region (point-min) (point)) (when (and (message-fetch-field "content-type") (not (message-fetch-field "mime-version"))) (goto-char (point-min)) (insert "MIME-Version: 1.0\n"))))) ;;;###mh-autoload (defun mh-display-smileys () "Display smileys." (when (and mh-graphical-smileys-flag (mh-small-show-buffer-p)) (mh-funcall-if-exists smiley-region (point-min) (point-max)))) ;;;###mh-autoload (defun mh-display-emphasis () "Display graphical emphasis." (when (and mh-graphical-emphasis-flag (mh-small-show-buffer-p)) (mh-cl-flet ((article-goto-body ())) ; shadow this function to do nothing (save-excursion (goto-char (point-min)) (article-emphasize))))) (defun mh-small-show-buffer-p () "Check if show buffer is small. This is used to decide if smileys and graphical emphasis should be displayed." (let ((max nil)) (when (and (boundp 'font-lock-maximum-size) font-lock-maximum-size) (cond ((numberp font-lock-maximum-size) (setq max font-lock-maximum-size)) ((listp font-lock-maximum-size) (setq max (cdr (or (assoc 'mh-show-mode font-lock-maximum-size) (assoc t font-lock-maximum-size))))))) (or (not (numberp max)) (>= (/ max 8) (buffer-size))))) ;;; MH-Letter Commands ;; MH-E commands are alphabetical; specific support routines follow command. ;;;###mh-autoload (defun mh-compose-forward (&optional description folder range) "Add tag to forward a message. You are prompted for a content DESCRIPTION, the name of the FOLDER in which the messages to forward are located, and a RANGE of messages, which defaults to the current message in that folder. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. The option `mh-compose-insertion' controls what type of tags are inserted." (interactive (let* ((description (mml-minibuffer-read-description)) (folder (mh-prompt-for-folder "Message from" mh-sent-from-folder nil)) (default (if (and (equal folder mh-sent-from-folder) (numberp mh-sent-from-msg)) mh-sent-from-msg (nth 0 (mh-translate-range folder "cur")))) (range (mh-read-range "Forward" folder (or (and default (number-to-string default)) t) t t))) (list description folder range))) (let ((messages (mapconcat 'identity (mh-list-to-string range) " "))) (dolist (message (mh-translate-range folder messages)) (if (equal mh-compose-insertion 'mml) (mh-mml-forward-message description folder (format "%s" message)) (mh-mh-forward-message description folder (format "%s" message)))))) ;;;###mh-autoload (defun mh-mml-forward-message (description folder message) "Forward a message as attachment. The function will prompt the user for a DESCRIPTION, a FOLDER and MESSAGE number." (let ((msg (if (and (equal message "") (numberp mh-sent-from-msg)) mh-sent-from-msg (string-to-number message)))) (cond ((integerp msg) (mml-attach-file (format "%s%s/%d" mh-user-path (substring folder 1) msg) "message/rfc822" (if (string= "" description) nil description) "inline")) (t (error "The message number, %s, is not a integer" msg))))) (defun mh-mh-forward-message (&optional description folder messages) "Add tag to forward a message. You are prompted for a content DESCRIPTION, the name of the FOLDER in which the messages to forward are located, and the MESSAGES' numbers. See also \\[mh-mh-to-mime]." (interactive (list (mml-minibuffer-read-description) (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) (read-string (concat "Messages" (if (numberp mh-sent-from-msg) (format " (default %d): " mh-sent-from-msg) ": "))))) (beginning-of-line) (insert "#forw [") (and description (not (string= description "")) (insert description)) (insert "]") (and folder (not (string= folder "")) (insert " " folder)) (if (and messages (not (string= messages ""))) (let ((start (point))) (insert " " messages) (subst-char-in-region start (point) ?, ? )) (if (numberp mh-sent-from-msg) (insert " " (int-to-string mh-sent-from-msg)))) (insert "\n")) ;;;###mh-autoload (defun mh-compose-insertion (&optional inline) "Add tag to include a file such as an image or sound. You are prompted for the filename containing the object, the media type if it cannot be determined automatically, and a content description. If you're using MH-style directives, you will also be prompted for additional attributes. The option `mh-compose-insertion' controls what type of tags are inserted. Optional argument INLINE means make it an inline attachment." (interactive "P") (if (equal mh-compose-insertion 'mml) (if inline (mh-mml-attach-file "inline") (mh-mml-attach-file)) (call-interactively 'mh-mh-attach-file))) (defun mh-mml-attach-file (&optional disposition) "Add a tag to insert a MIME message part from a file. You are prompted for the filename containing the object, the media type if it cannot be determined automatically, a content description and the DISPOSITION of the attachment. This is basically `mml-attach-file' from Gnus, modified such that a prefix argument yields an \"inline\" disposition and Content-Type is determined automatically." (let* ((file (mml-minibuffer-read-file "Attach file: ")) (type (mh-minibuffer-read-type file)) (description (mml-minibuffer-read-description)) (dispos (or disposition (mh-mml-minibuffer-read-disposition type)))) (mml-insert-empty-tag 'part 'type type 'filename file 'disposition dispos 'description description))) (defun mh-mh-attach-file (filename type description attributes) "Add a tag to insert a MIME message part from a file. You are prompted for the FILENAME containing the object, the media TYPE if it cannot be determined automatically, and a content DESCRIPTION. In addition, you are also prompted for additional ATTRIBUTES. See also \\[mh-mh-to-mime]." (interactive (let ((filename (mml-minibuffer-read-file "Attach file: "))) (list filename (mh-minibuffer-read-type filename) (mml-minibuffer-read-description) (read-string "Attributes: " (concat "name=\"" (file-name-nondirectory filename) "\""))))) (mh-mh-compose-type filename type description attributes)) (defun mh-mh-compose-type (filename type &optional description attributes comment) "Insert an MH-style directive to insert a file. The file specified by FILENAME is encoded as TYPE. An optional DESCRIPTION is used as the Content-Description field, optional set of ATTRIBUTES and an optional COMMENT can also be included." (beginning-of-line) (insert "#" type) (and attributes (insert "; " attributes)) (and comment (insert " (" comment ")")) (insert " [") (and description (insert description)) (insert "] " (expand-file-name filename)) (insert "\n")) ;;;###mh-autoload (defun mh-mh-compose-anon-ftp (host filename type description) "Add tag to include anonymous ftp reference to a file. You can have your message initiate an \"ftp\" transfer when the recipient reads the message. You are prompted for the remote HOST and FILENAME, the media TYPE, and the content DESCRIPTION. See also \\[mh-mh-to-mime]." (interactive (list (read-string "Remote host: ") (read-string "Remote filename: ") (mh-minibuffer-read-type "DUMMY-FILENAME") (mml-minibuffer-read-description))) (mh-mh-compose-external-type "anon-ftp" host filename type description)) ;;;###mh-autoload (defun mh-mh-compose-external-compressed-tar (host filename description) "Add tag to include anonymous ftp reference to a compressed tar file. In addition to retrieving the file via anonymous \"ftp\" as per the command \\[mh-mh-compose-anon-ftp], the file will also be uncompressed and untarred. You are prompted for the remote HOST and FILENAME and the content DESCRIPTION. See also \\[mh-mh-to-mime]." (interactive (list (read-string "Remote host: ") (read-string "Remote filename: ") (mml-minibuffer-read-description))) (mh-mh-compose-external-type "anon-ftp" host filename "application/octet-stream" description "type=tar; conversions=x-compress" "mode=image")) ;; RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: ;; Format of Internet Message Bodies. ;; RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: ;; Media Types. ;; RFC 2049 - Multipurpose Internet Mail Extensions (MIME) Part Five: ;; Conformance Criteria and Examples. ;; RFC 2017 - Definition of the URL MIME External-Body Access-Type ;; RFC 1738 - Uniform Resource Locators (URL) (defvar mh-access-types '(("anon-ftp") ; RFC2046 Anonymous File Transfer Protocol ("file") ; RFC1738 Host-specific file names ("ftp") ; RFC2046 File Transfer Protocol ("gopher") ; RFC1738 The Gopher Protocol ("http") ; RFC1738 Hypertext Transfer Protocol ("local-file") ; RFC2046 Local file access ("mail-server") ; RFC2046 mail-server Electronic mail address ("mailto") ; RFC1738 Electronic mail address ("news") ; RFC1738 Usenet news ("nntp") ; RFC1738 Usenet news using NNTP access ("prospero") ; RFC1738 Prospero Directory Service ("telnet") ; RFC1738 Telnet ("tftp") ; RFC2046 Trivial File Transfer Protocol ("url") ; RFC2017 URL scheme MIME access-type Protocol ("wais")) ; RFC1738 Wide Area Information Servers "Valid MIME access-type values.") ;;;###mh-autoload (defun mh-mh-compose-external-type (access-type host filename type &optional description attributes parameters comment) "Add tag to refer to a remote file. This command is a general utility for referencing external files. In fact, all of the other commands that insert directives to access external files call this command. You are prompted for the ACCESS-TYPE, remote HOST and FILENAME, and content TYPE. If you provide a prefix argument, you are also prompted for a content DESCRIPTION, ATTRIBUTES, PARAMETERS, and a COMMENT. See also \\[mh-mh-to-mime]." (interactive (list (completing-read "Access type: " mh-access-types) (read-string "Remote host: ") (read-string "Remote filename: ") (mh-minibuffer-read-type "DUMMY-FILENAME") (if current-prefix-arg (mml-minibuffer-read-description)) (if current-prefix-arg (read-string "Attributes: ")) (if current-prefix-arg (read-string "Parameters: ")) (if current-prefix-arg (read-string "Comment: ")))) (beginning-of-line) (insert "#@" type) (and attributes (insert "; " attributes)) (and comment (insert " (" comment ") ")) (insert " [") (and description (insert description)) (insert "] ") (insert "access-type=" access-type "; ") (insert "site=" host) (insert "; name=" (file-name-nondirectory filename)) (let ((directory (file-name-directory filename))) (and directory (insert "; directory=\"" directory "\""))) (and parameters (insert "; " parameters)) (insert "\n")) (defvar mh-mh-to-mime-args nil "Extra arguments for \\[mh-mh-to-mime] to pass to the \"mhbuild\" command. The arguments are passed to \"mhbuild\" if \\[mh-mh-to-mime] is given a prefix argument. Normally default arguments to \"mhbuild\" are specified in the MH profile.") ;;;###mh-autoload (defun mh-mh-to-mime (&optional extra-args) "Compose MIME message from MH-style directives. Typically, you send a message with attachments just like any other message. However, you may take a sneak preview of the MIME encoding if you wish by running this command. If you wish to pass additional arguments to \"mhbuild\" (\"mhn\") to affect how it builds your message, use the option `mh-mh-to-mime-args'. For example, you can build a consistency check into the message by setting `mh-mh-to-mime-args' to \"-check\". The recipient of your message can then run \"mhbuild -check\" on the message--\"mhbuild\" (\"mhn\") will complain if the message has been corrupted on the way. This command only consults this option when given a prefix argument EXTRA-ARGS. The hook `mh-mh-to-mime-hook' is called after the message has been formatted. The effects of this command can be undone by running \\[mh-mh-to-mime-undo]." (interactive "*P") (mh-mh-quote-unescaped-sharp) (save-buffer) (message "Running %s..." (if (mh-variant-p 'nmh) "mhbuild" "mhn")) (cond ((mh-variant-p 'nmh) (mh-exec-cmd-error nil "mhbuild" (if extra-args mh-mh-to-mime-args) buffer-file-name)) (t (mh-exec-cmd-error (format "mhdraft=%s" buffer-file-name) "mhn" (if extra-args mh-mh-to-mime-args) buffer-file-name))) (revert-buffer t t t) (message "Running %s...done" (if (mh-variant-p 'nmh) "mhbuild" "mhn")) (run-hooks 'mh-mh-to-mime-hook)) (defun mh-mh-quote-unescaped-sharp () "Quote \"#\" characters that haven't been quoted for \"mhbuild\". If the \"#\" character is present in the first column, but it isn't part of a MH-style directive then \"mhbuild\" gives an error. This function will quote all such characters." (save-excursion (goto-char (point-min)) (while (re-search-forward "^#" nil t) (beginning-of-line) (unless (mh-mh-directive-present-p (point) (mh-line-end-position)) (insert "#")) (goto-char (mh-line-end-position))))) ;;;###mh-autoload (defun mh-mh-to-mime-undo (noconfirm) "Undo effects of \\[mh-mh-to-mime]. It does this by reverting to a backup file. You are prompted to confirm this action, but you can avoid the confirmation by adding a prefix argument NOCONFIRM." (interactive "*P") (if (null buffer-file-name) (error "Buffer does not seem to be associated with any file")) (let ((backup-strings '("," "#")) backup-file) (while (and backup-strings (not (file-exists-p (setq backup-file (concat (file-name-directory buffer-file-name) (car backup-strings) (file-name-nondirectory buffer-file-name) ".orig"))))) (setq backup-strings (cdr backup-strings))) (or backup-strings (error "Backup file for %s no longer exists" buffer-file-name)) (or noconfirm (yes-or-no-p (format "Revert buffer from file %s? " backup-file)) (error "Revert not confirmed")) (let ((buffer-read-only nil)) (erase-buffer) (insert-file-contents backup-file)) (after-find-file nil nil nil nil t))) ;; Shush compiler. (defvar mh-identity-pgg-default-user-id) ;;;###mh-autoload (defun mh-mml-secure-message-encrypt (method) "Add tag to encrypt the message. A proper multipart message is created for you when you send the message. Use the command \\[mh-mml-unsecure-message] to remove this tag. Use a prefix argument METHOD to be prompted for one of the possible security methods (see `mh-mml-method-default')." (interactive (list (mh-mml-query-cryptographic-method))) (mh-secure-message method "encrypt" mh-identity-pgg-default-user-id)) ;;;###mh-autoload (defun mh-mml-secure-message-sign (method) "Add tag to sign the message. A proper multipart message is created for you when you send the message. Use the command \\[mh-mml-unsecure-message] to remove this tag. Use a prefix argument METHOD to be prompted for one of the possible security methods (see `mh-mml-method-default')." (interactive (list (mh-mml-query-cryptographic-method))) (mh-secure-message method "sign" mh-identity-pgg-default-user-id)) ;;;###mh-autoload (defun mh-mml-secure-message-signencrypt (method) "Add tag to encrypt and sign the message. A proper multipart message is created for you when you send the message. Use the command \\[mh-mml-unsecure-message] to remove this tag. Use a prefix argument METHOD to be prompted for one of the possible security methods (see `mh-mml-method-default')." (interactive (list (mh-mml-query-cryptographic-method))) (mh-secure-message method "signencrypt" mh-identity-pgg-default-user-id)) (defvar mh-mml-cryptographic-method-history ()) (defun mh-mml-query-cryptographic-method () "Read the cryptographic method to use." (if current-prefix-arg (let ((def (or (car mh-mml-cryptographic-method-history) mh-mml-method-default))) (completing-read (format "Method (default %s): " def) '(("pgp") ("pgpmime") ("smime")) nil t nil 'mh-mml-cryptographic-method-history def)) mh-mml-method-default)) (defun mh-secure-message (method mode &optional identity) "Add tag to encrypt or sign message. METHOD should be one of: \"pgpmime\", \"pgp\", \"smime\". MODE should be one of: \"sign\", \"encrypt\", \"signencrypt\", \"none\". IDENTITY is optionally the default-user-id to use." (if (not mh-pgp-support-flag) (error "Your version of Gnus does not support PGP/GPG") ;; Check the arguments (let ((valid-methods (list "pgpmime" "pgp" "smime")) (valid-modes (list "sign" "encrypt" "signencrypt" "none"))) (if (not (member method valid-methods)) (error "Method %s is invalid" method)) (if (not (member mode valid-modes)) (error "Mode %s is invalid" mode)) (mml-unsecure-message) (if (not (string= mode "none")) (save-excursion (goto-char (point-min)) (mh-goto-header-end 1) (if mh-identity-pgg-default-user-id (mml-insert-tag 'secure 'method method 'mode mode 'sender mh-identity-pgg-default-user-id) (mml-insert-tag 'secure 'method method 'mode mode))))))) ;;;###mh-autoload (defun mh-mml-to-mime () "Compose MIME message from MML tags. Typically, you send a message with attachments just like any other message. However, you may take a sneak preview of the MIME encoding if you wish by running this command. This action can be undone by running \\[undo]." (interactive) (require 'message) (when mh-pgp-support-flag ;; PGP requires actual e-mail addresses, not aliases. ;; Parse the recipients and sender from the message. (message-options-set-recipient) ;; Do an alias lookup on sender (if From field is present). (when (message-options-get 'message-sender) (message-options-set 'message-sender (mail-strip-quoted-names (mh-alias-expand (message-options-get 'message-sender))))) ;; Do an alias lookup on recipients (message-options-set 'message-recipients (mapconcat (lambda (ali) (mail-strip-quoted-names (mh-alias-expand ali))) (split-string (message-options-get 'message-recipients) "[, ]+") ", "))) (let ((saved-text (buffer-string)) (buffer (current-buffer)) (modified-flag (buffer-modified-p))) (condition-case err (mml-to-mime) (error (with-current-buffer buffer (delete-region (point-min) (point-max)) (insert saved-text) (set-buffer-modified-p modified-flag)) (error (error-message-string err)))))) ;;;###mh-autoload (defun mh-mml-unsecure-message () "Remove any secure message tags." (interactive) (if (not mh-pgp-support-flag) (error "Your version of Gnus does not support PGP/GPG") (mml-unsecure-message))) ;;; Support Routines for MH-Letter Commands ;;;###mh-autoload (defun mh-mml-tag-present-p () "Check if the current buffer has text which may be a MML tag." (save-excursion (goto-char (point-min)) (re-search-forward (concat "\\(<#\\(mml\\|part\\)\\(.\\|\n\\)*>[ \n\t]*<#/\\(mml\\|part\\)>\\|" "^<#secure.+>$\\)") nil t))) (defvar mh-media-type-regexp (concat (regexp-opt '("text" "image" "audio" "video" "application" "multipart" "message") t) "/[-.+a-zA-Z0-9]+") "Regexp matching valid media types used in MIME attachment compositions.") ;;;###mh-autoload (defun mh-mh-directive-present-p (&optional begin end) "Check if the text between BEGIN and END might be a MH-style directive. The optional argument BEGIN defaults to the beginning of the buffer, while END defaults to the end of the buffer." (unless begin (setq begin (point-min))) (unless end (setq end (point-max))) (save-excursion (block search-for-mh-directive (goto-char begin) (while (re-search-forward "^#" end t) (let ((s (buffer-substring-no-properties (point) (mh-line-end-position)))) (cond ((equal s "")) ((string-match "^forw[ \t\n]+" s) (return-from search-for-mh-directive t)) (t (let ((first-token (car (split-string s "[ \t;@]")))) (when (and first-token (string-match mh-media-type-regexp first-token)) (return-from search-for-mh-directive t))))))) nil))) (defun mh-minibuffer-read-type (filename &optional default) "Return the content type associated with the given FILENAME. If the \"file\" command exists and recognizes the given file, then its value is returned\; otherwise, the user is prompted for a type (see `mailcap-mime-types'). Optional argument DEFAULT is returned if a type isn't entered." (mailcap-parse-mimetypes) (let* ((default (or default (mm-default-file-encoding filename) "application/octet-stream")) (probed-type (mh-file-mime-type filename)) (type (or (and (not (equal probed-type "application/octet-stream")) probed-type) (completing-read (format "Content type (default %s): " default) (mapcar 'list (mailcap-mime-types)))))) (if (not (equal type "")) type default))) ;;;###mh-autoload (defun mh-file-mime-type (filename) "Return MIME type of FILENAME from file command. Returns nil if file command not on system." (cond ((not (mh-have-file-command)) nil) ;no file command, exit now ((not (and (file-exists-p filename) (file-readable-p filename))) nil) ;no file or not readable, ditto (t (let ((tmp-buffer (get-buffer-create mh-temp-buffer))) (with-current-buffer tmp-buffer (unwind-protect (progn (call-process "file" nil '(t nil) nil "-b" "-i" (expand-file-name filename)) (goto-char (point-min)) (if (not (re-search-forward mh-media-type-regexp nil t)) nil (mh-file-mime-type-substitute (match-string 0) filename))) (kill-buffer tmp-buffer))))))) (defvar mh-file-mime-type-substitutions '(("application/msword" "\.xls" "application/ms-excel") ("application/msword" "\.ppt" "application/ms-powerpoint") ("text/plain" "\.vcf" "text/x-vcard") ("text/rtf" "\.rtf" "application/rtf") ("application/x-zip" "\.sxc" "application/vnd.sun.xml.calc") ("application/x-zip" "\.sxd" "application/vnd.sun.xml.draw") ("application/x-zip" "\.sxi" "application/vnd.sun.xml.impress") ("application/x-zip" "\.sxw" "application/vnd.sun.xml.writer") ("application/x-zip" "\.odg" "application/vnd.oasis.opendocument.graphics") ("application/x-zip" "\.odi" "application/vnd.oasis.opendocument.image") ("application/x-zip" "\.odp" "application/vnd.oasis.opendocument.presentation") ("application/x-zip" "\.ods" "application/vnd.oasis.opendocument.spreadsheet") ("application/x-zip" "\.odt" "application/vnd.oasis.opendocument.text")) "Substitutions to make for Content-Type returned from file command. The first element is the Content-Type returned by the file command. The second element is a regexp matching the file name, usually the extension. The third element is the Content-Type to replace with.") (defun mh-file-mime-type-substitute (content-type filename) "Return possibly changed CONTENT-TYPE on the FILENAME. Substitutions are made from the `mh-file-mime-type-substitutions' variable." (let ((subst mh-file-mime-type-substitutions) (type) (match) (answer content-type) (case-fold-search t)) (while subst (setq type (car (car subst)) match (elt (car subst) 1)) (if (and (string-equal content-type type) (string-match match filename)) (setq answer (elt (car subst) 2) subst nil) (setq subst (cdr subst)))) answer)) (defvar mh-have-file-command 'undefined "Cached value of function `mh-have-file-command'. Do not reference this variable directly as it might not have been initialized. Always use the command `mh-have-file-command'.") ;;;###mh-autoload (defun mh-have-file-command () "Return t if 'file' command is on the system. 'file -i' is used to get MIME type of composition insertion." (when (eq mh-have-file-command 'undefined) (setq mh-have-file-command (and (fboundp 'executable-find) (executable-find "file") ; file command exists ; and accepts -i and -b args. (zerop (call-process "file" nil nil nil "-i" "-b" (expand-file-name "inc" mh-progs)))))) mh-have-file-command) ;;; MIME Cleanup ;;;###mh-autoload (defun mh-mime-cleanup () "Free the decoded MIME parts." (let ((mime-data (gethash (current-buffer) mh-globals-hash))) ;; This is for Emacs, what about XEmacs? (mh-funcall-if-exists remove-images (point-min) (point-max)) (when mime-data (mh-mm-destroy-parts (mh-mime-handles mime-data)) (remhash (current-buffer) mh-globals-hash)))) ;;;###mh-autoload (defun mh-destroy-postponed-handles () "Free MIME data for externally displayed MIME parts." (let ((mime-data (mh-buffer-data))) (when mime-data (mh-mm-destroy-parts (mh-mime-handles mime-data))) (remhash (current-buffer) mh-globals-hash))) (provide 'mh-mime) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-mime.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-junk.el0000644000175000000620000004722012114520723017321 0ustar wohlerstaff;;; mh-junk.el --- MH-E interface to anti-spam measures ;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Satyaki Das , ;; Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail, spam ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Spam handling in MH-E. ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-scan) (mh-require-cl) ;;;###mh-autoload (defun mh-junk-blacklist (range) "Blacklist RANGE as spam. This command trains the spam program in use (see the option `mh-junk-program') with the content of RANGE and then handles the message(s) as specified by the option `mh-junk-disposition'. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. For more information about using your particular spam fighting program, see: - `mh-spamassassin-blacklist' - `mh-bogofilter-blacklist' - `mh-spamprobe-blacklist'" (interactive (list (mh-interactive-range "Blacklist"))) (mh-iterate-on-range () range (mh-blacklist-a-msg nil)) (if (looking-at mh-scan-blacklisted-msg-regexp) (mh-next-msg))) (defun mh-blacklist-a-msg (message) "Blacklist MESSAGE. If MESSAGE is nil then the message at point is blacklisted. The hook `mh-blacklisted-msg-hook' is called after you mark a message for blacklisting." (save-excursion (if (numberp message) (mh-goto-msg message nil t) (beginning-of-line) (setq message (mh-get-msg-num t))) (cond ((looking-at mh-scan-refiled-msg-regexp) (error "Message %d is refiled; undo refile before blacklisting" message)) ((looking-at mh-scan-deleted-msg-regexp) (error "Message %d is deleted; undo delete before blacklisting" message)) ((looking-at mh-scan-whitelisted-msg-regexp) (error "Message %d is whitelisted; undo before blacklisting" message)) ((looking-at mh-scan-blacklisted-msg-regexp) nil) (t (mh-set-folder-modified-p t) (setq mh-blacklist (cons message mh-blacklist)) (if (not (memq message mh-seen-list)) (setq mh-seen-list (cons message mh-seen-list))) (mh-notate nil mh-note-blacklisted mh-cmd-note) (run-hooks 'mh-blacklist-msg-hook))))) ;;;###mh-autoload (defun mh-junk-blacklist-disposition () "Determines the fate of the selected spam." (cond ((null mh-junk-disposition) nil) ((equal mh-junk-disposition "") "+") ((eq (aref mh-junk-disposition 0) ?+) mh-junk-disposition) ((eq (aref mh-junk-disposition 0) ?@) (concat mh-current-folder "/" (substring mh-junk-disposition 1))) (t (concat "+" mh-junk-disposition)))) ;;;###mh-autoload (defun mh-junk-process-blacklist (range) "Blacklist RANGE as spam. This command trains the spam program in use (see the option `mh-junk-program') with the content of RANGE and then handles the message(s) as specified by the option `mh-junk-disposition'." (let ((blacklist-func (nth 1 (assoc mh-junk-choice mh-junk-function-alist)))) (unless blacklist-func (error "Customize `mh-junk-program' appropriately")) (mh-iterate-on-range msg range (message "Blacklisting message %d..." msg) (funcall (symbol-function blacklist-func) msg) (message "Blacklisting message %d...done" msg)) (mh-next-msg))) ;;;###mh-autoload (defun mh-junk-whitelist (range) "Whitelist RANGE as ham. This command reclassifies the RANGE as ham if it were incorrectly classified as spam (see the option `mh-junk-program'). It then refiles the message into the \"+inbox\" folder. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Whitelist"))) (mh-iterate-on-range () range (mh-junk-whitelist-a-msg nil)) (if (looking-at mh-scan-whitelisted-msg-regexp) (mh-next-msg))) (defun mh-junk-whitelist-a-msg (message) "Whitelist MESSAGE. If MESSAGE is nil then the message at point is whitelisted. The hook `mh-whitelist-msg-hook' is called after you mark a message for whitelisting." (save-excursion (if (numberp message) (mh-goto-msg message nil t) (beginning-of-line) (setq message (mh-get-msg-num t))) (cond ((looking-at mh-scan-refiled-msg-regexp) (error "Message %d is refiled; undo refile before whitelisting" message)) ((looking-at mh-scan-deleted-msg-regexp) (error "Message %d is deleted; undo delete before whitelisting" message)) ((looking-at mh-scan-blacklisted-msg-regexp) (error "Message %d is blacklisted; undo before whitelisting" message)) ((looking-at mh-scan-whitelisted-msg-regexp) nil) (t (mh-set-folder-modified-p t) (setq mh-whitelist (cons message mh-whitelist)) (mh-notate nil mh-note-whitelisted mh-cmd-note) (run-hooks 'mh-whitelist-msg-hook))))) ;;;###mh-autoload (defun mh-junk-process-whitelist (range) "Whitelist RANGE as ham. This command reclassifies the RANGE as ham if it were incorrectly classified as spam (see the option `mh-junk-program')." (let ((whitelist-func (nth 2 (assoc mh-junk-choice mh-junk-function-alist)))) (unless whitelist-func (error "Customize `mh-junk-program' appropriately")) (mh-iterate-on-range msg range (message "Whitelisting message %d..." msg) (funcall (symbol-function whitelist-func) msg) (message "Whitelisting message %d...done" msg)) (mh-next-msg))) ;; Spamassassin Interface (defvar mh-spamassassin-executable (executable-find "spamassassin")) (defvar mh-sa-learn-executable (executable-find "sa-learn")) ;;;###mh-autoload (defun mh-spamassassin-blacklist (msg) "Blacklist MSG with SpamAssassin. SpamAssassin is one of the more popular spam filtering programs. Get it from your local distribution or from the SpamAssassin web site at URL `http://spamassassin.org/'. To use SpamAssassin, add the following recipes to \".procmailrc\": PATH=$PATH:/usr/bin/mh MAILDIR=$HOME/`mhparam Path` # Fight spam with SpamAssassin. :0fw | spamc # Anything with a spam level of 10 or more is junked immediately. :0: * ^X-Spam-Level: .......... /dev/null :0: * ^X-Spam-Status: Yes spam/. If you don't use \"spamc\", use \"spamassassin -P -a\". Note that one of the recipes above throws away messages with a score greater than or equal to 10. Here's how you can determine a value that works best for you. First, run \"spamassassin -t\" on every mail message in your archive and use Gnumeric to verify that the average plus the standard deviation of good mail is under 5, the SpamAssassin default for \"spam\". Using Gnumeric, sort the messages by score and view the messages with the highest score. Determine the score which encompasses all of your interesting messages and add a couple of points to be conservative. Add that many dots to the \"X-Spam-Level:\" header field above to send messages with that score down the drain. In the example above, messages with a score of 5-9 are set aside in the \"+spam\" folder for later review. The major weakness of rules-based filters is a plethora of false positives so it is worthwhile to check. If SpamAssassin classifies a message incorrectly, or is unsure, you can use the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist]. The command \\[mh-junk-blacklist] adds a \"blacklist_from\" entry to \"~/spamassassin/user_prefs\", deletes the message, and sends the message to the Razor, so that others might not see this spam. If the \"sa-learn\" command is available, the message is also recategorized as spam. The command \\[mh-junk-whitelist] adds a \"whitelist_from\" rule to the \"~/.spamassassin/user_prefs\" file. If the \"sa-learn\" command is available, the message is also recategorized as ham. Over time, you'll observe that the same host or domain occurs repeatedly in the \"blacklist_from\" entries, so you might think that you could avoid future spam by blacklisting all mail from a particular domain. The utility function `mh-spamassassin-identify-spammers' helps you do precisely that. This function displays a frequency count of the hosts and domains in the \"blacklist_from\" entries from the last blank line in \"~/.spamassassin/user_prefs\" to the end of the file. This information can be used so that you can replace multiple \"blacklist_from\" entries with a single wildcard entry such as: blacklist_from *@*amazingoffersdirect2u.com In versions of SpamAssassin (2.50 and on) that support a Bayesian classifier, \\[mh-junk-blacklist] uses the program \"sa-learn\" to recategorize the message as spam. Neither MH-E, nor SpamAssassin, rebuilds the database after adding words, so you will need to run \"sa-learn --rebuild\" periodically. This can be done by adding the following to your crontab: 0 * * * * sa-learn --rebuild > /dev/null 2>&1" (unless mh-spamassassin-executable (error "Unable to find the spamassassin executable")) (let ((current-folder mh-current-folder) (msg-file (mh-msg-filename msg mh-current-folder)) (sender)) (message "Reporting message %d..." msg) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-spamassassin-executable msg-file mh-junk-background nil ;;"--report" "--remove-from-whitelist" "-r" "-R") ; spamassassin V2.20 (when mh-sa-learn-executable (message "Recategorizing message %d as spam..." msg) (mh-truncate-log-buffer) (call-process mh-sa-learn-executable msg-file mh-junk-background nil "--single" "--spam" "--local" "--no-rebuild"))) (message "Blacklisting sender of message %d..." msg) (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (call-process (expand-file-name mh-scan-prog mh-progs) nil t nil (format "%d" msg) current-folder "-format" "%<(mymbox{from})%|%(addr{from})%>") (goto-char (point-min)) (if (search-forward-regexp "^\\(.+\\)$" nil t) (progn (setq sender (match-string 0)) (mh-spamassassin-add-rule "blacklist_from" sender) (message "Blacklisting sender of message %d...done" msg)) (message "Blacklisting sender of message %d...not done (from my address)" msg))))) ;;;###mh-autoload (defun mh-spamassassin-whitelist (msg) "Whitelist MSG with SpamAssassin. The \\[mh-junk-whitelist] command adds a \"whitelist_from\" rule to the \"~/.spamassassin/user_prefs\" file. If the \"sa-learn\" command is available, the message is also recategorized as ham. See `mh-spamassassin-blacklist' for more information." (unless mh-spamassassin-executable (error "Unable to find the spamassassin executable")) (let ((msg-file (mh-msg-filename msg mh-current-folder)) (show-buffer (get-buffer mh-show-buffer)) from) (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (message "Removing spamassassin markup from message %d..." msg) (call-process mh-spamassassin-executable msg-file t nil ;; "--remove-markup" "-d") ; spamassassin V2.20 (if show-buffer (kill-buffer show-buffer)) (write-file msg-file) (when mh-sa-learn-executable (message "Recategorizing message %d as ham..." msg) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-sa-learn-executable msg-file mh-junk-background nil "--single" "--ham" "--local" "--no-rebuild"))) (message "Whitelisting sender of message %d..." msg) (setq from (car (mh-funcall-if-exists ietf-drums-parse-address (mh-get-header-field "From:")))) (kill-buffer nil) (unless (or (null from) (equal from "")) (mh-spamassassin-add-rule "whitelist_from" from)) (message "Whitelisting sender of message %d...done" msg)))) (defun mh-spamassassin-add-rule (rule body) "Add a new rule to \"~/.spamassassin/user_prefs\". The name of the rule is RULE and its body is BODY." (save-window-excursion (let* ((line (format "%s\t%s\n" rule body)) (case-fold-search t) (file (expand-file-name "~/.spamassassin/user_prefs")) (buffer-exists (find-buffer-visiting file))) (find-file file) (if (not (search-forward (format "\n%s" line) nil t)) (progn (goto-char (point-max)) (insert (if (bolp) "" "\n") line) (save-buffer))) (if (not buffer-exists) (kill-buffer nil))))) ;;;###mh-autoload (defun mh-spamassassin-identify-spammers () "Identify spammers who are repeat offenders. This function displays a frequency count of the hosts and domains in the \"blacklist_from\" entries from the last blank line in \"~/.spamassassin/user_prefs\" to the end of the file. This information can be used so that you can replace multiple \"blacklist_from\" entries with a single wildcard entry such as: blacklist_from *@*amazingoffersdirect2u.com" (interactive) (let* ((file (expand-file-name "~/.spamassassin/user_prefs")) (domains (make-hash-table :test 'equal))) (find-file file) ;; Only consider entries between last blank line and end of file. (goto-char (1- (point-max))) (search-backward-regexp "^$") ;; Perform frequency count. (save-excursion (while (search-forward-regexp "^blacklist_from\\s-*\\(.*\\)@\\(.*\\)$" nil t) (let ((host (match-string 2)) value) ;; Remove top-level-domain from hostname. (setq host (cdr (reverse (split-string host "\\.")))) ;; Add counts for each host and domain part. (while host (setq value (gethash (car host) domains)) (setf (gethash (car host) domains) (1+ (if (not value) 0 value))) (setq host (cdr host)))))) ;; Output (delete-other-windows) (pop-to-buffer (get-buffer-create "*MH-E Spammer Frequencies*")) (erase-buffer) (maphash (lambda (key value) "" (if (> value 2) (insert (format "%s %s\n" key value)))) domains) (sort-numeric-fields 2 (point-min) (point-max)) (reverse-region (point-min) (point-max)) (goto-char (point-min)))) ;; Bogofilter Interface (defvar mh-bogofilter-executable (executable-find "bogofilter")) ;;;###mh-autoload (defun mh-bogofilter-blacklist (msg) "Blacklist MSG with bogofilter. Bogofilter is a Bayesian spam filtering program. Get it from your local distribution or from the bogofilter web site at URL `http://bogofilter.sourceforge.net/'. Bogofilter is taught by running: bogofilter -n < good-message on every good message, and bogofilter -s < spam-message on every spam message. This is called a full training; three other training methods are described in the FAQ that is distributed with bogofilter. Note that most Bayesian filters need 1000 to 5000 of each type of message to start doing a good job. To use bogofilter, add the following recipes to \".procmailrc\": PATH=$PATH:/usr/bin/mh MAILDIR=$HOME/`mhparam Path` # Fight spam with bogofilter. :0fw | bogofilter -3 -e -p :0: * ^X-Bogosity: Yes, tests=bogofilter spam/. :0: * ^X-Bogosity: Unsure, tests=bogofilter spam/unsure/. If bogofilter classifies a message incorrectly, or is unsure, you can use the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update bogofilter's training. The \"Bogofilter FAQ\" suggests that you run the following occasionally to shrink the database: bogoutil -d wordlist.db | bogoutil -l wordlist.db.new mv wordlist.db wordlist.db.prv mv wordlist.db.new wordlist.db The \"Bogofilter tuning HOWTO\" describes how you can fine-tune Bogofilter." (unless mh-bogofilter-executable (error "Unable to find the bogofilter executable")) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-bogofilter-executable msg-file mh-junk-background nil "-s")))) ;;;###mh-autoload (defun mh-bogofilter-whitelist (msg) "Whitelist MSG with bogofilter. See `mh-bogofilter-blacklist' for more information." (unless mh-bogofilter-executable (error "Unable to find the bogofilter executable")) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-bogofilter-executable msg-file mh-junk-background nil "-n")))) ;; Spamprobe Interface (defvar mh-spamprobe-executable (executable-find "spamprobe")) ;;;###mh-autoload (defun mh-spamprobe-blacklist (msg) "Blacklist MSG with SpamProbe. SpamProbe is a Bayesian spam filtering program. Get it from your local distribution or from the SpamProbe web site at URL `http://spamprobe.sourceforge.net'. To use SpamProbe, add the following recipes to \".procmailrc\": PATH=$PATH:/usr/bin/mh MAILDIR=$HOME/`mhparam Path` # Fight spam with SpamProbe. :0 SCORE=| spamprobe receive :0 wf | formail -I \"X-SpamProbe: $SCORE\" :0: *^X-SpamProbe: SPAM spam/. If SpamProbe classifies a message incorrectly, you can use the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update SpamProbe's training." (unless mh-spamprobe-executable (error "Unable to find the spamprobe executable")) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-spamprobe-executable msg-file mh-junk-background nil "spam")))) ;;;###mh-autoload (defun mh-spamprobe-whitelist (msg) "Whitelist MSG with SpamProbe. See `mh-spamprobe-blacklist' for more information." (unless mh-spamprobe-executable (error "Unable to find the spamprobe executable")) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-spamprobe-executable msg-file mh-junk-background nil "good")))) (provide 'mh-junk) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-junk.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-cus-load.el0000644000175000000620000000462512114520723020063 0ustar wohlerstaff;;; mh-cus-load.el --- automatically extracted custom dependencies ;; Copyright (C) 2003-2012 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Keywords: mail ;;; Commentary: ;; If you installed MH-E separately from Emacs, you can set up its custom ;; dependencies using the following in your .emacs file: ;; (require 'mh-cus-load) ;;; Change Log: ;; ;;; Code: (put 'mh-hooks 'custom-loads '(mh-e)) (put 'mh-sending-mail 'custom-loads '(mh-e)) (put 'mh-sequences 'custom-loads '(mh-e)) (put 'mh-junk 'custom-loads '(mh-e)) (put 'mh-thread 'custom-loads '(mh-e)) (put 'mh-search 'custom-loads '(mh-e)) (put 'mh-alias 'custom-loads '(mh-e)) (put 'mh-tool-bar 'custom-loads '(mh-e)) (put 'mh-letter 'custom-loads '(mh-e)) (put 'mh-identity 'custom-loads '(mh-e)) (put 'mh-e 'custom-loads '(mh-e)) (put 'mh-folder-selection 'custom-loads '(mh-e)) (put 'mh-speedbar 'custom-loads '(mh-e)) (put 'mh-show 'custom-loads '(mh-e)) (put 'mh-inc 'custom-loads '(mh-e)) (put 'faces 'custom-loads '(mh-e)) (put 'mh-faces 'custom-loads '(mh-e)) (put 'mh-scan-line-formats 'custom-loads '(mh-e)) (put 'mail 'custom-loads '(mh-e)) (put 'mh-ranges 'custom-loads '(mh-e)) (put 'mh-folder 'custom-loads '(mh-e)) ;; These are for handling :version. We need to have a minimum of ;; information so `customize-changed-options' could do its job. ;; For groups we set `custom-version', `group-documentation' and ;; `custom-tag' (which are shown in the customize buffer), so we ;; don't have to load the file containing the group. ;; `custom-versions-load-alist' is an alist that has as car a version ;; number and as elts the files that have variables or faces that ;; contain that version. These files should be loaded before showing ;; the customization buffer that `customize-changed-options' ;; generates. ;; This macro is used so we don't modify the information about ;; variables and groups if it's already set. (We don't know when ;; mh-cus-load.el is going to be loaded and at that time some of the ;; files might be loaded and some others might not). (defmacro custom-put-if-not (symbol propname value) `(unless (get ,symbol ,propname) (put ,symbol ,propname ,value))) (defvar custom-versions-load-alist nil "For internal use by custom.") (provide 'mh-cus-load) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t ;; coding: utf-8 ;; End: ;;; mh-cus-load.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-show.el0000644000175000000620000010717712114520723017342 0ustar wohlerstaff;;; mh-show.el --- MH-Show mode ;; Copyright (C) 1993, 1995, 1997, 2000-2013 Free Software Foundation, ;; Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Mode for showing messages. ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-scan) ;; Dynamically-created function not found in mh-loaddefs.el. (autoload 'mh-tool-bar-init "mh-tool-bar") (require 'font-lock) (require 'gnus-cite) (require 'gnus-util) (require 'goto-addr) (autoload 'mh-make-buffer-data "mh-mime") ;can't be automatically generated ;;; MH-Folder Commands (defvar mh-showing-with-headers nil "If non-nil, MH-Show buffer contains message with all header fields. If nil, MH-Show buffer contains message processed normally.") ;;;###mh-autoload (defun mh-show (&optional message redisplay-flag) "Display message\\. If the message under the cursor is already displayed, this command scrolls to the beginning of the message. MH-E normally hides a lot of the superfluous header fields that mailers add to a message, but if you wish to see all of them, use the command \\[mh-header-display]. Two hooks can be used to control how messages are displayed. The first hook, `mh-show-mode-hook', is called early on in the process of the message display. It is usually used to perform some action on the message's content. The second hook, `mh-show-hook', is the last thing called after messages are displayed. It's used to affect the behavior of MH-E in general or when `mh-show-mode-hook' is too early. From a program, optional argument MESSAGE can be used to display an alternative message. The optional argument REDISPLAY-FLAG forces the redisplay of the message even if the show buffer was already displaying the correct message. See the \"mh-show\" customization group for a litany of options that control what displayed messages look like." (interactive (list nil t)) (when (or redisplay-flag (and mh-showing-with-headers (or mh-mhl-format-file mh-clean-message-header-flag))) (mh-invalidate-show-buffer)) (mh-show-msg message)) ;;;###mh-autoload (defun mh-header-display () "Display message with all header fields\\. Use the command \\[mh-show] to show the message normally again." (interactive) (and (not mh-showing-with-headers) (or mh-mhl-format-file mh-clean-message-header-flag) (mh-invalidate-show-buffer)) (let ((mh-decode-mime-flag nil) (mh-mhl-format-file nil) (mh-clean-message-header-flag nil)) (mh-show-msg nil) (mh-in-show-buffer (mh-show-buffer) (goto-char (point-min)) (mh-recenter 0)) (setq mh-showing-with-headers t))) ;;;###mh-autoload (defun mh-show-preferred-alternative () "Display message with the default preferred alternative. This is as if `mm-discouraged-alternatives' is set to nil. Use the command \\[mh-show] to show the message normally again." (interactive) (let ((mm-discouraged-alternatives)) (mh-show nil t))) ;;; Support Routines for MH-Folder Commands ;;;###mh-autoload (defun mh-maybe-show (&optional msg) "Display message at cursor, but only if in show mode. If optional arg MSG is non-nil, display that message instead." (if mh-showing-mode (mh-show msg))) (defun mh-show-msg (msg) "Show MSG. The hook `mh-show-hook' is called after the message has been displayed." (if (not msg) (setq msg (mh-get-msg-num t))) (mh-showing-mode t) (setq mh-page-to-next-msg-flag nil) (let ((folder mh-current-folder) (folders (list mh-current-folder)) (clean-message-header mh-clean-message-header-flag) (show-window (get-buffer-window mh-show-buffer)) (display-mime-buttons-flag mh-display-buttons-for-inline-parts-flag)) (if (not (eq (next-window (minibuffer-window)) (selected-window))) (delete-other-windows)) ; force ourself to the top window (mh-in-show-buffer (mh-show-buffer) (setq mh-display-buttons-for-inline-parts-flag display-mime-buttons-flag) (if (and show-window (equal (mh-msg-filename msg folder) buffer-file-name)) (progn ;just back up to start (goto-char (point-min)) (if (not clean-message-header) (mh-start-of-uncleaned-message))) (mh-display-msg msg folder))) (unless (mh-window-full-height-p) ; not vertically split (shrink-window (- (window-height) (or mh-summary-height (mh-summary-height))))) (mh-recenter nil) ;; The following line is a nop which forces update of the scan line so ;; that font-lock will update it (if needed)... (mh-notate nil nil mh-cmd-note) (if (not (memq msg mh-seen-list)) (setq mh-seen-list (cons msg mh-seen-list))) (when mh-update-sequences-after-mh-show-flag (mh-update-sequences) (when mh-index-data (setq folders (append (mh-index-delete-from-sequence mh-unseen-seq (list msg)) folders))) (when (mh-speed-flists-active-p) (apply #'mh-speed-flists t folders))) (run-hooks 'mh-show-hook))) ;;;###mh-autoload (defun mh-start-of-uncleaned-message () "Position uninteresting headers off the top of the window." (let ((case-fold-search t)) (re-search-forward "^To:\\|^Cc:\\|^From:\\|^Subject:\\|^Date:" nil t) (beginning-of-line) (mh-recenter 0))) (defvar mh-show-buffer-mode-line-buffer-id " {show-%s} %d" "Format string to produce `mode-line-buffer-identification' for show buffers. First argument is folder name. Second is message number.") ;;;###mh-autoload (defun mh-display-msg (msg-num folder-name) "Display MSG-NUM of FOLDER-NAME. Sets the current buffer to the show buffer." (let ((folder (mh-msg-folder folder-name))) (set-buffer folder) ;; When Gnus uses external displayers it has to keep handles longer. So ;; we will delete these handles when mh-quit is called on the folder. It ;; would be nicer if there are weak pointers in emacs lisp, then we could ;; get the garbage collector to do this for us. (unless (mh-buffer-data) (setf (mh-buffer-data) (mh-make-buffer-data))) ;; Bind variables in folder buffer in case they are local (let ((formfile mh-mhl-format-file) (clean-message-header mh-clean-message-header-flag) (invisible-headers mh-invisible-header-fields-compiled) (visible-headers nil) (msg-filename (mh-msg-filename msg-num folder-name)) (show-buffer mh-show-buffer) (mm-inline-media-tests mh-mm-inline-media-tests)) (if (not (file-exists-p msg-filename)) (error "Message %d does not exist" msg-num)) (if (and (> mh-show-maximum-size 0) (> (elt (file-attributes msg-filename) 7) mh-show-maximum-size) (not (y-or-n-p (format "Message %d (%d bytes) exceeds %d bytes. Display it? " msg-num (elt (file-attributes msg-filename) 7) mh-show-maximum-size)))) (error "Message %d not displayed" msg-num)) (set-buffer show-buffer) (cond ((not (equal msg-filename buffer-file-name)) (mh-unvisit-file) (setq buffer-read-only nil) ;; Cleanup old mime handles (mh-mime-cleanup) (erase-buffer) ;; Changing contents, so this hook needs to be reinitialized. ;; pgp.el uses this. (if (boundp 'write-contents-hooks) ;Emacs 19 (kill-local-variable 'write-contents-hooks)) (if formfile (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" (if (stringp formfile) (list "-form" formfile)) msg-filename) (insert-file-contents-literally msg-filename)) ;; Use mm to display buffer (when (and mh-decode-mime-flag (not formfile)) (mh-add-missing-mime-version-header) (setf (mh-buffer-data) (mh-make-buffer-data)) (mh-mime-display)) (mh-show-mode) ;; Header cleanup (goto-char (point-min)) (cond (clean-message-header (mh-clean-msg-header (point-min) invisible-headers visible-headers) (goto-char (point-min))) (t (mh-start-of-uncleaned-message))) (mh-decode-message-header) ;; the parts of visiting we want to do (no locking) (or (eq buffer-undo-list t) ;don't save undo info for prev msgs (setq buffer-undo-list nil)) (set-buffer-auto-saved) ;; the parts of set-visited-file-name we want to do (no locking) (setq buffer-file-name msg-filename) (setq buffer-backed-up nil) (auto-save-mode 1) (set-mark nil) (unwind-protect (when (and mh-decode-mime-flag (not formfile)) (setq buffer-read-only nil) (mh-display-smileys) (mh-display-emphasis)) (setq buffer-read-only t)) (set-buffer-modified-p nil) (setq mh-show-folder-buffer folder) (setq mode-line-buffer-identification (list (format mh-show-buffer-mode-line-buffer-id folder-name msg-num))) (mh-logo-display) (set-buffer folder) (setq mh-showing-with-headers nil)))))) (defun mh-msg-folder (folder-name) "Return the name of the buffer for FOLDER-NAME." folder-name) ;;;###mh-autoload (defun mh-clean-msg-header (start invisible-headers visible-headers) "Flush extraneous lines in message header. Header is cleaned from START to the end of the message header. INVISIBLE-HEADERS contains a regular expression specifying lines to delete from the header. VISIBLE-HEADERS contains a regular expression specifying the lines to display. INVISIBLE-HEADERS is ignored if VISIBLE-HEADERS is non-nil." ;; XXX Note that MH-E no longer supports the `mh-visible-headers' ;; variable, so this function could be trimmed of this feature too." (let ((case-fold-search t) (buffer-read-only nil)) (save-restriction (goto-char start) (if (search-forward "\n\n" nil 'move) (backward-char 1)) (narrow-to-region start (point)) (goto-char (point-min)) (if visible-headers (while (< (point) (point-max)) (cond ((looking-at visible-headers) (forward-line 1) (while (looking-at "[ \t]") (forward-line 1))) (t (mh-delete-line 1) (while (looking-at "[ \t]") (mh-delete-line 1))))) (while (re-search-forward invisible-headers nil t) (beginning-of-line) (mh-delete-line 1) (while (looking-at "[ \t]") (mh-delete-line 1))))) (let ((mh-compose-skipped-header-fields ())) (mh-letter-hide-all-skipped-fields)) (unlock-buffer))) ;;;###mh-autoload (defun mh-invalidate-show-buffer () "Invalidate the show buffer so we must update it to use it." (if (get-buffer mh-show-buffer) (with-current-buffer mh-show-buffer (mh-unvisit-file)))) (defun mh-unvisit-file () "Separate current buffer from the message file it was visiting." (or (not (buffer-modified-p)) (null buffer-file-name) ;we've been here before (yes-or-no-p (format "Message %s modified; discard changes? " (file-name-nondirectory buffer-file-name))) (error "Changes preserved")) (clear-visited-file-modtime) (unlock-buffer) (setq buffer-file-name nil)) (defun mh-summary-height () "Return ideal value for the variable `mh-summary-height'. The current frame height is taken into consideration." (or (and (fboundp 'frame-height) (> (frame-height) 24) (min 10 (/ (frame-height) 6))) 4)) ;; Infrastructure to generate show-buffer functions from folder functions ;; XEmacs does not have deactivate-mark? What is the equivalent of ;; transient-mark-mode for XEmacs? Should we be restoring the mark in the ;; folder buffer after the operation has been carried out. (defmacro mh-defun-show-buffer (function original-function &optional dont-return) "Define FUNCTION to run ORIGINAL-FUNCTION in folder buffer. If the buffer we start in is still visible and DONT-RETURN is nil then switch to it after that." `(defun ,function () ,(format "Calls %s from the message's folder.\n%s\nSee `%s' for more info.\n" original-function (if dont-return "" "When function completes, returns to the show buffer if it is still visible.\n") original-function) (interactive) (when (buffer-live-p (get-buffer mh-show-folder-buffer)) (let ((config (current-window-configuration)) (folder-buffer mh-show-folder-buffer) (normal-exit nil) ,@(if dont-return () '((cur-buffer-name (buffer-name))))) (pop-to-buffer mh-show-folder-buffer nil) (unless (equal (buffer-name (window-buffer (frame-first-window (selected-frame)))) folder-buffer) (delete-other-windows)) (mh-goto-cur-msg t) (mh-funcall-if-exists deactivate-mark) (unwind-protect (prog1 (call-interactively (function ,original-function)) (setq normal-exit t)) (mh-funcall-if-exists deactivate-mark) (when (eq major-mode 'mh-folder-mode) (mh-funcall-if-exists hl-line-highlight)) (cond ((not normal-exit) (set-window-configuration config)) ,(if dont-return `(t (setq mh-previous-window-config config)) `((and (get-buffer cur-buffer-name) (window-live-p (get-buffer-window (get-buffer cur-buffer-name)))) (pop-to-buffer (get-buffer cur-buffer-name) nil))))))))) ;; Generate interactive functions for the show buffer from the corresponding ;; folder functions. (mh-defun-show-buffer mh-show-previous-undeleted-msg mh-previous-undeleted-msg) (mh-defun-show-buffer mh-show-next-undeleted-msg mh-next-undeleted-msg) (mh-defun-show-buffer mh-show-quit mh-quit) (mh-defun-show-buffer mh-show-delete-msg mh-delete-msg) (mh-defun-show-buffer mh-show-refile-msg mh-refile-msg) (mh-defun-show-buffer mh-show-undo mh-undo) (mh-defun-show-buffer mh-show-execute-commands mh-execute-commands) (mh-defun-show-buffer mh-show-reply mh-reply t) (mh-defun-show-buffer mh-show-redistribute mh-redistribute) (mh-defun-show-buffer mh-show-forward mh-forward t) (mh-defun-show-buffer mh-show-header-display mh-header-display) (mh-defun-show-buffer mh-show-refile-or-write-again mh-refile-or-write-again) (mh-defun-show-buffer mh-show-show mh-show) (mh-defun-show-buffer mh-show-show-preferred-alternative mh-show-preferred-alternative) (mh-defun-show-buffer mh-show-write-message-to-file mh-write-msg-to-file) (mh-defun-show-buffer mh-show-extract-rejected-mail mh-extract-rejected-mail t) (mh-defun-show-buffer mh-show-delete-msg-no-motion mh-delete-msg-no-motion) (mh-defun-show-buffer mh-show-first-msg mh-first-msg) (mh-defun-show-buffer mh-show-last-msg mh-last-msg) (mh-defun-show-buffer mh-show-copy-msg mh-copy-msg) (mh-defun-show-buffer mh-show-edit-again mh-edit-again t) (mh-defun-show-buffer mh-show-goto-msg mh-goto-msg) (mh-defun-show-buffer mh-show-inc-folder mh-inc-folder) (mh-defun-show-buffer mh-show-delete-subject-or-thread mh-delete-subject-or-thread) (mh-defun-show-buffer mh-show-delete-subject mh-delete-subject) (mh-defun-show-buffer mh-show-print-msg mh-print-msg) (mh-defun-show-buffer mh-show-send mh-send t) (mh-defun-show-buffer mh-show-toggle-showing mh-toggle-showing t) (mh-defun-show-buffer mh-show-pipe-msg mh-pipe-msg t) (mh-defun-show-buffer mh-show-sort-folder mh-sort-folder) (mh-defun-show-buffer mh-show-visit-folder mh-visit-folder t) (mh-defun-show-buffer mh-show-rescan-folder mh-rescan-folder) (mh-defun-show-buffer mh-show-pack-folder mh-pack-folder) (mh-defun-show-buffer mh-show-kill-folder mh-kill-folder t) (mh-defun-show-buffer mh-show-list-folders mh-list-folders t) (mh-defun-show-buffer mh-show-undo-folder mh-undo-folder) (mh-defun-show-buffer mh-show-delete-msg-from-seq mh-delete-msg-from-seq) (mh-defun-show-buffer mh-show-delete-seq mh-delete-seq) (mh-defun-show-buffer mh-show-list-sequences mh-list-sequences) (mh-defun-show-buffer mh-show-narrow-to-seq mh-narrow-to-seq) (mh-defun-show-buffer mh-show-put-msg-in-seq mh-put-msg-in-seq) (mh-defun-show-buffer mh-show-msg-is-in-seq mh-msg-is-in-seq) (mh-defun-show-buffer mh-show-widen mh-widen) (mh-defun-show-buffer mh-show-narrow-to-subject mh-narrow-to-subject) (mh-defun-show-buffer mh-show-narrow-to-from mh-narrow-to-from) (mh-defun-show-buffer mh-show-narrow-to-cc mh-narrow-to-cc) (mh-defun-show-buffer mh-show-narrow-to-range mh-narrow-to-range) (mh-defun-show-buffer mh-show-narrow-to-to mh-narrow-to-to) (mh-defun-show-buffer mh-show-store-msg mh-store-msg) (mh-defun-show-buffer mh-show-page-digest mh-page-digest) (mh-defun-show-buffer mh-show-page-digest-backwards mh-page-digest-backwards) (mh-defun-show-buffer mh-show-burst-digest mh-burst-digest) (mh-defun-show-buffer mh-show-page-msg mh-page-msg) (mh-defun-show-buffer mh-show-previous-page mh-previous-page) (mh-defun-show-buffer mh-show-modify mh-modify t) (mh-defun-show-buffer mh-show-next-button mh-next-button) (mh-defun-show-buffer mh-show-prev-button mh-prev-button) (mh-defun-show-buffer mh-show-toggle-mime-part mh-folder-toggle-mime-part) (mh-defun-show-buffer mh-show-save-mime-part mh-folder-save-mime-part) (mh-defun-show-buffer mh-show-inline-mime-part mh-folder-inline-mime-part) (mh-defun-show-buffer mh-show-toggle-threads mh-toggle-threads) (mh-defun-show-buffer mh-show-thread-delete mh-thread-delete) (mh-defun-show-buffer mh-show-thread-refile mh-thread-refile) (mh-defun-show-buffer mh-show-update-sequences mh-update-sequences) (mh-defun-show-buffer mh-show-next-unread-msg mh-next-unread-msg) (mh-defun-show-buffer mh-show-previous-unread-msg mh-previous-unread-msg) (mh-defun-show-buffer mh-show-thread-ancestor mh-thread-ancestor) (mh-defun-show-buffer mh-show-thread-next-sibling mh-thread-next-sibling) (mh-defun-show-buffer mh-show-thread-previous-sibling mh-thread-previous-sibling) (mh-defun-show-buffer mh-show-index-visit-folder mh-index-visit-folder t) (mh-defun-show-buffer mh-show-toggle-tick mh-toggle-tick) (mh-defun-show-buffer mh-show-narrow-to-tick mh-narrow-to-tick) (mh-defun-show-buffer mh-show-junk-blacklist mh-junk-blacklist) (mh-defun-show-buffer mh-show-junk-whitelist mh-junk-whitelist) (mh-defun-show-buffer mh-show-index-new-messages mh-index-new-messages) (mh-defun-show-buffer mh-show-index-ticked-messages mh-index-ticked-messages) (mh-defun-show-buffer mh-show-index-sequenced-messages mh-index-sequenced-messages) (mh-defun-show-buffer mh-show-catchup mh-catchup) (mh-defun-show-buffer mh-show-ps-print-toggle-color mh-ps-print-toggle-color) (mh-defun-show-buffer mh-show-ps-print-toggle-faces mh-ps-print-toggle-faces) (mh-defun-show-buffer mh-show-ps-print-msg-file mh-ps-print-msg-file) (mh-defun-show-buffer mh-show-ps-print-msg mh-ps-print-msg) (mh-defun-show-buffer mh-show-toggle-mime-buttons mh-toggle-mime-buttons) (mh-defun-show-buffer mh-show-display-with-external-viewer mh-display-with-external-viewer) ;;; Sequence Menu (easy-menu-define mh-show-sequence-menu mh-show-mode-map "Menu for MH-E folder-sequence." '("Sequence" ["Add Message to Sequence..." mh-show-put-msg-in-seq t] ["List Sequences for Message" mh-show-msg-is-in-seq t] ["Delete Message from Sequence..." mh-show-delete-msg-from-seq t] ["List Sequences in Folder..." mh-show-list-sequences t] ["Delete Sequence..." mh-show-delete-seq t] ["Narrow to Sequence..." mh-show-narrow-to-seq t] ["Widen from Sequence" mh-show-widen t] "--" ["Narrow to Subject Sequence" mh-show-narrow-to-subject t] ["Narrow to Tick Sequence" mh-show-narrow-to-tick (with-current-buffer mh-show-folder-buffer (and mh-tick-seq (mh-seq-msgs (mh-find-seq mh-tick-seq))))] ["Delete Rest of Same Subject" mh-show-delete-subject t] ["Toggle Tick Mark" mh-show-toggle-tick t] "--" ["Push State Out to MH" mh-show-update-sequences t])) ;;; Message Menu (easy-menu-define mh-show-message-menu mh-show-mode-map "Menu for MH-E folder-message." '("Message" ["Show Message" mh-show-show t] ["Show Message with Header" mh-show-header-display t] ["Show Message with Preferred Alternative" mh-show-show-preferred-alternative t] ["Next Message" mh-show-next-undeleted-msg t] ["Previous Message" mh-show-previous-undeleted-msg t] ["Go to First Message" mh-show-first-msg t] ["Go to Last Message" mh-show-last-msg t] ["Go to Message by Number..." mh-show-goto-msg t] ["Modify Message" mh-show-modify t] ["Delete Message" mh-show-delete-msg t] ["Refile Message" mh-show-refile-msg t] ["Undo Delete/Refile" mh-show-undo t] ["Process Delete/Refile" mh-show-execute-commands t] "--" ["Compose a New Message" mh-send t] ["Reply to Message..." mh-show-reply t] ["Forward Message..." mh-show-forward t] ["Redistribute Message..." mh-show-redistribute t] ["Edit Message Again" mh-show-edit-again t] ["Re-edit a Bounced Message" mh-show-extract-rejected-mail t] "--" ["Copy Message to Folder..." mh-show-copy-msg t] ["Print Message" mh-show-print-msg t] ["Write Message to File..." mh-show-write-msg-to-file t] ["Pipe Message to Command..." mh-show-pipe-msg t] ["Unpack Uuencoded Message..." mh-show-store-msg t] ["Burst Digest Message" mh-show-burst-digest t])) ;;; Folder Menu (easy-menu-define mh-show-folder-menu mh-show-mode-map "Menu for MH-E folder." '("Folder" ["Incorporate New Mail" mh-show-inc-folder t] ["Toggle Show/Folder" mh-show-toggle-showing t] ["Execute Delete/Refile" mh-show-execute-commands t] ["Rescan Folder" mh-show-rescan-folder t] ["Thread Folder" mh-show-toggle-threads t] ["Pack Folder" mh-show-pack-folder t] ["Sort Folder" mh-show-sort-folder t] "--" ["List Folders" mh-show-list-folders t] ["Visit a Folder..." mh-show-visit-folder t] ["View New Messages" mh-show-index-new-messages t] ["Search..." mh-search t] "--" ["Quit MH-E" mh-quit t])) ;;; MH-Show Keys (gnus-define-keys mh-show-mode-map " " mh-show-page-msg "!" mh-show-refile-or-write-again "'" mh-show-toggle-tick "," mh-show-header-display "." mh-show-show ":" mh-show-show-preferred-alternative ">" mh-show-write-message-to-file "?" mh-help "E" mh-show-extract-rejected-mail "M" mh-show-modify "\177" mh-show-previous-page "\C-d" mh-show-delete-msg-no-motion "\t" mh-show-next-button [backtab] mh-show-prev-button "\M-\t" mh-show-prev-button "\ed" mh-show-redistribute "^" mh-show-refile-msg "c" mh-show-copy-msg "d" mh-show-delete-msg "e" mh-show-edit-again "f" mh-show-forward "g" mh-show-goto-msg "i" mh-show-inc-folder "k" mh-show-delete-subject-or-thread "m" mh-show-send "n" mh-show-next-undeleted-msg "\M-n" mh-show-next-unread-msg "o" mh-show-refile-msg "p" mh-show-previous-undeleted-msg "\M-p" mh-show-previous-unread-msg "q" mh-show-quit "r" mh-show-reply "s" mh-show-send "t" mh-show-toggle-showing "u" mh-show-undo "x" mh-show-execute-commands "v" mh-show-index-visit-folder "|" mh-show-pipe-msg) (gnus-define-keys (mh-show-folder-map "F" mh-show-mode-map) "?" mh-prefix-help "'" mh-index-ticked-messages "S" mh-show-sort-folder "c" mh-show-catchup "f" mh-show-visit-folder "k" mh-show-kill-folder "l" mh-show-list-folders "n" mh-index-new-messages "o" mh-show-visit-folder "p" mh-show-pack-folder "q" mh-show-index-sequenced-messages "r" mh-show-rescan-folder "s" mh-search "t" mh-show-toggle-threads "u" mh-show-undo-folder "v" mh-show-visit-folder) (gnus-define-keys (mh-show-sequence-map "S" mh-show-mode-map) "'" mh-show-narrow-to-tick "?" mh-prefix-help "d" mh-show-delete-msg-from-seq "k" mh-show-delete-seq "l" mh-show-list-sequences "n" mh-show-narrow-to-seq "p" mh-show-put-msg-in-seq "s" mh-show-msg-is-in-seq "w" mh-show-widen) (define-key mh-show-mode-map "I" mh-inc-spool-map) (gnus-define-keys (mh-show-junk-map "J" mh-show-mode-map) "?" mh-prefix-help "b" mh-show-junk-blacklist "w" mh-show-junk-whitelist) (gnus-define-keys (mh-show-ps-print-map "P" mh-show-mode-map) "?" mh-prefix-help "C" mh-show-ps-print-toggle-color "F" mh-show-ps-print-toggle-faces "f" mh-show-ps-print-msg-file "l" mh-show-print-msg "p" mh-show-ps-print-msg) (gnus-define-keys (mh-show-thread-map "T" mh-show-mode-map) "?" mh-prefix-help "u" mh-show-thread-ancestor "p" mh-show-thread-previous-sibling "n" mh-show-thread-next-sibling "t" mh-show-toggle-threads "d" mh-show-thread-delete "o" mh-show-thread-refile) (gnus-define-keys (mh-show-limit-map "/" mh-show-mode-map) "'" mh-show-narrow-to-tick "?" mh-prefix-help "c" mh-show-narrow-to-cc "g" mh-show-narrow-to-range "m" mh-show-narrow-to-from "s" mh-show-narrow-to-subject "t" mh-show-narrow-to-to "w" mh-show-widen) (gnus-define-keys (mh-show-extract-map "X" mh-show-mode-map) "?" mh-prefix-help "s" mh-show-store-msg "u" mh-show-store-msg) (gnus-define-keys (mh-show-digest-map "D" mh-show-mode-map) "?" mh-prefix-help " " mh-show-page-digest "\177" mh-show-page-digest-backwards "b" mh-show-burst-digest) (gnus-define-keys (mh-show-mime-map "K" mh-show-mode-map) "?" mh-prefix-help "a" mh-mime-save-parts "e" mh-show-display-with-external-viewer "v" mh-show-toggle-mime-part "o" mh-show-save-mime-part "i" mh-show-inline-mime-part "t" mh-show-toggle-mime-buttons "\t" mh-show-next-button [backtab] mh-show-prev-button "\M-\t" mh-show-prev-button) ;;; MH-Show Font Lock (defun mh-header-field-font-lock (field limit) "Return the value of a header field FIELD to font-lock. Argument LIMIT limits search." (if (= (point) limit) nil (let* ((mail-header-end (mh-mail-header-end)) (lesser-limit (if (< mail-header-end limit) mail-header-end limit)) (case-fold-search t)) (when (and (< (point) mail-header-end) ;Only within header (re-search-forward (format "^%s" field) lesser-limit t)) (let ((match-one-b (match-beginning 0)) (match-one-e (match-end 0))) (mh-header-field-end) (if (> (point) limit) ;Don't search for end beyond limit (goto-char limit)) (set-match-data (list match-one-b match-one-e (1+ match-one-e) (point))) t))))) (defun mh-header-to-font-lock (limit) "Return the value of a header field To to font-lock. Argument LIMIT limits search." (mh-header-field-font-lock "To:" limit)) (defun mh-header-cc-font-lock (limit) "Return the value of a header field cc to font-lock. Argument LIMIT limits search." (mh-header-field-font-lock "cc:" limit)) (defun mh-header-subject-font-lock (limit) "Return the value of a header field Subject to font-lock. Argument LIMIT limits search." (mh-header-field-font-lock "Subject:" limit)) (defun mh-letter-header-font-lock (limit) "Return the entire mail header to font-lock. Argument LIMIT limits search." (if (= (point) limit) nil (let* ((mail-header-end (save-match-data (mh-mail-header-end))) (lesser-limit (if (< mail-header-end limit) mail-header-end limit))) (when (mh-in-header-p) (set-match-data (list 1 lesser-limit)) (goto-char lesser-limit) t)))) (defun mh-show-font-lock-fontify-region (beg end loudly) "Limit font-lock in `mh-show-mode' to the header. Used when the option `mh-highlight-citation-style' is set to \"Gnus\", leaving the body to be dealt with by Gnus highlighting. The region between BEG and END is given over to be fontified and LOUDLY controls if a user sees a message about the fontification operation." (let ((header-end (mh-mail-header-end))) (cond ((and (< beg header-end)(< end header-end)) (font-lock-default-fontify-region beg end loudly)) ((and (< beg header-end)(>= end header-end)) (font-lock-default-fontify-region beg header-end loudly)) (t nil)))) (defvar mh-show-font-lock-keywords '(("^\\(From:\\|Sender:\\)\\(.*\\)" (1 'default) (2 'mh-show-from)) (mh-header-to-font-lock (0 'default) (1 'mh-show-to)) (mh-header-cc-font-lock (0 'default) (1 'mh-show-cc)) ("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$" (1 'default) (2 'mh-show-from)) (mh-header-subject-font-lock (0 'default) (1 'mh-show-subject)) ("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)" (1 'default) (2 'mh-show-cc)) ("^\\(In-reply-to\\|Date\\):\\(.*\\)$" (1 'default) (2 'mh-show-date)) (mh-letter-header-font-lock (0 'mh-show-header append t))) "Additional expressions to highlight in MH-Show buffers.") ;;;###mh-autoload (defun mh-show-font-lock-keywords () "Return variable `mh-show-font-lock-keywords'." mh-show-font-lock-keywords) (defvar mh-show-font-lock-keywords-with-cite (let* ((cite-chars "[>|}]") (cite-prefix "A-Za-z") (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) (append mh-show-font-lock-keywords (list ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. `(,cite-chars (,(concat "\\=[ \t]*" "\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" "\\(" cite-chars "[ \t]*\\)\\)+" "\\(.*\\)") (beginning-of-line) (end-of-line) (2 font-lock-constant-face nil t) (4 font-lock-comment-face nil t)))))) "Additional expressions to highlight in MH-Show buffers.") ;;;###mh-autoload (defun mh-show-font-lock-keywords-with-cite () "Return variable `mh-show-font-lock-keywords-with-cite'." mh-show-font-lock-keywords-with-cite) ;;; MH-Show Mode ;; Ensure new buffers won't get this mode if default major-mode is nil. (put 'mh-show-mode 'mode-class 'special) ;; Shush compiler. (defvar font-lock-auto-fontify) ;;;###mh-autoload (define-derived-mode mh-show-mode text-mode "MH-Show" "Major mode for showing messages in MH-E.\\ Email addresses and URLs in the message are highlighted if the option `goto-address-highlight-p' is on, which it is by default. To view the web page for a highlighted URL or to send a message using a highlighted email address, use the middle mouse button or \\[goto-address-at-point]. See Info node `(mh-e)Sending Mail' to see how to configure Emacs to send the message using MH-E. The hook `mh-show-mode-hook' is called upon entry to this mode. See also `mh-folder-mode'. \\{mh-show-mode-map}" (mh-do-in-gnu-emacs (if (boundp 'tool-bar-map) (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map))) (mh-do-in-xemacs (mh-tool-bar-init :show)) (set (make-local-variable 'mail-header-separator) mh-mail-header-separator) (setq paragraph-start (default-value 'paragraph-start)) (mh-show-unquote-From) (mh-show-xface) (mh-show-addr) (setq buffer-invisibility-spec '((vanish . t) t)) (set (make-local-variable 'line-move-ignore-invisible) t) (make-local-variable 'font-lock-defaults) ;;(set (make-local-variable 'font-lock-support-mode) nil) (cond ((equal mh-highlight-citation-style 'font-lock) (setq font-lock-defaults '(mh-show-font-lock-keywords-with-cite t))) ((equal mh-highlight-citation-style 'gnus) (setq font-lock-defaults '((mh-show-font-lock-keywords) t nil nil nil (font-lock-fontify-region-function . mh-show-font-lock-fontify-region))) (mh-gnus-article-highlight-citation)) (t (setq font-lock-defaults '(mh-show-font-lock-keywords t)))) (if (and (featurep 'xemacs) font-lock-auto-fontify) (turn-on-font-lock)) (when mh-decode-mime-flag (mh-make-local-hook 'kill-buffer-hook) (add-hook 'kill-buffer-hook 'mh-mime-cleanup nil t)) (easy-menu-add mh-show-sequence-menu) (easy-menu-add mh-show-message-menu) (easy-menu-add mh-show-folder-menu) (make-local-variable 'mh-show-folder-buffer) (buffer-disable-undo) (setq buffer-read-only t) (use-local-map mh-show-mode-map)) ;;; Support Routines (defun mh-show-unquote-From () "Decode >From at beginning of lines for `mh-show-mode'." (save-excursion (let ((modified (buffer-modified-p)) (case-fold-search nil) (buffer-read-only nil)) (goto-char (mh-mail-header-end)) (while (re-search-forward "^>From" nil t) (replace-match "From")) (set-buffer-modified-p modified)))) ;;;###mh-autoload (defun mh-show-addr () "Use `goto-address'." (goto-address)) ;;;###mh-autoload (defun mh-gnus-article-highlight-citation () "Highlight cited text in current buffer using Gnus." (interactive) ;; Don't allow Gnus to create buttons while highlighting, maybe this is bad ;; style? (mh-cl-flet ((gnus-article-add-button (&rest args) nil)) (let* ((modified (buffer-modified-p)) (gnus-article-buffer (buffer-name)) (gnus-cite-face-list `(,@(cdr gnus-cite-face-list) ,(car gnus-cite-face-list)))) (gnus-article-highlight-citation t) (set-buffer-modified-p modified)))) (provide 'mh-show) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-show.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-thread.el0000644000175000000620000011162612114520723017623 0ustar wohlerstaff;;; mh-thread.el --- MH-E threading support ;; Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; The threading portion of this files tries to implement the ;; algorithm described at: ;; http://www.jwz.org/doc/threading.html ;; It also begins to implement the IMAP Threading extension RFC. The ;; implementation lacks the reference and subject canonicalization of ;; the RFC. ;; In the presentation buffer, children messages are shown indented ;; with either [ ] or < > around them. Square brackets ([ ]) denote ;; that the algorithm can point out some headers which when taken ;; together implies that the unindented message is an ancestor of the ;; indented message. If no such proof exists then angles (< >) are ;; used. ;; If threading is slow on your machine, compile this file. Of all the ;; files in MH-E, this one really benefits from compilation. ;; Some issues and problems are as follows: ;; (1) Scan truncates the fields at length 512. So longer ;; references: headers get mutilated. The same kind of MH ;; format string works when composing messages. Is there a way ;; to avoid this? My scan command is as follows: ;; scan +folder -width 10000 \ ;; -format "%(msg)\n%{message-id}\n%{references}\n%{subject}\n" ;; I would really appreciate it if someone would help me with this. ;; (2) Implement heuristics to recognize message identifiers in ;; In-Reply-To: header. Right now it just assumes that the last ;; text between angles (< and >) is the message identifier. ;; There is the chance that this will incorrectly use an email ;; address like a message identifier. ;; (3) Error checking of found message identifiers should be done. ;; (4) Since this breaks the assumption that message indices ;; increase as one goes down the buffer, the binary search ;; based mh-goto-msg doesn't work. I have a simpler replacement ;; which may be less efficient. ;; (5) Better canonicalizing for message identifier and subject ;; strings. ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-scan) (mh-defstruct (mh-thread-message (:conc-name mh-message-) (:constructor mh-thread-make-message)) (id nil) (references ()) (subject "") (subject-re-p nil)) (mh-defstruct (mh-thread-container (:conc-name mh-container-) (:constructor mh-thread-make-container)) message parent children (real-child-p t)) (defvar mh-thread-id-hash nil "Hashtable used to canonicalize message identifiers.") (make-variable-buffer-local 'mh-thread-id-hash) (defvar mh-thread-subject-hash nil "Hashtable used to canonicalize subject strings.") (make-variable-buffer-local 'mh-thread-subject-hash) (defvar mh-thread-id-table nil "Thread ID table maps from message identifiers to message containers.") (make-variable-buffer-local 'mh-thread-id-table) (defvar mh-thread-index-id-map nil "Table to look up message identifier from message index.") (make-variable-buffer-local 'mh-thread-index-id-map) (defvar mh-thread-id-index-map nil "Table to look up message index number from message identifier.") (make-variable-buffer-local 'mh-thread-id-index-map) (defvar mh-thread-subject-container-hash nil "Hashtable used to group messages by subject.") (make-variable-buffer-local 'mh-thread-subject-container-hash) (defvar mh-thread-duplicates nil "Hashtable used to associate messages with the same message identifier.") (make-variable-buffer-local 'mh-thread-duplicates) (defvar mh-thread-history () "Variable to remember the transformations to the thread tree. When new messages are added, these transformations are rewound, then the links are added from the newly seen messages. Finally the transformations are redone to get the new thread tree. This makes incremental threading easier.") (make-variable-buffer-local 'mh-thread-history) (defvar mh-thread-body-width nil "Width of scan substring that contains subject and body of message.") ;;; MH-Folder Commands ;;;###mh-autoload (defun mh-thread-ancestor (&optional thread-root-flag) "Display ancestor of current message. If you do not care for the way a particular thread has turned, you can move up the chain of messages with this command. This command can also take a prefix argument THREAD-ROOT-FLAG to jump to the message that started everything." (interactive "P") (beginning-of-line) (cond ((not (memq 'unthread mh-view-ops)) (error "Folder isn't threaded")) ((eobp) (error "No message at point"))) (let ((current-level (mh-thread-current-indentation-level))) (cond (thread-root-flag (while (mh-thread-immediate-ancestor)) (mh-maybe-show)) ((equal current-level 1) (message "Message has no ancestor")) (t (mh-thread-immediate-ancestor) (mh-maybe-show))))) ;;;###mh-autoload (defun mh-thread-delete () "Delete thread." (interactive) (cond ((not (memq 'unthread mh-view-ops)) (error "Folder isn't threaded")) ((eobp) (error "No message at point")) (t (let ((region (mh-thread-find-children))) (mh-iterate-on-messages-in-region () (car region) (cadr region) (mh-delete-a-msg nil)) (mh-next-msg))))) ;;;###mh-autoload (defun mh-thread-next-sibling (&optional previous-flag) "Display next sibling. With non-nil optional argument PREVIOUS-FLAG jump to the previous sibling." (interactive) (cond ((not (memq 'unthread mh-view-ops)) (error "Folder isn't threaded")) ((eobp) (error "No message at point"))) (beginning-of-line) (let ((point (point)) (done nil) (my-level (mh-thread-current-indentation-level))) (while (and (not done) (equal (forward-line (if previous-flag -1 1)) 0) (not (eobp))) (let ((level (mh-thread-current-indentation-level))) (cond ((equal level my-level) (setq done 'success)) ((< level my-level) (message "No %s sibling" (if previous-flag "previous" "next")) (setq done 'failure))))) (cond ((eq done 'success) (mh-maybe-show)) ((eq done 'failure) (goto-char point)) (t (message "No %s sibling" (if previous-flag "previous" "next")) (goto-char point))))) ;;;###mh-autoload (defun mh-thread-previous-sibling () "Display previous sibling." (interactive) (mh-thread-next-sibling t)) ;;;###mh-autoload (defun mh-thread-refile (folder) "Refile (output) thread into FOLDER." (interactive (list (intern (mh-prompt-for-refile-folder)))) (cond ((not (memq 'unthread mh-view-ops)) (error "Folder isn't threaded")) ((eobp) (error "No message at point")) (t (let ((region (mh-thread-find-children))) (mh-iterate-on-messages-in-region () (car region) (cadr region) (mh-refile-a-msg nil folder)) (mh-next-msg))))) ;;;###mh-autoload (defun mh-toggle-threads () "Toggle threaded view of folder." (interactive) (let ((msg-at-point (mh-get-msg-num nil)) (old-buffer-modified-flag (buffer-modified-p)) (buffer-read-only nil)) (cond ((memq 'unthread mh-view-ops) (unless (mh-valid-view-change-operation-p 'unthread) (error "Can't unthread folder")) (let ((msg-list ())) (goto-char (point-min)) (while (not (eobp)) (let ((index (mh-get-msg-num nil))) (when index (push index msg-list))) (forward-line)) (mh-scan-folder mh-current-folder (mapcar #'(lambda (x) (format "%s" x)) (mh-coalesce-msg-list msg-list)) t)) (when mh-index-data (mh-index-insert-folder-headers) (mh-notate-cur))) (t (mh-thread-folder) (push 'unthread mh-view-ops))) (when msg-at-point (mh-goto-msg msg-at-point t t)) (set-buffer-modified-p old-buffer-modified-flag) (mh-recenter nil))) ;;; Support Routines (defun mh-thread-current-indentation-level () "Find the number of spaces by which current message is indented." (save-excursion (let ((address-start-offset (+ mh-cmd-note mh-scan-date-flag-width mh-scan-date-width 1)) (level 0)) (beginning-of-line) (forward-char address-start-offset) (while (char-equal (char-after) ? ) (incf level) (forward-char)) level))) (defun mh-thread-immediate-ancestor () "Jump to immediate ancestor in thread tree." (beginning-of-line) (let ((point (point)) (ancestor-level (- (mh-thread-current-indentation-level) 2)) (done nil)) (if (< ancestor-level 0) nil (while (and (not done) (equal (forward-line -1) 0)) (when (equal ancestor-level (mh-thread-current-indentation-level)) (setq done t))) (unless done (goto-char point)) done))) (defun mh-thread-find-children () "Return a region containing the current message and its children. The result is returned as a list of two elements. The first is the point at the start of the region and the second is the point at the end." (beginning-of-line) (if (eobp) nil (let ((address-start-offset (+ mh-cmd-note mh-scan-date-flag-width mh-scan-date-width 1)) (level (mh-thread-current-indentation-level)) spaces begin) (setq begin (point)) (setq spaces (format (format "%%%ss" (1+ level)) "")) (forward-line) (block nil (while (not (eobp)) (forward-char address-start-offset) (unless (equal (string-match spaces (buffer-substring-no-properties (point) (mh-line-end-position))) 0) (beginning-of-line) (backward-char) (return)) (forward-line))) (list begin (point))))) ;;; Thread Creation (defun mh-thread-folder () "Generate thread view of folder." (message "Threading %s..." (buffer-name)) (mh-thread-initialize) (goto-char (point-min)) (mh-remove-all-notation) (let ((msg-list ())) (mh-iterate-on-range msg (cons (point-min) (point-max)) (setf (gethash msg mh-thread-scan-line-map) (mh-thread-parse-scan-line)) (push msg msg-list)) (let* ((range (mh-coalesce-msg-list msg-list)) (thread-tree (mh-thread-generate (buffer-name) range))) (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) (message "Threading %s...done" (buffer-name))))) ;;;###mh-autoload (defun mh-thread-inc (folder start-point) "Update thread tree for FOLDER. All messages after START-POINT are added to the thread tree." (mh-thread-rewind-pruning) (mh-remove-all-notation) (goto-char start-point) (let ((msg-list ())) (while (not (eobp)) (let ((index (mh-get-msg-num nil))) (when (numberp index) (push index msg-list) (setf (gethash index mh-thread-scan-line-map) (mh-thread-parse-scan-line))) (forward-line))) (let ((thread-tree (mh-thread-generate folder msg-list)) (buffer-read-only nil) (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)))) (defmacro mh-thread-initialize-hash (var test) "Initialize the hash table in VAR. TEST is the test to use when creating a new hash table." (unless (symbolp var) (error "Expected a symbol: %s" var)) `(if ,var (clrhash ,var) (setq ,var (make-hash-table :test ,test)))) (defun mh-thread-initialize () "Make new hash tables, or clear them if already present." (mh-thread-initialize-hash mh-thread-id-hash #'equal) (mh-thread-initialize-hash mh-thread-subject-hash #'equal) (mh-thread-initialize-hash mh-thread-id-table #'eq) (mh-thread-initialize-hash mh-thread-id-index-map #'eq) (mh-thread-initialize-hash mh-thread-index-id-map #'eql) (mh-thread-initialize-hash mh-thread-scan-line-map #'eql) (mh-thread-initialize-hash mh-thread-subject-container-hash #'eq) (mh-thread-initialize-hash mh-thread-duplicates #'eq) (setq mh-thread-history ())) (defsubst mh-thread-id-container (id) "Given ID, return the corresponding container in `mh-thread-id-table'. If no container exists then a suitable container is created and the id-table is updated." (when (not id) (error "1")) (or (gethash id mh-thread-id-table) (setf (gethash id mh-thread-id-table) (let ((message (mh-thread-make-message :id id))) (mh-thread-make-container :message message))))) (defsubst mh-thread-remove-parent-link (child) "Remove parent link of CHILD if it exists." (let* ((child-container (if (mh-thread-container-p child) child (mh-thread-id-container child))) (parent-container (mh-container-parent child-container))) (when parent-container (setf (mh-container-children parent-container) (loop for elem in (mh-container-children parent-container) unless (eq child-container elem) collect elem)) (setf (mh-container-parent child-container) nil)))) (defsubst mh-thread-add-link (parent child &optional at-end-p) "Add links so that PARENT becomes a parent of CHILD. Doesn't make any changes if CHILD is already an ancestor of PARENT. If optional argument AT-END-P is non-nil, the CHILD is added to the end of the children list of PARENT." (let ((parent-container (cond ((null parent) nil) ((mh-thread-container-p parent) parent) (t (mh-thread-id-container parent)))) (child-container (if (mh-thread-container-p child) child (mh-thread-id-container child)))) (when (and parent-container (not (mh-thread-ancestor-p child-container parent-container)) (not (mh-thread-ancestor-p parent-container child-container))) (mh-thread-remove-parent-link child-container) (cond ((not at-end-p) (push child-container (mh-container-children parent-container))) ((null (mh-container-children parent-container)) (push child-container (mh-container-children parent-container))) (t (let ((last-child (mh-container-children parent-container))) (while (cdr last-child) (setq last-child (cdr last-child))) (setcdr last-child (cons child-container nil))))) (setf (mh-container-parent child-container) parent-container)) (unless parent-container (mh-thread-remove-parent-link child-container)))) (defun mh-thread-rewind-pruning () "Restore the thread tree to its state before pruning." (while mh-thread-history (let ((action (pop mh-thread-history))) (cond ((eq (car action) 'DROP) (mh-thread-remove-parent-link (cadr action)) (mh-thread-add-link (caddr action) (cadr action))) ((eq (car action) 'PROMOTE) (let ((node (cadr action)) (parent (caddr action)) (children (cdddr action))) (dolist (child children) (mh-thread-remove-parent-link child) (mh-thread-add-link node child)) (mh-thread-add-link parent node))) ((eq (car action) 'SUBJECT) (let ((node (cadr action))) (mh-thread-remove-parent-link node) (setf (mh-container-real-child-p node) t))))))) (defun mh-thread-ancestor-p (ancestor successor) "Return t if ANCESTOR is really an ancestor of SUCCESSOR and nil otherwise. In the limit, the function returns t if ANCESTOR and SUCCESSOR are the same containers." (block nil (while successor (when (eq ancestor successor) (return t)) (setq successor (mh-container-parent successor))) nil)) ;; Another and may be better approach would be to generate all the info from ;; the scan which generates the threading info. For now this will have to do. ;;;###mh-autoload (defun mh-thread-parse-scan-line (&optional string) "Parse a scan line. If optional argument STRING is given then that is assumed to be the scan line. Otherwise uses the line at point as the scan line to parse." (let* ((string (or string (buffer-substring-no-properties (mh-line-beginning-position) (mh-line-end-position)))) (address-start (+ mh-cmd-note mh-scan-field-from-start-offset)) (body-start (+ mh-cmd-note mh-scan-field-from-end-offset)) (first-string (substring string 0 address-start))) (list first-string (substring string address-start (- body-start 2)) (substring string body-start) string))) (defsubst mh-thread-canonicalize-id (id) "Produce canonical string representation for ID. This allows cheap string comparison with EQ." (or (and (equal id "") (copy-sequence "")) (gethash id mh-thread-id-hash) (setf (gethash id mh-thread-id-hash) id))) (defsubst mh-thread-prune-subject (subject) "Prune leading Re:'s, Fwd:'s etc. and trailing (fwd)'s from SUBJECT. If the result after pruning is not the empty string then it is canonicalized so that subjects can be tested for equality with eq. This is done so that all the messages without a subject are not put into a single thread." (let ((case-fold-search t) (subject-pruned-flag nil)) ;; Prune subject leader (while (or (string-match "^[ \t]*\\(re\\|fwd?\\)\\(\\[[0-9]*\\]\\)?:[ \t]*" subject) (string-match "^[ \t]*\\[[^\\]][ \t]*" subject)) (setq subject-pruned-flag t) (setq subject (substring subject (match-end 0)))) ;; Prune subject trailer (while (or (string-match "(fwd)$" subject) (string-match "[ \t]+$" subject)) (setq subject-pruned-flag t) (setq subject (substring subject 0 (match-beginning 0)))) ;; Canonicalize subject only if it is non-empty (cond ((equal subject "") (list subject subject-pruned-flag)) (t (list (or (gethash subject mh-thread-subject-hash) (setf (gethash subject mh-thread-subject-hash) subject)) subject-pruned-flag))))) (defsubst mh-thread-group-by-subject (roots) "Group the set of message containers, ROOTS based on subject. Bug: Check for and make sure that something without Re: is made the parent in preference to something that has it." (clrhash mh-thread-subject-container-hash) (let ((results ())) (dolist (root roots) (let* ((subject (mh-thread-container-subject root)) (parent (gethash subject mh-thread-subject-container-hash))) (cond (parent (mh-thread-remove-parent-link root) (mh-thread-add-link parent root t) (setf (mh-container-real-child-p root) nil) (push `(SUBJECT ,root) mh-thread-history)) (t (setf (gethash subject mh-thread-subject-container-hash) root) (push root results))))) (nreverse results))) (defun mh-thread-container-subject (container) "Return the subject of CONTAINER. If CONTAINER is empty return the subject info of one of its children." (cond ((and (mh-container-message container) (mh-message-id (mh-container-message container))) (mh-message-subject (mh-container-message container))) (t (block nil (dolist (kid (mh-container-children container)) (when (and (mh-container-message kid) (mh-message-id (mh-container-message kid))) (let ((kid-message (mh-container-message kid))) (return (mh-message-subject kid-message))))) (error "This can't happen"))))) (defsubst mh-thread-update-id-index-maps (id index) "Message with id, ID is the message in INDEX. The function also checks for duplicate messages (that is multiple messages with the same ID). These messages are put in the `mh-thread-duplicates' hash table." (let ((old-index (gethash id mh-thread-id-index-map))) (when old-index (push old-index (gethash id mh-thread-duplicates))) (setf (gethash id mh-thread-id-index-map) index) (setf (gethash index mh-thread-index-id-map) id))) (defsubst mh-thread-get-message-container (message) "Return container which has MESSAGE in it. If there is no container present then a new container is allocated." (let* ((id (mh-message-id message)) (container (gethash id mh-thread-id-table))) (cond (container (setf (mh-container-message container) message) container) (t (setf (gethash id mh-thread-id-table) (mh-thread-make-container :message message)))))) (defsubst mh-thread-get-message (id subject-re-p subject refs) "Return appropriate message. Otherwise update message already present to have the proper ID, SUBJECT-RE-P, SUBJECT and REFS fields." (let* ((container (gethash id mh-thread-id-table)) (message (if container (mh-container-message container) nil))) (cond (message (setf (mh-message-subject-re-p message) subject-re-p) (setf (mh-message-subject message) subject) (setf (mh-message-id message) id) (setf (mh-message-references message) refs) message) (container (setf (mh-container-message container) (mh-thread-make-message :id id :references refs :subject subject :subject-re-p subject-re-p))) (t (let ((message (mh-thread-make-message :id id :references refs :subject-re-p subject-re-p :subject subject))) (prog1 message (mh-thread-get-message-container message))))))) (defvar mh-message-id-regexp "^<.*@.*>$" "Regexp to recognize whether a string is a message identifier.") ;;;###mh-autoload (defun mh-thread-generate (folder msg-list) "Scan FOLDER to get info for threading. Only information about messages in MSG-LIST are added to the tree." (with-temp-buffer (mh-thread-set-tables folder) (when msg-list (apply #'call-process (expand-file-name mh-scan-prog mh-progs) nil '(t nil) nil "-width" "10000" "-format" "%(msg)\n%{message-id}\n%{references}\n%{in-reply-to}\n%{subject}\n" folder (mapcar #'(lambda (x) (format "%s" x)) msg-list))) (goto-char (point-min)) (let ((roots ()) (case-fold-search t)) (block nil (while (not (eobp)) (block process-message (let* ((index-line (prog1 (buffer-substring (point) (mh-line-end-position)) (forward-line))) (index (string-to-number index-line)) (id (prog1 (buffer-substring (point) (mh-line-end-position)) (forward-line))) (refs (prog1 (buffer-substring (point) (mh-line-end-position)) (forward-line))) (in-reply-to (prog1 (buffer-substring (point) (mh-line-end-position)) (forward-line))) (subject (prog1 (buffer-substring (point) (mh-line-end-position)) (forward-line))) (subject-re-p nil)) (unless (gethash index mh-thread-scan-line-map) (return-from process-message)) (unless (integerp index) (return)) ;Error message here (multiple-value-setq (subject subject-re-p) (values-list (mh-thread-prune-subject subject))) (setq in-reply-to (mh-thread-process-in-reply-to in-reply-to)) (setq refs (loop for x in (append (split-string refs) in-reply-to) when (string-match mh-message-id-regexp x) collect x)) (setq id (mh-thread-canonicalize-id id)) (mh-thread-update-id-index-maps id index) (setq refs (mapcar #'mh-thread-canonicalize-id refs)) (mh-thread-get-message id subject-re-p subject refs) (do ((ancestors refs (cdr ancestors))) ((null (cdr ancestors)) (when (car ancestors) (mh-thread-remove-parent-link id) (mh-thread-add-link (car ancestors) id))) (mh-thread-add-link (car ancestors) (cadr ancestors))))))) (maphash #'(lambda (k v) (declare (ignore k)) (when (null (mh-container-parent v)) (push v roots))) mh-thread-id-table) (setq roots (mh-thread-prune-containers roots)) (prog1 (setq roots (mh-thread-group-by-subject roots)) (let ((history mh-thread-history)) (set-buffer folder) (setq mh-thread-history history)))))) (defun mh-thread-set-tables (folder) "Use the tables of FOLDER in current buffer." (mh-cl-flet ((mh-get-table (symbol) (with-current-buffer folder (symbol-value symbol)))) (setq mh-thread-id-hash (mh-get-table 'mh-thread-id-hash)) (setq mh-thread-subject-hash (mh-get-table 'mh-thread-subject-hash)) (setq mh-thread-id-table (mh-get-table 'mh-thread-id-table)) (setq mh-thread-id-index-map (mh-get-table 'mh-thread-id-index-map)) (setq mh-thread-index-id-map (mh-get-table 'mh-thread-index-id-map)) (setq mh-thread-scan-line-map (mh-get-table 'mh-thread-scan-line-map)) (setq mh-thread-subject-container-hash (mh-get-table 'mh-thread-subject-container-hash)) (setq mh-thread-duplicates (mh-get-table 'mh-thread-duplicates)) (setq mh-thread-history (mh-get-table 'mh-thread-history)))) (defun mh-thread-process-in-reply-to (reply-to-header) "Extract message id's from REPLY-TO-HEADER. Ideally this should have some regexp which will try to guess if a string between < and > is a message id and not an email address. For now it will take the last string inside angles." (let ((end (mh-search-from-end ?> reply-to-header))) (when (numberp end) (let ((begin (mh-search-from-end ?< (substring reply-to-header 0 end)))) (when (numberp begin) (list (substring reply-to-header begin (1+ end)))))))) (defun mh-thread-prune-containers (roots) "Prune empty containers in the containers ROOTS." (let ((dfs-ordered-nodes ()) (work-list roots)) (while work-list (let ((node (pop work-list))) (dolist (child (mh-container-children node)) (push child work-list)) (push node dfs-ordered-nodes))) (while dfs-ordered-nodes (let ((node (pop dfs-ordered-nodes))) (cond ((gethash (mh-message-id (mh-container-message node)) mh-thread-id-index-map) ;; Keep it (setf (mh-container-children node) (mh-thread-sort-containers (mh-container-children node)))) ((and (mh-container-children node) (or (null (cdr (mh-container-children node))) (mh-container-parent node))) ;; Promote kids (let ((children ())) (dolist (kid (mh-container-children node)) (mh-thread-remove-parent-link kid) (mh-thread-add-link (mh-container-parent node) kid) (push kid children)) (push `(PROMOTE ,node ,(mh-container-parent node) ,@children) mh-thread-history) (mh-thread-remove-parent-link node))) ((mh-container-children node) ;; Promote the first orphan to parent and add the other kids as ;; his children (setf (mh-container-children node) (mh-thread-sort-containers (mh-container-children node))) (let ((new-parent (car (mh-container-children node))) (other-kids (cdr (mh-container-children node)))) (mh-thread-remove-parent-link new-parent) (dolist (kid other-kids) (mh-thread-remove-parent-link kid) (setf (mh-container-real-child-p kid) nil) (mh-thread-add-link new-parent kid t)) (push `(PROMOTE ,node ,(mh-container-parent node) ,new-parent ,@other-kids) mh-thread-history) (mh-thread-remove-parent-link node))) (t ;; Drop it (push `(DROP ,node ,(mh-container-parent node)) mh-thread-history) (mh-thread-remove-parent-link node))))) (let ((results ())) (maphash #'(lambda (k v) (declare (ignore k)) (when (and (null (mh-container-parent v)) (gethash (mh-message-id (mh-container-message v)) mh-thread-id-index-map)) (push v results))) mh-thread-id-table) (mh-thread-sort-containers results)))) (defun mh-thread-sort-containers (containers) "Sort a list of message CONTAINERS to be in ascending order wrt index." (sort containers #'(lambda (x y) (when (and (mh-container-message x) (mh-container-message y)) (let* ((id-x (mh-message-id (mh-container-message x))) (id-y (mh-message-id (mh-container-message y))) (index-x (gethash id-x mh-thread-id-index-map)) (index-y (gethash id-y mh-thread-id-index-map))) (and (integerp index-x) (integerp index-y) (< index-x index-y))))))) (defvar mh-thread-last-ancestor) ;;;###mh-autoload (defun mh-thread-print-scan-lines (thread-tree) "Print scan lines in THREAD-TREE in threaded mode." (let ((mh-thread-body-width (- (window-width) mh-cmd-note (1- mh-scan-field-subject-start-offset))) (mh-thread-last-ancestor nil)) (if (null mh-index-data) (mh-thread-generate-scan-lines thread-tree -2) (loop for x in (mh-index-group-by-folder) do (let* ((old-map mh-thread-scan-line-map) (mh-thread-scan-line-map (make-hash-table))) (setq mh-thread-last-ancestor nil) (loop for msg in (cdr x) do (let ((v (gethash msg old-map))) (when v (setf (gethash msg mh-thread-scan-line-map) v)))) (when (> (hash-table-count mh-thread-scan-line-map) 0) (insert (if (bobp) "" "\n") (car x) "\n") (mh-thread-generate-scan-lines thread-tree -2)))) (mh-index-create-imenu-index)))) (defun mh-thread-generate-scan-lines (tree level) "Generate scan lines. TREE is the hierarchical tree of messages, SCAN-LINE-MAP maps message indices to the corresponding scan lines and LEVEL used to determine indentation of the message." (cond ((null tree) nil) ((mh-thread-container-p tree) (let* ((message (mh-container-message tree)) (id (mh-message-id message)) (index (gethash id mh-thread-id-index-map)) (duplicates (gethash id mh-thread-duplicates)) (new-level (+ level 2)) (dupl-flag t) (force-angle-flag nil) (increment-level-flag nil)) (dolist (scan-line (mapcar (lambda (x) (gethash x mh-thread-scan-line-map)) (reverse (cons index duplicates)))) (when scan-line (when (and dupl-flag (equal level 0) (mh-thread-ancestor-p mh-thread-last-ancestor tree)) (setq level (+ level 2) new-level (+ new-level 2) force-angle-flag t)) (when (equal level 0) (setq mh-thread-last-ancestor tree) (while (mh-container-parent mh-thread-last-ancestor) (setq mh-thread-last-ancestor (mh-container-parent mh-thread-last-ancestor)))) (let* ((lev (if dupl-flag level new-level)) (square-flag (or (and (mh-container-real-child-p tree) (not force-angle-flag) dupl-flag) (equal lev 0)))) (insert (car scan-line) (format (format "%%%ss" lev) "") (if square-flag "[" "<") (cadr scan-line) (if square-flag "]" ">") (truncate-string-to-width (caddr scan-line) (- mh-thread-body-width lev)) "\n")) (setq increment-level-flag t) (setq dupl-flag nil))) (unless increment-level-flag (setq new-level level)) (dolist (child (mh-container-children tree)) (mh-thread-generate-scan-lines child new-level)))) (t (let ((nlevel (+ level 2))) (dolist (ch tree) (mh-thread-generate-scan-lines ch nlevel)))))) ;;; Additional Utilities ;;;###mh-autoload (defun mh-thread-update-scan-line-map (msg notation offset) "In threaded view update `mh-thread-scan-line-map'. MSG is the message being notated with NOTATION at OFFSET." (let* ((msg (or msg (mh-get-msg-num nil))) (cur-scan-line (and mh-thread-scan-line-map (gethash msg mh-thread-scan-line-map))) (old-scan-lines (loop for map in mh-thread-scan-line-map-stack collect (and map (gethash msg map))))) (when cur-scan-line (setf (aref (car cur-scan-line) offset) notation)) (dolist (line old-scan-lines) (when line (setf (aref (car line) offset) notation))))) ;;;###mh-autoload (defun mh-thread-find-msg-subject (msg) "Find canonicalized subject of MSG. This function can only be used the folder is threaded." (ignore-errors (mh-message-subject (mh-container-message (gethash (gethash msg mh-thread-index-id-map) mh-thread-id-table))))) ;;;###mh-autoload (defun mh-thread-add-spaces (count) "Add COUNT spaces to each scan line in `mh-thread-scan-line-map'." (let ((spaces (format (format "%%%ss" count) ""))) (while (not (eobp)) (let* ((msg-num (mh-get-msg-num nil)) (old-line (nth 3 (gethash msg-num mh-thread-scan-line-map)))) (when (numberp msg-num) (setf (gethash msg-num mh-thread-scan-line-map) (mh-thread-parse-scan-line (format "%s%s" spaces old-line))))) (forward-line 1)))) ;;;###mh-autoload (defun mh-thread-forget-message (index) "Forget the message INDEX from the threading tables." (let* ((id (gethash index mh-thread-index-id-map)) (id-index (gethash id mh-thread-id-index-map)) (duplicates (gethash id mh-thread-duplicates))) (remhash index mh-thread-index-id-map) (remhash index mh-thread-scan-line-map) (cond ((and (eql index id-index) (null duplicates)) (remhash id mh-thread-id-index-map)) ((eql index id-index) (setf (gethash id mh-thread-id-index-map) (car duplicates)) (setf (gethash (car duplicates) mh-thread-index-id-map) id) (setf (gethash id mh-thread-duplicates) (cdr duplicates))) (t (setf (gethash id mh-thread-duplicates) (remove index duplicates)))))) (provide 'mh-thread) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-thread.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-gnus.el0000644000175000000620000001400612114520723017322 0ustar wohlerstaff;;; mh-gnus.el --- make MH-E compatible with various versions of Gnus ;; Copyright (C) 2003-2004, 2006-2013 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require 'gnus-util nil t) (mh-require 'mm-bodies nil t) (mh-require 'mm-decode nil t) (mh-require 'mm-view nil t) (mh-require 'mml nil t) ;; Copy of function from gnus-util.el. ;; TODO This is not in Gnus 5.11. (defun-mh mh-gnus-local-map-property gnus-local-map-property (map) "Return a list suitable for a text property list specifying keymap MAP." (cond ((featurep 'xemacs) (list 'keymap map)) ((>= emacs-major-version 21) (list 'keymap map)) (t (list 'local-map map)))) ;; Copy of function from mm-decode.el. (defun-mh mh-mm-merge-handles mm-merge-handles (handles1 handles2) (append (if (listp (car handles1)) handles1 (list handles1)) (if (listp (car handles2)) handles2 (list handles2)))) ;; Copy of function from mm-decode.el. (defun-mh mh-mm-set-handle-multipart-parameter mm-set-handle-multipart-parameter (handle parameter value) ;; HANDLE could be a CTL. (when handle (put-text-property 0 (length (car handle)) parameter value (car handle)))) ;; Copy of function from mm-view.el. (defun-mh mh-mm-inline-text-vcard mm-inline-text-vcard (handle) (let ((inhibit-read-only t)) (mm-insert-inline handle (concat "\n-- \n" (ignore-errors (if (fboundp 'vcard-pretty-print) (vcard-pretty-print (mm-get-part handle)) (vcard-format-string (vcard-parse-string (mm-get-part handle) 'vcard-standard-filter)))))))) ;; Function from mm-decode.el used in PGP messages. Just define it with older ;; Gnus to avoid compiler warning. (defun-mh mh-mm-possibly-verify-or-decrypt mm-possibly-verify-or-decrypt (parts ctl) nil) ;; Copy of macro in mm-decode.el. (defmacro-mh mh-mm-handle-multipart-ctl-parameter mm-handle-multipart-ctl-parameter (handle parameter) `(get-text-property 0 ,parameter (car ,handle))) ;; Copy of function in mm-decode.el. (defun-mh mh-mm-readable-p mm-readable-p (handle) "Say whether the content of HANDLE is readable." (and (< (with-current-buffer (mm-handle-buffer handle) (buffer-size)) 10000) (mm-with-unibyte-buffer (mm-insert-part handle) (and (eq (mm-body-7-or-8) '7bit) (not (mh-mm-long-lines-p 76)))))) ;; Copy of function in mm-bodies.el. (defun-mh mh-mm-long-lines-p mm-long-lines-p (length) "Say whether any of the lines in the buffer is longer than LENGTH." (save-excursion (goto-char (point-min)) (end-of-line) (while (and (not (eobp)) (not (> (current-column) length))) (forward-line 1) (end-of-line)) (and (> (current-column) length) (current-column)))) (defun-mh mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle) ;; Released Gnus doesn't keep handles associated with externally displayed ;; MIME parts. So this will always return nil. nil) (defun-mh mh-mm-destroy-parts mm-destroy-parts (list) "Older versions of Emacs don't have this function." nil) (defun-mh mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles) "Emacs 21 and XEmacs don't have this function." nil) ;; Copy of function in mml.el. (defun-mh mh-mml-minibuffer-read-disposition mml-minibuffer-read-disposition (type &optional default filename) (unless default (setq default (mml-content-disposition type filename))) (let ((disposition (completing-read (format "Disposition (default %s): " default) '(("attachment") ("inline") ("")) nil t nil nil default))) (if (not (equal disposition "")) disposition default))) ;; This is mm-save-part from Gnus 5.11 since that function in Emacs ;; 21.2 is buggy (the args to read-file-name are incorrect) and the ;; version in Emacs 22 is not consistent with C-x C-w in that you ;; can't just specify a directory and have the right thing happen. (defun mh-mm-save-part (handle &optional prompt) "Write HANDLE to a file. PROMPT overrides the default one used to ask user for a file name." (let ((filename (or (mail-content-type-get (mm-handle-disposition handle) 'filename) (mail-content-type-get (mm-handle-type handle) 'name))) file) (when filename (setq filename (gnus-map-function mm-file-name-rewrite-functions (file-name-nondirectory filename)))) (setq file (read-file-name (or prompt "Save MIME part to: ") (or mm-default-directory default-directory) nil nil (or filename ""))) (setq mm-default-directory (file-name-directory file)) (and (or (not (file-exists-p file)) (yes-or-no-p (format "File %s already exists; overwrite? " file))) (progn (mm-save-part-to-file handle file) file)))) (defun mh-mm-text-html-renderer () "Find the renderer Gnus is using to display text/html MIME parts." (or (and (boundp 'mm-inline-text-html-renderer) mm-inline-text-html-renderer) (and (boundp 'mm-text-html-renderer) mm-text-html-renderer))) (provide 'mh-gnus) ;; Local Variables: ;; no-byte-compile: t ;; no-update-autoloads: t ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-gnus.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-limit.el0000644000175000000620000003033312114520723017465 0ustar wohlerstaff;;; mh-limit.el --- MH-E display limits ;; Copyright (C) 2001-2003, 2006-2013 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; "Poor man's threading" by psg. ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (require 'mh-scan) (autoload 'message-fetch-field "message") ;;; MH-Folder Commands ;; Alphabetical. ;;;###mh-autoload (defun mh-delete-subject () "Delete messages with same subject\\. To delete messages faster, you can use this command to delete all the messages with the same subject as the current message. This command puts these messages in a sequence named \"subject\". You can undo this action by using \\[mh-undo] with a prefix argument and then specifying the \"subject\" sequence." (interactive) (let ((count (mh-subject-to-sequence nil))) (cond ((not count) ; No subject line, delete msg anyway (mh-delete-msg (mh-get-msg-num t))) ((= 0 count) ; No other msgs, delete msg anyway. (message "No other messages with same Subject following this one") (mh-delete-msg (mh-get-msg-num t))) (t ; We have a subject sequence. (message "Marked %d messages for deletion" count) (mh-delete-msg 'subject))))) ;;;###mh-autoload (defun mh-delete-subject-or-thread () "Delete messages with same subject or thread\\. To delete messages faster, you can use this command to delete all the messages with the same subject as the current message. This command puts these messages in a sequence named \"subject\". You can undo this action by using \\[mh-undo] with a prefix argument and then specifying the \"subject\" sequence. However, if the buffer is displaying a threaded view of the folder then this command behaves like \\[mh-thread-delete]." (interactive) (if (memq 'unthread mh-view-ops) (mh-thread-delete) (mh-delete-subject))) ;;;###mh-autoload (defun mh-narrow-to-cc (&optional pick-expr) "Limit to messages with the same \"Cc:\" field. With a prefix argument, edit PICK-EXPR. Use \\\\[mh-widen] to undo this command." (interactive (list (mh-edit-pick-expr (mh-quote-pick-expr (mh-current-message-header-field 'cc))))) (mh-narrow-to-header-field 'cc pick-expr)) ;;;###mh-autoload (defun mh-narrow-to-from (&optional pick-expr) "Limit to messages with the same \"From:\" field. With a prefix argument, edit PICK-EXPR. Use \\\\[mh-widen] to undo this command." (interactive (list (mh-edit-pick-expr (mh-quote-pick-expr (mh-current-message-header-field 'from))))) (mh-narrow-to-header-field 'from pick-expr)) ;;;###mh-autoload (defun mh-narrow-to-range (range) "Limit to RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. Use \\\\[mh-widen] to undo this command." (interactive (list (mh-interactive-range "Narrow to"))) (when (assoc 'range mh-seq-list) (mh-delete-seq 'range)) (mh-add-msgs-to-seq (mh-range-to-msg-list range) 'range) (mh-narrow-to-seq 'range)) ;;;###mh-autoload (defun mh-narrow-to-subject (&optional pick-expr) "Limit to messages with same subject. With a prefix argument, edit PICK-EXPR. The string Re: is removed from the search. Use \\\\[mh-widen] to undo this command." (interactive (list (mh-edit-pick-expr (mh-quote-pick-expr (mh-current-message-header-field 'subject))))) (setq pick-expr (let ((case-fold-search t)) (loop for s in pick-expr collect (mh-replace-regexp-in-string "re: *" "" s)))) (mh-narrow-to-header-field 'subject pick-expr)) ;;;###mh-autoload (defun mh-narrow-to-to (&optional pick-expr) "Limit to messages with the same \"To:\" field. With a prefix argument, edit PICK-EXPR. Use \\\\[mh-widen] to undo this command." (interactive (list (mh-edit-pick-expr (mh-quote-pick-expr (mh-current-message-header-field 'to))))) (mh-narrow-to-header-field 'to pick-expr)) ;;; Support Routines (defun mh-subject-to-sequence (all) "Put all following messages with same subject in sequence 'subject. If arg ALL is t, move to beginning of folder buffer to collect all messages. If arg ALL is nil, collect only messages fron current one on forward. Return number of messages put in the sequence: nil -> there was no subject line. 0 -> there were no later messages with the same subject (sequence not made) >1 -> the total number of messages including current one." (if (memq 'unthread mh-view-ops) (mh-subject-to-sequence-threaded all) (mh-subject-to-sequence-unthreaded all))) (defun mh-subject-to-sequence-threaded (all) "Put all messages with the same subject in the 'subject sequence. This function works when the folder is threaded. In this situation the subject could get truncated and so the normal matching doesn't work. The parameter ALL is non-nil then all the messages in the buffer are considered, otherwise only the messages after the current one are taken into account." (let* ((cur (mh-get-msg-num nil)) (subject (mh-thread-find-msg-subject cur)) region msgs) (if (null subject) (and (message "No subject line") nil) (setq region (cons (if all (point-min) (point)) (point-max))) (mh-iterate-on-range msg region (when (eq (mh-thread-find-msg-subject msg) subject) (push msg msgs))) (setq msgs (sort msgs #'mh-lessp)) (if (null msgs) 0 (when (assoc 'subject mh-seq-list) (mh-delete-seq 'subject)) (mh-add-msgs-to-seq msgs 'subject) (length msgs))))) (defvar mh-limit-max-subject-size 41 "Maximum size of the subject part. It would be desirable to avoid hard-coding this.") (defun mh-subject-to-sequence-unthreaded (all) "Put all following messages with same subject in sequence 'subject. This function only works with an unthreaded folder. If arg ALL is t, move to beginning of folder buffer to collect all messages. If arg ALL is nil, collect only messages fron current one on forward. Return number of messages put in the sequence: nil -> there was no subject line. 0 -> there were no later messages with the same subject (sequence not made) >1 -> the total number of messages including current one." (if (not (eq major-mode 'mh-folder-mode)) (error "Not in a folder buffer")) (save-excursion (beginning-of-line) (if (or (not (looking-at mh-scan-subject-regexp)) (not (match-string 3)) (string-equal "" (match-string 3))) (progn (message "No subject line") nil) (let ((subject (mh-match-string-no-properties 3)) (list)) (if (> (length subject) mh-limit-max-subject-size) (setq subject (substring subject 0 mh-limit-max-subject-size))) (save-excursion (if all (goto-char (point-min))) (while (re-search-forward mh-scan-subject-regexp nil t) (let ((this-subject (mh-match-string-no-properties 3))) (if (> (length this-subject) mh-limit-max-subject-size) (setq this-subject (substring this-subject 0 mh-limit-max-subject-size))) (if (string-equal this-subject subject) (setq list (cons (mh-get-msg-num t) list)))))) (cond (list ;; If we created a new sequence, add the initial message to it too. (if (not (member (mh-get-msg-num t) list)) (setq list (cons (mh-get-msg-num t) list))) (if (assoc 'subject mh-seq-list) (mh-delete-seq 'subject)) ;; sort the result into a sequence (let ((sorted-list (sort (copy-sequence list) 'mh-lessp))) (while sorted-list (mh-add-msgs-to-seq (car sorted-list) 'subject nil) (setq sorted-list (cdr sorted-list))) (safe-length list))) (t 0)))))) (defun mh-edit-pick-expr (default) "With prefix arg edit a pick expression. 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 "")) (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 \" is converted to (\"-subject\" \"a b c\" \"-from\" \"Joe User \"" (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)) (defun mh-current-message-header-field (header-field) "Return a pick regexp to match HEADER-FIELD of the message at point." (let ((num (mh-get-msg-num nil))) (when num (let ((folder mh-current-folder)) (with-temp-buffer (insert-file-contents-literally (mh-msg-filename num folder)) (goto-char (point-min)) (when (search-forward "\n\n" nil t) (narrow-to-region (point-min) (point))) (let* ((field (or (message-fetch-field (format "%s" header-field)) "")) (field-option (format "-%s" header-field)) (patterns (loop for x in (split-string field "[ ]*,[ ]*") unless (equal x "") collect (if (string-match "<\\(.*@.*\\)>" x) (match-string 1 x) x)))) (when patterns (loop with accum = `(,field-option ,(car patterns)) for e in (cdr patterns) do (setq accum `(,field-option ,e "-or" ,@accum)) finally return accum)))))))) (defun mh-narrow-to-header-field (header-field pick-expr) "Limit to messages whose HEADER-FIELD match PICK-EXPR. The MH command pick is used to do the match." (let ((folder mh-current-folder) (original (mh-coalesce-msg-list (mh-range-to-msg-list (cons (point-min) (point-max))))) (msg-list ())) (with-temp-buffer (apply #'mh-exec-cmd-output "pick" nil folder (append original (list "-list") pick-expr)) (goto-char (point-min)) (while (not (eobp)) (let ((num (ignore-errors (string-to-number (buffer-substring (point) (mh-line-end-position)))))) (when num (push num msg-list)) (forward-line)))) (if (null msg-list) (message "No matches") (when (assoc 'header mh-seq-list) (mh-delete-seq 'header)) (mh-add-msgs-to-seq msg-list 'header) (mh-narrow-to-seq 'header)))) (provide 'mh-limit) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-limit.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/ChangeLog0000644000175000000620000043034112114520723017200 0ustar wohlerstaff2013-03-02 Bill Wohler Release MH-E version 8.5. * mh-e.el (Version, mh-version): Update for release 8.5. 2012-12-10 Jeffrey C Honig * mh-folder.el (mh-inc-folder): Revert SF #2321115, SF #250 which processed pending deletes and refiles. Call to mh-process-or-undo-commands to insure that pending changes are properly tagged after including new mail (closes SF #271). * mh-comp.el: Insure that mail-header-separator is set before invoking any mml functions (closes SF #270). 2013-01-23 Dmitry Antipov * mh-acros.el (mh-do-at-event-location): Use point-marker. * mh-search.el (mh-index-create-imenu-index): Likewise. * mh-xface.el (mh-x-image-url-display): Likewise. 2012-11-25 Bill Wohler Release MH-E version 8.4. * mh-e.el (Version, mh-version): Update for release 8.4. * mh-comp.el (mh-regexp-in-field-syntax-table): Fix docstring. (mh-edit-again): Format. (mh-components-to-list): Fix docstring. (mh-regexp-in-field-p): Remove unused variable `field'. * mh-compat.el (mh-define-obsolete-variable-alias) (mh-make-obsolete-variable): New macros to fix XEmacs compiler warnings. * mh-letter.el (mh-yank-hooks): Use new mh-make-obsolete-variable macro. * mh-e.el (mh-kill-folder-suppress-prompt-hooks): Use new mh-define-obsolete-variable-alias macro. * mh-compat.el (mh-cl-flet): New alias for cl-flet on Emacs 24 and flet elsewhere. * mh-thread.el (mh-thread-set-tables): Replace flet with new alias mh-cl-flet. * mh-show.el (mh-gnus-article-highlight-citation): Replace flet with new alias mh-cl-flet. * mh-mime.el (mh-display-with-external-viewer, mh-mime-display) (mh-press-button, mh-push-button, mh-display-emphasis): Replace flet with new alias mh-cl-flet. * mh-e.el (mh-invisible-header-fields-internal): Remove trailing whitespace. 2012-11-25 Jeffrey C Honig * mh-comp.el: (mh-edit-again): Use the components file to specify default values for missing headers in the draft. (mh-regexp-in-field-syntax-table, mh-fcc-syntax-table) (mh-addr-syntax-table, mh-regexp-in-field-p): Use a syntax table so we'll properly parse non-address fields. (mh-components-to-list, mh-extract-header-field): New functions to read components file. (mh-find-components, mh-send-sub): Move code to locate components file into a new function. (mh-insert-auto-fields, mh-modify-header-field): New syntax for calling mh-regexp-in-field-p (closes SF #1708292). * mh-e.el (mh-invisible-header-fields-internal): Added: X-xsi. (addresses SF #1916032). * mh-folder.el (mh-inc-folder): Call mh-process-or-undo-commands before running to insure we do not lose any pending changes. (closes SF #2321115). 2012-11-25 Ted Phelps Postpone junk processing (closes SF #2945712). Patch submitted by Ted Phelps and refined by Bill Wohler. * mh-e.el (mh-blacklist, mh-whitelist): New variables. (mh-whitelist-preserves-sequences-flag): New option. (mh-before-commands-processed-hook): Update documentation. (mh-blacklist-msg-hook, mh-whitelist-msg-hook): New hooks. (mh-folder-blacklisted, mh-folder-whitelisted): New faces. * mh-folder.el (mh-folder-message-menu): Add "Junk" to "Undo." (mh-folder-font-lock-keywords): Add regexps for blacklisted and whitelisted messages. (mh-folder-mode): Add mh-blacklist and mh-whitelist variables. (mh-execute-commands): Update documentation. (mh-undo, mh-outstanding-commands-p, mh-process-commands) (mh-delete-a-msg, mh-refile-a-msg, mh-undo-msg): Handle blacklisted and whitelisted messages. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Update to put messages in blacklist and whitelist respectively for latter processing. (mh-blacklist-a-msg, mh-junk-whitelist-a-msg): New function to support previous functions. (mh-junk-blacklist-disposition): New function. (mh-junk-process-blacklist, mh-junk-process-whitelist): New functions that perform the blacklisting and whitelisting respectively that used to be performed by mh-junk-blacklist and mh-junk-whitelist. * mh-scan.el (mh-scan-blacklisted-msg-regexp) (mh-scan-whitelisted-msg-regexp): New scan line regexps. (mh-scan-good-msg-regexp): Add B and W characters to regexp. (mh-scan-cmd-note-width): Update documentation. (mh-note-blacklisted, mh-note-whitelisted): New scan line characters. * mh-search.el (mh-index-execute-commands): Handle blacklisted and whitelisted messages. 2012-11-25 Jeffrey C Honig * mh-e.el (mh-invisible-header-fields-internal): Added: Bounces-To:, Bounces_to:, X-ACL-Warn:, X-BFI:, X-BPS1:, X-BPS2:, X-Campaign-Id:, X-Campaign:, X-Cloudmark-SP-, X-Destination-ID:, X-detected-operating-system:, X-DocGen-Version:, X-EM-, X-Email-Type-Id:, X-FB-SS:, X-FuHaFi:, X-MailFlowPolicy:, X-mail_abuse-inquires, X-MailingID:, X-Match:, X-MaxCode-Template:, X-ME-Bayesian:, X-Sendergroup:, X-SFDC-, X-SMFBL:, X-SMHeaderMap:, X-VGI-OESCD:, X-VirtualServer:, X-VirtualServerGroup:, X-XPT-XSL-Name:, X-Y-GMX-Trusted:, X-XWALL-, X-ZixNet:. Changed X-Habeas-SWE- to X-Habeas-. Updated the comment. (addresses SF #1916032). 2012-11-25 Bill Wohler * mh-e.el (mh-invisible-header-fields-internal): Add X-AnalysisOut, X-Authentication-Info, X-Auto-Response-Suppress, X-Bayes-Prob, X-Cam-, X-CanIt-Geo, X-Completed, X-Facebook, X-Forwarded-, X-Generated-By, X-Headers-End, X-IEEE-UCE, X-Jira-Fingerprint, X-Junkmail-, X-Launchpad-, X-MXL-Hash, X-Notification-, X-Notifications, X-Oracle-Calendar. Replace X-DCC-Usenix-Metrics with X-DCC- (addresses SF #1916032). 2012-11-25 Jeffrey C Honig * mh-letter.el (mh-yank-cur-msg): Replace usage of set-buffer with with-current-buffer in mh-yang-cur-msg, semantics changed in emacs 23 and we do not want to use set-buffer unless we actually want to change the buffer the user is looking at (closes SF #2830504). * mh-show.el (mh-show-folder-map): Add missing key binding for mh-show-pack-folder (closes SF #3466086). 2012-11-25 Bill Wohler * mh-e.el (Version, mh-version): Add +bzr to version. 2012-10-23 Stefan Monnier * mh-letter.el (mh-yank-hooks): Use make-obsolete-variable. 2012-04-25 Stefan Monnier * mh-utils.el (minibuffer-completing-file-name): Don't declare, unused. 2012-04-21 Juanma Barranquero * mh-folder.el (top): Check whether which-func-modes is t before adding mh-folder-mode. 2011-11-20 Bill Wohler * Release MH-E version 8.3.1. * mh-e.el (Version, mh-version): Update for release 8.3.1. 2011-11-20 Juanma Barranquero * mh-utils.el (mh-folder-list): Fix typo. (mh-children-p): Move part of the docstring to a comment. 2011-11-16 Juanma Barranquero * mh-search.el (mh-pick-parse-search-buffer): Fix typo. 2011-09-20 Bill Wohler Release MH-E version 8.3. * mh-e.el (Version, mh-version): Update for release 8.3. 2011-07-30 Bill Wohler * mh-show.el (mh-unvisit-file): Clarify language in yes-or-no-p and error messages. 2011-07-17 Bill Wohler Release MH-E version 8.2.93. * mh-e.el (Version, mh-version): Update for release 8.2.93. * mh-compat.el (mh-pop-to-buffer-same-window): Delete. * mh-folder.el (mh-inc-folder, mh-modify, mh-scan-folder) (mh-make-folder): Revert to switch-to-buffer, as the Emacs folks decided that it was fine to use it in programs. 2011-07-16 Bill Wohler Release MH-E version 8.2.92. * mh-e.el (Version, mh-version): Update for release 8.2.92. 2011-07-12 Bill Wohler Release MH-E version 8.2.91. * mh-e.el (Version, mh-version): Update for release 8.2.91. * mh-compat.el (mh-pop-to-buffer-same-window): Add compatibility function to call switch-to-buffer on systems that lack pop-to-buffer-same-window. * mh-folder.el (mh-inc-folder, mh-modify, mh-scan-folder) (mh-make-folder): Call mh-pop-to-buffer-same-window instead of switch-to-buffer. The previous change which used pop-to-buffer produced the wrong behavior. 2011-07-12 Henrique Martins (tiny change) * mh-xface.el (mh-picon-get-image): Remove quote from block argument. * mh-mime.el (mh-mh-directive-present-p): Ditto. 2011-07-10 Bill Wohler Release MH-E version 8.2.90. * mh-e.el (Version, mh-version): Update for release 8.2.90. * mh-utils.el (mh-sub-folders-actual): Remove FIXME question. * mh-mime.el (mh-decode-message-subject): Fix case of Subject. * mh-folder.el (mh-inc-folder, mh-modify, mh-scan-folder) (mh-make-folder): Replace calls to switch-to-buffer with of pop-to-buffer. The former is intended for interactive use only and generates warnings in Emacs 24. 2011-07-09 Bill Wohler * mh-speed.el (mh-speed-toggle,mh-speed-view): Document "ignored" arguments to keep checkdoc happy. * mh-search.el (mh-flists-execute): Ditto. * mh-funcs.el (mh-undo-folder): Ditto. * mh-comp.el (mh-user-agent-compose): Ditto. * mh-xface.el (mh-face-to-png, mh-uncompface) (mh-picon-file-contents): Only call set-buffer-multibyte if it exists, which it doesn't in XEmacs. 2011-07-04 Bill Wohler * mh-e.el: Just require mh-loaddefs since loading it in an eval-and-compile block causes compilation errors in XEmacs. * mh-acros.el, mh-comp.el, mh-e.el, mh-folder.el, mh-letter.el: * mh-mime.el, mh-search.el, mh-seq.el: Shush XEmacs compiler in mh-do-in-xemacs block. * mh-compat.el (mh-window-full-height-p): Add compatibility function for XEmacs. * mh-show.el (mh-show-msg): Use it, and avoid compiler warning on XEmacs. * mh-letter.el (mh-letter-mode-map, mh-letter-complete) (mh-complete-word): Remove FIXME comments since these functions are still needed in other Emacsen. However, they can probably stand to be generalized like completion-at-point. (mh-letter-complete-or-space): Remove unused variable. 2011-07-03 Bill Wohler * mh-compat.el (mh-test-completion): Add compatibility function for XEmacs. * mh-alias.el (mh-alias-letter-expand-alias): Use it, and avoid compiler warning on XEmacs. * mh-utils.el: * mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block. * mh-folder.el: Use boundp instead of fboundp when testing existence of desktop-buffer-mode-handlers (closes SF #1510145). 2011-05-10 Jim Meyering Fix doubled-word typos. * mh-alias.el (mh-alias-minibuffer-confirm-address): if if -> if it * mh-scan.el (mh-scan-destination-width): in in -> in 2011-04-28 Stefan Monnier * mh-utils.el (mh-folder-completion-function): Make it work like file-name completion, so partial-completion can do its job. * mh-letter.el (mh-letter-completion-at-point): New function, extracted from mh-letter-complete (mh-letter-mode, mh-letter-complete, mh-letter-complete-or-space): Use it. (mh-complete-word): Only use the common-substring arg when it works. (mh-folder-expand-at-point): * mh-alias.el (mh-alias-letter-expand-alias): Return data suitable for completion-at-point-functions. 2011-04-06 Juanma Barranquero * mh-funcs.el (mh-undo-folder): Accept and ignore arguments, for compatibility with `revert-buffer'. Doc fix. (Bug#8431) 2011-03-07 Chong Yidong * Version 23.3 released. 2011-03-05 Antoine Levitt * mh-funcs.el (mh-store-msg, mh-store-buffer): * mh-mime.el (mh-mime-save-parts): Use read-directory-name. 2011-01-13 Chong Yidong * mh-comp.el (mh-user-agent-compose): New arg RETURN-ACTION. 2010-11-07 Glenn Morris * mh-seq.el (mh-read-msg-list): Use point-at-eol. 2010-11-03 Glenn Morris * mh-mime.el (dots, type, ov): Avoid unnecessary declaration. 2010-05-14 Peter S Galbraith * mh-mime.el (mh-decode-message-subject): New function to decode RFC2047 encoded Subject lines. Used for reply drafts. * mh-comp.el (mh-compose-and-send-mail): Call `mh-decode-message-subject' on (reply or forward) message drafts. 2010-05-07 Chong Yidong * Version 23.2 released. 2010-05-03 Stefan Monnier * mh-show.el (mh-showing-mode): Move function to mh-e.el. * mh-e.el (mh-showing-mode): Use define-minor-mode. 2010-03-24 Juanma Barranquero * mh-scan.el (mh-scan-cmd-note-width): Doc fix. (mh-scan-format-mh, mh-scan-body-regexp, mh-scan-cur-msg-number-regexp) (mh-scan-cur-msg-number-regexp, mh-scan-date-regexp) (mh-scan-deleted-msg-regexp, mh-scan-good-msg-regexp) (mh-scan-msg-format-regexp, mh-scan-msg-format-string) (mh-scan-msg-number-regexp, mh-scan-rcpt-regexp) (mh-scan-refiled-msg-regexp, mh-scan-sent-to-me-sender-regexp) (mh-scan-subject-regexp, mh-update-scan-format) (mh-msg-num-width-to-column): Fix typos in docstrings. 2010-03-10 Chong Yidong * Branch for 23.2. 2009-12-01 Bill Wohler * mh-search.el (mh-mairix-execute-search): Use mh vfolder_format. Fix typo in database path. (mh-namazu-execute-search): Specify -q in example since namazu is excessively garrulous. 2009-11-05 Stefan Monnier * mh-thread.el (mh-thread-set-tables): * mh-speed.el (mh-folder-speedbar-menu-items, mh-speed-stealth-update): (mh-speed-extract-folder-name, mh-speed-parse-flists-output): (mh-speed-invalidate-map, mh-speed-add-folder): * mh-show.el (mh-invalidate-show-buffer, mh-show-sequence-menu): * mh-seq.el (mh-list-sequences): * mh-search.el (mh-index-execute-commands, mh-index-add-to-sequence) (mh-index-delete-from-sequence, mh-index-update-maps): * mh-scan.el (mh-msg-num-width): * mh-print.el (mh-ps-spool-buffer): * mh-mime.el (mh-mime-save-parts, mh-handle-set-external-undisplayer) (mh-file-mime-type): * mh-letter.el (mh-yank-cur-msg): * mh-funcs.el (mh-list-folders, mh-pipe-msg, mh-store-msg) (mh-store-buffer): * mh-folder.el (mh-modify, mh-visit-folder, mh-write-msg-to-file) (mh-prompt-for-refile-folder): * mh-e.el (mh-exec-cmd, mh-exec-cmd-error, mh-exec-cmd-daemon) (mh-handle-process-error, mh-variant-info): * mh-comp.el (mh-forward): * mh-alias.el (mh-alias-local-users, mh-alias-which-file-has-alias): (mh-alias-add-alias-to-file): Use with-current-buffer (closes SF #1903293). 2009-11-04 Stefan Monnier * mh-e.el: Load mh-loaddefs during compilation as well. 2009-11-04 Juanma Barranquero * mh-e.el (mh-loaddefs): Load rather than require. 2009-10-06 Glenn Morris * mh-show.el (mh-show-msg): Use window-full-height-p. 2009-08-28 Stefan Monnier * mh-comp.el (mh-send-letter): default-buffer-file-coding-system => (default-value 'buffer-file-coding-system). 2009-08-10 Bill Wohler * mh-junk.el (mh-spamassassin-blacklist, mh-bogofilter-blacklist) (mh-spamprobe-blacklist): Sync docstring with manual. 2009-07-22 Kevin Ryde * mh-junk.el (mh-spamassassin-blacklist, mh-bogofilter-blacklist) (mh-spamprobe-blacklist): Hyperlink URLs in docstrings with URL `...'. 2009-06-13 Bill Wohler Release MH-E version 8.2. * mh-e.el (Version, mh-version): Update for release 8.2. * mh-seq.el (mh-folder-size-flist) * mh-speed.el (mh-speed-parse-flists-output) * mh-xface.el (mh-face-display-function): Remove trailing space. 2009-03-13 D. Goel * mh-seq.el (mh-folder-size-flist): Use (values-list) in m-v call to list. * mh-speed.el (mh-speed-parse-flists-output): Ditto. * mh-xface.el (mh-face-display-function): Ditto. * mh-search.el (mh-index-parse-search-regexp): Ditto. * mh-thread.el (mh-thread-generate): Ditto. * mh-seq.el (mh-parse-flist-output-line): Return list rather than values. We want to avoid emacs using m-v facilities. (mh-folder-size-folder): Ditto. (mh-parse-flist-output-line): Ditto. * mh-thread.el (mh-thread-prune-subject): Ditto. * mh-xface.el (mh-picon-get-image): Ditto. (mh-picon-file-contents): Ditto. * mh-search.el (mh-index-evaluate): Ditto. 2009-01-27 Bill Wohler * mh-funcs.el (mh-pack-folder): Fix docstring. * mh-e.el (mh-pack-folder-hook): Bump package-version to 8.2. * mh-gnus.el (mh-mm-merge-handles) (mh-mm-set-handle-multipart-parameter, mh-mm-inline-text-vcard) (mh-mml-minibuffer-read-disposition, mh-mm-save-part): Update with code from Gnus 5.11 (closes SF #2235022). 2009-01-26 Stephen Gildea * mh-e.el (mh-pack-folder-hook): New variable. * mh-funcs.el (mh-pack-folder): Call new mh-pack-folder-hook. 2009-01-26 Bill Wohler * mh-utils.el (mh-goto-header-end): Use mh-mail-header-separator instead of -* in regexp. * mh-folder.el (mh-folder-mode-help-messages): Add e and t to K's help. 2009-01-09 Glenn Morris * mh-letter.el: Replace last-input-char with last-input-event. 2008-08-18 Bill Wohler Release MH-E version 8.1. * mh-e.el (Version, mh-version): Update for release 8.1. 2008-08-11 Bill Wohler * mh-e.el (mh-variant-mh-info, mh-variant-nmh-info) (mh-variant-set-variant, mh-variant-p, mh-profile-component) (mh-variant-set, mh-variant, mh-scan-format-file): Fix typo in docstring. * mh-comp.el (mh-reply) * mh-e.el (mh-sys-path, mh-variant-info, mh-variant-mu-mh-info) (mh-variant-p, mh-profile-component, mh-variant-set, mh-variant) (mh-scan-format-file) * mh-folder.el (mh-regenerate-headers) * mh-scan.el (mh-scan-format) * mh-search.el (mh-pick-regexp-builder): Rename variant mu-mh to gnu-mh and be explicit about GNU mailutils MH in docstrings (with thanks to Darel Henman) (closes SF #1768928). 2008-08-01 Bill Wohler * mh-show.el (mh-show-preferred-alternative) * mh-e.el (mh-annotate-msg-hook): Sync docstring with manual. * mh-comp.el (mh-send-letter, mh-redistribute): Mention mh-annotate-msg-hook in docstring. 2008-06-29 Jeffrey C Honig * mh-e.el (mh-invisible-header-fields-internal): Add invisible header fields for X-Hz (mail from Hertz), X-Proofpoint (Proofpoint antivirus/anti-spam) and X-RIM (Research In Motion). 2008-06-20 Stephen Eglen * mh-show.el (mh-defun-show-buffer): Use `...' rather than "..." in generated docstrings. 2008-06-12 Glenn Morris * mh-seq.el (tool-bar-map): Define for compiler. * mh-folder.el (mh-folder-mode): * mh-letter.el (mh-letter-mode): * mh-show.el (mh-show-mode): Check tool-bar-map is bound. 2008-06-08 John Paul Wallington * mh-acros.el (toplevel): Put `doc-string-elt' properties on `defun-mh' and `defmacro-mh'. * mh-alias.el (mh-alias-read-address-map): Define within defvar. * mh-comp.el (mh-letter-mode-syntax-table): Define within defvar. * mh-letter.el (mh-complete-word): Doc fix. 2008-06-02 John Paul Wallington * mh-e.el (mh-exec-cmd-env-daemon): Doc fix. 2008-06-01 John Paul Wallington * mh-e.el (mh-path, mh-variant): Use dotted syntax for `package-version' info. 2008-05-26 Jeffrey C Honig * mh-e.el (mh-invisible-header-fields-internal): Remove Newsgroups from the list. Add Bytes, X-Campaignid, X-Country-Chain, X-Declude-, X-fmx-, X-Identity, X-Mailer_, X-pair-, X-SPF-, X-Usenet-Provider. 2008-05-23 Bill Wohler * mh-e.el (mh-invisible-header-fields-internal): Remove DKIM-Signature as it is covered by DKIM-. Fully qualify X-EID. 2008-05-19 Sergey Poznyakoff * mh-mime.el (mh-mh-to-mime, mh-mh-to-mime-undo): Preserve modes when converting to or from MIME (closes SF #1966722). 2008-05-19 Bill Wohler * mh-e.el (mh-invisible-header-fields-internal): Sort list in a case-insensitive way and add comment about it. Add many header fields (closes SF #1916032). 2008-05-19 Xavier Maillard (tiny change) * mh-utils.el (mh-find-path): Don't throw error if MH environment variable is being used (closes SF #1946861). 2008-05-19 Nick Dokos (tiny change) * mh-search.el (mh-mairix-regexp-builder): Add additional items to search string to support org-mode (closes SF #1965704). 2008-03-18 Bill Wohler * mh-e.el (mh-invisible-header-fields-internal): Add Accreditor, Seal-Send-Time. (mh-invisible-header-fields, mh-invisible-header-fields-default): Update URL to bug report for users to report ignored fields. 2008-03-12 Stefan Monnier * mh-xface.el (mh-uncompface, mh-picon-file-contents): Use set-buffer-multibyte... (mh-face-display-function, mh-x-image-display): ...rather than bind default-enable-multibyte-characters. 2008-02-24 Bill Wohler * mh-comp.el (mh-send-letter): Call split-string on mh-send-args when sending synchronously too. 2008-02-19 Bill Wohler * mh-comp.el (mh-annotate-msg): * mh-e.el (mh-invisible-header-fields-internal): Remove trailing whitespace. 2008-01-30 Bill Wohler * mh-mime.el (mh-mml-to-mime): Don't look up sender if From absent. Fixes "Wrong type argument: stringp, nil" error. 2007-12-02 Glenn Morris * mh-mime.el (mail-strip-quoted-names): Autoload it. 2007-11-17 Dan Nicolaescu * mh-e.el (mh-xemacs-flag): Remove. (mh-min-colors-defined-flag): * mh-xface.el (mh-show-xface-function): * mh-utils.el (mh-colors-available-p): * mh-show.el (mh-show-mode): * mh-gnus.el (mh-gnus-local-map-property): * mh-folder.el (mh-folder-mode-map) (mh-remove-xemacs-horizontal-scrollbar, mh-folder-mode): * mh-comp.el (mh-insert-x-mailer): Replace uses of mh-xemacs-flag with (featurep 'xemacs). 2007-09-11 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to version. 2007-08-25 Stephen Gildea * mh-e.el (mh-annotate-msg-hook): New variable. * mh-comp.el (mh-annotate-msg): Call new mh-annotate-msg-hook. (mh-annotate-list): New variable, for mh-annotate-msg-hook. 2007-08-21 Jeffrey C Honig * mh-folder.el (mh-folder-message-menu, mh-folder-mode-map): Add folder mode support for mh-show-preferred-alternative (closes SF #1777321). * mh-show.el (mh-show-preferred-alternative) (mh-show-write-message-to-file, mh-show-message-menu) (mh-show-mode-map): Add mh-show-preferred-alternative (bound to ":") which will show the message's preferred alternative overriding the users configured preference. Useful for showing HTML when text content is lacking (closes SF #1777321). * mh-e.el: (mh-invisible-header-fields-internal): Exclude Fax and Phone. Put known exclusions as comments before the list and move parens to separate lines to aid in sorting (closes SF #1701231). * mh-mime.el (mm-decode-body): Remove explicit autoload of mh-alias-expand. * mh-alias.el (mh-alias-expand): Set up automatic autoload of mh-alias-expand. 2007-08-20 Jeffrey C Honig * mh-mime.el (message-options-set): Add missing autoloads from my last change. * mh-comp.el (mh-forward): When forwarding with mml, messages are no longer included in reverse order (closes SF #1730393). * mh-mime.el (mh-mml-forward-message): Forward messages as inline attachments (closes SF #1378993). 2008-02-06 Richard Stallman * mh-seq.el (mh-make-seq, mh-seq-name): Use defsubst. * mh-acros.el (mh-do-in-gnu-emacs, mh-do-in-xemacs) (with-mh-folder-updating, mh-in-show-buffer) (mh-iterate-on-messages-in-region, mh-iterate-on-range): (mh-do-at-event-location): Add debug decls. (mh-seq-msgs): Use defsubst. 2008-02-05 Juanma Barranquero * mh-e.el (mh-scan-format-file-check, mh-adaptive-cmd-note-flag-check): * mh-xface.el (mh-x-image-url-cache-canonicalize): Replace `legal' with `valid'. 2007-08-19 Jeffrey C Honig * mh-e.el (mh-invisible-header-fields-internal): We want to show Comments: and hide Comment:, not the other way around. * mh-mime.el (mh-mml-to-mime): GPG requires e-mail addresses, not aliases. So resolve aliases before passing addresses to GPG/PGP (closes SF #649226). * mh-e.el (mh-invisible-header-fields-internal): Update with all the entries from http://people.dsv.su.se/~jpalme/ietf/mail-headers, plus some of my own. I added attributions to entries we already had that did not list an RFC. 2007-08-08 Glenn Morris * mh-folder.el, mh-letter.el, mh-show.el: Replace `iff' in doc-strings and comments. 2007-07-25 Glenn Morris * Relicense all FSF files to GPLv3 or later. 2007-07-11 Bill Wohler * mh-compat.el (mh-display-color-cells): Fix on XEmacs 21.5b28. Thanks to Henrique Martins for the help (closes SF #1749774). 2007-06-06 Juanma Barranquero * mh-mime.el (mh-mh-directive-present-p): * mh-search.el (mh-index-group-by-folder): Fix typos in docstrings. 2006-11-14 Bill Wohler * mh-xface.el (mh-x-image-url-cache-canonicalize): Add `*' to reserved Windows filename characters (closes SF #1396499). 2006-11-13 Bill Wohler Release MH-E version 8.0.3. * mh-e.el (Version, mh-version): Update for release 8.0.3. * mh-e.el (mh-alias-local-users): Boolean docstrings should start with "Non-nil means". Perhaps this option should have a -flag appended. (mh-junk-background): Sync docstring with manual. * mh-junk.el (mh-spamassassin-blacklist, mh-bogofilter-blacklist) (mh-spamprobe-blacklist): Sync docstring with manual. 2006-11-11 Stephen Gildea * mh-junk.el (mh-spamassassin-blacklist, mh-spamassassin-whitelist): Use mh-junk-background consistently in call-process calls. (mh-bogofilter-blacklist, mh-bogofilter-whitelist) (mh-spamprobe-blacklist, mh-spamprobe-whitelist): Use with-current-buffer so the right thing happens if mh-junk-background is t (closes SF #1594802). * mh-e.el (mh-junk-background): Document that On value is 0; t may be used for debugging. 2006-11-10 Andreas Schwab * mh-e.el (mh-draft-folder): Avoid starting sentence with "nil". 2006-11-10 Glenn Morris * mh-e.el (mh-draft-folder): Doc fix (Nil -> nil). 2006-09-25 Stephen Gildea * mh-junk.el (mh-spamassassin-whitelist): Add two missing quotation marks, so that the last two arguments of sa-learn are separated properly (closes SF #1565460). (mh-spamassassin-blacklist): In example .procmailrc, add PATH element to find mhparam on Debian. 2006-09-24 Stephen Gildea * mh-comp.el (mh-send-args): Initialize to "" instead of nil so that we always have a valid string for split-string even if nothing is added in mh-send-letter (closes SF #1564742). 2006-07-03 Bill Wohler Release MH-E version 8.0.2. * mh-e.el (Version, mh-version): Update for release 8.0.2. 2006-07-03 Ted Phelps (tiny change) * mh-tool-bar.el (mh-tool-bar-define): Fix XEmacs' vector-list so it refers to the icons in mh-xemacs-icon-map instead of trying to declare the icons in situ. This allows mh-tool-bar.el to be compiled under XEmacs. Remove initial value for mh-tool-bar-folder-buttons, mh-tool-bar-show-buttons, mh-tool-bar-letter-buttons. The MH-E icons now appear in XEmacs. In mh-tool-bar-init, check for mh-xemacs-use-tool-bar-flag sooner. This allows MH-E to be used in XEmacs in a tty (closes SF #1506846). 2006-07-03 Bill Wohler * mh-e.el: Require mh-buffers and mh-compat before mh-xemacs now that mh-xemacs needs functions in mh-compat. 2006-06-29 Bill Wohler * mh-search.el (mh-search, mh-index-group-by-folder): Add "the" in loop construct to be consistent with other loops, and because edebug doesn't work without it. 2006-06-29 Ted Phelps (tiny change) * mh-search.el (mh-folder-exists-p): Strip + from folder to avoid redundant +s in regexp (closes SF #1514424). 2006-06-29 Sergey Poznyakoff (tiny change) * mh-mime.el (mh-mime-save-parts): Add -store option to mhn (closes SF #1513140). 2006-06-20 Bill Wohler Release MH-E version 8.0.1. * mh-e.el (Version, mh-version): Update for release 8.0.1. 2006-06-15 Bill Wohler * mh-search.el (mh-index-new-folder): Use -2 suffix instead of <2> suffix for folder names, as <> are illegal filename characters on Windows (closes SF #1507002). 2006-06-05 Jacob Morzinski (tiny change) * mh-comp.el (mh-send-uses-spost): New variable. (mh-send-letter): Do not use -msgid and -mime if mh-send-uses-spost is t (closes SF #1486726). 2006-06-02 Bill Wohler * mh-search.el (mh-folder-exists-p): Change test from an empty buffer, to one that contains the actual folder, since GNU mailutils' folder command displays output if the folder doesn't exist (closes SF #1499712). 2006-05-06 Bill Wohler Release MH-E version 8.0. * mh-e.el (Version, mh-version): Update for release 8.0. 2006-05-05 Bill Wohler * mh-e.el: Update commentary. 2006-04-28 Bill Wohler Release MH-E version 7.95. * mh-e.el (Version, mh-version): Update for release 7.95. 2006-04-26 Eric Ding * mh-e.el (mh-invisible-header-fields-internal): Add entry "X-Provags-ID:". 2006-04-25 Bill Wohler * mh-letter.el (mh-folder-expand-at-point): Fix folder completion. Folders returned by mh-folder-completion-function no longer need adornment (closes SF #1476270). 2006-04-21 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to version. 2006-04-21 Bill Wohler Release MH-E version 7.94. * mh-e.el (Version, mh-version): Update for release 7.94. 2006-04-21 Bill Wohler * mh-letter.el (mh-insert-letter): If a message number isn't given, throw an error rather than using a potentially incorrect message number (closes SF #1473729). In addition, use the cur message if mh-sent-from-msg is nil (when sending a message, in contrast to replying). Move conversion of int to string into interactive stanza so body can assume variables are of proper type. 2006-04-20 Bill Wohler * mh-tool-bar.el (image-load-path): Define to shush compiler. (mh-buffer-exists-p): Move inside mh-do-in-gnu-emacs since it isn't used outside of it. (mh-tool-bar-folder-buttons-init, mh-tool-bar-letter-buttons-init): Update load-path/image-load-path before setting buttons. This code used to be in mh-folder-mode/mh-letter-mode but this was the wrong place since mh-tool-bar-*-buttons-init can also be called when customizing the buttons. (mh-tool-bar-update): New function which updates tool-bar-map in all of the MH-E buffers after customizing the buttons (closes SF #1452718). (mh-tool-bar-folder-buttons-set, mh-tool-bar-letter-buttons-set): Call it (closes SF #1452718). * mh-folder.el (mh-folder-buttons-init-flag): Delete. Use mh-folder-tool-bar-map instead. (image-load-path): Delete. No longer used. (mh-folder-mode): Move setting of image-load-path into mh-tool-bar-folder-buttons-init. * mh-letter.el (mh-letter-buttons-init-flag): Delete. Use mh-letter-tool-bar-map instead. (image-load-path): Delete. No longer used. (mh-letter-mode): Move setting of image-load-path into mh-tool-bar-letter-buttons-init. * mh-seq.el (mh-narrow-to-seq, mh-widen): Use with-current-buffer instead of set-buffer. 2006-04-19 Bill Wohler * mh-tool-bar.el (mh-tool-bar-define): Fix enable-expr so that one can permanently disable a button (such as a separator) with nil. 2006-04-18 Bill Wohler * mh-e.el (defcustom-mh, defface-mh, defgroup-mh, mh-face-data) (mh-strip-package-version, mh-face-data, mh-inherit-face-flag) (mh-min-colors-defined-flag): Do not unbind these macros and variables. Nice idea, but too many nasty side-effects. These macros are needed by [Cc]ustom-make-dependencies when creating the MH-E customization groups in mh-cus-load.el. These disappeared when the macros above were introduced. Besides, if a developer were to try to show the help for a macro or variable they were looking at and got [No match] when they did so, that would be bad. 2006-04-17 Bill Wohler * mh-comp.el (mh-insert-x-mailer): Strip build number from version in X-Mailer field (closes SF #1466481). * mh-acros.el (mh-defun-compat): Rename to defun-mh in order that variables and functions with the same name are found correctly by find-func (invoked by clicking on the filename link in the *Help* buffer). (mh-defmacro-compat): Rename to defmacro-mh. Ditto. * mh-e.el (mh-defgroup): Rename to defgroup-mh. Ditto. (mh-defcustom): Rename to defcustom-mh. Ditto. (mh-defface): Rename to defface-mh. Ditto. (mh-font-lock-add-keywords): Make changes according to these renamings. * mh-e.el, mh-compat.el, mh-gnus.el: Use the new names (closes SF #1472029). * mh-utils.el (mh-sub-folders-actual): Mention that folder must have been processed by mh-normalize-folder-name. (mh-folder-completion-function): Handle completion of folders with absolute names. Also, when flag is t, display complete folder name to provide proper highlighting in Emacs 22 now that minibuffer-completing-file-name is nil (closes SF #1470518). (mh-folder-completing-read): No longer set minibuffer-completing-file-name to t. This was causing "Can't set current directory errors" when browsing absolute file names. Another benefit of this change is that SPC can be used for completion again (closes SF #1470518). 2006-04-15 Bill Wohler * mh-compat.el (mh-font-lock-add-keywords): Fix typo in docstring. 2006-04-14 Bill Wohler * mh-funcs.el (view-exit-action): No need to wrap defvar with eval-when-compile when shushing compiler. * mh-mime.el (mh-identity-pgg-default-user-id): Ditto. * mh-seq.el (view-exit-action): Ditto. * mh-show.el (font-lock-auto-fontify): Ditto. * mh-utils.el (mh-speed-flists-cache): Ditto. * mh-acros.el (struct, x, y): No need to wrap defvar with eval-when-compile when shushing compiler, even when mh-do-in-xemacs or another construct is used. * mh-comp.el (sendmail-coding-system): Ditto. * mh-e.el (mark-active): Ditto. * mh-folder.el (desktop-save-buffer, font-lock-auto-fontify) (image-load-path, font-lock-defaults): Ditto. * mh-letter.el (image-load-path, font-lock-defaults): Ditto. * mh-mime.el (dots, type, ov) (mm-verify-function-alist, mm-decrypt-function-alist) (pressed-details): Ditto. * mh-search.el (pick-folder, mh-do-in-xemacs) (mh-mairix-folder, mh-flists-search-folders) (which-func-mode, mh-speed-flists-inhibit-flag): Ditto. * mh-seq.el (tool-bar-mode): Ditto. * mh-utils.el (completion-root-regexp) (minibuffer-completing-file-name): Ditto. * mh-xface.el (default-enable-multibyte-characters): Ditto. * mh-compat.el (mh-font-lock-add-keywords): New alias for font-lock-add-keywords. Returns nil on XEmacs. * mh-e.el: Add MH-E function and variable keywords such as mh-defun-compat and mh-defcustom to font-lock-keywords. 2006-04-13 Bill Wohler * mh-e.el (customize-package-emacs-version-alist) (mh-e, mh-alias, mh-folder, mh-folder-selection) (mh-identity, mh-inc, mh-junk, mh-letter, mh-ranges) (mh-scan-line-formats, mh-search, mh-sending-mail) (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar) (mh-hooks, mh-faces, mh-alias-completion-ignore-case-flag) (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma) (mh-alias-insert-file, mh-alias-insertion-location) (mh-alias-local-users, mh-alias-local-users-prefix) (mh-alias-passwd-gecos-comma-separator-flag) (mh-new-messages-folders, mh-ticked-messages-folders) (mh-large-folder, mh-recenter-summary-flag) (mh-recursive-folders-flag, mh-sortm-args) (mh-default-folder-for-message-function) (mh-default-folder-list, mh-default-folder-must-exist-flag) (mh-default-folder-prefix, mh-identity-list) (mh-auto-fields-list, mh-auto-fields-prompt-flag) (mh-identity-default, mh-identity-handlers, mh-inc-prog) (mh-inc-spool-list, mh-junk-background, mh-junk-disposition) (mh-junk-program, mh-compose-insertion) (mh-compose-skipped-header-fields) (mh-compose-space-does-completion-flag) (mh-delete-yanked-msg-window-flag) (mh-extract-from-attribution-verb, mh-ins-buf-prefix) (mh-letter-complete-function, mh-letter-fill-column) (mh-mml-method-default, mh-signature-file-name) (mh-signature-separator-flag, mh-x-face-file) (mh-yank-behavior, mh-interpret-number-as-range-flag) (mh-adaptive-cmd-note-flag, mh-scan-format-file, mh-scan-prog) (mh-search-program, mh-compose-forward-as-mime-flag) (mh-compose-letter-function, mh-compose-prompt-flag) (mh-forward-subject-format, mh-insert-x-mailer-flag) (mh-redist-full-contents-flag, mh-reply-default-reply-to) (mh-reply-show-message-flag) (mh-refile-preserves-sequences-flag, mh-tick-seq) (mh-update-sequences-after-mh-show-flag) (mh-bury-show-buffer-flag, mh-clean-message-header-flag) (mh-decode-mime-flag) (mh-display-buttons-for-alternatives-flag) (mh-display-buttons-for-inline-parts-flag) (mh-do-not-confirm-flag, mh-fetch-x-image-url) (mh-graphical-smileys-flag, mh-graphical-emphasis-flag) (mh-highlight-citation-style, mh-invisible-header-fields) (mh-invisible-header-fields-default, mh-lpr-command-format) (mh-max-inline-image-height, mh-max-inline-image-width) (mh-mhl-format-file, mh-mime-save-parts-default-directory) (mh-print-background-flag, mh-show-maximum-size) (mh-show-use-xface-flag, mh-store-default-directory) (mh-summary-height, mh-speed-update-interval) (mh-show-threads-flag, mh-tool-bar-search-function) (mh-defcustom, mh-after-commands-processed-hook) (mh-alias-reloaded-hook, mh-before-commands-processed-hook) (mh-before-quit-hook, mh-before-send-letter-hook) (mh-delete-msg-hook, mh-find-path-hook, mh-folder-mode-hook) (mh-forward-hook, mh-inc-folder-hook, mh-insert-signature-hook) (mh-kill-folder-suppress-prompt-hooks, mh-letter-mode-hook) (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook) (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook) (mh-unseen-updated-hook, mh-folder-address, mh-folder-body) (mh-folder-cur-msg-number, mh-folder-date, mh-folder-deleted) (mh-folder-followup, mh-folder-msg-number, mh-folder-refiled) (mh-folder-sent-to-me-hint, mh-folder-sent-to-me-sender) (mh-folder-subject, mh-folder-tick, mh-folder-to) (mh-letter-header-field, mh-search-folder, mh-show-cc) (mh-show-date, mh-show-from, mh-show-header, mh-show-pgg-bad) (mh-show-pgg-good, mh-show-pgg-unknown, mh-show-signature) (mh-show-subject, mh-show-to, mh-show-xface) (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder) (mh-speedbar-selected-folder-with-unseen-messages): Use dotted notation in :package-version keyword. 2006-04-07 Bill Wohler * mh-e.el (mh-path, mh-variant): Define with mh-defcustom and add :package-version keyword. 2006-03-31 Bill Wohler * mh-e.el (mh-strip-package-version): Move before use to avoid compiler error. Make macro, also to avoid compiler error. (mh-defface-compat): Incorporate body into mh-face-data and delete. 2006-03-30 Bill Wohler * mh-e.el (mh-defcustom, mh-defface, mh-defgroup): Macros to remove new :package-version keyword in older settings. (customize-package-emacs-version-alist): Add MH-E version to Emacs version mappings. (mh-e, mh-alias, mh-folder, mh-folder-selection) (mh-identity, mh-inc, mh-junk, mh-letter, mh-ranges) (mh-scan-line-formats, mh-search, mh-sending-mail) (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar) (mh-hooks, mh-faces): Add :package-version keyword to these groups (closes SF #1452724). (mh-alias-completion-ignore-case-flag) (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma) (mh-alias-insert-file, mh-alias-insertion-location) (mh-alias-local-users, mh-alias-local-users-prefix) (mh-alias-passwd-gecos-comma-separator-flag) (mh-new-messages-folders, mh-ticked-messages-folders) (mh-large-folder, mh-recenter-summary-flag) (mh-recursive-folders-flag, mh-sortm-args) (mh-default-folder-for-message-function) (mh-default-folder-list, mh-default-folder-must-exist-flag) (mh-default-folder-prefix, mh-identity-list) (mh-auto-fields-list, mh-auto-fields-prompt-flag) (mh-identity-default, mh-identity-handlers, mh-inc-prog) (mh-inc-spool-list, mh-junk-background, mh-junk-disposition) (mh-junk-program, mh-compose-insertion) (mh-compose-skipped-header-fields) (mh-compose-space-does-completion-flag) (mh-delete-yanked-msg-window-flag) (mh-extract-from-attribution-verb, mh-ins-buf-prefix) (mh-letter-complete-function, mh-letter-fill-column) (mh-mml-method-default, mh-signature-file-name) (mh-signature-separator-flag, mh-x-face-file) (mh-yank-behavior, mh-interpret-number-as-range-flag) (mh-adaptive-cmd-note-flag, mh-scan-format-file, mh-scan-prog) (mh-search-program, mh-compose-forward-as-mime-flag) (mh-compose-letter-function, mh-compose-prompt-flag) (mh-forward-subject-format, mh-insert-x-mailer-flag) (mh-redist-full-contents-flag, mh-reply-default-reply-to) (mh-reply-show-message-flag) (mh-refile-preserves-sequences-flag, mh-tick-seq) (mh-update-sequences-after-mh-show-flag) (mh-bury-show-buffer-flag, mh-clean-message-header-flag) (mh-decode-mime-flag) (mh-display-buttons-for-alternatives-flag) (mh-display-buttons-for-inline-parts-flag) (mh-do-not-confirm-flag, mh-fetch-x-image-url) (mh-graphical-smileys-flag, mh-graphical-emphasis-flag) (mh-highlight-citation-style, mh-invisible-header-fields) (mh-invisible-header-fields-default, mh-lpr-command-format) (mh-max-inline-image-height, mh-max-inline-image-width) (mh-mhl-format-file, mh-mime-save-parts-default-directory) (mh-print-background-flag, mh-show-maximum-size) (mh-show-use-xface-flag, mh-store-default-directory) (mh-summary-height, mh-speed-update-interval) (mh-show-threads-flag, mh-tool-bar-search-function): Add :package-version keyword to these options (closes SF #1452724). (mh-after-commands-processed-hook) (mh-alias-reloaded-hook, mh-before-commands-processed-hook) (mh-before-quit-hook, mh-before-send-letter-hook) (mh-delete-msg-hook, mh-find-path-hook, mh-folder-mode-hook) (mh-forward-hook, mh-inc-folder-hook) (mh-insert-signature-hook) (mh-kill-folder-suppress-prompt-hooks, mh-letter-mode-hook) (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook) (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook) (mh-unseen-updated-hook): Add :package-version keyword to these hooks (closes SF #1452724). (mh-min-colors-defined-flag) (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number) (mh-folder-date, mh-folder-deleted, mh-folder-followup) (mh-folder-msg-number, mh-folder-refiled) (mh-folder-sent-to-me-hint, mh-folder-sent-to-me-sender) (mh-folder-subject, mh-folder-tick, mh-folder-to) (mh-letter-header-field, mh-search-folder, mh-show-cc) (mh-show-date, mh-show-from, mh-show-header, mh-show-pgg-bad) (mh-show-pgg-good, mh-show-pgg-unknown, mh-show-signature) (mh-show-subject, mh-show-to, mh-show-xface) (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder) (mh-speedbar-selected-folder-with-unseen-messages): : Add :package-version keyword to these faces (closes SF #1452724). * mh-tool-bar.el (mh-tool-bar-define): Add commented-out :package-version keywords (closes SF #1452724). 2006-03-28 Bill Wohler * mh-tool-bar.el: Use clipboard-kill-region, clipboard-kill-ring-save, and clipboard-yank instead of undo, kill-region, and menu-bar-kill-ring-save respectively. In MH-Letter mode, move save-buffer and mh-fully-kill-draft icons in front of mh-compose-insertion to be consistent with other mailers, such as Evolution. In MH-Folder mode, move vanilla reply icon to the left of the other reply icons. Use mail/inbox icon instead of mail, next-page instead of page-down, delete instead of close, mail/move instead of mail/refile, data-save instead of execute, mail/flag-for-followup instead of highlight, contact instead of mail/alias, open instead of fld-open, zoom-out instead of widen. * mh-folder.el (mh-execute-commands, mh-rescan-folder): * mh-funcs.el (mh-pack-folder): Sync docstrings with manual. 2006-03-27 Eric Ding * mh-e.el (mh-invisible-header-fields-internal): Add entries "X-AOL-IP:" and "X-MB-Message-" (AOL WebMail). 2006-03-19 Bill Wohler * mh-comp.el (mh-reply): Sync docstring with manual. * mh-compat.el (mh-image-load-path-for-library): Shorten first line in docstring. 2006-03-17 Bill Wohler * mh-compat.el (mh-image-load-path-for-library): Minor docstring fix. 2006-03-16 Bill Wohler * mh-comp.el (mh-send-letter): Use split-string to break up mh-send-args (closes SF #1448604). (mh-compose-and-send-mail): Use run-hook-with-args for mh-compose-letter-function. * mh-e.el (mh-list-to-string-1): Use dolist. * mh-compat.el (mh-image-load-path-for-library): Prefer user's images. 2006-03-15 Bill Wohler * mh-compat.el (mh-image-load-path-for-library): Fix example by not recommending that one binds image-load-path. Just defvar it to placate compiler and only use it if previously defined. * mh-e.el (image-load-path): Don't bind! * mh-folder.el (mh-folder-mode): Only use image-load-path if previously defined. * mh-letter.el (mh-letter-mode): Ditto. * mh-utils.el (mh-logo-display): Ditto. 2006-03-14 Bill Wohler * mh-compat.el (mh-image-load-path-for-library): Incorporate changes from image-load-path-for-library, which are: (image-load-path-for-library): Pass value of path rather than symbol. Always return list of directories. Guarantee that image directory comes first. * mh-e.el (image-load-path): Define on those Emacsen that lack it to avoid compile and run-time errors. * mh-folder.el (mh-folder-mode): Use new idiom for setting image-load-path. * mh-letter.el (mh-letter-mode): Ditto. * mh-utils.el (mh-logo-display): Ditto. 2006-03-12 Bill Wohler * mh-utils.el (mh-folder-list): Fix docstring (closes SF #1448498). 2006-03-10 Bill Wohler * mh-compat.el (mh-replace-regexp-in-string): Pass the literal flag to replace-in-string. This was badly needed by mh-quote-pick-expr in order to properly quote subjects when using / s on XEmacs (closes SF #1447598). (mh-image-load-path-for-library): Merged changes from Reiner. Add no-error argument. If path t, just return directory. * mh-e.el (mh-profile-component): Drop `s' from mhparam -components for Mailutils compatibility (closes SF #1446985). 2006-03-06 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to version. 2006-03-05 Satyaki Das * mh-search.el (mh-index-update-single-msg): Fix a bug in the handling of duplicate messages. The test in cond was too strong and wasn't catching the case where origin-map was nil. 2006-03-05 Bill Wohler Release MH-E version 7.93. * mh-e.el (Version, mh-version): Update for release 7.93. 2006-03-05 Bill Wohler * mh-folder.el (mh-folder-mode): Drop 'load-path argument when calling mh-image-load-path-for-library since this is the default. * mh-letter.el (mh-letter-mode): Ditto. * mh-utils.el (mh-logo-display): Ditto. 2006-03-04 Bill Wohler * mh-compat.el (mh-image-load-path-for-library): Move here from mh-utils.el and wrap with mh-defun-compat since this function will be soon added to image.el. * mh-utils.el (mh-image-load-path-for-library): Move to mh-compat.el. (mh-normalize-folder-name): Add return-nil-if-folder-empty argument which is useful when calling mh-normalize-folder-name to process the folder argument for the folders command. (mh-sub-folders): Use new flag to mh-normalize-folder-name to make this function more robust. It could too easily list the folders in /. (mh-folder-list): Fix a couple of problems pointed out by Thomas Baumann. Set folder to nil if empty. Don't append "/" if folder nil. 2006-03-03 Bill Wohler * mh-folder.el (mh-folder-mode): Rename mh-image-load-path to mh-image-load-path-for-library. * mh-letter.el (mh-letter-mode): Rename mh-image-load-path to mh-image-load-path-for-library. * mh-utils.el (mh-image-load-path): Rename to mh-image-load-path-for-library. Add example to docstring. Rename local variable mh-image-directory to image-directory. Move error checks to default case in cond and simplify. * mh-comp.el (mh-send-letter, mh-insert-auto-fields): Sync docstrings with manual. 2006-03-02 Bill Wohler * mh-folder.el (mh-tool-bar-init): Autoload. (mh-folder-mode): Call mh-tool-bar-init conditionally in XEmacs. Set scoped variables image-load-path and load-path with updated mh-image-load-path before calling mh-tool-bar-folder-buttons-init. * mh-letter.el (mh-tool-bar-init): Autoload. (mh-letter-mode): Call mh-tool-bar-init conditionally in XEmacs. Set scoped variables image-load-path and load-path with updated mh-image-load-path before calling mh-tool-bar-letter-buttons-init. * mh-show.el (mh-tool-bar-init): Autoload. (mh-show-mode): Perform tool bar stuff conditionally in XEmacs and GNU Emacs. * mh-tool-bar.el (mh-tool-bar-define): Don't quote stuff in error messages per conventions. (mh-tool-bar-folder-buttons-init) (mh-tool-bar-letter-buttons-init): Don't call mh-image-load-path. (mh-tool-bar-define call): Format. * mh-utils.el (mh-image-directory) (mh-image-load-path-called-flag): Delete. (mh-image-load-path): Incorporate changes from Gnus team. Biggest changes are that it no longer uses/sets mh-image-directory or mh-image-load-path-called-flag, and returns the updated path rather than change it. (mh-logo-display): Change usage of mh-image-load-path. 2006-02-28 Bill Wohler * mh-limit.el (mh-narrow-to-cc, mh-narrow-to-from) (mh-narrow-to-subject, mh-narrow-to-to): Fix inability to narrow to subjects with special characters by quoting regular expression characters in pick expression derived from existing subjects and other fields (closes SF #1432548). (mh-narrow-to-subject): Remove Re: string from subject so that pick can find originating message (closes SF #1438369). * mh-utils.el (mh-image-load-path): Rename variable to mh-image-directory. (mh-image-load-path): Access mh-image-directory instead of mh-image-load-path. (mh-folder-list): Fix problem with passing in a folder and getting nothing back. Fix problem with passing in empty string and getting the entire filesystem (or infinite loop). Don't append slash to folder. These fixes fix problems observed with the pick search. Thanks to Thomas Baumann for the help (closes SF #1435381). (mh-pick-regexp-chars, mh-quote-pick-expr): New variable and function for quoting pick regular expression characters (closes SF #1432548). 2006-02-27 Bill Wohler * mh-e.el (mh-default-folder-for-message-function): Sync docstring with manual. * mh-mime.el (mh-minibuffer-read-type): Delete comment in docstring about obsolete variable mh-mime-content-types. * mh-e.el (mh-variant): Sync docstring with manual. (cus-face): Require as it is needed by mh-inherit-face-flag. * mh-compat.el (mh-display-color-cells): Return 2 if device-color-cells returns nil (closes SF #1436924). * mh-e.el (mh-compiling-flag): Delete. No longer needed by mh-display-color-cells. 2006-02-21 Eric Ding * mh-e.el (mh-invisible-header-fields-internal): Add entry "X-Sasl-enc:". 2006-02-20 Eric Ding * mh-e.el (mh-invisible-header-fields-internal): Add entries "X-Authenticated-Sender:", "X-Barracuda-", "X-EFL-Spamscore", "X-IronPort-AV:", "X-Mail-from:", "X-Mailman-Approved-At:", "X-Resolved-to:", and "X-SA-Exim". Fixed "X-Bugzilla-" and "X-Roving-" by removing unnecessary "*" at end. 2006-02-19 Bill Wohler * mh-alias.el (mh-address-mail-regexp) (mh-goto-address-find-address-at-point): Delete copies from goto-addr.el. (mh-alias-suggest-alias): Use goto-address-mail-regexp instead of mh-address-mail-regexp. (mh-alias-add-address-under-point): Use goto-address-find-address-at-point instead of mh-goto-address-find-address-at-point. * mh-e.el (mh-show-use-goto-addr-flag): Delete. * mh-show.el (mh-show-mode): Mention goto-address-highlight-p in docstring. (mh-show-addr): Call goto-address unconditionally. User should use goto-address-highlight-p instead of mh-show-use-goto-addr-flag. 2006-02-18 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to version. 2006-02-18 Bill Wohler Release MH-E version 7.92. * mh-e.el (Version, mh-version): Update for release 7.92. 2006-02-17 Bill Wohler * mh-e.el (mh-folder-msg-number): Use purple on low-color, light backgrounds per Mark's suggestion. * mh-utils.el (mh-image-load-path): Fix problem that images on load-path or image-load-path would win over relative paths (newer MH-E or Emacs distribution). 2006-02-16 Bill Wohler * mh-e.el (mh-inherit-face-flag): New variable. Non-nil means that the defface :inherit keyword is available. (mh-face-data): New variable (contains all face specs) and function (accessor). (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number) (mh-folder-date, mh-folder-deleted, mh-folder-followup) (mh-folder-msg-number, mh-folder-refiled) (mh-folder-sent-to-me-hint, mh-folder-sent-to-me-sender) (mh-folder-subject, mh-folder-tick, mh-folder-to) (mh-search-folder, mh-letter-header-field, mh-show-cc) (mh-show-date, mh-show-from) (mh-show-header, mh-show-pgg-bad, mh-show-pgg-good) (mh-show-pgg-unknown, mh-show-signature, mh-show-subject) (mh-show-to, mh-show-xface, mh-speedbar-folder) (mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder) (mh-speedbar-selected-folder-with-unseen-messages): Use mh-face-data. * mh-utils.el (mh-image-load-path): The variables image-load-path or load-path would not get updated if user set mh-image-load-path. Moved tests and add-to-list calls outside of cond so they are applied consistently, even if they are redundant in some circumstances. Efficiency isn't a concern here. Made error messages more user-friendly. 2006-02-15 Peter S Galbraith * mh-compat.el (mh-image-search-load-path): Compatibility code. Emacs 21 and XEmacs don't have `image-search-load-path'. * mh-utils.el (mh-image-load-path): Don't bail out on error if the images are already found. 2006-02-10 Bill Wohler * mh-search.el (mh-search): Wrap code in (block mh-search ...) rather than use defun*. XEmacs cannot create a proper autoload for a defun*. 2006-02-09 Bill Wohler * mh-utils.el (mh-folder-list): Don't replace "/*$" with "/" since that causes an infinite loop on XEmacs. * mh-compat.el(mh-replace-regexp-in-string): Add missing regexp argument. 2006-02-08 Peter S Galbraith * mh-e.el (mh-invisible-header-fields-internal): Add entries "X-BrightmailFiltered:", "X-Brightmail-Tracker:" and "X-Hashcash". 2006-02-04 Bill Wohler * mh-e.el (mh-inc-spool-list): Update example for Emacs 22 which has an emacsclient command that supports --eval. I had read that gnudoit was deprecated in favor of gnuclient anyway. 2006-02-04 Eric Ding * mh-mime.el (mh-file-mime-type-substitutions): Add entries to handle OpenOffice documents. 2006-02-03 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to version. 2006-02-03 Bill Wohler Release MH-E version 7.91. * mh-e.el (Version, mh-version): Update for release 7.91. 2006-02-03 Bill Wohler * mh-utils.el (mh-image-load-path, mh-image-load-path-called-flag) (mh-image-load-path): Checkdoc fix. Docstring edits. Reduce scope of local variable mh-library-name. * mh-e.el (mh-folder-msg-number, mh-folder-refiled, mh-folder-to) (mh-show-cc, mh-show-date, mh-show-header): Replace (min-colors 88) with (min-colors 64) in face specifications so that MH-E still looks good on systems with fewer colors (such as Eric Ding's). 2006-02-03 Peter S Galbraith * mh-utils.el (mh-image-load-path): New variable to optionally hold the directory where MH-E images are stored. If nil, then the function `mh-image-load-path' will find it. This variable will be used for Debian packaging. (mh-image-load-path function): Use variable `mh-image-load-path' if non-nil and exists. 2006-02-03 Mark D. Baushke * mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar for GNU Emacs or XEmacs to avoid void-variable tool-bar-map lisp errors if describe-bindings is called before tool-bar-mode is used. 2006-02-03 Peter S Galbraith * mh-compat.el (mh-url-unreserved-chars): Fix typo from `mh-url-unresrved-chars'. 2006-02-02 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to version. 2006-02-02 Bill Wohler Release MH-E version 7.90. * mh-e.el (Version, mh-version): Update for release 7.90. 2006-02-01 Bill Wohler * mh-search.el (which-func-mode): Shush compiler on Emacs 21 too. * mh-alias.el (mh-alias-gecos-name): Use mh-replace-regexp-in-string instead of replace-regexp-in-string. (crm, multi-prompt): Use mh-require instead of require. (mh-goto-address-find-address-at-point): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. Use mh-match-string-no-properties instead of match-string-no-properties. * mh-comp.el (mh-modify-header-field): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-compat.el (mailabbrev): Use mh-require instead of require. (mh-assoc-string, mh-display-completion-list, mh-face-foreground) (mh-face-background): Make docstring consistent. (mh-require, mh-cancel-timer, mh-display-color-cells) (mh-line-beginning-position, mh-line-end-position) (mh-match-string-no-properties, mh-replace-regexp-in-string) (mh-view-mode-enter): Move definition here from mh-xemacs.el and add mh- prefix since compatibility functions should have our package prefix (mh-) by Emacs convention and to avoid messing up checks for the same functions in other packages. * mh-e.el (mh-compiling-flag): Move mh-xemacs-compiling-flag here from mh-xemacs.el and rename. (mh-xargs): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. (mh-defface-compat): Use mh-display-color-cells instead of display-color-cells. * mh-folder.el (which-func): Use mh-require instead of require. * mh-funcs.el (mh-list-folders): Use mh-view-mode-enter instead of view-mode-enter. * mh-gnus.el (gnus-util, mm-bodies, mm-decode, mm-view, mml): Use mh-require instead of require. * mh-letter.el (mh-letter-header-end, mh-letter-mode) (mh-letter-next-header-field): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-limit.el (mh-subject-to-sequence-unthreaded): Use mh-match-string-no-properties instead of match-string-no-properties. (mh-narrow-to-header-field): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-mime.el (mh-mime-inline-part, mh-mm-display-part) (mh-mh-quote-unescaped-sharp, mh-mh-directive-present-p): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-search.el (which-func): Use mh-require instead of require. (mh-make-pick-template, mh-index-visit-folder) (mh-pick-parse-search-buffer, mh-swish-next-result) (mh-mairix-next-result, mh-namazu-next-result) (mh-pick-next-result, mh-grep-next-result) (mh-index-create-imenu-index, mh-index-match-checksum) (mh-md5sum-parser, mh-openssl-parser, mh-index-update-maps): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-seq.el (mh-list-sequences): Use mh-view-mode-enter instead of view-mode-enter. (mh-folder-size-flist, mh-parse-flist-output-line) (mh-add-sequence-notation): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-show.el (mh-show-addr): Use mh-require instead of require. * mh-speed.el (mh-folder-speedbar-menu-items, mh-speed-toggle) (mh-speed-view, mh-folder-speedbar-buttons) (mh-speed-highlight, mh-speed-goto-folder) (mh-speed-add-buttons, mh-speed-parse-flists-output) (mh-speed-invalidate-map, mh-speedbar-change-expand-button-char) (mh-speed-add-folder): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. (mh-speed-flists): Use mh-cancel-timer instead of cancel-timer. * mh-thread.el (mh-thread-find-children) (mh-thread-parse-scan-line, mh-thread-generate): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-utils.el (mh-colors-available-p): Use mh-display-color-cells instead of display-color-cells. (mh-folder-list): Use mh-replace-regexp-in-string instead of replace-regexp-in-string. (mh-sub-folders-actual, mh-letter-toggle-header-field-display): Use mh-line-beginning-position and mh-line-end-position instead of line-beginning-position and line-end-position. * mh-comp.el (mh-send-sub): Don't find components file in current directory--this seems to have been a side-effect of commenting out the use of an old mh-etc variable. Improve error message. 2006-01-31 Bill Wohler * mh-acros.el (mh-defun-compat, mh-defmacro-compat): Add name argument since compatibility functions should have our package prefix (mh-) by Emacs convention and to avoid messing up checks for the same functions in other packages. Use explicit argument instead of forming name by adding mh- prefix so that one can grep and find the definition. * mh-alias.el (mh-alias-local-users, mh-alias-reload) (mh-alias-expand, mh-alias-minibuffer-confirm-address): Use mh-assoc-string instead of assoc-string. * mh-compat.el (assoc-string): Rename to mh-assoc-string. (mh-mail-abbrev-make-syntax-table, mh-url-hexify-string): Move here from mh-utils.el. (mh-display-completion-list): Move here from mh-comp.el. (mh-face-foreground, mh-face-background): Move here from mh-xface.el. (mh-write-file-functions): Move here from mh-folder.el. * mh-folder.el (mh-write-file-functions-compat): Move to mh-compat.el and rename to mh-write-file-functions. (mh-folder-mode): Use the new name. * mh-gnus.el (gnus-local-map-property): Rename to mh-gnus-local-map-property. (mm-merge-handles): Rename to mh-mm-merge-handles. (mm-set-handle-multipart-parameter): Rename to mh-mm-set-handle-multipart-parameter. (mm-inline-text-vcard): Rename to mh-mm-inline-text-vcard. (mm-possibly-verify-or-decrypt): Rename to mh-mm-possibly-verify-or-decrypt. (mm-handle-multipart-ctl-parameter): Rename to mh-mm-handle-multipart-ctl-parameter. (mm-readable-p): Rename to mh-mm-readable-p. (mm-long-lines-p): Rename to mh-mm-long-lines-p. (mm-keep-viewer-alive-p): Rename to mh-mm-keep-viewer-alive-p. (mm-destroy-parts): Rename to mh-mm-destroy-parts. (mm-uu-dissect-text-parts): Rename to mh-mm-uu-dissect-text-parts. (mml-minibuffer-read-disposition): Rename to mh-mml-minibuffer-read-disposition. * mh-identity.el (mh-identity-field-handler): Use mh-assoc-string instead of assoc-string. * mh-mime.el (mh-mm-inline-media-tests, mh-mm-inline-message) (mh-mime-display, mh-mime-display-security) (mh-insert-mime-button, mh-insert-mime-security-button) (mh-handle-set-external-undisplayer) (mh-mime-security-press-button, mh-mime-security-show-details) (mh-mml-attach-file, mh-mime-cleanup) (mh-destroy-postponed-handles): Use new mh-* names for compatibility functions. * mh-utils.el (mail-abbrev-make-syntax-table): Move to mh-compat.el and rename to mh-mail-abbrev-make-syntax-table. (mh-beginning-of-word): Use the new name. (mh-get-field): Delete ancient alias. * mh-xface.el (mh-face-foreground-compat): Move to mh-compat.el and rename to mh-face-foreground. (mh-face-background-compat): Move to mh-compat.el and rename to mh-face-background. (mh-face-display-function): Use the new names. (mh-x-image-url-cache-canonicalize): Use mh-url-hexify-string instead of url-hexify-string. (url-unreserved-chars): Move to mh-compat.el and rename to mh-url-unreserved-chars. (url-hexify-string): Move to mh-compat.el and rename to mh-url-hexify-string. * mh-letter.el (mh-complete-word): Fix bug in call to mh-display-completion-list. Wrong argument was passed, so completions wouldn't show highlighted prefix. 2006-01-29 Bill Wohler * mh-e.el (mh-scan-format-file-check): Allow any non-nil for mh-adaptive-cmd-note-flag. * mh-comp.el (sc-cite-original): Remove autoload of "sc" with old docstring. sc-cite-original is autoloaded via loaddefs.el for all supported versions. In addition, the package name "sc" has been made obsolete by "supercite since at least Emacs 21. * mh-scan.el (mh-note-copied, mh-note-printed): Reorganization revealed character constants that were still strings (closes SF #770772). * mh-comp.el (mh-letter-hide-all-skipped-fields) (mh-get-header-field): Move to mh-utils.el so that you can read messages without having to load mh-comp.el and mh-letter.el. * mh-letter.el (mh-hidden-header-keymap) (mh-letter-toggle-header-field-display) (mh-letter-skipped-header-field-p) (mh-letter-skip-leading-whitespace-in-header-field) (mh-letter-truncate-header-field): Move to mh-utils.el so that you can read messages without having to load mh-comp.el and mh-letter.el. * mh-utils.el (mh-get-header-field) (mh-letter-hide-all-skipped-fields) (mh-letter-skipped-header-field-p, mh-hidden-header-keymap) (mh-letter-toggle-header-field-display) (mh-letter-skip-leading-whitespace-in-header-field) (mh-letter-truncate-header-field): Move here from mh-comp.el and mh-letter.el so that you can read messages without having to load mh-comp.el and mh-letter.el. * mh-comp.el (mh-insert-fields): Handle nil values. Rmail, at least, will deliver them to us. * mh-e.el (mh-after-commands-processed-hook) (mh-before-commands-processed-hook): Specify what sort of requests in docstring. * mh-folder.el (mh-folder-mode): Use add-to-list to modify minor-mode-alias. * mh-letter.el (mh-letter-menu): Remove. Defvar no longer needed to shush compiler. (mh-letter-mode): Remove Mail menu. 2006-01-29 Bill Wohler The Great Cleanup Remove circular dependencies. mh-e.el now includes few require statements and stands alone. Other files should need to require mh-e.el, which requires mh-loaddefs.el, plus variable-only files such as mh-scan.el. Remove unneeded require statements. Remove unneeded load statements, or replace them with non-fatal require statements. Break out components into their own files that were often spread between many files. As a result, many functions that are now only used within a single file no longer need to be autoloaded. Rearrange and provide consistent headings. Untabify. * mh-acros.el: Update commentary to reflect current usage. Add autoload cookies to all macros. (mh-require-cl): Merge docstring and comment. (mh-do-in-xemacs): Fix typo in docstring. (assoc-string): Move to new file mh-compat.el. (with-mh-folder-updating, mh-in-show-buffer) (mh-do-at-event-location, mh-seq-msgs): Move here from mh-utils.el. (mh-iterate-on-messages-in-region, mh-iterate-on-range): Move here from mh-seq.el. * mh-alias.el (mh-address-mail-regexp) (mh-goto-address-find-address-at-point): Move here from mh-utils.el. (mh-folder-line-matches-show-buffer-p): Move here from mh-e.el. * mh-buffers.el: Update descriptive text. * mh-comp.el (mh-note-repl, mh-note-forw, mh-note-dist): Move to new file mh-scan.el. (mh-yank-hooks, mh-to-field-choices, mh-position-on-field) (mh-letter-menu, mh-letter-mode-help-messages) (mh-letter-buttons-init-flag, mh-letter-mode) (mh-font-lock-field-data, mh-letter-header-end) (mh-auto-fill-for-letter, mh-to-field, mh-to-fcc) (mh-file-is-vcard-p, mh-insert-signature, mh-check-whom) (mh-insert-letter, mh-extract-from-attribution, mh-yank-cur-msg) (mh-filter-out-non-text, mh-insert-prefix-string) (mh-current-fill-prefix, mh-open-line, mh-complete-word) (mh-folder-expand-at-point, mh-letter-complete-function-alist) (mh-letter-complete, mh-letter-complete-or-space) (mh-letter-confirm-address, mh-letter-header-field-at-point) (mh-letter-next-header-field-or-indent) (mh-letter-next-header-field, mh-letter-previous-header-field) (mh-letter-skipped-header-field-p) (mh-letter-skip-leading-whitespace-in-header-field) (mh-hidden-header-keymap) (mh-letter-toggle-header-field-display-button) (mh-letter-toggle-header-field-display) (mh-letter-truncate-header-field, mh-letter-mode-map): Move to new file mh-letter.el. (mh-letter-mode-map, mh-sent-from-folder, mh-send-args) (mh-pgp-support-flag, mh-x-mailer-string) (mh-letter-header-field-regexp): Move to mh-e.el. (mh-goto-header-field, mh-goto-header-end) (mh-extract-from-header-value, mh-beginning-of-word): Move to mh-utils.el. (mh-insert-header-separator): Move to mh-comp.el. (mh-display-completion-list-compat): Move to new file mh-compat.el. * mh-compat.el: New file. (assoc-string): Move here from mh-acros.el. (mh-display-completion-list): Move here from mh-comp.el. * mh-customize.el: Move content into mh-e.el and remove. * mh-e.el (mh-folder-mode-map, mh-folder-seq-tool-bar-map) (mh-folder-tool-bar-map, mh-inc-spool-map, mh-letter-mode-map) (mh-letter-tool-bar-map, mh-search-mode-map, mh-show-mode-map) (mh-show-seq-tool-bar-map, mh-show-tool-bar-map): All maps now declared here so that they can be used in docstrings. (mh-sent-from-folder, mh-sent-from-msg) (mh-letter-header-field-regexp, mh-pgp-support-flag) (mh-x-mailer-string): Move here from mh-comp.el. (mh-folder-line-matches-show-buffer-p): Move to mh-alias.el. (mh-thread-scan-line-map, mh-thread-scan-line-map-stack): Move here from mh-seq.el. (mh-draft-folder, mh-inbox, mh-user-path, mh-current-folder) (mh-previous-window-config, mh-seen-list, mh-seq-list) (mh-show-buffer, mh-showing-mode, mh-globals-hash) (mh-show-folder-buffer, mh-mail-header-separator) (mh-unseen-seq, mh-previous-seq, mh-page-to-next-msg-flag) (mh-signature-separator, mh-signature-separator-regexp) (mh-list-to-string, mh-list-to-string-1): Move here from mh-utils.el. (mh-index-max-cmdline-args, mh-xargs, mh-quote-for-shell) (mh-exec-cmd, mh-exec-cmd-error, mh-exec-cmd-daemon) (mh-exec-cmd-env-daemon, mh-process-daemon, mh-exec-cmd-quiet) (mh-exec-cmd-output) (mh-exchange-point-and-mark-preserving-active-mark) (mh-exec-lib-cmd-output, mh-handle-process-error): Move here from deprecated file mh-exec.el. (mh-path): Move here from deprecated file mh-customize.el. (mh-sys-path, mh-variants, mh-variant-in-use, mh-progs, mh-lib) (mh-flists-present-flag, mh-variants, mh-variant-mh-info) (mh-variant-mu-mh-info, mh-variant-nmh-info, mh-file-command-p) (mh-variant-set-variant, mh-variant-p, mh-profile-component) (mh-profile-component-value, mh-defface-compat): Move here from deprecated file mh-init.el. (mh-goto-next-button, mh-folder-mime-action) (mh-folder-toggle-mime-part, mh-folder-inline-mime-part) (mh-folder-save-mime-part, mh-toggle-mime-buttons): Move to to mh-mime.el. (mh-scan-format-mh, mh-scan-format-nmh, mh-note-deleted) (mh-note-refiled, mh-note-cur, mh-scan-good-msg-regexp) (mh-scan-deleted-msg-regexp, mh-scan-refiled-msg-regexp) (mh-scan-valid-regexp, mh-scan-cur-msg-number-regexp) (mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp) (mh-scan-subject-regexp, mh-scan-sent-to-me-sender-regexp) (mh-scan-cmd-note-width, mh-scan-destination-width) (mh-scan-date-width, mh-scan-date-flag-width) (mh-scan-from-mbox-width, mh-scan-from-mbox-sep-width) (mh-scan-field-destination-offset) (mh-scan-field-from-start-offset, mh-scan-field-from-end-offset) (mh-scan-field-subject-start-offset, mh-scan-format) (mh-msg-num-width-to-column, mh-set-cmd-note): Move to new file mh-scan.el. (mh-partial-folder-mode-line-annotation) (mh-folder-font-lock-keywords, mh-folder-font-lock-subject) (mh-generate-sequence-font-lock, mh-last-destination) (mh-last-destination-write, mh-first-msg-num, mh-last-msg-num) (mh-rmail, mh-nmail, mh-delete-msg, mh-delete-msg-no-motion) (mh-execute-commands, mh-first-msg, mh-header-display) (mh-inc-folder, mh-last-msg, mh-next-undeleted-msg) (mh-folder-from-address, mh-prompt-for-refile-folder) (mh-refile-msg, mh-refile-or-write-again, mh-quit, mh-page-msg) (mh-previous-page, mh-previous-undeleted-msg) (mh-previous-unread-msg, mh-next-button, mh-prev-button) (mh-reset-threads-and-narrowing, mh-rescan-folder) (mh-write-msg-to-file, mh-toggle-showing, mh-undo) (mh-visit-folder, mh-update-sequences, mh-delete-a-msg) (mh-refile-a-msg, mh-next-msg, mh-next-unread-msg) (mh-set-scan-mode, mh-undo-msg, mh-make-folder) (mh-folder-sequence-menu, mh-folder-message-menu) (mh-folder-folder-menu, mh-remove-xemacs-horizontal-scrollbar) (mh-write-file-functions-compat, mh-folder-mode) (mh-restore-desktop-buffer, mh-scan-folder) (mh-regenerate-headers, mh-generate-new-cmd-note) (mh-get-new-mail, mh-make-folder-mode-line, mh-goto-cur-msg) (mh-process-or-undo-commands, mh-process-commands) (mh-update-unseen, mh-delete-scan-msgs) (mh-outstanding-commands-p): Move to new file mh-folder.el. (mh-mapc, mh-colors-available-p, mh-colors-in-use-p) (mh-make-local-vars, mh-coalesce-msg-list, mh-greaterp) (mh-lessp): Move to mh-utils.el. (mh-parse-flist-output-line, mh-folder-size-folder) (mh-folder-size-flist, mh-folder-size, mh-add-sequence-notation) (mh-remove-sequence-notation, mh-remove-cur-notation) (mh-remove-all-notation, mh-delete-seq-locally) (mh-read-folder-sequences, mh-read-msg-list) (mh-notate-user-sequences, mh-internal-seqs, mh-internal-seq) (mh-valid-seq-p, mh-delete-msg-from-seq, mh-catchup) (mh-delete-a-msg-from-seq, mh-undefine-sequence) (mh-define-sequence, mh-seq-containing-msg): Move to mh-seq.el. (mh-xemacs-flag) (mh-customize, mh-e, mh-alias, mh-folder, mh-folder-selection) (mh-identity, mh-inc, mh-junk, mh-letter, mh-ranges) (mh-scan-line-formats, mh-search, mh-sending-mail, mh-sequences) (mh-show, mh-speedbar, mh-thread, mh-tool-bar, mh-hooks) (mh-faces, mh-alias-completion-ignore-case-flag) (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma) (mh-alias-insert-file, mh-alias-insertion-location) (mh-alias-local-users, mh-alias-local-users-prefix) (mh-alias-passwd-gecos-comma-separator-flag) (mh-new-messages-folders, mh-ticked-messages-folders) (mh-large-folder, mh-recenter-summary-flag) (mh-recursive-folders-flag, mh-sortm-args) (mh-default-folder-for-message-function, mh-default-folder-list) (mh-default-folder-must-exist-flag, mh-default-folder-prefix) (mh-identity-list, mh-auto-fields-list) (mh-auto-fields-prompt-flag, mh-identity-default) (mh-identity-handlers, mh-inc-prog, mh-inc-spool-list) (mh-junk-choice, mh-junk-function-alist, mh-junk-choose) (mh-junk-background, mh-junk-disposition, mh-junk-program) (mh-compose-insertion, mh-compose-skipped-header-fields) (mh-compose-space-does-completion-flag) (mh-delete-yanked-msg-window-flag) (mh-extract-from-attribution-verb, mh-ins-buf-prefix) (mh-letter-complete-function, mh-letter-fill-column) (mh-mml-method-default, mh-signature-file-name) (mh-signature-separator-flag, mh-x-face-file, mh-yank-behavior) (mh-interpret-number-as-range-flag, mh-adaptive-cmd-note-flag) (mh-scan-format-file-check, mh-scan-format-file) (mh-adaptive-cmd-note-flag-check, mh-scan-prog) (mh-search-program, mh-compose-forward-as-mime-flag) (mh-compose-letter-function, mh-compose-prompt-flag) (mh-forward-subject-format, mh-insert-x-mailer-flag) (mh-redist-full-contents-flag, mh-reply-default-reply-to) (mh-reply-show-message-flag, mh-refile-preserves-sequences-flag) (mh-tick-seq, mh-update-sequences-after-mh-show-flag) (mh-bury-show-buffer-flag, mh-clean-message-header-flag) (mh-decode-mime-flag, mh-display-buttons-for-alternatives-flag) (mh-display-buttons-for-inline-parts-flag) (mh-do-not-confirm-flag, mh-fetch-x-image-url) (mh-graphical-smileys-flag, mh-graphical-emphasis-flag) (mh-highlight-citation-style) (mh-invisible-header-fields-internal) (mh-delay-invisible-header-generation-flag) (mh-invisible-header-fields, mh-invisible-header-fields-default) (mh-invisible-header-fields-compiled, mh-invisible-headers) (mh-lpr-command-format, mh-max-inline-image-height) (mh-max-inline-image-width, mh-mhl-format-file) (mh-mime-save-parts-default-directory, mh-print-background-flag) (mh-show-maximum-size, mh-show-use-goto-addr-flag) (mh-show-use-xface-flag, mh-store-default-directory) (mh-summary-height, mh-speed-update-interval) (mh-show-threads-flag, mh-tool-bar-search-function) (mh-after-commands-processed-hook, mh-alias-reloaded-hook) (mh-before-commands-processed-hook, mh-before-quit-hook) (mh-before-send-letter-hook, mh-delete-msg-hook) (mh-find-path-hook, mh-folder-mode-hook, mh-forward-hook) (mh-inc-folder-hook, mh-insert-signature-hook) (mh-kill-folder-suppress-prompt-hooks, mh-letter-mode-hook) (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook) (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook) (mh-unseen-updated-hook, mh-min-colors-defined-flag) (mh-folder-address, mh-folder-body) (mh-folder-cur-msg-number, mh-folder-date, mh-folder-deleted) (mh-folder-followup, mh-folder-msg-number, mh-folder-refiled) (mh-folder-sent-to-me-hint, mh-folder-sent-to-me-sender) (mh-folder-subject, mh-folder-tick, mh-folder-to) (mh-search-folder, mh-letter-header-field, mh-show-cc) (mh-show-date, mh-show-from, mh-show-header, mh-show-pgg-bad) (mh-show-pgg-good, mh-show-pgg-unknown, mh-show-signature) (mh-show-subject, mh-show-to, mh-show-xface, mh-speedbar-folder) (mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder) (mh-speedbar-selected-folder-with-unseen-messages): Move here from deprecated file mh-customize.el. * mh-exec.el: Move content into mh-e.el and remove. * mh-folder.el: New file. Contains mh-folder-mode from mh-e.el. * mh-funcs.el (mh-note-copied, mh-note-printed): Move to new file mh-scan.el. (mh-ephem-message, mh-help, mh-prefix-help): Move to mh-utils.el. * mh-gnus.el (mm-uu-dissect-text-parts): Add. (mh-mail-abbrev-make-syntax-table): Move to mh-utils.el and rename to mail-abbrev-make-syntax-table. * mh-identity.el (mh-identity-menu): New variable for existing menu. (mh-identity-make-menu-no-autoload): New alias for mh-identity-make-menu which can be called from mh-e.el. (mh-identity-list-set): Move to mh-e.el. (mh-identity-add-menu): New function. (mh-insert-identity): Add optional argument maybe-insert so that local variable mh-identity-local does not have to be visible. * mh-inc.el (mh-inc-spool-map): Move declaration to mh-e.el (with rest of keymaps). Update key binding for ? to call mh-help with help messages in new argument. (mh-inc-spool-make-no-autoload): New alias for mh-inc-spool-make which can be called from mh-e.el. (mh-inc-spool-list-set): Simplify update of mh-inc-spool-map-help. * mh-init.el: Move content into mh-e.el and remove. * mh-junk.el: Update requires, untabify, and add mh-autoload cookies. * mh-letter.el: New file. Contains mh-letter-mode from mh-comp.el. * mh-limit.el: New file. Contains display limit commands from mh-mime.el. * mh-mime.el: Rearrange for consistency with other files. (mh-buffer-data, mh-mm-inline-media-tests): Move here from mh-utils.el. (mh-folder-inline-mime-part, mh-folder-save-mime-part) (mh-folder-toggle-mime-part, mh-toggle-mime-buttons) (mh-goto-next-button): Move here from mh-e.el. * mh-print.el: Rearrange for consistency with other files. * mh-scan.el: New file. Contains scan line constants and utilities from XXX, mh-funcs, mh-utils.el. * mh-search.el: Rearrange for consistency with other files. (mh-search-mode-map): Drop C-c C-f {dr} bindings since these fields which don't exist in the saved header. Replace C-c C-f f with C-c C-f m per mail-mode consistency. (mh-search-mode): Use mh-set-help instead of setting mh-help-messages. * mh-seq.el (mh-thread-message, mh-thread-container) (mh-thread-id-hash, mh-thread-subject-hash, mh-thread-id-table) (mh-thread-id-index-map, mh-thread-index-id-map) (mh-thread-scan-line-map, mh-thread-scan-line-map-stack) (mh-thread-subject-container-hash, mh-thread-duplicates) (mh-thread-history, mh-thread-body-width) (mh-thread-find-msg-subject mh-thread-initialize-hash) (mh-thread-initialize, mh-thread-id-container) (mh-thread-remove-parent-link, mh-thread-add-link) (mh-thread-ancestor-p, mh-thread-get-message-container) (mh-thread-get-message, mh-thread-canonicalize-id) (mh-thread-prune-subject, mh-thread-container-subject) (mh-thread-rewind-pruning, mh-thread-prune-containers) (mh-thread-sort-containers, mh-thread-group-by-subject) (mh-thread-process-in-reply-to, mh-thread-set-tables) (mh-thread-update-id-index-maps, mh-thread-generate) (mh-thread-inc, mh-thread-generate-scan-lines) (mh-thread-parse-scan-line, mh-thread-update-scan-line-map) (mh-thread-add-spaces, mh-thread-print-scan-lines) (mh-thread-folder, mh-toggle-threads, mh-thread-forget-message) (mh-thread-current-indentation-level, mh-thread-next-sibling) (mh-thread-previous-sibling, mh-thread-immediate-ancestor) (mh-thread-ancestor, mh-thread-find-children) (mh-message-id-regexp, mh-thread-delete, mh-thread-refile): Move to new file mh-thread.el. (mh-subject-to-sequence, mh-subject-to-sequence-unthreaded) (mh-subject-to-sequence-threaded, mh-edit-pick-expr) (mh-pick-args-list, mh-narrow-to-subject, mh-narrow-to-from) (mh-narrow-to-cc, mh-narrow-to-to, mh-narrow-to-header-field) (mh-current-message-header-field, mh-narrow-to-range) (mh-delete-subject, mh-delete-subject-or-thread): Move to new file mh-limit.el. (mh-iterate-on-messages-in-region, mh-iterate-on-range): Move to mh-acros.el. (mh-internal-seqs, mh-catchup, mh-delete-msg-from-seq) (mh-internal-seq, mh-valid-seq-p, mh-seq-containing-msg) (mh-define-sequence, mh-undefine-sequence) (mh-delete-a-msg-from-seq, mh-delete-seq-locally) (mh-folder-size, mh-folder-size-flist, mh-folder-size-folder) (mh-parse-flist-output-line, mh-read-folder-sequences) (mh-read-msg-list, mh-notate-user-sequences) (mh-remove-cur-notation, mh-add-sequence-notation) (mh-remove-sequence-notation, mh-remove-all-notation): Move here from mh-e.el. (mh-make-seq, mh-seq-name, mh-find-seq, mh-seq-to-msgs) (mh-add-msgs-to-seq, mh-notate): Move here from mh-utils.el. * mh-show.el: New file. Contains mh-show-mode from mh-utils.el. * mh-speed.el: Rearrange for consistency with other files. * mh-thread.el: New file. Contains threading code from mh-seq.el. * mh-tool-bar.el: New file. Contains tool bar creation code from deprecated file mh-customize.el. * mh-utils.el (recursive-load-depth-limit): Remove setting. No longer needed. (mh-scan-msg-number-regexp, mh-scan-msg-overflow-regexp) (mh-scan-msg-format-regexp, mh-scan-msg-format-string) (mh-scan-msg-search-regexp, mh-cmd-note, mh-note-seq) (mh-update-scan-format, mh-msg-num-width): Move to new file mh-scan.el. (mh-show-buffer-mode-line-buffer-id, mh-letter-header-font-lock) (mh-header-field-font-lock, mh-header-to-font-lock) (mh-header-cc-font-lock, mh-header-subject-font-lock) (mh-show-font-lock-keywords) (mh-show-font-lock-keywords-with-cite) (mh-show-font-lock-fontify-region) (mh-gnus-article-highlight-citation, mh-showing-with-headers) (mh-start-of-uncleaned-message, mh-invalidate-show-buffer) (mh-unvisit-file, mh-defun-show-buffer, mh-show-mode-map) (mh-show-sequence-menu, mh-show-message-menu) (mh-show-folder-menu, mh-show-mode, mh-show-addr) (mh-maybe-show, mh-show, mh-show-msg, mh-show-unquote-From) (mh-msg-folder, mh-display-msg, mh-clean-msg-header): Move to new file mh-show.el. (mh-mail-header-separator, mh-signature-separator-regexp) (mh-signature-separator, mh-globals-hash, mh-user-path) (mh-draft-folder, mh-unseen-seq, mh-previous-seq, mh-inbox) (mh-previous-window-config, mh-current-folder mh-show-buffer) (mh-showing-mode, mh-show-mode-map, mh-show-folder-buffer) (mh-showing-mode, mh-seq-list, mh-seen-list, mh-summary-height) (mh-list-to-string, mh-list-to-string-1): Move to mh-e.el. (mh-buffer-data, mh-mm-inline-media-tests): Move to mh-mime.el. (mh-address-mail-regexp, mh-goto-address-find-address-at-point): Move to mh-alias.el. (mh-letter-font-lock-keywords): Move to new file mh-letter.el. (mh-folder-filename, mh-msg-count, mh-recenter, mh-msg-filename) (mh-show-mouse, mh-modify, mh-goto-msg, mh-set-folder-modified-p): Move to new file mh-folder.el. (with-mh-folder-updating, mh-in-show-buffer) (mh-do-at-event-location, mh-seq-msgs): Move to mh-acros.el. (mh-make-seq, mh-seq-name, mh-notate, mh-find-seq) (mh-seq-to-msgs, mh-add-msgs-to-seq, mh-canonicalize-sequence): Move to mh-seq.el. (mh-show-xface-function, mh-uncompface-executable, mh-face-to-png) (mh-uncompface, mh-icontopbm, mh-face-foreground-compat) (mh-face-background-compat, mh-face-display-function) (mh-show-xface, mh-picon-directory-list) (mh-picon-existing-directory-list) (mh-picon-cache, mh-picon-image-types) (mh-picon-set-directory-list, mh-picon-get-image) (mh-picon-file-contents, mh-picon-generate-path) (mh-x-image-cache-directory, mh-x-image-scaling-function) (mh-wget-executable, mh-wget-choice, mh-wget-option) (mh-x-image-temp-file, mh-x-image-url, mh-x-image-marker) (mh-x-image-url-cache-file, mh-x-image-scale-with-pnm) (mh-x-image-scale-with-convert) (url-unreserved-chars, url-hexify-string) (mh-x-image-url-cache-canonicalize) (mh-x-image-set-download-state, mh-x-image-get-download-state) (mh-x-image-url-fetch-image, mh-x-image-display) (mh-x-image-scale-and-display, mh-x-image-url-sane-p) (mh-x-image-url-display): Move to new file mh-xface.el. (mh-logo-display): Call mh-image-load-path. (mh-find-path-run, mh-find-path): Move here from deprecated file mh-init.el. (mh-help-messages): Now an alist of modes to an alist of messages. (mh-set-help): New function used to set mh-help-messages. (mh-help): Adjust for new format of mh-help-messages. Add help-messages argument. (mh-prefix-help): Refactor to use mh-help. (mh-coalesce-msg-list, mh-greaterp, mh-lessp): Move here from mh-e.el. (mh-clear-sub-folders-cache): New function added to avoid exposing mh-sub-folders-cache variable. * mh-xface.el: New file. Contains X-Face and Face header field display routines from mh-utils.el. 2006-01-17 Bill Wohler * mh-acros.el (assoc-string): Fix typo in argument. 2006-01-16 Bill Wohler * mh-acros.el (require): Remove defadvice of require as defadvice is verboten within Emacs and our implementation was returning the wrong value from require. Upcoming restructuring should make this unnecessary. (mh-assoc-ignore-case): Replace with defsubst assoc-string. * mh-alias.el (mh-alias-local-users, mh-alias-reload) (mh-alias-expand, mh-alias-minibuffer-confirm-address): Use it. * mh-identity.el (mh-identity-field-handler): Use it. * mh-comp.el (mh-show-buffer-message-number): Replace (car (read-from-string string) with (string-to-number string). * mh-e.el (mh-parse-flist-output-line, mh-folder-size-folder): Ditto. * mh-mime.el (mh-mml-forward-message): Ditto. * mh-search.el (mh-swish-next-result, mh-mairix-next-result) (mh-namazu-next-result, mh-grep-next-result, mh-md5sum-parser) (mh-openssl-parser, mh-index-update-maps): Ditto. * mh-seq.el (mh-translate-range, mh-narrow-to-header-field) (mh-thread-generate): Ditto. 2006-01-16 Katsumi Yamaoka * mh-mime.el (mh-mime-display, mh-mm-inline-message): Fix use of mm- functions for proper text=flowed handling (addresses SF #1273521). 2006-01-15 Bill Wohler * mh-e.el (mh-limit-map, mh-help-messages): Change keybinding of mh-narrow-to-from from / f to / m; mh-narrow-to-range from / r to / g. * mh-utils.el (mh-show-limit-map): Ditto. * mh-exec.el: Require mh-acros, mh-buffers, and mh-utils for standalone compile. (mh-progs, mh-lib, mh-lib-progs): Move here from mh-init.el. * mh-init.el (mh-progs, mh-lib, mh-lib-progs): Move to mh-exec.el, where they are used. * mh-comp.el (mh-pgp-support-flag): Move here from mh-utils.el; needed to help remove dependency on mh-utils. * mh-exec.el: New file. Move process support routines here from mh-utils.el. * mh-init.el (mh-utils): Remove require. (mh-exec): Add require. (mh-profile-component, mh-profile-component-value): Move here from mh-utils.el. * mh-utils.el (mh-pgp-support-flag): Move to mh-comp.el to reduce dependencies on mh-utils.el. (mh-profile-component, mh-profile-component-value): Move to mh-init.el since that's the only place that uses them. (Other than mh-alias.el; I'm thinking that mh-find-path can set variable from the Aliasfile component like it does the other components). (mh-index-max-cmdline-args, mh-xargs, mh-quote-for-shell) (mh-exec-cmd, mh-exec-cmd-error, mh-exec-cmd-daemon) (mh-exec-cmd-env-daemon, mh-process-daemon, mh-exec-cmd-quiet) (defvar, mh-exec-cmd-output) (mh-exchange-point-and-mark-preserving-active-mark) (mh-exec-lib-cmd-output, mh-handle-process-error): Move to new file mh-exec.el so that mh-init.el doesn't have to depend on mh-utils.el, breaking circular dependency. * mh-alias.el: * mh-customize.el: * mh-e.el: * mh-funcs.el: * mh-gnus.el: * mh-identity.el: * mh-inc.el: * mh-junk.el: * mh-mime.el: * mh-print.el: * mh-search.el: * mh-seq.el: * mh-speed.el: Added debugging statements (commented out) around requires to help find dependency loops. Will remove them when issues are resolved. 2006-01-14 Bill Wohler * mh-customize.el (mh-index): Rename group to mh-search and sort group definition and options accordingly. (mh-index-program): Rename to mh-search-program. (mh-kill-folder-suppress-prompt-hooks): Rename mh-index-p to mh-search-p. (mh-search-mode-hook): Change group from mh-index to mh-search. (mh-index-folder): Rename to mh-search-folder. Change group from mh-index to mh-search. * mh-e.el (mh-folder-font-lock-keywords): Rename mh-index-folder to mh-search-folder. * mh-search.el (mh-indexer) Rename to mh-searcher. The commands pick and grep are searchers too but aren't indexed. (mh-index-execute-search-function): Rename to mh-search-function. (mh-index-next-result-function): Rename to mh-search-next-result-function. (mh-index-regexp-builder): Rename to mh-search-regexp-builder. (mh-search): Since redo-search-flag defaults to nil and is of lesser importance, make it an optional argument and place it after the folder and search-regexp arguments. Sync docstring with manual. (mh-search-mode-map): Autoload so that keys are shown in help even before mh-search is loaded. (mh-search-mode): Sync docstring with manual. (mh-index-do-search): Rename argument indexer to searcher. Sync docstring with manual. (mh-pick-do-search): Sync docstring with manual. (mh-index-p): Rename to mh-search-p. (mh-indexer-choices): Rename to mh-search-choices. (mh-index-choose): Rename to mh-search-choose. Rename argument indexer to searcher. (mh-swish++-execute-search, mh-swish-execute-search) (mh-mairix-execute-search, mh-namazu-execute-search): Drop "and read the results" from docstring since these functions don't. (mh-pick-execute-search, mh-grep-execute-search): Sync docstring with manual. (mh-index-generate-pretty-name): Prune -search from string so that folder names for pick searches are the same as those of other searches. 2006-01-13 Bill Wohler * mh-acros.el (require): Add Satyaki's comment regarding what needs to happen to remove this defadvice which caused a little discussion on emacs-devel today (see Subject: mh-e/mh-acros.el advices `require' incorrectly). * mh-search.el (mh-index-next-result-function): Add format to docstring. (mh-mairix-next-result): Use nil instead of () which doesn't stand out as well. (mh-pick-execute-search): Operate across all folders if no folder given and recurse folder(s). (mh-pick-next-result): Handle new output. * mh-utils.el (mh-collect-folder-names): Fix docstring. (mh-children-p, mh-folder-list): New functions. 2006-01-12 Bill Wohler * mh-search.el: New file containing contents of mh-index.el and mh-pick.el. C-c C-c launches your mh-index-program; C-c C-p runs pick. Pick no longer sets the "search" sequence. Instead, it brings up a folder view that we're accustomed to. (Closes SF #829207.) (mh-index-search): Rename to mh-search. (mh-pick-menu): Rename menu from Pick to Search. Rename Execute the Search to Perform Search and call mh-do-search. Add Search with Pick menu item. (mh-do-search): Delete. (mh-search-mode): Rename from mh-pick-mode. (MH-Search): Rename mode from MH-Pick. (mh-search-mode-map): Rename from mh-pick-mode-map. (mh-search-mode-help-messages): Rename from mh-pick-mode-help-messages. (mh-index-choose): Don't reuse the last value of mh-indexer; when mh-pick-do-search sets it to 'pick, we don't necessarily want to stay with that choice! * mh-index.el: * mh-pick.el: Merge into mh-search.el and delete. * mh-customize.el (mh-index-program): Change mh-index-search to mh-search in docstring. (mh-tool-bar-search-function): Change default from mh-search-folder to mh-search. Remove mh-search-folder as choice and rename mh-index-search choice to mh-search. Fix docstring. (mh-pick-mode-hook): Rename to mh-search-mode-hook and change mh-search-folder to mh-search in docstring. * mh-e.el (mh-folder-folder-menu): Delete Search a Folder. Change Indexed Search to Search. Use mh-search instead of mh-index-search. (mh-folder-map): Delete i (mh-index-search) keybinding. Change s from mh-show-search-folder to mh-search. * mh-seq.el (mh-put-msg-in-seq): Fix docstring now that mh-search-folder no longer creates the search sequence. * mh-utils.el (mh-show-search-folder): Delete. (mh-show-folder-map): Delete i (mh-index-search) keybinding. Change s from mh-show-search-folder to mh-search. (mh-show-folder-menu): Delete Search a Folder. Change Indexed Search to Search. Use mh-search instead of mh-index-search. (mh-index-max-cmdline-args, mh-xargs, mh-quote-for-shell): Move here from deleted mh-index.el. 2006-01-11 Bill Wohler * mh-acros.el (mh-defun-compat, mh-defmacro-compat): Move here from mh-gnus.el. * mh-gnus.el: Require mh-acros. (mh-defmacro-compat, mh-defun-compat): Move to mh-acros.el. * mh-utils.el (mh-x-image-url-cache-canonicalize): Use url-hexify-string to remove special characters from filenames (closes SF #1396499). Note that this invalidates the existing names in your cache so you might as well remove ~/Mail/.mhe-x-image-cache/* now. (url-unreserved-chars, url-hexify-string): Define if not defined. Copied from url-util.el in Emacs22 for Emacs 21. * mh-buffers.el: New file. Contains constants and code from mh-index.el and mh-utils.el. * mh-alias.el: * mh-comp.el: * mh-e.el: * mh-funcs.el: * mh-init.el: * mh-junk.el: * mh-mime.el: * mh-print.el: * mh-seq.el: Require new file mh-buffers.el. * mh-index.el: Require new file mh-buffers.el. (mh-index-temp-buffer, mh-checksum-buffer): Move to new file mh-buffers.el. * mh-utils.el: Require new file mh-buffers.el. (mh-temp-buffer, mh-temp-fetch-buffer) (mh-aliases-buffer, mh-folders-buffer, mh-help-buffer) (mh-info-buffer, mh-log-buffer, mh-mail-delivery-buffer) (mh-recipients-buffer, mh-sequences-buffer, mh-log-buffer-lines) (mh-truncate-log-buffer): Move to new file mh-buffers.el. * mh-comp.el (mh-forward): Cosmetics on prompt when draft exists. (mh-send-letter): Add -msgid to mh-send-args (closes SF #725425). 2006-01-10 Bill Wohler * mh-comp.el (mh-insert-letter): If you choose a different folder, the cur message is used. Sync docstring with manual (closes SF #1205890). * mh-mime.el (mh-compose-forward): Use standard range argument instead of messages. Use more powerful mh-read-range instead of read-string. Sync docstring with manual (close SF #1205890). * mh-index.el (mh-index-search): Checking mh-find-path-run is unnecessary. (mh-index-next-folder): Don't back up a line when going backwards since this skips the current folder heading if point is on the first message after the folder heading (closes SF #1126188). * mh-init.el (mh-sys-path): Co-locate with mh-variants, which uses it. (mh-variants): Note variable isn't meant to be accessed directly; use function mh-variants instead. (mh-variant-info, mh-variant-mh-info, mh-variant-mu-mh-info) (mh-variant-nmh-info): Co-locate next to mh-variants, which uses them. Updated to use mh-file-command-p which is more accurrate than file-executable-p which returns t for directories. (mh-file-command-p): Move here from mh-utils, since mh-variant-*-info are the only functions to use it. (mh-variant-set, mh-variant-set-variant, mh-variant-p): Use function mh-variants instead of variable. More robust. (mh-find-path-run): Move here from mh-utils.el. Mention that checking this variable is unnecessary. (mh-find-path): Move here from mh-utils.el. With the advent of MH variants and an mhparam command that doesn't work if there isn't an MH profile, we can't get libdir for running install-mh. So don't bother. If there's an issue with the environment, direct the user to install MH and run install-mh (closes SF #835192). Don't read ~/.mh_profile directly. Use mh-profile-component which uses mhparam (closes SF #1016027). * mh-utils.el (mh-get-profile-field): Rename to mh-profile-component-value. Add colon to search removing unnecessary addition of colon to field in mh-profile-component. (mh-profile-component): Modify call to mh-profile-component-value accordingly. Move next to mh-profile-component-value. (mh-find-path-run, mh-find-path, mh-file-command-p): Move to mh-init.el. It makes sense that code that is only run once per session (more or less) is in mh-init.el rather than cluttering mh-utils.el. (mh-no-install, mh-install): Delete. * mh-customize.el (mh-folder-msg-number): * mh-mime.el (mh-file-mime-type): Remove trailing whitespace. 2006-01-09 Bill Wohler * mh-init.el (mh-variant-mu-mh-info, mh-variant-nmh-info): Applied patch from Satyaki from SF #1016027. * mh-e.el (mh-rescan-folder): Try to keep cursor at current message, even if cur sequence is no longer present (closes SF #1207247). * mh-comp.el: Use ";; Shush compiler." comment consistently per Mark's suggestion. (mh-letter-mode): Derive from mail-mode and delete code copied from mail-mode (closes SF #1385571). Mention mail-mode-hook in docstring. (mh-fill-paragraph-function): Delete. Handled by mail-mode. (mh-to-field-choices): For consistency with mail-mode, add "a" for "Mail-Reply-To:", "l" for "Mail-Followup-To:", and "r" for "Reply-To:". Change "r" to "m" for "From:" (closes SF #1400139). (mh-to-fcc): Move setting of folder argument to interactive argument as is the norm. (mh-letter-complete-function-alist): Add mail-reply-to. (mh-letter-mode-map): Add keys for mh-to-field (Mail-Reply-To, Mail-Followup-To, Reply-To, From). * mh-customize.el: Use ";; Forward definition." consistently. Comment declaration to remind programmer to update forward definition if default changes. * mh-funcs.el: * mh-inc.el: * mh-init.el: * mh-mime.el: * mh-seq.el: * mh-utils.el: Use ";; Shush compiler." comment consistently per Mark's suggestion. 2006-01-08 Bill Wohler Removed code that was marked as Emacs 20 compatible that was easily found showing how important it is to document such things (closes SF #1359240). Feel free to nuke any other Emacs 20 peculiarities that you find. Wrapped code for shushing compiler with (eval-when-compile), sometimes moving the defvars closer to where they were used. * mh-alias.el (mh-alias-gecos-name): Use replace-regexp-in-string instead of mh-replace-in-string as mh-replace-in-string was replaced by a more appropriate defsubst in mh-xemacs.el. * mh-comp.el: Require cleanup, wrap compiler-shushing defvars with eval-when-compile. (mh-file-is-vcard-p): Remove redundant test. * mh-customize.el: Require cleanup, wrap compiler-shushing defvars with eval-when-compile. (mh-adaptive-cmd-note-flag, mh-invisible-header-fields) (mh-invisible-header-fields-default): Add forward definitions. (mh-invisible-header-fields-default): Alphabetize. * mh-e.el: Require cleanup, wrap compiler-shushing defvars with eval-when-compile. (mh-thread-scan-line-map-stack, tool-bar-mode): Delete unused variables. (mh-colors-available-p): Just call display-color-cells. It's on all supported Emacsen (and defaliased on XEmacs). * mh-funcs.el: * mh-inc.el: * mh-init.el: Wrap compiler-shushing defvars with eval-when-compile. * mh-identity.el: Don't need (mh-require-cl). * mh-index.el: Don't need to load executable any more. * mh-mime.el: Wrap compiler-shushing defvars with eval-when-compile. (mh-have-file-command): Initialize variable to 'undefined. Add docstring. Update function of same name accordingly. Also don't need to load executable any more. (mh-mime-content-types): Delete. (mh-minibuffer-read-type): Prompt user for type if mh-file-mime-type returns application/octet-stream. Assume we have mailcap-mime-types. (mh-mime-display): Update error message. * mh-seq.el: Require cleanup, and wrap compiler-shushing defvars with eval-when-compile. * mh-utils.el: Require cleanup, and wrap compiler-shushing defvars with eval-when-compile. (mh-clean-msg-header): Don't set after-change-functions to nil. (mh-replace-in-string): Remove. Create defsubst in mh-xemacs.el instead. 2006-01-07 Bill Wohler * mh-customize.el: Updated Faces documentation in header. (mh-invisible-header-fields-internal): Add X-Lumos-SenderID, X-Return-Path-Hint, and X-Roving-* from Roving ConstantContact. * mh-mime.el (mh-mml-tag-present-p): Update regexp to handle tags inserted by Gnus gnus-summary-mail-forward (closes SF #1399307). 2006-01-03 Mark D. Baushke * mh-e.el (mh-delete-a-msg): Fix whitespace nit. * mh-index.el (mh-mairix-execute-search): Fix symbol quote. 2006-01-03 Bill Wohler * mh-alias.el (mh-alias-add-alias): Grand message and error string unification. Use single sentence if possible by using semicolon. Don't end message with punctuation. Don't need format with message. Quote messages as in docstrings: use `' around symbols, \" for option choices. Don't use quotes around %s. * mh-comp.el (mh-complete-word): Ditto. * mh-customize.el (mh-adaptive-cmd-note-flag-check) (mh-scan-format-file-check): Ditto. * mh-e.el (mh-refile-or-write-again, mh-previous-unread-msg) (mh-delete-a-msg, mh-refile-a-msg, mh-next-unread-msg) (mh-msg-num-width-to-column): Ditto. * mh-identity.el (mh-identity-field-handler): Ditto. * mh-index.el (mh-mairix-execute-search) (mh-swish-execute-search, mh-swish++-execute-search) (mh-namazu-execute-search): Ditto. * mh-init.el (mh-variant-set): Ditto. * mh-mime.el (mh-mh-to-mime-undo, mh-mml-forward-message) (mh-secure-message, mh-mime-display): Ditto. * mh-pick.el (mh-search-folder, mh-pick-construct-regexp): Ditto. * mh-seq.el (mh-narrow-to-seq, mh-put-msg-in-seq, mh-read-seq) (mh-read-range, mh-thread-container-subject): Ditto. * mh-utils.el (mh-x-image-scale-and-display) (mh-prompt-for-folder, mh-handle-process-error) (mh-list-to-string-1): Ditto. * mh-comp.el (mh-reply): Use standard default notation in prompts (closes SF #1275933). * mh-mime.el (mh-mime-save-parts): Ditto. * mh-seq.el (mh-read-seq, mh-read-range): Ditto. * mh-customize.el (mh-folder-msg-number): Snow is actually off-white on low color displays which turns to white when bold. This is unreadable on white backgrounds. Use snow with min-colors requirement. Use cyan on low-color displays. * mh-init.el (mh-defface-compat): On low-color displays, delete the high-color display rather than simply strip the min-colors requirement since the existing algorithm shadowed the desired display on low-color displays. * mh-alias.el (mh-alias-add-alias): Remove leading * from docstring. 2006-01-02 Bill Wohler * mh-alias.el (mh-alias-grab-from-field): Remove leading * from docstring. Does this mean something in a defun? * mh-customize.el (bw-new-face-to-old, bw-old-face-to-new): Checkdoc fix. * mh-e.el (mh-inc-folder): Rename maildrop-name argument to file so it reads better in docstring and manual. Sync docstring with manual. * mh-init.el (mh-defface-compat): Remove trailing space (checkdoc). * mh-alias.el (mh-alias-apropos): Sync docstring with manual. * mh-comp.el (mh-redistribute, mh-to-field, mh-to-fcc) (mh-insert-auto-fields, mh-send-letter, mh-yank-cur-msg) (mh-fully-kill-draft, mh-open-line, mh-letter-complete) (mh-letter-complete-or-space, mh-letter-confirm-address) (mh-letter-next-header-field-or-indent) (mh-letter-previous-header-field): Ditto. * mh-customize.el (mh-alias-completion-ignore-case-flag) (mh-default-folder-for-message-function, mh-mml-method-default) (mh-signature-file-name, mh-yank-behavior, mh-show-hook) (mh-show-mode-hook) Ditto. * mh-e.el (mh-refile-or-write-again, mh-toggle-showing): Ditto. * mh-funcs.el (mh-pipe-msg, mh-sort-folder, mh-undo-folder) (mh-store-msg, mh-store-buffer): Ditto. * mh-index.el (mh-index-search, mh-index-do-search) (mh-index-next-folder, mh-index-sequenced-messages): Ditto. * mh-junk.el (mh-spamassassin-blacklist): Ditto. * mh-mime.el (mh-mh-compose-external-compressed-tar) (mh-mh-compose-external-type, mh-mh-to-mime, mh-mh-to-mime-undo) (mh-mml-secure-message-sign, mh-mml-secure-message-encrypt) (mh-mml-secure-message-signencrypt): Ditto. * mh-pick.el (mh-search-folder): Ditto. * mh-seq.el (mh-widen): Ditto. * mh-utils.el (mh-show, mh-modify): Ditto. 2006-01-02 Mark D. Baushke * mh-mime.el (mh-mml-unsecure-message): Remove unused argument. 2006-01-01 Bill Wohler * mh-customize.el: Sync docstrings with manual for faces and sort them alphabetically. (mh-faces): Move below mh-hooks. (mh-folder-faces, mh-index-faces, mh-letter-faces) (mh-show-faces, mh-speed-faces): Delete. Organize faces like hooks. (mh-speed-update-interval): Fix group (mh-speedbar, not mh-speed). (facemenu-unlisted-faces): Might as well ignore all MH-E faces. (mh-folder-body-face, mh-folder-cur-msg-face) (mh-folder-cur-msg-number-face, mh-folder-date-face) (mh-folder-followup-face, mh-folder-msg-number-face) (mh-folder-deleted-face, mh-folder-refiled-face) (mh-folder-subject-face, mh-folder-address-face) (mh-folder-scan-format-face, mh-folder-to-face) (mh-index-folder-face, mh-show-cc-face, mh-show-date-face) (mh-show-header-face, mh-show-pgg-good-face) (mh-show-pgg-unknown-face, mh-show-pgg-bad-face) (mh-show-to-face, mh-show-from-face, mh-show-subject-face): Delete. (mh-folder-cur-msg): Unused. Delete. (mh-folder-address): Use defface; inherit from mh-folder-subject. (mh-folder-body, mh-folder-cur-msg-number, mh-folder-date): Inherit from mh-folder-msg-number. (mh-folder-deleted): Use defface. Inherit from mh-folder-msg-number. (mh-folder-sent-to-me-hint): New face. Inherit from mh-folder-date. (mh-folder-sent-to-me-sender): Rename from mh-folder-scan-format. Use defface. Inherit from mh-folder-followup. (mh-show-xface): Inherit from mh-show-from and highlight. (bw-face-generation, bw-toggle-faces) (bw-new-face-to-old, bw-old-face-to-new): New (tempoarary) variables, functions for toggling between old and new faces. * mh-e.el (font-lock-auto-fontify, font-lock-defaults): Hide in eval-when-compile. We should probably do this throughout. (mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp) (mh-scan-refiled-msg-regexp, mh-scan-cur-msg-number-regexp) (mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp) (mh-scan-subject-regexp): Sync docstrings with manual. (mh-scan-format-regexp): Rename to mh-scan-sent-to-me-sender-regexp. Drop date parenthesized expression. Make expression more like the others (anchored at the beginning of line). Sync docstrings with manual. (mh-folder-font-lock-keywords): Use faces directly rather than -face variables. Use mh-scan-sent-to-me-sender-regexp instead of mh-scan-format-regexp, and within that expression, use faces mh-folder-sent-to-me-hint and mh-folder-sent-to-me-sender instead of mh-folder-date-face and mh-folder-scan-format-face which were misleading. * mh-mime.el (mh-mime-security-button-face): Use faces directly rather than -face variables. * mh-utils.el (mh-show-font-lock-keywords): Use faces directly rather than -face variables. (mh-face-foreground-compat, mh-face-background-compat): New macros. (mh-face-display-function): Use mh-face-foreground-compat and mh-face-background-compat to use inherited attributes of mh-show-xface on Emacs 22 while still working on Emacs 21. 2005-12-28 Bill Wohler * mh-comp.el (mh-e-user-agent): Move here from simple.el. Use mh-user-agent-compose instead of mh-smail-batch. 2005-12-27 Bill Wohler * mh-utils.el (mh-prompt-for-folder): Use can-create argument to suppress creation of folder if it doesn't exist. 2005-12-27 Stefan Monnier * mh-utils.el (mh-process-daemon): Don't change buffer in proc-filter. 2005-12-23 Bill Wohler * mh-e.el (mh-folders-changed): Fix typo in docstring. Follow MH-E Developers Guide conventions. Use `' quotes for Help hyperlinks such as symbols, Info nodes, or URLs. Use \" quotes for everything else. Otherwise, you can accidentally get links to nonsense symbols. 2005-12-22 Bill Wohler Follow Emacs coding conventions. Use default setting of emacs-lisp-docstring-fill-column which is 65. * mh-alias.el (mh-alias-reload): Sync docstrings with manual. * mh-comp.el (mh-letter-mode): Use 60 column width. (mh-forward, mh-insert-signature, mh-send-letter): Sync docstrings with manual. (mh-yank-cur-msg): Mention that mh-ins-buf-prefix isn't used if you have added a mail-citation-hook and neither are used if you use one of the supercite flavors of mh-yank-behavior. Sync docstrings with manual. * mh-customize.el (mh-kill-folder-suppress-prompt-hooks): Rename from mh-kill-folder-suppress-prompt-hook since it is an abnormal hook. Use "Hook run by `function'..." instead of "Invoked...". Sync docstrings with manual. (mh-ins-buf-prefix, mh-yank-behavior): Mention that mh-ins-buf-prefix isn't used if you have added a mail-citation-hook and neither are used if you use one of the supercite flavors of mh-yank-behavior. Sync docstrings with manual. (mail-citation-hook): Delete. Use one in sendmail.el. (mh-signature-file-name, mh-after-commands-processed-hook) (mh-alias-reloaded-hook, mh-before-commands-processed-hook) (mh-before-quit-hook, mh-before-send-letter-hook) (mh-delete-msg-hook, mh-find-path-hook, mh-folder-mode-hook) (mh-forward-hook, mh-inc-folder-hook, mh-insert-signature-hook) (mh-letter-mode-hook) (mh-mh-to-mime-hook, mh-pick-mode-hook, mh-quit-hook) (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook) (mh-unseen-updated-hook): Use "Hook run by `function'..." instead of "Invoked...". Sync docstrings with manual. * mh-e.el (mh-last-destination, mh-last-destination-folder) (mh-last-destination-write, mh-folder-mode-map, mh-arrow-marker) (mh-delete-list, mh-refile-list, mh-folders-changed) (mh-next-direction, mh-view-ops, mh-folder-view-stack) (mh-index-data, mh-first-msg-num, mh-last-msg-num) (mh-mode-line-annotation, mh-sequence-notation-history) (mh-colors-available-flag): Move comment into docstring. (mh-delete-msg, mh-execute-commands, mh-inc-folder, mh-quit) (mh-process-commands): Sync docstrings with manual. (mh-refile-msg): Small doc edit. (mh-delete-a-msg, mh-refile-a-msg): Sync docstrings with manual. Rename msg argument to message. * mh-funcs.el (mh-kill-folder): Sync docstrings with manual. * mh-e.el (mh-update-unseen): No longer say "The value of `foo-hook' is a list of functions to be called, with no arguments, ...," but rather just "The hook foo-hook is called...". * mh-mime.el (mh-mh-to-mime): Ditto. * mh-pick.el (mh-pick-mode): Ditto. * mh-utils.el (mh-showing-mode): Use uppercase for argument in docstring. (mh-seq-list, mh-seen-list, mh-showing-with-headers): Move comment into docstring. (mh-show-mode, mh-show-msg, mh-find-path): Sync docstrings with manual. 2005-12-19 Stephen Gildea * mh-customize.el (mh-after-commands-processed-hook): New variable. (mh-before-commands-processed-hook): Rename mh-folder-updated-hook. * mh-e.el (mh-process-commands): Rename mh-folder-updated-hook to mh-before-commands-processed-hook, call new mh-after-commands-processed-hook. (mh-folders-changed): New variable (for use in mh-after-commands-processed-hook). 2005-12-19 Bill Wohler * mh-acros.el: * mh-alias.el: * mh-comp.el: * mh-customize.el: * mh-e.el: * mh-funcs.el: * mh-gnus.el: * mh-identity.el: * mh-inc.el: * mh-index.el: * mh-init.el: * mh-junk.el: * mh-mime.el: * mh-pick.el: * mh-print.el: * mh-seq.el: * mh-speed.el: * mh-utils.el: Follow commenting conventions. Don't use ;;; form so much, except for headings. Precede headings with page feed. This was mostly already done, so I made it a convention. Did not update copyright on a couple of files since this was an insignificant change. 2005-12-18 Bill Wohler * mh-customize.el (mh-toolbar): Rename to mh-tool-bar. (mh-tool-bar-search-function): Sync docstrings with manual. (mh-tool-bar-customize): Replace toolbar with tool bar in docstring. (mh-tool-bar-letter-help): Fix manual reference. (mh-xemacs-use-toolbar-flag): Rename to mh-xemacs-use-tool-bar-flag. Initialize to mh-xemacs-has-tool-bar-flag. Sync docstrings with manual. (mh-xemacs-toolbar-position): Rename to mh-xemacs-tool-bar-position. Initialize to nil. Drop "no tool bar" option (redundant) and change "Same As Default Tool Bar" setting to nil. Sync docstrings with manual. (mh-tool-bar-define): Replace toolbar with tool-bar or tool bar depending on context. (mh-toolbar-init): Rename to mh-tool-bar-init. Simplify condition for calling set-specifier. Only look at the value of mh-xemacs-use-tool-bar-flag. (mh-tool-bar-folder-buttons, mh-tool-bar-letter-buttons): Sync docstrings with manual. * mh-comp.el (mh-letter-mode): Use mh-tool-bar-init instead of mh-toolbar-init. * mh-e.el (mh-folder-mode): Ditto. * mh-utils.el (mh-show-mode): Ditto. 2005-12-15 Bill Wohler * mh-e.el (mh-delete-msg): Sync docstrings with manual. * mh-seq.el (mh-delete-subject, mh-thread-next-sibling) (mh-thread-previous-sibling, mh-thread-ancestor) (mh-thread-delete, mh-thread-refile): Ditto. 2005-12-14 Bill Wohler * mh-customize.el (mh-speed-flists-interval): Rename to mh-speed-update-interval. (mh-speed-run-flists-flag): Delete. Setting mh-speed-flists-interval to 0 accomplishes the same thing. * mh-speed.el (mh-folder-speedbar-buttons, mh-speed-flists): Use mh-speed-update-interval instead of mh-speed-run-flists-flag. (mh-speed-toggle, mh-speed-view, mh-speed-refresh): Sync docstrings with manual. 2005-12-09 Bill Wohler * mh-customize.el (mh-path): Move here from mh-init.el. (mh-variant): Mention that mh-path can be customized. (mh-invisible-header-fields-internal): Add X-ContentStamp, X-MAIL-INFO, and X-UNTD- from NetZero. * mh-init.el (mh-path): Move defcustom to mh-customize.el. 2005-12-04 Bill Wohler * mh-customize.el (mh-sortm-args): Sync docstrings with manual. (mh-invisible-header-fields-internal): Add X-Bugzilla-* and X-Virus-Scanned. * mh-customize.el (mh-insert-signature-hook): Rename mh-letter-insert-signature-hook to mh-insert-signature-hook. * mh-comp.el (mh-insert-signature): Ditto. * mh-customize.el (mh-fetch-x-image-url): Change default from 'ask to nil. Remove t option. Sync docstring with manual (closes SF #831278). (mh-invisible-header-fields-internal): Remove X-Image-URL so that users can see it, look it up in the manual's index, and discover mh-fetch-x-image-url (closes SF #831278). * mh-customize.el (mh-new-messages-folders): Rename from mh-index-new-messages-folders. (mh-ticked-messages-folders): Rename from mh-index-ticked-messages-folders. * mh-index.el (mh-index-sequenced-messages) (mh-index-new-messages): Ditto. * mh-comp.el (mh-forward): Went over all uses of the word "RANGE" in the docstrings and made usage consistent. Generally speaking, "messages in range" and "range of messages" is redundant and just "range" can be used in most circumstances. Also ensured that mh-interactive-range was mentioned in all interactive functions that use a range which describes the range argument for both users and programmers. * mh-e.el (mh-delete-msg-no-motion, mh-refile-msg) (mh-refile-or-write-again, mh-rescan-folder, mh-undo) (mh-visit-folder, mh-scan-folder, mh-regenerate-headers) (mh-notate-user-sequences, mh-delete-msg-from-seq, mh-catchup): Ditto. * mh-funcs.el (mh-copy-msg, mh-pack-folder, mh-pack-folder-1): Ditto. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Ditto. * mh-print.el (mh-ps-print-range, mh-ps-print-msg) (mh-ps-print-msg-file, mh-print-msg): Ditto. * mh-seq.el (mh-put-msg-in-seq, mh-range-to-msg-list) (mh-narrow-to-range, mh-toggle-tick): Ditto. 2005-12-01 Bill Wohler Rewrote Reading Mail chapter in manual which affected mh-show customization group and related functions. * mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-letter-toggle-header-field-display): "Ellipsed" isn't a word, I think, so use "truncated". * mh-customize.el (mh-folder, mh-folder-faces): Group's manual section is Folders, not Organizing. Parent of mh-folder-faces is mh-folder, not mh-show. (mh-speed): Rename to mh-speedbar for consistency with mh-toolbar. (mh-thread): New group that corresponds with manual's Threading chapter. (mh-letter-faces): Group's manual section is Editing Drafts, not Sending Mail. (mh-sortm-args): New customization variable that used to be a defvar. (mh-index-new-messages-folders, mh-index-ticked-messages-folders): Move from mh-index group to mh-folders group. (mh-alias-local-users-prefix, mh-large-folder) (mh-recursive-folders-flag, mh-before-quit-hook) (mh-folder-mode-hook, mh-kill-folder-suppress-prompt-hook) (mh-quit-hook, mh-refile-msg-hook): Move from mh-show group to mh-folder group. (mh-highlight-citation-style): Rename from mh-highlight-citation-p. Sync docstrings with manual. (mh-mhl-format-file): Rename from mhl-formfile. Sync docstrings with manual. (mh-show-threads-flag): Move from mh-show group to mh-thread group. (mh-find-path-hook): Move from mh-show group to mh-e group. (mh-folder-updated-hook): Add to mh-folder group. (mh-forward-hook): Move from mh-folder to mh-sending-mail group. (mh-unseen-updated-hook): Move from mh-show to mh-sequences group. (mh-bury-show-buffer-flag, mh-clean-message-header-flag) (mh-decode-mime-flag, mh-display-buttons-for-alternatives-flag) (mh-display-buttons-for-inline-parts-flag) (mh-do-not-confirm-flag, mh-fetch-x-image-url) (mh-graphical-smileys-flag, mh-graphical-emphasis-flag) (mh-invisible-header-fields-default, mh-invisible-header-fields) (mh-lpr-command-format, mh-max-inline-image-height) (mh-max-inline-image-width) (mh-mime-save-parts-default-directory, mh-print-background-flag) (mh-show-maximum-size, mh-show-use-goto-addr-flag) (mh-show-use-xface-flag, mh-store-default-directory) (mh-summary-height, mh-delete-msg-hook) (mh-show-hook, mh-show-mode-hook): Sync docstrings with manual. * mh-e.el (mh-scan-format-mh, mh-scan-good-msg-regexp) (mh-scan-deleted-msg-regexp, mh-scan-refiled-msg-regexp) (mh-scan-cur-msg-number-regexp, mh-scan-subject-regexp): Use non-fontification instead of non-fontifying. (mh-header-display): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-next-undeleted-msg, mh-previous-undeleted-msg): Rename arg to count. Sync docstrings with manual. (mh-refile-or-write-again): Use output from mh-write-msg-to-file so that message doesn't change when using this command. Sync docstrings with manual. (mh-page-msg, mh-previous-page): Rename arg to lines. Sync docstrings with manual. (mh-write-msg-to-file): Rename msg to message. Rename no-headers to no-header. Sync docstrings with manual. (mh-ps-print-map): Delete keybindings for deleted commands mh-ps-print-toggle-mime and mh-ps-print-msg-show. (mh-help-messages): Update printing help. (mh-delete-msg, mh-delete-msg-no-motion, mh-first-msg) (mh-last-msg, mh-previous-unread-msg, mh-next-button) (mh-prev-button, mh-folder-toggle-mime-part) (mh-folder-inline-mime-part, mh-folder-save-mime-part) (mh-next-unread-msg, mh-toggle-mime-buttons): Sync docstrings with manual. * mh-funcs.el (mh-sortm-args): Now a customization option and in mh-customize.el. (mh-pipe-msg): Rename include-headers to include-header. Sync docstrings with manual. (mh-burst-digest, mh-page-digest, mh-page-digest-backwards) (mh-store-msg): Sync docstrings with manual. * mh-mime.el (mh-mime-save-parts): Rename arg to prompt. Sync docstrings with manual. (mh-toggle-mh-decode-mime-flag): Use English in message, not Lisp. Sync docstrings with manual. (mh-mm-display-part, mh-mm-inline-message): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-press-button): Sync docstrings with manual. (mh-display-with-external-viewer): Fix default output in minibuffer. Sync docstrings with manual. * mh-print.el (mh-ps-print-mime, mh-ps-print-toggle-mime): Delete. (mh-ps-print-color-option): Incorporate docstring from ps-print-color-p. (mh-ps-spool-buffer): Remove unused code. Fix indent. Slimline docstring. (mh-ps-spool-msg): Slimline docstring. Rename from mh-ps-spool-a-msg. Rewrite to use existing show buffer when available. (mh-ps-print-range): Extract method from common code in mh-ps-print-msg and mh-ps-print-msg-file. (mh-ps-print-preprint): Clean docstring. Use filename "mh-%s". (mh-ps-print-msg-show): Delete. Can use either mh-ps-print-msg-show or mh-ps-print-msg-show to same effect with new code in mh-ps-spool-msg. (mh-print-msg): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-ps-print-msg, mh-ps-print-msg-file) (mh-ps-print-toggle-faces, mh-ps-print-toggle-color): Sync docstrings with manual. * mh-utils.el (mh-show-ps-print-msg-show) (mh-show-ps-print-toggle-mime): Delete. (mh-show-ps-print-map): Update accordingly. (mh-show-mode): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-show-xface, mh-display-msg): Use mh-mhl-format-file instead of mhl-formfile. (mh-show): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-show-font-lock-fontify-region, mh-modify, mh-goto-msg): Sync docstrings with manual. 2005-12-01 Bill Wohler * mh-init.el (mh-defface-compat): Checkdoc fix. * mh-junk.el (mh-bogofilter-blacklist, mh-bogofilter-whitelist): Bogofilter is lowercase except at beginning of sentence and in titles. 2005-11-04 Bill Wohler * mh-customize.el (mh-min-colors-defined-flag, mh-defface-compat): Move to mh-init.el to minimize bulk of mh-customize.el. * mh-init.el: Modify commentary since file is used for load and initialization as well as setting and getting the variant. (mh-min-colors-defined-flag, mh-defface-compat): Move here from mh-customize.el. * mh-customize.el: Refactor faces. Move grayscale requirements last before t. Use uniform line breaks. (mh-min-colors-defined-flag): New variable. (mh-defface-compat): New function. Provides backward compatibility for face specs. (mh-show-header, mh-show-date, mh-show-cc, mh-folder-to) (mh-folder-refiled, mh-folder-cur-msg-number, mh-folder-cur-msg) (mh-folder-body): Use mh-defface-compat. 2005-11-03 Dan Nicolaescu * mh-customize.el (mh-folder-body-face, mh-folder-cur-msg-face) (mh-folder-cur-msg-number-face, mh-folder-refiled-face) (mh-folder-to-face): Use the min-colors attribute instead of the type attribute. 2005-11-03 Bill Wohler * mh-customize.el (mh-refile-preserves-sequences-flag) (mh-tick-seq, mh-update-sequences-after-mh-show-flag): Sync docstrings with manual. * mh-e.el (mh-update-sequences): Sync docstrings with manual. * mh-seq.el (mh-delete-seq, mh-list-sequences, mh-narrow-to-seq) (mh-widen, mh-toggle-tick, mh-narrow-to-tick): Sync docstrings with manual. 2005-11-01 Bill Wohler * mh-comp.el (mh-redist-full-contents) Convert defvar to defcustom. (mh-smail, mh-extract-rejected-mail, mh-forward, mh-redistribute) (mh-reply, mh-send, mh-send-other-window) (mh-fill-paragraph-function): Sync docstrings with manual. (mh-edit-again, mh-extract-rejected-mail, mh-redistribute): Rename msg argument to message (to make for a better docstring). * mh-customize.el (mh-redist-full-contents-flag): Convert defvar to defcustom. Rename by adding -flag. (mh-compose-forward-as-mime-flag) (mh-compose-letter-function, mh-forward-subject-format) (mh-insert-x-mailer-flag, mh-reply-default-reply-to) (mh-reply-show-message-flag, mh-letter-mode-hook): Sync docstrings with manual. * mh-print.el (mh-ps-spool-buffer, mh-ps-spool-a-msg) (mh-ps-print-msg): Remove debugging messages. (mh-ps-print-msg-show, mh-ps-print-msg-show) (mh-ps-print-toggle-color, mh-ps-print-toggle-mime): Remove period after message per conventions. 2005-10-30 Bill Wohler * mh-e.el (mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp) (mh-scan-refiled-msg-regexp, mh-scan-cur-msg-number-regexp): Sync docstrings with manual. * mh-customize.el (mh-compose-space-does-completion-flag) (mh-signature-separator-flag, mh-interpret-number-as-range-flag) (mh-adaptive-cmd-note-flag): Use "Non-nil means" instead of "On means" to remain checkdoc clean and consistent with Emacs. I raised this issue with the Emacs developers and Stallman agrees that "On means" should be allowed in custom docstrings but that this change requires thought and should wait until after the Emacs 22 release. 2005-10-28 Bill Wohler * mh-comp.el (mh-annotate-msg): Use new variable mh-scan-field-destination-offset rather than hard-coding 1. * mh-customize.el (mh-interpret-number-as-range-flag): Add * to docstring. (mh-adaptive-cmd-note-flag-check, mh-scan-format-file-check): New functions to check input for mh-adaptive-cmd-note-flag and mh-scan-format-file respectively. (mh-adaptive-cmd-note-flag, mh-scan-format-file): Docstring fixes, add :set. * mh-e.el (mh-scan-field-destination-offset): New variable. The destination is the -, t, b, c, or n character for Replied, To, cc, Bcc, or Newsgroups respectively. (mh-make-folder, mh-regenerate-headers, mh-generate-new-cmd-note): Call new function mh-msg-num-width-to-column to make leap between width and column more explicit. (mh-msg-num-width-to-column): New function that steals logic from old mh-set-cmd-note. Also, throw error if mh-scan-format-file isn't t since we can't adapt the scan lines in this case. (mh-set-cmd-note): Now just simply sets mh-cmd-note which will make the documentation more clear. (mh-generate-new-cmd-note): Docstring fix--mh-cmd-note is a column, not a width. (mh-add-sequence-notation, mh-remove-sequence-notation): Use new variable mh-scan-field-destination-offset rather than hard-coding 1. * mh-utils.el (mh-cmd-note) Synced docstring with manual. (mh-notate): Use new variable mh-scan-field-destination-offset rather than hard-coding 1. (mh-message-number-width): Rename to mh-msg-num-width to be consistent with mh-get-msg-num and mh-msg-num-width-to-column. * mh-customize.el (mh-x-face-file, mh-show-use-xface-flag) (mail-citation-hook): Quote URLs in docstrings and precede with `URL'. The former will suppress checkdoc warnings, the latter will turn them into hyperlinks in Emacs 22 (I just added the code to do that today). (mh-scan-format-file): Checkdoc fix. 2005-10-27 Bill Wohler * mh-customize.el (mh-adaptive-cmd-note-flag) (mh-scan-format-file, mh-scan-prog): Sync docstrings with manual. * mh-e.el (mh-scan-format-mh, mh-note-deleted, mh-note-refiled) (mh-note-cur, mh-scan-good-msg-regexp) (mh-scan-deleted-msg-regexp, mh-scan-refiled-msg-regexp) (mh-scan-valid-regexp, mh-scan-cur-msg-number-regexp) (mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp) (mh-scan-subject-regexp, mh-scan-format-regexp) (mh-folder-font-lock-keywords, mh-set-cmd-note): Sync docstrings with manual. * mh-funcs.el (mh-note-copied): Sync docstrings with manual. * mh-utils.el (mh-goto-msg): Use mh-scan-msg-search-regexp instead of hard-coded string. (mh-mail-header-separator, mh-signature-separator-regexp): Use "regular expression" in docstring instead of regexp. (mh-scan-msg-number-regexp) (mh-scan-msg-overflow-regexp, mh-scan-msg-format-regexp) (mh-scan-msg-format-string, mh-scan-msg-search-regexp) (mh-cmd-note): Sync docstrings with manual. * mh-comp.el (mh-insert-signature, mh-insert-auto-fields): Checkdoc fixes. * mh-customize.el (mh-compose-insertion, mh-x-face-file): Ditto. * mh-mime.el (mh-mh-to-mime, mh-mml-attach-file) (mh-mml-secure-message-sign, mh-mml-secure-message-encrypt) (mh-mml-secure-message-signencrypt): Ditto. 2005-10-24 Bill Wohler * mh-gnus.el: Load mml.el in order to see if mml-minibuffer-read-disposition is defined or not. * mh-mime.el: Now that mh-gnus.el loads mml, we shouldn't need the mml autoloads. 2005-10-23 Miles Bader * .arch-inventory: New file. 2005-10-23 Bill Wohler * mh-customize.el (mh-interpret-number-as-range-flag): Sync docstring with manual. * mh-identity.el (mh-assoc-ignore-case): Merge with version in mh-alias.el and move to mh-acros.el. * mh-alias.el (mh-assoc-ignore-case): Merge with version in mh-identity.el and move to mh-acros.el. * mh-acros.el (mh-assoc-ignore-case): Merge of function from mh-identity.el and mh-alias.el. * mh-mime.el: Autoload mm-uu for mm-uu-dissect to avoid compiler warning in Emacs 22. 2005-10-23 Satyaki Das * mh-identity.el (mh-assoc-ignore-case): New macro that uses assoc-string (if the function is available) and falls back on assoc-ignore-case if assoc-string is not found. (mh-identity-field-handler): Use mh-assoc-ignore-case since assoc-ignore-case is a obsolete function in Emacs 22. * mh-e.el (mh-folder-buttons-init-flag): New variable that keeps track of whether the tool-bar in mh-folder-mode has been initialized yet. (mh-folder-mode): Initialize the tool-bar for folders the first time we get into mh-letter-mode. * mh-customize.el (mh-buffer-exists-p): New function which tests presence of buffers of a given mode. (mh-tool-bar-define): New functions mh-tool-bar-folder-buttons-init and mh-tool-bar-letter-buttons-init are defined. These functions are used to create the tool-bar from the corresponding customizable variables. * mh-comp.el (mh-letter-buttons-init-flag): New variable that keeps track of whether the tool-bar in mh-letter-mode has been initialized yet. (mh-letter-mode): Initialize the tool-bar for drafts the first time we get into mh-letter-mode. 2005-10-23 Bill Wohler * mh-comp.el (mh-letter-menu): Rename mh-mhn-compose-external-compressed-tar to mh-mh-compose-external-compressed-tar. Rename mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp. Rename mh-edit-mhn to mh-mh-to-mime. Rename mh-mhn-directive-present-p to mh-mh-directive-present-p. Rename mh-revert-mhn-edit to mh-mh-to-mime-undo. Rename mh-gnus-pgp-support-flag to mh-pgp-support-flag. Rename mh-compose-insertion value from 'mhn to 'mh. (mh-insert-signature): Rename mh-mhn-directive-present-p to mh-mh-directive-present-p. (mh-send-letter): Rename mh-mhn-directive-present-p to mh-mh-directive-present-p. Rename mh-edit-mhn to mh-mh-to-mime. (mh-letter-mode-map): Rename mh-edit-mhn to mh-mh-to-mime. Rename mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp. Rename mh-mhn-compose-external-compressed-tar to mh-mh-compose-external-compressed-tar. Rename mh-revert-mhn-edit to mh-mh-to-mime-undo. Rename mh-mhn-compose-external-type to mh-mh-compose-external-type. Rename mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp. Rename mh-mhn-compose-external-compressed-tar to mh-mh-compose-external-compressed-tar. Rename mh-revert-mhn-edit to mh-mh-to-mime-undo. Rename mh-mhn-compose-external-type to mh-mh-compose-external-type. (mh-send-letter, mh-letter-mode-map): Rename mh-edit-mhn to mh-mh-to-mime, mh-revert-mhn-edit to mh-mh-to-mime-undo. (mh-reply, mh-yank-cur-msg, mh-insert-prefix-string): Rename mh-yank-from-start-of-msg to mh-yank-behavior. (mh-letter-mode, mh-to-field, mh-to-fcc, mh-insert-signature) (mh-check-whom, mh-insert-auto-fields, mh-send-letter) (mh-insert-letter, mh-yank-cur-msg, mh-insert-prefix-string) (mh-fully-kill-draft, mh-open-line, mh-letter-complete) (mh-letter-complete-or-space, mh-letter-confirm-address) (mh-letter-next-header-field-or-indent) (mh-letter-previous-header-field) (mh-letter-toggle-header-field-display): Sync docstrings with manual. * mh-customize.el (mh-edit-mhn-hook): Rename to mh-mh-to-mime-hook. (mh-yank-from-start-of-msg): Rename to mh-yank-behavior. (mh-compose-insertion): Rename values from 'gnus and 'mhn to 'mh and user-visible values from mhn and Gnus to MH and MML. (mh-before-send-letter-hook): Add 'ispell-message option. (mh-mml-method-default): Rename mh-gnus-pgp-support-flag to mh-pgp-support-flag. (mh-compose-insertion, mh-compose-space-does-completion-flag) (mh-delete-yanked-msg-window-flag) (mh-extract-from-attribution-verb, mh-ins-buf-prefix) (mh-letter-complete-function, mh-letter-fill-column) (mh-mml-method-default, mh-signature-file-name) (mh-signature-separator-flag, mh-x-face-file) (mh-yank-behavior, mail-citation-hook) (mh-before-send-letter-hook, mh-mh-to-mime-hook): Sync docstrings with manual. * mh-gnus.el (mml-minibuffer-read-disposition): New function provided for Emacs 21 environments that lack it. * mh-mime.el (mh-mml-query-cryptographic-method): Use default prompt convention. (mh-compose-forward): mh-mh-forward-message requires string arg. (mh-minibuffer-read-type): New function. (mh-mhn-args): Rename to mh-mh-to-mime-args. (mh-mhn-compose-insertion): Rename to mh-mh-attach-file. (mh-mhn-compose-forw): Rename to mh-mh-forward-message. (mh-mhn-compose-type): Rename to mh-mh-compose-type. (mh-mhn-compose-anon-ftp): Rename to mh-mh-compose-anon-ftp. Rename mh-mhn-compose-external-type to mh-mh-compose-external-type. (mh-mhn-compose-external-compressed-tar): Rename to mh-mh-compose-external-compressed-tar. Rename mh-mhn-compose-external-type to mh-mh-compose-external-type. (mh-mhn-compose-external-type): Rename to mh-mh-compose-external-type. (mh-edit-mhn): Rename to mh-mh-to-mime. Rename mh-mhn-args to mh-mh-to-mime-args. Rename mh-edit-mhn-hook to mh-mh-to-mime-hook. Use correct program in message. (mh-mhn-directive-present-p): Rename to mh-mh-directive-present-p. (mh-mml-directive-present-p): Rename to mh-mml-tag-present-p. (mh-compose-forward, mh-mh-attach-file) (mh-mh-compose-anon-ftp, mh-mh-compose-external-compressed-tar) (mh-mh-compose-external-type, mh-mh-forward-message) (mh-mml-attach-file): Use mml-minibuffer-read-description, mh-minibuffer-read-type. (mh-mime-content-types): Move comment about only being used in Emacs 20 to docstring. (mh-mh-compose-external-type): Rename extra-param argument to parameters. (mh-mml-to-mime, mh-secure-message, mh-mml-unsecure-message) (mh-mime-display-part, mh-mime-display-single): Rename mh-gnus-pgp-support-flag to mh-pgp-support-flag. (mh-compose-insertion): Rename mh-mhn-compose-insertion to mh-mh-attach-file. (mh-compose-forward): Rename mh-mhn-compose-forw to mh-mh-forward-message. (mh-mhn-compose-insertion): Rename mh-mhn-compose-type to mh-mh-compose-type. (mh-compose-insertion, mh-compose-forward, mh-mh-to-mime-args) (mh-mh-attach-file, mh-mh-compose-type) (mh-mh-compose-anon-ftp, mh-mh-compose-external-compressed-tar) (mh-mh-compose-external-compressed-tar) (mh-mh-compose-external-type, mh-mh-forward-message) (mh-mh-to-mime, mh-mh-quote-unescaped-sharp) (mh-mh-to-mime-undo, mh-mh-directive-present-p, mh-mml-to-mime) (mh-mml-attach-file, mh-secure-message, mh-mml-unsecure-message) (mh-mml-secure-message-sign, mh-mml-secure-message-encrypt) (mh-mml-directive-present-p, mh-destroy-postponed-handles) (mh-display-smileys, mh-display-emphasis, mh-mime-save-parts): Sync docstrings with manual. * mh-utils.el (mh-gnus-pgp-support-flag): Rename to mh-pgp-support-flag. 2005-10-17 Peter S Galbraith * mh-identity.el (mh-identity-field-handler): Use `assoc-ignore-case' to compare against header field for mixed-case "From:". 2005-10-17 Bill Wohler * mh-customize.el (mh-folder-tool-bar-map): Rename image file left_arrow to left-arrow, right_arrow to right-arrow, mail_compose to mail/compose, fld_open to fld-open. (mh-letter-tool-bar-map): Rename image file mail_send to mail/send. 2005-10-16 Bill Wohler * mh-comp.el (mh-display-completion-list-compat): New macro which calls `display-completion-list' correctly in older environments. Versions of Emacs prior to version 22 lacked a COMMON-SUBSTRING argument. (mh-complete-word): Use it. * mh-init.el (mh-image-load-path): Use locate-library to find MH-E. This simplified the code a lot. Flattened out nested statements even more. 2005-10-16 Satyaki Das * mh-init.el (mh-image-load-path): Remove use of pushnew since it causes a compiler warning. * mh-utils.el (mh-display-msg): Do MIME cleanup before inserting the message to be viewed (closes SF #1306141). 2005-10-16 Masatake YAMATO * mh-comp.el (mh-complete-word): Pass the common prefix substring of completion to `display-completion-list'. 2005-10-15 Satyaki Das * mh-init.el (mh-image-load-path-called-flag): New variable which is used by mh-image-load-path so that it runs only once. (mh-image-load-path): Modify so that it gets run only once. Also flatten out heavily nested if statements to make it clearer. * mh-e.el (mh-folder-mode): Call mh-image-load-path to allow Emacs to find images used in the toolbar. * mh-customize.el (:folder): Remove call to mh-image-load-path. 2005-10-14 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to version. 2005-10-14 Bill Wohler Released MH-E version 7.85. * mh-e.el (Version, mh-version): Update for release 7.85. 2005-10-14 Bill Wohler * mh-e.el, mh-funcs.el, mh-init.el, mh-mime.el, mh-pick.el: * mh-seq.el, mh-utils.el: Ran mh-unit. Continued copyright lines need to be indented. * mh-e.el: mh-folder-tick-face had been renamed to mh-folder-tick but the code that invoked the face had not been updated. Tick highlighting working again. * mh-seq.el (mh-non-seq-mode-line-annotation): Move make-variable-buffer-local call to top level to avoid warnings in CVS Emacs. * mh-comp.el (mh-insert-letter): Replace deprecated read-input with read-string. 2005-10-09 Bill Wohler * mh-init.el (mh-image-load-path): New function that adds the path to the MH-E images to the image-load-path or load-path depending on the version of Emacs. * mh-customize.el: Call mh-image-load-path just before mh-tool-bar-define so that the toolbar images can be found. 2005-10-04 Bill Wohler * ChangeLog: Move contents into ChangeLog.1 and trim. * ChangeLog.1: New file. Contains old ChangeLog. Copyright (C) 2005-2013 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . ;; Local Variables: ;; coding: utf-8 ;; sentence-end-double-space: nil ;; add-log-time-zone-rule: t ;; End: mh-e-8.5/emacs/trunk/lisp/mh-e/ChangeLog.10000644000175000000620000154215212114520723017344 0ustar wohlerstaff2005-09-30 Bill Wohler * mh-customize.el (mh-refile-msg, mh-tool-bar-reply-from) (mh-tool-bar-reply-to, mh-tool-bar-reply-all) (mh-alias-grab-from-field, mh-pack-folder): Image files moved to etc/images/mail so added "mail/" prefix. (mh-reply): Ditto. Also renamed reply2.* to reply.*. (mh-rescan-folder): Ditto. Renamed image file to refresh.* since it can be used in the general sense. Does not have "mail/" prefix. 2005-09-29 Bill Wohler Merged in changes from CVS Emacs including: * mh-mime.el (mh-compose-forward, mh-mhn-compose-forw): * mh-comp.el (mh-insert-letter): * mh-utils.el (mh-prompt-for-folder): Follow convention for reading with the minibuffer. Emilio C. Lopes 2005-09-24. 2005-09-26 Bill Wohler * mh-e.el (desktop-buffer-mode-handlers): Only add to this list if the variable exists. Not present pre-version 22. Merged in changes from CVS Emacs including: * mh-print.el (mh-ps-print-msg-show): Fix misplaced parenthesis in previous change. Juanma Barranquero 2005-09-19 * mh-alias.el (mh-alias-ali): Fix `message' call: first arg should be a format spec. * mh-print.el (mh-ps-spool-buffer, mh-ps-spool-a-msg) (mh-ps-print-msg, mh-ps-print-msg-show): Ditto. * mh-mime.el (mh-toggle-mh-decode-mime-flag): Ditto. * mh-index.el (mh-index-sequenced-messages): Ditto. * mh-e.el (mh-refile-or-write-again, mh-page-msg): Ditto. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist) (mh-spamassassin-blacklist, mh-spamassassin-whitelist): Ditto. D Goel 2005-09-18. * mh-customize.el: Do not use face-alias compatibility for faces that did not appear in the previous Emacs release. Dan Nicolaescu 2005-08-15. * mh-e.el: Add handler to desktop-buffer-mode-handlers. (mh-restore-desktop-buffer): Remove autoload cookie. (mh-folder-mode): Add autoload cookie. Lars Hansen 2005-08-10. Update FSF's address in GPL notices Lute Kamstra 2005-07-04 . * mh-customize.el (mh-folder-body-face, mh-folder-cur-msg-face) (mh-folder-cur-msg-number-face): New backward-compatibility aliases for renamed faces. Lute Kamstra 2005-06-17. * mh-customize.el (mh-folder-body, mh-folder-cur-msg) (mh-folder-cur-msg-number, mh-folder-date, mh-folder-followup) (mh-folder-msg-number, mh-folder-refiled, mh-folder-subject) (mh-folder-tick, mh-folder-to, mh-index-folder) (mh-letter-header-field, mh-show-cc, mh-show-date) (mh-show-header, mh-show-pgg-good, mh-show-pgg-unknown) (mh-show-pgg-bad, mh-show-signature, mh-show-to, mh-show-from) (mh-show-xface, mh-speedbar-folder, mh-speedbar-selected-folder) (mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder-with-unseen-messages) (mh-folder-msg-number, mh-folder-subject, mh-folder-followup) (mh-folder-subject): Remove "-face" suffix from face names. (mh-folder-body, mh-folder-cur-msg, mh-folder-cur-msg-number) (mh-folder-date-face, mh-folder-followup-face) (mh-folder-msg-number-face, mh-folder-refiled-face) (mh-folder-subject-face, mh-folder-tick-face, mh-folder-to-face) (mh-index-folder-face, mh-letter-header-field-face) (mh-show-cc-face, mh-show-date-face, mh-show-header-face) (mh-show-pgg-good-face, mh-show-pgg-unknown-face) (mh-show-pgg-bad-face, mh-show-signature-face, mh-show-to-face) (mh-show-from-face, mh-show-xface-face, mh-speedbar-folder-face) (mh-speedbar-selected-folder-face) (mh-speedbar-folder-with-unseen-messages-face) (mh-speedbar-selected-folder-with-unseen-messages-face): New backward-compatibility aliases for renamed faces. (mh-folder-body-face, mh-folder-cur-msg-face) (mh-folder-cur-msg-number-face, mh-folder-date-face) (mh-folder-followup-face, mh-folder-msg-number-face) (mh-folder-deleted-face, mh-folder-refiled-face) (mh-folder-subject-face, mh-folder-address-face) (mh-folder-scan-format-face, mh-folder-to-face) (mh-index-folder-face, mh-show-cc-face, mh-show-date-face) (mh-show-header-face, mh-show-pgg-good-face) (mh-show-pgg-unknown-face, mh-show-pgg-bad-face) (mh-show-to-face, mh-show-from-face, mh-show-subject-face) (mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder-with-unseen-messages): Use renamed MH-E faces. * mh-utils.el (mh-letter-font-lock-keywords) (mh-face-display-function): Use renamed MH-E faces. * mh-speed.el (mh-folder-speedbar-buttons) (mh-speed-update-current-folder, mh-speed-normal-face) (mh-speed-bold-face, mh-speed-add-buttons) (mh-speed-invalidate-map): Likewise. * mh-mime.el (mh-signature-highlight): Likewise. Miles Bader 2005-06-17. * mh-comp.el (mh-send-sub): * mh-identity.el (mh-identity-field-handler): * mh-mime.el (mh-secure-message): Don't use `format' on `error' arguments. Juanma Barranquero 2005-06-16. * mh-mime.el (mh-secure-message): Follow error conventions. Juanma Barranquero 2005-06-14. 2005-09-24 Bill Wohler * mh-unit.el (mh-unit): Changed lm-verify test to Emacs 22. 2005-09-22 Bill Wohler * Makefile: Incorporated ideas from Clemens Fruhwirth to generalize mh-loaddefs.el to make it work for both GNU Emacs and XEmacs. (EMACS_OPTIONS, XEMACS_OPTIONS): Use double-dash for all long options. (EMACS_LOADDEFS_COOKIE): New variable for generate-autoload-cookie setting. Obsoletes XEMACS_LOADDEFS_COOKIE. (EMACS_EXPORT_MH_LOADDEFS): New variable for GNU Emacs commands to rebuild mh-loaddefs.el. (XEMACS_EXPORT_MH_LOADDEFS): New variable for XEmacs commands to rebuild mh-loaddefs.el. Obsoletes XEMACS_LOADDEFS_FILE and XEMACS_LOADDEFS_PKG_NAME. (MH-E-LOADDEFS-SRC): New variable which is set to $(MH-E-SRC) on GNU Emacs, and adds $(MH-E-XEMACS-SRC) on XEmacs. (all): Modify EMACS_EXPORT_MH_LOADDEFS and MH-E-LOADDEFS-SRC on XEMacs. (mh-loaddefs.el): Now depends on $(MH-E-LOADDEFS-SRC) and has generic compile command that works on both GNU Emacs XEmacs. (xemacs): Depend on autoloads instead of deleted loaddefs-xemacs. (loaddefs-xemacs): Deleted. 2005-07-19 Bill Wohler * README (INSTALL): Added info for Mac users. 2005-07-16 Satyaki Das * mh-comp.el (mh-font-lock-field-data): Fix a bug where the function would return t but match-data was being set to nil (closes SF #1241017). 2005-07-12 Jeffrey C Honig * mh-customize.el (mh-invisible-header-fields-internal) (mh-invisible-header-fields-internal): Add Received-SPF header and X-Gmail- prefixes seen from Gmail. 2005-06-08 Peter S Galbraith * mh-comp.el (mh-insert-auto-fields): Insert identity regardless of whether one was already set, since if one used a default identity it would never be overridden (closes SF #1204506). 2005-06-02 Bill Wohler * mh-customize.el (mh-customize): Use customization group mh-e. * mh-init.el (mh-path): Use customization group mh-e. Thanks to Peter Whaite for these patches (closes SF #1213716). 2005-06-01 Bill Wohler * mh-mime.el (mh-compose-forward): Only use mh-sent-from-msg as a default message if it's a number (as is done elsewhere). Otherwise, an error is thrown if this function is called from a draft created by mh-forward since this variable is a list. Also added a space after the "Messages [%s]:" prompt. 2005-05-30 Jeffrey C Honig * mh-mime.el (mh-compose-forward): Allow insertion of multiple forwarded messages by range (including sequences). For the sent folder the default message presented is the sent message. For other folders, the default message is "cur", if it exists. 2005-05-28 Bill Wohler * mh-e.el (Version, mh-version): Added +cvs to version. 2005-05-28 Bill Wohler 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 * 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 2005-05-26. 2005-05-25 Bill Wohler Merged in changes from CVS Emacs including: * mh-customize.el (mh-speedbar-selected-folder-face): Special case high number of colors displays. Dan Nicolaescu 2005-04-08. * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'. Replace `illegal' with `invalid'. Werner Lemberg 2005-03-25. * mh-inc.el (mh-inc-spool-list): Correctly declare the external var. Stefan 2004-09-07. 2005-05-18 Bill Wohler * mh-comp.el (mh-reply): Mention use of mh-repl-group-formfile in docstring. 2005-05-05 Bill Wohler * mh-e.el (Version, mh-version): Added +cvs to release number. 2005-05-05 Bill Wohler 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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. 2005-02-07 Bill Wohler * mh-customize.el (mh-inc-prog, mh-inc-spool-list): Synced docstrings with manual. 2005-02-06 Bill Wohler * 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 * 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 to add define-behavior on XEmacs. 2005-01-28 Jeffrey C Honig * mh-customize.el (mh-invisible-header-fields-internal): Added X-Evolution header added by Evolution mai client. 2005-01-18 Bill Wohler * 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 * 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 * 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 * 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 * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a function at compile time doesn't guarantee its existence at run time. So make the macro handle that situation better. 2004-11-05 Satyaki Das * mh-acros.el (advice): Load advice, since it isn't loaded in XEmacs causing compilation problems. 2004-10-24 Satyaki Das * 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 * 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 * 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 * 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 * mh-e.el (Version, mh-version): Added +cvs to release number. 2004-08-24 Bill Wohler Released MH-E version 7.82. * MH-E-NEWS, README: Updated for release 7.82. * mh-e.el (Version, mh-version): Updated for release 7.82. 2004-08-24 Bill Wohler * mh-init.el (mh-variant-set): Change MH to mh as that's what is emitted by `mh-variant-mh-info' (closes SF #1014781). (mh-variant-p): Add mu-mh to docstring. 2004-08-23 Satyaki Das * mh-acros.el (mh-require-cl): Remove unneeded autoloads. (require): Add an advice to the function so that at compile time the uncompiled file is loaded. This avoids compilation problems when built in the Emacs tree. * mh-mime.el (mh-identity-pgg-default-user-id): Defvar the variable, to avoid compiler warnings. * mh-e.el (mh-seq): Load mh-seq since functions defined there are used here. Without this, the state mh-seq.elc would be loaded. * mh-customize.el (mh-init, mh-identity): Load mh-init and mh-identity at compile time manually, before the corresponding stale elc files get autoloaded. 2004-08-21 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to release number. 2004-08-21 Bill Wohler Released MH-E version 7.81. * MH-E-NEWS, README: Updated for release 7.81. * mh-e.el (Version, mh-version): Updated for release 7.81. 2004-08-21 Bill Wohler * release-utils (variable_changes): Check for checked-out directory before proceeding. Remove temporary files. Rename --variable-update flag to --variable-changes. 2004-08-16 Mark D. Baushke * mh-mime.el (mh-toggle-mh-decode-mime-flag: New function. * mh-e.el (mh-help-messages): Add [;] help string for it. (mh-folder-mode-map): Add ";" key binding for it. 2004-08-15 Satyaki Das * mh-acros.el (mh-defstruct): Distinguishing structures created by mh-defstruct just based on the number of fields is not sufficient, since both the mh-thread-message and mh-thread-container structures have the same length. 2004-08-15 Mark D. Baushke * mh-customize.el (mh-identity-handlers): Use ":default" instead of "default" to avoid problems with "Default:" as a user defined field. * mh-identity.el (mh-identity-field-handler): Ditto. 2004-08-15 Bill Wohler * mh-e.el (Version, mh-version): Added +cvs to release number. 2004-08-15 Bill Wohler Released MH-E version 7.4.80. * MH-E-NEWS, README: Updated for release 7.4.80. * mh-e.el (Version, mh-version): Updated for release 7.4.80. 2004-08-15 Bill Wohler * mh-funcs.el, mh-gnus.el, mh-inc.el, mh-init.el, mh-junk.el, mh-pick.el, mh-print.el, mh-xemacs.el: Added 2004 to Copyright. * mh-acros.el, mh-alias.el: Checkdoc fixes. 2004-08-12 Satyaki Das * mh-acros.el (cl): Load cl in this file. That is all right, since this file is only used at compile time, and so cl doesn't get loaded at run time. This avoids problems with stale *.elc files present in the Emacs source tree during compilation. (mh-defstruct): Modify it to make it more CL like and in the process simplify it a bit. This makes the argument list of the constructor compatible with the previous version, thereby avoiding a compilation error when an old version of mh-seq.elc is present. * mh-seq.el (mh-thread-id-container, mh-thread-get-message) (mh-thread-get-message-container): Revert back to the CL style of using keyword arguments, since the mh-defstruct now produces code compatible to such usage. 2004-08-11 Satyaki Das * mh-acros.el (mh-defstruct, mh-require-cl): Checkdoc fixes. * mh-utils.el (message-tokenize-header, message-fetch-field): Add autoloads. (mh-folder-completing-read): Make the folder completion look better with CVS Emacs. * mh-init.el (mh-variant-set): Remove dead code. 2004-08-11 Bill Wohler * *.el: Use the following at the top of each file which seems to do a good job of suppressing compilation warnings in 21.3 and CVS Emacs (21.4). This replaces (require 'cl) or (require 'utils) (mh-require-cl) calls: (eval-when-compile (require 'mh-acros)) (mh-require-cl) 2004-08-10 Bill Wohler * release-utils (DESCRIPTION): Added one. (FILES, SEE ALSO, VERSION): Deleted empty and incorrect sections. * mh-e.el (mh-colors-available-p): Call x-display-color-cells with mh-funcall-if-exists since it no longer seems to be defined in GNU Emacs 21.4. 2004-08-10 Satyaki Das * mh-speed.el (mh-process-kill-without-query, mh-speed-flists): Avoid a compiler warning in versions of Emacs where process-kill-without-query is a deprecated function. * mh-seq.el (mh-thread-message, mh-thread-container): Use mh-defstruct instead of defstruct. (mh-thread-id-container, mh-thread-get-message-container) (mh-thread-get-message): Use the slightly different structure constructor function. * mh-acros.el (mh-defstruct): New macro which is a partial replacement of the defstruct in CL. (no-byte-compile): Don't compile the file since it isn't loaded at run time, so efficiency isn't an issue. * mh-utils.el (mh-buffer-data): Use mh-defstruct instead of defstruct. 2004-08-09 Satyaki Das * mh-funcs.el, mh-junk.el, mh-print.el: Use mh-require-cl to avoid compilation warnings in Emacs-21.3. * mh-acros.el (mh-require-cl): Add autoloads of CL functions used. 2004-08-09 Bill Wohler * mh-customize.el (mh-show-use-xface-flag): Mention that `fetch' and `curl' are supported as well. 2004-08-08 Bill Wohler * mh-xemacs.el (mh-xemacs-has-toolbar-flag): Checkdoc fixes. * mh-mime.el (mh-display-with-external-viewer): Checkdoc fixes. * mh-identity.el (mh-identity-attribution-verb-end): Stripped trailing space; checkdoc fixes. * mh-e.el (mh-restore-desktop-buffer): Checkdoc fixes. * mh-customize.el (mh-inc-spool-list) (mh-compose-forward-as-mime-flag, defcustom): Stripped trailing space; checkdoc fixes. * mh-comp.el (mh-reply): Stripped trailing space. * mh-unit.el (mh-unit-files): Added mh-acros.el and mh-gnus.el. (mh-unit): Don't lm-verify pre-21.4. Save buffers before killing since we might have done some editing. * import-emacs: Deleted. Functionality subsumed by release-utils. * release-utils: New script. Performs import-emacs functionality and displays new and deleted options. * Makefile (import-emacs): Call release-utils instead of import-emacs. * mh-funcs.el (mh-undo-folder): Removed deprecated `ignore' argument. * mh-e.el (mh-scan-date-regexp): Deleted as Peter claims it is obsolete. (mh-folder-font-lock-keywords): Removed reference to deleted variable `mh-scan-date-regexp'. * mh-customize.el (mh-auto-fields-prompt-flag): Made reference to `mh-auto-fields-lists'. (mh-forward-hook): Fixed docstring typo. 2004-08-07 Bill Wohler * mh-acros.el: New file. Currently holds macros needed by mh-customize.el but is planned to hold all macros to avoid dependency problems when compiling. * mh-utils.el (mh-xemacs-flag): Defined in mh-customize.el now. (mh-require-cl, mh-do-in-gnu-emacs, mh-do-in-xemacs) (mh-funcall-if-exists, mh-make-local-hook, mh-mark-active-p): Moved to new file mh-acros.el. * mh-customize.el: Require mh-acros and cl only when compiling and mh-loaddefs at runtime instead of mh-utils. (mh-xemacs-flag): Define it here instead of mh-utils.el. * Makefile (MH-E-SRC): Added mh-acros.el. * mh-gnus.el (default-enable-multibyte-characters): Don't define any more. It doesn't seem to be needed. * mh-customize.el (mh-junk-background): New variable. If on, spam programs are run in background. Running in foreground can be slow. Defaults to nil to spare machines with little memory. * mh-junk.el (mh-spamassassin-blacklist, mh-bogofilter-blacklist) (mh-bogofilter-whitelist, mh-spamprobe-blacklist) (mh-spamprobe-whitelist): Use new option mh-junk-background. 2004-07-25 Satyaki Das * mh-utils.el (mh-folder-completing-read): In recent CVS Emacs, the first letter of the possible choices in the completion buffer is highlighted. The change is needed for this feature to work during folder name completion. This is not entirely sufficient, since the leading "+" in folder names is still mishandled. A patch is required in Emacs itself to address that. 2004-07-22 Mark D. Baushke * mh-e.el (recursive-load-depth-limit): Move recursive-load-depth-limit code to ... * mh-utils.el (recursive-load-depth-limit): ... here to avoid problems compiling mh-utils.el and mh-alias.el with gnus-5.10.6 under emacs-21.1. Use eval-and-compile instead of eval-when. 2004-07-20 Bill Wohler * mh-customize.el (mh-invisible-header-fields-internal): Added header fields emitted by T-Mobile picture phones (X-Mms-*, and commented out X-Operator field saying it's like X-Mailer). 2004-07-12 Bill Wohler * mh-gnus.el: Set local variables indent-tabs-mode and sentence-end-double-space to nil. * mh-customize.el: Checkpoint from option docstring updates and manual synchronization from last summer. For the options listed below, docstring was usually completely rewritten. Use "on" instead of "t" in docstring to match what is seen in customization buffer. Use headline capitalization. Standardize on "Auto-detect" text when option has that capibility. (mh): Since we work on more than one type of Emacs, use Emacs instead of GNU Emacs. Prefer GNU mailutils over GNU Mailutils. (mh-variant): s/Autodetect at startup/Auto-detect/. (mh-alias-insertion-location): s/Sorted alphabetically/Alphabetical/. s/At the top of file/Top/. s/At the bottom of file/Bottom/. (mh-alias-local-users-prefix): s/Use login instead of real name/Use Login/. (mh-identity-list): Sorted values by fields, attribution, signature, GPG key. (mh-auto-fields-list): Missing quote. (mh-compose-insertion): s/Use Gnus/Gnus/. s/Use mhn/mhn/. (mh-compose-space-does-completion-flag): s/SPACE//. (mh-extract-from-attribution-verb): Since we have French, added German too ;-). (mh-letter-complete-function): Mention default in docstring. (mh-invisible-header-fields-internal): Added X-ELNK-Trace from Earthlink. (mh-alias-flash-on-comma, mh-alias-insert-file) (mh-alias-passwd-gecos-comma-separator-flag) (mh-recenter-summary-flag, mh-default-folder-for-message-function) (mh-default-folder-must-exist-flag, mh-index-program) (mh-index-ticked-messages-folders, mh-ins-buf-prefix) (mh-delete-yanked-msg-window-flag, mh-identity-default): See summary above. * mh-init.el (mh-variant-set, mh-sys-path, mh-variant-mu-mh-info): Prefer GNU mailutils over GNU Mailutils MH. * mh-comp.el (sc-cite-original, mh-smail, mh-smail-batch) (mh-edit-again, mh-extract-rejected-mail, mh-forward) (mh-smail-other-window, mh-reply, mh-send, mh-send-other-window): Use `mh-send' instead of \\[mh-send]] since links in the docstring 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. * mh-e.el (Version, mh-version): Set to 7.4.4+cvs. 2004-07-10 Bill Wohler Released MH-E version 7.4.4. * MH-E-NEWS, README: Updated for release 7.4.4. * mh-e.el (Version, mh-version): Updated for release 7.4.4. This patch release contains the following patches: * mh-xemacs.el: New file from concatenation of mh-xemacs-compat.el and mh-xemacs-icons.el which were removed since their names exceeded DOS 8+3 limits. * Makefile: (mh-e-autoloads.el): Add target to make `mh-e-autoloads.el', a file containg usual entry commands into MH-E to be used for users installing MH-E separately from Emacs. (XEMACS_LOADDEFS_FILE): New. Used to generate mh-loaddefs.el in XEmacs. (XEMACS_LOADDEFS_COOKIE): Ditto. (XEMACS_LOADDEFS_PKG_NAME): Ditto. (XEMACS_OPTIONS): Add '-no-autoloads' to give a cleaner build environment. (MH-E-SRC): Moved mh-xemacs.el to new variable MH-E-XEMACS-SRC. (MH-E-XEMACS-SRC): New variable to hold XEmacs source files. (MH-E-XEMACS-OBJ): New variable to hold XEmacs object files. (clean): Moved XEmacs-specific code to clean-xemacs. (xemacs): Added clean-xemacs prerequisite. Moved down to XEmacs section of file. Add target to build mh-loaddefs.el in XEmacs. (loaddefs-xemacs): New rule to build mh-loaddefs.el in XEmacs. (clean-xemacs): New target to remove XEmacs-specific files. (compile-xemacs): New. It allows for the '-no-autoloads' option and byte-compiles all the source files with a single instance of XEmacs. (dist): Added $(MH-E-XEMACS-SRC) to tarball. (AUTO_PRELOADS): Removed, in favor of 'AUTOLOAD_PACKAGE_NAME' and 'AUTOLOAD_FILE'. (AUTOLOAD_PACKAGE_NAME): New. (AUTOLOAD_FILE): New. (all): Don't set $EMACS_HOME if building with XEmacs. (xemacs): Use 'compile-xemacs' instead of 'compile'. (auto-autoloads.elc): Use new $AUTOLOAD_* vars and allow for '-no-autoloads'. (custom-load.elc): Allow for '-no-autoloads'. * mh-e.el: Don't require mh-xemacs-compat which no longer exists. The XEmacs stuff gets required by mh-customize.el which is required by mh-utils.el which is required by mh-e.el. This all happens before mh-xemacs-compat was required, so all should be well. (mh-restore-desktop-buffer): Move from desktop.el. Add Parameters. (mh-restore-desktop-buffer): Delete with-no-warnings. (mh-folder-mode): Bind desktop-save-buffer to t. (Courtesy Lars Hansen). * mh-alias.el (mh-assoc-ignore-case): New macro to use assoc-string when available (Emacs 21.4+); assoc-ignore-case otherwise. (mh-alias-reload, mh-alias-expand, mh-alias-minibuffer-confirm-address): Use it. * mh-seq.el: Added mh-autoload to mh-read-seq-default. * mh-utils.el (mh-require-cl): 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 routines in their macro expansions. Use mh-require-cl to provide the cl routines in the best way possible (closes SF #930012). (require 'mouse): To shush compiler. Use new function mh-require-cl throughout. 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. * import-emacs: Also grab the ChangeLog. * *.pbm: Regenerated using GIMP to be consistent with other Emacs icons. 1. Edit .xpm image in GIMP. 2. Image > Mode > Indexed. Check Use Black/White Palette and No Color Dithering. 3. File > Save As file.xbm. 4. Run xbmtopbm < file.xbm > file.pbm. Thanks to jan.h.d@swipnet.se for the help. 2004-07-07 Stephen Gildea * mh-customize.el (mh-invisible-header-fields-internal): Add X-Greylist, X-Source*, and X-WebTV-Signature. Replace specific X-Spam-* headers with general pattern. 2004-06-15 Bill Wohler * README: Vladimir Ivanovic reports that mh-rmail works with XEmacs 21.5.17, so updated requirements text accordingly (closes SF #644321). 2004-05-12 Satyaki Das * mh-utils.el (mh-mail-header-end): Replace call to rfc822-goto-eoh with something that allows From_ lines in the mail header. 2004-04-14 Bill Wohler * mh-utils.el (mh-show-mouse): s/EVENT/event/. Thanks to John Paul Wallington for pointing this out. 2004-04-12 Satyaki Das * mh-e.el (mh-folder-size-flist): Add -showzero option so that the parsing code doesn't get confused by the presence of -noshowzero in the user's .mh_profile (closes SF #933954). 2004-04-07 Satyaki Das * mh-mime.el (mh-insert-mime-button) (mh-insert-mime-security-button): Add evaporate property to overlays used in MIME part buttons. This avoids problems with CVS Emacs. 2004-03-16 Satyaki Das * mh-e.el (mh-folder-from-address): Go to the end of buffer if the re-search-forward fails (closes SF #917096). 2004-02-02 Satyaki Das * mh-customize.el (mh-compose-forward-as-mime-flag): New user customizable variable that controls whether messages are forwarded as MIME attachments (closes SF #827203). * mh-comp.el (mh-forward): Call forw with -mime option only if mh-compose-forward-as-mime-flag is non-nil. 2003-12-26 Jeffrey C Honig * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist) (mh-spamassassin-blacklist, mh-spamassassin-blacklist) (mh-spamassassin-blacklist, mh-spamassassin-whitelist) (mh-spamassassin-whitelist, mh-bogofilter-blacklist) (mh-spamprobe-blacklist): Add progress messages. Change "Couldn't" to "Unable" in error messages. Run bogofilter and spamprobe in the foreground to prevent a large number of processes from swamping the system. 2003-12-25 Satyaki Das * mh-e.el (mh-prompt-for-refile-folder): Marking the whole folder and then refiling all messages throws an error, since this function expects point to be on a valid scan line. The change relaxes this requirement, thereby avoiding the above problem. 2003-12-14 Satyaki Das * mh-comp.el (mh-ascii-buffer-p): New function that checks if a buffer is entirely composed of ASCII. (mh-send-letter): Encode the draft if it contains non-ASCII characters. 2003-12-12 Satyaki Das * mh-customize.el (mh-invisible-headers): Keep only unique fields in list of header fields to hide. This avoids problems in XEmacs. 2003-12-10 Satyaki Das * mh-seq.el (mh-thread-print-scan-lines): The imenu index was not getting created for threaded index buffers. The change fixes this. * mh-index.el (mh-index-insert-folder-headers): Always create the imenu index. (mh-index-create-imenu-index): Set which-func-mode to t. If which-function-mode is turned on after the folder buffer has been prepared, display of the folder info was being inhibited. The change fixes that. 2003-12-09 Satyaki Das * mh-comp.el (mh-letter-mode): Setup mh-mail-header-separator based on draft contents. (mh-letter-mode, mh-letter-mail-header-end-marker) (mh-letter-header-end): Remove use of the variable mh-letter-mail-header-end-marker. Instead use mh-mail-header-separator. This avoids problems in font locking draft buffers (closes SF #855479). 2003-12-09 Satyaki Das * mh-index.el (mh-index-insert-folder-headers): Modified so that imenu--index-alist is updated. (mh-index-create-imenu-index): New function that generates an index usable by imenu. This adds which-func-mode support to index folders (closes SF #855520). * mh-e.el (which-func, which-func-modes): Tell which-func that mh-folder-mode supports it. (mh-folder-mode): Add support for imenu. 2003-11-22 Peter S Galbraith * Makefile: renamed mh-startup.el to mh-e-autoloads.el * README: renamed mh-startup.el to mh-e-autoloads.el * .cvsignore: Added mh-e-autoloads.el 2003-11-18 Bill Wohler Released MH-E version 7.4.3. * MH-E-NEWS, README: Updated for release 7.4.3. * mh-e.el (Version, mh-version): Updated for release 7.4.3. This patch release contains the following two patches: * mh-identity.el (mh-identity-make-menu): Removed condition on mh-auto-fields-list. Use it to enable or disable menu item instead. * mh-customize.el (mh-identity-list): Removed defvar and moved defcustom before mh-auto-fields-list so that defvar wouldn't clobber user's customization settings. 2003-11-17 Jeffrey C Honig * mh-print.el (mh-print-msg): Do not print a message on deprecated usage, the bindings have been removed. * mh-e.el (mh-folder-mode-map): Remove "l" binding for mh-print-msg. * mh-utils.el (mh-show-mode-map): Remove "l" binding for mh-print-msg. 2003-11-16 Satyaki Das * mh-comp.el (mh-beginning-of-word): Use the function mh-mail-abbrev-make-syntax-table instead of the function mail-abbrev-make-syntax-table. * mh-gnus.el (mh-mail-abbrev-make-syntax-table): Add a wrapper function that calls mail-abbrev-make-syntax-table if available. This is needed so that MH-E built with CVS Emacs will work with released versions of Emacs21 and vice versa. 2003-11-14 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields-internal): Add "X-NAI-Spam-" and "X-Spam-Report:". 2003-11-14 Mark D. Baushke * mh-customize.el (mh-invisible-header-fields-internal): Add X-AntiAbuse and X-MailScanner. (Patch from Stephen Gildea.) 2003-11-13 Peter S Galbraith * mh-identity.el (mh-identity-handler-attribution-verb): New function. A new Identity handler for the attribution verb (e.g. "wrote:") to allow for different identities to use different languages. (mh-identity-insert-attribution-verb): New function. Insert the attribution verb, placing special markers so it can be deleted and replaced later. (mh-identity-attribution-verb-start): New variable. Holds the marker for the start of the attribution verb. (mh-identity-attribution-verb-end): New variable. Holds the marker for the end of the attribution verb. * mh-customize.el (mh-identity-handlers): Add new ":attribution-verb" tag for the attribution-verb handler. (mh-identity-list): Idem. * mh-comp.el (mh-yank-cur-msg): Insert attribution verb using mh-identity-insert-attribution-verb. (mh-extract-from-attribution): Extract only the name from the From line, without appending `mh-extract-from-attribution-verb' since markers need to be inserted around that now. 2003-11-12 Bill Wohler * mh-e.el (mh-rmail, mh-nmail): Well, actually, we run in both GNU Emacs and XEmacs, so removed the "GNU" in the docstrings unless one is strictly talking about GNU Emacs. * mh-comp.el (mh-smail, mh-smail-batch, mh-smail-other-window): Ditto. 2003-11-11 Bill Wohler * mh-customize.el (mh-customize): Minor docstring change. (mh, mh-e): The short description for MH-E is: The GNU Emacs Interface to the MH Mail System. Therefore, updated docstrings accordingly. * mh-comp.el (mh-smail, mh-smail-batch, mh-smail-other-window): Ditto. * mh-e.el (mh-rmail, mh-nmail): Ditto. 2003-11-10 Satyaki Das * mh-mime.el (mh-mml-to-mime): In case errors happen in mml-to-mime, restore contents of the draft buffer (closes SF #839303). 2003-11-07 Bill Wohler * mh-customize.el (mh-letter-mode-hook): Moved to mh-sending-mail group (where it is now documented in the manual). (mh-pick-mode-hook): Moved to mh-index group (where it is now documented in the manual). * mh-loaddefs.el: Deleted per our discussion on mh-e-devel. No more conflicts! No more check-ins! Anyone pulling CVS MH-E is expected to compile. This file shall be added to the tarball so that users of the distribution are not. 2003-11-07 Mark D. Baushke * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-forward-hook): Define new hook. * mh-comp.el (mh-forward): Use it. 2003-11-07 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-toggle-mime-buttons) (mh-show-display-with-external-viewer): New interactive functions callable from the show buffer. (mh-show-mime-map): Add bindings for "K t" and "K e". (mh-show-msg): Propagate change to mh-display-buttons-for-inline-parts-flag to the show buffer. * mh-mime.el (mh-display-with-external-viewer): New interactive function to display MIME parts with external viewer (closes SF #839318). * mh-e.el (mh-folder-mode): Make the variable mh-display-buttons-for-inline-parts-flag buffer-local so that display of MIME buttons can be toggled. (mh-toggle-mime-buttons): New interactive function to toggle display of MIME buttons. (mh-mime-map): Modified to add bindings for "K t" and "K e". 2003-11-04 Steve Youngs * 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. (clean-xemacs): Remove `mh-loaddefs.el*'. (loaddefs-xemacs): New rule to build mh-loaddefs.el in XEmacs. 2003-11-02 Peter S Galbraith * mh-init.el (mh-variant-set-variant): Reset `mh-x-mailer-string' when we select an MH variant. 2003-11-02 Jeffrey C Honig * mh-loaddefs.el: Regenerated. * mh-funcs.el (mh-print-msg): Move to mh-print.el. * mh-e.el (mh-folder-mode-map): Add mh-print-msg ("l") back, it will print a message that this usage is deprecated. * mh-print.el (require, mh-ps-print-msg, mh-ps-print-msg-file): Require mh-funcs for mh-note-printed. PS print functions were not setting the printed notation. Move mh-print-msg here for consistency. Print message if mh-print-msg invoked via deprecated key binding. 2003-11-01 Peter S Galbraith * Makefile: Add target to make `mh-startup.el', a file containg usual entry commands into MH-E to be used for users installing MH-E separately from Emacs. * README: Document the above for users. 2003-10-29 Jeffrey C Honig * mh-utils.el (mh-show-ps-print-map): Add "?" and "l" to mh-show-ps-print-map. * mh-e.el (mh-ps-print-map, mh-help-messages): Add "?" and "l" to mh-ps-print-map. Add "l" to help message. 2003-10-27 Bill Wohler * Makefile (MH-E-SRC): Moved mh-xemacs.el to new variable MH-E-XEMACS-SRC. (MH-E-XEMACS-SRC): New variable to hold XEmacs source files. (MH-E-XEMACS-OBJ): New variable to hold XEmacs object files. (clean): Moved XEmacs-specific code to clean-xemacs. (xemacs): Added clean-xemacs prerequisite. Moved down to XEmacs section of file. (clean-xemacs): New target to remove XEmacs-specific files. (compile-xemacs): Added $(MH-E-XEMACS-SRC) prerequisite. (dist): Added $(MH-E-XEMACS-SRC) to tarball. 2003-10-27 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-index.el (mh-indexer-choices): Remove option for the non-free glimpse indexer (closes SF #831276). (mh-glimpse-binary, mh-glimpse-directory) (mh-glimpse-execute-search, mh-glimpse-next-result): Functions and variables to implement glimpse support are removed. * mh-customize.el (mh-index-program): Remove option for glimpse. 2003-10-24 Satyaki Das * mh-customize.el: Remove top-level test for toolbar enabled XEmacs since it is not needed. (mh-tool-bar-define): Add test for XEmacs toolbar in the functions mh-toolbar-init, mh-tool-bar-letter-buttons-set and mh-tool-bar-folder-buttons-set. This enables proper compilation irrespective of whether the XEmacs was built with toolbar support or not. * mh-comp.el (mh-letter-mode): Remove conditional since it is not needed. * mh-e.el (mh-folder-mode): Same as above. * mh-utils.el (mh-show-mode): Same as above. * mh-xemacs.el (mh-xemacs-icon-map): Remove condition on toolbar presence since we want the build to work if XEmacs without toolbars is used during compilation. 2003-10-23 Bill Wohler * mh-customize.el: The Great Reorganization. Sorted groups alphabetically. Aligned variables in customization groups with manual sections. Group docstrings changed to match manual chapter titles. 2003-10-22 Satyaki Das * mh-speed.el (timer): Avoid compiler warning in XEmacs. 2003-10-22 Steve Youngs * Makefile (XEMACS_OPTIONS): Add '-no-autoloads' to give a cleaner build environment. (AUTO_PRELOADS): Removed, in favor of 'AUTOLOAD_PACKAGE_NAME' and 'AUTOLOAD_FILE'. (AUTOLOAD_PACKAGE_NAME): New. (AUTOLOAD_FILE): New. (all): Don't set $EMACS_HOME if building with XEmacs. (xemacs): Use 'compile-xemacs' instead of 'compile'. (auto-autoloads.elc): Use new $AUTOLOAD_* vars and allow for '-no-autoloads'. (custom-load.elc): Allow for '-no-autoloads'. (compile-xemacs): New. It allows for the '-no-autoloads' option and byte-compiles all the source files with a single instance of XEmacs. * mh-e.el (mh-folder-mode): Only load the toolbar in XEmacs if toolbar support is available. * mh-comp.el (mh-letter-mode): Only load the toolbar in XEmacs if toolbar support is available. * mh-customize.el: Require 'mh-xemacs' at toplevel when 'mh-xemacs-flag' is non-nil. Wrap all the toolbar code in a test that is true if using GNU/Emacs or a toolbar-enabled XEmacs. * mh-print.el (mh-ps-spool-a-msg): Comment out `clean-message-header-flag' because it isn't used anywhere. * mh-utils.el (mh-show-mode): Only load the toolbar in XEmacs if toolbar support is available. * mh-xemacs.el: Autoload `regexp-opt', `customize-group', `view-mode', `with-electric-help', `pp', `sort-numeric-fields', `reverse-region', and `goto-address' at compile time. (mh-xemacs-has-toolbar-flag): New. This is non-nil when XEmacs has toolbar support. (mh-xemacs-toolbar-*-icon): Use it. 2003-10-21 Mark D. Baushke * mh-identity.el (mh-identity-field-handler): Fields that begin with ":" must have an mh-identity-handler defined or the user gets an error. 2003-10-17 Peter S Galbraith * mh-customize.el (mh-identity-list): This change affects users! The keyword "signature" becomes ":signature". The recently added keyword "pgg-default-user-id" becomes ":pgg-default-user-id". (mh-auto-fields-list): The keyword "Identity" becomes ":identity". (mh-identity-handlers): Idem for signature and pgg-default-user-id. * mh-comp.el (mh-insert-auto-fields): Idem for Identity. 2003-10-17 Peter S Galbraith * mh-xemacs.el: Add eval-and-compile call to (load "toolbar" t t) to make sure `toolbar-make-button-list' is defined. We can't use require because Emacs doesn't have this library. 2003-10-16 Bill Wohler * mh-customize.el (mh-signature-file-name) (mh-letter-insert-signature-hook): Merge docstring with manual. * mh-comp.el (mh-file-is-vcard-p): Checkdoc fix. (mh-insert-signature): Merge docstring with manual. * mh-customize.el (mh-junk): Changed manual link in defgroup from Customizing mh-e to Junk. (mh-junk-function-alist): Moved SpamAssassin to first in list on the hunch that it is the most popular and should be chosen if other anti-spam programs exist. (mh-junk-mail-folder): Since the variable can accept values other than folder names, renamed to mh-junk-disposition to more accurately reflect the content. Merge docstring with manual. (mh-junk-program): Moved SpamAssassin to the top of the menu for the same reason presented in mh-junk-function-alist. Also, fixed case of spam programs to match official usage. Merge docstring with manual. * mh-junk.el (mh-junk-blacklist): s/mh-junk-mail-folder/mh-junk-disposition/. Merge docstring with manual. (mh-junk-whitelist): Merge docstring with manual. (mh-bogofilter-blacklist): No longer suggest using automatic classification so use -s instead of -Ns. (mh-bogofilter-whitelist): No longer suggest using automatic classification so use -n instead of -Sn. (mh-spamassassin-blacklist, mh-spamassassin-whitelist): Merge docstring with manual. Moved spamassassin functions to top of file so functions appear in same order that they are presented in menu. 2003-10-09 Peter S Galbraith * mh-customize.el (mail-citation-hook): Moved from mh-comp.el and made into a defcustom. 2003-10-09 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-get-header-field): Add autoload cookie. * mh-utils.el (mh-show-ps-print-toggle-mime) (mh-show-ps-print-toggle-color, mh-show-ps-print-toggle-faces) (mh-show-ps-print-msg-file, mh-show-ps-print-msg) (mh-show-ps-print-msg-show): New interactive functions callable from the show buffer. (mh-show-ps-print-map): New key map for printing. * mh-e.el (mh-folder-mode-map): Remove key binding for mh-print-msg. (mh-ps-print-map): Add new key map for printing. * Makefile (MH-E-SRC): Add mh-print.el. 2003-10-07 Satyaki Das * mh-utils.el (mh-x-image-url-fetch-image): In XEmacs, make-temp-file is not present. So to avoid security problems, use a temporary file in the user's home directory. This avoids issues in creating files in a world-writable directory. * mh-mime.el (mh-signature-highlight): In Emacs, arrange for the overlay to be freed when it is no longer needed. Also, implement signature highlighting in XEmacs. 2003-10-05 Satyaki Das * mh-mime.el (mh-mime-display, mh-mm-inline-message): Respect the value of `mm-verify-option' and `mm-decrypt-option'. (mh-mime-display-security): Rearrange code a bit to avoid too many new lines being inserted when message verification/decryption is carried out while the message is being read. Also use the point-m{in|ax}-marker functions to make the function easier to read. (mh-mime-security-press-button): Extend the function so that the user can verify/decrypt messages while reading them. * mh-gnus.el (mm-possibly-verify-or-decrypt): Added to avoid compiler warning with old Gnus. * mh-utils.el (mh-x-image-url-sane-p): New function which checks if the URL in X-Image-URL is something we can handle. (mh-x-image-url-display): Don't display image if the URL looks malformed. 2003-10-04 Mark D Baushke * mh-comp.el (mh-letter-menu): Simplify menu heading. 2003-10-03 Mark D Baushke * mh-mime.el (mh-mml-query-cryptographic-method): Avoid revisionist history and still provide a good default. * mh-comp.el (mh-letter-menu): Remove the Disable Security parenthetical comment. * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-mml-method-default): What method should be used in secure directives. * mh-mime.el (mh-secure-message): New function used to generate the mml security tags. (mh-mml-unsecure-message): New wrapper function around mml-unsecure-messages. (mh-mml-secure-message-sign-pgpmime): Remove function. (mh-mml-secure-message-encrypt-pgpmime): Ditto. (mh-mml-cryptographic-method-history): New variable. (mh-mml-query-cryptographic-method): New function. (mh-mml-secure-message-encrypt): Ditto. (mh-mml-secure-message-signencrypt): Ditto. (mh-mml-secure-message-sign): Ditto. * mh-comp.el (mh-letter-menu, mh-letter-mode-help-messages) (mh-letter-mode-map): Update to use new functions. 2003-09-26 Satyaki Das * mh-seq.el (mh-interactive-range): The function has been extended so that it now takes a default result to return if no interactive prefix arg is given and no region is active. * mh-e.el (mh-add-sequence-notation): If transient-mark-mode is on, then the active region is deactivated based on whether a user sequence or a internal sequence is being notated. The change removes this inconsistency. (mh-catchup, mh-folder-map): A new interactive function to mark messages as read has been added and bound to "F c" in the folder mode. * mh-utils.el (mh-show-catchup, mh-show-folder-map): New interactive function callable from show mode buffers has been bound to "F c". 2003-09-24 Bill Wohler * mh-customize.el (mh-clean-message-header-flag) (mh-invisible-header-fields-default, mh-invisible-header-fields): Merge docstring with manual. 2003-09-24 Mark D. Baushke * mh-junk.el (mh-junk-blacklist): Junked messages should be put into the mh-seen-list to avoid propagating the unseen sequence into the spam folder. * mh-loaddefs.el: Regenerated. * mh-mime.el (mh-mml-secure-message-sign-pgpmime): Add an optional dontsign argument to remove an existing secure message directive. Update the docstring -- this function does not allow for encrypt/sign, just sign directives. * mh-mime.el (mh-mml-secure-message-sign-pgpmime): Use mml-insert-tag directly to provide a sender if mh-identity-pgg-default-user-id is set. (mh-mml-secure-message-encrypt-pgpmime): Use mml-insert-tag directly to provide a sender if this message is to be both signed and encrypted and mh-identity-pgg-default-user-id is set. 2003-09-23 Bill Wohler * mh-alias.el (Commentary): Removed as it is now in the manual. (mh-alias-system-aliases): Moved here from mh-customize.el. By definition, "system" definitions are not user-visible, and user filenames are in the Aliasfile: profile component, so this variable really shouldn't be a defcustom. (mh-alias-tstamp, mh-alias-filenames, mh-alias-reload) (mh-alias-add-alias, mh-alias-grab-from-field) (mh-alias-add-address-under-point, mh-alias-apropos): Merge docstring with manual. (mh-alias-reload-maybe): Minor comment update. (mh-alias-insert-file): Merge docstring with manual. Removed "[press TAB]" from prompt since users should know about completion and space can be used as well. (mh-alias-for-from-p): No longer returns a surprising result (t if there was **not** an alias for the From field) if the From header field is missing. This function now returns what you would expect a function of this name to return. Renamed from mh-alias-from-has-no-alias-p since negatives in the function name make logic harder to follow. (mh-alias-add-alias-to-file): Merge docstring with manual. Improved verbiage of prompt. Aliases are now inserted "[b]efore" or "[a]fter" the existing alias instead of "[i]nsert" or "[a]ppend." Note how the new usage flows better. * mh-customize.el (mh-alias): Changed manual link in defgroup from Customizing mh-e to Aliases. (mh-alias-grab-from-field button): mh-alias-from-has-no-alias-p renamed to mh-alias-for-from-p and no longer returns surprising value if there isn't a From field. Therefore, enable button if there is a From header field and mh-alias-for-from-p returns nil. (mh-letter-complete-function) (mh-alias-completion-ignore-case-flag, mh-alias-flash-on-comma) (mh-alias-insert-file, mh-alias-insertion-location) (mh-alias-local-users, mh-alias-local-users-prefix) (mh-alias-passwd-gecos-comma-separator-flag): Merge docstring with manual. (mh-alias-system-aliases): Moved to mh-alias.el. * mh-comp.el (mh-letter-complete-function-alist): Removed comment about making this customizable since I didn't think it seemed appropriate in the manual. (mh-letter-complete): Merge docstring with manual. 2003-09-23 Satyaki Das * mh-speed.el (mh-speed-flists): When exiting emacs, don't ask if the flists process should be killed. * mh-e.el (mh-folder-message-menu): Enable undo menu entry only if something can be undone. * mh-customize.el (undo): Enable undo button only if something can be undone. 2003-09-22 Peter S Galbraith * mh-customize.el (mh-identity-handlers): New defcustom. Alist of Handler functions for mh-identity (downcased) fields. (mh-identity-list): Add support for pgg-default-user-id. * mh-identity.el (mh-insert-identity): Modified to use `mh-identity-handlers', adding hacking flexibility for those who might need it. (mh-identity-field-handler): New function. Return the handler for a FIELD or nil if none set. The field name is downcased. (mh-identity-handler-gpg-identity): New function; handler for pgg pgp identities. It sets a buffer-local value for `mh-pgg-default-user-id' which must be handled by mh-send-letter. (mh-identity-pgg-default-user-id): New buffer-local variable to hold the requested key ID. (mh-identity-handler-signature): New function; handler t insert and remove signature files. (mh-identity-handler-default): New function; the default handler to insert or remove generic field. (mh-identity-handler-top): Insert a field at the top of the header. (mh-identity-handler-bottom): Insert a field at the bottom of the header. (mh-header-field-delete): Make more robust wrt the field having a trailing colon or not. (mh-identity-make-menu): Add a "Customize Identities" menu entry. * mh-loaddefs.el: Regenerated. 2003-09-21 Peter S Galbraith * mh-init.el (mh-variant-set): Bug fix for mh-variant long names with version numbers. * mh-e.el (mh-scan-format): patch from Sergey Poznyakoff. GNU mailutils now supports the %(decode) format 2003-09-20 Satyaki Das * mh-gnus.el (mh-mm-text-html-renderer): New function to query which HTML renderer is being used by Gnus. * mh-mime.el (mh-signature-highlight): Renderers used to display HTML parts garble the signature separator in various ways. The function has been modified to take that into account. (mh-mime-display-single, mh-mm-display-part): Pass the new optional argument to `mh-signature-highlight'. 2003-09-19 Mark D. Baushke * mh-mime.el (mh-have-file-command, mh-file-mime-type): Made an mh-autoload as they are used in mh-comp.el. * mh-loaddefs.el: Regenerated. 2003-09-18 Peter S Galbraith * mh-comp.el (mh-insert-fields): Make sure field has a colon. 2003-09-18 Satyaki Das * mh-seq.el (mh-toggle-tick): Don't hardcode the name of the tick sequencence in the function. This would have caused improper highlighting of the tick sequence if the user had changed its name. 2003-09-15 Satyaki Das * mh-e.el (mh-folder-message-menu): Fix a little bug which shows up as a problem during compilation (closes SF #806577). 2003-09-15 Mark D. Baushke * mh-customize.el (mh-invisible-header-fields-internal): Added a new field for GNU mailutils per Sergey Poznyakoff. 2003-09-09 Satyaki Das * mh-utils.el (vcard): Unconditionally load vcard.el, if available, so that vcards are always inlined. 2003-09-09 Peter S Galbraith * mh-mime.el (mh-file-mime-type-substitutions): Add entry to convert text/plain .vcf files to text/x-vcard. (mh-mime-content-types): Add text/x-vcard. 2003-09-09 Bill Wohler * mh-comp.el (mh-rejected-letter-start): Added strings for qmail and exim (addresses SF #404965). 2003-09-09 Satyaki Das * mh-gnus.el (mm-inline-text-vcard): Make vcard display work with Gnus-5.9. The extra file vcard.el is still needed. * mh-mime.el (mh-signature-highlight): New function that highlights message signatures. (mh-mm-display-part, mh-mime-display-single): Highlight signatures using `mh-signature-highlight' (closes SF #802722). More work is needed for XEmacs. (mh-mime-display): Highlight signature in non-MIME email too. * mh-customize.el (mh-show-signature-face): New face used to display message signature. 2003-09-08 Peter S Galbraith * mh-e.el (mh-version): Do something sensible when mh-variant-in-use is undefined. * mh-junk.el (mh-spamassassin-blacklist) (mh-spamassassin-whitelist): Change options to be compatible with old version of spamassassin (V2.20). 2003-09-07 Mark D. Baushke * mh-mime.el (mh-access-types): Per RFC 2049, the "afs" access-type for message/external-body has been removed. Update the comments to reference the current MIME RFCs 2045, 2046 and 2049 rather than the obsolete RFC 1521. 2003-09-05 Peter S Galbraith * mh-e.el (mh-version): Bumped version number to 7.4.2+cvs. 2003-09-04 Satyaki Das * mh-utils.el (mh-picon-directory-list, mh-picon-directory): The mh-picon-directory-list variable supersedes mh-picon-directory. (mh-picon-existing-directory-list): New variable that contains the list of picon directories that actually exist. (mh-picon-set-directory-list): New function to update mh-picon-existing-directory-list from mh-picon-directory-list. (mh-picon-get-image): The function has been modified to search a list of possible picon source directories. The regexp to extract the username from the email address has been made smarter so that it can recognize email addresses of the form user+random@foo.net and extract "user" from there. (mh-picon-file-contents): The file type recognition code has been moved from mh-picon-get-image into this function. (mh-picon-generate-path): The function has been generalized so that searching multiple paths is now feasible. * mh-pick.el, mh-e.el: Checkdoc fixes. 2003-09-02 Satyaki Das * mh-identity.el (eval-when): It seems that the mh-comp-loaded code isn't required any more. 2003-08-30 Satyaki Das * mh-init.el (mh-variant-set): Replace `error' with `message' so that Emacs CVS will compile without errors if no MH variant is present. 2003-08-29 Satyaki Das * mh-init.el (mh-variant-set): Add interactive spec to the function. * mh-mime.el (mh-mhn-compose-external-type): Optional arguments are prompted for only if prefix arg is given. 2003-08-29 Mark D. Baushke * mh-mime.el (mh-mhn-compose-external-type): Modified to be interactive and prompts for many of the fields. Made an mh-autoload. (mh-access-types): New table derived from RFC2017, RFC1521 and RFC1738, used in a completing-read in mh-mhn-compose-external-type. * mh-loaddefs.el: Regenerated. 2003-08-26 Satyaki Das * mh-utils.el (mh-picon-image-types, mh-picon-get-image): Avoid compiler warnings. (mh-sub-folders-actual): Parsing of the output from folders has been modified, so that it also works for MH (closes SF #792300). * mh-junk.el (mh-spamassassin-whitelist): Avoid calling ietf-drums-parse-address if it isn't present. (mh-spamassassin-identify-spammers): Avoid use of puthash so that Emacs20 doesn't complain. * mh-e.el (mh-colors-available-p): Wrap call to display-color-cells in a mh-funcall-if-exists to avoid compiler warning in Emacs20. 2003-08-25 Satyaki Das * mh-e.el (mh-colors-available-flag, mh-folder-mode): New variable to track if colors are available and it is set appropriately in mh-folder-mode. (mh-colors-available-p, mh-colors-in-use-p): Two functions to check whether colors are available and if they are actually being used. (mh-add-sequence-notation): Just changing a scan line doesn't make font-lock refontify the line in Emacs20. So explicitly refontify the scan line in such a situation. (mh-internal-seq): If colors aren't being used then treat the tick sequence like a normal user sequence. * mh-seq.el (mh-put-msg-in-seq): Do font-lock highlighting after the messages have been added to the sequence. (mh-toggle-tick): Modified so that highlighting of the ticked messages will be properly done. If font-lock isn't being used or if colors aren't supported by the Emacs where MH-E is running, then the `%' character is used to annotate ticked messages. * mh-utils.el (mh-picon-image-types): Since Emacs20 doesn't have image-type-available-p, wrap calls to that function in ignore-errors. (mh-add-msgs-to-seq): Do the font-lock highlighting after the messages have been added. 2003-08-24 Bill Wohler * Makefile (MH-E-SRC): Replaced mh-xemacs-compat.el and mh-xemacs-icons.el with mh-xemacs.el. * mh-e.el: Don't require mh-xemacs-compat which no longer exists. The XEmacs stuff gets required by mh-customize.el which is required by mh-utils.el which is required by mh-e.el. This all happens before mh-xemacs-compat was required, so all should be well. * mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and mh-xemacs-icons.el with mh-xemacs.el. * mh-xemacs.el: New file from concatenation of mh-xemacs-compat.el and mh-xemacs-icons.el which were removed since their names exceeded DOS 8+3 limits. * mh-customize.el (mh-compose-skipped-header-fields): Use uppercase for field names. 2003-08-21 Bill Wohler * mh-customize.el (mh-sequences): Introduced new customization group for sequences. (mh-refile-preserves-sequences-flag, mh-tick-seq) (mh-update-sequences-after-mh-show-flag): Moved option from mh-folder to mh-sequences group. Synced docstring with manual. (mh-index-ticked-messages-folders): Since mh-tick-seq is customizable, use it instead of tick in the docstring. * mh-index.el (mh-index-ticked-messages): Since mh-tick-seq is customizable, use it instead of tick in the docstring. * mh-seq.el (mh-msg-is-in-seq): Can now specify an alternate message number with a prefix argument. (mh-narrow-to-tick): Since mh-tick-seq is customizable, use it instead of tick in the docstring. Also, use mh-tick-seq instead of tick in warning message. 2003-08-20 Peter S Galbraith * mh-customize.el: setq mh-variant to 'none when byte-compiling, since we don't care what MH variant (if any) is on the system at that point. * mh-init.el (mh-variant-set): Don't probe for MH variant when mh-variant is set to'none (during byte-compilation). 2003-08-19 Peter S Galbraith * mh-pick.el (mh-pick-single-dash): New defconst. Search components that are supported by single-dash option in pick. (mh-pick-regexp-builder): Use `mh-pick-single-dash' and adapt patch from Sergey Poznyakoff. * mh-comp.el (mh-reply): mu-mh supports `repl -group', thanks to Sergey Poznyakof. * mh-init.el: checkdoc fixes. 2003-08-19 Bill Wohler * mh-seq.el (mh-edit-pick-expr): Renamed from mh-read-pick-regexp since the new name is more indicative of what the function does. Prompt now says "Pick expression" instead of "Pick regexp". (mh-narrow-to-subject): Rewrote function to behave like other similar functions. (mh-narrow-to-header-field, mh-narrow-to-range) (mh-narrow-to-tick): s/regexp/pick-expr/. (mh-widen, mh-narrow-to-from, mh-narrow-to-cc, mh-narrow-to-to): Synced docstrings with manual 2003-08-19 Bill Wohler Released MH-E version 7.4.2. * MH-E-NEWS, README: Updated for release 7.4.2. * mh-e.el (Version, mh-version): Updated for release 7.4.2. * mh-e.el (mh-folder-size, mh-folder-size-folder) (mh-folder-size-flist): If flist is not present use folder to find the number of messages in the folder. Also the .mh_sequences file is read to find the number of unseen messages (patch from 1.349 and branched for 7.4.2, closes SF #791021). * mh-utils.el (mh-flists-present-flag, mh-find-progs): Introduce a new variable to test for the presence of the flists program and set it in mh-find-progs. (mh-collect-folder-names): Use folders instead of flists. One advantage is that folders is available on MH while flists is not. Another is that if an explicit -sequence argument isn't given and Unseen-Sequence profile is not present then flists croaks while folders doesn't. (mh-collect-folder-names-filter): Don't consider folder names that start with a `.' character. This is needed since the folders command doesn't filter them out like flists does. (patches from 1.307 and 1.309 and branched for 7.4.2, closes SF #791021). 2003-08-18 Bill Wohler * mh-index.el (mh-index-sequenced-messages) (mh-index-new-messages, mh-index-ticked-messages): Updated docstrings from manual (closes SF #718833). * mh-customize.el (mh-variant): Checkdoc fix. (mh-index-new-messages-folders): Don't mention defvar in docstring, use `+inbox' instead. (mh-index-ticked-messages-folders): Don't mention defvar in docstring, use `tick' instead. * mh-comp.el (mh-repl-group-formfile): Checkdoc fix. 2003-08-18 Peter S Galbraith * mh-init.el (mh-variant-set, mh-sys-path, mh-variant-info): Add support for GNU mailutils. (mh-variant-mu-mh-info): New function to detect mu-mh and return info about it for `mh-variants'. * mh-e.el (mh-regenerate-headers): mu-mh has different error message for a invalid message list. 2003-08-18 Peter S Galbraith * mh-customize.el (mh-e): New defgroup. Sort of an alias for the 'mh group that a user might be more likely to find. 2003-08-18 Bill Wohler * mh-comp.el (mh-insert-auto-fields-done-local): Docstring tweak. (mh-compose-and-send-mail): Do not call mh-insert-auto-fields. This should be done only once in mh-send-letter. 2003-08-18 Peter S Galbraith * mh-comp.el (mh-letter-mode): Call `mh-find-path unconditionally, like elsewehere in MH-E. * mh-utils.el (mh-find-path): Run setup code only if `mh-find-path-run' is nil such that this is only done once. Also remove the `setq' for `read-mail-command' and `mail-user-agent'. 2003-08-18 Peter S Galbraith * mh-e.el: require 'mh-utils first * mh-customize.el (mh-variant): defcustom moved here. * mh-init.el (mh-variants): Made an mh-autoload. 2003-08-18 Peter S Galbraith * Makefile (MH-E-SRC): Added mh-init.el to MH-E-SRC. * mh-utils.el (mh-find-progs): Deleted. Make obsolete by mh-init.el. (mh-find-path): Call `mh-variants' instead of now obsolete `mh-find-progs'. (mh-path-search): Deleted. Was only used by `mh-find-progs'. * mh-e.el: require mh-init.el. (mh-version): Use simpler `mh-variant-in-use'. (mh-scan-format): Use (mh-variant-p 'nmh) instead of mh-nmh-flag. * mh-comp.el (mh-insert-x-mailer): Use simpler `mh-variant-in-use'. * mh-utils.el (mh-progs, mh-lib, mh-lib-progs) (mh-flists-present-flag): Moved to mh-init.el. (mh-nmh-flag): Deleted. Use (mh-variant-p 'nmh) instead. * mh-comp.el (mh-repl-group-formfile, mh-forward, mh-reply) (mh-send-letter): Use (mh-variant-p 'nmh) instead of mh-nmh-flag. * mh-mime.el (mh-edit-mhn, mh-mime-save-parts): Use (mh-variant-p 'nmh) instead of mh-nmh-flag. 2003-08-16 Bill Wohler * mh-customize.el (mh-folder-selection): New group to hold variables described in Folder Selection section in manual. (mh-default-folder-list, mh-default-folder-must-exist-flag, mh-default-folder-prefix): Moved to mh-folder-selection group. Updated docstrings per manual update. (mh-default-folder-for-message-function): New defcustom. Was a defvar in mh-utils.el. Updated docstring per manual update. * mh-utils.el (mh-default-folder-for-message-function): Moved to mh-customize.el. * mh-e.el (mh-folder-from-address, mh-prompt-for-refile-folder): Updated docstrings per manual update. * mh-unit.el (mh-unit-files): Added mh-init.el. 2003-08-16 Peter S Galbraith * mh-init.el: New file. Code to initialize the MH-E back-end. Highlights: (mh-variant): New defcustom. Users may customize `mh-variant' to switch between available variants. (mh-variants): Available MH variants are described in this variable. (mh-variant-in-use, mh-variant-p): Developers may check which variant is currently in use with the variable `mh-variant-in-use' or the function `mh-variant-p'. 2003-08-15 Bill Wohler * mh-customize.el (mh-auto-fields-list): The manual uses Fcc instead of fcc, so I've changed the user-visible text accordingly. I've left the const alone for backwards compatibility. 2003-08-14 Bill Wohler * mh-identity.el (mh-insert-identity): Changed signature deletion test to test for both markers, rather than testing to see if the start marker is bound. Since the start marker is defined in this file, it should always be bound. Suggestion by Satyaki. * mh-comp.el (mh-send-letter): Go to the top of the draft so that the user can see which header fields have been inserted. I think this is more important than leaving point alone or going to the end to see the signature since Mail-Followup-To or Bcc or cc could have some deleterious effects. * mh-customize.el (mh-auto-fields-prompt-flag): New variable. Non-nil means to prompt before sending if fields inserted. * mh-comp.el (mh-insert-auto-fields): Now return t if fields inserted; otherwise nil. (mh-send-letter): Deleted obsolete documentation about adding X-Mailer and X-Face. Prompt before sending if auto fields added and mh-auto-fields-prompt-flag is t. * mh-customize.el (mh-identity-list): Allow signature to come from mh-signature-file-name. In this case, the "signature" value is set to nil. This might not be the best implementation. Suggestions welcome. * mh-identity.el (mh-insert-identity): Now that the signature can be a nil value, moved test higher up in cond so that the test for a nil value would not be executed first prevening signature handling. Handle nil signature value by calling mh-insert-signature with no arguments which means to use mh-signature-file-name. * mh-comp.el (mh-insert-signature): Changed text of message if no signature inserted. * mh-customize.el (mh-identity-list): Changed "Signature" constant back to "signature" so it *won't* be backwards-incompatible any more. I discovered one could use the :tag keyword to get headline captalization in the menu. * mh-identity.el (mh-insert-identity): Ditto. * mh-identity.el (mh-identity-make-menu): Always build menu. Always create Insert Auto Fields menu item. Just don't enable it if mh-auto-fields-list is nil. Enable radio buttons always. Make None a radio button choice with the other identities. * mh-comp.el (mh-letter-menu): Removed cond on fboundp 'easy-menu-define. We don't do this elsewhere. 2003-08-13 Bill Wohler * mh-identity.el (mh-identity-make-menu, mh-insert-identity): Use headline capitalization in menu items. Even the internal names are exposed in the customize interface, so they need to be uppercase too. (mh-insert-identity): Rather than goto-char to mh-identity-signature-start before deleting, simply pass it to delete-region. When setting markers, use point-min-marker and point-max-marker instead of moving point. Set marker type of mh-identity-signature-start to t to fix a bug where changing identity deleted user's text. * mh-customize.el (mh-identity-list, mh-auto-fields-list): Reworked docstring. Use headline capitalization. Commented out implementation details for later deletion or resurrection upon popular demand. N.B. If your mh-identity-list contains "signature" then you will need to either edit your .emacs file manually, or delete your existing "signature" which will become a regular field with this change and create a new signature. I figured I could get away with this since 8.0 is a major release, and coinciding with the manual update will be a MAJOR release. I apologize profusely that I didn't catch this before it was released. (mh-identity-default): Use headline capitalization in example. 2003-08-12 Jeffrey C Honig * mh-customize.el (mh-alias-reloaded-hook): Define `mh-alias-reloaded-hook'. * mh-alias.el (mh-alias-reload): Run `mh-alias-reloaded-hook' after reloading the aliases. 2003-08-12 Mark D. Baushke * mh-comp.el (mh-insert-signature): Use functionp to avoid the possibility of doing a funcall on a void function. 2003-08-12 Bill Wohler * mh-customize.el (mh-identity): Point group manual link to new Identities section. (mh-signature-separator-flag): New variable which can be used to suppress the output of the signature separator. * mh-comp.el (mh-insert-signature): Use mh-signature-separator-flag. * mh-identity.el (mh-insert-identity): If the identity's signature file didn't exist, an fboundp error was thrown. This was fixed by removing signature tests that were redundant and out of date with the tests in mh-insert-signature. Removed second signature condition as it is now handled in the first signature condition. 2003-08-12 Peter S Galbraith * mh-identity.el (mh-insert-identity): Don't insert new lines on signatures anymore. * mh-comp.el (mh-insert-signature): Make sure signature file is readable before trying to insert it. 2003-08-11 Bill Wohler * mh-comp.el (mh-insert-signature): Unconditionally insert a newline so that signatures are inserted consistently, and so that there isn't any text after the cursor so that the user can start typing his message immediately. Use new variable and function mh-signature-separator and mh-signature-separator-p. * mh-customize.el (mh-delete-yanked-msg-window-flag): Checkdoc fix. (mh-signature-file-name): Updated docstring now that this variable can be a function. Added cross-references to mh-signature-separator, mh-signature-separator-regexp, and mh-signature-separator-p which might be used in such functions. * mh-identity.el (mh-insert-identity): Don't include signature if signature separator already present. Useful when running mh-edit-again. * mh-mime.el (mh-inline-vcard-p): Use mh-signature-separator-p. * mh-utils.el (mh-signature-separator-regexp): New variable containing "^-- $" which should be used when looking for the signature separator. (mh-signature-separator): New variable containing "-- \n" which should be used when inserting the signature separator. (mh-signature-separator-p): New function that returns non-nil if mh-signature-separator-regexp is found in the buffer. 2003-08-09 Satyaki Das * mh-utils.el (mh-x-image-scaling-function): Variable that contains function used to scale images. Possible choices are mh-x-image-scale-with-convert and mh-x-image-scale-with-pnm. (mh-convert-executable): Removed. (mh-x-image-scale-with-pnm, mh-x-image-scale-with-convert): New functions that scale images using pnm tools or ImageMagick. (mh-x-image-scale-and-display, mh-x-image-url-display): Use mh-x-image-scaling-function instead of mh-convert-executable. 2003-08-08 Peter S Galbraith * mh-comp.el (mh-insert-signature): Bug fix. Handle case of nil `mh-signature-file-name' and hooks correctly. * mh-identity.el (mh-insert-identity): Refactor to use mh-insert-signature * mh-comp.el (mh-signature-separator-p): Removed. * mh-comp.el (mh-insert-signature): Merge MIME awareness from mh-insert-identity into this command. Allow `mh-signature-file-name' to be a function to call. See if "-- " needs to be inserted only after hooks have run. 2003-08-07 Bill Wohler * mh-customize.el (mh-compose-skipped-header-fields): Added X-Image-URL. (mh-autoload): Removed cookies. They aren't necessary in mh-e.el, mh-utils.el, or mh-customize.el. * mh-e.el (mh-autoload): Removed cookies. They aren't necessary in mh-e.el, mh-utils.el, or mh-customize.el. * mh-identity.el (mh-insert-identity): Made regexp for signature separator more explicit. Hmmm, maybe we should create mh-signature-separator-regexp... * mh-index.el (mh-replace-string): Moved to mh-utils.el. * mh-utils.el (mh-replace-string): Moved here from mh-index.el. (mh-autoload): Removed cookies. They aren't necessary in mh-e.el, mh-utils.el, or mh-customize.el. * mh-comp.el (mh-insert-signature): Added file argument to insert a file other than mh-signature-file-name. Insert signature separator, unless file already contains one. 2003-08-06 Satyaki Das * mh-e.el (mh-folder-size, mh-folder-size-folder) (mh-folder-size-flist): If flist is not present use folder to find the number of messages in the folder. Also the .mh_sequences file is read to find the number of unseen messages. * mh-utils.el (mh-flists-present-flag, mh-find-progs): Introduce a new variable to test for the presence of the flists program and set it in mh-find-progs. 2003-08-06 Peter S Galbraith * mh-customize.el: Change the order of `mh-identity-list' and `mh-auto-fields-list' and remove byte-compilation defvar for `mh-identity-list'. This fixes a customization bug for `mh-identity-list', where it wasn't set correctly. * mh-identity.el (mh-identity-make-menu): mh-auto-fields-list may not be bound yet when initially loaded. 2003-08-06 Bill Wohler * mh-alias.el (mh-alias-add-address-under-point): Removed trailing period from messages. The conventions say that errors should not end with a period and that "Foo...done" messages should not end in a period, but they aren't explicit about messages in general. Given what the conventions *do* say, and because most of our messages don't end with a period, let's just say that messages in general don't end in a period, just like error messages. * mh-comp.el (mh-extract-rejected-mail, mh-letter-mode-message): Ditto. * mh-e.el (mh-refile-a-msg): Ditto. * mh-funcs.el (mh-undo-folder): Ditto. * mh-mime.el (mh-mime-save-parts): Ditto. * mh-seq.el (mh-subject-to-sequence-unthreaded) (mh-narrow-to-subject, mh-delete-subject): Ditto. * mh-index.el (mh-index-sequenced-messages) (mh-index-new-messages, mh-index-ticked-messages): Discovered that in general we should only use question marks in yes-or-no-p or y-or-n-p prompts, but not in other prompts that use completing-read and offer defaults. In these cases, use colons instead (closes SF #730470). * mh-mime.el (mh-mime-save-parts): Ditto. * mh-utils.el (mh-prompt-for-folder): Ditto. * mh-alias.el (mh-alias-apropos): Multiple messages are usually shown one at a time rather than appended. Send output to mh-aliases-buffer instead of *Help*. (mh-alias-local-users): Checkdoc fix. * mh-funcs.el (mh-undo-folder): Removed commented-out code since its deadline had expired. * mh-utils.el (mh-aliases-buffer): New buffer name, used in mh-aliases.el. 2003-08-06 Satyaki Das * mh-utils.el (mh-x-image-url-cache-canonicalize): Make this function work for XEmacs too. (mh-collect-folder-names): Use folders instead of flists. One advantage is that folders is available on MH while flists is not. Another is that if an explicit -sequence argument isn't given and Unseen-Sequence profile is not present then flists croaks while folders doesn't. (mh-collect-folder-names-filter): Don't consider folder names that start with a `.' character. This is needed since the folders command doesn't filter them out like flists does. * mh-index.el (mh-replace-string): Add autoload for it. 2003-08-05 Satyaki Das * mh-mime.el (mh-compose-forward, mh-mhn-compose-forw) (mh-mml-forward-message): The variable mh-sent-from-msg can be a list. So check that the value is really a number before using it like one. * mh-comp.el (mh-insert-letter): Same as above. * mh-utils.el (mh-picon-get-image): Make the code that finds the address of the sender more robust. (mh-face-display-function): Make it work with XEmacs. (mh-picon-image-types): A new variable that stores what image types can be used. 2003-08-05 Satyaki Das * mh-customize.el (mh-tool-bar-define): Make the save button such that is activated only if the buffer needs to saved. * mh-utils.el (mh-face-display-function, mh-picon-get-image): Some domains, for instance cs.cmu.edu, don't have xpm files. So we need to search for all three files. The change does that. (mh-picon-file-contents): A utility function to return the contents of a file as a string. (mh-picon-get-image): Write it as a loop to make it simpler. (mh-x-image-set-download-state): Make the link simpler. 2003-08-04 Satyaki Das * mh-utils.el (mh-x-image-url-display): Don't bother to try to download image if we don't have the necessary tools to display it. (mh-face-display-function): Add preliminary support for "domain" picons. (mh-picon-get-image, mh-picon-generate-path): Functions to find best match for domain in the From header field. * mh-e.el (mh-previous-unread-msg): If some of the messages in the unseen sequence are not present in the folder buffer then calling this function gets stuck and can't skip over them. The change fixes this. (mh-next-unread-msg): Same as above. 2003-08-04 Bill Wohler * mh-utils.el (mh-show-mode): Added cross reference to mh-folder-mode in docstring (closes SF #728638). Added \\{mh-show-mode-map} to show keymap. * mh-e.el (mh-folder-mode): Added information about ranges to docstring (closes SF #728638). * mh-speed.el (mh-speed-refresh): New function that calls mh-speed-flists and mh-invalidate-map. (mh-folder-speedbar-key-map): Replaced keybindings for mh-speed-invalidate-map and mh-speed-flists with a single binding for mh-speed-refresh. (mh-folder-speedbar-menu-items): Replaced menu items for Run Flists and Invalidate Cached Folders with the single menu item Refresh Speedbar in order to simplify the UI. * mh-customize.el (mh-fetch-x-image-url): Added DOS as another reason not to set this to t. 2003-08-04 Satyaki Das * mh-e.el (mh-scan-folder): Handle ranges from user input properly. 2003-08-03 Satyaki Das * mh-utils.el (mh-find-msg-get-num): Removed. If threading isn't present, the messages are sorted by index. So `mh-goto-msg' was implemented as a binary search and this function was used in that implementation. So this isn't needed any more. (mh-msg-search-pat): Removed. Before the advent of message threading, this function was used to generate a regexp used to search for a particular message. It isn't used anymore. The variable `mh-scan-msg-number-regexp' should be updated and used in `mh-goto-msg' instead of hardcoding the regexp in the code. Then we might be able to better support other scan line formats in the future. * mh-seq.el (mh-map-to-seq-msgs, mh-notate-seq): Removed. These functions were used to notate user sequences. But calling `mh-goto-msg' inside of a loop is inefficient. So the sequence notation code was rewritten thereby making these functions redundant. (mh-copy-line-to-point): Removed. This function was used in the implementation the now removed function `mh-copy-seq-to-point'. That function was problematic and was replaced by the less general `mh-copy-seq-to-eob'. This makes `mh-copy-line-to-point' redundant. (mh-region-to-msg-list): Removed since this is a special case of the more general `mh-range-to-msg-list'. * mh-loaddefs.el: Regenerated. 2003-08-03 Jeffrey C Honig * mh-customize.el (mh-invisible-header-fields-default): Added several new fields to hide. Sorted the list with sort-lines. 2003-08-03 Peter S Galbraith * mh-customize.el (mh-invisible-headers): Variable renamed to `mh-invisible-header-fields-compiled'. (mh-invisible-headers): Implement above change. * mh-utils.el (mh-display-msg): Idem. * mh-mime.el (mh-mm-inline-message): Idem. * mh-comp.el (mh-insert-letter): Idem. 2003-08-03 Bill Wohler * mh-speed.el (mh-folder-speedbar-menu-items): Added separator between standard and MH-E menu items. Use headline capitalization in menu items. * mh-utils.el (mh-temp-fetch-buffer): New constant to hold buffer name for wget output. (mh-x-image-url-fetch-image): Use mh-temp-fetch-buffer instead of hard-coded buffer name. Use make-temp-file to avoid race conditions and subsequent security issues raised in make-temp-name docstring. 2003-08-03 Satyaki Das * mh-utils.el (mh-wget-executable, mh-wget-choice, mh-wget-option) (mh-x-image-url-fetch-image): Support the use of `curl' and `fetch' as alternatives to `wget'. (mh-wget-choice): Change order of search. (mh-x-image-url-fetch-image): Rename buffer. 2003-08-03 Satyaki Das * mh-utils.el (mh-x-image-set-download-state) (mh-x-image-get-download-state): Specially named symbolic links are used to keep track of whether a X-Image-URL header field needs to downloaded the next time it is seen. These functions get and set the symlinks appropriately. (mh-x-image-url-fetch-image): Simplified since the query has been moved to `mh-x-image-url-display'. Also if wget isn't present then try again next time since the user might install wget before trying once more. (mh-x-image-scale-and-display): Handle absence of the `convert' program better. If it isn't present then we will try to display the image the next time it is encountered. Also use the -geometry option to convert since the -resize option isn't present in older versions. (mh-x-image-url-display): Move all the code that decides whether an X-Image-URL header field will be fetched in this function. Also remember the user's decision so that if the image couldn't be fetched the first time, we will try to fetch it later on without asking again. 2003-08-02 Peter S Galbraith * mh-alias.el (mh-alias-local-users): Exclude all aliases already in mh-alias-alist from `ali' (closes SF #772595). 2003-08-01 Satyaki Das * mh-utils.el (mh-x-image-display, mh-x-image-url-display): Avoid a race. The X-Image-URL is displayed asynchronously. Suppose a message with a image is shown with `mh-show'. If a different message is displayed before the image can be fetched, then the new message will have the image displayed. With this change the race is less likely to happen. 2003-08-01 Peter S Galbraith * mh-inc.el (mh-inc-spool-map): Fix what `mh-inc-spool-map-help' must look like as a fake `mh-help-messages' in order to work correctly in mh-help. 2003-07-31 Bill Wohler * mh-inc.el (mh-inc-spool-map): Use mh-help instead of mh-ephem-message in order to display help in its own buffer instead of minibuffer. * mh-utils.el (mh-help-buffer): New variable to hold the name of the MH-E help buffer name. * mh-funcs.el (mh-help, mh-prefix-help): Use with-electric-help to display help messages. I observed a friend with a vision disability and the 5 seconds the help appeared on the screen was not long enough for him to lock on it. I've therefore changed the help function to display the help in its own buffer called *MH-E Help* (closes SF #493740 and SF #656631). * mh-customize.el (mh-fetch-x-image-url): Changed default from nil to 'ask. Updated docstring from manual. (mh-invisible-header-fields-internal): Added X-Image-URL. (mh-show-use-xface-flag): Updated docstring from manual. (mh-x-face-file): Ditto. * mh-mime.el (mh-mhn-compose-external-type): Don't insert the directory parameter if it's nil. The mhbuild man page indicates that this parameter is optional, so this should be fine. * mh-comp.el (mh-letter-mode-map): Added keybindings for mh-mhn-compose-anon-ftp and mh-mhn-compose-external-compressed-tar. (mh-letter-menu): Uncommented menu items for same. 2003-07-30 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-pick.el (mh-do-pick-search): Removed since the function `mh-pick-do-search' performs the same action as this function. * mh-index.el (mh-index-update-unseen): Removed since the generalized sequence synchronization code that keeps sequences in index folders in sync with the sequences in the source folders makes this function redundant. * mh-e.el (mh-folder-unseen-seq-name, mh-folder-unseen-seq-list): Removed. These two functions were used in the unseen sequence highlighting before the sequence highlighting code was generalized. In any event calls to the function `mh-folder-unseen-seq-name' can be replaced by the variable `mh-unseen-seq' and calls to `mh-folder-unseen-seq-list' can be replaced with (cdr (assoc mh-unseen-seq mh-seq-list)). (mh-unmark-all-headers): Removed since this function has been superseded by mh-remove-all-notation. (mh-map-over-seqs): Removed since we now have the generalized iteration over message ranges (the `mh-iterate-on-range' macro) that can be used instead. (mh-notate-if-in-one-seq): Removed. This function was used for changing the `%' notation for user sequences. It can't be used for that purpose any more, since we have a different scheme now. * mh-unit.el (mh-unit-tests): Removed since it isn't needed any more. (mh-unit): Run all function that start with the string "mh-unit-test-". 2003-07-30 Bill Wohler * mh-customize.el (mh-invisible-header-fields): Checkdoc fix. * mh-utils.el (mh-x-image-url-cache-canonicalize): Shortened using example in files.el:make-backup-file-name-1. (mh-face-display-function): Added X-Image-URL to docstring. * mh-unit.el (mh-unit-x-image-url-cache-canonicalize): New function to test mh-x-image-url-cache-canonicalize since it lent itself well to unit testing. Had to start somewhere! (mh-unit-equal): New function that throws an error if RESULT doesn't equal EXPECTED. (mh-unit): Call mh-unit-x-image-url-cache-canonicalize. 2003-07-29 Satyaki Das * mh-unit.el (mh-unit-update-call-graph): Make the function work better with dotted lists, that is lists of the form (a b c . d) where `d' isn't nil. With this we are able to avoid marking some functions as unused even though they are actually used in alists. 2003-07-28 Peter S Galbraith * mh-comp.el (mh-insert-letter): Remove `mh-visible-headers' operation. * mh-mime.el (mh-mm-inline-message): Same. * mh-utils.el (mh-display-msg): Same. (mh-clean-msg-header): Make a note of above change. * mh-customize.el (mh-invisible-header-fields-internal): Renamed from prior `mh-invisible-header-fields-default'. (mh-invisible-header-fields-default): Renamed from prior `mh-invisible-header-fields-default-override'. (mh-invisible-header-fields): Renamed from prior `mh-invisible-header-fields-user'. (mh-visible-headers): Removed! We use invisible fields only now. (mh-visible-header-fields): Removed! 2003-07-28 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields-default): Added 3 new fields to hide. 2003-07-28 Satyaki Das * mh-utils.el (mh-show): Add an extra argument to the function so that interactive use will always force redisplay of the message. * mh-mime.el (mh-mime-display, mh-mm-inline-message): Bind the variables `mm-verify-option' and `mm-decrypt-option' so that verification and decryption of mail can happen without any additional tinkering. 2003-07-25 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields-default): New defvar holding default fields to hide. This replaces the old `mh-invisible-header-fields' defcustom. (mh-invisible-header-fields-user): New defcustom. Users add fields to suppress that we didn't include in `mh-invisible-header-fields-default'. This could be named simply `mh-invisible-header-fields' and it wouldn't really break anything for users who have customized it to a long list now redundant with `mh-invisible-header-fields-default'. (mh-invisible-header-fields-default-override): New defcustom. Users check off the fields they want displayed from what we included in `mh-invisible-header-fields-default'. (mh-invisible-headers): Function adapted to new variables. 2003-07-25 Satyaki Das * mh-e.el (mh-inc-folder): If the user is in a different folder displaying a message and runs mh-inc-folder, then the folder changes to +inbox but the show window continues to display the message in the old folder. The change fixes this. (mh-visit-folder): Make the handling of the show window similar to that of mh-inc-folder. 2003-07-24 Satyaki Das * mh-e.el (mh-folder-message-menu, mh-folder-folder-menu): Use the predicate mh-outstanding-commands-p instead of its exapansion. Also use the same label in both menus. (mh-outstanding-commands-p): Generalized so that it will work in mh-show-mode buffers as well. * mh-customize.el (mh-tool-bar-define): Enable tool-bar button for mh-execute-commands only if there are pending deletes or refiles. 2003-07-19 Satyaki Das * mh-utils.el (mh-show-msg): If a unseen message is first marked for deletion/refiling and then displayed, the bold highlighting does not go away. This change fixes that. * mh-seq.el (mh-msg-is-in-seq): Fix a bug in the function. If any message was marked for refiling, then the function would have you believe that every message in the folder is being refiled. 2003-07-17 Bill Wohler * mh-e.el: Removed email address for Stephen Gildea's in Change Log at his request (damn spammers). Removed other email addresses while I was at it since the SourceForge URL should be sufficient contact information. (mh-scan-format-*mh): Fixed typo in comment above these variables. These variables are used if mh-scan-format-file is t, not nil. Also mh-scan-format-file is no longer "above" (courtesy Stephen Gildea). 2003-07-17 Satyaki Das * mh-mime.el (mh-mhn-quote-unescaped-sharp): New function that quotes `#' characters in the first column that aren't part of a MHN directive. (mh-mhn-directive-present-p): Generalized to allow the function to search for MHN directives in a part of the buffer. (mh-edit-mhn): Quote unescaped `#' characters in the draft (closes SF #762464). 2003-07-16 Satyaki Das * mh-alias.el (mh-alias-read-address-map): If mh-alias-flash-on-comma is nil when mh-alias is loaded, then setting mh-alias-flash-on-comma to t later on doesn't turn on address completion display till Emacs is restarted. The change fixes this. 2003-07-15 Bill Wohler * mh-utils.el (mh-cmd-note): Cleaned up docstring (changed phrase to sentences). Moved to Scan Line Formats section. (mh-scan-msg-number-regexp) (mh-scan-msg-overflow-regexp, mh-scan-msg-format-regexp) (mh-scan-msg-format-string, mh-scan-msg-search-regexp): Cleaned up docstrings (changed phrases to sentences). (mh-note-seq): Cleaned up docstring (changed phrase to sentences). Also, this variable is now a character and not a string. Moved to Scan Line Formats section. * mh-funcs.el (mh-note-copied, mh-note-printed): Cleaned up docstrings (changed phrases to sentences). Also, these variables are now characters and not strings. * mh-e.el (mh-scan-format-mh, mh-scan-format-nmh): Filled. I was hoping to quote the hint `t' but checkdoc wouldn't let me. (mh-note-deleted, mh-note-refiled, mh-note-cur): Moved to Scan Line Formats section. (mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp) (mh-scan-refiled-msg-regexp, mh-scan-valid-regexp) (mh-scan-cur-msg-number-regexp, mh-scan-date-regexp) (mh-scan-rcpt-regexp, mh-scan-body-regexp) (mh-scan-subject-regexp, mh-scan-format-regexp): Cleaned up docstrings (changed phrases to sentences). (mh-scan-cur-msg-regexp): Marked this variable as obsolete; it should be removed for 8.0. * mh-comp.el (mh-note-repl, mh-note-forw, mh-note-dist): Cleaned up docstrings (changed phrases to sentences). Also, these variables are now characters and not strings. 2003-07-15 Satyaki Das * mh-index.el (mh-index-update-single-msg) (mh-index-create-sequences): Handle the situation where there are copies of the exact same message correctly. 2003-07-15 Satyaki Das * mh-seq.el (mh-thread-update-scan-line-map): Modified since notation is already a character. * mh-utils.el (mh-note-seq): Convert from string to character. (mh-notate): Modified since characters are used to notate instead of strings of length one. * mh-comp.el (mh-note-repl, mh-note-forw, mh-note-dist): Convert from string to characters. * mh-e.el (mh-note-deleted, mh-note-refiled, mh-note-cur): Same as above (closes SF #770772). (mh-unmark-all-headers): Modified since mh-note-* variables are now characters. (mh-remove-sequence-notation): The mh-notate function remembers the previous notation. Before the change to the mh-note-* variables, mh-notate would only remember the change if a string was used to notate the message. Now mh-notate is always called with a character notation. So the deletion has to take place explicitly. 2003-06-28 Bill Wohler * mh-mime.el (mh-mhn-directive-present-p): If shell comments are present that have a space after the # but no content, then this function would throw an error. This has been fixed (closes SF #762458). 2003-06-27 Satyaki Das * mh-index.el (mh-index-search): Use the new and improved mh-index-new-folder. (mh-index-new-folder): Improved so that redoing the same search will reuse the old index folder. (mh-index-folder-search-regexp): New function which that extracts out the search expression that produced the index folder. 2003-06-24 Bill Wohler * mh-e.el (Version, mh-version): Set to 7.4.1+cvs. 2003-06-25 Bill Wohler Released MH-E version 7.4.1. * MH-E-NEWS, README: Updated for release 7.4.1. * mh-e.el (Version, mh-version): Updated for release 7.4.1. 2003-06-25 Bill Wohler * mh-unit.el (require 'cl): Added. Needed when compiling separately. * Makefile (clean): Now a double-colon rule. Added a second clean target to remove mh-unit.elc. (compile): Removed mh-unit.elc. (mh-unit.elc): New target used to compile mh-unit. 2003-06-24 Bill Wohler * mh-e.el (Version, mh-version): Set to 7.4+cvs. 2003-06-24 Bill Wohler Released MH-E version 7.4. * MH-E-NEWS, README: Updated for release 7.4. * mh-e.el (Version, mh-version): Updated for release 7.4. 2003-06-24 Bill Wohler * mh-alias.el (mh-alias-gecos-name, mh-alias-local-users) (mh-alias-suggest-alias): s/gcos/gecos. The original acronym was GECOS but was later renamed to GCOS (see http://info.astrian.net/jargon/terms/g/GCOS.html). But the term really needs to match the field named pw_gecos in struct passwd in /usr/include/pwd.h * mh-customize.el (mh-letter-faces): New group to house mh-letter-header-field-face. (mh-interpret-number-as-range-flag) (mh-kill-folder-suppress-prompt-hook): Use "you" instead of "the user" to make text more friendly. (mh-index-ticked-messages-folders, mh-visible-headers) (mh-visible-header-fields): Alphabetized. (mh-alias-passwd-gcos-comma-separator-flag): Alphabetized and s/gcos/gecos. (mh-alias-local-users-prefix): Fixed docstring. Prefixes are prepended, not appended. Additional checkdoc fix. (mh-letter-header-field-face): Set group to new group mh-letter-faces and moved option into this group. * mh-index.el (mh-index-sequenced-messages): Improved wording of docstring and mentioned use of prefix argument. * mh-seq.el (mh-widen): Made docstring more accurate (hopefully!). 2003-06-18 Satyaki Das * mh-index.el (mh-replace-string): Modified to preserve case of replacement text. (mh-index-parse-search-regexp): Preserve case of search terms. This is needed to take advantage of the acronym indexing in swish++ (closes SF #755718). 2003-06-13 Satyaki Das * mh-utils.el (mh-show-index-sequenced-messages): Interactive function callable from the show buffer. (mh-show-folder-map): Add key binding for "F q". * mh-e.el (mh-folder-map): Same as above. * mh-index.el (mh-index-sequenced-messages): Add interactive spec to the function (closes SF #718833). 2003-06-13 Bill Wohler * mh-index.el (mh-flists-execute): Needed to expand mhpath too. 2003-06-12 Satyaki Das * mh-index.el (mh-flists-execute): Modified so that flists present in mh-progs is called. 2003-06-07 Jeffrey C Honig * mh-comp.el (mh-forward, mh-forward): Use (mh-mail-header-end) to find the end of headers instead of doing an re-search-forward based on mh-mail-header-separator. 2003-06-06 Satyaki Das * mh-comp.el (mh-letter-toggle-header-field-display): Make the function callable from the show buffer. This means that the buffer is temporarily made writable and the modification status of the buffer restored to the original value. 2003-06-06 Peter S Galbraith * mh-utils.el (mh-address-mail-regexp): Bug fix! It wasn't a true copy of the goto-addr variable. My modification only recognized addresses with one dot after the @. Sorry about that. 2003-06-05 Satyaki Das * mh-utils.el (mh-replace-in-string): Move comment into doc string to satisfy checkdoc. * mh-alias.el (mh-alias-apropos): Checkdoc fix. 2003-06-05 Bill Wohler * mh-customize.el (mh-identity-list): Fixed typo in docstring. 2003-06-05 Peter S Galbraith * mh-comp.el (mh-letter-complete-function-alist): Add bcc an reply-to. 2003-06-04 Peter S Galbraith * mh-comp.el (mh-letter-complete-function-alist): Add dcc. 2003-06-03 Peter S Galbraith * mh-utils.el (mh-replace-in-string): New function name instead of `dired-replace-in-string'. * mh-alias.el (mh-alias-gcos-name): Use it. * mh-alias.el (mh-alias-apropos): New command. Show all aliases that match REGEXP either in name or content. * mh-alias.el (mh-alias-suggest-alias): Add no-comma-swap optional arg. (mh-alias-canonicalize-suggestion): Change a comma to a period in created aliases. (mh-alias-local-users): Call `mh-alias-suggest-alias' with `no-comma-swap' arg set to t. * mh-alias.el (mh-alias-local-users): Fix case of nil `mh-alias-passwd-gcos-comma-separator-flag'. * mh-alias.el (mh-alias-gcos-name): Fix for case of empty gcos name field. (mh-alias-local-users): Fix same. * mh-alias.el (mh-alias-canonicalize-suggestion): Replace use by verbose `replace-regexp' by a looped `replace-match' 2003-06-02 Peter S Galbraith * mh-utils.el (dired-replace-in-string): Bind if not already defined. Borrowed from dired.el * mh-alias.el (mh-alias-gcos-name): switch to using dired-replace-in-string. 2003-06-02 Satyaki Das * mh-utils.el (mh-letter-font-lock-keywords): Fontify header fields in the draft buffer that aren't skipped when navigating with TAB (or S-TAB). * mh-customize.el (mh-clean-message-header-flag) (mh-invisible-headers, mh-invisible-header-fields) (mh-alias-passwd-gcos-comma-separator-flag): Checkdoc fix. (mh-letter-header-field-face): New face to fontify the header fields. * mh-comp.el (mh-insert-auto-fields-done-local): Checkdoc fix. (mh-letter-mode, mh-letter-mail-header-end-marker): Remember the end of the message header in a marker. This is used to fontify the header fields. (mh-font-lock-field-data, mh-letter-header-end): Functions used to fontify message header fields. * mh-alias.el (mh-alias-gcos-name): Checkdoc fix. 2003-06-02 Peter S Galbraith * mh-alias.el (mh-alias-gcos-name): New function. Return a usable address string from a GCOS-NAME and USERNAME. (mh-alias-local-users): Use it. * mh-customize.el (mh-alias-passwd-gcos-comma-separator-flag): New defcustom. Whether the gcos field in the passwd file uses comma as a separator. * mh-customize.el (mh-alias-local-users-prefix): New defcustom. String to append to the real names of users from the passwd file. If nil, use the username string unmodified instead of the real name from the gcos field of the passwd file. * mh-alias.el (mh-alias-local-users): Use it to generate aliases which by default are now the real name prefixed by "local." 2003-06-01 Peter S Galbraith * mh-comp.el (mh-modify-header-field): Bug fix. Calling with a value that was already inserted causes it to get inserted a second time. I have wrapped the value around \b word delimiters. Hope there are no side effects for other code. * mh-comp.el (mh-insert-auto-fields): Attempt regardless of `mh-insert-auto-fields-done-local' flag in interactive use. * mh-comp.el (mh-insert-auto-fields-done-local): Keep track of whether `mh-insert-auto-fields' was called in a buffer. (mh-insert-auto-fields): Set it and use it. Also, don't enter an identity if one was already entered manually. (mh-send-letter): Call `mh-insert-auto-fields' again when sending message. (mh-compose-and-send-mail): Call `mh-insert-auto-fields' _after_ `mh-letter-mode' so `mh-identity-local' doesn't get cleared by the mode invocation. 2003-06-01 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-thread-parse-scan-line): The value of mh-scan-field-from-start-offset was hardcoded in one place. The change fixes that. * mh-utils.el (mh-show-mode): Setup mh-show-mode to display elipsis for truncated header fields and to skip over them quickly. (mh-clean-msg-header): Make another pass over the message header fields truncating long headers. * mh-comp.el (mh-letter-complete): Remove unnecessary autoload. (mh-letter-toggle-header-field-display): Take into account that an empty line can also end the message header. The function was originally written with the draft buffer in mind. 2003-06-01 Mark D. Baushke * mh-comp.el (mh-letter-mode-map): Do not steal C-t. Use C-c C-t for the mh-letter-toggle-header-field-display command. 2003-05-31 Peter S Galbraith * mh-customize.el (mh-visible-headers): Changed to a defvar that will be set using new `mh-visible-headers' function using `mh-visible-header-fields' as input. (mh-visible-headers): New function, described above. (mh-visible-header-fields): New defcustom. The UI to set `mh-visible-headers'. (mh-invisible-header-fields-set): Deleted. Code merged into defcustom since it's so short. 2003-05-31 Satyaki Das * mh-comp.el (mh-letter-toggle-header-field-display): Extended to truncate headers if they are too long. (mh-letter-truncate-header-field): Make code that would be duplicated into a function. (mh-letter-hide-all-skipped-fields): Modified so that fields that are important are hidden if they are too long. 2003-05-31 Satyaki Das * mh-utils.el ("tool-bar"): Since tool-bar isn't available on XEmacs, requiring it causes problems. So load it instead. (mh-do-at-event-location): New macro to do stuff at location of events. This has been refactored out of mh-push-button. * mh-mime.el (mh-push-button): Simplified since it now uses the mh-do-at-event-location macro. * mh-comp.el (mh-hidden-header-keymap): Keymap to make mouse clicks on header toggle its display. (mh-letter-toggle-header-field-display-button): Interactive function to toggle header display when mouse button is clicked. 2003-05-31 Peter S Galbraith * mh-e.el (mh-folder-mode): Remove conditional on tool-bar-mode. * mh-comp.el (mh-letter-mode): Same. * mh-utils.el (mh-show-mode): Same. 2003-05-30 Satyaki Das * mh-utils.el (tool-bar): Load tool-bar explicitly. This avoids problems with incorrect initialization of tool-bar-map otherwise. 2003-05-30 Peter S Galbraith * mh-comp.el (mh-modify-header-field): Minor fix of spaces for when an entry already existed. (mh-insert-auto-fields): Make interactive. Add optional `quiet' arg for use when called systematically on every buffer. Won't be used interactively for more verbose output. (mh-letter-mode-map): Add \C-c\M-d keybinding for mh-insert-auto-fields. * mh-identity.el (mh-identity-make-menu): Add a menu entry in Identity menu for mh-insert-auto-fields. * mh-customize.el (mh-invisible-header-fields): Add entries for `Envelope-to' and `X-Original-To'. 2003-05-30 Satyaki Das * mh-comp.el (mh-letter-mode): Skip over invisible text quickly. 2003-05-30 Satyaki Das * mh-comp.el (mh-letter-mode): Use text properties to achieve invisibility. This is more portable and the same code can be used for all Emacs versions. (mh-letter-toggle-header-field-display): Rewritten to use text properties. (mh-dead-overlay-p, mh-letter-hidden-header-fields)): Removed. 2003-05-29 Satyaki Das * mh-comp.el (mh-letter-hidden-header-fields, mh-letter-mode): Add a hash table, initialized it in mh-letter-mode, to remember the overlays introduced to hide long headers fields. (mh-insert-x-mailer): checkdoc fix. (mh-compose-and-send-mail): Hide unimportant message header fields. (mh-letter-header-field-regexp, mh-letter-header-field-at-point) (mh-letter-next-header-field, mh-letter-previous-header-field): Add a variable that contains the header-field name regexp and use it instead of the regexp directly. (mh-letter-toggle-header-field-display, mh-letter-mode-map): Add new key binding in mh-letter-mode that toggles display of long header fields, in mh-letter-mode. (mh-dead-overlay-p): A predicate which checks if a given header field has an active overlay hiding it. (mh-letter-hide-all-skipped-fields): New function that shortens uninteresting headers. 2003-05-29 Eric Ding * mh-comp.el (mh-letter-next-header-field-or-indent): Call indent-relative rather than indent-for-tab-command. 2003-05-29 Satyaki Das * mh-comp.el (mh-letter-complete-or-space): The meaning of the customizable variable was reversed. Also make the doc string more accurate. 2003-05-28 Satyaki Das * mh-customize.el (mh-compose-skipped-header-fields): New customizable variable that lists headers that are skipped. (mh-compose-space-does-completion-flag): Option to do completion with space (closes SF #745634). * mh-comp.el (mh-insert-x-mailer): Check the value of mh-insert-x-mailer-flag in this function instead of in its caller. (mh-compose-and-send-mail, mh-send-letter): Insert X-Mailer and X-Face headers when the draft is first presented to the user instead of when the mail is sent (closes SF #745624). (mh-letter-complete-or-space): Allow for this key binding to be overridden. (mh-letter-next-header-field): Fix a problem with multiline header fields. (mh-letter-next-header-field, mh-letter-previous-header-field): Make these functions skip unwanted header fields. (mh-letter-skipped-header-field-p): New predicate that checks if a header field is to be skipped. * mh-seq.el (mh-thread-inc): Inc'ing email in threaded mode was causing duplication of the current notation. The change fixes that. 2003-05-28 Satyaki Das * mh-comp.el (mh-beginning-of-word): Generalize it to skip arbitrary number of words. (mh-letter-complete-or-space): New interactive function that allows space character to be used for completion. (mh-letter-mode-map): Add key binding to allow space to be used for completion. 2003-05-27 Satyaki Das * mh-customize.el (mh-compose-prompt-flag): Customizable variable that controls whether the user is prompted when composing a draft. It replaces mh-dont-prompt-for-address-flag (closes SF #745622). * mh-comp.el (mh-letter-next-header-field): If the point is in the header field name, then go the start of the header field instead of the next field. (mh-interactive-read-address, mh-interactive-read-string) (mh-letter-adjust-point): Use mh-compose-prompt-flag instead of mh-dont-prompt-for-address-flag. 2003-05-27 Satyaki Das * mh-customize.el (mh-tool-bar-define): Fix incorrect usage of set-specifier (closes SF #745655). Also the button enabling code interacts poorly with font-lock in XEmacs. So disable that. 2003-05-26 Satyaki Das * mh-e.el (mh-folder-from-address): The function message-fetch-field expects that the buffer is narrowed to the mail header. The change makes sure that this is indeed the case. * mh-mime.el (mh-add-missing-mime-version-header) (mh-decode-message-body): Same as above. 2003-05-25 Satyaki Das * mh-alias.el (mh-alias-minibuffer-confirm-address): Modified to use mh-beginning-of-word. * mh-comp.el (mh-letter-confirm-address): Calling mh-alias-reload-maybe can be expensive. So do it only if we really need to. 2003-05-25 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-letter-confirm-address): Load aliases if not yet loaded. * mh-alias.el (mh-alias-reload-maybe): Autoload it since it is used in mh-comp.el. 2003-05-24 Satyaki Das * mh-comp.el (mh-letter-skip-leading-whitespace-in-header-field): New function to skip leading space and tab characters when placing point in a header field. (mh-letter-next-header-field, mh-letter-previous-header-field): Skip leading whitespace when using TAB to navigate to header fields. (mh-letter-confirm-address): New interactive function that displays the last expansion of the last alias when "," is typed. (mh-letter-mode-map): Add key binding for "," (closes SF #745634). 2003-05-23 Satyaki Das * mh-comp.el (mh-edit-again, mh-forward, mh-send) (mh-send-other-window, mh-send-sub): Modified so that if mh-dont-prompt-for-address-flag is non-nil, then MH-E won't prompt for addresses to send mail to and instead directly jump to the draft (closes SF #745622). (mh-letter-complete-function-alist): An alist that is used to decide which completion function to use in which header. This variable should probably be customizable. (mh-letter-complete): Now uses mh-letter-complete-function-alist. (mh-letter-header-field-at-point, mh-letter-next-header-field) (mh-letter-next-header-field-or-indent) (mh-letter-previous-header-field): Commands for easier navigation to header fields. (mh-dont-prompt-for-address-flag): Variable which controls whether MH-E prompts for addresses. (mh-interactive-read-address, mh-interactive-read-string): Two functions to ask user for input depending on the value of the above flag. (mh-letter-adjust-point): New function that sets point to the first header field. (mh-letter-mode-map): Add key bindings for TAB and S-TAB (closes SF #745627). 2003-05-23 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-complete-word): New function which is approximately equivalent to mail-abbrev-complete-alias. (mh-beginning-of-word): Refactor repeated code into its own function. (mh-folder-expand-at-point): Make Fcc completion work in XEmacs by not using mail-abbrev-complete-alias. * mh-alias.el (mh-alias-letter-expand-alias): Make alias expansion work in XEmacs. Replace the use of the function mail-abbrev-complete-alias, which isn't present in XEmacs. * mh-mime.el (mh-mml-to-mime): If a MIME message is created immediately after starting MH-E then invoking mh-mml-to-mime causes an error because "message" isn't being loaded. The change works around this problem. (mh-mime-maybe-display-alternatives): Give better indication of which MIME parts are alternatives. 2003-05-22 Satyaki Das * mh-e.el (mh-add-sequence-notation, mh-remove-sequence-notation): Just delete and add the same character in the scan line to make font-lock refontify it. The previous trick of removing all text properties didn't work in XEmacs. * mh-seq.el (mh-put-msg-in-seq): Complain if the user tries to create an invalid MH sequence. * mh-mime.el (mh-mime-display-alternative): Modified to optionally display alternatives as buttons. (mh-mime-maybe-display-alternatives): New function which displays alternative MIME parts as buttons. (mh-mime-save-part): Initially mh-mime-save-parts-directory is nil and calling file-name-as-directory with nil arg leads to an error. So fall back on the default-directory in that case. * mh-customize.el (mh-display-buttons-for-alternatives-flag): New customizable variable that controls display of the alternative MIME parts (closes SF #741288). 2003-05-22 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields): Commented out "User-Agent:". It's similar to X-Mailer, so display it. 2003-05-21 Satyaki Das * mh-customize.el (mh-tool-bar-define): Add an optional argument to the button description that can dynamically enable/disable buttons. (mh-tool-bar-define): The alias grabbing button is disabled if the current message doesn't have a From header or if the sender is already in the user's alias. This functionality was inadvertently lost when the Emacs/XEmacs toolbar unification took place. 2003-05-20 Satyaki Das * mh-unit.el (mh-unit-construct-call-graph): Be more aggressive and flag interactive functions that aren't autoloaded or have no key bindings. (mh-unit-interactive-function-p): Remove now unused function. (mh-unit, mh-unit-construct-call-graph): Replace mh-files with mh-unit-files. 2003-05-20 Bill Wohler * mh-unit.el (mh-prune-trailing-spaces): Renamed to mh-unit-prune-trailing-spaces to clean up the namespace. (mh-files): Renamed to mh-unit-files. Ditto. (mh-unit): Checkdoc fix. * mh-index.el (mh-index-p): Added autoload cookie since mh-index-p is used by mh-customize.el. This calls for another mh-unit test that looks for mh-autoloads for functions that are no longer used in other files. * mh-loaddefs.el: Regenerated. 2003-05-20 Satyaki Das * mh-unit.el (mh-unit-construct-call-graph): Factor out the code to read the lisp files to a separate function. Also change it to construct a function call-graph. Autoloaded functions are taken into account. (mh-unit-find-all-used-functions, mh-unit-called-functions) (mh-unit-find-all-unused-functions): Find all unused functions by computing a fixed point starting from the set of top level functions. (mh-unit-analyze-block): Removed. (mh-unit-update-call-graph): mh-unit-functions-called was renamed with modifications to update the function call graph. 2003-05-19 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-notate): Modified to keep track of notation that was replaced when sequence notation is added. Thus when the sequence is deleted, the original notation is recovered. (mh-add-msgs-to-seq): Modified to work with the new sequence notation code. * mh-seq.el (mh-delete-seq, mh-put-msg-in-seq): Simplified since we don't need to handle tick and unseen sequences specially any more. (mh-narrow-to-seq): Don't need to call mh-notate-user-sequences since mh-copy-seq-to-eob already does that. (mh-widen): Remove sequence notation, so that notation when messages are replied to aren't lost. (mh-copy-seq-to-eob): Simplified with the use of mh-iterate-on-range. (mh-thread-inc): This function doesn't need to notate user sequences since its callers already do that. (mh-thread-parse-scan-line): Simplified since mh-note-seq doesn't appear in scan lines it is given as arguments. (mh-thread-update-scan-line-map): Remove the test, since its caller already does the required check. (mh-thread-folder): Simplified by the use of mh-iterate-on-range. (mh-tick-add-overlay, mh-tick-remove-overlay, mh-notate-tick): These functions aren't needed any more, since overlays aren't used any more. Also overlays aren't portable to XEmacs, so nasty conditional code that used overlays in Emacs and extents in XEmacs have been eliminated. (mh-toggle-tick): Generalize it to work on a range of messages like the other interactive messages. * mh-funcs.el (mh-undo-folder): Use mh-remove-all-notation instead of mh-unmark-all-headers. * mh-e.el (mh-folder-font-lock-keywords): The entry for unseen sequence highlighting is now done by the macro. (mh-generate-sequence-font-lock): New macro to highlight any arbitrary sequence. This macro is invoked twice to get the highlighting for unseen and tick sequences. (mh-sequence-notation-history, mh-folder-mode): New variable that keeps track of the old notation when a message is notated with mh-note-seq. (mh-regenerate-headers, mh-get-new-mail): Add appropriate calls to mh-notate-user-sequences and mh-remove-all-notation. (mh-unmark-all-headers): Add comment that this function shouldn't be used any more. (mh-add-sequence-notation, mh-remove-sequence-notation): New functions to notate message with mh-note-seq and to remove it. (mh-remove-all-notation): Simplified to use mh-iterate-on-range. (mh-process-commands): Use mh-remove-all-notation instead of mh-unmark-all-headers. (mh-notate-user-sequences, mh-delete-msg-from-seq): Simplified since the tick and unseen sequences don't need special handling any more. (mh-internal-seq): Make it possible to dynamically change what sequences are treated as internal (internal means font lock is used to highlight the sequence). (mh-clear-text-properties): Removed since it isn't needed anymore. 2003-05-19 Satyaki Das * mh-unit.el (mh-unit-analyze-block, mh-unit-interactive-function-p) (mh-unit-find-all-unused-functions): Change argument name bl to block. 2003-05-19 Satyaki Das * mh-unit.el (mh-unit-find-all-unused-functions): New interactive function to find all unused functions in MH-E. (mh-unit-analyze-block, mh-unit-interactive-function-p) (mh-unit-functions-called): Functions used by mh-unit-find-all-unused-functions do its job. * Makefile (compile): Byte-compile mh-unit.el, since the analysis to find unused code runs faster when compiled. 2003-05-18 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-notate-deleted-and-refiled): Add autoload declaration since this function is used in mh-index.el. * mh-e.el, mh-customize.el, mh-utils.el: Adjust require/provide statements so that mh-e.el isn't loaded twice. 2003-05-15 Satyaki Das * mh-utils.el (mh-defun-show-buffer): Arrange for the current line in the folder buffer to be highlighted even when we are in the show buffer. 2003-05-14 Satyaki Das * mh-seq.el (mh-read-range): Allow this to work on invalid sequences that only MH-E knows about. * mh-index.el (mh-create-sequence-map, mh-index-add-to-sequence) (mh-index-delete-from-sequence): Don't consider sequences that aren't valid MH sequences. * mh-e.el (mh-valid-seq-p): New predicate to check if a symbol could be a MH sequence. (mh-undefine-sequence, mh-define-sequence): Don't execute "mark" unless the sequence name is a valid MH sequence. * mh-utils.el (mh-exec-cmd): In case an error happens in the call-process and non-strings are present in ARGS, then the error message isn't properly displayed. The change fixes this. 2003-05-14 Peter S Galbraith * mh-mime.el (mh-mime-save-part): Bug Fix: Make sure `mm-default-directory' gets a trailing "/" if `mh-mime-save-parts-directory' doesn't have one. Otherwise the default in the prompt of `mh-mm-save-part' will be wrong. Perhaps `mh-mm-save-part' needs to do this check itself. 2003-05-14 Satyaki Das * mh-index.el (mh-unpropagated-sequences): New function and variable to keep track of sequences that shouldn't be propagated. (mh-create-sequence-map, mh-index-add-to-sequence) (mh-index-delete-from-sequence): Use mh-unpropagated-sequences to stop changes to some sequences being reflected back to the source folders. 2003-05-13 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-e.el (mh-process-commands): Preserve sequences when messages are refiled (closes SF #737128). * mh-index.el (mh-create-sequence-map) (mh-index-create-sequences): Refactor code that is reused into a new function. * mh-customize.el (mh-refile-preserves-sequences-flag): New customizable flag that controls whether sequences are preserved when messages are refiled. 2003-05-13 Eric Ding * mh-e.el (mh-scan-format): The argument for scan format files should be -form, not -format. 2003-05-13 Satyaki Das * mh-seq.el (mh-widen): The scan line map stack was not being properly updated when ALL-FLAG is non-nil. The change fixes that. * mh-e.el (mh-reset-threads-and-narrowing): The change resets the scan line map stack. 2003-05-12 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-thread-scan-line-map-stack) (mh-thread-old-scan-line-map): Instead of the old scan line map, now we need to maintain a stack of scan line maps. (mh-narrow-to-seq): Modified so that multiple level of narrowings can be done. We now maintain a stack of old views instead of hiding the old scan lines. This makes it possible to have multiple levels of narrowings. (mh-widen): A optional prefix arg was added to allow undoing all narrowing. (mh-read-seq-default, mh-read-range): Don't use mh-narrowed-to-seq, since it doesn't exist any more. (mh-thread-initialize-hash, mh-thread-initialize): The mh-thread-initialize function has been refactored. (mh-thread-update-scan-line-map): Maintain notations in the stack of scan line maps. (mh-notate-tick, mh-toggle-tick): Simplified, since we don't have mh-narrowed-to-seq any more. This means there is a slight loss of functionality. Earlier if we narrowed to the tick sequence the ticked messages weren't highlighted. This feature isn't present any more. * mh-e.el (mh-execute-commands, mh-reset-threads-and-narrowing) (mh-folder-sequence-menu, mh-get-new-mail): Use mh-folder-view-stack instead of the now removed mh-narrowed-to-seq. (mh-narrowed-to-seq, mh-tick-seq-changed-when-narrowed-flag): These variables have been removed. (mh-folder-view-stack): New variable to keep track of a stack of narrowings. (mh-execute-commands, mh-get-new-mail): Add extra argument to mh-widen so that all narrowings are undone. * Makefile (MH-E-SRC, MH-E-OTHERS): Move mh-gnus.el from MH-E-SRC to MH-E-OTHERS so that it isn't byte compiled. 2003-05-10 Satyaki Das * mh-seq.el (mh-read-seq): Improve the function a bit by adding history to the sequence prompt. 2003-05-09 Satyaki Das * mh-gnus.el: New file that won't be byte-compiled. From now on having different Gnus versions at run-time and compile-time won't cause errors in MH-E. * mh-mime.el (mh-small-show-buffer-p, mh-display-smileys) (mh-display-emphasis): Handle all legal values of font-lock-maximum-size. The existing code assumed didn't consider the case where it could be an alist. (mh-small-image-p): Simplified, so that aliasing XEmacs functions in Emacs isn't necessary any more. (mh-mm-display-part): Remove unnecessary call to fboundp. The mh-funcall-if-exists does that for us any way. (mh-defun-compat, gnus-local-map-property, mm-merge-handles) (mm-set-handle-multipart-parameter, mm-readable-p) (mm-long-lines-p, mm-keep-viewer-alive-p, mm-destroy-parts) (mh-mm-save-part, mm-handle-multipart-ctl-parameter): These compatibility functions have been moved to mh-gnus.el. * Makefile (MH-E-SRC): Add mh-gnus.el. * mh-seq.el (mh-narrow-to-header-field) (mh-current-message-header-field): Checkdoc fixes. * mh-e.el (mh-undefine-sequence): Since mh-coalesce-msg-list returns a list, apply is needed. 2003-05-09 Noel Cragg (tiny change) * mh-junk.el (mh-spamassassin-blacklist): Separate "--local" and "--no-rebuild" arguments to call-process. [Patch committed by satyaki] 2003-05-08 Satyaki Das * mh-seq.el (mh-translate-range): Take into account different semantics of split-string in Emacs and XEmacs. (mh-read-pick-regexp, mh-narrow-to-from, mh-narrow-to-cc) (mh-narrow-to-to, mh-narrow-to-header-field) (mh-current-message-header-field, mh-narrow-to-range): New narrowing functions that can select messages based on different message headers. * mh-utils.el (mh-show-limit-map): Add new narrowing functions callable from the show buffer. * mh-e.el (mh-help-messages): Add help text for new functions. (mh-limit-map): Add new narrowing functions (closes SF #732823). 2003-05-07 Satyaki Das * mh-utils.el (mh-collect-folder-names): Use mh-exec-daemon to run flists. This means we don't have to remember to expand the MH executable in the mh-progs path. (mh-exec-cmd-daemon): Return the new process object produced. 2003-05-06 Satyaki Das * mh-e.el (mh-folder-font-lock-unseen): Use mh-seq-list to do unseen sequence highlighting instead of reading the .mh_sequences file from disk every time. 2003-05-05 Satyaki Das * mh-utils.el (mh-show-sequence-map): Add key binding for S' (closes SF #732825). * mh-e.el (mh-sequence-map): Ditto. (mh-help-messages): Updated for S'. 2003-05-04 Satyaki Das * mh-index.el (mh-index-write-data): The with-temp-buffer macro is a bit better than write-file, so use that instead. 2003-05-03 Satyaki Das * mh-index.el (mh-index-update-maps, mh-index-search) (mh-index-sequenced-messages): Write index data to disk. This allows us to recover index folder information if Emacs is restarted, or the index folder is visited after the buffer has been killed (closes SF #701762). (mh-index-write-data, mh-index-read-data) (mh-index-write-hashtable, mh-index-read-hashtable): Functions to store and read index data information to disk. (mh-index-insert-folder-headers, mh-index-group-by-folder): We can no longer use object identity to compare strings, since they might have been read back from disk. * mh-e.el (mh-index-data-file): New variable that stores the name of the file that keeps track of index folder data. (mh-make-folder): Read index folder data if available. * mh-utils.el (mh-show, mh-summary-height, mh-modify): Make checkdoc happy. * mh-seq.el (mh-tick-add-overlay): Rearrange code to make code more uniform. * mh-loaddefs.el: Regenerated. 2003-05-02 Satyaki Das * mh-seq.el (mh-tick-add-overlay): If a message with a short scan line is ticked, then the highlighting didn't extend to the right margin. This change fixes that. 2003-05-01 Bill Wohler * mh-e.el (mh-help-messages): Added brackets around / and downcased limit to be consistent with other commands with punctuation keybindings. Don't document aliases. 2003-05-01 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-read-range): Fix comment. 2003-04-30 Mark D. Baushke * mh-e.el (mh-help-messages): Better documentation for the F map. 2003-04-30 Satyaki Das * mh-utils.el (mh-find-path): Cache folder names so that folder name completion is always fast. (mh-flists-partial-line, mh-flists-process): Variables used for pre-caching folder names. (mh-collect-folder-names, mh-collect-folder-names-filter) (mh-populate-sub-folders-cache): Functions to pre-cache folder names. (mh-exec-cmd): Produce more info in *MH-E Log*. * mh-index.el (mh-index-search): Call the correct function. (mh-index-sequenced-messages): If folders is nil, then all mail is searched. The change restores that. 2003-04-30 Peter S Galbraith * mh-customize.el (mh-summary-height): Move variable integer out of defcustom, and instead specify that `nil' means to calculate that size dynamically. Fixes SF #723267. * mh-utils.el (mh-summary-height): New function. Return ideal mh-summary-height value for current frame height. (mh-show-msg): Use it. 2003-04-30 Mark D. Baushke * mh-index.el (mh-index-ticked-messages): Fix prompt and description string. (mh-index-new-messages): Ditto. * mh-loaddefs.el: Regenerated. * mh-index.el (mh-index-sequenced-messages): Renamed from mh-index-new-messages with minor argument change. (mh-index-new-messages): Implement by calling mh-index-sequenced-messages with the appropriate arguments. (mh-index-ticked-messages): New function. Does the same thing as mh-index-new-messages, but on its own set of folders and using the mh-tick-seq instead of mh-unseen-seq. * mh-e.el (mh-folder-map): Add "F'" to the map for mh-index-ticked-messages. (mh-help-messages): Replace broken [t]hread with [n]ew messages. * mh-customize.el (mh-index-ticked-messages-folders): New user customizable flag that controls the folders to be searched by mh-index-ticked-messages. * mh-utils.el (mh-show-index-ticked-messages): Wrapper for mh-index-ticked-messages. (mh-show-folder-map): Add "F'" to the map for mh-index-ticked-messages. 2003-04-30 Satyaki Das * mh-index.el (mh-index-search): The old cur in the source folder might not exist. This could cause mh-exec-cmd to fail. So don't add an error message in that case. 2003-04-29 Satyaki Das * mh-e.el (mh-folder-from-address): Modified to allow multiple Cc: headers to work properly. (mh-inc-folder, mh-visit-folder): Fix an off by one error. * mh-utils.el (mh-notate): Update the scan line map. This fixes a tiny bug. In threaded view, if a message is replied to then the message is notated with a "-". Now if inc is done then the "-" added is lost. The change fixes this. * mh-seq.el (mh-translate-range): Use the correct function. (mh-thread-update-scan-line-map): New function that updates the scan line map when a message is notated. 2003-04-28 Satyaki Das * mh-index.el (mh-index-parse-search-regexp): Avoid compiler warning in GNU Emacs 21.3. * mh-seq.el (mh-widen): Ditto. 2003-04-28 Satyaki Das * mh-customize.el (mh-interpret-number-as-range-flag): New user customizable flag that controls whether a single number, N is interpreted as the range last:N. * mh-seq.el (mh-read-range): Generalize it for use when reading range to scan. (mh-interactive-range): Modified to use the new mh-read-range. * mh-speed.el (mh-speed-view): Use mh-read-range instead of the now removed mh-read-msg-range function. * mh-funcs.el (mh-pack-folder): Ditto. * mh-e.el (mh-rescan-folder, mh-visit-folder): Ditto. (mh-read-msg-range): Removed. * mh-loaddefs.el: Regenerated 2003-04-27 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-range-completion-function): Fix checkdoc warning. (mh-iterate-on-range): Mention that the macro can iterate over a MH message range too. 2003-04-27 Bill Wohler * mh-unit.el (mh-unit): As it turns out, lm-crack-copyright has been updated to handle multiple-line copyrights in 21.3, so updated code to run lm-verify only if user has 21.3 or greater. Delete buffers after use, unless user already had buffer open. 2003-04-27 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-index.el (mh-index-search): The MH command "refile" changes cur. The change restores cur in source folders. (mh-index-new-messages): Use the appropriate arguments for mh-read-seq. * mh-seq.el (mh-read-seq-default, mh-read-seq): Restore these functions to just read sequence names. (mh-range-seq-names, mh-range-history, mh-range-completion-map) (mh-range-completion-function, mh-read-range): New function which reads MH range with completion and history. (mh-interactive-range): Use mh-read-range instead of mh-read-seq-default. (mh-put-msg-in-seq): Change documentation about MH message range. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Change documentation about MH message range. * mh-funcs.el (mh-copy-msg, mh-print-msg): Ditto. * mh-e.el (mh-delete-msg, mh-delete-msg-no-motion) (mh-refile-msg, mh-undo, mh-delete-msg-from-seq): Ditto. * mh-comp.el (mh-forward): Ditto. 2003-04-26 Satyaki Das * mh-comp.el, mh-e.el, mh-funcs.el, mh-junk.el, mh-seq.el: Replace msg-or-seq with range everywhere. * mh-loaddefs.el: Regenerated. 2003-04-25 Satyaki Das * mh-e.el (mh-index-sequence-search-flag, mh-folder-mode): New local variable to remember that a folder buffer contains results from a sequence search. This is needed so that "C-u F i" will work as expected. (mh-visit-folder): Create sequences in the index folder. (mh-process-commands, mh-delete-msg-from-seq): If speedbar is on then update the speedbar message counts immediately. (mh-delete-msg-from-seq): Make the code faster by calling "mark" just once. Also update source folder sequence if messages are being deleted from a sequence in an index folder. (mh-undefine-sequence): Simplified to remove the speedbar updating code. Also DTRT and don't change any sequence when called with an empty list of messages. (mh-refile-msg, mh-delete-msg): Move to next message only if the current message has been deleted or refiled, as the case may be. * mh-utils.el (mh-show-msg): Update the message counts in the speedbar, if it is on, immediately. (mh-speed-flists-active-p, mh-speed-flists-inhibit-flag): A new flag has been added which inhibits updating of the speedbar. This is used to avoid needless speedbar updates when mh-execute-commands is called in index folders. * mh-speed.el (mh-speed-flists): Extended so that multiple folders can be given as arguments. Also the code that kept track of the current folder, needed since flists adds an extra ?+ char at the end of the current folder name, wasn't entirely correct. That has also been fixed. * mh-seq.el (mh-delete-seq, mh-put-msg-in-seq): Modified so that sequence in source folder is updated if we delete a sequence in an index folder. (mh-read-seq, mh-read-seq-default, mh-translate-range) (mh-interactive-msg-or-seq): The mh-interactive-msg-or-seq function can read in an arbitrary MH message range. (mh-iterate-on-msg-or-seq): The macro has been extended to work on a MH range. (mh-subject-to-sequence, mh-subject-to-sequence-unthreaded) (mh-subject-to-sequence-threaded, mh-thread-find-msg-subject): Fix the mh-subject-to-sequence function so that it will work in threaded folders too. (mh-tick-add-overlay): Fix a leak of overlays. (mh-toggle-tick): Ticking, or unticking, messages in the index folder is propagated to the source folders (closes SF #709664). * mh-index.el (mh-flists-results-folder, mh-flists-sequence) (mh-flists-called-flag): New variables to implement searching for arbitrary sequences. (mh-index-generate-pretty-name): Updated so that folder names are generated for flists search that can take any sequence name. (mh-index-search): Since sequences are now properly maintained the unseen-flag argument isn't needed and hence removed. Also redoing a sequence search with "C-u F i" is handled correctly. Finally the speedbar is updated to reflect the new index folder created. (mh-index-create-sequences): New function that creates sequences in the index folder. (mh-index-matching-source-msgs, mh-index-execute-commands): Improved so that scan lines for refiled/deleted messages are removed from the source folders as well. (mh-index-add-to-sequence, mh-index-delete-from-sequence): New functions to update sequences in source folder to reflect changes in index folder. (mh-index-quote-for-shell): A utility function to that quotes characters with special meaning to /bin/sh. (mh-flists-execute, mh-index-new-messages): Updated to search for arbitrary sequences (closes SF #718833). * mh-loaddefs.el: Regenerated. 2003-04-25 Bill Wohler * mh-customize.el (mh-kill-folder-suppress-prompt-hook): New hook used by mh-kill-folder to suppress the prompt. * mh-funcs.el (mh-kill-folder): Suppress prompt not if mh-index-data is non-nil, but if any functions in mh-kill-folder-suppress-prompt-hook return non-nil. * mh-index.el (mh-index-p): New function with returns non-nil if the current folder was generated by an index search for use by mh-kill-folder-suppress-prompt-hook * mh-unit.el (mh-unit): Commented out lm-verify step until code updated to handle split Copyright lines. * mh-e.el (mh-version): Set to 7.3+cvs. 2003-04-24 Bill Wohler Released MH-E version 7.3. * MH-E-NEWS, README: Updated for release 7.3. * mh-e.el (Version, mh-version): Updated for release 7.3. 2003-04-24 Satyaki Das * mh-xemacs-compat.el (mh-utils): Require mh-utils at compile time, since the mh-do-in-xemacs macro is used. * mh-inc.el (cl): Require cl at compile time since we are using the loop and setf macros. 2003-04-24 Satyaki Das * mh-unit.el (mh-files): Fix the list of files to check. 2003-04-24 Bill Wohler * ChangeLog: Appended copyright to end of file. * Makefile: Added copyright and license. * README: Added copyright. * import-emacs: Changed copyright from Newt Software to Bill Wohler and use license from mh-e.el, except that this file is a part of MH-E, not GNU Emacs. * mh-alias.el: Updated copyright so that it doesn't wrap upon advice from Richard Stallman who said to use two-digit years when they are surrounded by 4-digit years that are in the same century and to break up copyrights on multiple lines. * mh-comp.el: Ditto. * mh-e.el: Ditto. * mh-funcs.el: Ditto. * mh-identity.el: Ditto. * mh-mime.el: Ditto. * mh-seq.el: Ditto. * mh-utils.el: Ditto. * mh-xemacs-compat.el: Ditto. * mh-unit.el: New file. Unit tests for MH-E. This version merely runs checkdoc and lm-verify which is useful before releasing the software. It can and should be expanded to do real unit tests. 2003-04-22 Mark D Baushke * mh-alias.el: Update Copyright. * mh-comp.el: Ditto. * mh-customize.el: Ditto. * mh-e.el: Ditto. * mh-funcs.el: Ditto. * mh-identity.el: Ditto. * mh-index.el: Ditto. * mh-mime.el: Ditto. * mh-pick.el: Ditto. * mh-seq.el: Ditto. * mh-speed.el: Ditto. * mh-utils.el: Ditto. * mh-xemacs-compat.el: Ditto. 2003-04-22 Satyaki Das * mh-utils.el (mh-normalize-folder-name): Make the completion code work properly with XEmacs. This change is neeeded since split-string behaves differently in XEmacs than it does in GNU Emacs. (mh-exec-cmd-error): Add a comment, so that we change it later on. 2003-04-18 Steve Youngs * mh-xemacs-icons.el (mh-xemacs-icons): Provide 'mh-xemacs-icons' not 'mh-xemacs-toolbar'. * mh-xemacs-compat.el (mh-xemacs-toolbar): Remove require, it's now called 'mh-xemacs-icons' and it is required from 'mh-customize'. * mh-customize.el: Require 'mh-xemacs-icons' instead of 'mh-xemacs-toolbar'. 2003-04-17 Peter S Galbraith * mh-xemacs-icons.el: New file (renamed from mh-xemacs-toolbar.el). Holds XEmacs icons. * mh-xemacs-toolbar.el: Deleted. * Makefile: Incorporate the file renaming. 2003-04-15 Bill Wohler * mh-comp.el (mh-forward): Pass a list of messages into mh-compose-and-send-mail instead of msg-or-seq. (mh-annotate-msg): The previous version called mh-iterate-on-msg-or-seq in the letter buffer. The new version simply adds the ability to operate on message lists. Thanks to Satyaki for the fix and suggestion for passing a list from mh-forward. 2003-04-14 Bill Wohler * mh-comp.el (mh-annotate-msg): Updated to handle msg-or-seq for mh-forward was passing a msg-or-seq to mh-compose-and-send-mail which in turn passed the msg-or-seq to mh-annotate-msg. In particular, forwarding a region failed. Note that the msgs argument in much of mh-comp.el should really be converted to msg-or-seq accordingly. But not now, unless something is broken as was the case here. We can revamp after the release. 2003-04-13 Bill Wohler * mh-funcs.el (mh-kill-folder): Added space after prompt to give the (yes or no) bit a little elbow room. * mh-xemacs-toolbar.el: Removing a copyright is a no-no. Reinstated Steve's copyright. 2003-04-12 Satyaki Das * mh-utils.el (mh-do-in-gnu-emacs, mh-do-in-xemacs): Add indentation hooks for the macros. 2003-04-11 Bill Wohler * mh-alias.el, mh-comp.el, mh-customize.el, mh-funcs.el, mh-identity.el, mh-inc.el, mh-index.el, mh-junk.el, mh-utils.el: Merged in changes from CVS GNU Emacs. These included the removal of trailing whitespace. * mh-customize.el: The "anti-entropy" check-in. Moved groups around slightly to reflect commentary. Moved defcustoms around to preserve alphabetization. Big diff, little content. (mh-xemacs-use-toolbar-flag): Doc fix. (mh-xemacs-toolbar-position): Fixed typo in docstring. (mh-default-folder-list): Updated docstring to reflect new Check Recipient tag. Also, set type of Address to regexp. (mh-x-mailer-string): Moved to mh-comp.el where it is used. * mh-comp.el (mh-x-mailer-string): Moved here from customize.el. Not quite sure how it got to mh-customize.el in the first place. * mh-e.el (mh-folder-folder-menu): Added Folder -> View New Messages menu item. * mh-utils.el (mh-show-folder-menu): Ditto. * mh-inc.el: Added Change Log comment (lm-verify fix). * mh-index.el (mh-index-search): Added documentation about prefix argument for users, in addition to documentation for programmers. * mh-mime.el (mh-edit-mhn, mh-edit-mhn, mh-mml-to-mime): Docstring fixes germaine to the change whereby we now check for MIME directives before sending. * mh-xemacs-toolbar.el: Fixed copyright. Added Change Log comment. (lm-verify fix). Added standard MH-E local variables. Removed time-stamp stuff. 2003-04-11 Satyaki Das * mh-seq.el (mh-iterate-on-msg-or-seq): Add a missed comma. 2003-04-10 Satyaki Das * mh-index.el (mh-index-visit-folder): Prompt before reusing existing folder buffer. * mh-xemacs-toolbar.el (require): Require mh-utils at compile time to avoid compilation error when doing "make bootstrap" in CVS Emacs. * mh-inc.el (mh-inc-spool-list): Declare it so that a compile time warning is avoided when doing "make bootstrap" in CVS Emacs. 2003-04-10 Peter S Galbraith * mh-inc.el (mh-inc-spool-generator): Changed to a defun instead of a defmacro, applying Satyaki's patch. (mh-inc-spool-def-key): same. (mh-inc-spool-make): same. * mh-utils.el: define-key "I" in mh-show-mode-map for mh-inc-spool-map. * mh-comp.el (mh-modify-header-field): Remove debug message. 2003-04-10 Peter S Galbraith * mh-inc.el (mh-inc-spool-map-help): Default to nil. (mh-inc-spool-map): Make "?" key display message when `mh-inc-spool-map-help' is nil (instead of mh-inc-spool-map-help containing the message). * mh-e.el: require mh-inc.el * mh-e.el: define-key "I" in mh-folder-mode-map for mh-inc-spool-map. (mh-help-messages): Add help string for "I" key. 2003-04-09 Peter S Galbraith * mh-inc.el: New file. New feature to `inc' mail from various spool files into different folders. * mh-loaddefs.el: Regenerate for mh-inc's mh-inc-spool-list-set. * Makefile (MH-E-IMG): Add highlight icon. (MH-E-SRC): Add mh-inc.el file. * mh-customize.el (mh-inc-spool-list): New variable for new feature to `inc' mail from various spool files into different folders. 2003-04-09 Satyaki Das * mh-utils.el (mh-mail-delivery-buffer): Add a defconst for mh-mail-delivery-buffer. * mh-comp.el (mh-send-letter): Use mh-mail-delivery-buffer. * mh-mime.el (mh-small-image-p): Add mh-funcall-if-exists to avoid compiler warning in GNU Emacs. 2003-04-08 Satyaki Das * mh-mime.el (mh-small-image-p): Make the function slightly more error-resistant in XEmacs. * mh-seq.el (mh-narrow-to-seq, mh-widen): Update tool-bar-map in the show buffer if needed. This allows us to display the widen button in the show buffer only when the folder is narrowed. * mh-customize.el (mh-tool-bar-define): Changed so that a separate tool-bar-map is used in show-mode when folder is narrowed to a sequence. 2003-04-08 Satyaki Das * mh-seq.el (mh-iterate-on-msg-or-seq): Reinstate the use of make-symbol since using gensym causes compiler warnings in CVS Emacs. 2003-04-08 Bill Wohler * mh-comp.el (mh-forward): Function didn't handle a region of messages. Use new function mh-msg-or-seq-to-msg-list to get a list of messages in all circumstances. Also, use mh-coalesce-msg-list on message list before submitting to forw since this should always be done when calling a program to reduce the chance of exceeding command-line limits. * mh-seq.el (mh-iterate-on-msg-or-seq): Backed out previous change. A nil msg-or-seq should mean no messages, and Satyaki is going to use gensym instead of make-symbol. (mh-msg-or-seq-to-msg-list): New function to convert a msg-or-seq to a list of message numbers. * mh-e.el (mh-coalesce-msg-list): Touched up the docstring a little. * mh-funcs.el (mh-print-msg): Can now print regions, message lists, sequences and, of course, single messages. This version works a little differently from the old version. Instead of calling mhl | lpr once on all messages, mhl | lpr is called once per message in order to put each message's number in the header. Thanks to Satyaki for some code and ideas. * mh-seq.el (mh-iterate-on-msg-or-seq): The argument msg-or-seq can now be nil which means the current message. Make local symbols so that local variables don't step on user's symbols (the msgs symbol got me). 2003-04-06 Bill Wohler * mh-comp.el (mh-forward): Updated docstrings to indicate that a list of messages is acceptable as well. * mh-e.el (mh-delete-msg, mh-delete-msg-no-motion, mh-refile-msg) (mh-undo, mh-notate-user-sequences, mh-delete-msg-from-seq): Ditto. * mh-funcs.el (mh-copy-msg, mh-print-msg): Ditto. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Ditto. * mh-seq.el (mh-put-msg-in-seq, mh-iterate-on-msg-or-seq) (mh-interactive-msg-or-seq): Ditto. 2003-04-06 Satyaki Das * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Call mh-refile-a-msg and mh-delete-a-msg with nil as the message number since that is more efficient. * mh-seq.el (mh-iterate-on-msg-or-seq): Extended so that it will handle lists of messages numbers as well. (mh-put-msg-in-seq): Use mh-iterate-on-msg-or-seq to simplify the function. * mh-funcs.el (mh-copy-msg): Same as above. * mh-e.el (mh-refile-msg): Make it more efficient. Using nil in mh-refile-a-msg avoids needing to re-search-forward to that message. (mh-undo): Fix typo in interactive spec. (mh-notate-user-sequences): Generalize the function to take a msg-or-seq as argument. (mh-delete-msg-from-seq): Extend the function so that it is now able to subtract messages belonging in one sequence from another. (mh-undo): Unify the region and sequence handling. The message number branch of the function does extra stuff, so we can't merge that in. 2003-04-06 Bill Wohler * mh-comp.el (mh-forward): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. (mh-reply): Don't mention default in opening line in all docstrings. * mh-e.el (mh-delete-msg, mh-refile-msg) (mh-undo, mh-delete-msg-from-seq): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. In mh-delete-msg-from-seq, renamed msg-or-region to msg-or-seq. * mh-funcs.el (mh-copy-msg, mh-print-msg): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Inserted consistent verbiage in docstring for msg-or-seq. * mh-seq.el (mh-msg-is-in-seq): Don't mention default in opening line in all docstrings. (mh-put-msg-in-seq): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. * mh-e.el (mh-delete-msg, mh-delete-msg-no-motion, mh-refile-msg): Rewritten to use new mh-interactive-msg-or-seq function and mh-iterate-on-msg-or-seq macro. mh-delete-msg-no-motion gained the ability to operate on regions. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Rewritten to use new mh-interactive-msg-or-seq function and mh-iterate-on-msg-or-seq macro thereby gaining the ability to operate on sequences or regions. * mh-seq.el (mh-iterate-on-msg-or-seq): New macro to execute code on a message, a region of messages, or a sequence. This macro should be in all functions that operate on messages to provide a uniform interface. (mh-interactive-msg-or-seq): New function used in interactive calls to obtain a message number, region, or sequence. This function should be in all functions that operate on messages to provide a uniform interface. * mh-utils.el (with-mh-folder-updating, mh-in-show-buffer): Use 'defun lisp-indent-hook property instead of 1 to fix indentation of these macros. 2003-04-05 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-funcs.el (mh-ephem-message): autoload. 2003-04-04 Peter S Galbraith * mh-e.el (mh-folder-from-address): Minor Fix. Wrong ending of `when' block. 2003-04-04 Satyaki Das * mh-mime.el (mh-mml-directive-present-p): The regexp has been modified to recognize directives to encrypt/sign messages. 2003-04-03 Mark D. Baushke * mh-e.el (mh-folder-from-address): E-mail messages missing the To: field, but which have a Cc: field should also be handled. 2003-04-03 Bill Wohler * mh-e.el (mh-inc-folder): Modified the prompt text to read better. * mh-comp.el (mh-forward): Deleted local variable `compose'. Deleted obsolete setting of mh-{mmh|mml}-compose-insert-flag. (mh-letter-menu): Use mh-{mmh|mml}-directive-present-p instead of obsolete. mh-{mmh|mml}-compose-insert-flag. (mh-letter-mode): Deleted obsolete setting of mh-{mmh|mml}-compose-insert-flag. (mh-send-letter): This function now automatically runs the directive-to-MIME conversion if any directives are detected, rather than relying on the unreliable mh-{mmh|mml}-compose-insert-flag variables. Updated docstring accordingly. * mh-identity.el (mh-insert-identity): Use mh-{mmh|mml}-directive-present-p instead of obsolete. mh-{mmh|mml}-compose-insert-flag. * mh-loaddefs.el: Regenerated. * mh-mime.el (mh-mhn-compose-type, mh-mhn-compose-external-type) (mh-mhn-compose-forw, mh-edit-mhn, mh-mml-to-mime) (mh-mml-forward-message, mh-mml-attach-file) (mh-mml-secure-message-sign-pgpmime) (mh-mml-secure-message-encrypt-pgpmime): Deleted obsolete setting of mh-{mmh|mml}-compose-insert-flag. (mh-mml-directive-present-p): Checkdoc fix. * mh-utils.el (mh-mhn-compose-insert-flag, mh-mml-compose-insert-flag): Deleted. Replaced by mh-{mhn|mml}-directive-present-p. 2003-04-03 Mark D. Baushke * mh-e.el (mh-folder-from-address): Fix minor problem with To: address processing. * mh-e.el (mh-folder-from-address): Bugfix match ?+ character not a "?+" string. 2003-04-03 Peter S Galbraith * mh-e.el (mh-inc-folder): Add second optional argument for the folder to inc new mail into instead of mh-inbox. 2003-04-03 Peter S Galbraith * mh-e.el (mh-folder-from-address): The first match found in `mh-default-folder-list' is used. * mh-customize.el (mh-default-folder-list): Tweak docs 2003-04-03 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-mime.el (mh-mhn-directive-present-p): New function to test if a MHN directive is present in the current buffer. (mh-mml-directive-present-p): New function to test if a MML directive is present in the current buffer. * mh-comp.el (mh-letter-mode): Originally this function checked if a #forw directive was present and set mh-mhn-compose-insert-flag to t. The modification generalizes this test so that one of the variables mh-{mml|mhn}-compose-insert-flag will get set if we have any sort of MHN or MML directive is already present. * mh-seq.el (tool-bar-map): Add a defvar to avoid compiler warnings in CVS version of GNU Emacs. * mh-utils.el (tool-bar-map): Same as above. * mh-e.el (tool-bar-map): same as above. 2003-04-02 Satyaki Das * mh-xemacs-toolbar.el (mh-xemacs-toolbar-toggle-tick-icon): Change color to match mh-folder-tick-face. * highlight.xpm: Same as above. 2003-04-02 Peter S Galbraith * mh-e.el (mh-folder-from-address): Check `mh-default-folder-list' for cases against the recipient instead of the originator. * mh-customize.el (mh-default-folder-list): Add extra boolean flag to conditionally check the recipient address instead of the originator. 2003-04-02 Peter S Galbraith * mh-customize.el (mh-folder-tick-face): Change tick highlight face to a background yellow-green, as suggested by Bill. 2003-04-01 Peter S Galbraith * highlight.xpm: New icon for mh-toggle-tick. * mh-xemacs-toolbar.el (mh-xemacs-icon-map): Add tool-bar entry for mh-toggle-tick. (mh-xemacs-toolbar-toggle-tick-icon): New constant. * mh-customize.el: Add tool-bar entry for mh-toggle-tick. 2003-03-31 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-narrow-to-tick, mh-show-limit-map) (mh-show-sequence-menu): Add new interactive function mh-show-narrow-to-tick callable from the show buffer and arrange for a key binding and a menu entry. * mh-seq.el (mh-narrow-to-tick): New interactive function that narrows to the tick sequence. * mh-e.el (mh-folder-sequence-menu, mh-limit-map): Arrange for a key binding and a menu entry for mh-narrow-to-tick. * mh-comp.el (mh-letter-mode): Enable undo since we could be reusing a show buffer where undo is disabled (closes SF #712777). 2003-03-31 Peter S Galbraith * mh-e.el (mh-folder-sequence-menu): Add entry for mh-toggle-tick. * mh-utils.el (mh-show-sequence-menu): Add entry for mh-show-toggle-tick. 2003-03-28 Satyaki Das * mh-seq.el (mh-delete-seq): If the tick sequence is killed with "S k" then the highlighting wasn't getting removed. The change fixes this. 2003-03-27 Satyaki Das * mh-e.el (mh-notate-user-sequences): Extend it so that only the messages in a part of the folder are notated. (mh-delete-msg-from-seq): Extend it so that it will delete all messages in the marked region. (mh-delete-a-msg-from-seq): New function that deletes a single message from a sequence. (mh-clear-text-properties): If there is a ticked unseen message and the message is removed from the unseen list with "S d" then unticking the message doesn't change the highlight. This change fixes this. 2003-03-27 Peter S Galbraith * mh-xemacs-toolbar.el (mh-xemacs-toolbar-*-icon): Use original 24x24 icons, changing background only. 2003-03-27 Satyaki Das * mh-junk.el (mh-spamassassin-identify-spammers): Remove unused variable buffer-exists. (mh-spamassassin-identify-spammers): Remove unused variable user. * mh-customize.el (mh-junk-choose): Tweak it to remove XEmacs compiler warning. 2003-03-26 Satyaki Das * mh-seq.el (mh-thread-print-scan-lines): Handling of a boundary condition when messages from the last source folder had been removed was incorrect. This caused a folder header to appear without any messages listed under it. This change fixes this. (mh-thread-forget-message): Remove the entry from the scan line table as well. This is needed for proper display of threaded view of index folders. 2003-03-26 Bill Wohler * Makefile, README, import-emacs, mh-alias.el, mh-comp.el, mh-customize.el, mh-e.el, mh-funcs.el, mh-identity.el, mh-index.el, mh-loaddefs.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el, mh-xemacs-compat.el, mh-xemacs-toolbar.el: Removed RCS keywords per Emacs conventions (closes SF #680731). 2003-03-26 Satyaki Das * mh-index.el: Fix commentary to mention that mairix is supported as well. * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-junk-blacklist, mh-show-junk-whitelist): Interactive functions callable from the show buffer. (mh-show-junk-map): Key bindings in show mode. * mh-e.el (mh-junk-map): Key bindings to call spam program. (mh-help-messages): Update help text. * mh-customize.el (mh-junk): New customization group for spam program interface. (mh-junk-choice, mh-junk-function-alist, mh-junk-choose): Functions and variables that decide which junk program is used. (mh-junk-program, mh-junk-mail-folder): User customizable variables that control the choice of spam program and the action performed on received spam. * Makefile (MH-E-SRC): Add mh-junk.el. 2003-03-26 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-toggle-tick, mh-show-mode-map): New interactive function callable from the show buffer and a key binding for it. * mh-seq.el (mh-delete-seq): Remove highlight from tick sequence. (mh-put-msg-in-seq): Disable adding messages to tick sequence. (mh-widen): Reset mh-tick-seq-changed-when-narrowed-flag. (mh-tick-add-overlay, mh-tick-remove-overlay, mh-notate-tick) (mh-toggle-tick): New functions to highlight/unhighlight tick sequence and the interactive function that is used to toggle tick. * mh-e.el (mh-tick-seq-changed-when-narrowed-flag): New variable that remembers if we are narrowed to the tick sequence. In that case the highlighting isn't shown, since it adds no extra info. (mh-folder-mode): Initialize mh-tick-seq-changed-when-narrowed-flag. (mh-notate-user-sequences): Notate the tick sequence. (mh-internal-seq): Treat mh-tick-seq like an internal sequence. (mh-delete-msg-from-seq): Don't allow deletion from tick sequence. (mh-folder-mode-map): Add key binding for "'" * mh-customize.el (mh-tick-seq, mh-folder-tick-face): New customizable variables that contain the name of the tick sequence and the face to use to highlight it. 2003-03-25 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-thread-print-scan-lines): New function which prints out thread tree. It maintains the original folder info if the folder was created by index search (closes SF #709672). (mh-copy-seq-to-eob, mh-thread-inc, mh-thread-folder): Use factored out function mh-thread-print-scan-lines. (mh-toggle-threads): Since threading is allowed in index folders there can be lines in the folder which aren't valid message scan lines. So it is OK for mh-get-msg-num to fail once in a while. * mh-index.el (mh-index-update-maps): Make the parsing of messages that need to be annotated with the X-MHE-Checksum header more robust. If the search yielded no results then an error was being produced. (mh-index-search): Enable automatic threading of index folders if mh-show-threads-flag is non-nil (closes SF #709667). (mh-index-next-folder): Relax error checking since index folder can be threaded while the source folder info is visible. (mh-index-group-by-folder): New function that is used in mh-thread-folder to keep source folder info visible during threading. 2003-03-25 Bill Wohler * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-index-new-messages-folders): New variable that controls which folders "F n (mh-index-new-messages)" accesses. Was mh-flists-search-folders. * mh-index.el (mh-flists-search-folders): Still used internally, but users now use new option mh-index-new-messages-folders. Removed documentation since to avoid duplication with mh-index-new-messages-folders. (mh-flists-recursive-search-flag): Deleted. Use mh-recursive-folders-flag instead. (mh-flists-execute): Updated docs to specify which global variables are used. Use mh-recursive-folders-flag instead of mh-flists-recursive-search-flag. (mh-index-new-messages): Edited doc, and refer to new option mh-index-new-messages-folders. Ditto within code. Don't need to prepend + to folder name as flists does that for us. Use 2003-03-24 Satyaki Das * mh-e.el (mh-refile-msg): Add optional argument that controls whether mh-last-destination-folder is updated or not. 2003-03-22 Satyaki Das * mh-customize.el (mh-tool-bar-define): Fix a problem in the XEmacs version which caused the show mode toolbar to have the buttons in the reverse order. Also the add-hooks are no longer needed since mh-toolbar-init is called in the appropriate modes. * mh-comp.el (mh-letter-mode): Call mh-toolbar-init in XEmacs to initialize toolbar. * mh-utils.el (mh-show-mode): Same as above. * mh-e.el (mh-folder-mode): Same as above. 2003-03-21 Satyaki Das * mh-utils.el (mh-exec-cmd-env-daemon): New function which executes a command asynchronously with its own environment. * mh-comp.el (mh-redistribute): The function has been modified so that /bin/sh isn't used to run send. It has also been refactored so that the same code isn't repeated. 2003-03-21 Bill Wohler * mh-customize.el (mh-invisible-header-fields): Added X-Bogosity for bogofilter. 2003-03-21 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-xemacs-toolbar.el: Remove the code since that gets generated when mh-tool-bar-define is expanded. (mh-xemacs-icon-map): An alist to map GNU Emacs icon names to the actual icons to be used in XEmacs. This is used in mh-tool-bar-define. * mh-customize.el (mh-toolbar): Use this group in XEmacs as well. (mh-tool-bar-item-*): All these constants have been removed since they aren't needed in the new scheme. (mh-tool-bar-reply-3-buttons-flag): This variable has been removed. (mh-tool-bar-search-function): This is now used in XEmacs as well. (mh-tool-bar-folder-set, mh-tool-bar-folder-buttons-set) (mh-tool-bar-letter-buttons-set, mh-tool-bar-show-set) (mh-tool-bar-letter-set): These functions aren't defined at the top level any more. (mh-tool-bar-reply-generator): A macro to generate the required functions for the three reply buttons. (mh-tool-bar-search, mh-tool-bar-customize) (mh-tool-bar-folder-help, mh-tool-bar-letter-help) (mh-tool-bar-reply-from, mh-show-tool-bar-reply-from) (mh-tool-bar-reply-to, mh-show-tool-bar-reply-to) (mh-tool-bar-reply-all, mh-show-tool-bar-reply-all): New interactive functions that are called when tool bar buttons are clicked. (mh-xemacs-use-toolbar-flag, mh-xemacs-toolbar-position): Additional customizable variables that are present only for XEmacs. (mh-tool-bar-define): A macro that generates the required code for GNU Emacs and XEmacs tool bar. (mh-tool-bar-define): Define the MH-E tool bar. 2003-03-17 Satyaki Das * mh-seq.el (mh-notate-cur): Notate current message only if it hasn't been marked for deletion or refiling. 2003-03-15 Bill Wohler * mh-customize.el (mh-invisible-header-fields): Added X-Spam-Checker-Version. (mh-auto-fields-list): checkdoc fix. 2003-03-12 Satyaki Das * mh-index.el (mh-index-new-messages): If the destination folder where the unseen messages are supposed to be copied to was already present, but MH-E doesn't have it open, then a new folder was being created. The change fixes this. (mh-index-update-unseen, mh-flists-recursive-search-flag): Fix checkdoc warnings. * mh-loaddefs.el: Regenerated. 2003-03-11 Satyaki Das * mh-index.el (mh-flists-results-folder): Subfolder under +mhe-index where the results of the flists call is put. (mh-index-generate-pretty-name): Make sure that normal index searching will never use the folder reserved for the flists results. (mh-index-search): Add an extra parameter that marks all the messages in the index folder to the unseen sequence. (mh-index-update-unseen): Function to keep unseen sequence of index folder synced with the actual folders from where the messages were copied. This works only if the unseen messages are displayed with mh-show. Killing the unseen sequence in the index folder or adding/removing messages to it doesn't change the unseen sequence in the source folders yet. (mh-flists-search-folders): Variable that decides the folders on which flists is run. (mh-flists-recursive-search-flag): If non-nil, flists is passed the -recurse option. (mh-flists-execute): Function which uses /bin/sh to execute flists and then print out the list of message files that match. (mh-index-new-messages): New interactive function which searches for messages in the unseen sequence (closes SF #701756). * mh-utils.el (mh-show-folder-map): Add binding for mh-index-new-messages. (mh-show-msg): Update the unseen sequence in the source folder. * mh-e.el (mh-folder-font-lock-unseen): The function assumes that the end of buffer is reached when there isn't a valid scan line on the current line. This doesn't work in the index folder since we have lines containing the folder name and empty lines in between the actual scan lines. The modification removes this assumption. (mh-folder-map): Add key binding for "Fn" * mh-seq.el (mh-iterate-on-messages-in-region): If the point is not at the beginning of the line, then the first message in the region would be missed. The fix avoids this. * mh-mime.el (mh-inline-vcard-p): Don't try to inline vcards if we don't have the right libraries. 2003-03-10 Satyaki Das * mh-e.el (mh-next-undeleted-msg, mh-previous-undeleted-msg) (mh-next-msg): Add optional argument wait-after-complaining-flag. If non-nil and there are no undeleted messages after (or before) the current one, then pause for a second after printing out the message. (mh-refile-or-write-again): Modify call to mh-next-msg to use the wait-after-complaining-flag. 2003-03-10 Satyaki Das * mh-e.el (mh-refile-or-write-again): If mh-next-msg fails to find a message to go to it prints out a diagnostic, which overwrites the diagnostic about the folder the message was refiled to. The change fixes this. 2003-03-09 Satyaki Das * mh-seq.el (mh-widen, mh-narrow-to-seq): Update mh-narrowed-to-seq before notating sequences. This is a bit helpful for mh-tick.el. (mh-put-msg-in-seq): Fix a minor bug. No internal sequence should be notated -- the original code was doing the right thing only for the "unseen" sequence. * mh-index.el (mh-index-choose): Add autoload cookie for mh-index-choose. This is needed for GNU Emacs 20.5. * mh-loaddefs.el: Regenerated. 2003-03-09 Bill Wohler * mh-mime.el (mh-display-smileys): This function originally had a test to see if font-lock-maximum-size was bound, but this was recently removed. The test was put in for a reason; if font-lock-maximum-size isn't bound, void-variable errors would ensue. I put the bound test back in. 2003-03-08 Steve Youngs * mh-mime.el (mh-mime-security-button-map): Use 'mh-push-button' in XEmacs as well. 2003-03-07 Satyaki Das * mh-xemacs-toolbar.el: Declare a whole bunch of stuff for GNU Emacs, so that we don't get so many compiler warnings. Also surround calls to set-specifier and toolbar-make-button-list with mh-funcall-if-exists. Maybe GNU Emacs shouldn't try to compile this file in the first place. * mh-xemacs-compat.el (mh-modeline-glyph): Declare it within mh-do-in-xemacs to avoid compiler warning in GNU Emacs. (mh-xemacs-push-button): Removed. * mh-mime.el (mh-mime-button-map): Use the generalized mh-push-button function. (mh-push-button): Enhance it so that it works on XEmacs too. 2003-03-08 Steve Youngs * mh-xemacs-compat.el (mh-modeline-logo): New constant holding the modeline image. (mh-modeline-glyph): Use it. 2003-03-08 Steve Youngs * mh-xemacs-toolbar.el: New file that defines and displays a toolbar in XEmacs. * mh-xemacs-compat.el (mh-xemacs-toolbar): Require it here. * Makefile (MH-E-SRC): Add mh-xemacs-toolbar.el. * mh-customize.el (mh-toolbar): (mh-tool-bar-letter-buttons): (mh-tool-bar-letter-buttons-set): (mh-tool-bar-folder-buttons): (mh-tool-bar-folder-buttons-set): (mh-tool-bar-search-function): (mh-tool-bar-reply-3-buttons-flag): (mh-tool-bar-item-inc): (mh-tool-bar-item-save-mime): (mh-tool-bar-item-prev-msg): (mh-tool-bar-item-page-msg): (mh-tool-bar-item-next-msg): (mh-tool-bar-item-delete): (mh-tool-bar-item-refile): (mh-tool-bar-item-undo): (mh-tool-bar-item-perform): (mh-tool-bar-item-toggle-show): (mh-tool-bar-item-reply-from): (mh-tool-bar-item-reply-to): (mh-tool-bar-item-reply-all): (mh-tool-bar-item-reply): (mh-tool-bar-item-alias): (mh-tool-bar-item-compose): (mh-tool-bar-item-rescan): (mh-tool-bar-item-repack): (mh-tool-bar-item-search): (mh-tool-bar-item-visit): (mh-tool-bar-item-prefs): (mh-tool-bar-item-help): (mh-tool-bar-item-widen): (mh-tool-bar-item-send): (mh-tool-bar-item-attach): (mh-tool-bar-item-spell): (mh-tool-bar-item-save): (mh-tool-bar-item-undo-op): (mh-tool-bar-item-kill): (mh-tool-bar-item-copy): (mh-tool-bar-item-paste): (mh-tool-bar-item-kill-draft): (mh-tool-bar-item-comp-prefs): The MH-E toolbar for XEmacs is defined differently from the GNU/Emacs version, so only define these if we're in GNU/Emacs. XEmacs doesn't need to see them and it's always good to cut down on pollution. 2003-03-08 Steve Youngs * mh-mime.el (mh-mime-button-map): Bind the 2nd mouse button to `mh-xemacs-push-button' in XEmacs. (mh-mime-security-button-map): Ditto. * mh-xemacs-compat.el: Shush the byte-compiler. (mh-xemacs-push-button): New function to make MIME buttons work in XEmacs. 2003-03-08 Steve Youngs * mh-mime.el (mh-display-emphasis): Don't test `font-lock-maximum-size' to see if it is bound, just test for a non-nil value. This variable can have a nil value which makes it bound and dividing nil by 8 throws an error. This fixes a bug in MH-E under XEmacs when `font-lock-maximum-size' is nil that prevented article emphasis and smiley display which in turn was causing the "Flush changes in article x y/n" errors. (mh-display-smileys): Ditto. 2003-03-08 Steve Youngs * mh-utils.el (mh-logo-display): Display logo in XEmacs as well. * mh-xemacs-compat.el (mh-modeline-glyph): New. The MH-E modeline logo for XEmacs. 2003-03-06 Satyaki Das * mh-utils.el (mh-allow-root-folder-flag): New global variable that decides if "+" is an acceptable folder name. (mh-folder-completion-function): Refine the test for existing folders to take mh-allow-root-folder-flag into account. (mh-folder-completing-read, mh-prompt-for-folder): Use the allow-root-folder-flag argument of mh-prompt-for-folder and add a similar argument to mh-folder-completing-read. (mh-exec-cmd-error): Make the function nicer by using process-environment to pass the environment variable assignments. 2003-03-05 Satyaki Das * mh-mime.el (mh-push-button): Preserve point in the show buffer if the mouse is used to expand/contract a button. * mh-customize.el (mh-x-face-file): Mention X-Image-URL in documentation. * mh-comp.el (mh-insert-x-face): Modified to allow insertion of X-Image-URL header field. 2003-03-04 Satyaki Das * mh-utils.el (mh-face-display-function): Modified to facilitate display of X-Image-URL images. (mh-find-path): Initialize X-Image-URL cache directory. (mh-x-image-url-cache-canonicalize, mh-x-image-url-fetch-image) (mh-x-image-scale-and-display, mh-x-image-url-display) (mh-x-image-display): New functions for X-Image-URL image display and cache management. * mh-customize.el (mh-show-use-xface-flag): Add info about requirements for X-Image-URL display. (mh-fetch-x-image-url): New customizable variable that controls fetching of X-Image-URL. 2003-03-04 Satyaki Das * mh-utils.el (mh-make-local-hook): New macro which works around API changes in add-hook. Version of GNU Emacs before 21.1 and XEmacs require a call to make-local-hook and just the LOCAL argument of add-hook is not sufficient. (mh-show-mode): Make kill-buffer-hook buffer local. * mh-e.el (mh-folder-mode): Same as above. * mh-comp.el (mh-compose-and-send-mail): Same as above. 2003-03-02 Satyaki Das * mh-mime.el (mh-push-button): Clicking on a MIME button used to cause the window with the show buffer to be selected. With this change the selected window doesn't change. 2003-03-01 Satyaki Das * mh-speed.el (mh-speed-flists): Avoid a potential race condition. When flists is called manually, or when an unseen message is read, mh-speed-partial-line was not reinitialized. * mh-e.el (mh-visit-folder): If mh-visit-folder is used to visit the folder currently being visited (effectively doing a rescan) then mh-previous-window-config is erroneously set. The change fixes this. * mh-customize.el (mh-index-show-hook): Remove unused variable. 2003-02-28 Satyaki Das * mh-e.el (mh-scan-folder): Call mh-reset-threads-and-narrowing only after the user has replied to question. This avoids premature clearing of the folder. (mh-rescan-folder, mh-visit-folder): Remove calls to mh-reset-threads-and-narrowing since it is now called in mh-scan-folder anyway. * mh-funcs.el (mh-sort-folder): Same as above. 2003-02-26 Satyaki Das * mh-alias.el (mh-alias-alist): Change initial value to a symbol, so that it is different from the empty list, which could also mean that there are no aliases. (mh-alias-reload-maybe): Change test so that empty alist of aliases is properly handled (closes SF #693859). 2003-02-25 Satyaki Das * mh-mime.el (mh-decode-message-header): The message header could be encoded, for instance the author's name could contain characters not in ASCII. This function will decode such header fields. (mh-mm-inline-message): Use mh-decode-message-header. * mh-utils.el (mh-display-msg): Use mh-decode-message-header. (mh-message-number-width): Use mh-scan-prog instead of "scan". * mh-loaddefs.el: Regenerated. 2003-02-24 Satyaki Das * mh-utils.el (mh-truncate-log-buffer): Refine it so that the function will do the right thing even if called from a buffer other than mh-log-buffer. 2003-02-22 Peter S Galbraith * mh-alias.el (mh-alias-add-alias): Really fix SF #690216. This functions needs to strip brackets on standalone addresses as well. 2003-02-21 Satyaki Das * mh-xemacs-compat.el (replace-regexp-in-string): Remove the definition since it isn't used any more. 2003-02-20 Peter S Galbraith * mh-alias.el (mh-alias-which-file-has-alias): Bug fix. Needed to specify `noerror' on search. * mh-alias.el (mh-alias-suggest-alias): Add condition for input string being an email address in brackets. We need to strip out the brackets. (closes SF #690216) 2003-02-20 Satyaki Das * mh-pick.el (mh-search-folder): The function was setting the global value of the variables mh-current-folder and mh-previous-window-config. This can lead to problems in code which assumes that these variables are nil when we aren't in a folder buffer. So make the variables local before setting them. 2003-02-19 Satyaki Das * mh-mime.el (mh-mime-display): All the MIME display code has been wrapped in a condition-case so that if something goes wrong, the raw message will be displayed. * mh-funcs.el (mh-undo-folder): Comment out call to sit-for that seems unnecessary. * mh-e.el (mh-scan-folder): Messages marked for deletion or refiling weren't getting annotated properly. The change fixes this. (mh-process-or-undo-commands): Change prompt to reflect what really happens in the code. 2003-02-18 Satyaki Das * mh-comp.el (mh-folder-expand-at-point): The function mail-abbrev-complete-alias often returns nil. This had the unfortunate consequence of always causing an error. The change fixes this. * mh-alias.el (mh-alias-canonicalize-suggestion): New function which obviates the our need replace-regexp-in-string. (mh-alias-suggest-alias): Use mh-alias-canonicalize-suggestion to eliminate calls to replace-regexp-in-string. This avoids problems in Emacs20. * mh-utils.el (mh-notate): Handle the case when nil is passed as notation gracefully. (mh-speed-flists-active-p): New function that returns non-nil if flists is being used in the speedbar to update message counts. * mh-seq.el (mh-put-msg-in-seq): Fix a bug which made it impossible to add messages to the unseen sequence. Also adding messages to the unseen sequence will now update the speedbar message counts immediately. * mh-e.el (mh-get-new-mail, mh-process-commands) (mh-undefine-sequence): Update speedbar message counts, if the speedbar is active and is displaying message counts. (mh-delete-msg-from-seq): In addition to updating message counts, unhighlight the message so that interactively removing messages from the unseen sequence makes the bold highlight of unseen messages in the scan buffer go away. (mh-clear-text-properties): New function that removes all text properties from the current scan line. 2003-02-15 Satyaki Das * mh-utils.el (mh-face-display-function): Wrap call of insert-image in mh-funcall-if-exists. This avoids a compiler warning in Emacs20. * mh-speed.el (mh-speed-flists): Weaken test a bit to avoid compiler warning in Emacs20. (mh-speedbar-change-expand-button-char): Wrap call of speedbar-insert-image-button-maybe in mh-funcall-if-exists. This function isn't present in the speedbar that ships with Emacs20, so calling it there causes an error. * mh-seq.el (mh-msg-is-in-seq): Adjust loop call a bit to avoid compiler warning in XEmacs. The XEmacs compiler should be improved so that such spurious warnings from builtin macros are suppressed. * mh-index.el (mh-index-search): Same as above. * mh-e.el (tool-bar-mode): The declaration is needed for Emacs20 too. * mh-comp.el (mailabbrev): Try loading it any way. Some day XEmacs will get it and then MH-E will just use it. (tool-bar-mode, tool-bar-map): These declarations are needed for Emacs20 too. (mh-mail-abbrev-make-syntax-table, mh-folder-expand-at-point): Remove mh-mail-abbrev-make-syntax-table since mh-funcall-if-exists can be used instead. * mh-alias.el (require): Avoid autoloading functions that may not be defined. (mh-read-address, mh-alias-letter-expand-alias): Rewrite using mh-funcall-if-exists. 2003-02-15 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-speed.el (mh-folder-speedbar-buttons, mh-speed-add-buttons) (mh-speed-toggle): Reuse markers instead of creating more of them. (mh-speed-flists-folder, mh-speed-flists): Add optional folder argument to mh-speed-flists so that message counts are updated only for that one folder. (mh-speed-parse-flists-output): If no change in counts then avoid consing. * mh-index.el (mh-index-execute): Rewritten to use a temporary buffer that is not left behind. * mh-funcs.el (mh-store-buffer): Use mh-log-buffer instead of the special purpose *Store Output* buffer. 2003-02-14 Satyaki Das * mh-customize.el (mh-show-xface-face): Make it always be black foreground on a white background (the reverse of that can make some X-Face images look creepy). * mh-utils.el (mh-truncate-log-buffer): Modify the function to return the current size of mh-log-buffer. Also we are now a bit more careful in adding separators between consecutive messages. (mh-exec-cmd): Fix a bug where the log buffer would be displayed even if no error happened in the current command but the log buffer had messages from a previous error. * mh-mime.el (mh-mime-save-parts): Use mh-log-buffer to show error messages. * mh-alias.el (mh-alias-local-users): Add a space between parens. 2003-02-14 Steve Youngs * mh-utils.el (mh-face-display-function): Call `x-face-xmas-wl-display-x-face' using `mh-funcall-if-exists'. * mh-xemacs-compat.el (replace-regexp-in-string): New. 2003-02-13 Satyaki Das * mh-utils.el (mh-log-buffer-lines): New variable that keeps track of the number of lines to keep in mh-log-buffer. (mh-truncate-log-buffer): New function that is used to make sure that the log buffer doesn't grow to unbounded size. (mh-exec-cmd, mh-exec-cmd-daemon, mh-handle-process-error): Use mh-truncate-log-buffer instead of erase-buffer to keep some number of previous log messages around (closes SF #685476). 2003-02-13 Satyaki Das * mh-e.el (tool-bar-mode): Declare it in XEmacs. (mh-folder-mode): Use mh-funcall-if-exists to call hl-line-mode. * mh-utils.el (mh-funcall-if-exists): New macro that calls a function only if it exists. (mh-logo-display, mh-defun-show-buffer): Use mh-funcall-if-exists to call the functions find-image and deactivate-mark. * mh-mime.el (mh-mime-cleanup, mh-small-image-p) (mh-mm-display-part): Use mh-funcall-if-exists to call the functions image-size and remove-images. * mh-comp.el (tool-bar-map, tool-bar-mode): Declare the variables in XEmacs. (mh-folder-expand-at-point): Use mh-funcall-if-exists to call mail-abbrev-complete-alias if it exists. * mh-alias.el (mh-read-address): Use mh-funcall-if-exists for future extensibility. 2003-02-13 Satyaki Das * mh-utils.el (mh-logo-display): The function find-image is present only in GNU Emacs. (mh-defun-show-buffer): The function deactivate-mark is present only in GNU Emacs. (default-enable-multibyte-characters): Declare it in XEmacs to avoid compiler warning. (mh-face-display-function): Avoid inserting space if there isn't any Face or X-Face header field to display. * mh-seq.el (mh-thread-last-ancestor): Move declaration of variable before its first use to silence XEmacs warning. * mh-mime.el (default-enable-multibyte-characters, dots, type): Declare these in XEmacs to remove compiler warnings in XEmacs. (mh-mime-cleanup, mh-mm-display-part): Call remove-images only in GNU Emacs. (mh-small-image-p): Call image-size only in GNU Emacs. * mh-index.el (mh-mairix-next-result): Fix a bug where a quote was missing. (mh-swish++-regexp-builder): Remove the unused binding meta. * mh-e.el (mh-folder-size): Pass on an extra value to remove XEmacs warning. (mh-folder-mode): Surround calls to hl-line-mode and tool-bar-mode with mh-do-in-gnu-emacs since these functions aren't present in XEmacs. * mh-customize.el (mh-tool-bar-show-set, mh-tool-bar-letter-set) (mh-tool-bar-folder-set): These functions call tool-bar-* functions which are present only in GNU Emacs. So surround them with mh-do-in-gnu-emacs. * mh-comp.el (mh-letter-mode, mh-folder-expand-at-point): Only call these functions in GNU Emacs. (mail-abbrevs): Declare it in XEmacs. * mh-alias.el (mh-read-address): Call completing-read-multiple only in GNU Emacs. (mail-abbrevs): Declare it in XEmacs. (mh-alias-add-alias-to-file): Remove unused code. 2003-02-14 Ville Skyttä * mh-comp.el: Add autoloaded auto-mode-alist association. 2003-02-13 Satyaki Das * mh-utils.el (mh-face-display-function): Make the XEmacs part a little simpler. 2003-02-14 Steve Youngs * mh-customize.el (mh-show-xface-face): XEmacs doesn't have the ':inherit' keyword for defface, rewrite with sane defaults. * mh-utils.el (mh-face-display-function): Fix bug that was corrupting xface images when displayed with XEmacs' internal xface image support. Also make XEmacs honor 'mh-show-xface-face' when using internal xface image support. 2003-02-12 Peter S Galbraith * mh-comp.el (mh-modify-header-field): New function. To header FIELD add VALUE. If OVERWRITE-FLAG is non-nil then the old value, if present, is discarded. This is more flexible than before. (mh-insert-auto-fields): Use it. This and the new function are a courtesy of Satyaki. Thanks! * mh-customize.el (mh-auto-fields-list): Doc tweaks suggested by Bill. 2003-02-12 Satyaki Das * mh-comp.el (mh-folder-expand-at-point): Tweak the error message. Completion in the Fcc header field is only supported in GNU Emacs 21. 2003-02-12 Peter S Galbraith * mh-customize.el (mh-auto-fields-list): Reorder after `mh-identity-list' since it needs it to be defined. Move to mh-identity customization group. 2003-02-11 Peter S Galbraith * mh-customize.el (mh-insert-mail-followup-to-flag): Removed. Obsolete. (mh-insert-mail-followup-to-list): Removed. Obsolete. Use `mh-auto-fields-list' instead, which is a more general solution. (mh-auto-fields-list): New defcustom. Alist of addresses for which header lines are automatically inserted. Replaces `mh-insert-mail-followup-to-list'. * mh-comp.el (mh-insert-mail-followup-to): Removed. Obsolete. (mh-insert-auto-fields): New function. Insert custom fields if To or Cc match `mh-auto-fields-list', replacing mh-insert-mail-followup-to with a more general solution. (mh-compose-and-send-mail): Call mh-insert-auto-fields instead of mh-insert-mail-followup-to. Also don't call mh-insert-identity to insert default setting if mh-insert-auto-fields inserted an identity. 2003-02-11 Satyaki Das * mh-utils.el (mh-show-xface-function): Try to load the external x-face library only if XEmacs doesn't have xface support. (mh-face-display-function): Renamed. Also handle various permutations of x-face and xface support in XEmacs better. * mh-customize.el (mh-show-use-xface-flag): Any emacs whose major version is greater than or equal to 21 supports display of X-Face and Face header fields. 2003-02-11 Satyaki Das * mh-utils.el (mh-do-in-gnu-emacs, mh-do-in-xemacs): Macros that execute code only in GNU Emacs and XEmacs respectively. (mh-emacs21-face-display-function): Refactor to make it slightly nicer. Get rid of compiler warnings in GNU Emacs by using the above macros. Also check for presence of xface feature (in XEmacs specific code) before trying to display X-Face header field image. 2003-02-11 Steve Youngs * mh-customize.el (mh-show-use-xface-flag): If using XEmacs and can't find the external x-face pkg still enable X-Face images if feature 'xface is present. Update the doc string. * mh-utils.el (mh-emacs21-face-display-function): Make it work in XEmacs. (mh-show-xface-function): If using XEmacs without xface support, use x-face.el pkg. If using XEmacs with xface support, or Emacs 21, use mh-emacs21-face-display-function. 2003-02-11 Mark D. Baushke * mh-customize.el (mh-invisible-header-fields): Add "X-Notes-Item:" which is generated by Lotus Notes Domino. See URL for details on how Domino users may disable (restore the default) generation of these headers. 2003-02-10 Satyaki Das * mh-comp.el (mh-folder-expand-at-point): Add function doc string and produce a nicer error message for Emacs versions that lack mail-abbrev-complete-alias. * mh-utils.el (mh-handle-process-error): Check doc fix. * mh-e.el (mh-folder-from-address): Same as above. 2003-02-10 Peter S Galbraith * mh-comp.el: require mailabbrev, except in XEmacs. (mh-mail-abbrev-make-syntax-table): New defmacro to call mail-abbrev-make-syntax-table introduced in Emacs21. (mh-folder-expand-at-point): Handle nested folders. All of the above was written by Satyaki. I just applied the patch and tested. 2003-02-09 Satyaki Das * mh-comp.el: Fixes to keep the byte compiler happy. * mh-customize.el (mh-invisible-header-fields): Modified to remove space after ":" in header field names. 2003-02-09 Peter S Galbraith * mh-comp.el (mh-letter-complete): Add completion for fcc lines. (mh-folder-expand-at-point): Do completion at point for folder name. Like `mh-alias-letter-expand-alias' for aliases, it doesn't work on XEmacs because it relies on `mail-abbrev-complete-alias' to do completion. Maybe Steve could update XEmacs' mailabbrev.el? 2003-02-09 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields): Remove trailing space in "X-Face: " and "Face: " entries since those line often break there. 2003-02-08 Satyaki Das * mh-utils.el (mh-emacs21-face-display-function): Use mh-show-xface-face to colorize X-Face image. * mh-customize.el (mh-invisible-header-fields): Add extra headers to ignore. (mh-show-xface-face): Allow customization of the X-Face colors. 2003-02-07 Satyaki Das * mh-utils.el (mh-uncompface-executable, mh-uncompface): Remember the path of the uncompface executable so that we don't need to search for it every time. (mh-emacs21-face-display-function): If more than one X-Face (or Face) header field was present then the fields would get concatenated, leading to garbled output. The change only displays the first image. * mh-customize.el (mh-x-face-file): Change documentation since it can now be used to insert a Face header field. * mh-comp.el (mh-insert-x-face): Generalized to allow insertion of Face header field. 2003-02-06 Bill Wohler * mh-utils.el (mh-emacs21-face-display-function): Updated docstring. It is a common mistake to refer to a header field as a header. The term header refers to the entire header while the term header field refers to a single field. * mh-customize.el (mh-show-use-xface-flag): Ditto. 2003-02-06 Satyaki Das * mh-utils.el (mh-show-xface-function): Modified to use mh-emacs21-face-display-function if we are running GNU Emacs 21. (mh-face-to-png): New function to convert a Face header to a png image. (mh-uncompface): New function which converts an X-Face header to a pbm image. (mh-icontopbm): New function that does the job of icontopbm. (mh-emacs21-face-display-function): New function that displays Face/X-Face image in GNU Emacs 21. (mh-show-xface): Modified to test if we are running in X. Otherwise face display is suppressed. * mh-customize.el (mh-show-use-xface-flag): Tweak it, now that MH-E supports face display natively on Emacs 21. Also remove the check for window-system since it doesn't belong in a customizable variable. 2003-02-06 Satyaki Das * mh-utils.el (sendmail): Require it so that XEmacs can find rfc822-goto-eoh. (mh-mail-header-end): A substitute for mail-header-end that doesn't widen the buffer. This is essential to avoid problems when dealing with nested messages. (mh-in-header-p, mh-letter-header-font-lock) (mh-header-field-font-lock, mh-show-font-lock-fontify-region) (mh-show-unquote-From): Use mh-mail-header-end instead of mail-header-end. * mh-mime.el (mh-decode-message-body): same as above (closes SF #681518). * mh-comp.el (mh-yank-cur-msg): same as above. 2003-02-05 Satyaki Das * mh-utils.el (mh-display-msg): Call mh-show-mode before invisible headers are cleaned. This means that any surviving X-Face header can be removed unconditionally in mh-clean-msg-header. (mh-clean-msg-header): Since the function is now called with a read-only buffer, make the buffer temporarily writable. * mh-mime.el (mh-mm-inline-message): Do X-Face display before invisible headers are removed. * mh-customize.el (mh-invisible-headers): Simplified since the X-Face header isn't treated specially any more. (mh-invisible-header-fields): Add Face: and X-Face: to list of invisible headers. * mh-mime.el (mh-mime-display): If body is empty the headers would be treated like the body. The change fixes this (closes SF #681162). (mh-mime-display): This change really fixes the above problem. 2003-02-04 Satyaki Das * mh-utils.el (mh-current-folder-name): Global variable that keeps track of current folder. (mh-normalize-folder-name): Substitute @ with mh-current-folder-name (closes SF #666774). (mh-prompt-for-folder): Bind mh-current-folder-name. Also invalidate cache if we are visiting a folder that wasn't found in the sub-folder cache. This is an indication that folders may have been created outside of MH-E and so the cache may be stale. 2003-02-03 Satyaki Das * mh-utils.el (mh-decode-content-transfer-encoded-message): Removed. (mh-display-msg): Remove the use of the above function. (mh-normalize-folder-name): Leading "/" characters were being lost. The change fixes this (closes SF #676890). * mh-mime.el (mh-decode-message-body): New function, factored out from mh-mime-display and enhanced, to decode message based on charset and content-transfer-encoding. This eliminates the need for the external mimencode (closes SF #674857). (mh-mime-display): Use mh-decode-message-body. * mh-e.el (mh-header-display): Don't need the binding since the variable isn't present any more. (mh-inc-folder): Avoid calling mh-show if point is not on a valid scan line (closes SF #678115). * mh-customize.el (mh-decode-content-transfer-encoded-message-flag): Removed. 2003-02-03 Bill Wohler * import-emacs: MH-E now has its own directory in Emacs. * mh-e.el (mh-version): Set to 7.2+cvs. 2003-02-03 Bill Wohler Released MH-E version 7.2. * MH-E-NEWS, README: Updated for release 7.2. * mh-e.el (Version, mh-version): Updated for release 7.2. 2003-02-03 Bill Wohler * Makefile (dist): mkdir needs to happen *before* files are copied. * MH-E-NEWS: Fixed some awkward verbiage. 2003-02-02 Bill Wohler * mh-customize.el (mh-invisible-headers): Surround regexp-opt expression in parens to avoid problems viewing certain messages. 2003-01-30 Satyaki Das * mh-speed.el (mh-speed-flists): Search for flists in mh-progs. The original was inadvertently searching for flists in the user's path. 2003-01-27 Bill Wohler * mh-customize.el (mh-default-folder-must-exist-flag): Changed default to t according to the principle of least surprise. 2003-01-26 Bill Wohler * mh-utils.el: Checkdoc fixes. * mh-pick.el (mh-do-search, mh-search-folder): Checkdoc fixes. * mh-loaddefs.el: Regenerated (lm-verify fixes). * mh-index.el (mh-mairix-next-result): Checkdoc fixes. * mh-alias.el: lm-verify fix. * Makefile (MH-E-SRC): Added ChangeLog, now that Emacs has a lisp/mh-e directory. (MH-E-ETC-ETC): Removed ChangeLog. (dist): Moved creation of mail directory next to copy of files into mail directory. (install-emacs): Copy $(MH-E-SRC) into new directory $(EMACS_HOME/lisp/mh-e. (MH-E-SRC): Moved ChangeLog into new variable MH-E-OTHERS and include MH-E-LOADDEFS there too. (mh-loaddefs.el): Added lines so that lm-verify passes. (dist, install-emacs): Use MH-E-OTHERS instead of MH-E-LOADDEFS. 2003-01-26 Jeffrey C Honig * mh-comp.el (mh-tidy-draft-buffer, mh-compose-and-send-mail): Rename mh-kill-draft-hook to mh-tidy-draft-buffer. 2003-01-25 Jeffrey C Honig * mh-utils.el (mh-exec-cmd, mh-exec-cmd-daemon) (mh-process-daemon): Use mh-log-buffer for the output of commands from mh-exec-cmd. * mh-utils.el (mh-temp-folders-buffer): Sequences and folders lose the -temp from their buffer names as they are interesting to the user. * mh-seq.el (mh-list-sequences): New name, mh-sequences-buffer as it is intended to be interesting to the user. * mh-funcs.el (mh-list-folders): New name, mh-folders-buffer as it is intended to be interesting to the user. * mh-comp.el (mh-check-whom, mh-compose-and-send-mail): Use mh-recipients-buffer constant. Add a kill buffer hook to delete the recipients buffer when a draft buffer is killed. 2003-01-25 Satyaki Das * mh-customize.el (mh-customize): New interactive argument deletes other windows. (mh-tool-bar-show-set, mh-tool-bar-letter-set) (mh-tool-bar-folder-set): Modified so that clicking the customize and help buttons deletes the other windows in the frame. * mh-mime.el (mh-mm-inline-message): Remove unused code. * mh-seq.el (mh-notate-deleted-and-refiled): Fix a small bug where the wrong notation was being used. (mh-toggle-threads): The function had a bug if you did the following starting from an unthreaded wide folder: (1) Create a sequence with S p (2) Narrow to new sequence with S n (3) Thread narrowed folder with T t (4) Kill sequence with S k (5) Unthread narrowed folder with T t At this point we would have an empty folder. The change fixes this. (mh-toggle-threads): Fix documentation. * mh-customize.el (mh-invisible-header-fields): Add X-MHE-Checksum to invisible headers. * mh-comp.el (mh-insert-x-mailer): Slightly more informative X-Mailer header. 2003-01-24 Satyaki Das * mh-e.el (mh-header-display): Modified so that quoted-printable or base64 encoded messages are left untouched. * mh-utils.el (mh-decode-content-transfer-encoded-message): Munge the Content-Transfer-Encoding header so that the MIME decoding routines of Gnus doesn't get confused. (mh-display-msg): Use insert-file-contents-literally so that display will work for non-ascii. * mh-mime.el (mh-mime-display): Use charset info to decode message file (closes SF #655123). 2003-01-24 Bill Wohler * mh-alias.el (mh-alias-add-alias-to-file): Removed period from error message and added parens around error function. 2003-01-24 Satyaki Das * mh-customize.el (mh-decode-quoted-printable-flag): Removed. (mh-decode-content-transfer-encoded-message-flag): This replaces mh-decode-quoted-printable-flag. * mh-utils.el (mh-decode-content-transfer-encoded-message): New function which handles messages that are encoded as base64 or quoted-printable (closes SF #674190). (mh-decode-quoted-printable): Removed. (mh-display-msg): Use mh-decode-content-transfer-encoded-message instead of mh-decode-quoted-printable. 2003-01-23 Satyaki Das * mh-seq.el (mh-thread-generate-scan-lines): Fix a little bug that would occasionally cause angles ('<' and '>') to appear at root level. 2003-01-21 Satyaki Das * mh-seq.el (mh-notate-cur): Enable overlay arrow display in text mode too. * mh-e.el (mh-folder-mode): Initialize overlay-arrow-string so that a '>' is displayed in text mode. 2003-01-20 Satyaki Das * mh-utils.el (mh-scan-msg-overflow-regexp): Change the variable so that a space is always maintained in the beginning of the scan line. * mh-seq.el (mh-notate-seq, mh-notate-cur): Make the functions faster by cutting down on the use of mh-goto-msg. (mh-toggle-threads): Add call to mh-notate-cur, since inserting the folder names in a search results folder screws up the location of the overlay arrow. * mh-index.el (mh-index-delete-folder-headers): Position the point on a message line if possible. * mh-funcs.el (mh-copy-msg): Use the mh-iterate macro to make the function faster. * mh-e.el (mh-scan-folder): Reuse mh-notate-deleted-and-refiled. * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-add-msgs-to-seq): Add a new parameter that suppresses the annotation of the sequence since it is inefficient. * mh-seq.el (mh-delete-seq): Speed up the part of the function that removes the sequence notation. (mh-put-msg-in-seq, mh-notate-deleted-and-refiled): Use mh-iterate-on-messages-in-region to make the function fasters when operating on regions. The key idea is to loop over the folder buffer exactly once and do all annotations. The existing algo would walk over the buffer multiple times thereby slowing things down. (mh-iterate-on-messages-in-region): Added an extra parameter which is bound to the message index as the loop is executed. (mh-region-to-msg-list, mh-thread-delete, mh-thread-refile): Use the new mh-iterate-on-messages-in-region macro. * mh-e.el (mh-delete-msg-no-motion, mh-refile-msg, mh-undo): Same as above. (mh-notate-user-sequences): Change algorithm to make notating of user sequences fast. 2003-01-19 Satyaki Das * mh-logo.xpm: New image file that contains the MH-E logo. Change foreground color to the blue in the MH-E logo. * Makefile (MH-E-IMG): Add mh-logo.xpm to list of image files. * mh-utils.el (mh-show-buffer-mode-line-buffer-id): Adjust it to keep space in the beginning for the logo. (mh-logo-cache): New variable that caches the logo image file location. (mh-logo-display): Display the MH-E logo on the mode line. (mh-display-msg): Display logo in mh-show-mode. * mh-e.el (mh-make-folder-mode-line): Display logo in mh-folder-mode. * mh-comp.el (mh-compose-and-send-mail): Display logo in mh-letter-mode. * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-iterate-on-messages-in-region): New macro to iterate on all messages in a region. (mh-region-to-msg-list): Simplified since it uses mh-iterate-on-messages-in-region now. * mh-e.el (mh-delete-msg, mh-refile-msg): Change interactive spec to pass the region that is to be deleted when appropriate. (mh-delete-msg-no-motion, mh-refile-msg, mh-undo): Operate on regions directly without creating the list of messages to be deleted/refiled. (mh-delete-a-msg, mh-refile-a-msg, mh-undo-msg): The msg parameter in these functions can now be nil. If so, the current message is deleted, refiled or undone respectively. Avoids the use of mh-goto-msg in this case and speeds up operations on regions quite a bit. 2003-01-19 Peter S Galbraith * mh-alias.el (mh-read-address): Bug Fix. In XEmacs and Emacs20, it would always prompt using "To: " instead of using the command argument (closes SF #670913). 2003-01-19 Satyaki Das * mh-utils.el (mh-folder-completion-function): If there is a +foo/bar folder and the user types foo//bar then the completion function would say a match happened without showing the normalized folder name. This change fixes that. 2003-01-18 Satyaki Das * mh-e.el (mh-rmail): Modified so that new and unseen messages are shown (closes SF #667542). 2003-01-17 Satyaki Das * mh-index.el (mh-index-generate-pretty-name): Generate nicer names. In particular all '-' characters are removed. 2003-01-16 Satyaki Das * mh-customize.el (mh-index-program): Documentation fix. * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-index-program): Add choices for mairix and pick. * mh-index.el (mh-indexer-choices): Add search interfaces for mairix and pick. (mh-index-search): Add links for mairix and pick. (mh-index-pick-folder, mh-pick-binary): Variables needed to implement pick support. (mh-pick-execute-search, mh-pick-next-result): New functions to implement pick support. (mh-mairix-binary, mh-mairix-directory, mh-mairix-folder): New variables for mairix support. (mh-mairix-execute-search, mh-mairix-next-result) (mh-mairix-regexp-builder, mh-mairix-convert-to-sop*): New functions for mairix. * mh-funcs.el (mh-kill-folder): Move message to the end. * mh-e.el (mh-folder-mode): Make overlay-arrow-position and overlay-arrow-string local variables so that the arrow will remain even if some other folder is visited. (mh-remove-cur-notation, mh-remove-all-notation): The test isn't required any more since overlay-arrow-position is local. (mh-goto-cur-msg): Remove overlay arrow if current message doesn't exist. * mh-seq.el (mh-notate-cur): Don't need to set overlay-arrow-string any more since it is local and has been set at initialization. 2003-01-15 Satyaki Das * mh-speed.el (mh-speed-current-folder): Keep track of current folder when flists is called. (mh-speed-flists, mh-speed-parse-flists-output): Try to avoid ambiguity when folders are present with + at the end of the name. Unfortunately it can't always be avoided. * mh-e.el (mh-folder-size): Remove the unnecessary error check. (mh-parse-flist-output-line): Add extra argument which occasionally avoid problems with folder names that end with '+'. * mh-utils.el (mh-sub-folders-actual): Fix the folder name parsing so that it doesn't get confused by trailing '+' chars in the folder name. 2003-01-14 Satyaki Das * mh-utils.el (mh-normalize-folder-name): Enhanced so that it can now handle ".." and "." correctly during folder name completion. (mh-normalize-folder-name): Avoid error in boundary condition where the folder string is empty. 2003-01-14 Mark D. Baushke * mh-e.el (mh-visit-folder): Pass `current-prefix-arg' to the `mh-read-msg-range' function as the optional always-prompt-flag. 2003-01-14 Satyaki Das * mh-utils.el (mh-normalize-folder-name): New function that normalizes folder names. (mh-sub-folders): Use mh-normalize-folder-name. Also the function has been modified so that a trailing slash is only added if the folder potentially has subfolders. (mh-sub-folders-actual): Simplified since the folder has already been normalized in mh-sub-folders. (mh-remove-from-sub-folders-cache): Modified so that the cached results of two of the folders ancestors are invalidated. (mh-folder-completion-map): Ugly hack to make the error go away when minibuffer-complete-word is called. (mh-folder-completion-function): The completion function will now be more selective in adding '/' at the end of completed folder names. (mh-folder-completing-read): The folder name is normalized before return. The minibuffer-local-completion-map is shadowed to avoid error with SPC (bound to minibuffer-complete-word). We really need a better solution. 2003-01-13 Bill Wohler * mh-seq.el: Edited comment and docstring text to conform with RFC 2822 terminology. Message-ID is the header field. It contains a message identifier. 2003-01-13 Satyaki Das * mh-utils.el (mh-sub-folders): Add an argument that returns sub-folders with a / character appended at the end. (mh-folder-completion-function): Modify the function so that one tab is now sufficient to complete the folder name and add a trailing /. (mh-folder-completing-read): Remove the trailing / that the completion function now adds to the folder name. Also multiple / characters in the folder input are removed. So if the user inputs +foo///bar//baz///// then that will be converted to +foo/bar/baz. This will improve the performance of caching. * mh-seq.el (mh-notate-cur): Check that a valid current message exists before trying to notate (closes SF #667331). (mh-message-id-regexp): New variable to store regexp to recognize message-ids. (mh-thread-generate): Use mh-message-id-regexp to filter out non message-id's from the References: header. 2003-01-12 Satyaki Das * mh-seq.el (mh-notate-cur): Disable overlay-arrow display if we aren't on a graphic display. 2003-01-11 Satyaki Das * mh-seq.el (mh-notate-cur): New function to notate the current message. The marker in the fringe is updated too. (mh-narrow-to-seq, mh-widen, mh-thread-inc, mh-thread-folder): Use the specialized function mh-notate-cur instead of mh-notate-seq. * mh-e.el (mh-arrow-marker): New buffer local variable to store the position where the marker in the fringe is going to be displayed (closes SF #664824). (mh-folder-mode): Create a marker for the fringe. (mh-update-sequences, mh-get-new-mail, mh-goto-cur-msg): Call the specialized function mh-notate-cur instead of mh-notate-seq or mh-notate. (mh-remove-cur-notation, mh-remove-all-notation): Reset the overlay-arrow-position if needed. * mh-loaddefs.el: Regenerated. 2003-01-10 Satyaki Das * mh-utils.el (mh-remove-from-sub-folders-cache): Modified so that creating nested folders doesn't produce inconsistent results. (mh-prompt-for-folder): Remove call of mh-folder-list-change-hook. * mh-funcs.el (mh-kill-folder): Don't ask for confirmation if called on a folder holding index search results. Also the now removed mh-folder-list-change-hook is called no more. * mh-customize.el (mh-auto-folder-collect-flag) (mh-folder-list-change-hook): Removed. * mh-loaddefs.el: Regenerated. 2003-01-10 Bill Wohler * mh-customize.el (mh-default-folder-must-exist-flag): New variable to suppress suggested folder if the folder doesn't already exist (closes SF #657096). (mh-default-folder-list): New variable that holds mapping between an address and the desired folder for filing (closes SF #657096). (mh-default-folder-prefix, mh-default-folder-must-exist-flag): In docstring, refer to documentation for mh-prompt-for-refile-folder and mh-folder-from-address. (mh-highlight-citation-p, mh-compose-insertion) (mh-insert-mail-followup-to-list, mh-index-program) (mh-identity-default): Fixed case of tags. * mh-e.el (mh-folder-from-address): Use new variable mh-default-folder-must-exist-flag to return nil if this variable is t and the folder doesn't already exist. In addition, can now look up a default folder in the new variable mh-default-folder-list (closes SF #657096). (mh-prompt-for-refile-folder): In docstring, refer to documentation in mh-folder-from-address. * mh-index.el (mh-swish-execute-search): Changed \..* to \\..* in the FileRules filename in the sample config file. Otherwise, the users don't see the backslash at all, and no files are indexed! (closes SF #665888). 2003-01-10 Satyaki Das * mh-seq.el (mh-thread-folder): Get headers for exactly the messages that are present. If only messages 1-10 and 3800-3900 are being shown then we will now scan exactly those messages and not the full range from 1-3900 as was being done earlier. (mh-toggle-threads): When converting from threaded to normal view only the messages present in the buffer are scanned. Earlier all messages from the minimum to the maximum would be scanned (closes SF #626117). * mh-pick.el (mh-search-folder): Fix typo. (mh-pick-do-search): Fix bug from cut and paste. Also set window config properly. * mh-utils.el (mh-prompt-for-folder): Add new argument to allow it to accept + as a folder name. This allows the user to search all folders when "Fs" is used. * mh-pick.el (mh-search-folder): Fix interactive spec of function. (mh-pick-do-search): Rewritten to call pick in one go. This will make adding pick as a default index search program easier. Also pick now accepts the same query syntax as the index search programs (closes SF #664816). (mh-next-pick-field): Removed. (mh-pick-parse-search-buffer): New function to parse the search buffer. (mh-pick-construct-regexp, mh-pick-regexp-builder): New function to produce a pick query from the parsed representation. * mh-index.el (mh-index-do-search): Refactor the search pattern parser into a new function and use that instead. * mh-loaddefs.el: Regenerated. 2003-01-10 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-remove-from-sub-folders-cache) (mh-prompt-for-folder): Replace mh-update-sub-folders-cache with mh-remove-from-sub-folders-cache. (mh-exec-cmd-daemon): Mention set-process-filter in documentation. * mh-pick.el (mh-searching-function): New buffer local variable that keeps track of the default searching function to be used. (mh-pick-mode): Make mh-searching-function buffer local. (mh-search-folder): Set mh-searching-function to use pick. (mh-search-folder, mh-pick-menu, mh-pick-mode-help-messages) (mh-pick-mode, mh-do-pick-search, mh-pick-do-search): Rename mh-do-pick-search to mh-pick-do-search. But keep mh-do-pick-search as a deprecated function. (mh-do-search): New interactive function that performs the default search. (mh-pick-mode-map): Update keymap. * mh-index.el (mh-index-search): Set mh-searching-function to do index search. (mh-index-new-folder): Replace mh-update-sub-folders-cache with mh-remover-from-sub-folders-cache. * mh-funcs.el (mh-kill-folder): Same as above. * mh-index.el (mh-index-evaluate, mh-swish++-regexp-builder): Checkdoc fixes. * mh-customize.el: Fixes to make byte compiler in CVS Emacs perfectly happy. 2003-01-09 Bill Wohler * mh-e.el (mh-folder-from-address): New function that proposes the name of a folder with an alias for the address in the current message. (mh-prompt-for-refile-folder): Use it (closes SF #657096). * mh-customize.el (mh-default-folder-prefix): New variable used by mh-folder-from-address. (mh-invisible-header-fields): Edited docstring. * mh-alias.el (mh-alias-address-to-alias): Added ;;;###mh-autoload cookie (used by mh-folder-from-address in mh-e.el). Edited text in comment. * mh-utils.el: Provided naming conventions for buffer and buffer variable names. (mh-temp-folders-buffer): Renamed buffer to " *mh-folders*". (mh-temp-sequences-buffer): Renamed buffer to " *mh-sequences*". (mh-info-buffer): Renamed from mh-temp-info-buffer. (mh-log-buffer): New buffer variable to hold name of "*MH-E Log*" buffer which is expected to be used for the output of MH commands. Perhaps we always create this buffer at initialization and append to it rather than erase it each time? * mh-e.el (mh-quit): Loop over all buffers and delete MH-E temporary and working buffers. As long as the buffer naming conventions are followed, new buffers will be automatically killed. (mh-version): Renamed mh-temp-info-buffer to mh-info-buffer. * mh-comp.el (mh-insert-x-mailer): Renamed mh-temp-info-buffer to mh-info-buffer. 2003-01-09 Satyaki Das * mh-e.el (mh-folder-size): If the user doesn't have a Unseen-Sequence definition in .mh_profile then an error was produced. This change fixes that. * mh-seq.el (mh-thread-generate): Replace the *mh-thread* buffer with a temporary buffer which is cleaned up when the function exits. * mh-e.el (mh-prompt-for-refile-folder): New function which refactors out the intelligent folder guessing code from mh-refile-msg. (mh-refile-msg): Use mh-prompt-for-refile-folder. * mh-seq.el (mh-thread-refile): Use mh-prompt-for-refile-folder to do the same intelligent destination folder guessing as mh-refile-msg (closes SF #664829). * mh-utils.el (mh-folder-list, mh-make-folder-list-process) (mh-folder-list-temp, mh-folder-list-partial-line) (mh-set-folder-list): Removed. (mh-sub-folders-cache, mh-sub-folders, mh-sub-folders-actual): Moved over from mh-speed.el to implement hierarchical completion. (mh-update-sub-folders-cache): Utility function called when new folders are created or folders are removed. (mh-folder-completion-function): New function is the folder name completion function used in completing-read. (mh-folder-completing-read): A thin wrapper function that is used instead of completing-read directly. In the future we might want to allow the user a customizable variable which will turn off folders based completion. (mh-prompt-for-folder): Use mh-folder-completing-read to read in the folder name with hierarchical completion (closes SF #664821). * mh-speed.el (mh-speed-folders, mh-speed-folders-cache) (mh-speed-folders-actual): Moved to mh-utils.el as mh-sub-folders, mh-sub-folders-cache and mh-sub-folders-actual respectively. (mh-speed-invalidate-map, mh-speed-invalidate-map) (mh-speed-add-folder): Use the new names. * mh-funcs.el (mh-kill-folder): Remove code that used to update mh-folder-list which is no longer present. Instead mh-update-sub-folders-cache is called. * mh-index.el (mh-index-new-folder): Same as above. 2003-01-08 Satyaki Das * mh-utils.el (mh-exec-cmd-daemon): An argument was added which controls what is done with the process output. * mh-funcs.el (mh-kill-folder): Use mh-previous-window-config to restore window configuration. Also the call to mh-exec-cmd-daemon only displays output if an error happened (closes SF #664828). (mh-rmf-daemon): Check rmf output and display it only if something went wrong. (mh-print-msg): Pass in nil argument to mh-exec-cmd-daemon. * mh-comp.el (mh-redistribute, mh-send-letter): Pass in nil argument to mh-exec-cmd-daemon so that the functions will behave as before. * mh-pick.el (mh-search-folder): The current window config is stored. (mh-make-pick-template): Make the message headers read-only. (mh-pick-mode-help-messages): Update help message. (mh-do-pick-search): Fix problem when buffer isn't showing any messages. (mh-next-pick-field): Use buffer-substring-no-properties is better. (mh-pick-mode-map): Add key bindings (partially addresses SF #664816) * mh-index.el (mh-indexer-choices): Add a new field for each index program choice. If it is non-nil then it is the name of a function that given a lisp expression to search for generates a pattern that is acceptable to the search program. (mh-index-regexp-builder): New variable that stores the function to be used to convert from the lisp expression syntax to something that the search program understands. (mh-index-generate-pretty-name): Generalized so that it can take a list of strings as input. (mh-index-search): Modified so that if the configured program has a corresponding regexp-builder then a search buffer like pick search is produced. Otherwise the previous behavior is maintained. (mh-index-do-search): New interactive function that takes the contents of the search buffer, generates an appropriate query and produces the search results buffer by calling mh-index-search. (mh-replace-string, mh-index-parse-search-regexp) (mh-index-add-implicit-ops, mh-index-evaluate): New functions which parses the infix search expression that the user enters. A parse tree from which queries for different search programs can be produced is produced. (mh-swish++-regexp-builder, mh-swish++-print-regexp): Takes the internal form of the query and produces input suitable for swish++. * mh-loaddefs.el: Regenerated. 2003-01-08 Bill Wohler * Makefile (emacs-logs): New target for viewing CVS Emacs logs. Useful to see if an Emacs developer has changed MH-E. * MH-E-NEWS: Fixed case of MH-E in the "Changes" title. * mh-utils.el (mh-temp-info-buffer): New variable to hold name of buffer that contains version info. * mh-e.el (mh-version): Use mh-temp-info-buffer instead of mh-temp-buffer since version information was getting clobbered by the aliasing code before it could be seen (closes SF #664467). (mh-quit): Delete mh-temp-info-buffer. * mh-comp.el (mh-insert-x-mailer): Use mh-temp-info-buffer to find version info instead of mh-temp-buffer. You kind of need this patch to send mail. 2003-01-07 Bill Wohler * mh-e.el (Version, mh-version): Set to 7.1+cvs. 2003-01-07 Bill Wohler Released MH-E version 7.1. * MH-E-NEWS, README: Updated for release 7.1. * mh-e.el (Version, mh-version): Updated for release 7.1. 2003-01-07 Bill Wohler * mh-customize.el (mh-auto-folder-collect-flag, mh-alias-system-aliases, mh-alias-insert-file): Edited docstrings. * Makefile (MH-E-IMG): Added alias.pbm and alias.xpm. * mh-alias.el (mh-alias-insert-file, mh-alias-add-alias): Fixed checkdoc warnings. 2003-01-07 Satyaki Das * mh-utils.el (mh-search-from-end): New function that is used to replace our usage of the CL function search. (font-lock): The library is loaded to avoid compilation warning in CVS Emacs. * mh-speed.el (mh-speed-goto-folder, mh-speed-add-folder) (mh-speed-extract-folder-name, mh-speed-invalidate-map): Use mh-search-from-end instead of search. * mh-seq.el (mh-thread-remove-parent-link): Use loop instead of remove*. (mh-thread-process-in-reply-to): Use mh-search-from-end instead of search. * mh-index.el (mh-md5-parser): Fix name of function. (mh-index-update-single-msg, mh-index-update-maps): Avoid using destructuring-bind since Emacs-20.7 can't handle this particular usage. (mh-namazu-next-result): Use mh-search-from-end instead of search. * mh-e.el (recursive-load-depth-limit): Add a defvar since CVS emacs which doesn't have the variable defined causes a compiler warning. (mh-refile-a-msg): Rewritten to avoid using pushnew. (mh-undo-msg): Use loop instead of remove-if. * mh-comp.el (mh-show-buffer-message-number): Use mh-search-from-end instead of search. 2003-01-01 Satyaki Das * mh-e.el (mh-visit-folder): Modified so that if RANGE is nil then all messages are displayed. Documentation modified so that this is explicitly stated. (mh-visit-folder): Really fix it this time. 2003-01-01 Mark D Baushke * mh-alias.el (mh-alias-from-has-no-alias-p): Needs the mh-autoload comment or mh-customize may have problems finding the function. * mh-loaddefs.el: Regenerated. 2002-12-28 Satyaki Das * mh-index.el (mh-namazu-execute-search): Fix bug in documentation. 2002-12-28 Bill Wohler * mh-comp.el (mh-letter-mode): Mention mh-compose-insertion variable in docstring, explain how to expand directives, and don't mention mh-mhn-compose-insertion which isn't used directly any more. (mh-send-letter): Mention that X-Mailer and X-Face are inserted automatically so that a user isn't tempted to do so himself in mh-before-send-letter-hook. (mh-insert-letter): Use "variable" prefix for mh-invisible-headers now that we have both a function and a variable. Clarified language a bit. 2002-12-26 Satyaki Das * mh-utils.el (mh-show-xface-function): Only load x-face-e21 if the emacs is not XEmacs. * mh-index.el (mh-index-new-folder): The folder created should always be added to mh-folder-list. Otherwise folder name completion doesn't find the new folder created. 2002-12-24 Satyaki Das * mh-customize.el (mh-clean-message-header-flag) (mh-visible-headers, mh-invisible-headers) (mh-invisible-header-fields-set): Reworded to satisfy checkdoc. * mh-loaddefs.el: Regenerated. * mh-e.el (mh-inc-folder, mh-visit-folder, mh-read-msg-range): Handle nil value of mh-large-folder properly. * mh-customize.el (mh-tool-bar-show-set, mh-tool-bar-letter-set) (mh-tool-bar-folder-set, mh-tool-bar-folder-buttons) (mh-invisible-headers, mh-invisible-header-fields-set): Checkdoc fixes. (mh-large-folder): Updated to allow for infinity. If mh-large-folder is nil then all folders are deemed small. 2002-12-23 Satyaki Das * mh-e.el (mh-inc-folder, mh-visit-folder): Emit a message if threading was suppressed because the number of messages exceed mh-large-folder. 2002-12-23 Peter S Galbraith * mh-utils.el (mh-invisible-headers): Deleted. Moved to mh-customize.el * mh-customize.el (mh-invisible-header-fields): New defcustom. Simple user interface to change mh-invisible-headers. (mh-invisible-header-fields-set): New function called when mh-invisible-header-fields is set. (mh-invisible-headers): New function. Does the actual work of building the variable mh-invisible-headers from mh-invisible-header-fields. (mh-invisible-headers): defvar moved from mh-utils.el 2002-12-22 Satyaki Das * mh-speed.el (mh-speed-folder-size): Removed. Something very similar appears as mh-folder-size. (mh-speed-view): Simplified since the range selection logic has been moved to mh-read-msg-range. (mh-speed-parse-flists-output-line): Moved to mh-e.el as mh-parse-flist-output-line. * mh-funcs.el (mh-pack-folder): Use the new mh-read-msg-range. * mh-e.el (mh-rescan-folder): Use the new mh-read-msg-range. (mh-parse-flist-output-line): Moved from mh-speed.el where this function was called mh-speed-parse-flists-output-line. (mh-folder-size): Renamed from mh-speed-folder-size. The function has been made more general and can be called from any buffer and not just the speedbar buffer. (mh-visit-folder): Use the new mh-read-msg-range (addresses SF #655891). (mh-read-msg-range): Rewritten. 2002-12-21 Satyaki Das * mh-seq.el (mh-delete-subject-or-thread): New interactive function that intelligently deletes messages based on threading, if the folder is threaded, or on subject if folder isn't threaded. * mh-utils.el (mh-show-delete-subject-or-thread): New interactive function, callable from the show buffer, to intelligently delete messages based on threading info or subject. (mh-show-mode-map): Change binding of "k" to call mh-show-delete-subject-or-thread. * mh-e.el (mh-folder-mode-map): Change binding of "k" to call mh-delete-subject-or-thread. * mh-comp.el (mh-letter-mode-map): Add key binding for mh-insert-identity. * mh-loaddefs.el: Regenerated. 2002-12-21 Peter S Galbraith * mh-customize.el (mh-tool-bar-letter-set): Bug fix. The `tool-bar-add-item-from-menu' items were broken. I can't use my constants there. 2002-12-21 Peter S Galbraith * mh-alias.el (mh-alias-insert-file): Bug fix. I never checked that an AliasFile entry existed in .mh_profile. 2002-12-21 Peter S Galbraith * mh-customize.el (mh-alias-insertion-location): New defustom. Specifies where new aliases are entered in alias files. * mh-alias.el (mh-alias-add-alias-to-file): Use it. 2002-12-21 Peter S Galbraith * mh-alias.el (mh-alias-add-alias-to-file): If ALIAS matches exactly, prompt to [i]nsert before old value or [a]ppend after it. (mh-alias-insert-file): Make sure we don't edit the passwd file. Add optional argument for alias; If ALIAS is specified and it already exists, try to return the file that contains it. (mh-alias-which-file-has-alias): New function. Return the name of writable file which defines ALIAS from list FILE-LIST. (mh-alias-add-alias): Remove prompts for case of alias already defined; done in mh-alias-add-alias-to-file. 2002-12-21 Satyaki Das * mh-speed.el (mh-speed-folders-actual): Fix bug in parsing of folder names that have spaces in them. The original function would truncate the folder name at the first space. (mh-speed-flists): Add -sequence option to flists. This guards against the user specifying something other than the unseen sequence in his .mh_profile. (mh-speed-parse-flists-output-line): New function that parses a single line in the output of flists to find the folder name and the counts of unseesn and total messages. (mh-speed-parse-flists-output): Fix parsing bug which truncates the folder names at the first space. * mh-index.el (mh-index-generate-pretty-name): New function which generates a nicer name for the search results. It trims white space at the beginning and end and replaces white space with underscores within the search regexp. (mh-index-search): Use mh-index-generate-pretty-name. * mh-loaddefs.el: Regenerated. 2002-12-20 Satyaki Das * mh-index.el (mh-index-new-folder): Add new folder to mh-folder-list to enable name completion. (mh-glimpse-execute-search, mh-swish-execute-search) (mh-swish++-execute-search): Fix documentation. * mh-seq.el (mh-thread-generate): Fixed a stupid bug where the wrong folder could get 'scan'ed when generating the threaded view. * mh-index.el (mh-index-search): If optional prefix arg is given then the search in the current index buffer is redone. (mh-glimpse-execute-search, mh-swish-execute-search) (mh-namazu-execute-search): Documentation fixes. * mh-e.el (mh-index-previous-search): New buffer local variable stores parameters of search that created the buffer. (mh-folder-mode): Make mh-index-previous-search buffer local. (mh-visit-folder): Tweak the function so that only a single window with the folder buffer is shown if mh-showing-mode is nil. * mh-loaddefs.el: Regenerated. 2002-12-19 Peter S Galbraith * mh-alias.el (mh-alias-add-alias): Bug fix. 2002-12-19 Peter S Galbraith * mh-alias.el (mh-alias-add-alias): New interactive command. Add ALIAS for ADDRESS in personal alias file. (mh-alias-grab-from-field): New interactive command. Add ALIAS for ADDRESS in personal alias file. (mh-alias-add-address-under-point): New interactive command. Insert an alias for email address under point. (mh-alias-suggest-alias): New function. Suggest an alias for STRING. (mh-alias-insert-file): New function. Return the alias file to write a new entry in. (mh-alias-address-to-alias): New function. Return the ADDRESS alias if defined, or nil. (mh-alias-from-has-no-alias-p): New function. Return t is From has no current alias set. Used as tool-bar button enable function. (mh-alias-add-alias-to-file): New function. Add ALIAS for ADDRESS in alias FILE without alias check or prompts. * alias.xpm, alias.pbm: New tool-bar icon for mh-alias-grab-from-field. * mh-e.el (mh-folder-line-matches-show-buffer-p): New function. Return t if the message under point in folder-mode is in the show buffer. * mh-utils.el (mh-goto-address-find-address-at-point): New function copied from goto-addr.el, which we don't want to force-load on users. Find e-mail address around or before point. (mh-address-mail-regexp): New defvar. A regular expression probably matching an e-mail address. * mh-customize.el (mh-alias-insert-file): New defcustom. Filename to use to store new MH-E aliases. (mh-tool-bar-folder-buttons): Enable mh-tool-bar-item-alias icon. * mh-comp.el (mh-extract-from-header-value): New function. Extract From: string from header. 2002-12-19 Satyaki Das * mh-index.el (mh-index-update-single-msg): New defvar controls max number of command line args. (mh-index-execute): New function which is to be used instead of xargs so that we don't give the shell too many command line args. (mh-index-update-maps): Use mh-index-execute instead of xargs. (mh-index-search): Remove unused code. Also the first message in folder buffer is made current. 2002-12-18 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-letter-tool-bar-map): Moved to mh-customize.el * mh-e.el (mh-folder-tool-bar-map): Moved to mh-customize.el * mh-utils.el (mh-get-msg-num): autoloaded. (mh-show-tool-bar-map): Moved to mh-customize.el * mh-customize.el (mh-tool-bar-item-*): 33 new defconsts for tool-bar setup and customization. (mh-tool-bar-folder-buttons-set): New function to setup the tool-bar after customization. (mh-tool-bar-folder-buttons): New defcustom to specify which icons appears in the tool-bar. (mh-tool-bar-letter-buttons-set): New function to setup the tool-bar after customization. (mh-tool-bar-letter-buttons): New defcustom to specify which icons appears in the tool-bar. (mh-tool-bar-show-set): New function to setup mh-letter-tool-bar-map. (mh-tool-bar-letter-set): New function to setup mh-letter-tool-bar-map. 2002-12-18 Satyaki Das * mh-e.el (mh-folder-mode-map): Change entries for "\t", "\M-\t" and backtab to call mh-index-next-folder and mh-index-previous-folder as appropriate. * mh-index.el (mh-index-next-folder, mh-index-previous-folder): New interactive functions which jumps to search results of next and previous folders respectively. * mh-loaddefs.el: Regenerated. * mh-index.el (mh-index-delete-folder-headers): Arrange for mh-goto-cur-msg to just go to the current message. * mh-e.el (mh-visit-folder): Since mh-scan-folder erases the whole buffer anyway, we don't need to delete the folder headers. Also index-data is non-nil only when the buffer folder doesn't exist. So we need to call mh-make-folder. (mh-folder-mode): Fix bug in that mh-index-checksum-origin-map was not being made buffer local! 2002-12-17 Satyaki Das * mh-e.el (mh-visit-folder): Fix bug. * mh-index.el (mh-md5sum-buffer): Buffer from which md5sum is run. (mh-index-folder-first, mh-index-folder-last) (mh-index-original-msg-list): Convenience macros aren't needed anymore since the data structure has been changed. (mh-index-update-single-msg): New function to update maps that relate MD5 checksums to actual messages and vice-versa for a single message. (mh-index-update-maps): Do the above for all messages. If some messages don't have MD5 checksums, they are annotated with the result of md5sum. (mh-index-search): Updated for the new version of mh-index-data. (mh-msg-exists-p): New function to test a message exists. (mh-index-insert-folder-headers): Updated for new mh-index-data. (mh-index-delete-folder-headers): New function used to eliminate original folder names from the buffer and make it look like a plain folder buffer. This is used from mh-process-commands. (mh-index-visit-folder): Use new version of mh-index-data. (mh-index-match-checksum): New function which checks if the X-MHE-Checksum header of a message matches. (mh-index-execute-commands): New function that rmm's the original messages. Then after mh-execute-commands executes it will seem that the original messages were executed upon. This completes the fix of SF #623321. (mh-checksum-buffer): Renamed from mh-md5sum-buffer. (mh-checksum-cmd, mh-checksum-parser): New globals to allow different checksum programs to be used. (mh-checksum-choose): New functions to find a checksum program. (mh-openssl-parser, mh-md5sum-parser, mh-md5-parser): Functions to parse the output of md5, md5sum and openssl. (mh-index-update-maps): Use checksum parsing function. (mh-index-search): Set checksum choice. Add a call to recenter, otherwise the window point in the index buffer doesn't get set properly. * mh-funcs.el (mh-pack-folder, mh-sort-folder): Enable these functions in folders created by index search. * mh-e.el (mh-index-msg-checksum-map) (mh-index-checksum-origin-map): New buffer local variables that keep track of message checksums (used to implement refiling/deletion for folders created by index folders). (mh-last-msg): Make the function behave like mh-first-msg. (mh-visit-folder): Add new optional argument which initializes folders created by mh-index-search. (mh-folder-mode): Make the variables mh-index-msg-checksum-map and mh-index-checksum-origin-map buffer local. (mh-process-commands): Call mh-index-execute-commands when called from an index search buffer. This will reflect the changes being made in the search folder to the original folders. * mh-loaddefs.el: Regenerated. 2002-12-16 Satyaki Das * mh-index.el (mh-index-insert-folder-headers): Fix a bug which caused the folder buffer to be marked as modified after rescanning an index folder. 2002-12-15 Satyaki Das * mh-e.el (mh-visit-folder): The function should insert folder names if it is visiting a folder created by index search. * mh-index.el (mh-index-insert-folder-headers): The function now maintains the old value of buffer-modified-p and temporarily makes the buffer writable. * mh-utils.el (mh-show-index-visit-folder): New interactive function callable from show buffer that displays search results from one folder. (mh-show-mode-map): Key binding for "v". * mh-speed.el: Fix credits. (mh-index-folder-speedbar-buttons) (mh-index-show-speedbar-buttons) (mh-index-folder-speedbar-key-map) (mh-index-show-speedbar-key-map) (mh-index-folder-speedbar-menu-items) (mh-index-show-speedbar-menu-items): Removed since the modes mh-index-folder-mode and mh-index-show-mode no longer exist. (mh-speed-extract-folder-name): Remove the bits about mh-index-folder-mode and mh-index-show-mode. * mh-seq.el (mh-copy-seq-to-eob): Updated to work properly with index search results. (mh-region-to-msg-list): Skip over non-scan lines. (mh-thread-inc, mh-thread-add-spaces, mh-thread-folder): Skip non-scan lines when populating mh-thread-scan-line-map. (mh-thread-folder, mh-toggle-threads): Move the check for buffer modification from mh-thread-folder to mh-toggle-threads. (mh-toggle-threads): When returning to unthreaded view insert the folder names if called from a index folder. * mh-index.el: Fix credits and update commentary. (font-lock-defaults, mh-index-buffer, mh-index-show-buffer) (mh-index-ma-x-msg-index, mh-index-other-buffer) (mh-index-matches, mh-index-previous-window-configuration) (mh-index-current-msg, mh-index-folder-mode-keymap) (mh-index-button-map, mh-index-folder-mode-help-messages): Remove eliminated variables. (mh-index-folder): New variable sets the MH folder under which the index searches are stored. (mh-index-folder-first, mh-index-folder-last) (mh-index-original-msg-list): Convenience macros used to pull data elements out of a list. If needed setf can be used to change them as well. (mh-index-search): Rewritten to create real folders where all the normal folder operation. This partially fixes SF #623321 (refiles and deletes doesn't work on original messages). (mh-index-find-max-width, mh-index-search-again) (mh-index-insert-scan, mh-index-callback, mh-index-search) (mh-index-notate, mh-index-show, mh-index-header-display) (mh-index-next, mh-index-folder-mode, mh-index-show-mode): Functions, macros and modes removed. (mh-folder-exists-p): New function to check if a folder exists. (mh-index-new-folder): Generate a new folder name from a given base string that mimics the way emacs generates buffer names. (mh-index-insert-folder-headers): Insert folder names among the search results. (mh-index-visit-folder): New interactive function to show the search results of one individual folder. (mh-swish++-execute-search): Update documentation. * mh-funcs.el (mh-pack-folder, mh-sort-folder): Disable these functions if index search results are being viewed. * mh-e.el (mh-folder-font-lock-keywords): Add highlight for folder. (mh-index-data): New buffer local variable that will be used to store info about index search results. (mh-rescan-folder): Implement rescanning for index search results. (mh-folder-mode): Make mh-index-data buffer local. (mh-remove-all-notation): Modified to take into account not all lines in the folder buffer are normal scan lines. (mh-folder-mode-map): Add key binding for "v" to jump to original folder narrowed to search results. * mh-customize.el (mh-index-folder-face): Make it bold so that it will look like before. * mh-loaddefs.el: Regenerated. 2002-12-12 Satyaki Das * mh-seq.el (mh-map-to-seq-msgs): Modified so that it can be given a list of messages in addition to a sequence. (mh-region-to-sequence, mh-region-to-msg-list): The function mh-region-to-msg-list replaces mh-region-to-sequence. The new function avoids creating a dummy sequence in MH-E. (mh-thread-delete, mh-thread-refile, mh-put-msg-in-seq): Modified to use mh-region-to-msg-list. * mh-funcs.el (mh-copy-msg): Modified to use mh-region-to-msg-list. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Modified to use mh-region-to-msg-list. * mh-comp.el (mh-forward): Modified to use mh-region-to-msg-list. The buffer-local variable mail-header-separator is no longer bound. This fixes a bug where the default value of mail-header-separator gets used if mh-forward is called in a fresh emacs session. (mh-annotate-msg): Update this so that it will handle message lists too. (mh-insert-letter): Make the test stronger. Since %d is being used the argument better be an integer. * mh-loaddefs.el: Regenerated. 2002-12-11 Satyaki Das * mh-funcs.el (mh-copy-msg): Add support for transient-mark-mode. If mark is active and transient-mark-mode is enabled then all the messages in the region are copied. * mh-seq.el (mh-list-sequences): Use mh-coalesce-msg-list to print messages in sequence nicely. The prompt for the folder is removed (the current folder is always used) and the output is made nicer by not overflowing the screen width. * mh-loaddefs.el: Regenerated. 2002-12-09 Satyaki Das * mh-comp.el (mh-letter-complete): Checkdoc fix. * mh-seq.el (mh-thread-current-indentation-level): New function which returns the thread indentation level of current message. (mh-thread-next-sibling, mh-thread-previous-sibling): New interactive functions to jump to the next and previous siblings in thread tree respectively. (mh-thread-immediate-ancestor): New function to jump to ancestor of current message in thread tree. (mh-thread-ancestor): New interactive function to jump to immediate ancestor or to root message of current thread depending on optional argument. * mh-utils.el (mh-show-thread-ancestor) (mh-show-thread-next-sibling, mh-show-thread-previous-sibling): Interactive functions callable from the show buffer. (mh-show-thread-map): Bindings for Tu, Tp and Tn. * mh-e.el (mh-thread-map): Bindings for Tu, Tp and Tn. * mh-loaddefs.el: Regenerated. 2002-12-09 Satyaki Das * mh-seq.el (mh-region-to-sequence): Change name of region sequence created to 'mhe-region. This avoids any chance of collision with actual MH sequences. (mh-put-msg-in-seq, mh-thread-delete, mh-thread-refile): Change name of region sequence used to 'mhe-region. Also delete the 'mhe-region sequence when done. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Same as above. * mh-comp.el (mh-forward): Same as above. * mh-loaddefs.el: Regenerated. 2002-12-08 Bill Wohler * mh-alias.el: Edited documentation. Broke up file into 2 sections: Alias Loading and Alias Expansion. Made terminology consistent (replaced expand, substitute, and translate with expand). (mh-alias-reload): Brought message in line with coding conventions and made more concise too. (mh-alias-translate): Renamed to mh-alias-expand. (mh-alias-substitute-aliases-flag): Renamed to mh-alias-expand-aliases-flag. (mh-alias-reload-local-users): Renamed to mh-alias-local-users. Now just returns an alist of local users rather than have side-effects. (mh-alias-reload): Set timestamp at beginning of function to catch edge case when alias added just after ali runs. Changed logic to reflect return value of mh-alias-local-users. * mh-customize.el (mh-alias-substitute-aliases-flag): Renamed to mh-alias-expand-aliases-flag. (mh-alias-local-users): Fixed documentation. * mh-loaddefs.el: Regenerated 2002-12-08 Satyaki Das * mh-e.el (require): Load Gnus at compile time so that the constant gnus-version is defined when MH-E is being compiled. (mh-macro-expansion-time-gnus-version, mh-run-time-gnus-version): Use the constant gnus-version instead of the function gnus-version to find out about gnus version information. (gnus-version): Remove the autoload since it is not needed any more. 2002-12-08 Bill Wohler * mh-e.el (mh-version): Moved compilation information in front of Emacs information. The idea is that you start at MH-E and move outwards. Show N/A if Gnus not compiled (be explicit). Matched coding style with other output statements. (Aside: not that efficiency matters here, but fewer calls to format have to be faster, right? ;-). Matched output style of old output to new statement--liked Satyaki's indentation better ;-). 2002-12-08 Satyaki Das * mh-e.el (gnus-version): Autoload the function for use in mh-version. (mh-macro-expansion-time-gnus-version): New macro that finds the Gnus version at macro expansion time. (mh-run-time-gnus-version): New function to find the Gnus version at run time. (mh-version): Add information about Gnus versions available at compile time and run time. 2002-12-07 Peter S Galbraith * mh-alias.el (mh-alias-ali): Add optional argument. if USER is t, then assume ALIAS is an address and call ali with option -user. * mh-alias.el (mh-alias-filenames): if ARG is t, appends list of files from `mh-alias-system-aliases' to output list obtained from mhparam output user list only. (mh-alias-tstamp): Use it. 2002-12-05 Satyaki Das * mh-mime.el (mh-inline-vcard-p): A new function which decides if a vcard should be displayed inline. (mh-mime-display-single): Use mh-inline-vcard-p to display attached vcard as a signature if no other signature is present (this partially addresses SF #649216). 2002-12-05 Peter S Galbraith * mh-comp.el (mh-send-letter): Edits docs for mh-mml-to-mime getting run if variable `mh-mml-compose-insert-flag' is set. (mh-get-header-field): use buffer-substring-no-properties instead of buffer-substring. 2002-12-04 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-customize): Add ;;;###mh-autoload tag. 2002-12-04 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-letter-complete): New command to do alias or word completion in letter-mode. (mh-letter-mode-map): Add \M-\t binding for mh-letter-complete. * mh-alias.el (mh-alias-letter-mode-expand-alias-hook): Obsolete. Replaced by mh-letter-complete command. (mh-alias-reload-maybe): New function to rebuild alias table if out of date. (mh-alias-letter-expand-alias): No longer interactive. Use mh-letter-complete instead. 2002-12-04 Peter S Galbraith * mh-customize.el (mh-letter-complete-function): New defcustom. Function to call when completing outside of fields specified to aliases. * mh-alias.el (mh-alias-filenames): s/mh-mhparam-component/mh-profile-component/ (mh-profile-component): Move to mh-utils.el and make interactive. (mh-read-address): Make it autoloaded. * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-read-address): Removed. Replaced by mh-alias version. * mh-utils.el (mh-profile-component): Moved from mh-alias.el. 2002-12-04 Satyaki Das * mh-seq.el (mh-msg-is-in-seq): Formatting change. * mh-index.el (mh-index-insert-scan): Remove unused variable. 2002-12-04 Bill Wohler * mh-loaddefs.el: Regenerated. * Makefile (MH-E-SRC): Moved mh-loaddefs.el into MH-E-LOADDEFS as this was causing a cycle. (MH-E-LOADDEFS): New variable to house mh-loaddefs.el. (emacs): Reintroduced autoloads. (autoloads): We're baaa-aack! (dist, install-emacs): Use MH-E-LOADDEFS. * mh-comp.el (mh-customize): Moved to mh-customize.el. * mh-customize.el (mh-customize): Moved here from mh-comp. Makes more sense, doesn't it? * mh-alias.el, mh-comp.el, mh-e.el, mh-index.el, mh-mime.el, mh-pick.el, mh-speed.el: Added mh-autoload cookie to all interactive functions. 2002-12-04 Satyaki Das * Makefile (world): Remove target. (mh-loaddefs.el): Add comment that only GNU Emacs can be used to regenerate mh-loaddefs.el. * mh-make.el: Removed. 2002-12-04 Mark D. Baushke * mh-e.el (recursive-load-depth-limit): Only modify the limit if it is an integer. 2002-12-04 Peter S Galbraith * mh-utils.el (mh-header-field-beginning): New function. Move to the beginning of the current header field. 2002-12-04 Satyaki Das * mh-make.el (mh-files): Read in the MH-E filenames from the environment variable where the Makefile puts it. (mh-generate-autoloads, step2): Simplified since we now have the complete file names. * Makefile (world): Pass the MH-E files into the script, so that the filenames don't need to be repeated in the script. 2002-12-04 Bill Wohler * mh-loaddefs.el: New file. Check in automatically generated file and include in package for the benefit of those who don't want to or can't compile. * Makefile (MH-E-SRC): Added mh-loaddefs.el now that it is checked in and will be packaged. (emacs): Removed autoloads. Adding mh-loaddefs.el to MH-E-SRC is sufficient to build it. (compile): Depend on MH-E-SRC instead of MH-E-OBJ and pass $? into emacs so that Emacs is only invoked once to compile files. This speeds things up by a factor of 3. It would be nice to only pass those files that have been modified, but Emacs 21.4 will have batch-byte-compile-if-not-done which we might be able to copy into mh-make.el (or my proposed mh-e-dev.el which would be more general-purpose). (.SUFFIXES): Removed. Now that compile works directly on the sources, the implicit rule is obsolete. (autoloads): Deleted. See emacs change above. 2002-12-03 Bill Wohler * Makefile (MH-E-SRC, emacs): 2002-12-03 Satyaki Das * mh-make.el (mh-emacs): Make failing condition more strict. (mh-loaddefs-end): Remove redundant statement. * Makefile (world): A little typo. The bug didn't seem to make any difference though. * mh-make.el: New script that compiles MH-E. (mh-loaddefs-beginning, mh-loaddefs-end): Don't save the autoloads file in between. Only save at the end. (mh-emacs-generate-autoloads, mh-xemacs-generate-autoloads) (mh-generate-autoloads): Replace the separate functions in Emacs and XEmacs with one that works in both variants. This simplifies the script a lot. (mh-generate-autoloads): doc fix. * Makefile (world): New target which works for both GNU Emacs and XEmacs. 2002-12-03 Peter S Galbraith * mh-alias.el (mh-mhparam-component): Don't raise error if call to mhparam fails. * mh-alias.el (mh-alias-letter-expand-alias): Build alias table if not already available. 2002-12-03 Bill Wohler * mh-customize.el (mh-show-threads-flag): Alphabetized. 2002-12-03 Jeffrey C Honig * Makefile: Moved .PHONY rule after all rule for compatibility with BSD/OS's old pmake. 2002-12-03 Mark D Baushke * mh-e.el (mh-get-new-mail): Simplify no-new-mail test. (mh-add-cur-notation): Remove unnecessary function. 2002-12-03 Peter S Galbraith * mh-identity.el (mh-identity-make-menu): Check if 'mh-letter-mode-map' is bound, since this code also gets run when mh-customize.el is loaded at startup. 2002-12-03 Satyaki Das * mh-customize.el (mh-show-threads-flag): New customizable variable which controls if new folders start of in threaded mode (closes SF #646794). * mh-e.el (mh-rescan-folder): Fix the function so that threading is preserved across rescans. (mh-visit-folder, mh-inc-folder): The folder is threaded if it was already threaded or if mh-show-threads-flag is non-nil and the number of scan lines is fewer than mh-large-folders (closes SF #646794). 2002-12-02 Mark D Baushke * mh-e.el (mh-add-cur-notation): New function to mark the current message with the mh-note-cur character. (mh-get-new-mail): Use mh-add-cur-notation to undo the work of mh-remove-cur-notation if there was no new mail (closes SF #647681). * mh-e.el (mh-set-cmd-note): Do not update the default mh-cmd-note value (closes SF #643701). 2002-12-02 Peter S Galbraith * mh-alias.el (mh-alias-reload): Renamed from mh-alias-learn-aliases. (mh-alias-load-local-users): Renamed from mh-alias-learn-local-users. (mh-alias-passwd-alist): New variable, holding aliases extracted from the passwd file. (mh-alias-tstamp): New variable storing the timestamp for alias list generation. (mh-read-address, mh-alias-reload, mh-alias-reload-local-users): Complete rewrite. (mh-alias-minibuffer-confirm-address): Use mh-alias-translate. (mh-alias-translate): New function. Return translation for alias, checking if in blind or passwd list. (mh-alias-letter-expand-alias): Rewrite using mail-abbrev-complete-alias from mailabbrev.el. (mh-alias-expand-alias-map): New variable. (mh-alias-ali): New function. Return formatted string of translated ALIAS from ali. (mh-mhparam-component): New function. Return COMPONENT value from mhparam, or nil if unset. (mh-alias-filenames): New function. Provide list of alias filenames from mhparam, or nil if none are set. * mh-customize.el (mh-alias-display-blind-name-on-completion-flag): Obsoleted. (mh-alias-timestamp): Renamed to mh-alias-system-aliases. 2002-12-02 Bill Wohler * Makefile (mh-loaddefs.el): Suppress creation of backup file. 2002-12-02 Mark D. Baushke * Makefile (mh-loaddefs.el): Simplify rule. * Makefile (clean): Remove mh-loaddefs.el* for good measure. ($(MH-E-OBJ)): Depend on mh-loaddefs.el to compile these. (autoloads, mh-loaddefs.el): Revamp rules. (mh-loaddefs.el-tail, autoloads-gen): Remove rules. * mh-e.el (recursive-load-depth-limit): Do not try to bump the value unless the variable exists. * mh-e.el (recursive-load-depth-limit): Bump value of recursive-load-depth-limit to 50 to allow emacs 21.1 which normally has a default value of 10 to be able to compile MH-E. 2002-12-02 Satyaki Das * mh-funcs.el (mh-pack-folder, mh-sort-folder): Fix the functions so that threading is preserved (needed for SF #646794). * mh-identity.el (mh-identity-signature-start) (mh-identity-signature-end): Checkdoc fixes. * mh-e.el (mh-previous-unread-msg, mh-next-unread-msg): Checkdoc fixes. 2002-12-01 Satyaki Das * mh-identity.el (compile): Make mh-identity.el compile without warnings. * mh-e.el (mh-previous-unread-msg, mh-next-unread-msg): New interactive functions that go to next and previous unread messages (closes SF #630328). (mh-folder-mode-map): Add key bindings for M-n and M-p to mh-folder-mode-map. * mh-utils.el (mh-show-next-unread-msg) (mh-show-previous-unread-msg): New interactive functions that go to the next and previous unread messages respectively. These are callable from the show buffer. (mh-show-mode-map): Add key bindings for M-n and M-p to mh-show-mode-map. 2002-12-01 Bill Wohler * mh-mime.el (mh-defun-compat): Make it indent like a defun. * mh-index.el (mh-defun-index): Make it indent like a defun. * mh-customize.el: New file (closes SF #643722). * Makefile (MH-E-SRC): Added mh-customize.el (closes SF #643722). * mh-speed.el, mh-pick.el, mh-mime.el, mh-index.el, mh-e.el, mh-comp.el: Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722). * mh-utils.el (mh-xemacs-flag): Moved here from below since needed by mh-customize.el. (mh-customize): Required. mh-invisible-headers) (mh-bury-show-buffer-flag, mhl-formfile): Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722) . * mh-identity.el (mh-comp-loaded): New variable in a desperate attempt to prevent an infinite loop. (eval-when-compile): Was able to remove these defvars as they are now predefined in mh-loaddefs and mh-customize. (mh-identity-list-set): Added ;;;###mh-autoload cookie. Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722). * mh-alias.el (mh-e): Require this, as it needs defcustoms, which is in mh-customize which is required by mh-utils which is required by mh-e. Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722). 2002-11-30 Satyaki Das * mh-e.el (mh-thread-map): Add key bindings "Td" and "To" (closes SF #630493). (mh-help-messages): Update help message for prefix map. (mh-help-messages): Doc fix. (mh-help-messages): Really fix it. * mh-utils.el (mh-show-thread-delete, mh-show-thread-refile): New interactive functions corresponding to mh-thread-delete and mh-thread-refile callable from the show buffer. (mh-show-thread-map): Add key bindings for "Td" "To". * mh-seq.el (mh-narrow-to-seq, mh-put-msg-in-seq, mh-rename-seq) (mh-narrow-to-subject, mh-delete-subject, mh-toggle-threads): Add mh-autoload cookies. (mh-thread-find-children): New function which finds the region containing all children of a message. (mh-thread-delete): New interactive function that marks for deletion the current message and its children. (mh-thread-refile): New interactive function that marks for refiling the current message and its children. 2002-11-30 Bill Wohler * mh-funcs.el, mh-identity.el, mh-index.el, mh-pick.el, mh-seq.el: Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722). * mh-mime.el (mh-buffer-data): Moved to mh-utils where it is used. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * mh-utils.el (mh-loaddefs): Added require. (mh-buffer-data): Moved here from mh-mime.el as it is used in mh-display-msg. (mh-set-cmd-note): Moved to mh-e.el. Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * mh-e.el (mh-set-cmd-note): Moved here from mh-utils.el since it uses mh-scan-format-file which is defined here. Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * mh-comp.el, mh-speed.el (mh-utils): Removed require. mh-utils is provided via mh-e.el. Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * Makefile (emacs): Add dependency on autoloads. (clean): Remove mh-loaddefs.el too. (autoloads): New target. Builds mh-loaddefs.el. (mh-loaddefs.el): New target. Initializes mh-loaddefs.el. (mh-loaddefs.el-tail): New target. Appends to mh-loaddefs.el. (autoloads-gen): Runs batch-update-autoloads to populate mh-loaddefs.el (closes half of SF #643722).. (auto-autoloads.elc): Renamed from autoloads to be explicit about file that's created. (custom-load.elc): Ditto. 2002-11-30 Satyaki Das * mh-seq.el (mh-thread-last-ancestor): New variable which keeps track of oldest ancestor of last message. If due to narrowing the common ancestor of two messages is lost then one of them is promoted to be the parent of the other. This variable helps in this process. (mh-thread-generate-scan-lines): Group messages which belong to the same thread tree, even if a common ancestor is no longer present. (mh-thread-folder, mh-copy-seq-to-eob, mh-thread-inc): Bind mh-thread-last-ancestor to nil when calling mh-thread-generate-scan-lines. * mh-mime.el (font-lock): Font-lock required at compile time to avoid warning about font-lock-maximum-size. (mh-display-smileys, mh-display-emphasis): Show graphical smileys and emphasis only if message isn't too large. * mh-e.el (mh-visit-folder): Revisiting a buried folder which has been threaded or narrowed confuses MH-E. Even though the folder is displayed as not threaded and not narrowed, MH-E still believes the folder is in the previous state. This can cause problems when trying to narrow/thread the folder. The change fixes this. * mh-mime.el (mh-mime-display-alternative): The setting of mh-display-buttons-for-inline-parts-flag was not being used when displaying one of the alternatives. This change fixes that. * mh-comp.el (mh-show-buffer-message-number): Replace subseq with substring. (mh-filter-out-non-text): When filtering out MIME buttons from yanked text, the last line of the MIME part was getting lost. The fix avoids that and removes only the last new line instead. 2002-11-29 Peter S Galbraith * Makefile (MH-E-SRC): Add mh-alias. * mh-alias.el: Assign copyright to FSF instead of myself. (mh-read-address): Add support for emacs-21's completing-read-multiple to prompt for multiple entries. (mh-alias-PC-complete-address): Deleted. (mh-alias-learn-aliases): Use mh-exec-cmd-quiet instead of old kludge. (mh-alias-letter-mode-expand-alias-hook): Simplify. (mh-alias-hostname): Deleted. (mh-alias-substitute-aliases-flag): Change default to nil. (mh-alias-display-blind-name-on-completion-flag) Change default to nil. (mh-alias-alist): Now holds alias values. (mh-alias-lowercase-alist): Deleted. (mh-alias-minibuffer-confirm-address, mh-alias-learn-aliases) (mh-alias-learn-local-users, mh-alias-letter-expand-alias): Use new mh-alias-alist instead of old mh-alias-lowercase-alist. * mh-alias.el: Moved from contrib/ directory. Now part of MH-E! * Makefile (MH-E-SRC): Add mh-identity. * mh-identity.el (mh-compose-and-send-mail, mh-insert-identity) (mh-identity-make-menu, mh-identity-default, mh-identity-menu): Moved to mh-comp.el. * mh-comp.el (mh-compose-and-send-mail): Add mh-identity support. (mh-insert-identity, mh-identity-make-menu, mh-identity-default) (mh-identity-menu): Added from mh-identity.el 2002-11-29 Bill Wohler * mh-comp.el, mh-e.el, mh-funcs.el, mh-identity.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el: Ran indent-region, reformatted long lines, ran untabify. (indent-tabs-mode): Set file local variable to nil. 2002-11-29 Bill Wohler Released MH-E version 7.0. * mh-e.el (Version, mh-version): Updated for release 7.0. * mh-comp.el (subseq, search): Require cl instead of autoloading these due to compilation warnings in CVS Emacs. 2002-11-23 Bill Wohler * MH-E-NEWS: Emphasize the renaming of the variables at the top of the notes. 2002-11-22 Satyaki Das * mh-utils.el (mh-show-mode-map): Remove binding for RET since it is not needed and the binding is more useful to toggle display of MIME parts. * mh-mime.el (mh-mime-button-commands): Remove bindings for "i" and "o" from MIME buttons. (mh-insert-mime-button): Change comment to reflect change in button key map. 2002-11-21 Bill Wohler Released MH-E version 6.1.91. * mh-e.el (Version, mh-version): Updated for release 6.1.91. * MH-E-NEWS: Inline HTML parts supported with Gnus 5.10, not 5.9. 2002-11-21 Mark D. Baushke * mh-comp.el (mh-letter-insert-signature-hook): This should be in customize-group mh-compose. 2002-11-21 Satyaki Das * mh-utils.el (load): Load mm-view.el here so that mm-inline-text-html would be defined if available. (mh-mm-inline-media-tests): If mm-inline-text-html is available then use it, otherwise fall back on using mm-inline-text (closes SF #641482). * mh-mime.el (load): Remove the load of mm-view here since it happens in mh-utils.el now. 2002-11-15 Bill Wohler 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. * Makefile (MH-E-IMG): Added reply-all.pbm, reply-all.xpm, reply-from.pbm, reply-from.xpm, reply-to.pbm, reply-to.xpm. (MH-E-ETC-ETC): Added Makefile and README. (dist): Depend on all, so clean happens. Don't add .elc files to tarball as they are built upon installation now. 2002-11-15 Satyaki Das * mh-e.el (mh-process-commands): Fix a bug in mh-execute-commands. If called in threaded mode, cur was always getting set to the last message in the folder. 2002-11-14 Bill Wohler * mh-e.el (Version, mh-version): Updated for release 6.1.90. * MH-E-NEWS, README: Updated for release 7.0. * mh-utils.el (mh-index-search): Added full docstring which new users will need before they run a search! (mh-swish++-execute-search, mh-swish-execute-search, mh-namazu-execute-search mh-glimpse-execute-search): Added autoloads with full docstrings for the same reason! * mh-e.el (mh-limit-map): Removed / / alias for mh-narrow-to-subject. * mh-utils.el (mh-show-thread-map): Removed / / alias for mh-show-narrow-to-subject. * mh-seq.el (mh-delete-subject): Checkdoc fix. * mh-e.el (mh-help-messages): Added / prefix character to help string. Tweaked / helpstring a little. 2002-11-14 Mark D. Baushke * mh-utils.el (mh-set-cmd-note): Fix nitpick by adding one to the width for cosmetic reasons. 2002-11-14 Peter S Galbraith * mh-identity.el (mh-insert-identity): Fix a few things undone by Jeff's patch. (mml-insert-tag): Add autoload. 2002-11-13 Mark D. Baushke * mh-identity.el (mh-insert-identity): A value of either nil or "" should cause the field to be removed. (mh-identity-list): Update the docstring. 2002-11-13 Peter S Galbraith * mh-e.el (mh-limit-map): New key map for limits (subject for now). * mh-utils.el (mh-show-limit-map): Same. * mh-seq.el (mh-delete-subject): Renamed from mh-delete-subject-sequence. (mh-narrow-to-subject): Renamed from mh-narrow-to-subject-sequence. (mh-next-unseen-subject-sequence): Removed. :-( * mh-e.el: Use 'em * mh-seq.el: Use 'em. 2002-11-13 Mark D. Baushke * mh-e.el (mh-alt-show): New defalias for mh-show. (mh-alt-refile-msg): New defalias for mh-refile-msg. (mh-alt-send): New defalias for mh-send. (mh-folder-mode-map): Use mh-alt-show, mh-alt-refile-msg and mh-alt-send for the alias bindings. (mh-alt-visit-folder): New defalias for mh-visit-folder. (mh-folder-map): Use it. (mh-folder-message-menu): Revert previous change. 2002-11-13 Peter S Galbraith * mh-e.el (mh-folder-message-menu): Make key binding "o" appear in menu for mh-refile-msg. 2002-11-13 Satyaki Das * mh-seq.el (mh-thread-generate-scan-lines): In threaded view, scan lines of duplicate messages were too long. The change fixes that. 2002-11-13 Bill Wohler * mh-utils.el (mh-adaptive-cmd-note-flag): Improved grammar in docstring. * mh-speed.el (mh-speed-run-flists-flag): While documenting this variable in the release notes, I was unsure what would happen if set to nil. So, I clarified the docstring and indicated implications of setting this variable to nil, and offered manual workaround. 2002-11-13 Satyaki Das * mh-index.el (mh-index-quit): Fix documentation and run mh-before-quit-hook and mh-quit-hook. 2002-11-13 Bill Wohler * mh-utils.el (with-mh-folder-updating): Renamed local variable mh-save-modification-flag to save-modification-flag. 2002-11-12 Bill Wohler * mh-index.el (mh-index-keymap): Renamed to mh-index-folder-mode-keymap to be a closer to the usual keymap naming convention. Since we want our own keymap and not inherit the one in mh-folder-mode, we need to use a suffix other than -map. * mh-e.el (mh-folder-sequence-menu): s/Msg/Message. s/Seq/Sequence. (mh-folder-message-menu): s/Msg/Message. Removed redundant refile item. (mh-folder-folder-menu): Aligned symbols. * mh-index.el (mh-index-folder-message-menu): s/Msg/Message. * mh-utils.el (mh-show-sequence-menu): s/Msg/Message. s/Seq/Sequence. (mh-show-message-menu): s/Msg/Message. Removed redundant refile item. (mh-show-folder-menu): Aligned symbols. 2002-11-12 Satyaki Das * mh-index.el (mh-index-matches, mh-index-current-match): Remove these variables since they were only used for glimpse and grep. Now the functionality of all the indexing programs will be uniform. (mh-index-search, mh-index-insert-scan, mh-defun-index) (mh-index-show): Simplify functions since matches are no longer shown. (mh-index-parse-match): Remove function. * mh-e.el (mh-scan-cmd-note-width, mh-scan-destination-width) (mh-scan-date-width, mh-scan-date-flag-width) (mh-scan-from-mbox-width, mh-scan-from-mbox-sep-width): New variables to keep track of the widths of the different fields in the scan lines. (mh-scan-field-from-start-offset, mh-scan-field-from-end-offset) (mh-scan-field-subject-start-offset): Offsets that are computed from the scan line widths. * mh-seq.el (mh-copy-seq-to-eob, mh-thread-inc) (mh-thread-parse-scan-line): Use new variables that remember the various offsets in place of integer constants. (mh-thread-generate-scan-lines): Space shouldn't be added here! 2002-11-12 Bill Wohler * mh-e.el (mh-scan-format-mh, mh-scan-format-nmh): Noted that the first column is column number 0 and changed "sixth column" to "fifth column" accordingly. * mh-index.el (mh-index-folder-mode): Clarified method of replying in mode documentation. (mh-index-folder-tool-bar-map): s/mh-e/MH-E/. * mh-e.el (mh-generate-new-cmd-note): Try not to mention internal variable mh-cmd-note in docstrings. * mh-utils.el (mh-adaptive-cmd-note-flag): Set default value to t. Reworded docstring so it doesn't mention internal variable mh-cmd-note. Added information about using fixed-width message numbers. (mh-cmd-note): Mention mh-set-cmd-note in docstring. Also suggest that it is updated dynamically only if mh-scan-format-file is t. (mh-set-cmd-note): Grammer fix in docstring. (mh-cmd-note): Noted that the first column is column number 0. * mh-e.el (mh-scan-format-file): Added information about mh-set-cmd-note and mh-adaptive-cmd-note-flag to docstring. * mh-index.el (mh-index-keymap): Added bindings for i (mh-inc-folder), m (mh-send alias), and s (mh-send) since these appear to be supported and are found in the toolbar. (mh-index-folder-key-map): Ditto for f (mh-visit-folder alias), o (mh-visit-folder) alias, and v (mh-visit-folder). (mh-index-folder-mode-help-messages): Changes for above. (mh-index-folder-message-menu, mh-index-folder-folder-menu): New menus. I decided to delete the unavailable items since graying out implies that the user can do something to access them. In this case, that's not the case. Well, that's not entirely true--the user could write code for those functions ;-). (mh-index-folder-mode): Use new menus. * mh-utils.el (mh-prompt-for-folder): Added optional argument default-string which can be used in case the string for default isn't intuitive enough. * mh-index.el (mh-index-search): Made default prompt more intuitive (I hope!). 2002-11-11 Peter S Galbraith * mh-identity.el (mh-header-field-delete): Remove save-excursion. Strange that this worked for me before... Thanks to Jeff for the patch. (mh-insert-identity): Numerous tweaks and fixes from Jeff who also adds a nicer-looking MIME header for signatures inserted after MIME insertions. 2002-11-11 Satyaki Das * mh-seq.el (mh-thread-parse-scan-line): Generalize this function so that it can take a string containing the scan-line as argument in addition to using the line at point. (mh-thread-add-spaces): New function to pad each scan line to the appropriate length. This is called when mh-cmd-note is increased. * mh-e.el (mh-generate-new-cmd-note): Make this work on a threaded folder by using mh-thread-add-spaces to pad the pre-existing lines in mh-thread-scan-line-map appropriately. (mh-thread-add-spaces): Autoload from mh-seq. 2002-11-11 Mark D. Baushke * mh-index.el: Fix checkdoc nit. * mh-mime.el (mh-display-buttons-for-inline-parts-flag): Renamed from mh-display-buttons-for-inline-parts. (mh-mime-display-single): Use it. This addresses part of SF #627015. * mh-e.el (mh-print-background-flag): Renamed from mh-print-background. * mh-funcs.el (mh-print-msg): Use it. This addresses part of SF #627015. * mh-comp.el (mh-delete-yanked-msg-window-flag): Renamed from mh-delete-yanked-msg-window. (mh-yank-from-start-of-msg, mh-yank-cur-msg): Use it. This addresses part of SF #627015. * mh-utils.el (mh-update-sequences-after-mh-show-flag): Renamed from mh-update-sequences-after-mh-show. (mh-show-msg): Use it. This addresses part of SF #627015. * mh-utils.el (mh-decode-quoted-printable-flag): Renamed from mh-decode-quoted-printable. (mh-display-msg, mh-decode-quoted-printable-have-mimedecode): Use it. This addresses part of SF #627015. * mh-utils.el (mh-recursive-folders-flag): Renamed from mh-recursive-folders. (mh-make-folder-list-background): Use it. * mh-funcs.el (mh-list-folders): Ditto. This addresses part of SF #627015. * mh-utils.el (mh-auto-folder-collect-flag): Renamed from mh-auto-folder-collect. (mh-find-path): Use it. This addresses part of SF #627015. * mh-utils.el (mh-decode-mime-flag): Renamed from mh-decode-mime. * mh-utils.el (mh-show-mode, mh-show-xface) (mh-decode-quoted-printable, mh-display-msg, mh-display-msg): Use it. * mh-mime.el (mh-graphical-smileys-flag) (mh-graphical-emphasis-flag): Ditto. * mh-index.el (mh-index-search, mh-index-show): Ditto. * mh-e.el (mh-header-display): Ditto. This addresses part of SF #627015. * mh-e.el (mh-make-folder-mode-line): Use save-window-excursion to get back to the current message. 2002-11-10 Satyaki Das * mh-index.el (mh-index-keymap, mh-index-page-msg) (mh-index-folder-tool-bar-map): Replace mh-index-scroll-up with mh-index-page-msg. (mh-index-keymap, mh-index-previous-page): Replace mh-index-scroll-down with mh-index-previous-page. 2002-11-09 Satyaki Das * mh-index.el (autoload/require): Load mh-mime when mh-index.el is loaded. This fixes the infinite load loop. I am not sure what the actual problem is. Also removed the nop requires/autoloads. (mh-defun-index): Use the right argument for mh-recenter. Otherwise it misbehaves for the default value of mh-summary-height. * mh-e.el (mh-goto-next-button): Fix infinite loop when S-Tab was used on first line of index folder buffer. 2002-11-09 Peter S Galbraith * mh-index.el (mh-index-folder-tool-bar-map): Tool-bar for mh-index-mode. (mh-index-folder-mode): Use it. (mh-index-keymap): Added mouse-2 binding, like in regular folder-mode. 2002-11-08 Satyaki Das * mh-index.el (mh-index-folder-mode): Fix doc string for major mode. It was pointing to the wrong keymap. (mh-index-show-mode): Fix doc string for mode. Also add mh-help support. * mh-comp.el (mh-forward, mh-yank-cur-msg): Use new macro mh-mark-active-p instead. This does the right thing for different variants of Emacs. (mh-yank-cur-msg): Add a space between sexprs. * mh-utils.el (mh-mark-active-p): New macro which papers over diffences between GNU Emacs and XEmacs. The variables mark-active and transient-mark-mode are used in GNU Emacs while zmacs-regions and region-active-p are used in XEmacs. * mh-seq.el (mh-put-msg-in-seq, mh-thread-ancestor-p): Use mh-mark-active-p as above. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Use mh-mark-active-p as above. 2002-11-06 Peter S Galbraith * mh-comp.el (mh-yank-cur-msg): Fix for XEmacs. It didn't work with a selected region, and left the inserted text selected (in reverse video). I didn't use SF patch #402315 to implement this. 2002-11-05 Peter S Galbraith * mh-utils.el (mh-show-tool-bar-map): Change call to mh-tool-bar-search-command such that user can customize it for the current session. * mh-e.el (mh-folder-tool-bar-map): Same. 2002-11-05 Bill Wohler * mh-utils.el, mh-e.el (mh-tool-bar-search-function): Renamed from mh-tool-bar-search-command. * mh-index.el (mh-index-search): Backed out previous change to prompt. There ain't no folder named "all." * mh-utils.el (mh-tool-bar-search-command): Added mh-search-folder and mh-index-search to the docstring so that user can easily click on them for more information. * mh-pick.el (mh-search-folder): Mention that this function uses the MH pick command to give the user more information when choosing between mh-search-folder and mh-index-folder. * mh-index.el (mh-index-search): Edited the docstring. Direct the user to mh-index-program if necessary. (mh-index-program): Edited this docstring too. Viewing the help in a *Help* buffer really exposes grammatical flaws. 2002-11-05 Peter S Galbraith * mh-utils.el (mh-tool-bar-search-command): New defcustom to set what search function to use in tool-bar. (mh-show-tool-bar-map): Use it. * mh-e.el (mh-folder-tool-bar-map): Use it. 2002-11-05 Bill Wohler * mh-index.el (mh-index-search): Changed default prompt from "+" to "all". mh-prompt-for-folder doesn't seem to mind. * mh-e.el (mh-folder-folder-menu): Added menu entry for mh-index-search. * mh-utils.el (mh-show-folder-menu): Added menu entry for mh-index-search. * mh-index.el: Added commentary on supported search engines and for getting started (initializing database). 2002-11-04 Satyaki Das * mh-index.el (mh-index-keymap, mh-index-folder-key-map): Move key binding of "i" to "Fi". (mh-index-folder-mode-help-messages): Change help message to reflect above change. 2002-11-04 Bill Wohler * mh-index.el (mh-index-program, mh-indexer): Swapped names since the former seems like a better user variable name. If you've customized mh-indexer, be sure to toss it out and customize mh-index-program. 2002-11-04 Satyaki Das * mh-index.el (mh-indexer-choices): Not having the quotes in the binary names is a bit nicer since that maintains uniformity with the other names. (mh-index-choose): Use symbol-value instead of eval. Eval should be avoided except when it can't be :-). 2002-11-04 Bill Wohler * mh-index.el (mh-index-program): New variable to hold the name of the indexer that was found; use this instead of clobbering user-customizable variable mh-indexer. (mh-index-search): Use it. Added comments to keep others from doing what I had done (fortunately, I caught myself before checking it in ;-). (mh-index-choose): Set mh-index-program instead of mh-indexer. Update docstring to describe side-effects. * mh-index.el (mh-indexer): Added swish++ to docstring. Chances are good that if someone has both swish++ and swish, they want to use the much faster, much smaller swish, so move it up in the list. (mh-indexer-choices): Ditto for rationale for moving swish++ up in priority over swish. Also, use -binary symbols instead of hard-coding binary names. This allows package installers to customize the location of the binaries in site-lisp and still have the auto-detection code work. It also allows one to have alternate binary names (see mh-swish++-binary). (mh-index-search): Ditto (moving swish++ up). (mh-swish++-binary): Look for search++, then search. The rationale is that a package maintainer may rename search to search++ if search is already in use (e.g., Debian) so try it first. (mh-swish++-execute-search): Replaced Satyaki's path with dummy path in docstring. Also removed RecurseSubdirs since this is the default. Added comment that index might be named index++ on some systems (e.g., Debian). (mh-index-choose): Updated to work with new mh-indexer-choices. 2002-11-04 Peter S Galbraith * mh-identity.el (mh-identity-list-set): Don't call easy-menu-add here, since that adds the menu to the Customize buffer in XEmacs. 2002-11-04 Peter S Galbraith * mh-comp.el (mh-mhn-compose-insert-flag) (mh-mml-compose-insert-flag): Removed eval-when-compile defvar. * mh-mime.el (mh-mhn-compose-insert-flag) (mh-mml-compose-insert-flag): Move variables to mh-utils.el. Fixes mh-letter-menu for XEmacs. 2002-11-04 Eric Ding * mh-comp.el (mh-rejected-letter-start): add another string 2002-11-04 Eric Ding * mh-comp.el (mh-rejected-letter-start): regexp-opt doesn't take regexps as args, only regular strings 2002-11-04 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to): Don't modify a pre-existing M-F-T field. If a nmh replgroupcomps propagates a M-F-T field in a message reply, then we have to have it alone. 2002-11-02 Bill Wohler * mh-comp.el, mh-e.el, mh-funcs.el, mh-identity.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el, mh-xemacs-compat.el: Added Local Variables section. Defined sentence-end-double-space to be nil so that those who might not buy my setting of this variable can at least run checkdoc without a whole lot of noise. 2002-11-02 Peter S Galbraith * mh-identity.el: New file. Multiple Identify support for MH-E. Used to easily set different fields such as From and Organization, as well as diffrent signature files. This file won't be included with V7.0. 2002-11-02 Bill Wohler * mh-mime.el (mh-mm-save-part): New function to wrap mm-save-part from Gnus 5.10 to make it explicit which code has been commandeered. (mh-mime-save-part): Call mh-mm-save-part instead of cut-n-pasted code from Gnus 5.10. 2002-11-02 Peter S Galbraith * mh-comp.el (mh-yank-from-start-of-msg): Edit docstring to mention related variables mh-reply-show-message-flag and mh-delete-yanked-msg-window. (mh-reply): Change the "Reply to whom" prompt. 2002-11-01 Bill Wohler * mh-e.el (mh-show-hook): Moved to mh-utils.el where it is used. (mh-folder-list-change-hook): Converted this from defvar in other files to defcustom here. It is called, not documented as obsolete, and might as well be documented. (mh-inc-folder, mh-quit, mh-delete-a-msg, mh-refile-a-msg, mh-process-commands, mh-update-unseen): Added missing documentation about hook, or made verbiage about hook consistent throughout, even if the function isn't interactive. * mh-utils.el (mh-folder-list-change-hook): Moved defvar to mh-e and made it a defcustom. (mh-show-mode-hook): Put it back in (actually, it was in mh-e.el, but this is the place where it is called). (mh-show-hook): Moved here from mh-e.el since it's called here. (mh-show-mode): Call mh-show-mode-hook. (mh-show-mode, mh-show-msg, mh-find-path, mh-prompt-for-folder, mh-prompt-for-folder, mh-set-folder-list): Added missing documentation about hook, or made verbiage about hook consistent throughout, even if the function isn't interactive. * mh-comp.el (mh-send-letter): Made verbiage about hook consistent throughout. (mh-insert-prefix-string): Made docstring more descriptive of what is going on. * mh-funcs.el (mh-kill-folder): Added missing documentation about hook. * mh-index.el (mh-index-show-hook): Moved defvar to defcustom. (mh-index-show): Made verbiage about hook consistent throughout. * mh-mime.el (mh-edit-mhn-hook): Moved defvar to defcustom. (mh-edit-mhn): Added missing documentation about hook. * mh-pick.el (mh-pick-mode): Made verbiage about hook consistent throughout. Call the damn hook. 2002-11-01 Satyaki Das * mh-comp.el (mh-insert-mail-followup-to-list): Fix typo so that it will look right in info. * mh-index.el (mh-index-search): Change argument name from new-buffer-p to new-buffer-flag. (mh-index-search-again, mh-index-search): New index-buffers were being named *mh-index*<2>, *m-index*<2><2> and so on. This problem is fixed. (mh-index-scroll-up, mh-index-scroll-down): Scrolling in index show buffers (after the first one) was broken. (mh-index-quit): Bury show buffer instead of killing it. Killing it, without killing the corresponding folder buffer, can cause confusion with two folder buffers trying to display in the same show buffer. * mh-seq.el (mh-thread-prune-containers): Rewritten without recursion. Also removed the top-level-p argument since it isn't required anymore. (mh-thread-sort-containers): New function factored out from previous definition of mh-thread-prune-containers. It sorts message containers in ascending order wrt their message indices. (mh-thread-generate): Use new mh-thread-prune-containers. * mh-e.el (mh-remove-all-notation): Fix the test. It was testing at the wrong place! 2002-10-31 Bill Wohler * Makefile, README, import-emacs, mh-comp.el, mh-e.el, mh-funcs.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el: Replaced mh-e with MH-E. 2002-10-31 Satyaki Das * mh-seq.el (mh-thread-parse-scan-line): Modified to remove user sequence notation and leave notation for other things alone. This ensures that threading doesn't lose notations for replied-to messages. * mh-e.el (mh-inc-folder): Remove call to mh-widen here and instead do it in mh-get-new-mail. This way the widening happens only if new mail is incorporated. (mh-generate-new-cmd-note): The function now returns the point from which the new messages start. This will allow threading to do the right thing. (mh-get-new-mail): Always call mh-remove-cur-notation. Otherwise adaptive scan mode leaves two messages marked as current in certain cases. Fix indentation of if statement. If there are messages to be incorporated, the folder is widened. If mh-cmd-note changes set start-of-inc correctly. (mh-remove-all-notation): Change this function to only remove user sequence notation and leave notation for replied-to messages and similar notation alone. This means operations like narrowing to subject sequence and widening don't lose notations. 2002-10-31 Bill Wohler * mh-comp.el (mh-insert-mail-followup-to-list): Fixed typo in docstring and other minor edits. Checkdoc removed trailing spaces. (mh-insert-signature): Checkdoc flagged docstring. Reverted to previous value. Added specific name of hook that is run. (mh-regexp-in-field-p, mh-insert-letter): Checkdoc removed trailing spaces. 2002-10-31 Jeffrey C Honig * mh-e.el (mh-show-mode-hook): Remove the unused mh-show-mode-hook, mh-show-hook is the one that is used. * mh-utils.el (mh-show-mode): Change the documentation to refer to mh-show-hook instead of the unused mh-show-mode-hook. 2002-10-31 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to-list): Set default to nil and include example in doc string. 2002-10-31 Satyaki Das * mh-index.el (mh-indexer): Add customization choice for swish++. (mh-indexer-choices): Add swish++ choice. (mh-index-search): Change doc to reflect addition of swish++ option. (mh-swish++-binary, mh-swish++-directory): New variables for swish++ interface. (mh-swish++-execute-search): New function to execute swish++ search. (mh-swish++-next-result): Function aliased to mh-swish-next-result since the result format of swish++ is the same as that of swish-e. (mh-index-search): Always overwrite window-configuration with new value. This is needed since we don't kill the index-buffer when quitting which means the window configuration wasn't getting set properly. (mh-index-search-again): If index buffer is reused, reset the old window config to its original value. 2002-10-30 Bill Wohler * Makefile (emacs, xemacs): New targets. (all): Use these targets instead of calling specific targets. (.PHONY): Added emacs, xemacs, autoloads, custom-loads. Broke up target and moved pieces into their own sections. 2002-10-30 Peter S Galbraith * mh-utils.el (mh-show-font-lock-keywords): Wrap an 'eval-and-compile around its defvar, otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite'. 2002-10-29 Jeffrey C Honig * mh-comp.el (mh-letter-insert-signature-hook) (mh-insert-signature): Add a hook to be called before inserting the signature. Do not attempt to insert the signature if mh-insert-signature-file-name is nil. 2002-10-29 Peter S Galbraith * mh-e.el (mh-inc-folder): Call mh-widen when mh-narrowed-to-seq (Closes SF #629233: inc in narrowed folder suboptimal) * mh-comp.el (mh-insert-letter): Stop using mhl to include a message before it mangles the header, and supercite fails (Closes SF #629153: mh-insert-letter uses mhl?). (mh-insert-prefix-string): Leave point at beginning instead of end, since that's what sc-cite-original does. (mh-yank-cur-msg): Adjust for mh-insert-prefix-string change. 2002-10-30 Steve Youngs * mh-e.el (mh-folder-mode): Check for 'font-lock-auto-fontify' when in XEmacs so we don't do font-locking unconditionally. * mh-utils.el (mh-show-mode): Ditto. 2002-10-29 Peter S Galbraith * mh-e.el (mh-folder-refiled-face, mh-folder-cur-msg-number-face) (mh-folder-to-face, mh-folder-body-face): Define faces instead of copying them from font-lock faces. This mh-e will look the same in XEmacs as it does in Emacs. * mh-utils.el (mh-show-cc-face, mh-show-date-face) (mh-show-header-face): Ditto. 2002-10-29 Jeffrey C Honig * mh-comp.el (mh-send-letter): I meant to use mh-goto-header-field, not mh-get-header-field. The former returns nil if the header is not found and doesn't need a conditional. 2002-10-29 Peter S Galbraith * mh-comp.el (mh-forward): Bug fix. Change 'kill-line for a 'delete-region, because I don't want that text yanked with C-y. * mh-seq.el (mh-put-msg-in-seq): Add support for selected region (Closes SF feature request #630324). 2002-10-28 Satyaki Das * mh-seq.el (mh-thread-prune-subject): Make the regexp a little general so that a subject of the form "Re[218]: howdy" would be properly pruned. * mh-mime.el (mh-mime-save-part): Copy function definition of mm-save-part from cvs gnus since that function is buggy in gnus that comes with emacs21.2. 2002-10-28 Peter S Galbraith * mh-e.el (mh-scan-subject-regexp): Add an expression to match an optional bracketed number after "Re", such as in "Re[2]:". (Patch by Satyaki; I checked it and applied). (mh-folder-font-lock-subject): Adapt to new mh-scan-subject-regexp. * mh-seq.el (mh-subject-to-sequence): Ditto. * mh-e.el (mh-folder-sequence-menu): Remove "Toggle Subject Thread" from menu. mh-toggle-threads is in the Folder menu. * mh-e.el (mh-folder-sequence-menu): Minor menu text edits. * mh-utils.el (mh-show-update-sequences): Added to mh-defun-show-buffer builds; needed for menu. (mh-show-sequence-menu, mh-show-message-menu) (mh-show-folder-menu): 3 new menus in mh-show-mode-map that mirror the menus used in mh-folder-mode. (mh-show-mode): easy-menu-add the 3 menus. 2002-10-28 Satyaki Das * mh-utils.el (mh-goto-msg): Fix the regexp to search so that we go to the right message. In a threaded folder message 2 may be present after 26 and the previous regexp would go to 26 when we really wanted to go to 2! * mh-seq.el (mh-widen): Add call to mh-recenter to make it like mh-narrow-to-seq. 2002-10-28 Bill Wohler * mh-utils.el (mh-show-mime-save-parts): Deleted definition. (mh-show-mime-map, tool-bar-map): Use mh-mime-save-parts instead of mh-show-mime-save-parts. 2002-10-28 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): tool-bar-add-item key name bug fix. * mh-utils.el (mh-show-tool-bar-map): Same. * mh-e.el (mh-folder-tool-bar-map, mh-folder-seq-tool-bar-map): Same 2002-10-27 Satyaki Das * mh-seq.el (mh-toggle-threads): Add call to mh-recenter to make its behavior like that of mh-narrow-to-seq. 2002-10-27 Bill Wohler * mh-mime.el (mh-mime-save-parts): Renamed from mh-store-mime-parts for consistency with mh-mime-save-part. Fixed bug whereby mh-mime-save-parts-directory was not getting initialized properly from a string-valued mh-mime-save-parts-default-directory. (mh-mime-save-parts-default-directory): Ditto. Check your customizations! (mh-mime-save-parts-directory): Ditto. * mh-utils.el (mh-show-mime-save-parts): Renamed from mh-store-mime-parts. (mh-show-mime-map): Added keybinding "K a" for mh-show-mime-save-parts. * mh-e.el (mh-mime-save-parts) Renamed from mh-store-mime-parts. (mh-mime-map): Added keybinding "K a" for mh-mime-save-parts. (mh-help-messages): Added help for "K a". 2002-10-27 Peter S Galbraith * mh-comp.el (mh-search-addr-regexp, mh-regexp-in-field-p): Rename the first to the second (and recode a bit). (mh-insert-mail-followup-to): Use it. 2002-10-27 Bill Wohler * mh-utils.el (mh-invisible-headers): Backed out change. Removed Mail-Followup-To due to objections from Peter and Mark. 2002-10-27 Satyaki Das * mh-seq.el (mh-msg-is-in-seq): Modified to show info about whether the message being queried about has been marked to be deleted or refiled. * mh-mime.el (mh-insert-mime-security-button): Make pressed-details a local. 2002-10-27 Steve Youngs * .cvsignore: New file. 2002-10-26 Steve Youngs * mh-seq.el (mh-notate-deleted-and-refiled): Don't bind local variable 'dest', it isn't used anywhere. * mh-pick.el (mh-do-pick-search): Don't bind local variable 'finding-messages', it isn't used anywhere. * mh-utils.el: Byte-compiler warning suppression. (mh-gnus-article-highlight-citation): Rather than redefining 'gnus-cite-face-list', just re-order it. (mh-show-mode): Force turning on font-lock in XEmacs. * mh-seq.el: Byte-compiler warning suppression. * mh-index.el: Byte-compiler warning suppression. * mh-comp.el: Byte-compiler warning suppression. * mh-xemacs-compat.el: Add defaliases for 'timerp' & 'cancel-timer' to the equivalent 'itimer' functions. (rfc822): Require it for 'rfc822-goto-eoh'. Byte-compiler warning suppression. * mh-e.el (mh-folder-mode): Force turning on font-lock in XEmacs. (mh-toggle-threads): Remove duplicate autoload. Byte-compiler warning suppression. (mh-folder-unseen-seq-list): Use 'with-temp-buffer' to fix a bug in XEmacs when font-lock is on. (mh-folder-unseen-seq-name): Ditto. 2002-10-27 Mark D. Baushke * Makefile: Reorganize to allow for building also compiling for XEmacs too. Sanitize so that it will work using least-common denominator versions of 'make'. Tested using GNU make, Solaris make, and Berkely make. (all): Use recursive invocation based on the emacs or xemacs executable passed on the 'make EMACS=xemacs' command line. (XEMACS_OPTIONS): The incantation to be passed to an xemacs editor to compile things properly. (AUTO_PRELOADS): Magic XEmacs glue. (clean): Ditto. (autoloads): Ditto. (custom-loads): Ditto. 2002-10-26 Satyaki Das * mh-e.el (mh-last-msg): Add call to mh-recenter. 2002-10-26 Peter S Galbraith * mh-comp.el (mh-search-addr-regexp, mh-re-search-to-cc): Remove `mh-re-search-to-cc' in favor of more generalized new function `mh-search-addr-regexp'. (mh-insert-mail-followup-to): Use it. 2002-10-26 Satyaki Das * mh-seq.el (mh-copy-seq-to-eob): Avoid rethreading when the folder is already threaded. This is more efficient and also avoids problems when the folder is widened. (mh-thread-inc): Don't try to restore the point to original location since mh-inc-folder from where this is called changes point location after calling this function. * mh-e.el (mh-make-folder-mode-line): Fix a small bug where the test was wrong. 2002-10-26 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to): Fix for new defcustom. 2002-10-26 Satyaki Das * mh-seq.el (mh-notate-deleted-and-refiled): Remove unused binding of dest. The problem was pointed out by Steve as well. * mh-e.el (mh-toggle-threads): Remove duplicate autoload as pointed out by Steve. 2002-10-26 Bill Wohler * mh-utils.el (mh-invisible-headers): Added Mail-Followup-To. 2002-10-26 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to-list): Change defvar to defcustom. 2002-10-25 Satyaki Das * mh-e.el (mh-remove-all-notation): New function that removes all notation. * mh-seq.el (mh-narrow-to-seq): When hiding the original folder remove all notation. This avoids stale notation hanging around. Also changes in show buffer and position in folder buffer are avoided if possible. (mh-widen): When widening the scan-lines are notated based on the current state of the folder. This means any changes made when the folder was narrowed are shown consistently. (mh-notate-deleted-and-refiled): Update the documentation. (mh-thread-parse-scan-line): For some reason the ASCII value of the space character was being used here. This is fixed. (mh-thread-inc, mh-toggle-threads): Avoid change of point in folder and message being displayed in shown buffer. * mh-utils.el (mh-recenter): Rewrite mh-recenter to show fewer blank lines when point is towards the end of the folder buffer. 2002-10-25 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to-flag): New boolean defcustom to append a Mail-Followup-To field to the header. The insertion is done if the To: or Cc: fields matches an entry in `mh-insert-mail-followup-to-list'." (mh-insert-mail-followup-to-list): New defvar. List of addresses for which a Mail-Followup-To field is inserted. (mh-re-search-to-cc): New function. Search for REGEXP in To: and Cc: fields. (mh-insert-mail-followup-to): New function. Insert Mail-Followup-To: if To or Cc match `mh-insert-mail-followup-to-list'. (mh-compose-and-send-mail): Call mh-insert-mail-followup-to if mh-insert-mail-followup-to-flag is true. 2002-10-25 Mark D. Baushke * mh-utils.el (mh-show-maximum-size): New variable to control the display of large messages. (mh-display-msg): Use it (Closes SF #488696). * mh-seq.el (mh-toggle-threads): Checkdoc fix. * mh-e.el (mh-reset-threads-and-narrowing): Checkdoc fix. * mh-comp.el (mh-insert-x-mailer-flag): Renamed from mh-insert-x-mailer-p. Update docstring. (mh-send-letter): Use it. (mh-reply-show-message-flag): Renamed from mh-reply-show-message-p. Update docstring. (mh-reply): Use it. This addresses part of SF #627015. * mh-e.el (mh-recenter-summary-flag): Renamed from mh-recenter-summary-p. Update docstring. (mh-set-scan-mode): Use it. This addresses part of SF #627015. 2002-10-25 Satyaki Das * mh-e.el (mh-reset-threads-and-narrowing): New function which resets all thread and narrowing state to completely unthreaded and widened state. As a side effect, the folder buffer is erased. (mh-rescan-folder): Reset threads and narrowing state. * mh-funcs.el (mh-pack-folder-1): Reset threads and narrowing state. * mh-seq.el (mh-copy-seq-to-eob): Change mh-view-ops after threading is over so that if user aborts threading, it doesn't leave mh-e in an inconsistent state. (mh-toggle-threads): Use mh-scan-folder to populate the folder buffer instead of mh-rescan-folder which resets threading and narrowing state. 2002-10-24 Bill Wohler * mh-e is completely checkdoc clean now. * mh-utils.el (mh-clean-message-header-flag): Renamed from mh-clean-message-header. (mh-bury-show-buffer-flag): Renamed from mh-bury-show-buffer. (mh-show-use-goto-addr-flag): Renamed from mh-show-use-goto-addr. This addresses part of SF #627015. * mh-mime.el (mh-clean-message-header-flag): Renamed from mh-clean-message-header. Checkdoc fixes. This addresses part of SF #627015. * mh-index.el (mh-clean-message-header-flag): Renamed from mh-clean-message-header. This addresses part of SF #627015. * mh-funcs.el (mh-do-not-confirm-flag): Renamed from mh-do-not-confirm. This addresses part of SF #627015. * mh-e.el (mh-do-not-confirm-flag): Renamed from mh-do-not-confirm. (mh-clean-message-header-flag): Renamed from mh-clean-message-header. This addresses part of SF #627015. * mh-comp.el: checkdoc fixes. 2002-10-24 Satyaki Das * mh-seq.el (mh-copy-seq-to-eob): Rewritten to scan the headers fresh instead of yanking from buffer. This is needed to get correct threading in copied sequence. (mh-thread-inc, mh-thread-update-scan-line-map) (mh-thread-parse-scan-line): Eliminate the use, and hence the definition of, the kludgy mh-thread-update-scan-line-map. Instead the functions mh-notate-deleted-and-refiled and mh-notate-user-sequences are used to get the message marks right. (mh-thread-generate-scan-lines): Updated to allow the thread tree to be used in a narrowed folder buffer. (mh-thread-folder, mh-toggle-threads): Remove mh-folder-threaded-view-flag. (mh-thread-old-scan-line-map): New buffer-local variable that remembers the original scan-line map so that the sequence thread, narrow, widen will work. (mh-narrow-to-seq, mh-widen): Remember the scan-line map when narrowing and restore it when widening. * mh-e.el (mh-folder-threaded-view-flag, mh-folder-folder-menu) (mh-regenerate-headers, mh-get-new-mail) (mh-make-folder-mode-line, mh-process-commands) (mh-delete-scan-msgs): Remove mh-folder-threaded-view-flag. Instead (memq 'unthread mh-view-ops) is used to test if the folder is threaded. * mh-mime.el (mh-display-emphasis): Shadow article-goto-body here since we want to do emphasis on the whole of the region and not just after the first blank line. (mh-mm-display-part): When displaying a text part show smilies and emphasis. * mh-index.el (mh-index-insert-scan): Attempt to keep number of args to scan small if there are lots of adjacent matches. (mh-index-quit): Bury index-buffer on quit instead of killing it. This behavior is more like that of mh-quit. * mh-seq.el (mh-widen): If folder was threaded after narrowing then make mh-widen undo the threading instead of erroring out. 2002-10-24 Peter S Galbraith * mh-seq.el (mh-toggle-threads): Add a cond (as suggested by Satyaki) to properly unthread a narrowed-to-sequence. * mh-seq.el (mh-thread-generate-scan-lines): Fix threading breakage from partial switch to mh-container-real-child-flag and to dupl-flag. * mh-comp.el (mh-yank-cur-msg): Bug fix: specify (eq t mh-yank-from-start-of-msg) when that's what we want. 2002-10-24 Mark D. Baushke * mh-seq.el (mh-thread-prune-subject): Renamed subject-pruned-p as subject-pruned-flag. (mh-thread-inc): Renamed old-buffer-modified-p as old-buffer-modified-flag. (mh-thread-generate-scan-lines): Renamed dupl-p as dupl-flag. This addresses part of SF #627015. * mh-index.el (mh-index-advance): Renamed backward-p local variable as backward-flag. (mh-index-next-button): Renamed backward-p argument as backward-flag. (mh-index-show): Renamed display-headers-p argument as display-headers-flag. This addresses part of SF #627015. * mh-e.el (mh-scan-format, mh-version): Use mh-nmh-flag. (mh-folder-mime-action): Renamed include-security-p argument as include-security-flag. (mh-goto-next-button, mh-next-button): Renamed backward-p argument as backward-flag. (mh-get-new-mail): Renamed new-mail-p local variable as new-mail-flag. (mh-goto-cur-msg): Renamed minimal-changes-p argument as minimal-changes-flag. (redraw-needed-flag): Renamed redraw-needed-p local variable as redraw-needed-flag. (mh-seq-containing-msg): Renamed include-internal-p argument as include-internal-flag. (mh-page-msg): Use mh-page-to-next-msg-flag. This addresses part of SF #627015. * mh-mime.el (mh-mhn-compose-insert-flag): Renamed from mh-mhn-compose-insert-p. Make it buffer-local. (mh-mhn-compose-type, mh-mhn-compose-external-type, mh-mhn-compose-forw, mh-edit-mhn): Use mh-mhn-compose-insert-flag. (mh-mml-to-mime, mh-mml-secure-message-encrypt-pgpmime, mh-mime-display-part, mh-mime-display-single): Use mh-gnus-pgp-support-flag renamed from mh-gnus-pgp-support-p. (mh-mime-display-single): Renamed small-image-p local variable as small-image-flag. (mh-mime-inline-part): Renamed local variable inserted-p as inserted-flag. (mh-mime-inline-part): Renamed local variable displayed-p as displayed-flag. This addresses part of SF #627015. * mh-comp.el (mh-letter-menu, mh-letter-mode, mh-send-letter): mh-mhn-compose-insert-flag. (mh-repl-group-formfile, mh-forward): Use mh-nmh-flag renamed from mh-nmh-p. (mh-reply, mh-insert-x-mailer, mh-send-letter): Use mh-nmh-flag. (mh-letter-mode-map): Use mh-gnus-pgp-support-flag renamed from mh-gnus-pgp-support-p. (mh-mml-secure-message-sign-pgpmime): Use mh-gnus-pgp-support-flag. This addresses part of SF #627015. * mh-utils.el (mh-page-to-next-msg-flag): Renamed from mh-page-to-next-msg-p. (mh-show-msg): Use mh-page-to-next-msg-flag. (mh-gnus-pgp-support-flag): Renamed from mh-gnus-pgp-support-p. (mh-show-font-lock-fontify-region): Fix docstring per checkdoc. (with-mh-folder-updating): Renamed argument save-modification-flag-p as mh-save-modification-flag. (mh-prompt-for-folder): Renamed new-file-p local variable as new-file-flag. This addresses part of SF #627015. 2002-10-24 Mark D Baushke * mh-comp.el (mh-forward): Fix mh-mml-compose-insert-p reference in last commit to be mh-mml-compose-insert-flag. (mh-mml-compose-insert-flag): Move defvar to fix compiler warning. 2002-10-24 Jeffrey C Honig * mh-comp.el (mh-forward): Add support for transient-mark mode. When using nmh, always specify -mime so as to preserve the original message(s). If mh-compose-insertion is 'gnus, convert the mhbuild format forwarding directives into MML. 2002-10-24 Eric Ding * mh-comp.el (mh-send-letter): Fix for earlier change that added "-mime" for bcc'ed MIME mail; still doesn't work with nmh 1.0, but at least no longer triggered for every outgoing message! 2002-10-24 Peter S Galbraith * mh-comp.el (mh-yank-cur-msg): Fix selected regions for supercite (see text below). * mh-comp.el (mh-yank-cur-msg): Fix for supercite. Someone played with the point and mark setting prior to the call to 'mh-insert-prefix-string and that broke supercite. I put comments to make it obvious to future coders why those settings exists. Note that supercite is still broken when a region is selected in the show buffer. Presumably it's been like that for a long time. We need to insert the header as well as the selected region oin that case. I'll submit an SF bug. 2002-10-24 Jeffrey C Honig * mh-comp.el (mh-yank-from-start-of-msg, mh-reply): Use -noformat flag to reply when 'autosupercite or 'autoattrib are specified to prevent duplicate cites of the body of a message. 2002-10-23 Satyaki Das * mh-utils.el (font-lock-default-fontify-region): Add autoload to avoid compiler warning. 2002-10-23 Peter S Galbraith * mh-comp.el (mh-letter-mode): set fill-paragraph-function to our own 'mh-fill-paragraph-function instead of simply 'mail-mode-fill-paragraph (because it doesn't handle a non-nil fill-prefix correctly). (mh-fill-paragraph-function): New function for mh-letter-mode fill-paragraph-function in order to handle non-nil fill-prefix. Call sendmail's mail-mode-fill-paragraph if in the mail header, else call default fill-paragraph with fill-prefix set to nil. (Closes SF #489927) * mh-comp.el (mh-letter-mode): Let's use font-lock even if gnus is used in show-mode. The reason is that gnus uses static text properties which are not appropriate for a buffer that will be edited. So the choice here is either fontify the citations and header or the header only. * mh-utils.el (mh-show-font-lock-fontify-region): Limit font-lock in mh-show-mode to the header. Used when mh-highlight-citation-p is set to gnus, leaving the body to be dealt with by gnus highlighting. This fixes gnus text emphasis in mh-show-mode. (mh-show-mode): In font-lock-defaults, set font-lock-fontify-region-function to mh-show-font-lock-fontify-region. 2002-10-23 Bill Wohler * mh-mime.el (mh-mml-attach-file): Prompt for disposition should be Disposition, not Content-Type. The Content-Type has been determined automatically. 2002-10-23 Mark D. Baushke * MH-E-NEWS: s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ s/mh-show-use-xface/mh-show-use-xface-flag/ s/mh-tool-bar-reply-3-buttons/mh-tool-bar-reply-3-buttons-flag/ This addresses part of SF #627015. * mh-comp.el: s/mh-mml-compose-insert-p/mh-mml-compose-insert-flag/ s/mh-xemacs-p/mh-xemacs-flag/ (mh-letter-menu): Use mh-mml-compose-insert-flag. (mh-insert-x-mailer): Use mh-xemacs-flag. (mh-mml-compose-insert-flag): Renamed from mh-mml-compose-insert-p. (mh-send-letter): Use mh-mml-compose-insert-flag. This addresses part of SF #627015. * mh-e.el: s/mh-folder-threaded-view-p/mh-folder-threaded-view-flag/ s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ s/mh-xemacs-p/mh-xemacs-flag/ (mh-folder-threaded-view-flag): Renamed from mh-folder-threaded-view-p. Make it buffer local. (mh-folder-tool-bar-map): Use mh-tool-bar-reply-3-buttons-flag. (mh-remove-xemacs-horizontal-scrollbar): Use mh-xemacs-flag. (mh-make-folder, mh-regenerate-headers, mh-get-new-mail): Use mh-adaptive-cmd-note-flag. (mh-folder-folder-menu, mh-regenerate-headers, mh-get-new-mail, mh-make-folder-mode-line, mh-process-commands, mh-delete-scan-msgs): Use mh-folder-threaded-view-flag. This addresses part of SF #627015. * mh-index.el: s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ (mh-index-search): Use mh-adaptive-cmd-note-flag. This addresses part of SF #627015. * mh-mime.el: s/mh-mml-compose-insert-p/mh-mml-compose-insert-flag/ s/mh-xemacs-p/mh-xemacs-flag/ (mh-mml-compose-insert-flag): Renamed from mh-mml-compose-insert-p. Make it buffer local. (mh-mml-attach-file, mh-mml-secure-message-sign-pgpmime, mh-mml-secure-message-encrypt-pgpmime): Use it. (gnus-local-map-property): Use mh-xemacs-flag. This addresses part of SF #627015. * mh-seq.el: s/mh-folder-threaded-view-p/mh-folder-threaded-view-flag/ (mh-thread-generate, mh-thread-folder, mh-toggle-threads): Use mh-folder-threaded-view-flag. This addresses part of SF #627015. * mh-speed.el: s/mh-speed-run-flists-p/mh-speed-run-flists-flag/ s/mh-speed-refresh-p/mh-speed-refresh-flag/ (mh-speed-run-flists-flag): Renamed from mh-speed-run-flists-p. (mh-folder-speedbar-buttons): Use it. (mh-speed-refresh-flag): Renamed from mh-speed-refresh-p. (mh-speed-update-current-folder, mh-speed-invalidate-map, mh-speed-add-folder): Use it. This addresses part of SF #627015. * mh-utils.el: s/mh-xemacs-p/mh-xemacs-flag/ s/mh-tool-bar-reply-3-buttons/mh-tool-bar-reply-3-buttons-flag/ s/mh-show-use-xface/mh-show-use-xface-flag/ (mh-xemacs-flag): Renamed from mh-xemacs-p. (mh-show-xface-function): Use it. (mh-tool-bar-reply-3-buttons-flag): Renamed from mh-tool-bar-reply-3-buttons. (mh-show-tool-bar-map): Use it. (mh-adaptive-cmd-note-flag): Renamed from mh-adaptive-cmd-note. (mh-cmd-note): Use it in description. (mh-show-use-xface-flag): Renamed from mh-show-use-xface. Use mh-xemacs-flag. (mh-show-xface): Use mh-show-use-xface-flag. This addresses part of SF #627015. 2002-10-23 Bill Wohler * Makefile (all): Rather than have to run "make clean all" all the time, make the default target do a clean so all you have to say is "make". * mh-e.el (mh-folder-map): Moved "t (mh-toggle-threads)" to T prefix. 2002-10-22 Satyaki Das * mh-index.el (mh-indexer-choices, mh-swish-binary): The executable swish-e can be used to search (just like swish-search). However the Makefile in swish-e-2.2.2 doesn't install swish-search. So it is preferable to use swish-e. 2002-10-22 Bill Wohler * mh-comp.el (mh-letter-mode-map): Added aliases for keybindings. For example, you now have "C-c C-m C-i" in addition to "C-c C-m i". 2002-10-22 Mark D. Baushke * mh-mime.el (mh-graphical-smileys-flag): Renamed from mh-graphical-smileys-p. (mh-display-smileys): Use it. (mh-graphical-emphasis-flag): Renamed from mh-graphical-emphasis-p. (mh-display-emphasis): Use it. This addresses part of SF #627015. 2002-10-22 Satyaki Das * mh-mime.el (mh-insert-mime-security-button): A message is produced if PGP decryption/verification fails. This addresses SF# 627025. 2002-10-21 Bill Wohler * mh-seq.el (mh-widen): Checkdoc removed the period in the error. The info node (elisp) Coding Conventions says: "An error message should start with a capital letter but should not end with a period." * mh-e.el, mh-utils.el (mh-tool-bar-reply-3-buttons): Moved defcustom to mh-utils because I got an error about a nil value for mh-tool-bar-reply-3-buttons when I fired up mh-rmail. * mh-comp.el, mh-funcs.el, mh-mime.el, mh-pick.el: Moved (provide) to the end of the file to be consistent with most other files (see additional rationale in mh-e.el description below). * mh-e.el: Had to remove eval-when-compile from the (require 'cl) here too (because the remove-if generated a warning in CVS Emacs). Moved (provide) to the end of the file to be consistent with most other files. My guess is that this is good to keep a feature from being "provided" if the file craps out while being loaded. 2002-10-21 Satyaki Das * mh-utils.el (mh-reply, Info-goto-node): Add autoloads to avoid compiler warnings. (mh-tool-bar-reply-3-buttons): Add defvar to avoid compiler warning. * mh-seq.el (mh-narrow-to-seq): Remember that a narrowing has occurred. (mh-valid-view-change-operation-p): New function that checks if the widening or unthreading that we are about to perform is allowed. (mh-widen): Check if widening is applicable. (mh-thread-inc, mh-thread-folder): Use delete-region instead of erase-buffer. This means if the buffer is narrowed then the hidden parts aren't removed. This allows widening of the folder later on. (mh-toggle-threads): Maintain mh-view-ops. * mh-e.el (mh-view-ops, mh-folder-mode): New buffer-local variable that keeps track of the sequence in which threading and narrowing of the folder buffer has been carried out. This is needed so that narrowing followed by threading (or vice versa) behaves in a reasonable manner. (mh-regenerate-headers): Use delete-region instead of erase-buffer. (mh-make-folder-mode-line): Change mh-first-msg-num and mh-last-msg-num conservatively. This might show a larger range in the mode-line but allows the unthreading to not miss messages present initially. 2002-10-21 Bill Wohler * mh-mime.el (mh-graphical-emphasis-p): Added _underline_ to the docstring, as well as the source of the strings, gnus-emphasis-alist. (mh-graphical-emphasis-p, mh-graphical-smileys-p): Set the default to t. 2002-10-21 Peter S Galbraith * mh-utils.el (mh-show-mode): Invoke new toolbar. (mh-show-tool-bar-map): New tool-bar for mh-show-mode, similar to mh-letter-mode. 2002-10-21 Satyaki Das * mh-utils.el (mh-display-msg): Call the smiley display function after the call to mh-show-mode. This is needed since mh-show-mode kills all buffer-local variables and resets the variable that controls display of graphical smileys. 2002-10-21 Bill Wohler * mh-e.el (mh-folder-mime-action): Change mime to MIME in message. * mh-comp.el (mh-mml-to-mime autoload): Ditto. 2002-10-21 Mark D Baushke * mh-mime.el (smiley-region): Use load for a non-fatal dependency on the smiley library. 2002-10-21 Jeffrey C Honig * mh-comp.el (mh-forward): Search for a blank line as well as mail-header-separator. (mh-letter-mode): Search for a blank line as well as mail-header-separator. (mh-send-letter): The default BCC encapsulation will make a MIME message unreadable. If we are running nmh and the letter contains a Bcc: and a Content-Type: field, add the -mime switch to the arguments to send. 2002-10-21 Peter S Galbraith * mh-utils.el: Add a mh-defun-show-buffer call to define mh-show-pack-folder. 2002-10-21 Peter S Galbraith * mh-mime.el (mh-store-mime-parts): Simplify code a bit. * mh-e.el (mh-help-messages): Update help message for changed keybindings. 2002-10-21 Satyaki Das * mh-speed.el (mh-speed-invalidate-map): Invalidate mh-speed-folders-cache before it is used by mh-speed-folders. Also fix indentation of if statement. (mh-speed-folder-size): The folder name should be extracted from the speedbar buffer and not from the temp buffer has was happening before. (mh-speed-folder-size): Harden the function some more. It shouldn't produce errors any more unless flist really didn't work. 2002-10-21 Bill Wohler * mh-seq.el (mh-put-msg-in-seq): Formatting only. The reason I was in there is because I was trying to use mh-put-msg-in-seq and mh-msg-is-in-seq non-interactively and found that although the docstring says it uses the current message by default, I got errors if I passed in nil for the message. Is this expected, or is this a bug? I suppose the fix would be to make the arguments optional, right? This would cause the arguments in mh-put-msg-in-seq to be reversed, however. Might be a backwards compatibility problem. * mh-speed.el (mh-speed-view): Convert default size to string before passing it to read-string. This was done because XEmacs can't handle a numeric value for the default. 2002-10-20 Satyaki Das * mh-utils.el (mh-show-mode-map, mh-show-folder-map) (mh-show-sequence-map, mh-show-thread-map, mh-show-extract-map) (mh-show-digest-map, mh-show-mime-map): Interactive functions callable in show buffer are now prefixed with mh-show. * mh-seq.el (mh-notate-deleted-and-refiled): Take into account the changes to mh-refile-list and the removal of the 'deleted sequence. (mh-toggle-threads): Changing from threaded to normal view doesn't try to push out message refiles and deletions to MH. * mh-e.el (mh-rescan-folder, mh-scan-folder): Add a new optional argument to both functions that prevents them from carrying out pending refiles and deletes. (mh-undo): Remove dead code. (mh-delete-a-msg, mh-undo-msg): Get rid of the 'deleted sequence. The same information is present in mh-delete-list any way. (mh-refile-a-msg, mh-undo-msg, mh-process-commands): Change the semantics of mh-refile-list to make it self-contained. This variable now contains a list of lists. The first element of each sublist is the destination folder name. The remaining elements are the messages that are to be refiled to the destination folder. (mh-toggle-threads, mh-folder-folder-menu): Use mh-toggle-threads instead of mh-thread-folder. 2002-10-20 Peter S Galbraith * mh-mime.el (mh-store-mime-parts): Bug fix? Make this command work when in the show buffer, and not just in the folder buffer pointing to a message. 2002-10-20 Peter S Galbraith * mh-seq.el (mh-narrow-to-subject-sequence): Renamed from mh-narrow-to-subject-thread. (mh-subject-to-sequence): Renamed from mh-subject-thread-to-sequence. (mh-delete-subject-sequence): Renamed from mh-delete-subject-thread. (mh-next-unseen-subject-sequence): Renamed from mh-next-unseen-subject-thread. (mh-toggle-subject-thread): Removed. :-( * mh-e.el: s/subject-thread/subject-sequence/ (mh-thread-map): Bind mh-widen to "w". * mh-utils.el: s/subject-thread/subject-sequence/ (mh-show-thread-map): Bind mh-widen to "w". 2002-10-20 Satyaki Das * mh-seq.el (mh-thread-folder): This function is no longer interactive. The mh-toggle-threads is the interactive function that gets called by the user. Also the already computed values in mh-first-msg-num and mh-last-msg-num are used instead of recomputing the first and last message indices in the current folder. (mh-toggle-threads): New interactive function that toggles threaded view of the folder. * mh-utils.el (mh-letter-toggle-threads): New interactive function which toggles thread view from show buffer. This function replaces mh-letter-thread-folder. (mh-show-folder-map): Use mh-letter-toggle-threads instead of mh-letter-thread-folder. * mh-e.el (mh-folder-map): Use mh-toggle-threads instead of mh-thread-folder. 2002-10-20 Bill Wohler * mh-e.el (mh-scan-folder): Formatting only. (mh-goto-cur-msg): Removed call to mh-last-msg in those cases where there isn't a current message. Since I've started using the speedbar to read my mh-e mail, I've had to use M-< every time to go to the beginning of the new messages. Very annoying! Thus, if there isn't a current message, the cursor is left alone, which sounds like the right thing to do anyway. 2002-10-19 Peter S Galbraith * mh-seq.el (mh-subject-thread-to-sequence): Bug fix. After making the 'subject sequence real, I now have to delete it globally. * mh-seq.el (mh-toggle-subject-thread): Make toggle back to full scan exactly mh-widen (removed moving to current message). * mh-seq.el (mh-subject-thread-to-sequence): Make 'subject sequence a real one, exported to MH. This means you can, for example, mh-forward it. But it also shows up with a mark in the scan output. (Closes SF #489445). 2002-10-19 Bill Wohler * mh-speed.el (mh-speed-view): If there weren't any unseen messages, and you specified a string (a sequence like "last") when prompted for the number of messages to display, you got an error. This has been fixed. 2002-10-19 Mark D Baushke * mh-e.el (mh-last-destination-folder): Destination of last refile command. (mh-last-destination-write): Destination of last write command. (mh-refile-msg): Use 'mh-last-destination-folder and update both it and 'mh-last-destination. (mh-write-msg-to-file): Use 'mh-last-destination-write and update both it and 'mh-last-destination (Closes SF #580772). 2002-10-19 Bill Wohler * mh-comp.el (mh-yank-from-start-of-msg): Changed default to 'attribution. (mh-letter-mode-map): Removed commented-out keybindings as well as alias "C-c C-m a (mh-compose-insertion)." Prefer "C-c C-m i." * mh-utils.el: Removed autoload of help. It no longer appears to be necessary in cvs Emacs (21.4). 2002-10-18 Bill Wohler * mh-e.el (mh-execute-commands): Doc fix. (mh-compat-write-file-hook): Renamed to mh-write-file-functions-compat. (mh-folder-mode): Add mh-write-file-functions-compat instead of mh-compat-write-file-hook 2002-10-18 Peter S Galbraith * mh-utils.el (mh-invisible-headers-show-xface): Killed this variable. (mh-invisible-headers): Use 'mh-show-use-xface instead of 'mh-invisible-headers-show-xface to determine whether to render the X-Face header line visible or not. 2002-10-18 Satyaki Das * mh-e.el (mh-compat-write-file-hook, mh-folder-mode): Use the new macro mh-compat-write-file-hook to use write-file-functions for Emacs 21.4 and local-write-file-hooks for older versions. 2002-10-18 Mark D Baushke * mh-utils.el (mh-invisible-headers): Add more anti-spam headers. 2002-10-18 Peter S Galbraith * mh-mime.el (mh-mml-forward-message): mml-attach-file constructs a malformed composition if the description string is empty, so test for that and call mml-attach-file without that argument if it's an empty string (closes SF #625168). 2002-10-17 Satyaki Das * mh-index.el (mh-index-keymap): Removed extra binding of " ". (mh-index-folder-mode-help-messages): Made the cheat sheet entry of quit like the others. (mh-index-search): If space was pressed in the index buffer before a search result has been shown with ".", the old show buffer would be scrolled. This is confusing since the index and show buffer contents are contradictory. Killing the show buffer here avoids this problem. (mh-index-configure-windows): Refine the window configuration logic. Avoid the two window view unless there is a message being displayed in the show buffer. (mh-index-scroll-up): Rewrite this function. The old version had a bizarre problem where the show buffer wouldn't be scrolled if the speedbar was present. (mh-index-scroll-down): Rewritten because of similar reason as above. 2002-10-17 Peter S Galbraith * mh-comp.el (mh-reply): Add an undo boundary in the undo list before calling 'mh-yank-cur-msg (closes SF #623693). 2002-10-17 Satyaki Das * mh-e.el (mh-folder-mode): Use local-write-file-hooks instead of write-file-hooks. This is required for XEmacs and also the right thing according to GNU Emacs21 documentation. 2002-10-16 Satyaki Das * mh-seq.el (mh-thread-generate): Get threading to work correctly on partial folders. The fix here disregards messages that aren't already present in the buffer. (mh-thread-folder): When querying scan about thread info try to avoid asking about messages that aren't present in the folder buffer. A more efficient fix would be to ask scan about just the messages that are present instead of a range of messages. However that runs the risk of sending long command lines to scan. Another change was to populate the mh-scan-line-map early so that the change in mh-thread-generate would work. (mh-thread-generate-scan-lines): In case duplicates are present make one of them the pseudo parent of the rest. This makes it look prettier if there are multiple duplicates at top level. * mh-comp.el (mh-edit-again): If a buffer in show-mode is being reused then reinsert message file. This should fix SF #624283. * mh-mime.el (mh-mm-display-part): Make sure mh-display-part is always called when we want to remove the displayed MIME part. 2002-10-16 Bill Wohler * mh-speed.el (mh-speed-folder-size): checkdoc fix. (mh-speed-view): Tweaked output to mirror gnus verbiage. Offer to view number of messages in folder rather than mh-large-folder. Replaced (intern mh-unseen-seq) with mh-unseen-seq since the former was generating errors. 2002-10-15 Satyaki Das * mh-speed.el (mh-large-folder): New customizable variable to control mh-e's perception of large folders. (mh-speed-folder-size): New function which computes the size of folder on current line. (mh-speed-view): Modified to handle large folders. If the folder being clicked has unseen messages then only those messages are shown. Otherwise if number of messages in folder is larger than mh-large-folders then the user is asked for the number of messages to be shown. If the folder satisfies neither of the above cases then it is displayed in its entirety 2002-10-15 Bill Wohler * mh-index.el (mh-index-keymap): Use gnus-define-keys. Sorted. Noticed that there were two key bindings for SPACE... * mh-speed.el (mh-folder-speedbar-key-map): Ditto (except for the dup SPACE binding). Completed help in other modes: * mh-utils.el (mh-xemacs-p): Fixed doc. (mh-show-mode-map, mh-show-folder-map, mh-show-sequence-map) (mh-show-thread-map, mh-show-extract-map): Added binding for mh-help. * mh-pick.el (mh-search-folder): Added startup help message. (mh-pick-mode-help-messages): New variable that contains help messages for pick buffer. (mh-pick-mode): Set local buffer variable mh-help-messages to mh-pick-mode-help-messages. * mh-index.el (mh-index-keymap): Added binding for mh-help. (mh-index-folder-mode-help-messages): New variable that contains help messages for MH Index buffer. (mh-index-folder-mode): Set local buffer variable mh-help-messages to mh-index-mode-help-messages. * mh-funcs.el (mh-help, mh-prefix-help): Call substitute-command-keys on the help messages. * mh-e.el (mh-help-messages): Added ,. Ran C-M-q. (mh-help): This autoload doc is now used for more than just the MH-Folder, so drop that specific text. * mh-comp.el (mh-edit-again, mh-extract-rejected-mail) (mh-forward, mh-reply, mh-send-sub): Call mh-letter-mode-message to display a help message at startup. (mh-letter-mode): Set local buffer variable mh-help-messages to mh-letter-mode-help-messages. (mh-letter-mode-help-messages): New variable with help messages for the MH-Letter buffer. (mh-letter-mode-message): New function that displays a startup help message. (mh-letter-mode-map): Added binding for mh-help. Sorted. 2002-10-15 Satyaki Das * mh-speed.el (mh-speedbar-selected-folder-with-unseen-messages-face) (mh-speedbar-folder-face, mh-speedbar-selected-folder-face) (mh-speedbar-folder-with-unseen-messages-face): New faces for mh-e speedbar. (mh-folder-speedbar-buttons, mh-speed-update-current-folder) (mh-speed-add-buttons): Use the new faces. (mh-speed-normal-face, mh-speed-bold-face): Functions to convert to bold face and back to normal face. (mh-speed-set-face): Removed. (mh-speed-highlight): Modified to allow it to be used instead of mh-speed-set-face. Also changes were made to fontify folders with unread messages. (mh-speed-parse-flists-output, mh-speed-parse-flists-output) (mh-speed-invalidate-map): Use mh-speed-highlight instead of mh-speed-set-face. 2002-10-15 Bill Wohler * mh-mime.el, mh-seq.el, mh-speed.el, mh-utils.el: It appears that the cl package has been restructured in 21.4 in such a way that the use of eval-when-compile no longer suppresses warnings when compiling so that (require 'cl) must be called directly (maybe this is a bug in 21.4 ;-). Thus the autoloads of cl are no longer needed. Now compiles clean under 21.4. * mh-e.el (mh-folder-mode): The use of local-write-file-hooks is deprecated in Emacs 21.4, so use add-hook write-file-functions (or write-file-hook for older versions) with the LOCAL argument instead. Now compiles clean under 21.4. * mh-comp.el (mh-yank-cur-msg): Push a mark at the opposite end of the included text to make it easy to jump or delete to the other end of the included text. 2002-10-15 Satyaki Das * mh-comp.el (mh-insert-prefix-string): Remove the erroneous use of set-mark and other related functions. 2002-10-14 Bill Wohler * mh-comp.el (mh-yank-from-start-of-msg): Fixed documentation. It isn't ignored if there is a region. It is still used for the attribution. (mh-yank-cur-msg): Removed unnecessary push-mark when snarfing the entire message. Move the cursor to the end of the snarfed message if there is a region. In this case, push a mark so user can pop to the beginning of the snarfed fragment. (mh-insert-prefix-string): This calls set-mark which I find suspect since I found that my last user mark was deleted after yanking a message. Added a comment to this effect. Will probably add a bug report... * README (Installed, Supported versions): To appear in GNU Emacs 21.3; supported on Emacs 21, 20.7 and XEmacs 21. * mh-funcs.el (mh-concat-list): Deleted. Use mapconcat instead. (mh-help, mh-prefix-help): Use mapconcat instead of mh-concat-list. (mh-ephem-message): Use "%s" in message. * mh-funcs.el (mh-concat-list): New function to concatenate a list of strings into a single string. I would have thought elisp already contained a function like this, but I couldn't find it. (mh-ephem-message): New function to display a message in the minibuffer ephemerally. minibuffer-message seemed like the right function, but it writes to the current buffer oddly enough. (mh-help, mh-prefix-help): New functions to display command cheat sheets in the minibuffer (closes SF #493740). It would be nice to refactor these two into a single function if possible. * mh-e.el (mh-folder-mode-map, mh-folder-map, mh-sequence-map) (mh-thread-map, mh-extract-map): Added ? keybinding for `mh-help' and `mh-prefix-help' (closes SF #493740). (mh-help-messages): New variable to hold various help messages. (mh-help, mh-prefix-help): Autoload from mh-funcs.el. 2002-10-13 Bill Wohler * mh-index.el (mh-glimpse-directory, mh-swish-directory, mh-namazu-directory): New variables that hold the name of the configuration and indexing directory. All are now hidden `.' directories. * mh-e.el, mh-funcs.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-xemacs-compat.el (Docstrings): Converted comments to docstrings, reworded some docstrings to conform to Emacs documentation conventions, and eliminated all checkdoc warnings (except for -flag, which we'll fix after 6.2 is released). 2002-10-13 Satyaki Das * mh-index.el (mh-swish-next-result): Fix a bug in a corner case where the lack of a trailing "/" caused the function to wrongly filter out correct hits. This should fix SF #622679. 2002-10-12 Steve Youngs * mh-utils.el (mh-xemacs-p): Simplify it, don't test for 'defvaralias' and don't use 'running-xemacs'. 2002-10-11 Bill Wohler * mh-comp.el: (Docstrings): Eliminated all checkdoc warnings by converting comments to docstrings and rewording some docstrings to conform to Emacs documentation conventions. 2002-10-11 Steve Youngs * mh-utils.el (mh-xemacs-p): New. (mh-show-use-xface): Use it. (mh-show-xface-function): Ditto. * mh-e.el (toplevel): Ditto. (mh-remove-xemacs-horizontal-scrollbar): Ditto. (mh-folder-mode-map): Ditto. * mh-comp.el (mh-insert-x-mailer): Ditto. * mh-mime.el (gnus-local-map-property): Ditto. (mh-mml-to-mime): Move (require 'mh-utils) to toplevel. (mh-prompt-for-folder): Autoloading this not needed because mh-utils is now required at toplevel. (mh-show-xface): Ditto. (mh-show-addr): Ditto. 2002-10-11 Bill Wohler * Makefile (EMACS_HOME): Set default to $(TOP)/../emacs so it would be useful. * mh-utils.el (mh-invisible-headers): Added various spam header fields. (mh-path-search): Removed argument `func-p' and related code. It was not documented and no one used it. (Docstrings): Converted comments to docstrings, reworded some docstrings to conform to Emacs documentation conventions, and basically eliminated all checkdoc warnings (except for -flag warnings). 2002-10-11 Satyaki Das * mh-seq.el (mh-thread-generate): Kill dead code. 2002-10-10 Satyaki Das * mh-seq.el (mh-region-to-sequence): Don't include point-max in region (closes SF #621632). * mh-utils.el (mh-defun-show-buffer): Fix call of frame-first-window to work with XEmacs. Also avoid warning about cur-buffe-name in XEmacs. (mh-modify, mh-goto-msg): Remove dead code. * mh-speed.el (mh-speed-toggle, mh-speed-add-buttons): Remove dead code. * mh-seq.el (mh-subject-thread-to-sequence, mh-thread-get-message, mh-thread-generate, mh-thread-folder): Remove dead code. * mh-mime.el (mh-mm-inline-message): Remove dead code. * mh-index.el (mh-index-search): Remove dead code. * mh-comp.el (mh-open-line): Remove dead code. * mh-e.el (mh-folder-mode): Use the macro mh-remove-xemacs-horizontal-scrollbar to avoid compiler-warning in Emacs. (mh-remove-xemacs-horizontal-scrollbar): New macro to avoid compiler-warnings. 2002-10-10 Mark D Baushke * Makefile (EMACS_OPTIONS): New macro for command-line compile options. (EMACS): Allow the user to specify which emacs command to use for the compile. (COMPILE_COMMAND): Combine the compile command with its options. (.el.elc): Use the new $(COMPILE_COMMAND). 2002-10-10 Mark D Baushke * mh-speed.el (mh-speed-select-attached-frame): Define a new compatibility macro for getting to the attached-frame. (mh-speed-update-current-folder): Use it. 2002-10-10 Mark D Baushke * mh-speed.el (mh-speed-update-current-folder): Use 'dframe-select-attached-frame if we are in a newer speedbar version that no longer supports the 'speedbar-attached-frame variable. 2002-10-10 Steve Youngs * mh-speed.el (mh-speed-update-current-folder): Use 'dframe-select-attached-frame' if we're in XEmacs. * mh-e.el (mh-folder-mode): Remove the horizontal scrollbar from the MH-Folder buffer if we're in XEmacs. 2002-10-09 Satyaki Das * mh-utils.el (mh-show-xface-function): New global that stores what function needs to be called to display X-Face. (mh-show-xface): Rewritten to avoid compiler warning. 2002-10-09 Peter S Galbraith * mh-utils.el (mh-exchange-point-and-mark-preserving-active-mark): Simplify code for all emacsen to avoid byte-compilation warnings. 2002-10-09 Satyaki Das * mh-mime.el (mh-mm-display-part): If a sub-part of the current part is an inline image then clicking the button keeps the image around. The change fixes this bug. 2002-10-09 Peter S Galbraith * mh-utils.el (mh-exec-cmd-output): Use new function 'mh-exchange-point-and-mark-preserving-active-mark instead of 'exchange-point-and-mark. Fixes a bug in emacs20 and XEmacs21. (mh-exchange-point-and-mark-preserving-active-mark): New function. Does like 'exchange-point-and-mark but doesn't activate the mark. * mh-comp.el (mh-letter-menu): Allow access to "Pull in All Compositions" menu entries when edits have really occurred. Works with "forw: -mime" mh_profile entry, so this fixes a bug. * mh-mime.el (mh-mime-inline-part, mh-mm-display-part): Use line-beginning-position and line-end-position instead of point-at-bol and point-at-eol XEmacs functions. * mh-xemacs-compat.el: Added line-end-position and line-beginning-position compatibility aliases. 2002-10-08 Mark D. Baushke * mh-utils.el (mh-scan-msg-format-regexp): The regexp to find %number(msg). (mh-scan-msg-format-string): Format to be used with the current maximum width of message number for the folder in the `mh-update-scan-format' function. (mh-update-scan-format): Use `mh-scan-msg-format-regexp' for greater flexibility. The message number is no longer anchored to the beginning of the `mh-scan-format-nmh' or `mh-scan-format-mh' format strings. The `mh-update-scan-format' allows for using zero-filled message numbers. 2002-10-08 Peter S Galbraith * mh-e.el (mh-folder-folder-menu): Add entry for "Thread Folder". 2002-10-07 Satyaki Das * mh-seq.el (mh-thread-generate): Use mh-progs to get path to mh executables. * mh-speed.el (mh-speed-flists): Use mh-progs to get path to mh executables right. (mh-speed-folders-actual): Same as above. 2002-10-05 Steve Youngs * mh-comp.el (mh-yank-from-start-of-msg): Make default setting 't' a const. * mh-xemacs-compat.el (match-string-no-properties): Rewrite as a defsubst using 'buffer-substring-no-properties' so we don't grab any extents. (rfc822-goto-eoh): Removed. This exists in the XEmacs mail-lib package. (mail-header-end): Ditto. (mail-mode-fill-paragraph): Ditto. 2002-10-05 Satyaki Das * mh-speed.el (mh-speed-invalidate-map): When called interactively the function will clear mh-speed-folders-cache. 2002-10-02 Satyaki Das * mh-mime.el (mh-insert-mime-button): Rewrite without using replace-match. 2002-10-01 Satyaki Das * mh-mime.el (mh-file-mime-type-substitutions): Reorder code to avoid compiler warning. 2002-10-01 Bill Wohler * Makefile (MH-E-ETC): Moved ChangeLog into MH-E-ETC-ETC since it shouldn't get installed in Emacs. (install-emacs): Install MH-E-IMG into Emacs' lisp/toolbar and MH-E-IMG2 into Emacs' lisp/mail. 2002-10-01 Peter S Galbraith * mh-e.el (mh-tool-bar-reply-3-buttons): New customization. Non-nil means use three buttons for reply commands in tool-bar. If you have room on your tool-bar because you are using a large font, you may set this variable to expand the single reply button into three buttons that won't lead to minibuffer prompt about who to reply to. (mh-folder-tool-bar-map): Use mh-tool-bar-reply-3-buttons to decide how many buttons to use for replying. * mh-mime.el (mh-file-mime-type-substitutions) (mh-file-mime-type-substitute): Fix typos and doc strings. 2002-09-30 Peter S Galbraith * mh-mime.el (mh-file-mime-type): Run Content-Type string returned by file command through mh-file-mime-type-substitute (see below). (mh-file-mime-type-substitute): Possibly change Content-Type string using mh-file-mime-type-substitutions variable. This is mostly because all MS-Office file are seen as application/msword by the file command. (mh-file-mime-type-substitutions): New variable. Defines substitutions to make for Content-Type returned from file command. 2002-09-27 Bill Wohler * README: Moved Id to end of file since it broke outline mode at the beginning. * import-emacs (release): Renamed "mainline" tag to "emacs-mainline" to correspond with existing CVS tag. (EMACS_HOME): Fixed typo in docstring. * mh-utils.el (mh-folder-name-p, mh-defun-show-buffer): Lowercase NIL and T in docstring. (mh-update-scan-format): Fixed typo. * mh-comp.el, mh-e.el, mh-pick.el, mh-utils.el: Updated from CVS Emacs. The only new thing appears to be to downcase NIL and T in the documentation. 2002-09-26 Satyaki Das * mh-seq.el (mh-thread-generate): The threading code will now be more resistant to corruption of messages. Before the change any corruption of message x would cause all messages with indices higher than x to be neglected when threading! 2002-09-23 Peter S Galbraith * mh-mime.el (mh-store-mime-parts): Don't store value into user-customizable variable mh-store-mime-parts-default-directory and use mh-store-mime-parts-directory instead. 2002-09-20 Satyaki Das * mh-seq.el (mh-thread-prune-subject): Use regular expressions to make the subject pruning behave the way it is specified in the imap-thread RFC. * mh-speed.el (mh-speed-folders-actual): Don't use pop when we are not going to use the first element. This avoids a compilation warning with cvs emacs. 2002-09-19 Satyaki Das * mh-utils.el (mh-display-msg): Put the call to set-buffer-modified after mh-show-mode. This is needed for CVS emacs since calling mh-show-mode marks the buffer as modified if font-lock is on. 2002-09-17 Peter S Galbraith * mh-mime.el (mh-store-mime-parts-default-directory): Renamed from mh-store-mime-parts-directory. (mh-store-mime-parts-directory): Renamed from mh-store-mime-parts-directory-default. 2002-09-16 Peter S Galbraith * mh-comp.el (mail-citation-hook): Doc tweaks suggested by Bill. 2002-09-08 Satyaki Das * mh-e.el (autoloads): Reorder autoload of mh-reply to avoid compiler warning. 2002-09-03 Peter S Galbraith * mh-mime.el (mh-store-mime-parts-directory): New defcustom. Default directory to use for mh-store-mime-parts. (mh-store-mime-parts): New Command. Store the MIME parts of the current message. (mh-store-mime-parts-directory-default): New internal working variable. Default to use for mh-store-mime-parts-directory, set from last use. * mh-e.el (mh-folder-seq-tool-bar-map): Add mh-store-mime-parts to toolbar. 2002-08-22 Satyaki Das * mh-seq.el (mh-thread-generate-scan-lines): In threaded view, complete scan lines are printed for all messages (not just the ones at the top of a thread). * mh-index.el (mh-index-insert-scan): Replace use of kill-line since that pollutes the kill-ring. * mh-comp.el (autoloads): Add autoloads for search and subseq to get rid of compiler warnings. 2002-08-19 Peter S Galbraith * reply-to.xpm, reply-to.pbm, reply-from.xpm, reply-from.pbm, * reply-all.xpm, reply-all.pbm: New icons for various reply methods. * mh-e.el (mh-folder-tool-bar-map): Split reply button into three that won't prompt for "from", "to" and "all". * mh-comp.el (mh-reply): Put variable reply-to in the interactive list since it's specified on the command line for the new toolbar. * mh-comp.el (mail-citation-hook): Tweak docs concerning historical usage for supercite. (mh-yank-from-start-of-msg): Add settings 'supercite and 'autosupercite. Rename 'automatic to 'autoattrib. (mh-insert-prefix-string): Invoke sc-cite-original if mh-yank-from-start-of-msg is et to 'supercite or 'autosupercite. 2002-08-17 Satyaki Das * mh-comp.el (compilation-fix): Reorder defvars to avoid warnings during compilation. 2002-08-17 Peter S Galbraith * mh-comp.el (mh-yank-from-start-of-msg): Add 'automatic choice. Do as for `attribution' automatically when show buffer matches the message being replied-to. (mh-reply): Call 'mh-yank-cur-msg when mh-yank-from-start-of-msg is set to 'automatic and show buffer matches message number being replied-to. (mh-show-buffer-message-number): New helper function to get the message number of the current show-buffer. (mh-yank-cur-msg): Handle 'automatic choice the same as 'attribution. (mh-yank-cur-msg): Bug fix. It would bail on error if mh-show-buffer didn't exists. 2002-08-16 Peter S Galbraith * mh-comp.el (mh-insert-x-mailer): It wrongly assumed that Emacs was used even when XEmacs was used. Fixed so X-Mailer header is more exact about what we are using. 2002-08-15 Peter S Galbraith * mh-e.el (mh-version): Change CVS version number to 6.1+cvs just so X-Mailer header is more exact about what we are using. * mh-mime.el (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp, mh-mml-attach-file): "Jeffrey P. Morgenthaler" reported that "require" in emacs 20.3 doesn't handle 3 arguments. We use "load" at the top of file elsewhere anyway to handle such a case of non-essential loading, so switch to that here. 2002-08-06 Satyaki Das * mh-funcs.el (autoload): Add autoload for mh-speed-invalidate-map. * mh-speed.el (mh-speed-add-folder): New function to make the speedbar aware of new folders when they are created by mh-e. * mh-utils.el (mh-prompt-for-folder): Use mh-speed-add-folder to tell speedbar that new folder is being created. Also use folder instead of mkdir to create new folders. 2002-08-01 Peter S Galbraith * mh-utils.el (mh-decode-quoted-printable): Conditionalize the limit of search for quoted-printable. If we're using mm-decode for MIME decoding, it's possible that `mimedecode' could mess our message, so we only run a full search for quoted-printable parts when not using gnus' mm-decode. When using mm-decode, mimedecode can still help by handling the case of the whole message being quoted-printable as opposed to only a part. 2002-07-31 Peter S Galbraith * mh-comp.el (mh-compose-insertion): Moved from mh-mime.el because the pulldown menu were broken in XEmacs21 from this variable being undefined. 2002-07-28 Mark D. Baushke * mh-utils.el (mh-show-mode): Use the default paragraph-start rather than the inherited text-mode value. 2002-07-28 Satyaki Das * mh-seq.el (mh-thread-duplicates): New hash table to track duplicate messages. (mh-thread-get-message): Remove debug code. (mh-thread-canonicalize-id): Modified to handle messages without message-id header. Such messages are given distinct copies of the empty string as message-id. (mh-thread-generate): The function was inadvertently rebuilding the thread tree when message refiles and message deletes are processed. The change here fixes that. Also code has been added to keep track of duplicate message-id's. (mh-thread-generate-scan-lines): Modified to print scan lines for duplicate messages (that is messages with the same message-id). (mh-thread-forget-message): Modified to maintain mh-thread-duplicates. 2002-07-22 Satyaki Das * mh-speed.el (mh-speed-parse-flists-output): Use delete-region instead of kill-region. Otherwise the kill ring gets polluted. 2002-07-16 Satyaki Das * mh-seq.el (mh-thread-update-scan-line-map): New function to refresh the stale scan lines. (mh-thread-inc): Update old scan lines when mh-thread-inc is called. Otherwise notations for deleted and refiled messages get lost and the folder display gets out of sync with real mh-e state. * mh-mime.el (mh-mm-display-part): Call Gnus citation highlight code when text part is displayed. Otherwise buttonized text parts aren't correctly fontified when they are displayed. 2002-07-15 Mark D. Baushke * mh-utils.el (mm-decode): Use load for the Non-fatal depencency on the mm-decode library. * mh-mime.el (mm-decode, mm-uu, mm-view): Use load for the Non-fatal depencencies on the mm-decode, mm-uu and mm-view libraries. 2002-07-15 Satyaki Das * mh-utils.el (mh-require, mh-autoload): Remove these macros. (mh-decode-mime): Initialized to t iff the mm-decode library is present in the load-path. * mh-mime.el (mh-require): Don't use it anymore. 2002-07-15 Mark D Baushke * mh-utils.el (mh-update-scan-format): Rewrite for compatibility with XEmacs as replace-match appears not to have identical functionality with GNU Emacs. (mh-scan-msg-format-regexp): Deleted. This regexp is now hardcoded into the mh-update-scan-format function. 2002-07-12 Satyaki Das * mh-seq.el: Add message threading code. * mh-utils.el (mh-letter-thread-folder): New interactive function that allows switching to threaded view from show buffer. (mh-show-folder-map): Bound "F t" to call mh-letter-thread-folder. (mh-goto-msg): Replace the function to not assume that messages are sorted in the folder buffer. * mh-e.el (mh-folder-threaded-view-p): New buffer local variable in the folder buffer that records whether threaded view is being used currently. (mh-scan-subject-regexp, mh-scan-format-regexp): Get font lock working for threaded view as well. (mh-regenerate-headers): Reset mh-folder-threaded-view-p to nil. (mh-get-new-mail, mh-process-commands): Do incremental threading if folder is in threaded view. (mh-delete-scan-msgs): Update thread tables if folder is in threaded view. (mh-folder-map): Add "F t" as key binding for mh-thread-folder * mh-comp.el (mh-yank-cur-msg): Bug fix. mh-show-buffer is only has a meaningful value in the folder buffer. 2002-07-11 Peter S Galbraith * mh-comp.el (mh-yank-cur-msg): Run only if mh-show-buffer actually exists (otherwise a back-traceable error occurred). * mh-utils.el (mh-find-progs): Run PATH search only when mh-progs, mh-lib and mh-lib-progs are not all already set. This allows the user to set them using a simple setq prior to loading mh-e. This is useful for implementation of mh-e on w32. Note that many commands still call mh-find-path which also parses the mh_profile file (that may still fail on w32), so this is still done often. But it lets us change the mh_profile file and have mh-e see the changed file without exiting emacs and starting over so I left that in. 2002-07-04 Satyaki Das * mh-index.el (mh-index-show): Fixed a bug in mh-index-show which caused it to lose track of point when called from show buffer. 2002-07-04 Mark D. Baushke * Makefile: Add more information and common methods to allow both GNU make and Berkeley make to properly build everything. 2002-07-04 Satyaki Das * mh-mime.el (mh-push-button): Bug fix for mime display with mouse. Select show window before executing the mime display functions. 2002-07-01 Mark D. Baushke * Makefile: Use a conditional variable assignment operator rather than ifndef to let Makefile be used by both GNU make and Berkeley make (or similar versions of make). This does not help Solaris /usr/ccs/bin/make, but Solaris make has problems with the ifndef syntax too. 2002-07-01 Satyaki Das * mh-index.el (mh-index-search): Check for mh-decode-mime before adding mh-mime-cleanup to kill-buffer-hook. * mh-mime.el (mm-destroy-parts): Add definition for old emacs. 2002-06-30 Mark D Baushke * mh-utils.el (mh-update-scan-format): Add documentation string. (mh-scan-msg-format-regexp): Update the regexp to find %(msg). (mh-set-cmd-note): When mh-scan-format-file is not t, dynamic update of mh-cmd-note is wrong. Do not assume that mh-scan-format-nmh and mh-scan-format-mh can be kept in lock-step with mh-cmd-note via mh-set-cmd-note. The mh-scan-format function is now where the updated mh-cmd-note value is put into the scan format. * mh-e.el (mh-generate-new-cmd-note): Add documentation string. (mh-scan-format): Use mh-update-scan-format to get updated copies of mh-scan-format-nmh and mh-scan-format-mh to avoid format skew. (mh-get-new-mail): Do not try to adapt mh-cmd-note unless mh-scan-format-file is equal to t. (mh-scan-format-nmh): No longer buffer local. (mh-scan-format-mh): No longer buffer local. 2002-06-30 Satyaki Das * mh-index.el (mh-index-max-msg-index): New variable to keep track of max message index among search results. If mh-adaptive-cmd-note is non-nil this is used to compute the width of the index field. (mh-index-search): Keep track of max index seen while parsing the search results and set it if mh-adaptive-cmd-note is non-nil. (mh-index-find-max-width): New function to find the required width of the message index field. (mh-defun-index): Binding buffer local variables is bad, so don't do that. (mh-index-show): New argument display-headers-p decides whether the message is displayed in raw form or not. (mh-index-header-display): New interactive function bound to "," which shows the message in raw form. (mh-index-keymap): Add appropriate bindings for backtab and ",". (read-from-string): Add ignore-errors around it so that the code doesn't die when it gets unexpected input. 2002-06-29 Satyaki Das * mh-index.el (mh-count-windows): This function works around the lack of the window-list builtin function in emacs20. 2002-06-29 Mark D Baushke * mh-utils.el (mh-message-number-width): New function to scan the last message of a folder and return its width. (mh-adaptive-cmd-note): New variable, if Non-nil indicates that mh-set-cmd-note should be called with the message width for the folder. (mh-cmd-note): Update documentation. (mh-update-scan-format): Helper function for updating the mh-scan-format-nmh and mh-scan-format-mh variables. (mh-scan-msg-overflow-regexp): New variable to help find problem messages after an inc. (mh-scan-msg-format-regexp): New variable to find the old message width in one of the mh-scan-format-nmh or mh-scan-format-mh variables. (mh-set-default-cmd-note): Replaced by mh-set-cmd-note. (mh-set-cmd-note): New function to replace update mh-cmd-note value. * mh-e.el (mh-regenerate-headers): If mh-adaptive-cmd-note is non-nil, use mh-set-cmd-note on empty folder buffers. (mh-make-folder): Ditto. (mh-generate-new-cmd-note): New function to adapt the mh-cmd-note to fit when mh-get-new-mail gets message number truncation. (mh-get-new-mail): Maybe use mh-generate-new-cmd-note if mh-adaptive-cmd-note is Non-nil. 2002-06-29 Satyaki Das * mh-speed.el (mh-speed-view): The display gets confused if the cursor is in the show buffer when mh-speed-view is called. This is a fix for that. 2002-06-27 Satyaki Das * mh-e.el (mh-next-undeleted-msg): Get rid of optional arg reverse-p. If there are no more undeleted messages the point remains at its original position and a message is produced (closes SF #494304). (mh-previous-undeleted-msg): Change similar to mh-next-undeleted-msg. (mh-next-msg, mh-refile-msg, mh-delete-msg): Backout previous change. (mh-folder-map): Bind "S-tab" and "K S-tab" to mh-prev-button. * mh-utils.el (mh-show-mode-map): Bind "S-tab" and "K S-tab" to mh-letter-prev-button. * mh-mime.el (gnus-newsgroup-name): Initialize it to nil, so that mm-uu-dissect doesn't cause error. 2002-06-27 Mark D Baushke * mh-utils.el (mh-cmd-note): Make buffer-local. Changes to this variable should be made via the new mh-set-default-cmd-note function. (mh-set-default-cmd-note): New function to setq-default the mh-cmd-note, mh-scan-format-mh and mh-scan-format-nmh values to related values. * mh-e.el (mh-scan-format-mh): Make buffer-local. (mh-scan-format-nmh): Ditto. (mh-scan-good-msg-regexp): Use a more general regular expression so that the width of message numbers, mh-cmd-note, may vary. (mh-scan-deleted-msg-regexp): Ditto. (mh-scan-refiled-msg-regexp): Ditto. (mh-scan-cur-msg-number-regexp): Ditto. (mh-scan-cur-msg-regexp): Ditto. (mh-scan-subject-regexp): Ditto. 2002-06-26 Satyaki Das * mh-speed.el: Speedbar support code. * Makefile: Add mh-speed.el to MH-E-SRC. * mh-utils.el (mh-prompt-for-folder): Add speedbar hook if speedbar is being used. * mh-funcs.el (mh-kill-folder): Add speedbar hook if speedbar is being used. * mh-e.el (speedbar-autoloads): Autoload speedbar initialization functions so that speedbar can find them. 2002-06-25 Satyaki Das * mh-index.el (mh-grep-execute-search, mh-grep-next-result): Allow grep to be used to search mail. (mh-index-font-lock-keywords): Modified to avoid bug when using lazy font-lock. * mh-e.el (mh-delete-msg, mh-refile-msg): Modify so that if no undeleted (or unrefiled) message exists in the current movement direction then try to find an undeleted (or unrefiled) message in the opposite direction instead. (mh-next-undeleted-msg): Added a new optional argument. If non-nil search for undeleted message backwards if none exists in the forward direction. (mh-previous-undeleted-msg): Added an optional argument. If non-nil search for undeleted message in the forward direction if none exists in the backward direction. (mh-next-msg): Optional argument to change direction if undeleted messages are not found in the current direction. * mh-index.el (mh-cmd-note): Use mh-cmd-note instead of hardcoding the index field size to 4. * mh-utils.el (mh-show-addr, mh-show-xface): New functions added to do xface display and goto-addr interface to allow reuse by the mime display code. (mh-show-mode): Use mh-show-addr and mh-show-xface. Only add mh-mime-cleanup to kill-buffer-hook if mime decoding is enabled. (mh-modify): Use mh-letter-mode instead of mh-show-mode when editing messages. * mh-mime.el (mh-mm-inline-message): Arrange for xface and highlighting to work in forwarded messages. 2002-06-23 Peter S Galbraith * mh-comp.el (mh-yank-from-start-of-msg): Add 'attribution' option to add an attribution line in mh-yank-cur-msg. (mh-extract-from-attribution-verb): Verb to use for attribution when a message is yanked by mh-yank-cur-msg. Provides a method for setting a different language. (mh-yank-cur-msg): Add support for 'attribution' option. (mh-extract-from-attribution): Function to get the attribution line, or the sender from the From: line in the current show buffer. 2002-06-20 Satyaki Das * mh-index.el (mh-index-show): mh-display-msg was not being called in the show buffer. This causes weird results on some mime messages. * mh-mime.el (gnus-newsgroup-charset): Defvar to avoid error in pgp messages if gnus hasn't been used yet. * mh-comp.el (mh-letter-mode-map): Typo fix. 2002-06-19 Satyaki Das * mh-mime.el (mh-mml-secure-message-encrypt-pgpmime): Typo fix. (compiler-warnings): Add autoloads to remove compiler warnings. * mh-index.el (autoload-fixes): Fix autoload forms. 2002-06-18 Satyaki Das * mh-comp.el (mh-letter-mode-map): Change binding of "\C-c\C-ma" to mh-compose-insertion. Remove duplicate binding for "C-c\C-mf". (compiler-warnings): Add defvar to remove compiler-warning. 2002-06-18 Peter S Galbraith * mh-comp.el (mh-letter-menu): Conditionalize GPG function on mh-gnus-pgp-support-p. * mh-mime.el (mh-mml-forward-message): s/subseq/substring/. (mh-compose-forward): cut&paste typo: s/messages/message/. (mml-minibuffer-read-file): autoload added. (mml-minibuffer-read-description): autoload added. (mml-insert-empty-tag): autoload added. (mh-mml-secure-message-sign-pgpmime): Check mh-gnus-pgp-support-p. (mh-mml-secure-message-encrypt-pgpmime): Check mh-gnus-pgp-support-p. 2002-06-17 Peter S Galbraith * mh-utils.el (mh-show-use-xface): Check for availability of `uncompface' executable on system. * mh-mime.el (mh-compose-forward): New front end for both mh-mml-forward-message and mh-mhn-compose-forw. (mh-compose-insertion): New front end for both mh-mml-attach-file and mh-mhn-compose-insertion. (mh-mml-to-mime): New function. Compose mime message from mml directives. (mh-mml-forward-message): New function. Forward a message as attachment. (mh-mml-attach-file): New function. Attach a file to the outgoing MIME message. (mh-mml-compose-insert-p): New variable. Buffer-local variable to know whether MIME insertion was done. Triggers an automatic call to `mh-mml-to-mime' in `mh-send-letter'. (mh-mml-secure-message-sign-pgpmime): New function. Front end to mml-secure-message-sign-pgpmime. (mh-mml-secure-message-encrypt-pgpmime): New function. Front end to mml-secure-message-encrypt-pgpmime. * mh-comp.el (mh-send-letter): automatic call to `mh-mml-to-mime' if mh-mml-compose-insert-p is set. (mh-letter-mode-map): Add keys for new mh-mime functions above. * mh-comp.el: Added autoloads for new mh-mime functions above. 2002-06-17 Peter S Galbraith * mh-utils.el (mh-show-use-xface): new defcustom to determine whether to call external package x-face to display the x-face. (mh-invisible-headers-show-xface): variable now defaults to value of mh-show-use-xface. (mh-show-mode): When mh-show-use-xface is t, invoke external package x-face to display the x-face. 2002-06-15 Satyaki Das * mh-e.el (mh-prev-button): New interactive function which moves point to the previous mime button in the show buffer. (mh-folder-mode-map): Bind M-TAB and K M-TAB to mh-prev-button. * mh-utils.el (mh-show-mode-map): Bind M-TAB and K M-TAB to call mh-letter-prev-button (which is analogous to mh-prev-button). (mh-gnus-pgp-support-p): New global variable to replace the variable mh-recent-gnus-p. The name better describes what it is used for. * mh-mime.el (mh-mime-display-part, mh-mime-display-single): Use mh-gnus-pgp-support-p instead of mh-recent-gnus-p. 2002-06-12 Satyaki Das * mh-mime.el (mh-display-buttons-for-inline-parts): New customizable variable. When non-nil inline parts have are displayed with a button (that is initially expanded). (mh-maybe-insert-newline): The function has been removed. (mh-mime-display-single): Add code to display buttons for inline parts. Reduce the insertion of extra newlines between inline parts and also for pgp signature parts. (mh-mm-display-part): The function has been rewritten and cleaned up. There was a bug which could change the show buffer if the user pressed C-g while a mime part was being displayed has been fixed. (mh-press-button, mh-push-button): Use unwind-protect to make sure that set-buffer-modified-p is always called after mime display. (mh-mime-inline-part): The behavior of the function has been changed so that it toggles the display of the raw bytes. (mh-mime-display-security): Remove the display of too many newlines. (documentation): Remove most check-doc warnings. * mh-comp.el (mh-filter-out-non-text): Updated since whitespace added around mime buttons have changed. 2002-06-10 Satyaki Das * mh-index.el (mh-index-last-search, mh-index-search): The default prompt in mh-index-search has been removed since currently there is no good way of reading "+" with mh-prompt-for-folder. (mh-index-folder-mode, mh-index-show-mode): New major modes derived from mh-folder-mode and mh-show-mode respectively. They use a restricted keymap compared to the parent modes. (mh-index-folder-face): New customizable face to display folder names in the index buffer. (documentation): Change two spaces after period back to one. 2002-06-08 Satyaki Das * mh-e.el (mh-folder-toggle-mime-part): New interactive function to control mime display from folder buffer. (mh-folder-inline-mime-part): New interactive function to inline raw mime part from folder buffer. (mh-folder-save-mime-part): New interactive function to save mime part from folder buffer. (mh-folder-mode-map): Add keybindings for "K v", "K o", "K i" and "K \t" to mh-folder-mode-map. (mh-goto-next-button): Modified to allow searching for next button that satisfies some condition. (mh-folder-mime-action): Support function for mh-folder-save-mime-part, mh-folder-inline-mime-part and mh-folder-toggle-mime-part. * mh-utils.el (mh-show-mode-map): Modify keymap to add appropriate bindings for "K v", "K o", "K i" and "K \t". * mh-index.el (documentation): Fix docs according to checkdoc format. 2002-06-07 Satyaki Das * mh-seq.el, mh-funcs.el (Compiler): Remove (require 'view) and instead add defvar for view-exit-action. 2002-06-06 Satyaki Das * mh-comp.el (mh-insert-x-face): If transient-mark-mode is enabled the call to mark returns error. So avoid using mark. * mh-index.el: Support for new interactive function mh-index-search. * mh-e.el (mh-next-button, mh-goto-next-button): Refactor mh-next-button so that the code may be reused by mh-index.el. (mh-folder-map): Add key "F i" to call mh-index-search. * mh-utils.el (mh-recent-gnus-p): Fix documentation. (mh-msg-folder, mh-display-msg): The new function mh-msg-folder maps a MH folder name to the buffer displaying it. In normal operation the two names are identical but they are different in a folder buffer generated by index search. Minor modification to mh-display-msg to use mh-msg-folder to enable mh-index-search to reuse code. (mh-show-mode-map): Add key "F i" to call mh-index-search. * Makefile: Add mh-index.el 2002-06-05 Peter S Galbraith * mh-e.el (mh-folder-message-menu): Add an entry for mh-modify. 2002-05-31 Satyaki Das * mh-utils.el (mh-decode-quoted-printable): Only decode if the whole message is encoded. So restrict the search for the content-transfer-encoding header to the headers of the message itself. * mh-mime.el (mh-mime-display-alternative): Make sure that point is moved after mm-display-part is called. 2002-05-29 Satyaki Das * mh-mime.el (mh-mime-display-single): Fix the logic that determines when an attachment is buttonized. For inline parts that can't be displayed a button is now created. 2002-05-29 Satyaki Das * mh-e.el (mh-regenerate-headers): Fix an error in which the mh-mode-line-annotation was not being set properly. * mh-mime.el, mh-utils.el (compilation): Macros mh-require and mh-autoload are used to make sure that emacs20 doesn't croak when it tries to load non-existent mm-* files. (mh-decode-mime): Make it default to nil for Emacs major version below 21. 2002-05-28 Satyaki Das * mh-e.el (mh-regenerate-headers): Generalize the function to handle multiple ranges. 2002-05-25 Satyaki Das * Makefile, mh-comp.el, mh-e.el, mh-funcs.el, mh-seq.el, mh-utils.el: Reduce use of eval-when-compile so that load-path is not changed if lisp files are loaded without compilation. * mh-e.el (mh-next-button, mh-folder-mode-map): New interactive function to advance point to next MIME button. It is bound to TAB. * mh-utils.el (mh-letter-next-button, mh-show-mode-map): New interactive function mh-letter-next-button has been added to advance point to the next MIME button. It is bound to TAB. * mh-mime.el (comments): Added some comments. 2002-05-24 Satyaki Das * mh-mime.el (compilation): Replace (eval-when-compile ...) by (eval-when (compile) ...) to remove a bug when mh-e is loaded without compilation. 2002-05-23 Satyaki Das * mh-comp.el (compilation): Some code was rearranged to avoid compiler warnings. * mh-e.el (compilation): Code rearrangement and extra autoloads to remove compiler warnings. (mh-quit): Add call to mh-destroy-postponed-handles to remove handles that are associated with external viewers. Also fixed a bug that I accidentally introduced by adding an extra line when cut and pasting my changes. * mh-func.el (compilation): Code rearrangement to remove compiler warnings. * mh-mime.el (compilation): Code rearrangement to remove compiler warnings. (mh-defun-compat): New macro to define to useful functions that aren't present in old Gnus. (mh-destroy-postponed-handles): New function to cleanup handles that are associated with external viewers. (mh-handle-set-external-undisplayer): New function to replace mm-handle-set-external-undisplayer. It associates handles for external viewers with the folder buffer. These are released when the user quits the folder. (mh-mime-display, mh-press-button, mh-push-button): Hook in mh-handle-set-external-undisplayer. (mh-maybe-insert-newline): New function to avoid inserting too many newlines between mime parts. (mh-mm-display-part): Workaround for Gnus bug which causes new lines to be inserted when images are shown inline. (mh-mime-display-security): Cut down on newlines inserted. * mh-pick.el (compilation): Code rearrangement to remove compiler warnings. * mh-seq.el (compilation): Code rearrangement to remove compiler warnings. (comments): Remove @SD from comments. * mh-utils.el (compilation): Slight code rearrangement. (mh-defun-show-buffer): Fix documentation so that the first line is not too long as was the case earlier. Use mh-previous-window-config to remember where the cursor should return functions like mh-reply. (mh-display-msg): Initialize handles data-structure for the folder buffer so that postponed handles can be added to it. (mh-add-msgs-to-seq): Always keep messages in the sequences sorted. This removes some unexpected behavior when working with sequences that go out of sync with the corresponding MH sequences. (mh-canonicalize-sequence): New function to sort and remove duplicates from mh-e sequence. 2002-05-21 Satyaki Das * mh-utils.el (require): Load mm-decode.el here so that mm-inline-media-tests is properly initialized. * mh-comp.el (mh-yank-cur-msg): Don't try to remove the displayed mime parts when yanking the message. This also fixes the problem of regions not being respected during the yank. 2002-05-20 Satyaki Das * mh-utils.el (compiler-warnings): Some code was rearranged to remove all compiler warnings. (mh-decode-mime): New defcustom to control whether mime attachments are shown using Gnus. (mh-globals-hash): New global variable which maps a given buffer to the corresponding mime data structures. (mh-recent-gnus-p): New global variable which checks if Gnus is recent enough so that PGP/GPG encrypted messages can be handled. (mh-mm-inline-media-tests): Tests to determine whether a mime part can be shown inline. (mh-gnus-article-highlight-citation): Shadow the Gnus function, gnus-article-add-button before gnus-article-highlight-citation is called. This prevents the insertion of useless buttons in the message. (mh-show-mode): Don't set font-lock-support-mode to nil. Modify kill-buffer-hook to call mh-mime-cleanup. (mh-modify): Only the edit buffer is shown. (mh-display-msg): Add call to mh-mime-display, mh-display-smileys, mh-display-emphasis when mh-decode-mime is non-nil. * mh-mime.el (mh-buffer-data): New structure to keep track of per-buffer mime information. (compiler-warnings): Some code was rearranged to get rid of all compiler warnings. (mh-graphical-smileys-p): New defcustom which controls whether graphical smileys are shown. (mh-graphical-emphasis-p): New defcustom for graphical emphasis. (mh-max-inline-image-width, mh-max-inline-image-height): New defcustoms for inlining image. (gnus-local-map-property, mm-merge-handles): Copy utility functions for use with version of Gnus that ships with Emacs21.1. (mh-mime-cleanup): New function to free mime data-structures. (mh-add-missing-mime-version-header): New function to add missing Mime-Version header if a Content-Type header exists. (mh-display-smileys): New function to show graphical smileys. (mh-display-emphasis): New function to show graphical emphasis. (new-globals): New variables mh-mime-button-* and mh-mime-security-* were added to control mime buttons. (mh-mime-display): New function to display mime messages. The functions mh-mime-display-part, mh-mime-display-alternative, mh-mime-display-mixed, mh-mime-part-index, mh-small-image-p, mh-mime-display-single, mh-insert-mime-button, mh-mm-display-part, mh-press-button, mh-push-button, mh-mime-save-part, mh-mime-inline-part, mh-widget-press-button, mh-mm-inline-message, mh-mime-display-security, mh-mime-security-show-details, mh-mime-security-press-button and mh-insert-mime-security-button were added to support mh-mime-display. * mh-e.el (mh-header-display): Bind mh-decode-mime to nil when mh-show-msg is called, so that mime isn't decoded when headers are displayed. (mh-quit): The show buffer is killed instead of invalidating and burying it. * mh-comp.el (mh-yank-cur-msg): Filter out the mime buttons from the yanked message. (mh-filter-out-non-text): New function to filter out attachments from message being yanked. 2002-05-20 Bill Wohler * mh-utils.el (mh-invisible-headers-show-xface): First sentence of docstring was not entirely on first line so was truncated in customize and help buffers. Reworded so first sentence could fit within 80 columns per checkdoc recommendation. (mh-defun-show-buffer): Reworded per checkdoc recommendations. Removed @SD while I was in there. 2002-05-18 Satyaki Das * mh-seq.el (mh-narrow-to-seq): This function now removes the current message notation in the folder. Otherwise, two current message notations may be present after mh-widen is called. Also mh-copy-seq-to-eob is called instead of mh-copy-seq-to-point since the latter has a bug. (mh-copy-seq-to-point): This function has a tricky problem. It calls mh-map-to-seq-msgs which uses mh-goto-msg. mh-goto-msg assumes that the folder is sorted (since it uses binary search). The assumption isn't true, so it may not copy all the messages. Since this function is not used any more it has been removed. (mh-copy-seq-to-eob): This function is a specialized (and hopefully correct) replacement for mh-copy-seq-to-point. 2002-05-17 Satyaki Das * mh-utils.el (mh-gnus-article-highlight-citation): Workaround for problem caused by low value of recursive-load-depth-limit in Emacs21.1 and CVS version of Gnus. (mh-show-mode-map): New keymap variable to facilitate use of summary commands from the show buffer. (mh-show-folder-buffer): New local variable which keeps track of the folder-buffer corresponding to the message being shown. (mh-defun-show-buffer): New macro to convert interactive functions callable in the summary buffer to interactive functions callable in the show buffer. (mh-show-mode): Make buffer read-only and use mh-show-mode-map as keymap (closes SF #527946). (mh-modify): New interactive function to edit a message in-place. * mh-e.el (mh-goto-cur-msg): Add an optional argument, minimal-changes-p. If non-nil, the function will just change the point to current message and do not change folder display. (mh-folder-mode-map): Make "M" call mh-modify. 2002-05-07 Peter S Galbraith * mh-utils.el (mh-invisible-headers-show-xface): New defcustom variable. If non-nil, the X-Face header line will be excluded from the variable `mh-invisible-headers'. Set this when using a package such as x-face-el to display X-Face icons in mh-show-mode. This variable's setting will eventually be set automatically when mh-e does its own X-Face decoding (or this variable will be replaced by one telling mh-e to decode the X-Face). We may not ship the next release with this variable. 2002-05-07 Peter S Galbraith * mh-comp.el (mh-x-face-file): New defcustom variable. File name containing the encoded X-Face string to insert in outgoing mail. (mh-insert-x-face): New function. Appends an X-Face field to the header, but only if it doesn't already exist and if 'mh-x-face-file' is non-nil and points to an existing file. (mh-send-letter): Invoke mh-insert-x-face. 2002-04-29 Mike Kupfer * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Check whether XEmacs region is actually active (needed at least for 21.1). [Patch committed by psg] 2002-04-29 Mike Kupfer * mh-utils.el (mh-prompt-for-folder): Remove "default" argument from completing-read as XEmacs-21.1 doesn't have it (21.4 does however) and using the argument adds no functionality. [Patch committed by psg] 2002-04-11 Peter S Galbraith * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Add support for XEmacs to act on selected region when active. 2002-04-10 Peter S Galbraith * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): XEmacs fix; Add check to see if mark-active is bound, because Mandrake Linux include XEmacs initialization code that binds transient-mark-mode. This fix gets around a problem in Mandrake only. It wasn't a problem on XEmacs generally. Fixes SF #541915. 2002-04-08 Bill Wohler Released mh-e version 6.1. * mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp to increase robustness. (mh-folder-unseen-seq-list): Use `expand-file-name' as `mh-expand-file-name' isn't needed and the former saves function call. (Version, mh-version): Updated for release 6.1. 2002-04-08 Peter S Galbraith * mh-e.el (mh-folder-unseen-seq-list): Specify mh-progs path in call to mark command. Fixes a bug in which unseen messages weren't highlighted if "mark" wasn't in the path. 2002-04-07 Bill Wohler * MH-E-NEWS: Updated for release 6.1. * README: Updated for release 6.1. Updated verbiage about reading MH-E-NEWS. * mh-comp.el, mh-e.el, mh-funcs.el, mh-mime.el, mh-seq.el, mh-utils.el, mh-xemacs-compat.el: Updated copyright in files modified this year. * mh-xemacs-compat.el: Put Author field back in, but set to FSF. * mh-comp.el, mh-funcs.el, mh-mime.el, mh-seq.el, mh-utils.el: Fixed all checkdoc errors, except for no documentation, and documentation in comments. Also removed the- prefix from certain local variables. * mh-e.el: Fixed all checkdoc errors, except for no documentation, and documentation in comments. Also removed the- prefix from certain local variables. (mh-folder-unseen-seq-name): Refactored to make default sequence name more explicit and to handle undefined Unseen-Sequence MH profile entry better. 2002-04-02 Peter S Galbraith * mh-e.el: 'defvar mh-folder-unseen-seq-name' called a function to set its value, and this happens also on byte-compilation (where it can fail if the user's MH environment is not setup correctly). I now set the value of mh-folder-unseen-seq-name at runtime when I first need it. This should fix Debian bugs http://bugs.debian.org/140232 and http://bugs.debian.org/140817 2002-03-25 Peter S Galbraith * mh-utils.el: remove "(require 'mh-e)" since mh-utils.el should be at the bottom of the dependency tree. * mh-e.el (mh-folder-unseen-seq-name): Make sure mh-progs is set and use it as path to mhparam command in call-process. 2002-01-23 Peter S Galbraith * mh-e.el (mh-folder-font-lock-keywords): Add call to mh-folder-font-lock-unseen to fontify unseen messages in bold. (mh-folder-unseen-seq-name): Provide name of unseen sequence from mhparam. Used as default for variable of same name. (mh-folder-unseen-seq-list): Returns a list of unseen messages numbers for current folder. (mh-folder-unseen-seq-cache): Cache variable to hold list of unseen message numbers while font-lock iterates. This variable is buffer-local. (mh-folder-font-lock-unseen): Returns unseen message lines to font-lock one by one. 2002-01-15 Peter S Galbraith * mh-comp.el (mh-insert-prefix-string): Wrap a "(let ((zmacs-regions nil))" around (mark) so it works in XEmacs. Bug reported and fix suggested by Will Partain Indeed, this is how it appears in XEmacs-21's mh-comp.el. 2001-12-16 Jeffrey C Honig * mh-comp.el (mh-forward): Move the assignment to `fwd-msg-file' to before the assignment to `draft' as the later changes buffers and invalidates `mh-seq-list' (which is used in a function called by (mh-seq-to-msgs)). Resolves SF #489448. * mh-utils.el: Add defcustoms for `mh-temp-folders-buffer' and `mh-temp-sequences-buffer'. * mh-e.el (mh-quit): If they exist, kill 'mh-temp-buffer, 'mh-temp-folders-buffer and 'mh-temp-sequences-buffer when quitting. * mh-funcs.el (mh-list-folders): Use `mh-temp-folders-buffer' (a defcustom initialized to "*Folders*") for folder listing. Put into view mode and set it up to kill the buffer when exiting view mode. * mh-seq.el (mh-list-sequences): Use `mh-temp-sequences-buffer' (a defcustom initialized to "*Sequences") for sequences listing. Put into view mode and set it up to kill the buffer when exiting view mode. 2001-12-16 Bill Wohler Released mh-e version 6.0. * MH-E-NEWS: Be a little more specific about incompatible changes. Added info about outdated manual. Removed variables in mh-scan regexp table that did not exist in 5.0.2. Added helpful documentation about finding relevant variables containing regexps to mh-scan-format-file's description. * mh-e.el (mh-scan-format-file): Added information about getting a list of regexp variables that you'll need to change if you customize your scan's output. (mh-folder-mode): Added documentation about `mh-scan-format-file' for those users who modify their scan formats. * README: New file. Describes packages and provides simple installation instructions. * Makefile (clean, dist, install-emacs): Replaced $(RM) with rm -rf (closes SF #488661). 2001-12-14 Bill Wohler 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 all. (MH-E-IMG2): New variable to hold images in mail sub-directory. (dist): Updated target to make mail sub-directory and copy MH-E-IMG2 images there. * mh-xemacs-compat.el: Modified docs per GNU coding conventions. * mh-e.el: Reorganized variables having to do with the scan line. Moved some random variables that were interspersed out of the middle. Moved `mh-scan-format-file' first and let the variables flow from there. As the number of variables increases, it is becoming important to organize the mh-e namespace. Several variables having to do with the format of scan lines were renamed, as follows: (mh-good-msg-regexp): Renamed to mh-scan-good-msg-regexp. (mh-deleted-msg-regexp): Renamed to mh-scan-deleted-msg-regexp. (mh-refiled-msg-regexp): Renamed to mh-scan-refiled-msg-regexp. (mh-valid-scan-line): Renamed to mh-scan-valid-regexp. (mh-cur-msg-number-regexp): Renamed to mh-scan-cur-msg-number-regexp. (mh-cur-msg-line-regexp): Renamed to mh-scan-cur-msg-regexp. (mh-scan-rcpt-addr-regexp): Renamed to mh-scan-rcpt-regexp. (mh-scan.font-lock-regexp): Renamed to mh-scan-format-regexp. (mh-folder-scan-font-lock-face): Renamed to mh-folder-scan-format-face. (mh-folder-cur-msg-line-face): Renamed to mh-folder-cur-msg-face). 2001-12-13 Bill Wohler * mh-utils.el (mh-msg-number-regexp): Renamed to mh-scan-msg-number-regexp. (mh-msg-search-regexp): Renamed to mh-scan-msg-search-regexp. * Corrected typos, quoted variables in doc strings, and made minor wording changes in docs. 2001-12-13 Peter S Galbraith * mh-xemacs-compat.el: defalias 'match-string-no-properties to 'match-string for XEmacs. I've seen a better function for this that actually removes text properties, but this will do for now. * mh-utils.el (mh-decode-quoted-printable): deactivate-mark not bound in XEmacs. * mh-xemacs-compat.el: GNU Emacs Functions needed by XEmacs. New file. * mh-e.el: (require 'mh-xemacs-compat) when running XEmacs. 2001-12-12 Peter S Galbraith * mh-comp.el (mh-send-letter): function local-variable-p needs two arguments in XEmacs. (mh-send-letter): sendmail-coding-system not bound in XEmacs. (mh-send-letter): default-buffer-file-coding-system not bound in XEmacs. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): transient-mark-mode not bound in XEmacs. The feature of operations made on all messages in the selected range when transient-mark-mode is on doesn't work in XEmacs. * mh-e.el, mh-utils.el: Conditionalize calls to 'add-to-list 'facemenu-unlisted-faces for XEmacs. 2001-12-11 Jeffrey C Honig * mh-e.el (mh-scan-format): Add `mh-scan-format-file' variable to specify the scan format string or file to use. Define formats for MH and nmh that are compatible with the standard format, but provide hints for font-lock. Define (mh-scan-format) for use by (mh-regenerate-headers) and (mh-get-new-mail) to specify the args necessary to inform the scan program which scan format string or file to use. 2001-12-07 Peter S Galbraith * mh-e.el (scan.font-lock): New format file documented in comments. (mh-scan.font-lock-regexp): Adapted to new format. (mh-folder-font-lock-keywords): Use new format. * mh-e.el (page-down.xpm): Icon renamed from nextpage. * mh-utils.el (mh-decode-quoted-printable): Bug fix. Better check on what actually is a quoted-printable attachment. 2001-12-06 Eric Ding * mh-mime.el (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp): require mailcap.el here rather than using autoload at top of mh-mime. (mh-file-mime-type): get rid of unused variables (why were they there to begin with?) 2001-12-06 Peter S Galbraith * mh-e.el (mh-cur-msg-number-regexp, mh-cur-msg-line-regexp): mh-cur-scan-msg-regexp splits into these two variables. The whole-line fontification is disabled, but easily restored by a user (although it could be a defcustom with choices DISABLED or the correct regexp?) (mh-folder-cur-msg-line-face): mh-folder-current-msg-face renamed to this. (mh-folder-cur-msg-number-face): mh-folder-current-face renamed to this. * cabinet.xpm: Revert to rescan icon name. * mh-e.el (mh-folder-tool-bar-map): s/cabinet/rescan/ * mh-e.el (mh-folder-font-lock-keywords): Reorder and tweak such that current message line highlight doesn't mess up other highlights. 2001-12-05 Eric Ding * mh-utils.el (mh-show-from-face): Change mh-show-from-face to cyan on dark backgrounds; through a series of changes, it had become the same color as mh-show-subject-face! 2001-12-05 Bill Wohler * mh-e.el, mh-utils.el: Fixed typos in face definitions, and made a couple of small doc string tweaks while I was in there. Peter, if you don't agree, let me know and I'll back them out. I thought the "mh-e" in the text was redundant since the variables start with "mh"; I was also thinking ahead to how the documentation may read. 2001-12-05 Peter S Galbraith * mh-e.el (mh-cur-scan-msg-regexp): Match 0 is the whole line. (mh-folder-current-msg-face): New face with only a background settings, used in font-lock for the current message. (mh-folder-font-lock-keywords): Use mh-folder-current-msg-face for mh-cur-scan-msg-regexp. * mh-utils.el (mh-show-from-face): Use red3 instead of red for light backgrounds. It's not as bright on the eyes. (mh-show-subject-face): copy from mh-folder-subject-face instead. Makes the look consistent with folder-mode. * mh-e.el (mh-folder-subject-face): Moved to mh-utils since we need it to copy to mh-show-subject-face. 2001-12-05 Bill Wohler * mh-e.el (mh-folder-mode-map): Moved `mh-extract-rejected-mail' from "a" to "E". Better mnemonic, nicer to folks used to using a for `mh-reply'. 2001-12-04 Bill Wohler * mh-e.el (mh-folder-map): Added "S" for `mh-sort-folder'. 2001-12-04 Peter S Galbraith * mh-e.el (mh-folder-subject-face et al.): Yet another attempt at colors for folder-mode. Still themed, but fewer and darker colors (Blame Eric this time!). I'll get to underlining tomorrow night. * mh-e.el (mh-folder-tool-bar-map): Renamed all icons so they don't have the word mail in them. Also generated a pbm format of each icon for users without XPM support conpiled into Emacs. 2001-12-04 Eric Ding * mh-utils.el (mh-show-font-lock-keywords): Use mh-header-subject-font-lock instead of regexp for subject headers, which may go multiple lines. (mh-header-subject-font-lock): New function. Fix typos (hightlight -> highlight). 2001-12-04 Eric Ding * mh-e.el: changes to face colors on dark backgrounds. (mh-folder-followup-face): change to LightGoldenRod. (mh-folder-date-face): change to snow3. (mh-folder-msg-number-face): change to snow4. 2001-12-04 Bill Wohler Released mh-e version 5.0.92. * mh-utils.el (gnus-cite-face-list) (mh-gnus-article-highlight-citation): Don't autoload. Revert to requiring in `mh-gnus-article-highlight-citation' as before. With the autoloads, if you ran mh-e before gnus, you'd get an undefined gnus variable when viewing an article in gnus. Go figure. 2001-12-03 Bill Wohler Released mh-e version 5.0.91. * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now that workaround has been implemented. * Makefile (MH-E-OBJ): New variable to hold .elc files. (all): Just compile. (clean): New target that blows away MH-E-OBJ. (dist): Added $(MH-E-OBJ) to tarball. Attempt to quiet compilation errors to a dull roar. * mh-e.el: Require easymenu, added autoload of info. (mh-smail, mh-smail-other-window): Comment says these were needed by Emacs 18. Out! * mh-utils.el: Don't require sendmail, but require mh-e. Moved autoloads to top of file, and autoload gnus-cite and sendmail too. * mh-pick.el: Require easymenu. Remove cond on `easy-menu-define'--it exists. * mh-mime.el: Autoload mailcap. * mh-comp.el: Require mh-e and easymenu, moved autoloads to top of file. * Makefile (EMACS): New constant to hold emacs calling sequence. (install): Renamed to install-emacs. (compile): New target to compile all files. (dist): Make dependent on compile. (import): Renamed to import-emacs. (%.elc): New implicit rule to compile elisp files. * mh-e.el (mh-thread-map): Added "Td" for mh-delete-subject-thread. 2001-12-03 Peter S Galbraith * mh-e.el (mh-folder-tool-bar-map): Change tooltip for exec icon. * mh-e.el (mh-folder-subject-face): Change to IndianRed1. (mh-folder-followup-face): Change to IndianRed. (mh-folder-deleted-face): Use sedate face instead of bright one. 2001-12-03 Bill Wohler * mh-utils.el (mh-invisible-headers): Increase size of `max-specpdl-size' locally to work around insufficient default. (mh-invisible-headers): Added X-Info and X-VSMLoop (NTMail). 2001-12-03 Jeffrey C Honig * mh-utils.el (mh-find-progs): Searches should not stop if the strings are not found, there is error detection at the end of the routine (closes SF #488231). 2001-12-02 Bill Wohler * MH-E-NEWS: Added info about bumping up `max-specpdl-size'. * Makefile (MH-E-IMG): New variable that contains images used by mh-e. Add these files to release. * MH-E-NEWS: Second draft of mh-e 6.0 (was 5.1) release notes. * mh-e.el (mh-folder-updated-hook): Reworded to avoid ambiguity. Is the hook called when you type `d' or when you type `x'? (mh-unseen-updated-hook): Reworded to be consistent with `mh-folder-updated-hook.' * mh-utils.el (mh-recenter): Accepted Gerd's change which is evaluated at compile time. 2001-12-02 Bill Wohler * mh-e.el Major, major keymap changes. The specific changes are listed below, but view the sources, or use "C-h m" in MH Folder mode for the complete list. Use of sub-keymaps inspired by gnus. The changes tripped me up at first too, but after about 5 minutes of shock (which is to be expected, I've been using the old keybindings for 16 years), I honestly found the new bindings to be nice indeed. It will also provide flexibility to allow for future functionality. I hate to do this on the eve of the beta release, but you asked for it! It's likely I'll have to pull an Eric and back this change out, but if we can live with pink subjects, this can't be so bad ;-). Question: will the users revolt? If they do, I suppose we can release 6.0.1 the next day ;-). (mh-folder-map, mh-sequence-map, mh-extract-map, mh-digest-map): New keymaps which start with F, S, X, and D, respectively. The mhstore commands can go in the mh-extract-map eventually. (mh-thread-map): Renamed from mh-folder-thread-map. Keymap changes and rationale. The sub-keymaps allowed some consistency (e.g., esp. with l(ist) and k(ill). e Deleted. Already have x. Now used by mh-edit-again. a Deleted. Already have r. Now used by mh-extract-rej.. j Deleted. Already have g. M-a -> e Better mnemonic. Matches rmail. Frees movement cmd. M-e -> a Try `a'gain! M-f -> Fv Frees movement command M-f -> Ff Alias (keep?) M-f -> Fo Alias (keep?) M-k -> Fk No reason but to keep with folder commands M-l -> Fl No reason but to keep with folder commands M-p -> Fp No reason but to keep with folder commands M-r -> Fr Frees movement command M-s -> Fs No reason but to keep with folder commands M-u -> Fu No reason but to keep with folder commands M-% -> Sd Better mnemonic M-# -> Sk Better mnemonic M-q -> Sl Better mnemonic C-xn -> Sn Frees up standard key binding % -> Sp Better mnemonic for putting a message in a sequence ? -> Ss Shows sequences that message is in C-xw -> Sw Frees up standard key binding M-n -> Xs Better mnemonic (shar) M-n -> Xu Better mnemonic (uuencode) M-SPC -> DSPC Frees mark command M-\177 -> D\177 No reason but to keep with digest commands M-b -> Db Frees movement command 2001-12-01 Bill Wohler * mh-e.el: Use gnus style of keymaps. Now requires gnus-util. (mh-folder-thread-map): New map, created by gnus-define-keys. Reached when typing T in mh-folder-mode-map. Moved threading functions to this new keymap so we can use dired again. (mh-folder-mode-map): Defined by gnus-define-keys. Otherwise than the new threading functions, no changes to the UI were made at this point--saving that for the next check-in. * mh-pick.el (mh-pick-mode-map): Use gnus-define-keys. Now requires gnus-util. * mh-comp.el (mh-letter-mode-map): Use gnus-define-keys. Now requires gnus-util. 2001-12-01 Jeffrey C Honig * mh-e.el: Update the documentation for the regexps used by `mh-folder-font-lock-keywords' to specify how many parenthesized expressions they are expected to have and what those expressions are expected to match. 2001-12-01 Bill Wohler * mh-e.el (mh-folder-mode): Removed iteration of key bindings, \\{mh-folder-mode-map} suffices. Removed variable documentation also as this is already out of date and a maintenance hassle. Reference new mh customization group instead. * mh-comp.el (mh-letter-mode): Ditto. Also added new information about MIME directives getting processed automatically if inserted via mh-e commands. * mh-pick.el (mh-pick-mode): Edited documentation so it reads like the other modes. * mh-e.el (mh-compat-quit): Deleted obsolete and unused function. Comment in this function said that `b' shouldn't be used for burst-digest, as it is used for `back' in info, less, and rn. But what does `back' mean in MH Folder? I suppose if you visit a folder, you would go `back' to the original folder. Hmmm, I guess we'll leave the `b' binding alone for now. * mh-utils.el: Moved some of the variable comments to the first column so they wouldn't wrap in such an ugly fashion. (mh-showing-mode): Renamed variable and function from mh-showing to conform with minor mode conventions. Added optional arg to function so it would behave like a normal minor mode: no or nil arg toggles mode, 0 arg turns off, non-nil turns on. It also turns out that desktop-create-buffer would barf when recreating mh-e buffers because it was calling mh-show with an arg. (mh-show-mode): Use define-derived-mode to simplify definition a *lot*. (mh-set-mode-name): Deprecated by use of define-derived-mode. Removed. * mh-pick.el (mh-pick-mode): Use define-derived-mode to simplify definition a *lot*. * mh-e.el (mh-scan-prog): Removed message about "Buffer local" as this message will appear in a future version of Emacs. (mh-inc-folder): mh-showing renamed to mh-show-mode and made a real minor mode. (mh-folder-mode): Use define-derived-mode to simplify definition a *lot*. * import-emacs (release): Change `(none)' to `mainline' so import doesn't choke after running `cvs up -A' on Emacs. (COPYING): Moved from $EMACS_HOME/etc to $EMACS_HOME. (cvs update): Whoops! Forgot the second join (-jemacs). make import works fine again. 2001-11-30 Peter S Galbraith * mh-e.el (mh-folder-font-lock-keywords): Change order of font-lock patterns such that subject body text doesn't get date fontification. * mh-e.el (mh-scan-subject-regexp): Bug fix. Remove a dot. scan.font-lock users have to setq it separately. 2001-11-30 Eric Ding * mh-utils.el (mh-clean-msg-header): Go back to using mh-delete-line. Using invisible text property is nicer in some ways, but winds up with somewhat mysterious behavior should user kill/yank stuff from the header (i.e., text gets yanked invisibly and won't be seen by user until file is reloaded). 2001-11-29 Bill Wohler * mh-e.el (mh-page-msg): Use mh-next-direction to page in the right direction. 2001-11-29 Jeffrey C Honig * mh-e.el (mh-scan-folder): Fix logic to not attempt to go to the current message if there are no messages in the folder. 2001-11-29 Peter S Galbraith * mh-e.el (mh-folder-font-lock-subject): New fontifier function for subject lines in folder-mode. (mh-scan-followup-regexp): Deleted obsolete regexp. Use mh-scan-subject-regexp instead. (mh-folder-font-lock-keywords): Use mh-folder-font-lock-subject instead of obsolete mh-scan-followup-regexp variable. (mh-folder-date-face, mh-folder-msg-number-face): (mh-folder-subject-face, mh-folder-followup-face): Now defined as proper faces instead of copied from font-lock faces. * mh-mime.el (mh-media-type-regexp): New variable. Regexp matching valid media types used in MIME attachment compositions. (mh-file-mime-type): Use mh-media-type-regexp instead of hard-wiring its value. * mh-utils.el (mh-show-unquote-From): New function to unquote "^>From" in mh-show-mode (not saved to disk). (mh-show-mode): Call mh-show-unquote-From. 2001-11-29 Eric Ding * mh-utils.el (mh-clean-msg-header): Use mh-make-line-invisible rather than mh-delete-line. (mh-make-line-invisible): New function to make line(s) invisible rather than deleting line(s). Optional argument specifies number of lines to delete. (mh-show-msg): screen-height has been deprecated; use no more. (mh-notate): screen-width has been deprecated; use no more. 2001-11-29 Jeffrey C Honig * mh-utils.el (mh-find-progs): Change mh-find-progs to rely on the existence of mhparam. The location of mhparam is used to find `mh-progs'. It uses the libdir and etcdir to find the `mh-lib-progs' and `mh-lib' directories. If etcdir doesn't return anything we assume `mh-lib-progs' is the same as `mh-lib' and that we are using MH instead of nmh. 2001-11-29 Peter S Galbraith * mh-e.el (mh-scan.font-lock-regexp): Change docs to reflect that second paren expression is the user match. (mh-folder-font-lock-keywords): Change from 1st to 2nd parenthesized expression to match user name, after Jeffrey's change to the regexps. 2001-11-29 Bill Wohler * mh-utils.el (mh-clean-message-header): Default is now t. (mh-invisible-headers): Padded out to contain all the headers that the mh-e developers don't like to see (closes SF #415759). 2001-11-28 Bill Wohler * mh-comp.el (mh-rejected-letter-start): Added MIME MDN. While this allows mh-extract-rejected-mail to strip the start of the MDN, there is still a closing MIME marker at the end. This should be cleaned up eventually. 2001-11-28 Peter S Galbraith * mh-e.el (mh-folder-seq-tool-bar-map): New tool-bar used for folder-mode when narrowed to sequence. * mh-seq.el (mh-narrow-to-seq): Set tool-bar to mh-folder-seq-tool-bar-map. (mh-widen): Set tool-bar to mh-folder-tool-bar-map. * widen.xpm: New icon used in mh-folder-seq-tool-bar-map. * mh-mime.el (mh-file-mime-type): Much better check on validity of 'file' output. * mh-e.el (mh-scan-subject-regexp): New regexp variable for subject string in folder mode. Used to extract subject sequence, and will be used for font-lock soon. * mh-seq.el (mh-subject-thread-to-sequence): More robust code by using mh-scan-subject-regexp, allows users with non-standard scan format to use subject sequences. * mh-comp.el (mh-letter-fill-column): Fill column to use in mh-letter-mode. (Yes, I'm doing this in spite of what Bill said; Someone can always undo it later) (mh-letter-mode): setq fill-column to mh-letter-fill-column. 2001-11-28 Bill Wohler * mh-e.el (mh-page-msg): The first time the end of page is hit, set mh-page-to-next-msg-p to t. The second time the end of page is hit, go to the next message. * mh-utils.el (mh-show-msg): Initialize mh-page-to-next-msg-p to nil. 2001-11-27 Bill Wohler * mh-mime.el (mh-mime-content-types): Updated list of types to contain types used by mh-e developers, but not including types not listed in http://www.isi.edu/in-notes/iana/assignments/media-types/media-types. 2001-11-27 Peter S Galbraith * mh-seq.el (mh-subject-thread-to-sequence) New function placing all messages with similar subject line into a sequence named 'subject. (mh-narrow-to-subject-thread): New command to narrow to all messages with similar subject line into a sequence named 'subject. (mh-toggle-subject-thread): New command to toggle between a new 'subject sequence or the wide view of a folder. (mh-delete-subject-thread): New command to delete all following messages with similar subject lines (leaving preceding ones untouched). (mh-next-unseen-subject-thread): New command to create and move to a new subject thread created from the next unseen message as a starting point. * mh-e.el (mh-folder-message-menu): New menu entries for subject threads. (mh-folder-mode-map): New keybindings for subject threads. (mh-lessp): New function to sort messages. * mh-utils.el (mh-show-font-lock-keywords): and various faces... scoped within eval-after-load "font-lock" to avoid requiring font-lock to use its faces. * mh-e.el (mh-folder-font-lock-keywords): Same. 2001-11-27 Jeffrey C Honig * mh-mime.el (mh-file-mime-type): Use mh-temp-buffer instead of " *mh-temp". * mh-comp.el (mh-insert-x-mailer): Kill mh-temp-buffer after use. 2001-11-26 Eric Ding * mh-utils.el: revert to using external mimedecode to decode MIME quoted-printable parts 2001-11-26 Jeffrey C Honig * mh-e.el (mh-process-commands): Added mh-folder-updated-hook. * mh-e.el (mh-update-unseen): Added mh-unseen-updated-hook. 2001-11-26 Peter S Galbraith * mh-mime.el (mh-file-mime-type): Make sure output from file command is known to mailcap file, otherwise prompt the user. (mh-mime-content-types): Add "image/png" type. * mh-e.el (mh-folder-font-lock-keywords): Use a bunch of new mh-folder-*-face faces. * mh-utils.el (mh-show-font-lock-keywords): Use a bunch of new mh-show-*-face faces. * mh-utils.el (mh-letter-header-font-lock): Bug fix. Fix infinite loop in emacs20 font-locking. (mh-header-field-font-lock): Preventive fix with similar change. * mh-comp.el (mh-reply-show-message-p): Typo. diplayed -> displayed. * MH-E-NEWS: Same. * mh-e.el (mh-folder-tool-bar-map): Bug fix. I had mh-repack-folder instead of mh-pack-folder. 2001-11-26 Bill Wohler * mh-e.el: Updated header for consistency and to conform with (elisp)Library Headers. (mh-do-not-confirm): Updated documentation string to reflect reality (e.g., is no longer used by mh-kill-folder and is used by more functions than just mh-undo-folder). (mh-page-msg): Now shows the next undeleted message if looking at the bottom of the current message. (mh-process-or-undo-commands): Fixed indentation. * mh-mime.el: (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp): If MIME type cannot be determined with file command, use mailcap-mime-types (if available) to provide list for completing read. * MH-E-NEWS: First draft of mh-e 5.1 release notes. 2001-11-26 Eric Ding * mh-utils.el (mh-decode-quoted-printable): Implement quoted-printable decoding in elisp (starting with code copied from FLIM). (mh-decode-quoted-printable-region): Move (require 'hexl) outside while loop. (mh-decode-quoted-printable): give user a choice between using internal code or external program to decode quoted-printable content. Resurrect code that calls external mimedecode program. 2001-11-25 Peter S Galbraith * mh-utils.el (mh-highlight-citation-p): New variable to determine whether to highlight citations in message body with gnus, font-lock or not at all. (mh-show-font-lock-keywords): removed citations from keywords. (mh-show-font-lock-keywords-with-cite): New variable, equivalent to prior mh-show-font-lock-keywords. (mh-gnus-article-highlight-citation): hook into gnus for multi-level citation highlighting. (mh-show-mode): Use either mh-show-font-lock-keywords or mh-show-font-lock-keywords-with-cite, depending on value of mh-highlight-citation-p, and possibly call mh-gnus-article-highlight-citation. * mh-comp.el (mh-letter-mode): Same as for mh-show-mode above. 2001-11-25 Jeffrey C Honig * mh-comp.el (mh-redistribute): Added mh-redist-background variable to cause mh-redistribute to run the redist command in the background. This causes the transaction log to be visible, like with send. 2001-11-25 Peter S Galbraith * mh-e.el (mh-inc-folder): 'inc' finishes by displaying the first new message if already showing messages. 2001-11-22 Peter S Galbraith * mh-utils.el (mh-prompt-for-folder): Exit with error if no folder specified, otherwise mh-refile-msg may try to create a folder with empty name, and this creates problems; even mh-undo can't handle it (Closes SF #476824). * mh-comp.el (mh-letter-tool-bar-map): Info button needed to require 'info. Also tweaked help texts. (mh-letter-menu): Use headline capitalization (Closes SF #483203). * mh-e.el (mh-folder-tool-bar-map): Same as above. (mh-folder-folder-menu, mh-folder-message-menu): (mh-folder-sequence-menu): Same as above. * mh-pick.el (mh-pick-menu): Same as above. 2001-11-21 Peter S Galbraith * mh-comp.el (mh-reply-show-message-p): 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. (mh-reply): Don't show message in other window if mh-reply-show-message-p is nil. * mh-e.el (mh-folder-tool-bar-map): Add mail_exec.xpm icon for mh-execute-commands. * mh-utils.el (mh-show-mouse): New function to click on a message in folder-mode and show that message. * mh-e.el (mh-folder-mode-map): Bind mh-show-mouse to mouse-2. * mh-e.el (mh-page-msg): Show buffer first if not displayed, instead of simply complaining there's no other window. * mh-e.el (mh-folder-tool-bar-map): New tool-bar for folder mode! (mh-folder-mode): Setup tool-bar. * mh-mime.el (mh-have-file-command): try to non-fatally load executable.el because emacs20 doesn't autoload it. * mh-utils.el (load "executable" t t): Idem. * mh-utils.el (mh-clean-msg-header): Bug fix. locally bind after-change-functions to nil, working around a strange font-lock bug in emacs20 when (add-hook 'mh-show-mode-hook 'turn-on-font-lock) was used. * mh-comp.el (require 'sendmail): Moved from mh-comp.el to mh-utils.el because it is needed in reading mail too. (mh-header-field-end, mh-in-header-p): Moved to mh-utils.el because they are needed by mh-show-mode's font-lock code. Unfortunately, this splits the field related code into two files. Perhaps it should all go into mh-utils? 2001-11-20 Eric Ding * mh-utils.el (mh-show-from-face): Fix typo in defface 2001-11-20 Bill Wohler * mh-utils.el (mh-mail-header-separator): Set to -------- as defined by MH (components, and replcomps files). This variable cannot be a regexp since it is used as an argument to insert and is passed through regexp-quote before being used. The previous value broke a lot of code, including mailcrypt. * mh-comp.el (mh-letter-mode, mh-send-letter): Insert X-Mailer header field from mh-send-letter. (mh-edit-again, mh-extract-rejected-mail): Call mh-insert-header-separator to ensure that there is a separator. Packages such as mailcrypt depend on it. (mh-insert-header-separator): New function to insert mh-mail-header-separator if it doesn't exist. 2001-11-20 Peter S Galbraith * mh-comp.el (mh-letter-mode): Make font-lock-defaults a local variable * mh-e.el (mh-folder-mode): Same. * mh-utils.el (mh-show-mode): Same. * mh-e.el (mh-scan-msg-num-regexp): Delete variable and replace with mh-good-msg-regexp. * mh-utils.el (mh-mail-header-separator): Bug fix. Moved from mh-comp.el to mh-utils.el (which mh-comp.el loads). * mh-comp.el (mh-in-header-p): Recycle sendmail.el code (as suggested by Bill). * mh-utils.el (mh-letter-header-font-lock): Use mh-in-header-p. * mh-comp.el (mh-letter-tool-bar-map): tool-bar customize button goes to customizing mh-compose group. * mh-utils.el (mh-show-mode): font-lock bug fix. Locally set font-lock-support-mode to nil. (mh-letter-header-font-lock, mh-header-field-font-lock): font-lock bug fix. Don't return match beyond font-lock search limit. * mh-comp.el (mh-letter-mode): Emacs20 bug fix. tool-bar-mode is not a bound variable. 2001-11-19 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): tool-bar help button goes to 'Draft Editing' info node. * mh-utils.el (mh-show-from-face, mh-show-to-face): New faces used for font-lock. (mh-header-to-font-lock, mh-header-cc-font-lock) (mh-header-field-font-lock): New helper function returning whole header field arguments to font-lock. (mh-show-font-lock-keywords): Heavily modified using the above. * mh-e.el (mh-scan-msg-num-regexp): Regexp matching the message number in scan lines. (mh-scan-date-regexp): Regexp matching a valid date in scan lines. (mh-scan-rcpt-addr-regexp): Regexp specifying the recipient in scan lines for messages we sent. (mh-scan-followup-regexp): Regexp matching a followup subject line, starting with Re: (mh-scan-body-regexp): Regexp matching the message body beginning displayed in scan lines. (mh-scan.font-lock-regexp): Regexp matching output of the optional scan.font-lock format file. (mh-folder-font-lock-keywords): New font-lock for folder-mode that uses the above regexps. 2001-11-19 chad brown * mh-comp.el (mh-letter-tool-bar-map): made both references to mh-letter-tool-bar-map conditional on tool-bar-mode, instead of just one. 2001-11-19 Bill Wohler * mh-comp.el (mh-position-on-field): Move to the end of the header if the field is not present. This function was documented to do this, but wasn't doing so. (mh-insert-x-mailer): Simplified by using existing mh-goto-header-field and mh-insert-fields functions. Now that mh-insert-fields is used to insert X-Mailer header field, no longer need to include X-Mailer in mh-x-mailer-string. 2001-11-18 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): New version of mh-letter-mode tool-bar. Changed order of buttons; made customize and info buttons specific to mh-e. * mh-e.el (mh-folder-font-lock-keywords): New font-lock regexp uses variables mh-deleted-msg-regexp, mh-refiled-msg-regexp and mh-cur-scan-msg-regexp, so will better adapt to non-default scan formats. Also, lines marked for refiling are now fontified. 2001-11-18 Bill Wohler * mh-utils.el (mh-show-mode): Added local variable mail-header-separator which is initialized to mh-mail-header-separator. * mh-comp.el (mh-mail-header-separator): Updated to include ^$. Needed when running mh-edit-again, since by then the separator is gone. Added documentation saying one should use mail-header-separator and initialize it from mh-mail-header-separator. (mh-forward): Initialize mail-header-separator since mh-letter-mode hasn't kicked in yet (which does initialize mail-header-separator). (mh-letter-mode): Initialize mail-header-separator from mh-mail-header-separator, not hard-coded string. * mh-comp.el (mh-insert-x-mailer-p): New variable to control whether X-Mailer string is inserted. Default: t. (mh-x-mailer-string): New variable that caches actual X-Mailer string. (mh-letter-mode): Call mh-insert-x-mailer if mh-insert-x-mailer-p is t. (mh-insert-x-mailer): New function that inserts X-Mailer header field. 2001-11-17 Peter S Galbraith * mh-utils.el (mh-letter-header-font-lock): New function to return the entire mail header to font-lock for sedate font-locking. (mh-show-font-lock-keywords): Modified to fontify whole lines and use mh-letter-header-font-lock above to fontify whole header. 2001-11-17 Bill Wohler * mh-comp.el (mail-header-separator): Added ^ and $ to make more specific. (mh-forward, mh-letter-mode): Replaced hard-coded string with mail-header-separator. 2001-11-16 Bill Wohler * mh-e.el (mh-e-RCS-id): Renamed to mh-version. (mh-version): The variable: Set to a number instead of Id since the Id didn't have the mh-e version number, and both Emacs and gnus do it this way too. (mh-version): The function: Fixed for nmh. Now displays mh-e version correctly. Cleaned up output and display mh-progs, etc. (Closes SF #405620.) 2001-11-15 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): New tool-bar support for mh-letter-mode in emacs21. Uses icons from gnus/message.el. * mh-comp.el (mh-letter-mode): Add buffer-local binding of tool-bar-map to mh-letter-tool-bar-map. 2001-11-15 Peter S Galbraith * mh-mime.el (mh-have-file-command): Add check for existence of executable-find command, which Jeffrey didn't exist in emacs-20.4. * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): same as above. * mh-mime.el (mh-file-mime-type): Bug Fix. Some versions of 'file' output a string like "file: Using regular magic file..." to stderr, so discard stderr when using call-process with 'file'. 2001-11-14 Peter S Galbraith * mh-mime.el (mh-have-file-command): Check if 'file' command on system accepts arguments -i -b before accepting it for our use. 2001-11-14 Peter S Galbraith * mh-utils.el (mh-find-progs): Use expand-file-name instead of concatenating together strings into a path. 2001-11-14 Peter S Galbraith * mh-e.el (mh-folder-sequence-menu): Enable mh-widen in sequence menu only when mh-narrowed-to-seq is t. 2001-11-14 Peter S Galbraith * mh-mime.el (mh-have-file-command): Use 'executable-find' instead of more complicated and error-prone call-process to which command. * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): Same change as above. 2001-11-14 Jeffrey C Honig * mh-e.el (mh-make-folder-mode-line): Bug fix. Properly deal with folders that do not have any lines in them. Print "no msgs" instead of "0 msgs". Do not try to print a range when there are no messages. * mh-e.el (mh-regenerate-headers): Bug fix. Catch and remove the "scan: band message list" message. 2001-11-13 Jeffrey C Honig * mh-utils.el (mh-find-progs): Bug fix. Add "mh/etc" to the subdirectories to search for "components". On BSD/OS, nmh is in "/usr/contrib/mh/*". 2001-11-13 Peter S Galbraith * mh-comp.el (mh-letter-mode): Bug fix. Load mh-mime before setting mh-mhn-compose-insert-p (when looking at a "forw: -mime" message containing a MIME composition) such that the variable is properly declared as buffer-local. 2001-11-12 Bill Wohler * mh-funcs.el (mh-print-msg): mhl is in the mh-lib-progs directory, not mh-lib (closes SF #481128). 2001-11-12 Peter S Galbraith * mh-seq.el (mh-widen): Bug fix (closes SF #481036). In a sequence with pending deletes and refiles, running mh-widen would wipe out their notations, even though the sequences are still defined. Fixed by calling a new function, mh-notate-deleted-and-refiled. Also changed the coping of mh-goto-msg-num since it didn't work consistently. * mh-seq.el (mh-notate-deleted-and-refiled): New functions written to fix above mh-widen bug. It's a first cut, we may want to clear all notations first, and notate the current-message sequence and user sequences. Time will tell. 2001-11-12 Peter S Galbraith * mh-seq.el (mh-widen): Make it attempt to stay on the same message number (closes SF bug #480922). 2001-11-11 Bill Wohler * import-emacs: New shell script to import Emacs changes to mh-e. * Makefile (import): New target to import Emacs changes. 2001-11-09 Peter S Galbraith * mh-mime.el (mh-file-mime-type): Bug fix. Change regexp to extract mime type from 'file -i' command output. 2001-11-08 Peter S Galbraith * mh-utils.el (mh-update-sequences-after-mh-show): New customizable variable telling whether to run mh-update-sequences in mh-show-mode. Default is t. * mh-utils.el (mh-show-msg): Run mh-update-sequences when mh-update-sequences-after-mh-show is set. 2001-11-08 Peter S Galbraith * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): New variable telling whether command 'mimedecode' is on system. (http://www.freesoft.org/CIE/FAQ/mimedeco.c) * mh-utils.el (mh-decode-quoted-printable): New customizable variable telling whether to run mimedecode on MIME message containing quoted-printable parts. mimedecode will only alter quoted-printable parts , leaving others intact, and the resulting message is still fully MIME. * mh-utils.el (mh-decode-quoted-printable): New function to run mimedecode on the current buffer. * mh-utils.el (mh-display-msg): Conditionally call mh-decode-quoted-printable function if mh-decode-quoted-printable variable is set, to view messages containing quoted-printable characters into 8-bit. 2001-11-08 Peter S Galbraith * mh-comp.el (mh-letter-mode): Set mh-mhn-compose-insert-p if looking at a "forw: -mime" message containing a MIME composition. * mh-mime.el (mh-file-mime-type): Bug fix. Failed on files like "~/.mh_profile" because of shell construct. Wrapped filename with expand-file-name. * mh-comp.el (mh-letter-mode-map): C-cC-o keybinding in mh-letter-mode-map for mh-open-line. 2001-11-07 Peter S Galbraith * mh-comp.el (mh-open-line): New user function to split open a line when editing a reply with included text. * mh-comp.el (mh-current-fill-prefix): New function used by mh-open-line to get the fill-prefix on the current line. * mh-comp.el: Add mh-open-line to mh-letter-mode menubar. 2001-11-06 Peter S Galbraith * mh-seq.el (mh-region-to-sequence): New function, creating a sequence named 'region containing the message list in the selected region. * mh-e.el (mh-delete-msg): Mark messages in region for deletion if mark is active and in transient-mark-mode. * mh-e.el (mh-refile-msg): Mark messages in region for refiling if mark is active and in transient-mark-mode. * mh-e.el (mh-undo): Undo message marks for refile or deletion if region if mark is active and in transient-mark-mode. 2001-11-06 Peter S Galbraith * mh-comp.el (mh-letter-mode): Use sendmail.el's fill-paragraph. Copy its settings for paragraph-start, paragraph-separate, fill-paragraph-function, adaptive-fill-regexp and adaptive-fill-first-line-regexp. This make M-q (fill-paragraph) work correctly! 2001-11-05 Peter S Galbraith * mh-funcs.el (mh-kill-folder): Remove mh-do-not-confirm condition and always prompt the user for such a drastic step. Also change the prompt a bit to clarify it. 2001-11-04 Peter S Galbraith * mh-mime.el (mh-mhn-compose-insert-p): New buffer-local variable to tell when a MIME insertion was done in a letter. * mh-mime.el (mh-mhn-compose-type): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-mhn-compose-external-type): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-mhn-compose-forw): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-edit-mhn): Clear mh-mhn-compose-insert-p. * mh-comp.el (mh-send-letter): Run mh-edit-mhn when mh-mhn-compose-insert-p is set. 2001-11-03 Peter S Galbraith * mh-mime.el (mh-have-file-command): new function testing whether file command is on the system. * mh-mime.el (mh-file-mime-type): new function returning MIME type from file command. * mh-mime.el (mh-mhn-compose-insertion): Make use of mh-file-mime-type function instead of prompting. 2001-10-30 Peter S Galbraith * mh-utils.el (mh-show-use-goto-addr): defcustom this new variable, determining whether to call goto-addr in mh-show-mode. * mh-utils.el (mh-show-mode): Call goto-address when mh-show-use-goto-addr is t. 2001-10-25 Peter S Galbraith * mh-utils.el (mh-recenter): Clarify docs and change '(t) to (list 4) to match elisp doc on what C-u prefix argument actually is. 2001-10-23 Peter S Galbraith * mh-utils.el (mh-summary-height): In my quest to make mh-e more useful out-of-the-box for new users, set mh-summary-height to a minimum of 4 and a maximum of 10 depending on frame height. I typically have 70 lines in my Emacs frame, so having a default of 4 was silly for my case. * mh-e.el (mh-update-sequences): Check for nil value of mh-current-folder, which happens if mh-summary-height < 4 although I haven't tracked doen why that happens. 2001-10-22 Peter S Galbraith * mh-comp.el (mh-insert-fields): Test for nil value when inserting field. 2001-10-20 Peter S Galbraith * mh-comp.el (mh-user-agent-compose): Merged-in from XEmacs-21.4 source * mh-comp.el (mh-letter-mode): Add easy-menu-add statement for XEmacs21 * mh-pick.el (mh-pick-mode): Add easy-menu-add statement for XEmacs21. * mh-e.el (mh-folder-mode): Add easy-menu-add statements for XEmacs21. * mh-utils.el: defalias 'screen-height to 'frame-height for XEmacs21. 2001-10-19 Peter S Galbraith * mh-mime.el (mh-edit-mhn): Use mhbuild in nmh context. * mh-utils.el (mh-find-progs): The variable mh-nmh-p (t when nmh is in use rather than MH) was set assuming that the string "nmh" will be in mh-lib-progs or mh-lib. This failed on Debian systems. Better to check for the existence of mhbuild in directory mh-progs. (closes SF bug #441776) 2001-10-18 Peter S Galbraith * mh-e.el: Add menubar entry from contrib/mh-menubar.el * mh-comp.el: Add menubar entry from contrib/mh-menubar.el * mh-pick.el: Add menubar entry from contrib/mh-menubar.el 2001-07-30 Peter S Galbraith * mh-e.el: Change font-lock patterns for folders. Fontify scan.font-lock patterns (which will be documented) and fontify subject lines prefixed with "Re:" differently. * mh-comp.el (mh-letter-mode): Add font-lock support as in mh-show-mode. 2001-04-14 chad brown Rearrange the font-lock keywords a bit. 2001-04-12 chad brown 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 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 * Makefile (EMACS): Renamed to EMACS_HOME. Also, don't define if EMACS_HOME already exists to give developer a chance to set environment variable. (install): $MH-E-SRC is copied to $(EMACS_HOME)/lisp/mail, not $(EMACS_HOME)/src. (dist): Leave release in current directory. Copyright (C) 2003-2013 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . mh-e-8.5/emacs/trunk/lisp/mh-e/mh-utils.el0000644000175000000620000011571512114520723017517 0ustar wohlerstaff;;; mh-utils.el --- MH-E general utilities ;; Copyright (C) 1993, 1995, 1997, 2000-2013 Free Software Foundation, ;; Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (require 'font-lock) ;;; CL Replacements ;;;###mh-autoload (defun mh-search-from-end (char string) "Return the position of last occurrence of CHAR in STRING. If CHAR is not present in STRING then return nil. The function is used in lieu of `search' in the CL package." (loop for index from (1- (length string)) downto 0 when (equal (aref string index) char) return index finally return nil)) ;;; General Utilities ;;;###mh-autoload (defun mh-beginning-of-word (&optional n) "Return position of the N th word backwards." (unless n (setq n 1)) (let ((syntax-table (syntax-table))) (unwind-protect (save-excursion (mh-mail-abbrev-make-syntax-table) (set-syntax-table mail-abbrev-syntax-table) (backward-word n) (point)) (set-syntax-table syntax-table)))) ;;;###mh-autoload (defun mh-colors-available-p () "Check if colors are available in the Emacs being used." (or (featurep 'xemacs) (let ((color-cells (mh-display-color-cells))) (and (numberp color-cells) (>= color-cells 8))))) ;;;###mh-autoload (defun mh-colors-in-use-p () "Check if colors are being used in the folder buffer." (and mh-colors-available-flag font-lock-mode)) ;;;###mh-autoload (defun mh-delete-line (lines) "Delete the next LINES lines." (delete-region (point) (progn (forward-line lines) (point)))) ;;;###mh-autoload (defun mh-make-local-vars (&rest pairs) "Initialize local variables according to the variable-value PAIRS." (while pairs (set (make-local-variable (car pairs)) (car (cdr pairs))) (setq pairs (cdr (cdr pairs))))) ;;;###mh-autoload (defun mh-mapc (function list) "Apply FUNCTION to each element of LIST for side effects only." (while list (funcall function (car list)) (setq list (cdr list)))) (defvar mh-pick-regexp-chars ".*$[" "List of special characters in pick regular expressions.") ;;;###mh-autoload (defun mh-quote-pick-expr (pick-expr) "Quote `mh-pick-regexp-chars' in PICK-EXPR. PICK-EXPR is a list of strings. Return nil if PICK-EXPR is nil." (let ((quoted-pick-expr)) (dolist (string pick-expr) (when (and string (not (string-equal string ""))) (loop for i from 0 to (1- (length mh-pick-regexp-chars)) do (let ((s (string ?\\ (aref mh-pick-regexp-chars i)))) (setq string (mh-replace-regexp-in-string s s string t t)))) (setq quoted-pick-expr (append quoted-pick-expr (list string))))) quoted-pick-expr)) ;;;###mh-autoload (defun mh-replace-string (old new) "Replace all occurrences of OLD with NEW in the current buffer. Ignores case when searching for OLD." (goto-char (point-min)) (let ((case-fold-search t)) (while (search-forward old nil t) (replace-match new t t)))) ;;; Logo Display (defvar mh-logo-cache nil) ;; Shush compiler. (defvar image-load-path) ;;;###mh-autoload (defun mh-logo-display () "Modify mode line to display MH-E logo." (mh-do-in-gnu-emacs (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) (image-load-path (cons (car load-path) (when (boundp 'image-load-path) image-load-path)))) (add-text-properties 0 2 `(display ,(or mh-logo-cache (setq mh-logo-cache (mh-funcall-if-exists find-image '((:type xpm :ascent center :file "mh-logo.xpm")))))) (car mode-line-buffer-identification)))) (mh-do-in-xemacs (setq modeline-buffer-identification (list (if mh-modeline-glyph (cons modeline-buffer-id-left-extent mh-modeline-glyph) (cons modeline-buffer-id-left-extent "XEmacs%N:")) (cons modeline-buffer-id-right-extent " %17b"))))) ;;; Read MH Profile (defvar mh-find-path-run nil "Non-nil if `mh-find-path' has been run already. Do not access this variable; `mh-find-path' already uses it to avoid running more than once.") ;;;###mh-autoload (defun mh-find-path () "Set variables from user's MH profile. This function sets `mh-user-path' from your \"Path:\" MH profile component (but defaults to \"Mail\" if one isn't present), `mh-draft-folder' from \"Draft-Folder:\", `mh-unseen-seq' from \"Unseen-Sequence:\", `mh-previous-seq' from \"Previous-Sequence:\", and `mh-inbox' from \"Inbox:\" (defaults to \"+inbox\"). The hook `mh-find-path-hook' is run after these variables have been set. This hook can be used the change the value of these variables if you need to run with different values between MH and MH-E." (unless mh-find-path-run ;; Sanity checks. (if (and (getenv "MH") (not (file-readable-p (getenv "MH")))) (error "MH environment variable contains unreadable file %s" (getenv "MH"))) (if (null (mh-variants)) (error "Install MH and run install-mh before running MH-E")) (if (not (or (getenv "MH") (file-readable-p "~/.mh_profile"))) (error "Run install-mh before running MH-E")) ;; Read MH profile. (setq mh-user-path (mh-profile-component "Path")) (if (not mh-user-path) (setq mh-user-path "Mail")) (setq mh-user-path (file-name-as-directory (expand-file-name mh-user-path (expand-file-name "~")))) (mh-set-x-image-cache-directory (expand-file-name ".mhe-x-image-cache" mh-user-path)) (setq mh-draft-folder (mh-profile-component "Draft-Folder")) (if mh-draft-folder (progn (if (not (mh-folder-name-p mh-draft-folder)) (setq mh-draft-folder (format "+%s" mh-draft-folder))) (if (not (file-exists-p (mh-expand-file-name mh-draft-folder))) (error "Draft folder \"%s\" not found; create it and try again" (mh-expand-file-name mh-draft-folder))))) (setq mh-inbox (mh-profile-component "Inbox")) (cond ((not mh-inbox) (setq mh-inbox "+inbox")) ((not (mh-folder-name-p mh-inbox)) (setq mh-inbox (format "+%s" mh-inbox)))) (setq mh-unseen-seq (mh-profile-component "Unseen-Sequence")) (if mh-unseen-seq (setq mh-unseen-seq (intern mh-unseen-seq)) (setq mh-unseen-seq 'unseen)) ;old MH default? (setq mh-previous-seq (mh-profile-component "Previous-Sequence")) (if mh-previous-seq (setq mh-previous-seq (intern mh-previous-seq))) (run-hooks 'mh-find-path-hook) (mh-collect-folder-names) (setq mh-find-path-run t))) ;;; Help Functions ;;;###mh-autoload (defun mh-ephem-message (string) "Display STRING in the minibuffer momentarily." (message "%s" string) (sit-for 5) (message "")) (defvar mh-help-default nil "Mode to use if messages are not present for the current mode.") (defvar mh-help-messages nil "Help messages for all modes. This is an alist of alists. The primary key is a symbol representing the mode; the value is described in `mh-set-help'.") ;;;###mh-autoload (defun mh-set-help (messages &optional default) "Set help messages. The MESSAGES are assumed to be an associative array. It is used to show help for the most common commands in the current mode. The key is a prefix char. The value is one or more strings which are concatenated together and displayed in a help buffer if ? is pressed after the prefix character. The special key nil is used to display the non-prefixed commands. The substitutions described in `substitute-command-keys' are performed as well. If optional argument DEFAULT is non-nil, then these messages will be used if help is asked for an unknown mode." (add-to-list 'mh-help-messages (cons major-mode messages)) (if default (setq mh-help-default major-mode))) ;;;###mh-autoload (defun mh-help (&optional help-messages) "Display cheat sheet for the MH-E commands. See `mh-set-help' for setting the help messages. HELP-MESSAGES are used instead if given. This is a list of one or more strings which are concatenated together and displayed in a help buffer." (interactive) (let* ((help (or help-messages (cdr (assoc nil (assoc major-mode mh-help-messages))))) (text (substitute-command-keys (mapconcat 'identity help "")))) (with-electric-help (function (lambda () (insert text))) mh-help-buffer))) ;;;###mh-autoload (defun mh-prefix-help () "Display cheat sheet for the commands of the current prefix in minibuffer." (interactive) ;; We got here because the user pressed a "?", but he pressed a prefix key ;; before that. Since the key vector starts at index 0, the index of the ;; last keystroke is length-1 and thus the second to last keystroke is at ;; length-2. We use that information to obtain a suitable prefix character ;; from the recent keys. (let* ((keys (recent-keys)) (prefix-char (elt keys (- (length keys) 2))) (help (cdr (assoc prefix-char (assoc major-mode mh-help-messages))))) (mh-help help))) ;;; Message Number Utilities ;;;###mh-autoload (defun mh-coalesce-msg-list (messages) "Given a list of MESSAGES, return a list of message number ranges. This is the inverse of `mh-read-msg-list', which expands ranges. Message lists passed to MH programs should be processed by this function to avoid exceeding system command line argument limits." (let ((msgs (sort (copy-sequence messages) 'mh-greaterp)) (range-high nil) (prev -1) (ranges nil)) (while prev (if range-high (if (or (not (numberp prev)) (not (equal (car msgs) (1- prev)))) (progn ;non-sequential, flush old range (if (eq prev range-high) (setq ranges (cons range-high ranges)) (setq ranges (cons (format "%s-%s" prev range-high) ranges))) (setq range-high nil)))) (or range-high (setq range-high (car msgs))) ;start new or first range (setq prev (car msgs)) (setq msgs (cdr msgs))) ranges)) (defun mh-greaterp (msg1 msg2) "Return the greater of two message indicators MSG1 and MSG2. Strings are \"smaller\" than numbers. Valid values are things like \"cur\", \"last\", 1, and 1820." (if (numberp msg1) (if (numberp msg2) (> msg1 msg2) t) (if (numberp msg2) nil (string-lessp msg2 msg1)))) ;;;###mh-autoload (defun mh-lessp (msg1 msg2) "Return the lesser of two message indicators MSG1 and MSG2. Strings are \"smaller\" than numbers. Valid values are things like \"cur\", \"last\", 1, and 1820." (not (mh-greaterp msg1 msg2))) ;;;###mh-autoload (defun mh-get-msg-num (error-if-no-message) "Return the message number of the displayed message. If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is not pointing to a message." (save-excursion (beginning-of-line) (cond ((looking-at (mh-scan-msg-number-regexp)) (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) (error-if-no-message (error "Cursor not pointing to message")) (t nil)))) (add-to-list 'debug-ignored-errors "^Cursor not pointing to message$") ;;; Folder Cache and Access (defvar mh-sub-folders-cache (make-hash-table :test #'equal)) (defvar mh-current-folder-name nil) (defvar mh-flists-partial-line "") (defvar mh-flists-process nil) ;;;###mh-autoload (defun mh-clear-sub-folders-cache () "Clear `mh-sub-folders-cache'." (clrhash mh-sub-folders-cache)) ;; Initialize mh-sub-folders-cache... (defun mh-collect-folder-names () "Collect folder names by running \"folders\"." (unless mh-flists-process (setq mh-flists-process (mh-exec-cmd-daemon "folders" 'mh-collect-folder-names-filter "-recurse" "-fast")))) (defun mh-collect-folder-names-filter (process output) "Read folder names. PROCESS is the flists process that was run to collect folder names and the function is called when OUTPUT is available." (let ((position 0) (prevailing-match-data (match-data)) line-end folder) (unwind-protect (while (setq line-end (string-match "\n" output position)) (setq folder (format "+%s%s" mh-flists-partial-line (substring output position line-end))) (setq mh-flists-partial-line "") (unless (equal (aref folder 1) ?.) (mh-populate-sub-folders-cache folder)) (setq position (1+ line-end))) (set-match-data prevailing-match-data)) (setq mh-flists-partial-line (substring output position)))) (defun mh-populate-sub-folders-cache (folder) "Tell `mh-sub-folders-cache' about FOLDER." (let* ((last-slash (mh-search-from-end ?/ folder)) (child1 (substring folder (1+ (or last-slash 0)))) (parent (and last-slash (substring folder 0 last-slash))) (parent-slash (and parent (mh-search-from-end ?/ parent))) (child2 (and parent (substring parent (1+ (or parent-slash 0))))) (grand-parent (and parent-slash (substring parent 0 parent-slash))) (cache-entry (gethash parent mh-sub-folders-cache))) (unless (loop for x in cache-entry when (equal (car x) child1) return t finally return nil) (push (list child1) cache-entry) (setf (gethash parent mh-sub-folders-cache) (sort cache-entry (lambda (x y) (string< (car x) (car y))))) (when parent (loop for x in (gethash grand-parent mh-sub-folders-cache) when (equal (car x) child2) do (progn (setf (cdr x) t) (return))))))) (defun mh-normalize-folder-name (folder &optional empty-string-okay dont-remove-trailing-slash return-nil-if-folder-empty) "Normalizes FOLDER name. Makes sure that two '/' characters never occur next to each other. Also all occurrences of \"..\" and \".\" are suitably processed. So \"+inbox/../news\" will be normalized to \"+news\". If optional argument EMPTY-STRING-OKAY is nil then a '+' is added at the front if FOLDER lacks one. If non-nil and FOLDER is the empty string then nothing is added. If optional argument DONT-REMOVE-TRAILING-SLASH is non-nil then a trailing '/' if present is retained (if present), otherwise it is removed. If optional argument RETURN-NIL-IF-FOLDER-EMPTY is non-nil, then return nil if FOLDER is \"\" or \"+\". This is useful when normalizing the folder for the \"folders\" command which displays the directories in / if passed \"+\". This is usually not desired. If this argument is non-nil, then EMPTY-STRING-OKAY has no effect." (cond ((if (and (or (equal folder "+") (equal folder "")) return-nil-if-folder-empty) (setq folder nil))) ((stringp folder) ;; Replace two or more consecutive '/' characters with a single '/' (while (string-match "//" folder) (setq folder (replace-match "/" nil t folder))) (let* ((length (length folder)) (trailing-slash-present (and (> length 0) (equal (aref folder (1- length)) ?/))) (leading-slash-present (and (> length 0) (equal (aref folder 0) ?/)))) (when (and (> length 0) (equal (aref folder 0) ?@) (stringp mh-current-folder-name)) (setq folder (format "%s/%s/" mh-current-folder-name (substring folder 1)))) ;; XXX: Purge empty strings from the list that split-string ;; returns. In XEmacs, (split-string "+foo/" "/") returns ;; ("+foo" "") while in GNU Emacs it returns ("+foo"). In the ;; code it is assumed that the components list has no empty ;; strings. (let ((components (delete "" (split-string folder "/"))) (result ())) ;; Remove .. and . from the pathname. (dolist (component components) (cond ((and (equal component "..") result) (pop result)) ((equal component "..")) ((equal component ".")) (t (push component result)))) (setq folder "") (dolist (component result) (setq folder (concat component "/" folder))) ;; Remove trailing '/' if needed. (unless (and trailing-slash-present dont-remove-trailing-slash) (when (not (equal folder "")) (setq folder (substring folder 0 (1- (length folder)))))) (when leading-slash-present (setq folder (concat "/" folder))))) (cond ((and empty-string-okay (equal folder ""))) ((equal folder "") (setq folder "+")) ((not (equal (aref folder 0) ?+)) (setq folder (concat "+" folder)))))) folder) (defmacro mh-children-p (folder) "Return t if FOLDER from sub-folders cache has children." ;; The car of folder is the name, and the cdr is either t or some ;; sort of count that I do not understand. It's too small to be the ;; number of messages in the sub-folders and too large to be the ;; number of sub-folders. XXX `(if (cdr ,folder) t nil)) ;;;###mh-autoload (defun mh-folder-list (folder) "Return FOLDER and its descendants. FOLDER may have a + prefix. Returns a list of strings without the + prefix. If FOLDER is nil, then all folders are considered. For example, if your Mail directory only contains the folders +inbox, +outbox, +lists, and +lists/mh-e, then (mh-folder-list nil) => (\"inbox\" \"lists\" \"lists/mh-e\" \"outbox\") (mh-folder-list \"+lists\") => (\"lists\" \"lists/mh-e\") Respects the value of `mh-recursive-folders-flag'. If this flag is nil, and the sub-folders have not been explicitly viewed, then they will not be returned." (let ((folder-list)) ;; Normalize folder. Strip leading + and trailing slash(es). If no ;; folder is specified, ensure it is nil to avoid adding the ;; folder to the folder-list and adding a slash to it. (when folder (setq folder (mh-replace-regexp-in-string "^\+" "" folder)) (setq folder (mh-replace-regexp-in-string "/+$" "" folder)) (if (equal folder "") (setq folder nil))) ;; Add provided folder to list, unless all folders are asked for. ;; Then append slash to separate sub-folders. (unless (null folder) (setq folder-list (list folder)) (setq folder (concat folder "/"))) (loop for f in (mh-sub-folders folder) do (setq folder-list (append folder-list (if (mh-children-p f) (mh-folder-list (concat folder (car f))) (list (concat folder (car f))))))) folder-list)) ;;;###mh-autoload (defun mh-sub-folders (folder &optional add-trailing-slash-flag) "Find the subfolders of FOLDER. The function avoids running folders unnecessarily by caching the results of the actual folders call. If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a slash is added to each of the sub-folder names that may have nested folders within them." (let* ((folder (mh-normalize-folder-name folder nil nil t)) (match (gethash folder mh-sub-folders-cache 'no-result)) (sub-folders (cond ((eq match 'no-result) (setf (gethash folder mh-sub-folders-cache) (mh-sub-folders-actual folder))) (t match)))) (if add-trailing-slash-flag (mapcar #'(lambda (x) (if (cdr x) (cons (concat (car x) "/") (cdr x)) x)) sub-folders) sub-folders))) ;; FIXME: This function does not do well if FOLDER does not exist. It ;; then changes the context to that folder which causes problems down ;; the line. Since a folder in the cache could later be deleted, it ;; would be good for mh-sub-folders-actual to return nil in this case ;; so that mh-sub-folders could delete it from the cache. This ;; function could protect itself by using a temporary context. (defun mh-sub-folders-actual (folder) "Execute the command folders to return the sub-folders of FOLDER. Filters out the folder names that start with \".\" so that directories that aren't usually mail folders are hidden. Expects FOLDER to have already been normalized with (mh-normalize-folder-name folder nil nil t)" (let ((arg-list `(,(expand-file-name "folders" mh-progs) nil (t nil) nil "-noheader" "-norecurse" "-nototal" ,@(if (stringp folder) (list folder) ()))) (results ()) (current-folder (concat (with-temp-buffer (call-process (expand-file-name "folder" mh-progs) nil '(t nil) nil "-fast") (buffer-substring (point-min) (1- (point-max)))) "+"))) (with-temp-buffer (apply #'call-process arg-list) (goto-char (point-min)) (while (not (and (eolp) (bolp))) (goto-char (mh-line-end-position)) (let ((start-pos (mh-line-beginning-position)) (has-pos (search-backward " has " (mh-line-beginning-position) t))) (when (integerp has-pos) (while (equal (char-after has-pos) ? ) (decf has-pos)) (incf has-pos) (while (equal (char-after start-pos) ? ) (incf start-pos)) (let* ((name (buffer-substring start-pos has-pos)) (first-char (aref name 0)) (last-char (aref name (1- (length name))))) (unless (member first-char '(?. ?# ?,)) (when (and (equal last-char ?+) (equal name current-folder)) (setq name (substring name 0 (1- (length name))))) (push (cons name (search-forward "(others)" (mh-line-end-position) t)) results)))) (forward-line 1)))) (setq results (nreverse results)) (when (stringp folder) (setq results (cdr results)) (let ((folder-name-len (length (format "%s/" (substring folder 1))))) (setq results (mapcar (lambda (f) (cons (substring (car f) folder-name-len) (cdr f))) results)))) results)) ;;;###mh-autoload (defun mh-remove-from-sub-folders-cache (folder) "Remove FOLDER and its parent from `mh-sub-folders-cache'. FOLDER should be unconditionally removed from the cache. Also the last ancestor of FOLDER present in the cache must be removed as well. To see why this is needed assume we have a folder +foo which has a single sub-folder qux. Now we create the folder +foo/bar/baz. Here we will need to invalidate the cached sub-folders of +foo, otherwise completion on +foo won't tell us about the option +foo/bar!" (remhash folder mh-sub-folders-cache) (block ancestor-found (let ((parent folder) (one-ancestor-found nil) last-slash) (while (setq last-slash (mh-search-from-end ?/ parent)) (setq parent (substring parent 0 last-slash)) (unless (eq (gethash parent mh-sub-folders-cache 'none) 'none) (remhash parent mh-sub-folders-cache) (if one-ancestor-found (return-from ancestor-found) (setq one-ancestor-found t)))) (remhash nil mh-sub-folders-cache)))) ;;; Folder Utilities ;;;###mh-autoload (defun mh-folder-name-p (name) "Return non-nil if NAME is the name of a folder. A name (a string or symbol) can be a folder name if it begins with \"+\"." (if (symbolp name) (eq (aref (symbol-name name) 0) ?+) (and (> (length name) 0) (eq (aref name 0) ?+)))) ;;;###mh-autoload (defun mh-expand-file-name (filename &optional default) "Expand FILENAME like `expand-file-name', but also handle MH folder names. Any filename that starts with '+' is treated as a folder name. See `expand-file-name' for description of DEFAULT." (if (mh-folder-name-p filename) (expand-file-name (substring filename 1) mh-user-path) (expand-file-name filename default))) (defvar mh-folder-hist nil) ;; Shush compiler. (defvar mh-speed-flists-cache) (defvar mh-allow-root-folder-flag nil "Non-nil means \"+\" is an acceptable folder name. This variable is used to communicate with `mh-folder-completion-function'. That function can have exactly three arguments so we bind this variable to t or nil. This variable should never be set.") (defvar mh-folder-completion-map (copy-keymap minibuffer-local-completion-map)) (define-key mh-folder-completion-map " " 'minibuffer-complete) ;Why??? (defvar mh-speed-flists-inhibit-flag nil) ;;;###mh-autoload (defun mh-speed-flists-active-p () "Check if speedbar is running with message counts enabled." (and (featurep 'mh-speed) (not mh-speed-flists-inhibit-flag) (> (hash-table-count mh-speed-flists-cache) 0))) ;;;###mh-autoload (defun mh-folder-completion-function (name predicate flag) "Programmable completion for folder names. NAME is the partial folder name that has been input. PREDICATE if non-nil is a function that is used to filter the possible choices. FLAG is nil to indicate `try-completion', t for `all-completions', or the symbol lambda for `test-completion'. See Info node `(elisp) Programmed Completion' for details." (let* ((orig-name name) ;; After normalization, name is nil, +, or +something. If a ;; trailing slash is present, it is preserved. (name (mh-normalize-folder-name name nil t)) (last-slash (mh-search-from-end ?/ name)) ;; nil if + or +folder; +folder/ if slash present. (last-complete (if last-slash (substring name 0 (1+ last-slash)) nil)) ;; Either +folder/remainder, +remainder, or "". (remainder (cond (last-complete (substring name (1+ last-slash))) (name (substring name 1)) (t "")))) (cond ((eq (car-safe flag) 'boundaries) (list* 'boundaries (let ((slash (mh-search-from-end ?/ orig-name))) (if slash (1+ slash) (if (string-match "\\`\\+" orig-name) 1 0))) (if (cdr flag) (string-match "/" (cdr flag))))) ((eq flag nil) (let ((try-res (try-completion remainder (mh-sub-folders last-complete t) predicate))) (cond ((eq try-res nil) nil) ((and (eq try-res t) (equal name orig-name)) t) ((eq try-res t) name) (t (concat (or last-complete "+") try-res))))) ((eq flag t) (all-completions remainder (mh-sub-folders last-complete t) predicate)) ((eq flag 'lambda) (let ((path (concat (unless (and (> (length name) 1) (eq (aref name 1) ?/)) mh-user-path) (substring name 1)))) (cond (mh-allow-root-folder-flag (file-directory-p path)) ((equal path mh-user-path) nil) (t (file-directory-p path)))))))) ;; Shush compiler. (mh-do-in-xemacs (defvar completion-root-regexp)) (defun mh-folder-completing-read (prompt default allow-root-folder-flag) "Read folder name with PROMPT and default result DEFAULT. If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be a folder name corresponding to `mh-user-path'." (mh-normalize-folder-name (let ((completion-root-regexp "^[+/]") (minibuffer-local-completion-map mh-folder-completion-map) (mh-allow-root-folder-flag allow-root-folder-flag)) (completing-read prompt 'mh-folder-completion-function nil nil nil 'mh-folder-hist default)) t)) ;;;###mh-autoload (defun mh-prompt-for-folder (prompt default can-create &optional default-string allow-root-folder-flag) "Prompt for a folder name with PROMPT. Returns the folder's name as a string. DEFAULT is used if the folder exists and the user types return. If the CAN-CREATE flag is t, then a folder is created if it doesn't already exist. If optional argument DEFAULT-STRING is non-nil, use it in the prompt instead of DEFAULT. If ALLOW-ROOT-FOLDER-FLAG is non-nil then the function will accept the folder +, which means all folders when used in searching." (if (null default) (setq default "")) (let* ((default-string (cond (default-string (format " (default %s)" default-string)) ((equal "" default) "") (t (format " (default %s)" default)))) (prompt (format "%s folder%s: " prompt default-string)) (mh-current-folder-name mh-current-folder) read-name folder-name) (while (and (setq read-name (mh-folder-completing-read prompt default allow-root-folder-flag)) (equal read-name "") (equal default ""))) (cond ((or (equal read-name "") (and (equal read-name "+") (not allow-root-folder-flag))) (setq read-name default)) ((not (mh-folder-name-p read-name)) (setq read-name (format "+%s" read-name)))) (if (or (not read-name) (equal "" read-name)) (error "No folder specified")) (setq folder-name read-name) (cond ((and (> (length folder-name) 0) (eq (aref folder-name (1- (length folder-name))) ?/)) (setq folder-name (substring folder-name 0 -1)))) (let* ((last-slash (mh-search-from-end ?/ folder-name)) (parent (and last-slash (substring folder-name 0 last-slash))) (child (if last-slash (substring folder-name (1+ last-slash)) (substring folder-name 1)))) (unless (member child (mapcar #'car (gethash parent mh-sub-folders-cache))) (mh-remove-from-sub-folders-cache folder-name))) (let ((new-file-flag (not (file-exists-p (mh-expand-file-name folder-name))))) (cond ((and new-file-flag can-create (y-or-n-p (format "Folder %s does not exist. Create it? " folder-name))) (message "Creating %s" folder-name) (mh-exec-cmd-error nil "folder" folder-name) (mh-remove-from-sub-folders-cache folder-name) (when (boundp 'mh-speed-folder-map) (mh-speed-add-folder folder-name)) (message "Creating %s...done" folder-name)) (new-file-flag (error "Folder %s does not exist" folder-name)) ((not (file-directory-p (mh-expand-file-name folder-name))) (error "%s is not a directory" (mh-expand-file-name folder-name))))) folder-name)) ;;; Message Utilities ;; Functions that would ordinarily be in mh-letter.el that are needed ;; by mh-show.el are found here in order to prevent the loading of ;; mh-letter.el until a message is actually composed. ;;;###mh-autoload (defun mh-in-header-p () "Return non-nil if the point is in the header of a draft message." (< (point) (mh-mail-header-end))) ;;;###mh-autoload (defun mh-extract-from-header-value () "Extract From: string from header." (save-excursion (if (not (mh-goto-header-field "From:")) nil (skip-chars-forward " \t") (buffer-substring-no-properties (point) (progn (mh-header-field-end)(point)))))) ;;;###mh-autoload (defun mh-get-header-field (field) "Find and return the body of FIELD in the mail header. Returns the empty string if the field is not in the header of the current buffer." (if (mh-goto-header-field field) (progn (skip-chars-forward " \t") ;strip leading white space in body (let ((start (point))) (mh-header-field-end) (buffer-substring-no-properties start (point)))) "")) ;;;###mh-autoload (defun mh-goto-header-field (field) "Move to FIELD in the message header. Move to the end of the FIELD name, which should end in a colon. Returns t if found, nil if not." (goto-char (point-min)) (let ((case-fold-search t) (headers-end (save-excursion (mh-goto-header-end 0) (point)))) (re-search-forward (format "^%s" field) headers-end t))) ;;;###mh-autoload (defun mh-goto-header-end (arg) "Move the cursor ARG lines after the header." (if (re-search-forward (concat "^\\(" (regexp-quote mh-mail-header-separator) "\\)?$") nil nil) (forward-line arg))) ;;;###mh-autoload (defun mh-mail-header-end () "Substitute for `mail-header-end' that doesn't widen the buffer. In MH-E we frequently need to find the end of headers in nested messages, where the buffer has been narrowed. This function works in this situation." (save-excursion ;; XXX: The following replaces a call to rfc822-goto-eoh. Occasionally, ;; mail headers that MH-E has to read contains lines of the form: ;; From xxx@yyy Mon May 10 11:48:07 2004 ;; In this situation, rfc822-goto-eoh doesn't go to the end of the ;; header. The replacement allows From_ lines in the mail header. (goto-char (point-min)) (loop for p = (re-search-forward "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) do (cond ((null p) (return)) (t (goto-char (match-beginning 0)) (unless (looking-at "From ") (return)) (goto-char p)))) (point))) ;;;###mh-autoload (defun mh-header-field-beginning () "Move to the beginning of the current header field. Handles RFC 822 continuation lines." (beginning-of-line) (while (looking-at "^[ \t]") (forward-line -1))) ;;;###mh-autoload (defun mh-header-field-end () "Move to the end of the current header field. Handles RFC 822 continuation lines." (forward-line 1) (while (looking-at "^[ \t]") (forward-line 1)) (backward-char 1)) ;to end of previous line ;;;###mh-autoload (defun mh-letter-hide-all-skipped-fields () "Hide all skipped fields." (save-excursion (goto-char (point-min)) (save-restriction (narrow-to-region (point) (mh-mail-header-end)) (while (re-search-forward mh-letter-header-field-regexp nil t) (if (mh-letter-skipped-header-field-p (match-string 1)) (mh-letter-toggle-header-field-display -1) (mh-letter-toggle-header-field-display 'long)) (beginning-of-line 2))))) ;;;###mh-autoload (defun mh-letter-skipped-header-field-p (field) "Check if FIELD is to be skipped." (let ((field (downcase field))) (loop for x in mh-compose-skipped-header-fields when (equal (downcase x) field) return t finally return nil))) (defvar mh-hidden-header-keymap (let ((map (make-sparse-keymap))) (mh-do-in-gnu-emacs (define-key map [mouse-2] 'mh-letter-toggle-header-field-display-button)) (mh-do-in-xemacs (define-key map '(button2) 'mh-letter-toggle-header-field-display-button)) map)) ;;;###mh-autoload (defun mh-letter-toggle-header-field-display (arg) "Toggle display of header field at point. Use this command to display truncated header fields. This command is a toggle so entering it again will hide the field. This command takes a prefix argument ARG: if negative then the field is hidden, if positive then the field is displayed." (interactive (list nil)) (when (and (mh-in-header-p) (progn (end-of-line) (re-search-backward mh-letter-header-field-regexp nil t))) (let ((buffer-read-only nil) (modified-flag (buffer-modified-p)) (begin (point)) end) (end-of-line) (setq end (1- (if (re-search-forward "^[^ \t]" nil t) (match-beginning 0) (point-max)))) (goto-char begin) ;; Make it clickable... (add-text-properties begin end `(keymap ,mh-hidden-header-keymap mouse-face highlight)) (unwind-protect (cond ((or (and (not arg) (text-property-any begin end 'invisible 'vanish)) (and (numberp arg) (>= arg 0)) (and (eq arg 'long) (> (mh-line-beginning-position 5) end))) (remove-text-properties begin end '(invisible nil)) (search-forward ":" (mh-line-end-position) t) (mh-letter-skip-leading-whitespace-in-header-field)) ;; XXX Redesign to make usable by user. Perhaps use a positive ;; numeric prefix to make that many lines visible. ((eq arg 'long) (end-of-line 4) (mh-letter-truncate-header-field end) (beginning-of-line)) (t (end-of-line) (mh-letter-truncate-header-field end) (beginning-of-line))) (set-buffer-modified-p modified-flag))))) ;;;###mh-autoload (defun mh-letter-skip-leading-whitespace-in-header-field () "Skip leading whitespace in a header field. If the header field doesn't have at least one space after the colon then a space character is added." (let ((need-space t)) (while (memq (char-after) '(?\t ?\ )) (forward-char) (setq need-space nil)) (when need-space (insert " ")))) (defun mh-letter-truncate-header-field (end) "Replace text from current line till END with an ellipsis. If the current line is too long truncate a part of it as well." (let ((max-len (min (window-width) 62))) (when (> (+ (current-column) 4) max-len) (backward-char (- (+ (current-column) 5) max-len))) (when (> end (point)) (add-text-properties (point) end '(invisible vanish))))) ;;;###mh-autoload (defun mh-signature-separator-p () "Return non-nil if buffer includes \"^-- $\"." (save-excursion (goto-char (point-min)) (re-search-forward mh-signature-separator-regexp nil t))) (provide 'mh-utils) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-utils.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-inc.el0000644000175000000620000000575312114520723017130 0ustar wohlerstaff;;; mh-inc.el --- MH-E "inc" and separate mail spool handling ;; Copyright (C) 2003-2004, 2006-2013 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Support for inc. In addition to reading from the system mailbox, ;; inc can also be used to incorporate mail from multiple spool files ;; into separate folders. See "C-h v mh-inc-spool-list". ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (defvar mh-inc-spool-map-help nil "Help text for `mh-inc-spool-map'.") (define-key mh-inc-spool-map "?" (lambda () (interactive) (if mh-inc-spool-map-help (mh-help mh-inc-spool-map-help) (mh-ephem-message "There are no keys defined yet; customize `mh-inc-spool-list'")))) ;;;###mh-autoload (defun mh-inc-spool-make () "Make all commands and defines keys for contents of `mh-inc-spool-list'." (setq mh-inc-spool-map-help nil) (when mh-inc-spool-list (loop for elem in mh-inc-spool-list do (let ((spool (nth 0 elem)) (folder (nth 1 elem)) (key (nth 2 elem))) (progn (mh-inc-spool-generator folder spool) (mh-inc-spool-def-key key folder)))))) (defalias 'mh-inc-spool-make-no-autoload 'mh-inc-spool-make) (defun mh-inc-spool-generator (folder spool) "Create a command to inc into FOLDER from SPOOL file." (let ((folder1 (make-symbol "folder")) (spool1 (make-symbol "spool"))) (set folder1 folder) (set spool1 spool) (setf (symbol-function (intern (concat "mh-inc-spool-" folder))) `(lambda () ,(format "Inc spool file %s into folder %s." spool folder) (interactive) (mh-inc-folder ,spool1 (concat "+" ,folder1)))))) (defun mh-inc-spool-def-key (key folder) "Define a KEY in `mh-inc-spool-map' to inc FOLDER and collect help string." (when (not (= 0 key)) (define-key mh-inc-spool-map (format "%c" key) (intern (concat "mh-inc-spool-" folder))) (add-to-list 'mh-inc-spool-map-help (concat "[" (char-to-string key) "] inc " folder " folder\n") t))) (provide 'mh-inc) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-inc.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-folder.el0000644000175000000620000024040712114520723017627 0ustar wohlerstaff;;; mh-folder.el --- MH-Folder mode ;; Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Mode for browsing folders ;;; Change Log: ;;; Code: (require 'mh-e) (require 'mh-scan) (mh-require-cl) ;; Dynamically-created functions not found in mh-loaddefs.el. (autoload 'mh-tool-bar-folder-buttons-init "mh-tool-bar") (autoload 'mh-tool-bar-init "mh-tool-bar") (require 'gnus-util) (autoload 'message-fetch-field "message") ;;; MH-E Entry Points ;;;###autoload (defun mh-rmail (&optional arg) "Incorporate new mail with MH. Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, the Emacs interface to the MH mail system." (interactive "P") (mh-find-path) (if arg (call-interactively 'mh-visit-folder) (unless (get-buffer mh-inbox) (mh-visit-folder mh-inbox (symbol-name mh-unseen-seq))) (mh-inc-folder))) ;;;###autoload (defun mh-nmail (&optional arg) "Check for new mail in inbox folder. Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, the Emacs interface to the MH mail system." (interactive "P") (mh-find-path) ; init mh-inbox (if arg (call-interactively 'mh-visit-folder) (mh-visit-folder mh-inbox))) ;;; Desktop Integration ;; desktop-buffer-mode-handlers appeared in Emacs 22. (if (boundp 'desktop-buffer-mode-handlers) (add-to-list 'desktop-buffer-mode-handlers '(mh-folder-mode . mh-restore-desktop-buffer))) (defun mh-restore-desktop-buffer (desktop-buffer-file-name desktop-buffer-name desktop-buffer-misc) "Restore an MH folder buffer specified in a desktop file. When desktop creates a buffer, DESKTOP-BUFFER-FILE-NAME holds the file name to visit, DESKTOP-BUFFER-NAME holds the desired buffer name, and DESKTOP-BUFFER-MISC holds a list of miscellaneous info used by the `desktop-buffer-handlers' functions." (mh-find-path) (mh-visit-folder desktop-buffer-name) (current-buffer)) ;;; Variables (defvar mh-folder-filename nil "Full path of directory for this folder.") (defvar mh-partial-folder-mode-line-annotation "select" "Annotation when displaying part of a folder. The string is displayed after the folder's name. nil for no annotation.") (defvar mh-last-destination nil "Destination of last refile or write command.") (defvar mh-last-destination-folder nil "Destination of last refile command.") (defvar mh-last-destination-write nil "Destination of last write command.") (defvar mh-first-msg-num nil "Number of first message in buffer.") (defvar mh-last-msg-num nil "Number of last msg in buffer.") (defvar mh-msg-count nil "Number of msgs in buffer.") ;;; Sequence Menu (easy-menu-define mh-folder-sequence-menu mh-folder-mode-map "Menu for MH-E folder-sequence." '("Sequence" ["Add Message to Sequence..." mh-put-msg-in-seq (mh-get-msg-num nil)] ["List Sequences for Message" mh-msg-is-in-seq (mh-get-msg-num nil)] ["Delete Message from Sequence..." mh-delete-msg-from-seq (mh-get-msg-num nil)] ["List Sequences in Folder..." mh-list-sequences t] ["Delete Sequence..." mh-delete-seq t] ["Narrow to Sequence..." mh-narrow-to-seq t] ["Widen from Sequence" mh-widen mh-folder-view-stack] "--" ["Narrow to Subject Sequence" mh-narrow-to-subject t] ["Narrow to Tick Sequence" mh-narrow-to-tick (and mh-tick-seq (mh-seq-msgs (mh-find-seq mh-tick-seq)))] ["Delete Rest of Same Subject" mh-delete-subject t] ["Toggle Tick Mark" mh-toggle-tick t] "--" ["Push State Out to MH" mh-update-sequences t])) ;;; Message Menu (easy-menu-define mh-folder-message-menu mh-folder-mode-map "Menu for MH-E folder-message." '("Message" ["Show Message" mh-show (mh-get-msg-num nil)] ["Show Message with Header" mh-header-display (mh-get-msg-num nil)] ["Show Message with Preferred Alternative" mh-show-preferred-alternative (mh-get-msg-num nil)] ["Next Message" mh-next-undeleted-msg t] ["Previous Message" mh-previous-undeleted-msg t] ["Go to First Message" mh-first-msg t] ["Go to Last Message" mh-last-msg t] ["Go to Message by Number..." mh-goto-msg t] ["Modify Message" mh-modify t] ["Refile Message" mh-refile-msg (mh-get-msg-num nil)] ["Delete Message" mh-delete-msg (mh-get-msg-num nil)] ["Undo Delete/Refile/Junk" mh-undo (mh-outstanding-commands-p)] ["Execute Delete/Refile" mh-execute-commands (mh-outstanding-commands-p)] "--" ["Compose a New Message" mh-send t] ["Reply to Message..." mh-reply (mh-get-msg-num nil)] ["Forward Message..." mh-forward (mh-get-msg-num nil)] ["Redistribute Message..." mh-redistribute (mh-get-msg-num nil)] ["Edit Message Again" mh-edit-again (mh-get-msg-num nil)] ["Re-edit a Bounced Message" mh-extract-rejected-mail t] "--" ["Copy Message to Folder..." mh-copy-msg (mh-get-msg-num nil)] ["Print Message" mh-print-msg (mh-get-msg-num nil)] ["Write Message to File..." mh-write-msg-to-file (mh-get-msg-num nil)] ["Pipe Message to Command..." mh-pipe-msg (mh-get-msg-num nil)] ["Unpack Uuencoded Message..." mh-store-msg (mh-get-msg-num nil)] ["Burst Digest Message" mh-burst-digest (mh-get-msg-num nil)])) ;;; Folder Menu (easy-menu-define mh-folder-folder-menu mh-folder-mode-map "Menu for MH-E folder." '("Folder" ["Incorporate New Mail" mh-inc-folder t] ["Toggle Show/Folder" mh-toggle-showing t] ["Execute Delete/Refile" mh-execute-commands (mh-outstanding-commands-p)] ["Rescan Folder" mh-rescan-folder t] ["Thread Folder" mh-toggle-threads (not (memq 'unthread mh-view-ops))] ["Pack Folder" mh-pack-folder t] ["Sort Folder" mh-sort-folder t] "--" ["List Folders" mh-list-folders t] ["Visit a Folder..." mh-visit-folder t] ["View New Messages" mh-index-new-messages t] ["Search..." mh-search t] "--" ["Quit MH-E" mh-quit t])) ;;; MH-Folder Keys (suppress-keymap mh-folder-mode-map) ;; Use defalias to make sure the documented primary key bindings ;; appear in menu lists. (defalias 'mh-alt-show 'mh-show) (defalias 'mh-alt-refile-msg 'mh-refile-msg) (defalias 'mh-alt-send 'mh-send) (defalias 'mh-alt-visit-folder 'mh-visit-folder) ;; Save the "b" binding for a future `back'. Maybe? (gnus-define-keys mh-folder-mode-map " " mh-page-msg "!" mh-refile-or-write-again "'" mh-toggle-tick "," mh-header-display "." mh-alt-show ":" mh-show-preferred-alternative ";" mh-toggle-mh-decode-mime-flag ">" mh-write-msg-to-file "?" mh-help "E" mh-extract-rejected-mail "M" mh-modify "\177" mh-previous-page "\C-d" mh-delete-msg-no-motion "\t" mh-index-next-folder [backtab] mh-index-previous-folder "\M-\t" mh-index-previous-folder "\e<" mh-first-msg "\e>" mh-last-msg "\ed" mh-redistribute "\r" mh-show "^" mh-alt-refile-msg "c" mh-copy-msg "d" mh-delete-msg "e" mh-edit-again "f" mh-forward "g" mh-goto-msg "i" mh-inc-folder "k" mh-delete-subject-or-thread "m" mh-alt-send "n" mh-next-undeleted-msg "\M-n" mh-next-unread-msg "o" mh-refile-msg "p" mh-previous-undeleted-msg "\M-p" mh-previous-unread-msg "q" mh-quit "r" mh-reply "s" mh-send "t" mh-toggle-showing "u" mh-undo "v" mh-index-visit-folder "x" mh-execute-commands "|" mh-pipe-msg) (gnus-define-keys (mh-folder-map "F" mh-folder-mode-map) "?" mh-prefix-help "'" mh-index-ticked-messages "S" mh-sort-folder "c" mh-catchup "f" mh-alt-visit-folder "k" mh-kill-folder "l" mh-list-folders "n" mh-index-new-messages "o" mh-alt-visit-folder "p" mh-pack-folder "q" mh-index-sequenced-messages "r" mh-rescan-folder "s" mh-search "u" mh-undo-folder "v" mh-visit-folder) (define-key mh-folder-mode-map "I" mh-inc-spool-map) (gnus-define-keys (mh-junk-map "J" mh-folder-mode-map) "?" mh-prefix-help "b" mh-junk-blacklist "w" mh-junk-whitelist) (gnus-define-keys (mh-ps-print-map "P" mh-folder-mode-map) "?" mh-prefix-help "C" mh-ps-print-toggle-color "F" mh-ps-print-toggle-faces "f" mh-ps-print-msg-file "l" mh-print-msg "p" mh-ps-print-msg) (gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map) "'" mh-narrow-to-tick "?" mh-prefix-help "d" mh-delete-msg-from-seq "k" mh-delete-seq "l" mh-list-sequences "n" mh-narrow-to-seq "p" mh-put-msg-in-seq "s" mh-msg-is-in-seq "w" mh-widen) (gnus-define-keys (mh-thread-map "T" mh-folder-mode-map) "?" mh-prefix-help "u" mh-thread-ancestor "p" mh-thread-previous-sibling "n" mh-thread-next-sibling "t" mh-toggle-threads "d" mh-thread-delete "o" mh-thread-refile) (gnus-define-keys (mh-limit-map "/" mh-folder-mode-map) "'" mh-narrow-to-tick "?" mh-prefix-help "c" mh-narrow-to-cc "g" mh-narrow-to-range "m" mh-narrow-to-from "s" mh-narrow-to-subject "t" mh-narrow-to-to "w" mh-widen) (gnus-define-keys (mh-extract-map "X" mh-folder-mode-map) "?" mh-prefix-help "s" mh-store-msg ;shar "u" mh-store-msg) ;uuencode (gnus-define-keys (mh-digest-map "D" mh-folder-mode-map) " " mh-page-digest "?" mh-prefix-help "\177" mh-page-digest-backwards "b" mh-burst-digest) (gnus-define-keys (mh-mime-map "K" mh-folder-mode-map) "?" mh-prefix-help "a" mh-mime-save-parts "e" mh-display-with-external-viewer "i" mh-folder-inline-mime-part "o" mh-folder-save-mime-part "t" mh-toggle-mime-buttons "v" mh-folder-toggle-mime-part "\t" mh-next-button [backtab] mh-prev-button "\M-\t" mh-prev-button) (cond ((featurep 'xemacs) (define-key mh-folder-mode-map [button2] 'mh-show-mouse)) (t (define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse))) ;; "C-c /" prefix is used in mh-folder-mode by pgp.el and mailcrypt ;;; MH-Folder Help Messages ;; If you add a new prefix, add appropriate text to the nil key. ;; In general, messages are grouped logically. Taking the main commands for ;; example, the first line is "ways to view messages," the second line is ;; "things you can do with messages", and the third is "composing" messages. ;; When adding a new prefix, ensure that the help message contains "what" the ;; prefix is for. For example, if the word "folder" were not present in the ;; "F" entry, it would not be clear what these commands operated upon. (defvar mh-folder-mode-help-messages '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n" "[d]elete, [o]refile, e[x]ecute,\n" "[s]end, [r]eply,\n" "[;]toggle MIME decoding.\n" "Prefix characters:\n [F]older, [S]equence, [J]unk, MIME [K]eys," "\n [T]hread, [/]limit, e[X]tract, [D]igest, [I]nc spools.") (?F "[l]ist; [v]isit folder;\n" "[n]ew messages; [']ticked messages; [s]earch;\n" "[p]ack; [S]ort; [r]escan; [k]ill") (?P "[p]rint message to [f]ile; old-style [l]pr printing;\n" "Toggle printing of [C]olors, [F]aces") (?S "[p]ut message in sequence, [n]arrow, [']narrow to ticked, [w]iden,\n" "[s]equences, [l]ist,\n" "[d]elete message from sequence, [k]ill sequence") (?T "[t]oggle, [d]elete, [o]refile thread") (?/ "Limit to [c]c, ran[g]e, fro[m], [s]ubject, [t]o; [w]iden") (?X "un[s]har, [u]udecode message") (?D "[b]urst digest") (?K "[v]iew, [i]nline, with [e]xternal viewer; \n" "[o]utput/save MIME part; save [a]ll parts; \n" "[t]oggle buttons; [TAB] next; [SHIFT-TAB] previous") (?J "[b]lacklist, [w]hitelist message")) "Key binding cheat sheet. See `mh-set-help'.") ;;; MH-Folder Font Lock (defvar mh-folder-font-lock-keywords (list ;; Folders when displaying index buffer (list "^\\+.*" '(0 'mh-search-folder)) ;; Marked for refile (list (concat mh-scan-refiled-msg-regexp ".*") '(0 'mh-folder-refiled)) ;; Marked for deletion (list (concat mh-scan-deleted-msg-regexp ".*") '(0 'mh-folder-deleted)) ;; Marked for blacklisting (list (concat mh-scan-blacklisted-msg-regexp ".*") '(0 'mh-folder-blacklisted)) ;; Marked for whitelisting (list (concat mh-scan-whitelisted-msg-regexp ".*") '(0 'mh-folder-whitelisted)) ;; After subject (list mh-scan-body-regexp '(1 'mh-folder-body nil t)) ;; Subject '(mh-folder-font-lock-subject (1 'mh-folder-followup append t) (2 'mh-folder-subject append t)) ;; Current message number (list mh-scan-cur-msg-number-regexp '(1 'mh-folder-cur-msg-number)) ;; Message number (list mh-scan-good-msg-regexp '(1 'mh-folder-msg-number)) ;; Date (list mh-scan-date-regexp '(1 'mh-folder-date)) ;; Messages from me (To:) (list mh-scan-rcpt-regexp '(1 'mh-folder-to) '(2 'mh-folder-address)) ;; Messages to me (list mh-scan-sent-to-me-sender-regexp '(1 'mh-folder-sent-to-me-hint) '(2 'mh-folder-sent-to-me-sender))) "Keywords (regular expressions) used to fontify the MH-Folder buffer.") (defun mh-folder-font-lock-subject (limit) "Return MH-E scan subject strings to font-lock between point and LIMIT." (if (not (re-search-forward mh-scan-subject-regexp limit t)) nil (if (match-beginning 1) (set-match-data (list (match-beginning 1) (match-end 3) (match-beginning 1) (match-end 3) nil nil)) (set-match-data (list (match-beginning 3) (match-end 3) nil nil (match-beginning 3) (match-end 3)))) t)) ;; Fontify unseen messages in bold. (defmacro mh-generate-sequence-font-lock (seq prefix face) "Generate the appropriate code to fontify messages in SEQ. PREFIX is used to generate unique names for the variables and functions defined by the macro. So a different prefix should be provided for every invocation. FACE is the font-lock face used to display the matching scan lines." (let ((cache (intern (format "mh-folder-%s-seq-cache" prefix))) (func (intern (format "mh-folder-font-lock-%s" prefix)))) `(progn (defvar ,cache nil "Internal cache variable used for font-lock in MH-E. Should only be non-nil through font-lock stepping, and nil once font-lock is done highlighting.") (make-variable-buffer-local ',cache) (defun ,func (limit) "Return unseen message lines to font-lock between point and LIMIT." (if (not ,cache) (setq ,cache (mh-seq-msgs (mh-find-seq ,seq)))) (let ((cur-msg (mh-get-msg-num nil))) (cond ((not ,cache) nil) ((>= (point) limit) ;Presumably at end of buffer (setq ,cache nil) nil) ((member cur-msg ,cache) (let ((bpoint (progn (beginning-of-line)(point))) (epoint (progn (forward-line 1)(point)))) (if (<= limit (point)) (setq ,cache nil)) (set-match-data (list bpoint epoint bpoint epoint)) t)) (t ;; move forward one line at a time, checking each message (while (and (= 0 (forward-line 1)) (> limit (point)) (not (member (mh-get-msg-num nil) ,cache)))) ;; Examine how we must have exited the loop... (let ((cur-msg (mh-get-msg-num nil))) (cond ((or (<= limit (point)) (not (member cur-msg ,cache))) (setq ,cache nil) nil) ((member cur-msg ,cache) (let ((bpoint (progn (beginning-of-line) (point))) (epoint (progn (forward-line 1) (point)))) (if (<= limit (point)) (setq ,cache nil)) (set-match-data (list bpoint epoint bpoint epoint)) t)))))))) (setq mh-folder-font-lock-keywords (append mh-folder-font-lock-keywords (list (list ',func (list 1 '',face 'prepend t)))))))) (mh-generate-sequence-font-lock mh-unseen-seq unseen bold) (mh-generate-sequence-font-lock mh-tick-seq tick mh-folder-tick) ;;; MH-Folder Mode (defmacro mh-remove-xemacs-horizontal-scrollbar () "Get rid of the horizontal scrollbar that XEmacs insists on putting in." (when (featurep 'xemacs) `(if (and (featurep 'scrollbar) (fboundp 'set-specifier)) (set-specifier horizontal-scrollbar-visible-p nil (cons (current-buffer) nil))))) ;; Register mh-folder-mode as supporting which-function-mode... (mh-require 'which-func nil t) (when (and (boundp 'which-func-modes) (listp which-func-modes)) (add-to-list 'which-func-modes 'mh-folder-mode)) ;; Shush compiler. (defvar desktop-save-buffer) (defvar font-lock-auto-fontify) (mh-do-in-xemacs (defvar font-lock-defaults)) ;; Ensure new buffers won't get this mode if default major-mode is nil. (put 'mh-folder-mode 'mode-class 'special) ;; Autoload cookie needed by desktop.el ;;;###autoload (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder" "Major MH-E mode for \"editing\" an MH folder scan listing.\\ You can show the message the cursor is pointing to, and step through the messages. Messages can be marked for deletion or refiling into another folder; these commands are executed all at once with a separate command. Options that control this mode can be changed with \\[customize-group]; specify the \"mh\" group. In particular, please see the `mh-scan-format-file' option if you wish to modify scan's format. When a folder is visited, the hook `mh-folder-mode-hook' is run. Ranges ====== Many commands that operate on individual messages, such as `mh-forward' or `mh-refile-msg' take a RANGE argument. This argument can be used in several ways. If you provide the prefix argument (\\[universal-argument]) to these commands, then you will be prompted for the message range. This can be any valid MH range which can include messages, sequences, and the abbreviations (described in the mh(1) man page): - Indicates all messages in the range to , inclusive. The range must be nonempty. :N :+N :-N Up to N messages beginning with (or ending with) message num. Num may be any of the predefined symbols: first, prev, cur, next or last. first:N prev:N next:N last:N The first, previous, next or last messages, if they exist. all All of the messages. For example, a range that shows all of these things is `1 2 3 5-10 last:5 unseen'. If the option `transient-mark-mode' is set to t and you set a region in the MH-Folder buffer, then the MH-E command will perform the operation on all messages in that region. \\{mh-folder-mode-map}" (mh-do-in-gnu-emacs (unless mh-folder-tool-bar-map (mh-tool-bar-folder-buttons-init)) (if (boundp 'tool-bar-map) (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))) (mh-do-in-xemacs (mh-tool-bar-init :folder)) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(mh-folder-font-lock-keywords t)) (make-local-variable 'desktop-save-buffer) (setq desktop-save-buffer t) (mh-make-local-vars 'mh-colors-available-flag (mh-colors-available-p) ; Do we have colors available 'mh-current-folder (buffer-name) ; Name of folder, a string 'mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs 'mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/" (file-name-as-directory (mh-expand-file-name (buffer-name))) 'mh-display-buttons-for-inline-parts-flag mh-display-buttons-for-inline-parts-flag ; Allow for display of buttons to ; be toggled. 'mh-arrow-marker (make-marker) ; Marker where arrow is displayed 'overlay-arrow-position nil ; Allow for simultaneous display in 'overlay-arrow-string ">" ; different MH-E buffers. 'mh-showing-mode nil ; Show message also? 'mh-refile-list nil ; List of folder names in mh-seq-list 'mh-delete-list nil ; List of msgs nums to delete 'mh-blacklist nil ; List of messages to process as spam 'mh-whitelist nil ; List of messages to process as ham 'mh-seq-list nil ; Alist of (seq . msgs) nums 'mh-seen-list nil ; List of displayed messages 'mh-next-direction 'forward ; Direction to move to next message 'mh-view-ops () ; Stack that keeps track of the order ; in which narrowing/threading has been ; carried out. 'mh-folder-view-stack () ; Stack of previous views of the ; folder. 'mh-index-data nil ; If the folder was created by a call ; to mh-search, this contains info ; about the search results. 'mh-index-previous-search nil ; folder, indexer, search-regexp 'mh-index-msg-checksum-map nil ; msg -> checksum map 'mh-index-checksum-origin-map nil ; checksum -> ( orig-folder, orig-msg ) 'mh-index-sequence-search-flag nil ; folder resulted from sequence search 'mh-first-msg-num nil ; Number of first msg in buffer 'mh-last-msg-num nil ; Number of last msg in buffer 'mh-msg-count nil ; Number of msgs in buffer 'mh-mode-line-annotation nil ; Indicates message range 'mh-sequence-notation-history (make-hash-table) ; Remember what is overwritten by ; mh-note-seq. 'imenu-create-index-function 'mh-index-create-imenu-index ; Setup imenu support 'mh-previous-window-config nil) ; Previous window configuration (mh-remove-xemacs-horizontal-scrollbar) (setq truncate-lines t) (auto-save-mode -1) (setq buffer-offer-save t) (mh-make-local-hook (mh-write-file-functions)) (add-hook (mh-write-file-functions) 'mh-execute-commands nil t) (make-local-variable 'revert-buffer-function) (make-local-variable 'hl-line-mode) ; avoid pollution (mh-funcall-if-exists hl-line-mode 1) (setq revert-buffer-function 'mh-undo-folder) (add-to-list 'minor-mode-alist '(mh-showing-mode " Show")) (easy-menu-add mh-folder-sequence-menu) (easy-menu-add mh-folder-message-menu) (easy-menu-add mh-folder-folder-menu) (mh-inc-spool-make) (mh-set-help mh-folder-mode-help-messages) (if (and (featurep 'xemacs) font-lock-auto-fontify) (turn-on-font-lock))) ; Force font-lock in XEmacs. ;;; MH-Folder Commands ;; Alphabetical. ;; See also mh-comp.el, mh-junk.el, mh-mime.el, mh-print.el, ;; mh-search.el, and mh-seq.el. ;;;###mh-autoload (defun mh-delete-msg (range) "Delete RANGE\\. To mark a message for deletion, use this command. A \"D\" is placed by the message in the scan window, and the next undeleted message is displayed. If the previous command had been \\[mh-previous-undeleted-msg], then the next message displayed is the first undeleted message previous to the message just deleted. Use \\[mh-next-undeleted-msg] to force subsequent \\[mh-delete-msg] commands to move forward to the next undeleted message after deleting the message under the cursor. The hook `mh-delete-msg-hook' is called after you mark a message for deletion. For example, a past maintainer of MH-E used this once when he kept statistics on his mail usage. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Delete"))) (mh-delete-msg-no-motion range) (if (looking-at mh-scan-deleted-msg-regexp) (mh-next-msg))) ;;;###mh-autoload (defun mh-delete-msg-no-motion (range) "Delete RANGE, don't move to next message. This command marks the RANGE for deletion but leaves the cursor at the current message in case you wish to perform other operations on the message. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Delete"))) (mh-iterate-on-range () range (mh-delete-a-msg nil))) ;;;###mh-autoload (defun mh-execute-commands () "Perform outstanding operations\\. If you've marked messages to be refiled, deleted, blacklisted, or whitelisted and you want to go ahead and perform these operations on these messages, use this command. Many MH-E commands that may affect the numbering of the messages (such as \\[mh-rescan-folder] or \\[mh-pack-folder]) will ask if you want to perform these operations first and then either run this command for you or undo the pending operations. This function runs `mh-before-commands-processed-hook' before the commands are processed and `mh-after-commands-processed-hook' after the commands are processed." (interactive) (if mh-folder-view-stack (mh-widen t)) (mh-process-commands mh-current-folder) (mh-set-scan-mode) (mh-goto-cur-msg) ; after mh-set-scan-mode for efficiency (mh-make-folder-mode-line) t) ; return t for write-file-functions ;;;###mh-autoload (defun mh-first-msg () "Display first message." (interactive) (goto-char (point-min)) (while (and (not (eobp)) (not (looking-at mh-scan-valid-regexp))) (forward-line 1))) ;;;###mh-autoload (defun mh-goto-msg (number &optional no-error-if-no-message dont-show) "Go to a message\\. You can enter the message NUMBER either before or after typing \\[mh-goto-msg]. In the latter case, Emacs prompts you. In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means return nil instead of signaling an error if message does not exist\; in this case, the cursor is positioned near where the message would have been. Non-nil third argument DONT-SHOW means not to show the message." (interactive "NGo to message: ") (setq number (prefix-numeric-value number)) (let ((point (point)) (return-value t)) (goto-char (point-min)) (unless (re-search-forward (format (mh-scan-msg-search-regexp) number) nil t) (goto-char point) (unless no-error-if-no-message (error "No message %d" number)) (setq return-value nil)) (beginning-of-line) (or dont-show (not return-value) (mh-maybe-show number)) return-value)) ;;;###mh-autoload (defun mh-inc-folder (&optional file folder) "Incorporate new mail into a folder. You can incorporate mail from any file into the current folder by specifying a prefix argument; you'll be prompted for the name of the FILE to use as well as the destination FOLDER The hook `mh-inc-folder-hook' is run after incorporating new mail. Do not call this function from outside MH-E; use \\[mh-rmail] instead." (interactive (list (if current-prefix-arg (expand-file-name (read-file-name "inc mail from file: " mh-user-path))) (if current-prefix-arg (mh-prompt-for-folder "inc mail into" mh-inbox t)))) (if (not folder) (setq folder mh-inbox)) (let ((threading-needed-flag nil)) (let ((config (current-window-configuration))) (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) (setq mh-previous-window-config config)) ((not (eq (current-buffer) (get-buffer folder))) (switch-to-buffer folder) (setq mh-previous-window-config config)))) (mh-get-new-mail file) (when (and threading-needed-flag (save-excursion (goto-char (point-min)) (or (null mh-large-folder) (not (equal (forward-line (1+ mh-large-folder)) 0)) (and (message "Not threading since the number of messages exceeds `mh-large-folder'") nil)))) (mh-toggle-threads)) (beginning-of-line) (when (mh-outstanding-commands-p) (mh-notate-deleted-and-refiled)) (if (and mh-showing-mode (looking-at mh-scan-valid-regexp)) (mh-show)) (run-hooks 'mh-inc-folder-hook))) ;;;###mh-autoload (defun mh-last-msg () "Display last message." (interactive) (goto-char (point-max)) (while (and (not (bobp)) (not (looking-at mh-scan-valid-regexp))) (forward-line -1)) (mh-recenter nil)) ;;;###mh-autoload (defun mh-modify (&optional message) "Edit message. There are times when you need to edit a message. For example, you may need to fix a broken Content-Type header field. You can do this with this command. It displays the raw message in an editable buffer. When you are done editing, save and kill the buffer as you would any other. From a program, edit MESSAGE; nil means edit current message." (interactive) (let* ((message (or message (mh-get-msg-num t))) (msg-filename (mh-msg-filename message)) edit-buffer) (when (not (file-exists-p msg-filename)) (error "Message %d does not exist" message)) ;; Invalidate the show buffer if it is showing the same message that is ;; to be edited. (when (and (buffer-live-p (get-buffer mh-show-buffer)) (equal (with-current-buffer mh-show-buffer buffer-file-name) msg-filename)) (mh-invalidate-show-buffer)) ;; Edit message (find-file msg-filename) (setq edit-buffer (current-buffer)) ;; Set buffer properties (mh-letter-mode) (use-local-map text-mode-map) ;; Just show the edit buffer... (delete-other-windows) (switch-to-buffer edit-buffer))) ;;;###mh-autoload (defun mh-next-button (&optional backward-flag) "Go to the next button. If the end of the buffer is reached then the search wraps over to the start of the buffer. If an optional prefix argument BACKWARD-FLAG is given, the cursor will move to the previous button." (interactive (list current-prefix-arg)) (unless mh-showing-mode (mh-show)) (mh-in-show-buffer (mh-show-buffer) (mh-goto-next-button backward-flag))) ;;;###mh-autoload (defun mh-next-undeleted-msg (&optional count wait-after-complaining-flag) "Display next message. This command can be given a prefix argument COUNT to specify how many unread messages to skip. In a program, pause for a second after printing message if we are at the last undeleted message and optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil." (interactive "p") (setq mh-next-direction 'forward) (forward-line 1) (cond ((re-search-forward mh-scan-good-msg-regexp nil t count) (beginning-of-line) (mh-maybe-show)) (t (forward-line -1) (message "No more undeleted messages") (if wait-after-complaining-flag (sit-for 1))))) ;;;###mh-autoload (defun mh-next-unread-msg (&optional count) "Display next unread message. This command can be given a prefix argument COUNT to specify how many unread messages to skip." (interactive "p") (unless (> count 0) (error "The function `mh-next-unread-msg' expects positive argument")) (setq count (1- count)) (let ((unread-sequence (reverse (cdr (assoc mh-unseen-seq mh-seq-list)))) (cur-msg (mh-get-msg-num nil))) (cond ((and (not cur-msg) (not (bobp)) ;; If we are at the end of the buffer back up one line and go ;; to unread message after that. (progn (forward-line -1) (setq cur-msg (mh-get-msg-num nil))) nil)) ((or (null unread-sequence) (not cur-msg)) ;; No unread message or there aren't any messages in buffer... (message "No more unread messages")) ((progn ;; Skip messages (while (and unread-sequence (>= cur-msg (car unread-sequence))) (setq unread-sequence (cdr unread-sequence))) (while (> count 0) (setq unread-sequence (cdr unread-sequence)) (setq count (1- count))) (not (car unread-sequence))) (message "No more unread messages")) (t (loop for msg in unread-sequence when (mh-goto-msg msg t) return nil finally (message "No more unread messages")))))) ;;;###mh-autoload (defun mh-page-msg (&optional lines) "Display next page in message. You can give this command a prefix argument that specifies the number of LINES to scroll. This command will also show the next undeleted message if it is used at the bottom of a message." (interactive "P") (if mh-showing-mode (if mh-page-to-next-msg-flag (if (equal mh-next-direction 'backward) (mh-previous-undeleted-msg) (mh-next-undeleted-msg)) (if (mh-in-show-buffer (mh-show-buffer) (pos-visible-in-window-p (point-max))) (progn (message "End of message (Type %s to read %s undeleted message)" (single-key-description last-input-event) (if (equal mh-next-direction 'backward) "previous" "next")) (setq mh-page-to-next-msg-flag t)) (scroll-other-window lines))) (mh-show))) ;;;###mh-autoload (defun mh-prev-button () "Go to the previous button. If the beginning of the buffer is reached then the search wraps over to the end of the buffer." (interactive) (mh-next-button t)) ;;;###mh-autoload (defun mh-previous-page (&optional lines) "Display next page in message. You can give this command a prefix argument that specifies the number of LINES to scroll." (interactive "P") (mh-in-show-buffer (mh-show-buffer) (scroll-down lines))) ;;;###mh-autoload (defun mh-previous-undeleted-msg (&optional count wait-after-complaining-flag) "Display previous message. This command can be given a prefix argument COUNT to specify how many unread messages to skip. In a program, pause for a second after printing message if we are at the last undeleted message and optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil." (interactive "p") (setq mh-next-direction 'backward) (beginning-of-line) (cond ((re-search-backward mh-scan-good-msg-regexp nil t count) (mh-maybe-show)) (t (message "No previous undeleted message") (if wait-after-complaining-flag (sit-for 1))))) ;;;###mh-autoload (defun mh-previous-unread-msg (&optional count) "Display previous unread message. This command can be given a prefix argument COUNT to specify how many unread messages to skip." (interactive "p") (unless (> count 0) (error "The function `mh-previous-unread-msg' expects positive argument")) (setq count (1- count)) (let ((unread-sequence (cdr (assoc mh-unseen-seq mh-seq-list))) (cur-msg (mh-get-msg-num nil))) (cond ((and (not cur-msg) (not (bobp)) ;; If we are at the end of the buffer back up one line and go ;; to unread message after that. (progn (forward-line -1) (setq cur-msg (mh-get-msg-num nil))) nil)) ((or (null unread-sequence) (not cur-msg)) ;; No unread message or there aren't any messages in buffer... (message "No more unread messages")) ((progn ;; Skip count messages... (while (and unread-sequence (>= (car unread-sequence) cur-msg)) (setq unread-sequence (cdr unread-sequence))) (while (> count 0) (setq unread-sequence (cdr unread-sequence)) (setq count (1- count))) (not (car unread-sequence))) (message "No more unread messages")) (t (loop for msg in unread-sequence when (mh-goto-msg msg t) return nil finally (message "No more unread messages")))))) ;;;###mh-autoload (defun mh-quit () "Quit the current MH-E folder. When you want to quit using MH-E and go back to editing, you can use this command. This buries the buffers of the current MH-E folder and restores the buffers that were present when you first ran \\[mh-rmail]. It also removes any MH-E working buffers whose name begins with \" *mh-\" or \"*MH-E \". You can later restore your MH-E session by selecting the \"+inbox\" buffer or by running \\[mh-rmail] again. The two hooks `mh-before-quit-hook' and `mh-quit-hook' are called by this function. The former one is called before the quit occurs, so you might use it to perform any MH-E operations; you could perform some query and abort the quit or call `mh-execute-commands', for example. The latter is not run in an MH-E context, so you might use it to modify the window setup." (interactive) (run-hooks 'mh-before-quit-hook) (let ((show-buffer (get-buffer mh-show-buffer))) (when show-buffer (kill-buffer show-buffer))) (mh-update-sequences) (mh-destroy-postponed-handles) (bury-buffer (current-buffer)) ;; Delete all MH-E temporary and working buffers. (dolist (buffer (buffer-list)) (when (or (string-match "^ \\*mh-" (buffer-name buffer)) (string-match "^\\*MH-E " (buffer-name buffer))) (kill-buffer buffer))) (if mh-previous-window-config (set-window-configuration mh-previous-window-config)) (run-hooks 'mh-quit-hook)) ;;;###mh-autoload (defun mh-refile-msg (range folder &optional dont-update-last-destination-flag) "Refile (output) RANGE into FOLDER. You are prompted for the folder name. Note that this command can also be used to create folders. If you specify a folder that does not exist, you will be prompted to create it. The hook `mh-refile-msg-hook' is called after a message is marked to be refiled. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. In a program, the variables `mh-last-destination' and `mh-last-destination-folder' are not updated if DONT-UPDATE-LAST-DESTINATION-FLAG is non-nil." (interactive (list (mh-interactive-range "Refile") (intern (mh-prompt-for-refile-folder)))) (unless dont-update-last-destination-flag (setq mh-last-destination (cons 'refile folder) mh-last-destination-folder mh-last-destination)) (mh-iterate-on-range () range (mh-refile-a-msg nil folder)) (when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg))) ;;;###mh-autoload (defun mh-refile-or-write-again (range &optional interactive-flag) "Repeat last output command. If you are refiling several messages into the same folder, you can use this command to repeat the last refile (\\[mh-refile-msg]) or write (\\[mh-write-msg-to-file]). You can use a range. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. In a program, a non-nil INTERACTIVE-FLAG means that the function was called interactively." (interactive (list (mh-interactive-range "Redo") t)) (if (null mh-last-destination) (error "No previous refile or write")) (cond ((eq (car mh-last-destination) 'refile) (mh-refile-msg range (cdr mh-last-destination)) (message "Destination folder: %s" (cdr mh-last-destination))) (t (mh-iterate-on-range msg range (apply 'mh-write-msg-to-file msg (cdr mh-last-destination))) (mh-next-msg interactive-flag)))) ;;;###mh-autoload (defun mh-rescan-folder (&optional range dont-exec-pending) "Rescan folder\\. This command is useful to grab all messages in your \"+inbox\" after processing your new mail for the first time. If you don't want to rescan the entire folder, this command will accept a RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. This command will ask if you want to process refiles or deletes first and then either run \\[mh-execute-commands] for you or undo the pending refiles and deletes. In a program, the processing of outstanding commands is not performed if DONT-EXEC-PENDING is non-nil." (interactive (list (if current-prefix-arg (mh-read-range "Rescan" mh-current-folder t nil t mh-interpret-number-as-range-flag) nil))) (setq mh-next-direction 'forward) (let ((threaded-flag (memq 'unthread mh-view-ops)) (msg-num (mh-get-msg-num nil))) (mh-scan-folder mh-current-folder (or range "all") dont-exec-pending) ;; If there isn't a cur sequence, mh-scan-folder goes to the first message. ;; Try to stay where we were. (if (null (car (mh-seq-to-msgs 'cur))) (mh-goto-msg msg-num t t)) (cond (threaded-flag (mh-toggle-threads)) (mh-index-data (mh-index-insert-folder-headers))))) (defun mh-show-mouse (event) "Move point to mouse EVENT and show message." (interactive "e") (mouse-set-point event) (mh-show)) ;;;###mh-autoload (defun mh-toggle-showing () "Toggle between MH-Folder and MH-Folder Show modes. This command switches between MH-Folder mode and MH-Folder Show mode. MH-Folder mode turns off the associated show buffer so that you can perform operations on the messages quickly without reading them. This is an excellent way to prune out your junk mail or to refile a group of messages to another folder for later examination." (interactive) (if mh-showing-mode (mh-set-scan-mode) (mh-show))) ;;;###mh-autoload (defun mh-undo (range) "Undo pending deletes or refiles in RANGE. If you've deleted a message or refiled it, but changed your mind, you can cancel the action before you've executed it. Use this command to undo a refile on or deletion of a single message. You can also undo refiles and deletes for messages that are found in a given RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Undo"))) (cond ((numberp range) (let ((original-position (point))) (beginning-of-line) (while (not (or (looking-at mh-scan-refiled-msg-regexp) (looking-at mh-scan-deleted-msg-regexp) (looking-at mh-scan-blacklisted-msg-regexp) (looking-at mh-scan-whitelisted-msg-regexp) (and (eq mh-next-direction 'forward) (bobp)) (and (eq mh-next-direction 'backward) (save-excursion (forward-line) (eobp))))) (forward-line (if (eq mh-next-direction 'forward) -1 1))) (if (or (looking-at mh-scan-refiled-msg-regexp) (looking-at mh-scan-deleted-msg-regexp) (looking-at mh-scan-blacklisted-msg-regexp) (looking-at mh-scan-whitelisted-msg-regexp)) (progn (mh-undo-msg (mh-get-msg-num t)) (mh-maybe-show)) (goto-char original-position) (error "Nothing to undo")))) (t (mh-iterate-on-range () range (mh-undo-msg nil)))) (if (not (mh-outstanding-commands-p)) (mh-set-folder-modified-p nil))) ;;;###mh-autoload (defun mh-visit-folder (folder &optional range index-data) "Visit FOLDER. When you want to read the messages that you have refiled into folders, use this command to visit the folder. You are prompted for the folder name. The folder buffer will show just unseen messages if there are any; otherwise, it will show all the messages in the buffer as long there are fewer than `mh-large-folder' messages. If there are more, then you are prompted for a range of messages to scan. You can provide a prefix argument in order to specify a RANGE of messages to show when you visit the folder. In this case, regions are not used to specify the range and `mh-large-folder' is ignored. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. Note that this command can also be used to create folders. If you specify a folder that does not exist, you will be prompted to create it. Do not call this function from outside MH-E; use \\[mh-rmail] instead. If, in a program, RANGE is nil (the default), then all messages in FOLDER are displayed. If an index buffer is being created then INDEX-DATA is used to initialize the index buffer specific data structures." (interactive (let ((folder-name (mh-prompt-for-folder "Visit" mh-inbox t))) (list folder-name (mh-read-range "Scan" folder-name t nil current-prefix-arg mh-interpret-number-as-range-flag)))) (let ((config (current-window-configuration)) (current-buffer (current-buffer)) (threaded-view-flag mh-show-threads-flag)) (delete-other-windows) (when (get-buffer folder) (with-current-buffer folder (setq threaded-view-flag (memq 'unthread mh-view-ops)))) (when index-data (mh-make-folder folder) (setq mh-index-data (car index-data) mh-index-msg-checksum-map (make-hash-table :test #'equal) mh-index-checksum-origin-map (make-hash-table :test #'equal)) (mh-index-update-maps folder (cadr index-data)) (mh-index-create-sequences)) (mh-scan-folder folder (or range "all")) (cond ((and threaded-view-flag (save-excursion (goto-char (point-min)) (or (null mh-large-folder) (not (equal (forward-line (1+ mh-large-folder)) 0)) (and (message "Not threading since the number of messages exceeds `mh-large-folder'") nil)))) (mh-toggle-threads)) (mh-index-data (mh-index-insert-folder-headers))) (unless (eq current-buffer (current-buffer)) (setq mh-previous-window-config config))) nil) ;;;###mh-autoload (defun mh-write-msg-to-file (message file no-header) "Append MESSAGE to end of FILE\\. You are prompted for the filename. If the file already exists, the message is appended to it. You can also write the message to the file without the header by specifying a prefix argument NO-HEADER. Subsequent writes to the same file can be made with the command \\[mh-refile-or-write-again]." (interactive (list (mh-get-msg-num t) (let ((default-dir (if (eq 'write (car mh-last-destination-write)) (file-name-directory (car (cdr mh-last-destination-write))) default-directory))) (read-file-name (format "Save message%s in file: " (if current-prefix-arg " body" "")) default-dir (if (eq 'write (car mh-last-destination-write)) (car (cdr mh-last-destination-write)) (expand-file-name "mail.out" default-dir)))) current-prefix-arg)) (let ((msg-file-to-output (mh-msg-filename message)) (output-file (mh-expand-file-name file))) (setq mh-last-destination (list 'write file (if no-header 'no-header)) mh-last-destination-write mh-last-destination) (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (insert-file-contents msg-file-to-output) (goto-char (point-min)) (if no-header (search-forward "\n\n")) (append-to-file (point) (point-max) output-file)))) ;;;###mh-autoload (defun mh-update-sequences () "Flush MH-E's state out to MH. This function updates the sequence specified by your \"Unseen-Sequence:\" profile component, \"cur\", and the sequence listed by the `mh-tick-seq' option which is \"tick\" by default. The message at the cursor is used for \"cur\"." (interactive) ;; mh-update-sequences is the opposite of mh-read-folder-sequences, ;; which updates MH-E's state from MH. (let ((folder-set (mh-update-unseen)) (new-cur (mh-get-msg-num nil))) (if new-cur (let ((seq-entry (mh-find-seq 'cur))) (mh-remove-cur-notation) (setcdr seq-entry (list new-cur)) ;delete-seq-locally, add-msgs-to-seq (mh-define-sequence 'cur (list new-cur)) (beginning-of-line) (if (looking-at mh-scan-good-msg-regexp) (mh-notate-cur))) (or folder-set (save-excursion ;; psg - mh-current-folder is nil if mh-summary-height < 4 ! ;; So I added this sanity check. (if (stringp mh-current-folder) (mh-exec-cmd-quiet t "folder" mh-current-folder "-fast") (mh-exec-cmd-quiet t "folder" "-fast"))))))) ;;; Support Routines (defun mh-get-new-mail (maildrop-name) "Read new mail from MAILDROP-NAME into the current buffer. Return in the current buffer." (let ((point-before-inc (point)) (folder mh-current-folder) (new-mail-flag nil)) (with-mh-folder-updating (t) (if maildrop-name (message "inc %s -file %s..." folder maildrop-name) (message "inc %s..." folder)) (setq mh-next-direction 'forward) (goto-char (point-max)) (mh-remove-cur-notation) (let ((start-of-inc (point))) (if maildrop-name ;; I think MH 5 used "-ms-file" instead of "-file", ;; which would make inc'ing from maildrops fail. (mh-exec-cmd-output mh-inc-prog nil folder (mh-scan-format) "-file" (expand-file-name maildrop-name) "-width" (window-width) "-truncate") (mh-exec-cmd-output mh-inc-prog nil (mh-scan-format) "-width" (window-width))) (if maildrop-name (message "inc %s -file %s...done" folder maildrop-name) (message "inc %s...done" folder)) (goto-char start-of-inc) (cond ((save-excursion (re-search-forward "^inc: no mail" nil t)) (message "No new mail%s%s" (if maildrop-name " in " "") (if maildrop-name maildrop-name ""))) ((and (when mh-folder-view-stack (let ((saved-text (buffer-substring-no-properties start-of-inc (point-max)))) (delete-region start-of-inc (point-max)) (unwind-protect (mh-widen t) (mh-remove-cur-notation) (goto-char (point-max)) (setq start-of-inc (point)) (insert saved-text) (goto-char start-of-inc)))) nil)) ((re-search-forward "^inc:" nil t) ; Error messages (error "Error incorporating mail")) ((and (equal mh-scan-format-file t) mh-adaptive-cmd-note-flag ;; Have we reached an edge condition? (save-excursion (re-search-forward mh-scan-msg-overflow-regexp nil 0 1)) (setq start-of-inc (mh-generate-new-cmd-note folder)) nil)) (t (setq new-mail-flag t))) (keep-lines mh-scan-valid-regexp) ; Flush random scan lines (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 (progn (mh-make-folder-mode-line) (when (mh-speed-flists-active-p) (mh-speed-flists t mh-current-folder)) (when (memq 'unthread mh-view-ops) (mh-thread-inc folder start-of-inc)) (mh-goto-cur-msg)) (goto-char point-before-inc)) (mh-notate-user-sequences (cons start-of-inc (point-max))))))) (defun mh-generate-new-cmd-note (folder) "Fix the `mh-cmd-note' value for this FOLDER. After doing an `mh-get-new-mail' operation in this FOLDER, at least one line that looks like a truncated message number was found. Remove the text added by the last `mh-inc' command. It should be the messages cur-last. Call `mh-set-cmd-note', adjusting the notation column with the width of the largest message number in FOLDER. Reformat the message number width on each line in the buffer and trim the line length to fit in the window. Rescan the FOLDER in the range cur-last in order to display the messages that were removed earlier. They should all fit in the scan line now with no message truncation." (save-excursion (let ((maxcol (1- (window-width))) (old-cmd-note mh-cmd-note) mh-cmd-note-fmt msgnum) ;; Nuke all of the lines just added by the last inc (delete-char (- (point-max) (point))) ;; Update the current buffer to reflect the new mh-cmd-note ;; value needed to display messages. (mh-set-cmd-note (mh-msg-num-width-to-column (mh-msg-num-width folder))) (setq mh-cmd-note-fmt (concat "%" (format "%d" mh-cmd-note) "d")) ;; Cleanup the messages that are in the buffer right now (goto-char (point-min)) (cond ((memq 'unthread mh-view-ops) (mh-thread-add-spaces (- mh-cmd-note old-cmd-note))) (t (while (re-search-forward (mh-scan-msg-number-regexp) nil 0 1) ;; reformat the number to fix in mh-cmd-note columns (setq msgnum (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) (replace-match (format mh-cmd-note-fmt msgnum)) ;; trim the line to fix in the window (end-of-line) (let ((eol (point))) (move-to-column maxcol) (if (<= (point) eol) (delete-char (- eol (point)))))))) ;; now re-read the lost messages (goto-char (point-max)) (prog1 (point) (mh-regenerate-headers "cur-last" t))))) ;;;###mh-autoload (defun mh-goto-cur-msg (&optional minimal-changes-flag) "Position the cursor at the current message. When optional argument MINIMAL-CHANGES-FLAG is non-nil, the function doesn't recenter the folder buffer." (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) (cond ((and cur-msg (mh-goto-msg cur-msg t t)) (unless minimal-changes-flag (mh-notate-cur) (mh-recenter 0) (mh-maybe-show cur-msg))) (t (setq overlay-arrow-position nil) (message "No current message"))))) ;;;###mh-autoload (defun mh-recenter (arg) "Like recenter but with three improvements: - At the end of the buffer it tries to show fewer empty lines. - operates only if the current buffer is in the selected window. (Commands like `save-some-buffers' can make this false.) - nil ARG means recenter as if prefix argument had been given." (cond ((not (eq (get-buffer-window (current-buffer)) (selected-window))) nil) ((= (point-max) (save-excursion (forward-line (- (/ (window-height) 2) 2)) (point))) (let ((lines-from-end 2)) (save-excursion (while (> (point-max) (progn (forward-line) (point))) (incf lines-from-end))) (recenter (- lines-from-end)))) ;; '(4) is the same as C-u prefix argument. (t (recenter (or arg '(4)))))) (defun mh-update-unseen () "Synchronize the unseen sequence with MH. Return non-nil if the MH folder was set. The hook `mh-unseen-updated-hook' is called after the unseen sequence is updated." (if mh-seen-list (let* ((unseen-seq (mh-find-seq mh-unseen-seq)) (unseen-msgs (mh-seq-msgs unseen-seq))) (if unseen-msgs (progn (mh-undefine-sequence mh-unseen-seq mh-seen-list) (run-hooks 'mh-unseen-updated-hook) (while mh-seen-list (setq unseen-msgs (delq (car mh-seen-list) unseen-msgs)) (setq mh-seen-list (cdr mh-seen-list))) (setcdr unseen-seq unseen-msgs) t) ;since we set the folder (setq mh-seen-list nil))))) ;;;###mh-autoload (defun mh-outstanding-commands-p () "Return non-nil if there are outstanding deletes or refiles." (save-excursion (when (eq major-mode 'mh-show-mode) (set-buffer mh-show-folder-buffer)) (or mh-delete-list mh-refile-list mh-blacklist mh-whitelist))) ;;;###mh-autoload (defun mh-set-folder-modified-p (flag) "Mark current folder as modified or unmodified according to FLAG." (set-buffer-modified-p flag)) (defun mh-process-commands (folder) "Process outstanding commands for FOLDER. This function runs `mh-before-commands-processed-hook' before the commands are processed and `mh-after-commands-processed-hook' after the commands are processed." (message "Processing deletes and refiles for %s..." folder) (set-buffer folder) (with-mh-folder-updating (nil) ;; Run the before hook -- the refile and delete lists are still valid (run-hooks 'mh-before-commands-processed-hook) ;; Update the unseen sequence if it exists (mh-update-unseen) (let ((redraw-needed-flag mh-index-data) (folders-changed (list mh-current-folder)) (seq-map (and (or (and mh-refile-list mh-refile-preserves-sequences-flag) (and mh-whitelist mh-whitelist-preserves-sequences-flag)) (mh-create-sequence-map mh-seq-list))) (dest-map (and mh-refile-list mh-refile-preserves-sequences-flag (make-hash-table))) (white-map (and mh-whitelist mh-whitelist-preserves-sequences-flag (make-hash-table)))) ;; Remove invalid scan lines if we are in an index folder and then remove ;; the real messages (when mh-index-data (mh-index-delete-folder-headers) (setq folders-changed (append folders-changed (mh-index-execute-commands)))) ;; Then refile messages (mh-mapc #'(lambda (folder-msg-list) (let* ((dest-folder (symbol-name (car folder-msg-list))) (last (car (mh-translate-range dest-folder "last"))) (msgs (cdr folder-msg-list))) (push dest-folder folders-changed) (setq redraw-needed-flag t) (apply #'mh-exec-cmd "refile" "-src" folder dest-folder (mh-coalesce-msg-list msgs)) (mh-delete-scan-msgs msgs) ;; Preserve sequences in destination folder... (when mh-refile-preserves-sequences-flag (clrhash dest-map) (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) ;; 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)))) dest-map)))) mh-refile-list) (setq mh-refile-list ()) ;; Now delete messages (cond (mh-delete-list (setq redraw-needed-flag t) (apply 'mh-exec-cmd "rmm" folder (mh-coalesce-msg-list mh-delete-list)) (mh-delete-scan-msgs mh-delete-list) (setq mh-delete-list nil))) ;; Blacklist messages. (when mh-blacklist (let ((msg-list (mh-coalesce-msg-list mh-blacklist)) (dest (mh-junk-blacklist-disposition))) (mh-junk-process-blacklist mh-blacklist) ;; TODO I wonder why mh-exec-cmd is used instead of the following: ;; (mh-refile-a-msg nil (intern dest)) ;; (mh-delete-a-msg nil))) (if (null dest) (apply 'mh-exec-cmd "rmm" folder msg-list) (apply 'mh-exec-cmd "refile" "-src" folder dest msg-list) (push dest folders-changed)) (setq redraw-needed-flag t) (mh-delete-scan-msgs mh-blacklist) (setq mh-blacklist nil))) ;; Whitelist messages. (when mh-whitelist (let ((msg-list (mh-coalesce-msg-list mh-whitelist)) (last (car (mh-translate-range mh-inbox "last")))) (mh-junk-process-whitelist mh-whitelist) (apply #'mh-exec-cmd "refile" "-src" folder mh-inbox msg-list) (push mh-inbox folders-changed) (setq redraw-needed-flag t) (mh-delete-scan-msgs mh-whitelist) (when mh-whitelist-preserves-sequences-flag (clrhash white-map) (loop for i from (1+ (or last 0)) for msg in (sort (copy-sequence mh-whitelist) #'<) do (loop for seq-name in (gethash msg seq-map) do (push i (gethash seq-name white-map)))) (maphash #'(lambda (seq msgs) ;; Can't be run in background, since the current ;; folder is changed by mark this could lead to a ;; race condition with the next refile/whitelist. (apply #'mh-exec-cmd "mark" "-sequence" (symbol-name seq) mh-inbox "-add" (mapcar #'(lambda(x) (format "%s" x)) (mh-coalesce-msg-list msgs)))) white-map)) (setq mh-whitelist nil))) ;; Don't need to remove sequences since delete and refile do so. ;; Mark cur message (if (> (buffer-size) 0) (mh-define-sequence 'cur (list (or (mh-get-msg-num nil) "last")))) ;; Redraw folder buffer if needed (when (and redraw-needed-flag) (when (mh-speed-flists-active-p) (apply #'mh-speed-flists t folders-changed)) (cond ((memq 'unthread mh-view-ops) (mh-thread-inc folder (point-max))) (mh-index-data (mh-index-insert-folder-headers)))) (and (buffer-file-name (get-buffer mh-show-buffer)) (not (file-exists-p (buffer-file-name (get-buffer mh-show-buffer)))) ;; If "inc" were to put a new msg in this file, ;; we would not notice, so mark it invalid now. (mh-invalidate-show-buffer)) (setq mh-seq-list (mh-read-folder-sequences mh-current-folder nil)) (mh-remove-all-notation) (mh-notate-user-sequences) ;; Run the after hook -- now folders-changed is valid, ;; but not the lists of specific messages. (let ((mh-folders-changed folders-changed)) (run-hooks 'mh-after-commands-processed-hook))) (message "Processing deletes and refiles for %s...done" folder))) (defun mh-delete-scan-msgs (msgs) "Delete the scan listing lines for MSGS." (save-excursion (while msgs (when (mh-goto-msg (car msgs) t t) (when (memq 'unthread mh-view-ops) (mh-thread-forget-message (car msgs))) (mh-delete-line 1)) (setq msgs (cdr msgs))))) (defun mh-set-scan-mode () "Display the scan listing buffer, but do not show a message." (if (get-buffer mh-show-buffer) (delete-windows-on mh-show-buffer)) (mh-showing-mode 0) (force-mode-line-update) (if mh-recenter-summary-flag (mh-recenter nil))) ;;;###mh-autoload (defun mh-make-folder-mode-line (&optional ignored) "Set the fields of the mode line for a folder buffer. The optional argument is now obsolete and IGNORED. It used to be used to pass in what is now stored in the buffer-local variable `mh-mode-line-annotation'." (save-excursion (save-window-excursion (mh-first-msg) (let ((new-first-msg-num (mh-get-msg-num nil))) (when (or (not (memq 'unthread mh-view-ops)) (null mh-first-msg-num) (null new-first-msg-num) (< new-first-msg-num mh-first-msg-num)) (setq mh-first-msg-num new-first-msg-num))) (mh-last-msg) (let ((new-last-msg-num (mh-get-msg-num nil))) (when (or (not (memq 'unthread mh-view-ops)) (null mh-last-msg-num) (null new-last-msg-num) (> new-last-msg-num mh-last-msg-num)) (setq mh-last-msg-num new-last-msg-num))) (setq mh-msg-count (if mh-first-msg-num (count-lines (point-min) (point-max)) 0)) (setq mode-line-buffer-identification (list (format " {%%b%s} %s msg%s" (if mh-mode-line-annotation (format "/%s" mh-mode-line-annotation) "") (if (zerop mh-msg-count) "no" (format "%d" mh-msg-count)) (if (zerop mh-msg-count) "s" (cond ((> mh-msg-count 1) (format "s (%d-%d)" mh-first-msg-num mh-last-msg-num)) (mh-first-msg-num (format " (%d)" mh-first-msg-num)) ("")))))) (mh-logo-display)))) ;;;###mh-autoload (defun mh-scan-folder (folder range &optional dont-exec-pending) "Scan FOLDER over RANGE. After the scan is performed, switch to the buffer associated with FOLDER. Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use. The processing of outstanding commands is not performed if DONT-EXEC-PENDING is non-nil." (when (stringp range) (setq range (delete "" (split-string range "[ \t\n]")))) (cond ((null (get-buffer folder)) (mh-make-folder folder)) (t (unless dont-exec-pending (mh-process-or-undo-commands folder) (mh-reset-threads-and-narrowing)) (switch-to-buffer folder))) (mh-regenerate-headers range) (if (zerop (buffer-size)) (if (equal range "all") (message "Folder %s is empty" folder) (message "No messages in %s, range %s" folder range)) (mh-goto-cur-msg)) (when (mh-outstanding-commands-p) (mh-notate-deleted-and-refiled))) ;;;###mh-autoload (defun mh-process-or-undo-commands (folder) "If FOLDER has outstanding commands, then either process or discard them. Called by functions like `mh-sort-folder', so also invalidate show buffer." (set-buffer folder) (if (mh-outstanding-commands-p) (if (or mh-do-not-confirm-flag (y-or-n-p "Process outstanding deletes and refiles? ")) (mh-process-commands folder) (set-buffer folder) (mh-undo-folder))) (mh-update-unseen) (mh-invalidate-show-buffer)) ;;;###mh-autoload (defun mh-regenerate-headers (range &optional update) "Scan folder over RANGE. If UPDATE, append the scan lines, otherwise replace." (let ((folder mh-current-folder) (range (if (and range (atom range)) (list range) range)) scan-start) (message "Scanning %s..." folder) (mh-remove-all-notation) (with-mh-folder-updating (nil) (if update (goto-char (point-max)) (delete-region (point-min) (point-max)) (if mh-adaptive-cmd-note-flag (mh-set-cmd-note (mh-msg-num-width-to-column (mh-msg-num-width folder))))) (setq scan-start (point)) (apply #'mh-exec-cmd-output mh-scan-prog nil (mh-scan-format) "-noclear" "-noheader" "-width" (window-width) folder range) (goto-char scan-start) (cond ((looking-at "scan: no messages in") (keep-lines mh-scan-valid-regexp)) ; Flush random scan lines ((looking-at (if (mh-variant-p 'gnu-mh) "scan: message set .* does not exist" "scan: bad message list ")) (keep-lines mh-scan-valid-regexp)) ((looking-at "scan: ")) ; Keep error messages (t (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines (setq mh-seq-list (mh-read-folder-sequences folder nil)) (mh-notate-user-sequences) (or update (setq mh-mode-line-annotation (if (equal range '("all")) nil mh-partial-folder-mode-line-annotation))) (mh-make-folder-mode-line)) (message "Scanning %s...done" folder))) ;;;###mh-autoload (defun mh-reset-threads-and-narrowing () "Reset all variables pertaining to threads and narrowing. Also removes all content from the folder buffer." (setq mh-view-ops ()) (setq mh-folder-view-stack ()) (setq mh-thread-scan-line-map-stack ()) (let ((buffer-read-only nil)) (erase-buffer))) (defun mh-make-folder (name) "Create a new mail folder called NAME. Make it the current folder." (switch-to-buffer name) (setq buffer-read-only nil) (erase-buffer) (if mh-adaptive-cmd-note-flag (mh-set-cmd-note (mh-msg-num-width-to-column (mh-msg-num-width name)))) (setq buffer-read-only t) (mh-folder-mode) (mh-set-folder-modified-p nil) (setq buffer-file-name mh-folder-filename) (when (and (not mh-index-data) (file-exists-p (concat buffer-file-name mh-index-data-file))) (mh-index-read-data)) (mh-make-folder-mode-line)) ;;;###mh-autoload (defun mh-next-msg (&optional wait-after-complaining-flag) "Move backward or forward to the next undeleted message in the buffer. If optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil and we are at the last message, then wait for a second after telling the user that there aren't any more unread messages." (if (eq mh-next-direction 'forward) (mh-next-undeleted-msg 1 wait-after-complaining-flag) (mh-previous-undeleted-msg 1 wait-after-complaining-flag))) ;;;###mh-autoload (defun mh-prompt-for-refile-folder () "Prompt the user for a folder in which the message should be filed. The folder is returned as a string. The default folder name is generated by the option `mh-default-folder-for-message-function' if it is non-nil or `mh-folder-from-address'." (mh-prompt-for-folder "Destination" (let ((refile-file (ignore-errors (mh-msg-filename (mh-get-msg-num t))))) (if (null refile-file) "" (with-current-buffer (get-buffer-create mh-temp-buffer) (erase-buffer) (insert-file-contents refile-file) (or (and mh-default-folder-for-message-function (let ((buffer-file-name refile-file)) (funcall mh-default-folder-for-message-function))) (mh-folder-from-address) (and (eq 'refile (car mh-last-destination-folder)) (symbol-name (cdr mh-last-destination-folder))) "")))) t)) ;;;###mh-autoload (defun mh-folder-from-address () "Derive folder name from sender. The name of the folder is derived as follows: a) The folder name associated with the first address found in the list `mh-default-folder-list' is used. Each element in this list contains a \"Check Recipient\" item. If this item is turned on, then the address is checked against the recipient instead of the sender. This is useful for mailing lists. b) An alias prefixed by `mh-default-folder-prefix' corresponding to the address is used. The prefix is used to prevent clutter in your mail directory. Return nil if a folder name was not derived, or if the variable `mh-default-folder-must-exist-flag' is t and the folder does not exist." ;; Loop for all entries in mh-default-folder-list (save-restriction (goto-char (point-min)) (re-search-forward "\n\n" nil 'limit) (narrow-to-region (point-min) (point)) (let ((to/cc (concat (or (message-fetch-field "to") "") ", " (or (message-fetch-field "cc") ""))) (from (or (message-fetch-field "from") "")) folder-name) (setq folder-name (loop for list in mh-default-folder-list when (string-match (nth 0 list) (if (nth 2 list) to/cc from)) return (nth 1 list) finally return nil)) ;; Make sure a result from `mh-default-folder-list' begins with "+" ;; since 'mh-expand-file-name below depends on it (when (and folder-name (not (eq (aref folder-name 0) ?+))) (setq folder-name (concat "+" folder-name))) ;; If not, is there an alias for the address? (when (not folder-name) (let* ((from-header (mh-extract-from-header-value)) (address (and from-header (nth 1 (mail-extract-address-components from-header)))) (alias (and address (mh-alias-address-to-alias address)))) (when alias (setq folder-name (and alias (concat "+" mh-default-folder-prefix alias)))))) ;; If mh-default-folder-must-exist-flag set, check that folder exists. (if (and folder-name (or (not mh-default-folder-must-exist-flag) (file-exists-p (mh-expand-file-name folder-name)))) folder-name)))) ;;;###mh-autoload (defun mh-delete-a-msg (message) "Delete MESSAGE. If MESSAGE is nil then the message at point is deleted. The hook `mh-delete-msg-hook' is called after you mark a message for deletion. For example, a past maintainer of MH-E used this once when he kept statistics on his mail usage." (save-excursion (if (numberp message) (mh-goto-msg message nil t) (beginning-of-line) (setq message (mh-get-msg-num t))) (if (looking-at mh-scan-refiled-msg-regexp) (error "Message %d is refiled; undo refile before deleting" message)) (if (looking-at mh-scan-blacklisted-msg-regexp) (error "Message %d is blacklisted; undo before deleting" message)) (if (looking-at mh-scan-whitelisted-msg-regexp) (error "Message %d is whitelisted; undo before deleting" message)) (if (looking-at mh-scan-deleted-msg-regexp) nil (mh-set-folder-modified-p t) (setq mh-delete-list (cons message mh-delete-list)) (mh-notate nil mh-note-deleted mh-cmd-note) (run-hooks 'mh-delete-msg-hook)))) ;;;###mh-autoload (defun mh-refile-a-msg (message folder) "Refile MESSAGE in FOLDER. If MESSAGE is nil then the message at point is refiled. Folder is a symbol, not a string. The hook `mh-refile-msg-hook' is called after a message is marked to be refiled." (save-excursion (if (numberp message) (mh-goto-msg message nil t) (beginning-of-line) (setq message (mh-get-msg-num t))) (cond ((looking-at mh-scan-deleted-msg-regexp) (error "Message %d is deleted; undo delete before moving" message)) ((looking-at mh-scan-blacklisted-msg-regexp) (error "Message %d is blacklisted; undo before moving" message)) ((looking-at mh-scan-whitelisted-msg-regexp) (error "Message %d is whitelisted; undo before moving" message)) ((looking-at mh-scan-refiled-msg-regexp) (if (y-or-n-p (format "Message %d already refiled; copy to %s as well? " message folder)) (mh-exec-cmd "refile" (mh-get-msg-num t) "-link" "-src" mh-current-folder (symbol-name folder)) (message "Message not copied"))) (t (mh-set-folder-modified-p t) (cond ((null (assoc folder mh-refile-list)) (push (list folder message) mh-refile-list)) ((not (member message (cdr (assoc folder mh-refile-list)))) (push message (cdr (assoc folder mh-refile-list))))) (mh-notate nil mh-note-refiled mh-cmd-note) (run-hooks 'mh-refile-msg-hook))))) (defun mh-undo-msg (msg) "Undo the deletion, refile, black- or whitelisting of one MSG. If MSG is nil then act on the message at point" (save-excursion (if (numberp msg) (mh-goto-msg msg t t) (beginning-of-line) (setq msg (mh-get-msg-num t))) (cond ((memq msg mh-delete-list) (setq mh-delete-list (delq msg mh-delete-list))) ((memq msg mh-blacklist) (setq mh-blacklist (delq msg mh-blacklist))) ((memq msg mh-whitelist) (setq mh-whitelist (delq msg mh-whitelist))) (t (dolist (folder-msg-list mh-refile-list) (setf (cdr folder-msg-list) (remove msg (cdr folder-msg-list)))) (setq mh-refile-list (loop for x in mh-refile-list unless (null (cdr x)) collect x)))) (mh-notate nil ? mh-cmd-note))) ;;;###mh-autoload (defun mh-msg-filename (msg &optional folder) "Return the file name of MSG in FOLDER (default current folder)." (expand-file-name (int-to-string msg) (if folder (mh-expand-file-name folder) mh-folder-filename))) (provide 'mh-folder) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-folder.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-buffers.el0000644000175000000620000000614412114520723020006 0ustar wohlerstaff;;; mh-buffers.el --- MH-E buffer constants and utilities ;; Copyright (C) 1993, 1995, 1997, 2000-2013 Free Software Foundation, ;; Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: ;; The names of ephemeral buffers have a " *mh-" prefix (so that they ;; are hidden and can be programmatically removed in mh-quit), and the ;; variable names have the form mh-temp-.*-buffer. (defconst mh-temp-buffer " *mh-temp*") ;scratch (defconst mh-temp-checksum-buffer " *mh-checksum*") (defconst mh-temp-fetch-buffer " *mh-fetch*") ;wget/curl/fetch output (defconst mh-temp-index-buffer " *mh-index*") ;; The names of MH-E buffers that are not ephemeral and can be used by ;; the user (and deleted by the user when no longer needed) have a ;; "*MH-E " prefix (so they can be programmatically removed in ;; mh-quit), and the variable names have the form mh-.*-buffer. ;; Temporary buffers for search results (defconst mh-aliases-buffer "*MH-E Aliases*") ;alias lookups (defconst mh-folders-buffer "*MH-E Folders*") ;folder list (defconst mh-help-buffer "*MH-E Help*") ;quick help (defconst mh-info-buffer "*MH-E Info*") ;version information buffer (defconst mh-log-buffer "*MH-E Log*") ;output of MH commands and so on (defconst mh-mail-delivery-buffer "*MH-E Mail Delivery*") ;mail delivery log (defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent (defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list (defvar mh-log-buffer-lines 100 "Number of lines to keep in `mh-log-buffer'.") (defun mh-truncate-log-buffer () "If `mh-log-buffer' is too big then truncate it. If the number of lines in `mh-log-buffer' exceeds `mh-log-buffer-lines' then keep only the last `mh-log-buffer-lines'. As a side effect the point is set to the end of the log buffer. The function returns the size of the final size of the log buffer." (with-current-buffer (get-buffer-create mh-log-buffer) (goto-char (point-max)) (save-excursion (when (equal (forward-line (- mh-log-buffer-lines)) 0) (delete-region (point-min) (point)))) (unless (or (bobp) (save-excursion (and (equal (forward-line -1) 0) (equal (char-after) ? )))) (insert "\n \n")) (buffer-size))) (provide 'mh-buffers) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-buffers.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-xface.el0000644000175000000620000004627212114520723017446 0ustar wohlerstaff;;; mh-xface.el --- MH-E X-Face and Face header field display ;; Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;;; Change Log: ;;; Code: (require 'mh-e) (mh-require-cl) (autoload 'message-fetch-field "message") (defvar mh-show-xface-function (cond ((and (featurep 'xemacs) (locate-library "x-face") (not (featurep 'xface))) (load "x-face" t t) #'mh-face-display-function) ((>= emacs-major-version 21) #'mh-face-display-function) (t #'ignore)) "Determine at run time what function should be called to display X-Face.") (defvar mh-uncompface-executable (and (fboundp 'executable-find) (executable-find "uncompface"))) ;;; X-Face Display ;;;###mh-autoload (defun mh-show-xface () "Display X-Face." (when (and window-system mh-show-use-xface-flag (or mh-decode-mime-flag mh-mhl-format-file mh-clean-message-header-flag)) (funcall mh-show-xface-function))) (defun mh-face-display-function () "Display a Face, X-Face, or X-Image-URL header field. If more than one of these are present, then the first one found in this order is used." (save-restriction (goto-char (point-min)) (re-search-forward "\n\n" (point-max) t) (narrow-to-region (point-min) (point)) (let* ((case-fold-search t) (face (message-fetch-field "face" t)) (x-face (message-fetch-field "x-face" t)) (url (message-fetch-field "x-image-url" t)) raw type) (cond (face (setq raw (mh-face-to-png face) type 'png)) (x-face (setq raw (mh-uncompface x-face) type 'pbm)) (url (setq type 'url)) (t (multiple-value-setq (type raw) (values-list (mh-picon-get-image))))) (when type (goto-char (point-min)) (when (re-search-forward "^from:" (point-max) t) ;; GNU Emacs (mh-do-in-gnu-emacs (if (eq type 'url) (mh-x-image-url-display url) (mh-funcall-if-exists insert-image (create-image raw type t :foreground (mh-face-foreground 'mh-show-xface nil t) :background (mh-face-background 'mh-show-xface nil t)) " "))) ;; XEmacs (mh-do-in-xemacs (cond ((eq type 'url) (mh-x-image-url-display url)) ((eq type 'png) (when (featurep 'png) (set-extent-begin-glyph (make-extent (point) (point)) (make-glyph (vector 'png ':data (mh-face-to-png face)))))) ;; Try internal xface support if available... ((and (eq type 'pbm) (featurep 'xface)) (set-glyph-face (set-extent-begin-glyph (make-extent (point) (point)) (make-glyph (vector 'xface ':data (concat "X-Face: " x-face)))) 'mh-show-xface)) ;; Otherwise try external support with x-face... ((and (eq type 'pbm) (fboundp 'x-face-xmas-wl-display-x-face) (fboundp 'executable-find) (executable-find "uncompface")) (mh-funcall-if-exists x-face-xmas-wl-display-x-face)) ;; Picon display ((and raw (member type '(xpm xbm gif))) (when (featurep type) (set-extent-begin-glyph (make-extent (point) (point)) (make-glyph (vector type ':data raw)))))) (when raw (insert " ")))))))) (defun mh-face-to-png (data) "Convert base64 encoded DATA to png image." (with-temp-buffer (if (fboundp 'set-buffer-multibyte) (set-buffer-multibyte nil)) (insert data) (ignore-errors (base64-decode-region (point-min) (point-max))) (buffer-string))) (defun mh-uncompface (data) "Run DATA through `uncompface' to generate bitmap." (with-temp-buffer (if (fboundp 'set-buffer-multibyte) (set-buffer-multibyte nil)) (insert data) (when (and mh-uncompface-executable (equal (call-process-region (point-min) (point-max) mh-uncompface-executable t '(t nil)) 0)) (mh-icontopbm) (buffer-string)))) (defun mh-icontopbm () "Elisp substitute for `icontopbm'." (goto-char (point-min)) (let ((end (point-max))) (while (re-search-forward "0x\\(..\\)\\(..\\)," nil t) (save-excursion (goto-char (point-max)) (insert (string-to-number (match-string 1) 16)) (insert (string-to-number (match-string 2) 16)))) (delete-region (point-min) end) (goto-char (point-min)) (insert "P4\n48 48\n"))) ;;; Picon Display ;; XXX: This should be customizable. As a side-effect of setting this ;; variable, arrange to reset mh-picon-existing-directory-list to 'unset. (defvar mh-picon-directory-list '("~/.picons" "~/.picons/users" "~/.picons/usenix" "~/.picons/news" "~/.picons/domains" "~/.picons/misc" "/usr/share/picons/" "/usr/share/picons/users" "/usr/share/picons/usenix" "/usr/share/picons/news" "/usr/share/picons/domains" "/usr/share/picons/misc") "List of directories where picons reside. The directories are searched for in the order they appear in the list.") (defvar mh-picon-existing-directory-list 'unset "List of directories to search in.") (defvar mh-picon-cache (make-hash-table :test #'equal)) (defvar mh-picon-image-types (loop for type in '(xpm xbm gif) when (or (mh-do-in-gnu-emacs (ignore-errors (mh-funcall-if-exists image-type-available-p type))) (mh-do-in-xemacs (featurep type))) collect type)) (autoload 'message-tokenize-header "sendmail") (defun* mh-picon-get-image () "Find the best possible match and return contents." (mh-picon-set-directory-list) (save-restriction (let* ((from-field (ignore-errors (car (message-tokenize-header (mh-get-header-field "from:"))))) (from (car (ignore-errors (mh-funcall-if-exists ietf-drums-parse-address from-field)))) (host (and from (string-match "\\([^+]*\\)\\(+.*\\)?@\\(.*\\)" from) (downcase (match-string 3 from)))) (user (and host (downcase (match-string 1 from)))) (canonical-address (format "%s@%s" user host)) (cached-value (gethash canonical-address mh-picon-cache)) (host-list (and host (delete "" (split-string host "\\.")))) (match nil)) (cond (cached-value (return-from mh-picon-get-image cached-value)) ((not host-list) (return-from mh-picon-get-image nil))) (setq match (block loop ;; u@h search (loop for dir in mh-picon-existing-directory-list do (loop for type in mh-picon-image-types ;; [path]user@host for file1 = (format "%s/%s.%s" dir canonical-address type) when (file-exists-p file1) do (return-from loop file1) ;; [path]user for file2 = (format "%s/%s.%s" dir user type) when (file-exists-p file2) do (return-from loop file2) ;; [path]host for file3 = (format "%s/%s.%s" dir host type) when (file-exists-p file3) do (return-from loop file3))) ;; facedb search ;; Search order for user@foo.net: ;; [path]net/foo/user ;; [path]net/foo/user/face ;; [path]net/user ;; [path]net/user/face ;; [path]net/foo/unknown ;; [path]net/foo/unknown/face ;; [path]net/unknown ;; [path]net/unknown/face (loop for u in (list user "unknown") do (loop for dir in mh-picon-existing-directory-list do (loop for x on host-list by #'cdr for y = (mh-picon-generate-path x u dir) do (loop for type in mh-picon-image-types for z1 = (format "%s.%s" y type) when (file-exists-p z1) do (return-from loop z1) for z2 = (format "%s/face.%s" y type) when (file-exists-p z2) do (return-from loop z2))))))) (setf (gethash canonical-address mh-picon-cache) (mh-picon-file-contents match))))) (defun mh-picon-set-directory-list () "Update `mh-picon-existing-directory-list' if needed." (when (eq mh-picon-existing-directory-list 'unset) (setq mh-picon-existing-directory-list (loop for x in mh-picon-directory-list when (file-directory-p x) collect x)))) (defun mh-picon-generate-path (host-list user directory) "Generate the image file path. HOST-LIST is the parsed host address of the email address, USER the username and DIRECTORY is the directory relative to which the path is generated." (loop with acc = "" for elem in host-list do (setq acc (format "%s/%s" elem acc)) finally return (format "%s/%s%s" directory acc user))) (defun mh-picon-file-contents (file) "Return details about FILE. A list of consisting of a symbol for the type of the file and the file contents as a string is returned. If FILE is nil, then both elements of the list are nil." (if (stringp file) (with-temp-buffer (if (fboundp 'set-buffer-multibyte) (set-buffer-multibyte nil)) (let ((type (and (string-match ".*\\.\\(...\\)$" file) (intern (match-string 1 file))))) (insert-file-contents-literally file) (list type (buffer-string)))) (list nil nil))) ;;; X-Image-URL Display (defvar mh-x-image-scaling-function (cond ((executable-find "convert") 'mh-x-image-scale-with-convert) ((and (executable-find "anytopnm") (executable-find "pnmscale") (executable-find "pnmtopng")) 'mh-x-image-scale-with-pnm) (t 'ignore)) "Function to use to scale image to proper size.") (defun mh-x-image-scale-with-pnm (input output) "Scale image in INPUT file and write to OUTPUT file using pnm tools." (let ((res (shell-command-to-string (format "anytopnm < %s | pnmscale -xysize 96 48 | pnmtopng > %s" input output)))) (unless (equal res "") (delete-file output)))) (defun mh-x-image-scale-with-convert (input output) "Scale image in INPUT file and write to OUTPUT file using ImageMagick." (call-process "convert" nil nil nil "-geometry" "96x48" input output)) (defvar mh-wget-executable nil) (defvar mh-wget-choice (or (and (setq mh-wget-executable (executable-find "wget")) 'wget) (and (setq mh-wget-executable (executable-find "fetch")) 'fetch) (and (setq mh-wget-executable (executable-find "curl")) 'curl))) (defvar mh-wget-option (cdr (assoc mh-wget-choice '((curl . "-o") (fetch . "-o") (wget . "-O"))))) (defvar mh-x-image-temp-file nil) (defvar mh-x-image-url nil) (defvar mh-x-image-marker nil) (defvar mh-x-image-url-cache-file nil) (defun mh-x-image-url-display (url) "Display image from location URL. If the URL isn't present in the cache then it is fetched with wget." (let* ((cache-filename (mh-x-image-url-cache-canonicalize url)) (state (mh-x-image-get-download-state cache-filename)) (marker (point-marker))) (set (make-local-variable 'mh-x-image-marker) marker) (cond ((not (mh-x-image-url-sane-p url))) ((eq state 'ok) (mh-x-image-display cache-filename marker)) ((or (not mh-wget-executable) (eq mh-x-image-scaling-function 'ignore))) ((eq state 'never)) ((not mh-fetch-x-image-url) (set-marker marker nil)) ((eq state 'try-again) (mh-x-image-set-download-state cache-filename nil) (mh-x-image-url-fetch-image url cache-filename marker 'mh-x-image-scale-and-display)) ((and (eq mh-fetch-x-image-url 'ask) (not (y-or-n-p (format "Fetch %s? " url)))) (mh-x-image-set-download-state cache-filename 'never)) ((eq state nil) (mh-x-image-url-fetch-image url cache-filename marker 'mh-x-image-scale-and-display))))) (defvar mh-x-image-cache-directory nil "Directory where X-Image-URL images are cached.") ;;;###mh-autoload (defun mh-set-x-image-cache-directory (directory) "Set the DIRECTORY where X-Image-URL images are cached. This is only done if `mh-x-image-cache-directory' is nil." ;; XXX This is the code that used to be in find-user-path. Is there ;; a good reason why the variable is set conditionally? Do we expect ;; the user to have set this variable directly? (unless mh-x-image-cache-directory (setq mh-x-image-cache-directory directory))) (defun mh-x-image-url-cache-canonicalize (url) "Canonicalize URL. Replace the ?/ character with a ?! character and append .png. Also replaces special characters with `mh-url-hexify-string' since not all characters, such as :, are valid within Windows filenames. In addition, replaces * with %2a. See URL `http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/iitemnamelimits/GetValidCharacters.asp'." (format "%s/%s.png" mh-x-image-cache-directory (mh-replace-regexp-in-string "\*" "%2a" (mh-url-hexify-string (with-temp-buffer (insert url) (mh-replace-string "/" "!") (buffer-string)))))) (defun mh-x-image-get-download-state (file) "Check the state of FILE by following any symbolic links." (unless (file-exists-p mh-x-image-cache-directory) (call-process "mkdir" nil nil nil mh-x-image-cache-directory)) (cond ((file-symlink-p file) (intern (file-name-nondirectory (file-chase-links file)))) ((not (file-exists-p file)) nil) (t 'ok))) (defun mh-x-image-set-download-state (file data) "Setup a symbolic link from FILE to DATA." (if data (make-symbolic-link (symbol-name data) file t) (delete-file file))) (defun mh-x-image-url-sane-p (url) "Check if URL is something sensible." (let ((len (length url))) (cond ((< len 5) nil) ((not (equal (substring url 0 5) "http:")) nil) ((> len 100) nil) (t t)))) (defun mh-x-image-display (image marker) "Display IMAGE at MARKER." (with-current-buffer (marker-buffer marker) (let ((inhibit-read-only t) (buffer-modified-flag (buffer-modified-p))) (unwind-protect (when (and (file-readable-p image) (not (file-symlink-p image)) (eq marker mh-x-image-marker)) (goto-char marker) (mh-do-in-gnu-emacs (mh-funcall-if-exists insert-image (create-image image 'png))) (mh-do-in-xemacs (when (featurep 'png) (set-extent-begin-glyph (make-extent (point) (point)) (make-glyph (vector 'png ':data (with-temp-buffer (insert-file-contents-literally image) (buffer-string)))))))) (set-buffer-modified-p buffer-modified-flag))))) (defun mh-x-image-url-fetch-image (url cache-file marker sentinel) "Fetch and display the image specified by URL. After the image is fetched, it is stored in CACHE-FILE. It will be displayed in a buffer and position specified by MARKER. The actual display is carried out by the SENTINEL function." (if mh-wget-executable (let ((buffer (get-buffer-create (generate-new-buffer-name mh-temp-fetch-buffer))) (filename (or (mh-funcall-if-exists make-temp-file "mhe-fetch") (expand-file-name (make-temp-name "~/mhe-fetch"))))) (with-current-buffer buffer (set (make-local-variable 'mh-x-image-url-cache-file) cache-file) (set (make-local-variable 'mh-x-image-marker) marker) (set (make-local-variable 'mh-x-image-temp-file) filename)) (set-process-sentinel (start-process "*mh-x-image-url-fetch*" buffer mh-wget-executable mh-wget-option filename url) sentinel)) ;; Temporary failure (mh-x-image-set-download-state cache-file 'try-again))) (defun mh-x-image-scale-and-display (process change) "When the wget PROCESS terminates scale and display image. The argument CHANGE is ignored." (when (eq (process-status process) 'exit) (let (marker temp-file cache-filename wget-buffer) (with-current-buffer (setq wget-buffer (process-buffer process)) (setq marker mh-x-image-marker cache-filename mh-x-image-url-cache-file temp-file mh-x-image-temp-file)) (cond ;; Check if we have `convert' ((eq mh-x-image-scaling-function 'ignore) (message "The \"convert\" program is needed to display X-Image-URL") (mh-x-image-set-download-state cache-filename 'try-again)) ;; Scale fetched image ((and (funcall mh-x-image-scaling-function temp-file cache-filename) nil)) ;; Attempt to display image if we have it ((file-exists-p cache-filename) (mh-x-image-display cache-filename marker)) ;; We didn't find the image. Should we try to display it the next time? (t (mh-x-image-set-download-state cache-filename 'try-again))) (ignore-errors (set-marker marker nil) (delete-process process) (kill-buffer wget-buffer) (delete-file temp-file))))) (provide 'mh-xface) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-xface.el ends here mh-e-8.5/emacs/trunk/lisp/mh-e/mh-identity.el0000644000175000000620000002566612114520723020215 0ustar wohlerstaff;;; mh-identity.el --- multiple identify support for MH-E ;; Copyright (C) 2002-2013 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;;; Commentary: ;; Multiple identity support for MH-E. ;; Used to easily set different fields such as From and Organization, ;; as well as different signature files. ;; Customize the variable `mh-identity-list' and see the Identity menu ;; in MH-Letter mode. The command `mh-insert-identity' can be used ;; to manually insert an identity. ;;; Change Log: ;;; Code: (require 'mh-e) (autoload 'mml-insert-tag "mml") (defvar mh-identity-pgg-default-user-id nil "Holds the GPG key ID to be used by pgg.el. This is normally set as part of an Identity in `mh-identity-list'.") (make-variable-buffer-local 'mh-identity-pgg-default-user-id) (defvar mh-identity-menu nil "The Identity menu.") (defalias 'mh-identity-make-menu-no-autoload 'mh-identity-make-menu) ;;;###mh-autoload (defun mh-identity-make-menu () "Build the Identity menu. This should be called any time `mh-identity-list' or `mh-auto-fields-list' change. See `mh-identity-add-menu'." (easy-menu-define mh-identity-menu mh-letter-mode-map "MH-E identity menu" (append '("Identity") ;; Dynamically render :type corresponding to `mh-identity-list' ;; e.g.: ;; ["Home" (mh-insert-identity "Home") ;; :style radio :active (not (equal mh-identity-local "Home")) ;; :selected (equal mh-identity-local "Home")] '(["Insert Auto Fields" (mh-insert-auto-fields) mh-auto-fields-list] "--") (mapcar (function (lambda (arg) `[,arg (mh-insert-identity ,arg) :style radio :selected (equal mh-identity-local ,arg)])) (mapcar 'car mh-identity-list)) '(["None" (mh-insert-identity "None") :style radio :selected (not mh-identity-local)] "--" ["Set Default for Session" (setq mh-identity-default mh-identity-local) t] ["Save as Default" (customize-save-variable 'mh-identity-default mh-identity-local) t] ["Customize Identities" (customize-variable 'mh-identity-list) t] )))) ;;;###mh-autoload (defun mh-identity-add-menu () "Add the current Identity menu. See `mh-identity-make-menu'." (if mh-identity-menu (easy-menu-add mh-identity-menu))) (defvar mh-identity-local nil "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 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 (concat field ":")))) (when (mh-goto-header-field field-colon) (if (not value-only) (beginning-of-line) (forward-char)) (delete-region (point) (progn (mh-header-field-end) (if (not value-only) (forward-char 1)) (point))) t))) (defvar mh-identity-signature-start nil "Marker for the beginning of a signature inserted by `mh-insert-identity'.") (defvar mh-identity-signature-end nil "Marker for the end of a signature inserted by `mh-insert-identity'.") (defun mh-identity-field-handler (field) "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 header field." (or (cdr (mh-assoc-string field mh-identity-handlers t)) (and (eq (aref field 0) ?:) (error "Field %s not found in `mh-identity-handlers'" field)) (cdr (assoc ":default" mh-identity-handlers)) 'mh-identity-handler-default)) ;;;###mh-autoload (defun mh-insert-identity (identity &optional maybe-insert) "Insert fields specified by given IDENTITY. In a program, do not insert fields if MAYBE-INSERT is non-nil, `mh-identity-default' is non-nil, and fields have already been inserted. See `mh-identity-list'." (interactive (list (completing-read "Identity: " (if mh-identity-local (cons '("None") (mapcar 'list (mapcar 'car mh-identity-list))) (mapcar 'list (mapcar 'car mh-identity-list))) nil t) nil)) (when (or (not maybe-insert) (and (boundp 'mh-identity-default) mh-identity-default (not mh-identity-local))) (save-excursion ;;First remove old settings, if any. (when mh-identity-local (let ((pers-list (cadr (assoc mh-identity-local mh-identity-list)))) (while pers-list (let* ((field (caar pers-list)) (handler (mh-identity-field-handler field))) (funcall handler field 'remove)) (setq pers-list (cdr pers-list))))) ;; Then insert the replacement (when (not (equal "None" identity)) (let ((pers-list (cadr (assoc identity mh-identity-list)))) (while pers-list (let* ((field (caar pers-list)) (value (cdar pers-list)) (handler (mh-identity-field-handler field))) (funcall handler field 'add value)) (setq pers-list (cdr pers-list)))))) ;; Remember what is in use in this buffer (if (equal "None" identity) (setq mh-identity-local nil) (setq mh-identity-local identity)))) ;;;###mh-autoload (defun mh-identity-handler-gpg-identity (field action &optional value) "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 ((or (equal action 'remove) (not value) (string= value "")) (setq mh-identity-pgg-default-user-id nil)) ((equal action 'add) (setq mh-identity-pgg-default-user-id value)))) ;;;###mh-autoload (defun mh-identity-handler-signature (field action &optional value) "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) (markerp mh-identity-signature-end)) (delete-region mh-identity-signature-start mh-identity-signature-end))) (t ;; Insert "signature". Nil value means to use `mh-signature-file-name'. (when (not (mh-signature-separator-p)) ;...unless already present (goto-char (point-max)) (save-restriction (narrow-to-region (point) (point)) (if (null value) (mh-insert-signature) (mh-insert-signature value)) (set (make-local-variable 'mh-identity-signature-start) (point-min-marker)) (set-marker-insertion-type mh-identity-signature-start t) (set (make-local-variable 'mh-identity-signature-end) (point-max-marker))))))) (defvar mh-identity-attribution-verb-start nil "Marker for the beginning of the attribution verb.") (defvar mh-identity-attribution-verb-end nil "Marker for the end of the attribution verb.") ;;;###mh-autoload (defun mh-identity-handler-attribution-verb (field action &optional value) "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 mh-identity-attribution-verb-end) (goto-char mh-identity-attribution-verb-start) (cond ((equal action 'remove) ; Replace with default (mh-identity-insert-attribution-verb nil)) (t ; Insert attribution verb. (mh-identity-insert-attribution-verb value))))) ;;;###mh-autoload (defun mh-identity-insert-attribution-verb (value) "Insert VALUE as attribution verb, setting up delimiting markers. If VALUE is nil, use `mh-extract-from-attribution-verb'." (save-restriction (narrow-to-region (point) (point)) (if (null value) (insert mh-extract-from-attribution-verb) (insert value)) (set (make-local-variable 'mh-identity-attribution-verb-start) (point-min-marker)) (set-marker-insertion-type mh-identity-attribution-verb-start t) (set (make-local-variable 'mh-identity-attribution-verb-end) (point-max-marker)))) (defun mh-identity-handler-default (field action top &optional value) "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 ":")))) (cond ((equal action 'remove) (mh-header-field-delete field-colon nil)) (t (cond ;; No value, remove field ((or (not value) (string= value "")) (mh-header-field-delete field-colon nil)) ;; Existing field, replace ((mh-header-field-delete field-colon t) (insert value)) ;; Other field, add at end or top (t (goto-char (point-min)) (if (not top) (mh-goto-header-end 0)) (insert field-colon " " value "\n"))))))) ;;;###mh-autoload (defun mh-identity-handler-top (field action &optional value) "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) "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) ;; Local Variables: ;; indent-tabs-mode: nil ;; sentence-end-double-space: nil ;; End: ;;; mh-identity.el ends here mh-e-8.5/emacs/trunk/etc/0002755000175000000620000000000012114520723014401 5ustar wohlerstaffmh-e-8.5/emacs/trunk/etc/images/0002755000175000000620000000000012114520723015646 5ustar wohlerstaffmh-e-8.5/emacs/trunk/etc/images/preferences.xpm0000644000175000000620000000376312114520723020704 0ustar wohlerstaff/* XPM */ static char * preferences_xpm[] = { "24 24 87 1", " c None", ". c #000000", "+ c #BAB5AB", "@ c #D0CDC6", "# c #88857D", "$ c #C9C6BE", "% c #CCC8C1", "& c #E5E3E0", "* c #FFFFFF", "= c #757575", "- c #2E2E2E", "; c #F6F5F5", "> c #CCCCCC", ", c #AFAFAF", "' c #D3D1CB", ") c #C1C0BF", "! c #F0EFED", "~ c #797772", "{ c #DCDCDC", "] c #A5A19C", "^ c #EAE9E5", "/ c #F3F1F0", "( c #EDEDED", "_ c #A19D96", ": c #C1BDB4", "< c #DBD8D3", "[ c #D9D6D1", "} c #89857E", "| c #FCFCFC", "1 c #EAE9E6", "2 c #F5F4F3", "3 c #C6C2BA", "4 c #F0EFEE", "5 c #F4F4F3", "6 c #CBC7C0", "7 c #ECECEB", "8 c #676560", "9 c #54524D", "0 c #777676", "a c #797978", "b c #85827E", "c c #79756F", "d c #7590AE", "e c #A4BAD0", "f c #90A6BE", "g c #9F9F9E", "h c #BEBDBC", "i c #B8B4AD", "j c #87837C", "k c #D3DFEA", "l c #A2AEBC", "m c #9DB6CE", "n c #637B95", "o c #E2E2E2", "p c #EEEEED", "q c #849CB6", "r c #D7E2ED", "s c #8D98A5", "t c #9DB8D2", "u c #607791", "v c #EDEDEC", "w c #99ADC3", "x c #DFE7F0", "y c #8193A9", "z c #586D84", "A c #5B7189", "B c #F1F1F1", "C c #EEEDEB", "D c #A7A6A5", "E c #726F6A", "F c #A1B4C8", "G c #EEF3F6", "H c #60768F", "I c #DEDDDC", "J c #787776", "K c #4E4E4D", "L c #91A6BE", "M c #F0F4F7", "N c #97A5B6", "O c #BFBEBD", "P c #AAAAA9", "Q c #ACACAB", "R c #B0C6DB", "S c #EDF2F6", "T c #818A95", "U c #6C85A1", "V c #C0D1E2", " .. ", " .+@#. ", " .$%+. .. ", " .&$. .*=. ", " .. -;$. .*>,. ", " .' ..)!+~. .{,. ", " .]%%^/+++. .(.. ", " ._:%$<[+}. .|. ", " .....123}..>. ", " .456.,. ", " .7.,.. ", " .,.89. ", " ....,.0abc. ", " .def.. .ghij. ", " .dklmn. .op6}. ", " .qrsntu. .v/$}. ", " .wxyztdA. .BCDE..", " .FGyHtdA. .IJK,.", " .LMNHtdA. .OPQ.", " .RSTtdA.. ... ", " .UtVLA.. ", " .UUn.. ", " ... ", " "}; mh-e-8.5/emacs/trunk/etc/images/show.pbm0000644000175000000620000000012112114520723017316 0ustar wohlerstaffP4 24 24 ÿà    |              ÿømh-e-8.5/emacs/trunk/etc/images/help.xpm0000644000175000000620000001212412114520723017322 0ustar wohlerstaff/* XPM */ static char * help_xpm[] = { "24 24 244 2", " c None", ". c #000000", "+ c #454442", "@ c #1D1D1C", "# c #040404", "$ c #1B1B1B", "% c #3D3C3A", "& c #4D4C4B", "* c #2F2F2D", "= c #C1BFBB", "- c #ECEAE7", "; c #F5F3F0", "> c #F2F0EC", ", c #E1DFDC", "' c #AFADAA", ") c #272726", "! c #020202", "~ c #3F3E3E", "{ c #36302D", "] c #181818", "^ c #FBF8F5", "/ c #FEFCF8", "( c #FAF8F5", "_ c #F5F4F1", ": c #F2F1ED", "< c #F1EFEB", "[ c #F1EEEB", "} c #EAE9E6", "| c #DAD8D4", "1 c #100E0E", "2 c #1F100E", "3 c #AF3A1E", "4 c #FBAB93", "5 c #FAE9E3", "6 c #F0EFEB", "7 c #E9E8E5", "8 c #EAE8E6", "9 c #ECEAE8", "0 c #EDEBE9", "a c #EDEBE8", "b c #EACFC6", "c c #D5340A", "d c #751904", "e c #100806", "f c #34160D", "g c #AF3C20", "h c #FCCCBD", "i c #F7BEAD", "j c #E67554", "k c #DFDDDB", "l c #DBD9D6", "m c #D8D7D3", "n c #DBDAD6", "o c #E3E2DE", "p c #ECEBE8", "q c #E5572D", "r c #E33A0B", "s c #D4340A", "t c #691504", "u c #100504", "v c #582C22", "w c #0F0F0F", "x c #FDD4C8", "y c #F7BFAF", "z c #E87554", "A c #D5512B", "B c #C68270", "C c #BEBDBA", "D c #A5A3A0", "E c #9C9A95", "F c #B9B7B2", "G c #D7D6D2", "H c #E7E5E2", "I c #E79A85", "J c #E53C0B", "K c #E43C0B", "L c #E23A0B", "M c #C93009", "N c #010000", "O c #040100", "P c #FAB19C", "Q c #FACCBE", "R c #EB8264", "S c #D8532D", "T c #C0340F", "U c #932006", "V c #141412", "W c #857974", "X c #DA370B", "Y c #EC7C5B", "Z c #E95B32", "` c #DE380B", " . c #9D2306", ".. c #626261", "+. c #FEF1ED", "@. c #F09479", "#. c #DC532B", "$. c #C0350F", "%. c #942006", "&. c #621404", "*. c #E2522B", "=. c #F2A690", "-. c #E74E21", ";. c #E23B0B", ">. c #C99181", ",. c #454342", "'. c #E5E4E2", "). c #FCFBFA", "!. c #E2D8D3", "~. c #C34C2A", "{. c #B02B07", "]. c #9E2D12", "^. c #EF8D71", "/. c #F09B83", "(. c #EADDD7", "_. c #272724", ":. c #F0EEEC", "<. c #F3F2EF", "[. c #D7D6D3", "}. c #BFBEBB", "|. c #9E6153", "1. c #3F0D02", "2. c #F0B9A9", "3. c #F6F5F4", "4. c #E8E7E4", "5. c #DAD8D5", "6. c #585652", "7. c #F6F4F0", "8. c #DAD8D6", "9. c #C2C1BE", "0. c #989691", "a. c #0A0A08", "b. c #F6F4F2", "c. c #F4F3F1", "d. c #E4E3E0", "e. c #D3D2CE", "f. c #63625D", "g. c #DCDAD8", "h. c #C7C6C2", "i. c #ABAAA5", "j. c #0A0A0A", "k. c #FAF8F6", "l. c #EFEDEA", "m. c #DDDCD8", "n. c #C6C4C2", "o. c #3E3E39", "p. c #1B1B19", "q. c #F0EEEA", "r. c #E0DFDD", "s. c #CCCBC9", "t. c #C0BFBB", "u. c #131311", "v. c #676663", "w. c #FCFAF8", "x. c #D6D4D2", "y. c #BCBAB7", "z. c #3C3C3A", "A. c #DEDCD9", "B. c #7E4B3E", "C. c #232323", "D. c #CC9385", "E. c #FAFAF7", "F. c #E6E6E2", "G. c #CDCCCA", "H. c #B0B0AC", "I. c #EDE3DF", "J. c #E78468", "K. c #DF5D3A", "L. c #631909", "M. c #282828", "N. c #B46E5E", "O. c #FCC3B2", "P. c #F1A691", "Q. c #DCD2CC", "R. c #C8C6C3", "S. c #7E7C78", "T. c #E8AD9C", "U. c #E96139", "V. c #EB7452", "W. c #EF8E72", "X. c #EA8063", "Y. c #9E2E13", "Z. c #3F1811", "`. c #121212", " + c #6B433B", ".+ c #E0A191", "++ c #FDD3C7", "@+ c #F4AD98", "#+ c #DE532B", "$+ c #C83409", "%+ c #B48274", "&+ c #383534", "*+ c #D6340A", "=+ c #E43D0F", "-+ c #E8582E", ";+ c #ED7957", ">+ c #F4B6A4", ",+ c #F4B09D", "'+ c #F0E5E0", ")+ c #F4F3EF", "!+ c #FDF8F6", "~+ c #FBCEC1", "{+ c #F28B6E", "]+ c #E44E23", "^+ c #D3370A", "/+ c #BF2F09", "(+ c #260800", "_+ c #190F0B", ":+ c #D5350A", "<+ c #E43D0C", "[+ c #E74C1F", "}+ c #EFBBAB", "|+ c #F5F4F3", "1+ c #F5F3F1", "2+ c #EAB1A0", "3+ c #DE4316", "4+ c #C5310A", "5+ c #591202", "6+ c #0E0504", "7+ c #C83009", "8+ c #E0532B", "9+ c #E7E6E3", "0+ c #E7E6E2", "a+ c #DDDCD9", "b+ c #CFCECA", "c+ c #C14724", "d+ c #AE2907", "e+ c #290800", "f+ c #0F0705", "g+ c #9B2205", "h+ c #C1A89F", "i+ c #D1D0CC", "j+ c #CFCDCA", "k+ c #C7C6C3", "l+ c #BBBAB7", "m+ c #B5B4B1", "n+ c #A7A6A2", "o+ c #66564F", "p+ c #0B0908", "q+ c #010100", "r+ c #222221", "s+ c #51504B", "t+ c #5D5C57", "u+ c #3B3B37", " . . + @ # # $ % ", " . . . . & # * = - ; > , ' ) ! ~ . . . . ", ". . { ] ^ / ( _ : > < [ } | . 1 . . ", " . 2 3 4 5 6 - 7 8 9 0 0 a b c d e . ", " . f g h i j k l m n o } p a q r s t u . . ", " v w x y z A B C D E F G H I J K L M . N ", " O P Q R S T U . . . . V W X Y Z K ` .. ", " ..+.@.#.$.%.. . . &.*.=.-.;.>.! . ", ",.'.).!.~.{.. . . ].^./.(.n _.. ", "@ :.<.[.}.|.. 1.2.3.4.5.6.. ", "# 7.6 8.9.0.. a.b.c.d.e.f.. ", "# > < g.h.i.. j.k.l.m.n.o.. ", "p., q.r.s.t.u. v.w.9 x.y.. . ", "z.' [ 7 A.[.B.. C.D.E.F.G.H.. . ", " ) } 0 I.J.K.L.. M.N.O.P.Q.R.S.. . ", " ! | T.U.V.W.X.Y.Z.a.`. +.+++@+#+$+%+. . ", " &+. *+=+-+;+>+,+'+)+k.!+~+{+]+^+/+(+. . ", " . _+d :+L <+[+}+|+l.1+|+2+3+^+4+5+. . . ", " . 6+t 7+` 8+9+0+o a+[.b+c+d+e+. . . ", " . f+. g+h+i+j+k+l+m+n+o+. . . . ", " . . . p+. q+r+s+t+u+. . . . . . . ", " . . . . . . . . . . . . ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/copy.pbm0000644000175000000620000000017712114520723017323 0ustar wohlerstaffP4 # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 ÿø€€€€´ø€€€€€€º€€´€€€€€€º€€€€ÿümh-e-8.5/emacs/trunk/etc/images/mail/0002755000175000000620000000000012114520723016570 5ustar wohlerstaffmh-e-8.5/emacs/trunk/etc/images/mail/move.pbm0000644000175000000620000000012112114520723020226 0ustar wohlerstaffP4 24 24 U € € €ÿø!@! $D„D $@ÿømh-e-8.5/emacs/trunk/etc/images/mail/repack.pbm0000644000175000000620000000012112114520723020525 0ustar wohlerstaffP4 24 24 €@0üÿðÿðmh-e-8.5/emacs/trunk/etc/images/mail/inbox.xpm0000644000175000000620000000351612114520723020440 0ustar wohlerstaff/* XPM */ static char * stock_inbox_xpm[] = { "24 24 76 1", " c None", ". c #000000", "+ c #B5CADD", "@ c #BFD1E1", "# c #C3D4E3", "$ c #C7D7E5", "% c #B0C6DA", "& c #6B94BB", "* c #131E29", "= c #739ABF", "- c #7EA2C4", "; c #9AB6D0", "> c #E4EBF2", ", c #DDE6EF", "' c #8CACCA", ") c #5C8AB4", "! c #090F15", "~ c #B1C7DB", "{ c #D0DDEA", "] c #D9E3ED", "^ c #88A9C8", "/ c #4D7CA7", "( c #030405", "_ c #41688D", ": c #32506C", "< c #C4D5E4", "[ c #A5BED5", "} c #456F97", "| c #3B5F81", "1 c #C8D8E6", "2 c #9CB8D2", "3 c #395B7B", "4 c #C6D6E4", "5 c #BBCEDF", "6 c #3D6183", "7 c #B6CBDE", "8 c #426A90", "9 c #E2C6A9", "0 c #E5CDB4", "a c #D5AA7F", "b c #9D6733", "c c #CB9967", "d c #ADC4D9", "e c #B99877", "f c #CFBAA4", "g c #9A7149", "h c #CDA378", "i c #D2A87E", "j c #608DB6", "k c #AA7B4B", "l c #C2A588", "m c #996633", "n c #BB9978", "o c #C3976B", "p c #D2A980", "q c #D1A77D", "r c #E0C4A8", "s c #C9B097", "t c #D7B38E", "u c #DAC2A9", "v c #BD9063", "w c #CEA57C", "x c #E5CFBB", "y c #393633", "z c #E0C8B1", "A c #C9A480", "B c #D1A87E", "C c #D0A67B", "D c #E1CAB4", "E c #52504D", "F c #D8C6B5", "G c #CBA988", "H c #CCAF93", "I c #D2B496", "J c #A67D51", "K c #E2CFBD", " ...... ", " .+@#$%&*. ", " .=-;$>,')! ", " ...=~{]^/( ", " .=+#$_:. ", " .<[@}|. ", " .12@}3. ", " ....425}6.... ", " .=2527}8}:. ", " ..9.=227}}:. ", " ..0abb.=2~}:.. ", " ..0abbbbc.=d:.ef.. ", ".0abbbbghii.j.kkklf.. ", ".mnabgopqqqi.iokkkkef. ", ".mmmnrooqiqqqiiiokkkks. ", ".mmmmmnrooqiqqqiiiokkl. ", " ..mmmmmnrooqiqqiiituf. ", " ..mmmmmnrvwiqqtxxy. ", " ..mmmmmzABCDxE.. ", " ...mmmFGHIE.. ", " ...mJK... ", " ..... ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/mail/reply-all.xpm0000644000175000000620000000716712114520723021230 0ustar wohlerstaff/* XPM */ static char * stock_mail_reply_to_all_xpm[] = { "24 24 149 2", " c None", ". c #000000", "+ c #ADA99C", "@ c #E6E1D0", "# c #F0EAD9", "$ c #A9A598", "% c #141416", "& c #161618", "* c #080809", "= c #DBD6C7", "- c #1B1B1C", "; c #050505", "> c #5A5A5A", ", c #676767", "' c #020202", ") c #807D76", "! c #D49A3E", "~ c #D2973B", "{ c #040402", "] c #6D6B6B", "^ c #7A7979", "/ c #030100", "( c #040100", "_ c #282724", ": c #DD9831", "< c #DA962F", "[ c #1A0E01", "} c #BC6D1B", "| c #BE6E13", "1 c #BE6D13", "2 c #BD6C13", "3 c #3E3C36", "4 c #D69029", "5 c #D18D27", "6 c #737067", "7 c #110900", "8 c #CF791C", "9 c #CE791C", "0 c #CD761A", "a c #C47013", "b c #4A4136", "c c #A0731E", "d c #96691A", "e c #000100", "f c #291703", "g c #BA6613", "h c #8C4E0D", "i c #844A0D", "j c #BF6D13", "k c #1F2A0D", "l c #306220", "m c #4F7242", "n c #448D44", "o c #2E802E", "p c #3A6F3A", "q c #FFFFFF", "r c #535353", "s c #171009", "t c #AC600C", "u c #713F0A", "v c #693A0A", "w c #AA5F0A", "x c #192B10", "y c #275926", "z c #68A769", "A c #358A36", "B c #2D812D", "C c #FBFBFB", "D c #F7F7F7", "E c #FAFAFA", "F c #F5F5F5", "G c #4F4F4F", "H c #AEAEAE", "I c #141517", "J c #6F767C", "K c #534C46", "L c #241609", "M c #23180E", "N c #484644", "O c #354A4D", "P c #050B07", "Q c #4F7E4F", "R c #399239", "S c #2D852D", "T c #297F29", "U c #ACACAC", "V c #C8C8C8", "W c #151618", "X c #6C7C8B", "Y c #728EA9", "Z c #5D6B78", "` c #C8CBCD", " . c #C3C7CD", ".. c #8090A2", "+. c #5A728B", "@. c #4E6479", "#. c #111714", "$. c #328732", "%. c #2B7F2C", "&. c #2B772C", "*. c #434343", "=. c #A0A0A0", "-. c #D4D4D4", ";. c #25282A", ">. c #8A9EB4", ",. c #6A86A1", "'. c #596A7C", "). c #DDE1E4", "!. c #DCE2E7", "~. c #899CAC", "{. c #687E96", "]. c #546D87", "^. c #10161D", "/. c #8C8C8C", "(. c #959595", "_. c #E4E4E4", ":. c #23282D", "<. c #8096AB", "[. c #5D7996", "}. c #53687D", "|. c #CDD3D9", "1. c #CBD2DC", "2. c #899BAB", "3. c #CCD4DC", "4. c #5C748C", "5. c #111820", "6. c #4D4D4D", "7. c #818181", "8. c #C6C6C6", "9. c #1F252B", "0. c #6B8197", "a. c #536D89", "b. c #4A5D6F", "c. c #81919F", "d. c #8293A4", "e. c #5A7087", "f. c #496481", "g. c #445D79", "h. c #0E151B", "i. c #6A6A6A", "j. c #0E141A", "k. c #0D1319", "l. c #0E141B", "m. c #0E131A", "n. c #0F141A", "o. c #636363", "p. c #737373", "q. c #7C7C7C", "r. c #BCBCBC", " ", " . . ", " + @ # $ . ", " % & * = # # # . ", " - ; > , ' ) ! ~ # . ", " { ] ^ / ( _ : < # . ", " [ } | 1 2 3 4 5 # 6 ", " 7 8 9 0 a b c d # # . e . . . . . . ", " f g h i j k l m n o p . q q q q q r . ", " s t u v w x y z A o B . C D E F G H . ", " I J K L M N O P Q R S T . F F F G U V . ", " W X Y Z ` ...+.@.#.$.%.&.. F F *.=.-.V . ", " ;.>.,.'.).!.~.{.].^.. . . /.F G (.-._.V . ", " :.<.[.}.|.1.2.3.4.5.F F F F 6.7.8._._.V . ", " 9.0.a.b.c.d.e.f.g.h.F F F G i.=._.F _.V . ", " j.k.l.l.l.j.m.n.o.G F G (.8.p.8.F _.V . ", " . q C F o.8.F _.-.G U 8._.F q._._.V . ", " . q F p.-.F F F F _._.F F F F q._.V . ", " . q q.-._._._._._._._._._._._._.q.V . ", " . p.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.o.. ", " . . . . . . . . . . . . . . . . . . ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/mail/reply-from.pbm0000644000175000000620000000012112114520723021354 0ustar wohlerstaffP4 24 24 ÿø $D€„Ac”„ø> #ܶ;6Ú""’""’"6’"’mh-e-8.5/emacs/trunk/etc/images/mail/compose.xpm0000644000175000000620000001060212114520723020760 0ustar wohlerstaff/* XPM */ static char * stock_mail_compose_xpm[] = { "24 24 198 2", " c None", ". c #000000", "+ c #D1AF61", "@ c #F1E3AC", "# c #FBA90F", "$ c #FFFFFF", "% c #B5B5B5", "& c #A06B09", "* c #816000", "= c #E0E0E0", "- c #C1C1C1", "; c #F4F4F4", "> c #FDFDFD", ", c #E6C370", "' c #F1D387", ") c #D58F0C", "! c #B2B2B2", "~ c #C3C3C3", "{ c #FBFBFB", "] c #A8A8A8", "^ c #F6F6F6", "/ c #B3B3B3", "( c #FAFAFA", "_ c #ADADAD", ": c #767676", "< c #5D5D5D", "[ c #404040", "} c #F8F8F8", "| c #F1D07E", "1 c #ACACAC", "2 c #F8F8F6", "3 c #E2E2E2", "4 c #858585", "5 c #4B4B49", "6 c #161616", "7 c #FBFBFA", "8 c #7D7D7D", "9 c #F2F2F2", "0 c #F0F0F0", "a c #EFEFEF", "b c #D5D5D5", "c c #F9F9F9", "d c #F6F6F3", "e c #F3F3F3", "f c #878786", "g c #E5E5E5", "h c #DFDFDF", "i c #EBEBEB", "j c #AEAEAE", "k c #7B5307", "l c #EDEDED", "m c #EBEBE9", "n c #E9E9E7", "o c #E0E0DE", "p c #BFBFBF", "q c #F0F0ED", "r c #F1D284", "s c #CA870B", "t c #9E9E9C", "u c #DCDCD9", "v c #D9D9D9", "w c #D9D9D6", "x c #D6D6D4", "y c #E5E5E4", "z c #D9D9D7", "A c #BABABA", "B c #AAAAAA", "C c #E7E7E5", "D c #E4E4E2", "E c #E2E2E0", "F c #EEEEEC", "G c #979796", "H c #D4D4D1", "I c #DEDEDC", "J c #DEDEDB", "K c #BDBDBC", "L c #E7E7E7", "M c #EFEFED", "N c #A6A6A5", "O c #BA7C0A", "P c #7A5B00", "Q c #DBDBD9", "R c #D5D5D3", "S c #BCBCBC", "T c #E3E3E3", "U c #F2E6B6", "V c #7B7B7B", "W c #704B05", "X c #676764", "Y c #CBCBC7", "Z c #C9C9C7", "` c #DBDBD7", " . c #D7D7D5", ".. c #D7D7D3", "+. c #B4B4B4", "@. c #E4E4E4", "#. c #DBD5C1", "$. c #7E6F57", "%. c #755800", "&. c #D9D9D5", "*. c #D5D5D1", "=. c #D0D0CE", "-. c #BABAB8", ";. c #DDDDDB", ">. c #D1D1CF", ",. c #0E0E0E", "'. c #535353", "). c #8D8D8B", "!. c #C4C4C1", "~. c #C4C4BF", "{. c #C1C1BC", "]. c #D3D3D0", "^. c #D1D1D0", "/. c #DCDCDB", "(. c #E0E0DC", "_. c #898987", ":. c #C9C9C6", "<. c #CDCDCA", "[. c #D0D0CD", "}. c #CECECB", "|. c #CFCFCC", "1. c #D0D0CC", "2. c #B6B6B6", "3. c #D4D4D0", "4. c #C3C3C0", "5. c #5B5B5B", "6. c #91918D", "7. c #91918F", "8. c #9F9F9D", "9. c #AFAFAC", "0. c #B9B9B6", "a. c #BEBEBB", "b. c #C5C5C2", "c. c #C8C8C5", "d. c #CACAC7", "e. c #CBCBC8", "f. c #CCCCC9", "g. c #CCCCC8", "h. c #D2D2D0", "i. c #D2D2CF", "j. c #BFBFBD", "k. c #9F9F9C", "l. c #888886", "m. c #878785", "n. c #8C8C8A", "o. c #959593", "p. c #9C9C9A", "q. c #A8A8A5", "r. c #B1B1AE", "s. c #B5B5B3", "t. c #BBBBB8", "u. c #BFBFBC", "v. c #C2C2BE", "w. c #D1D1CE", "x. c #AEAEAB", "y. c #9D9D9A", "z. c #979794", "A. c #949491", "B. c #9A9A97", "C. c #A3A3A0", "D. c #AAAAA7", "E. c #B0B0AC", "F. c #B8B8B5", "G. c #B0B0AE", "H. c #CFCFCD", "I. c #BEBEBC", "J. c #B4B4B0", "K. c #ACACA8", "L. c #A4A4A2", "M. c #A0A09C", "N. c #A4A4A0", "O. c #A8A8A6", "P. c #ABABA7", "Q. c #B2B2AE", "R. c #A4A4A4", "S. c #CECECC", "T. c #CECECA", "U. c #C6C6C2", "V. c #BCBCB9", "W. c #B3B3AF", "X. c #ABABA9", "Y. c #A6A6A3", "Z. c #A0A09D", "`. c #ACACA9", " + c #A1A1A1", ".+ c #B1B1AF", "++ c #B4B4B3", "@+ c #B4B4B1", "#+ c #B3B3B1", "$+ c #AEAEAA", "%+ c #A7A7A4", "&+ c #A2A2A0", "*+ c #A5A5A1", "=+ c #999997", "-+ c #929290", ";+ c #949490", ">+ c #9D9D9B", ",+ c #858583", " . . . ", " . . . . . . . . . . . . + @ # . . . ", " . $ $ $ $ $ $ $ $ $ % & @ # * . = - . ", " . $ ; $ $ $ $ $ > > . , ' ) . ! ~ { ] . ", " . $ ^ $ $ $ > > > / & @ # * . ( _ : < [ . ", " . $ ^ $ { { { { } . , | ) . 1 2 3 4 5 6 . ", " . $ ; > > { { 7 8 & @ # * . ; 9 0 a b _ . ", " . $ 9 c ^ ^ d e . , | ) . f g 3 h i 3 - . ", " . $ 0 } } } 2 j k @ # * . l i m n n o p . ", " . $ a e 0 q l . , r s . t u v w x y z A . ", " . $ l ; ; 9 B & @ # * . C y y D o E z A . ", " . $ i F C g . , r s . G H E o I J I z K . ", " . $ L M i N O # # P . E o I J u Q Q R S . ", " . $ g T v . U V W . X Y Z u ` z .z ..+.. ", " . $ E y @.. #.$.%.. u Q ` &...R *...=.-.. ", " . $ I ;.>.,.'.. . ).!.~.{.*.*.].^.].=.-.. ", " . $ /.(.;.. . _.:.<.[.}.[.[.[.[.|.[.1.2.. ", " . $ Q 3.4.5.6.7.8.9.0.a.4.b.c.d.e.f.g.! . ", " . $ h.i.|.j.k.l.m.n.o.p.q.r.s.t.a.u.v.! . ", " . $ w.1.f.|.4.x.y.z.z.A.B.k.C.q.D.E.F.G.. ", " . $ i.w.w.w.H.e.I.J.K.L.M.M.N.L.O.P.Q.R.. ", " . $ ^.w.=.S.T.T.g.U.V.W.J.X.Y.Z.Y.D.`. +. ", " . $ .+++@+@+@+#+#+Q.$+%+&+*+*+=+-+;+>+,+. ", " . . . . . . . . . . . . . . . . . . . . "}; mh-e-8.5/emacs/trunk/etc/images/mail/send.pbm0000644000175000000620000000012112114520723020211 0ustar wohlerstaffP4 24 24 (L†€‡ð0†(†($†H"þˆ! ‚ Æ!)"ˆ$H 0ÿømh-e-8.5/emacs/trunk/etc/images/mail/move.xpm0000644000175000000620000000352212114520723020264 0ustar wohlerstaff/* XPM */ static char * stock_mail_move_xpm[] = { "24 24 76 1", " c None", ". c #010101", "+ c #2F2F2F", "@ c #E3E2E1", "# c #FCFCFC", "$ c #B3B2B1", "% c #95938E", "& c #F7F7F7", "* c #F5F4F2", "= c #F8F8F8", "- c #F7F6F6", "; c #EAE9E5", "> c #7B7976", ", c #D2CFCA", "' c #E1E0DD", ") c #908E8B", "! c #EBEAEA", "~ c #F1F0EE", "{ c #E2E0DD", "] c #7C7B78", "^ c #C6C3C0", "/ c #E5E3DE", "( c #DCDAD7", "_ c #8F8C88", ": c #EBEBEA", "< c #EFEDEA", "[ c #DFDDDA", "} c #787774", "| c #C1BEBA", "1 c #E6E3E0", "2 c #EFEEEC", "3 c #CBCAC6", "4 c #ECECEC", "5 c #F3F2F0", "6 c #DCDCDC", "7 c #7D7C79", "8 c #B4B2AE", "9 c #E7E5E1", "0 c #F0EFEB", "a c #E4E2DD", "b c #9D9994", "c c #DBD9D6", "d c #747370", "e c #A09C97", "f c #DAD8D5", "g c #E7E6E3", "h c #E8E6E1", "i c #E0DED9", "j c #AFACA6", "k c #F7F6F4", "l c #D3D1CF", "m c #868480", "n c #C2BFBD", "o c #DAD9D5", "p c #F6F5F1", "q c #D8D6D1", "r c #ABA8A3", "s c #F9F8F6", "t c #F7F5F2", "u c #92908B", "v c #CCCAC5", "w c #EAE9E8", "x c #B0ADA7", "y c #F5F3F0", "z c #F7F6F2", "A c #F5F4F0", "B c #EAE8E3", "C c #D2D0CB", "D c #B9B8B6", "E c #CBC9C4", "F c #DEDBD5", "G c #D9D7D2", "H c #DAD8D3", "I c #D5D3CE", "J c #D6D4CF", "K c #040404", " ", " ", " ", " . . . . . . . ", " . . ", " ", " . . ", " ", " . . ", " .+........... ", " . .@###########$. ", " .#%&*=*-*-*;>,. ", " . .#')!~-*-*{]^/. ", " .#~(_:~<~[}|1/. ", " . . .#~23]4567890a. ", " .#22~b]cdefghi. ", " .#~2jklmnoep0q. ", " .#2rsskfkttuhv. ", " .wxsyzAtAtyBuC. ", " .DEFFFGHIJCCCu. ", " ............K ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/mail/repack.xpm0000644000175000000620000000366212114520723020570 0ustar wohlerstaff/* XPM */ static char * repack_xpm[] = { "24 24 83 1", " c None", ". c #8F5902", "+ c #E6D4B7", "@ c #97610B", "# c #E9CC9F", "$ c #D6B584", "% c #BE8835", "& c #B98330", "* c #CA9442", "= c #B47E2B", "- c #C48E3B", "; c #D9A352", "> c #E6D2B5", ", c #F5EFE4", "' c #E7D7BE", ") c #C2A473", "! c #E1BB81", "~ c #D19B4A", "{ c #E8C797", "] c #EBDBC2", "^ c #EFE4D2", "/ c #D4B078", "( c #9B6B1C", "_ c #9A691A", ": c #DFBC88", "< c #CFA462", "[ c #85570C", "} c #825307", "| c #C29147", "1 c #6A4206", "2 c #6C470A", "3 c #DFB677", "4 c #D5AE74", "5 c #B2833B", "6 c #B38338", "7 c #B28235", "8 c #BD8A3E", "9 c #C89548", "0 c #E1C9A3", "a c #DDCCAF", "b c #DBC6A6", "c c #D0B78B", "d c #E5CEAB", "e c #D29F52", "f c #D29E51", "g c #D29F51", "h c #D29E50", "i c #CF9641", "j c #CF9640", "k c #CF9740", "l c #CF9741", "m c #D29B46", "n c #D39B46", "o c #D29A46", "p c #D29B47", "q c #D7B074", "r c #D59F4C", "s c #D69F4C", "t c #DDB77E", "u c #D8A452", "v c #D9A452", "w c #D9A351", "x c #D8A352", "y c #DAB47B", "z c #E3BE87", "A c #DCA857", "B c #DDA857", "C c #DCA858", "D c #DCA758", "E c #DCA757", "F c #DDA757", "G c #D4A04E", "H c #DFBB83", "I c #E8C792", "J c #D7A354", "K c #D8A354", "L c #E3C08A", "M c #EED5AC", "N c #ECCD9E", "O c #ECCD9D", "P c #E5CBA0", "Q c #7D510A", "R c #764800", " ", " .. ", " .+@ ", " .#$@ ", " .#%$@. ", " .#&*$@. ", " ..........#=-;>. ", " .,,,,,,,')!*-~{. ", " .,]]]]]^/(_!~~:. ", " .,]]]]]^<[}[!;{. ", " .],,,,,,|11223{. ", " .45678890abbbcd. ", " .4efghhhhhhhhh4. ", " .4ijijjkklkljl4. ", " .4mnnmopmompmp4. ", " .qrssssrsssrsr4. ", " .tu;vvvvwuxw;~y. ", " .zABCABCACDEFGH. ", " .IJJKJKJJKJKJKL. ", " .MNNNNNNNNNNONP. ", " Q..............R ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/mail/flag-for-followup.xpm0000644000175000000620000000744112114520723022664 0ustar wohlerstaff/* XPM */ static char * flag_for_followup_xpm[] = { "24 24 160 2", " c None", ". c #5B5457", "+ c #322D2E", "@ c #463B3F", "# c #63555A", "$ c #53484B", "% c #726166", "& c #98868C", "* c #8A727A", "= c #211619", "- c #847B7D", "; c #CDBAC0", "> c #A58791", ", c #82646D", "' c #6B515A", ") c #6A5058", "! c #684C56", "~ c #6A424F", "{ c #3A2A2F", "] c #000000", "^ c #5C5457", "/ c #D1BEC4", "( c #C3ACB4", "_ c #B59AA2", ": c #997E87", "< c #80666E", "[ c #745A62", "} c #64464F", "| c #603946", "1 c #764D5A", "2 c #886771", "3 c #45373B", "4 c #A9979C", "5 c #B798A2", "6 c #BCA0A9", "7 c #BEA4AC", "8 c #B89FA7", "9 c #9E848C", "0 c #8F767E", "a c #785F67", "b c #6A4E57", "c c #6E4F59", "d c #7C5A65", "e c #8E6873", "f c #8C6974", "g c #413337", "h c #251F21", "i c #99717D", "j c #8F606E", "k c #946875", "l c #9E7582", "m c #B08F9A", "n c #AC8C96", "o c #AE929A", "p c #9C8089", "q c #8B7179", "r c #765C65", "s c #745660", "t c #7E5A66", "u c #865E6A", "v c #855D69", "w c #7F5F69", "x c #3B2D32", "y c #40332D", "z c #6F3B4A", "A c #774252", "B c #7D4858", "C c #82505F", "D c #926674", "E c #906572", "F c #966D7A", "G c #A17E89", "H c #A0828B", "I c #90767D", "J c #927780", "K c #8B6E77", "L c #8A6A74", "M c #86626C", "N c #845B68", "O c #8E6673", "P c #6A535A", "Q c #B2997B", "R c #3C2824", "S c #693343", "T c #723A4B", "U c #845261", "V c #8C5E6C", "W c #946A78", "X c #9A737E", "Y c #A1828C", "Z c #947C84", "` c #846B73", " . c #755B64", ".. c #57464B", "+. c #59454C", "@. c #5B484E", "#. c #31282B", "$. c #392F23", "%. c #B59C7D", "&. c #372622", "*. c #643040", "=. c #7E4D5B", "-. c #814E5D", ";. c #845262", ">. c #936876", ",. c #976E7B", "'. c #9D7C87", "). c #82666F", "!. c #5C4B50", "~. c #3D3326", "{. c #34251F", "]. c #7E4C5B", "^. c #8C606E", "/. c #9C7581", "(. c #9B7380", "_. c #997682", ":. c #7F656D", "<. c #3A2F22", "[. c #33241F", "}. c #683444", "|. c #875766", "1. c #A17C87", "2. c #A27C88", "3. c #8B6773", "4. c #574249", "5. c #392E21", "6. c #B69C7E", "7. c #30241D", "8. c #64303F", "9. c #804F5E", "0. c #976D7A", "a. c #886670", "b. c #2E2025", "c. c #362C1F", "d. c #2B221A", "e. c #5A2837", "f. c #6E394A", "g. c #73515C", "h. c #0C0809", "i. c #342B1F", "j. c #B69E7F", "k. c #512432", "l. c #683E4B", "m. c #332A1E", "n. c #2D261E", "o. c #4E2330", "p. c #282118", "q. c #32291D", "r. c #B79E80", "s. c #2D261D", "t. c #352B1F", "u. c #B49A7D", "v. c #2E271F", "w. c #352C1F", "x. c #2A221A", "y. c #B49C7E", "z. c #2A241C", "A. c #28221B", "B. c #AE9C88", "C. c #060606", " ", " . + ", " @ # $ % & * = ", " - ; > , ' ) ! ~ { ] ", " ^ / ( _ : < [ } | 1 2 3 ] ", " 4 5 6 7 8 9 0 a b c d e f g ] ", " h i j k l m n o p q r s t u v w x ] ", " y z A B C D E F G H I J K L M N O P ", " ] Q R S T U V V W X Y Z ` ...+.@.#. ", " $.%.&.*.=.-.;.>.,.'.).!. ", " ~.Q {.*.].^./.(._.:. ", " <.%.[.}.|.1.2.3.4. ", " 5.6.7.8.9.0.a.b. ", " c.%.d.e.f.g.h. ", " i.j.d.k.l.] ", " m.%.n.o.] ", " m.%.p. ", " q.r.s. ", " t.u.v. ", " w.u.x. ", " c.y.z. ", " t.u.A. ", " c.B.] ", " C. "}; mh-e-8.5/emacs/trunk/etc/images/mail/compose.pbm0000644000175000000620000000012112114520723020725 0ustar wohlerstaffP4 24 24 €?üp È „ ž   " & D L ˆ !8!p!à!€!     ?ÿümh-e-8.5/emacs/trunk/etc/images/mail/reply.pbm0000644000175000000620000000012112114520723020413 0ustar wohlerstaffP4 24 24 ÿø $D€„Ac”„ø @ €üø?øømh-e-8.5/emacs/trunk/etc/images/mail/inbox.pbm0000644000175000000620000000012112114520723020377 0ustar wohlerstaffP4 24 24 à‡GGÇàÀ‡€Ç€g¦`žÈðüÀ ð8ðàó€>mh-e-8.5/emacs/trunk/etc/images/mail/reply-all.pbm0000644000175000000620000000012112114520723021161 0ustar wohlerstaffP4 24 24 `ˆˆ§øî Î?î$HþDH|„XaYã?ô„ ÿümh-e-8.5/emacs/trunk/etc/images/mail/reply-to.pbm0000644000175000000620000000012112114520723021033 0ustar wohlerstaffP4 24 24 `ˆˆ§øî Î?î$HþDH|„X`Yà?Ïà6"Á"6mh-e-8.5/emacs/trunk/etc/images/mail/send.xpm0000644000175000000620000000310412114520723020243 0ustar wohlerstaff/* XPM */ static char * stock_mail_send_xpm[] = { "24 24 58 1", " c None", ". c #4F3F0A", "+ c #000000", "@ c #F4E6B5", "# c #F4E5B3", "$ c #EDD684", "% c #755F10", "& c #EDD580", "* c #EED685", "= c #AF8D18", "- c #EFD98C", "; c #EED88B", "> c #EDD582", ", c #EED889", "' c #EFDA92", ") c #F0DB93", "! c #735D10", "~ c #535353", "{ c #FFFFFF", "] c #F0DC97", "^ c #F6F6F6", "/ c #F5F5F5", "( c #F4F4F4", "_ c #E3E3E3", ": c #EEEEEE", "< c #4F4F4F", "[ c #EDD37C", "} c #EDEDED", "| c #AEAEAE", "1 c #E4E4E4", "2 c #434343", "3 c #FDFDFD", "4 c #F3F3F3", "5 c #E4BF3D", "6 c #CBA41C", "7 c #D1A81C", "8 c #907413", "9 c #7C6411", "0 c #ACACAC", "a c #C8C8C8", "b c #FBFBFB", "c c #A0A0A0", "d c #D4D4D4", "e c #F8F8F8", "f c #F0F0F0", "g c #EFEFEF", "h c #ECECEC", "i c #959595", "j c #3E3E3E", "k c #4D4D4D", "l c #818181", "m c #C6C6C6", "n c #6A6A6A", "o c #636363", "p c #B9B9B9", "q c #737373", "r c #7C7C7C", "s c #BCBCBC", " ", " . ", " +@+ ", " +#$%+ ", " +#&*=%+ ", " +#-;>==%+ ", " +#,',>===%+ ", " ++++++)$&=!++++++ ", " +~{{{{+]$$=!+^/(_~+ ", " +:<{/(+,[$=!+:}_<|+ ", " +{1234+56789+}_<0a+ ", " +{/1 c #5A5A5A", ", c #676767", "' c #020202", ") c #807D76", "! c #D49A3E", "~ c #D2973B", "{ c #040402", "] c #6D6B6B", "^ c #7A7979", "/ c #030100", "( c #040100", "_ c #282724", ": c #DD9831", "< c #DA962F", "[ c #1A0E01", "} c #BC6D1B", "| c #BE6E13", "1 c #BE6D13", "2 c #BD6C13", "3 c #3E3C36", "4 c #D69029", "5 c #D18D27", "6 c #737067", "7 c #110900", "8 c #CF791C", "9 c #CE791C", "0 c #CD761A", "a c #C47013", "b c #4A4136", "c c #A0731E", "d c #96691A", "e c #000100", "f c #291703", "g c #BA6613", "h c #8C4E0D", "i c #844A0D", "j c #BF6D13", "k c #1F2A0D", "l c #306220", "m c #4F7242", "n c #448D44", "o c #2E802E", "p c #3A6F3A", "q c #FFFFFF", "r c #535353", "s c #171009", "t c #AC600C", "u c #713F0A", "v c #693A0A", "w c #AA5F0A", "x c #192B10", "y c #275926", "z c #68A769", "A c #358A36", "B c #2D812D", "C c #FBFBFB", "D c #F7F7F7", "E c #FAFAFA", "F c #F5F5F5", "G c #4F4F4F", "H c #AEAEAE", "I c #141517", "J c #6F767C", "K c #534C46", "L c #241609", "M c #23180E", "N c #484644", "O c #354A4D", "P c #050B07", "Q c #4F7E4F", "R c #399239", "S c #2D852D", "T c #297F29", "U c #ACACAC", "V c #C8C8C8", "W c #151618", "X c #6C7C8B", "Y c #728EA9", "Z c #5D6B78", "` c #C8CBCD", " . c #C3C7CD", ".. c #8090A2", "+. c #5A728B", "@. c #4E6479", "#. c #111714", "$. c #328732", "%. c #2B7F2C", "&. c #2B772C", "*. c #434343", "=. c #A0A0A0", "-. c #D4D4D4", ";. c #25282A", ">. c #8A9EB4", ",. c #6A86A1", "'. c #596A7C", "). c #DDE1E4", "!. c #DCE2E7", "~. c #899CAC", "{. c #687E96", "]. c #546D88", "^. c #11171E", "/. c #949494", "(. c #F6F6F6", "_. c #575757", ":. c #9F9F9F", "<. c #DADADA", "[. c #E8E8E8", "}. c #D1D1D1", "|. c #23282D", "1. c #8096AB", "2. c #5D7996", "3. c #53687D", "4. c #CDD3D9", "5. c #CBD2DC", "6. c #899BAB", "7. c #CCD4DC", "8. c #5E7790", "9. c #17212C", "0. c #F9F9F9", "a. c #C7C7C7", "b. c #D7D7D7", "c. c #E9E9E9", "d. c #F8F8F8", "e. c #F0F0F0", "f. c #1F252B", "g. c #6B8197", "h. c #536D89", "i. c #4A5D6F", "j. c #81919F", "k. c #8293A4", "l. c #5A7087", "m. c #496481", "n. c #47617E", "o. c #3F4951", "p. c #DEDEDE", "q. c #E6E6E6", "r. c #F1F1F1", "s. c #FDFDFD", "t. c #0E141A", "u. c #0D1319", "v. c #0E141B", "w. c #0E131A", "x. c #161B22", "y. c #DDDDDD", "z. c #636363", "A. c #C6C6C6", "B. c #EDEDED", "C. c #E3E3E3", "D. c #FCFCFC", "E. c #737373", "F. c #FEFEFE", "G. c #313131", "H. c #030303", "I. c #7C7C7C", "J. c #E4E4E4", "K. c #E7E7E7", "L. c #F3F3F3", "M. c #404040", "N. c #4D4D4D", "O. c #F2F2F2", "P. c #BCBCBC", "Q. c #C3C3C3", "R. c #E0E0E0", "S. c #ECECEC", "T. c #EFEFEF", "U. c #060606", "V. c #E5E5E5", " ", " . . ", " + @ # $ . ", " % & * = # # # . ", " - ; > , ' ) ! ~ # . ", " { ] ^ / ( _ : < # . ", " [ } | 1 2 3 4 5 # 6 ", " 7 8 9 0 a b c d # # . e . . . . . . ", " f g h i j k l m n o p . q q q q q r . ", " s t u v w x y z A o B . C D E F G H . ", " I J K L M N O P Q R S T . F F F G U V . ", " W X Y Z ` ...+.@.#.$.%.&.. F F *.=.-.V . ", " ;.>.,.'.).!.~.{.].^.. . . /.(._.:.<.[.}.. ", " |.1.2.3.4.5.6.7.8.9.0.E E E a.b.c.D d.e. ", " f.g.h.i.j.k.l.m.n.o.E C C p.q.r.0.s.C D ", " t.u.v.v.v.t.w.x.U y.. . . . . . . C 0. ", " . q C F z.A.(.r.B.C.c.e.. s.d.C D.E ", " . q F E.-.F (.E C (.d.s.. s.F.-.G.H.. ", " . q I.-.J.J.K.L.(.D d.0.. C D.M.N.O.. . ", " . E.P.P.P.P.Q.R.c.S.T.r.. (.d.U.V. . ", " . . . . . . . . . ", " . . . . . ", " . . . . ", " "}; mh-e-8.5/emacs/trunk/etc/images/mail/reply.xpm0000644000175000000620000000331412114520723020450 0ustar wohlerstaff/* XPM */ static char * stock_mail_reply_xpm[] = { "24 24 67 1", " c None", ". c #000000", "+ c #535353", "@ c #FFFFFF", "# c #FEFEFE", "$ c #FDFDFD", "% c #FCFCFC", "& c #FBFBFB", "* c #F9F9F9", "= c #F8F8F8", "- c #F7F7F7", "; c #F6F6F6", "> c #F5F5F5", ", c #F4F4F4", "' c #E3E3E3", ") c #EEEEEE", "! c #4F4F4F", "~ c #F3F3F3", "{ c #F2F2F2", "] c #F1F1F1", "^ c #F0F0F0", "/ c #EFEFEF", "( c #EDEDED", "_ c #AEAEAE", ": c #E4E4E4", "< c #434343", "[ c #ACACAC", "} c #C8C8C8", "| c #A0A0A0", "1 c #D4D4D4", "2 c #ECECEC", "3 c #959595", "4 c #3E3E3E", "5 c #4D4D4D", "6 c #818181", "7 c #C6C6C6", "8 c #3D1A13", "9 c #6A6A6A", "0 c #636363", "a c #B9B9B9", "b c #737373", "c c #EAC0BA", "d c #7C7C7C", "e c #DF9E95", "f c #E0A198", "g c #E1A59D", "h c #E2A79E", "i c #E3ABA3", "j c #E3AAA2", "k c #CC6253", "l c #DD978D", "m c #DF9F97", "n c #DE9A90", "o c #DD968C", "p c #DD948A", "q c #B14334", "r c #BCBCBC", "s c #431913", "t c #EAC2BC", "u c #DF9C92", "v c #DD998F", "w c #B54535", "x c #65261D", "y c #983A2C", "z c #7C2F24", "A c #63251D", "B c #6C291F", " ", " ", " ", " ................. ", " .+@@@@#$%&*=-;>,'+. ", " .)!@>,~{{]^^/)('!_. ", " .@:<$~{{]^/))('![}. ", " .@>:!&]^^/)(('<|1}. ", " .@&>:<=^/)(2'!31:}. ", " .@>>>:4>)(2'567::}. ", " .@&8>:9<~2'!977>:}. ", " .@..:0@a!^!37b7>:}. ", " ..c.0@>:1![7::d::}. ", " .ce.......:>>>:d:}. ", " .cfghihjek.::::::d}. ", " .clmenoonpq.rrrrrrr0. ", "stnuvvlnnnnw.......... ", " .xyyyyyyyyz. ", " .xyyAAAAAB. ", " .xy....... ", " .x. ", " .. ", " . ", " "}; mh-e-8.5/emacs/trunk/etc/images/mail/reply-from.xpm0000644000175000000620000000351512114520723021414 0ustar wohlerstaff/* XPM */ static char * reply_from_xpm[] = { "24 24 76 1", " c None", ". c #000000", "+ c #535353", "@ c #FFFFFF", "# c #FEFEFE", "$ c #FDFDFD", "% c #FCFCFC", "& c #FBFBFB", "* c #F9F9F9", "= c #F8F8F8", "- c #F7F7F7", "; c #F6F6F6", "> c #F5F5F5", ", c #F4F4F4", "' c #E3E3E3", ") c #EEEEEE", "! c #4F4F4F", "~ c #F3F3F3", "{ c #F2F2F2", "] c #F1F1F1", "^ c #F0F0F0", "/ c #EFEFEF", "( c #EDEDED", "_ c #AEAEAE", ": c #E4E4E4", "< c #434343", "[ c #ACACAC", "} c #C8C8C8", "| c #A0A0A0", "1 c #D4D4D4", "2 c #ECECEC", "3 c #959595", "4 c #3E3E3E", "5 c #4D4D4D", "6 c #818181", "7 c #C6C6C6", "8 c #3D1A13", "9 c #6A6A6A", "0 c #636363", "a c #B9B9B9", "b c #737373", "c c #EAC0BA", "d c #7C7C7C", "e c #6E6E6E", "f c #DF9E95", "g c #3F3F3F", "h c #FFE3E0", "i c #FFD5CF", "j c #FFD7D2", "k c #FFD9D3", "l c #E3ABA3", "m c #E2A79E", "n c #E3AAA2", "o c #CC6253", "p c #DD968C", "q c #DE9A90", "r c #DD948A", "s c #B14334", "t c #FFEAE7", "u c #FFDDD7", "v c #FFDCD6", "w c #FFDCD7", "x c #FFDBD6", "y c #FFDDD8", "z c #FFC2BA", "A c #FFD0C8", "B c #FFD0C9", "C c #FFD1CA", "D c #2A2221", "E c #080606", "F c #060404", "G c #1D1716", "H c #FFD1CB", "I c #362927", "J c #201817", "K c #473734", " ", " ", " ", " ................. ", " .+@@@@#$%&*=-;>,'+. ", " .)!@>,~{{]^^/)('!_. ", " .@:<$~{{]^/))('![}. ", " .@>:!&]^^/)(('<|1}. ", " .@&>:<=^/)(2'!31:}. ", " .@>>>:4>)(2'567::}. ", " .@&8>:9<~2'!977>:}. ", " .@..:0@a!^!37b7>:}. ", " ..c.0@>:1![7::d::}. ", " ecfegg....:>>>:d:}. ", " hijklmnfo.::::::d}. ", " .....ppqrs.###$$$$ . ", " t.uvwxuuyyz ", " .ABC.DEFCG.. . .. .. ", " ...H.I JK .. .. .. . ", " . H. . . . . . ", " . . . . . . . ", " . . .. .. . . . ", " . . ... . . . ", " "}; mh-e-8.5/emacs/trunk/etc/images/mail/flag-for-followup.pbm0000644000175000000620000000012112114520723022622 0ustar wohlerstaffP4 24 24 `üÿ?À,ð?ƒð_Çà/̈ ˜Øøx¸P( €@€mh-e-8.5/emacs/trunk/etc/images/refresh.pbm0000644000175000000620000000012112114520723017774 0ustar wohlerstaffP4 24 24 €@ ` @X@(€0,b$™Æ$‘ŠD‘„Ð P@ h€4@8 ðÀ mh-e-8.5/emacs/trunk/etc/images/spell.pbm0000644000175000000620000000027112114520723017463 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 9ã€e–@eæ}–e–DeãŽ`(PH(%0 `@À€€mh-e-8.5/emacs/trunk/etc/images/cut.pbm0000644000175000000620000000027112114520723017137 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 €€„€„€IIr2”L|ÿÀÎà Æ`D Æ`ƒ@ƒÀmh-e-8.5/emacs/trunk/etc/images/search.xpm0000644000175000000620000001100612114520723017635 0ustar wohlerstaff/* XPM */ static char * search_xpm[] = { "24 24 207 2", " c None", ". c #000000", "+ c #D3D3D3", "@ c #F6F6F6", "# c #FFFFFF", "$ c #F9F9F9", "% c #DADADA", "& c #585858", "* c #C7C7C7", "= c #D1D1D1", "- c #D6D6D6", "; c #FEFEFE", "> c #FDFDFD", ", c #C0C0C0", "' c #E1E1E1", ") c #F0F0F0", "! c #9B9B9B", "~ c #FCFCFB", "{ c #FBFBFB", "] c #AFAFAE", "^ c #E9E9E9", "/ c #DFDFDF", "( c #8F8F8F", "_ c #FAFAF9", ": c #F9F9F8", "< c #A4A4A3", "[ c #F4F4F4", "} c #CFCFCF", "| c #A2A2A2", "1 c #B8B8B8", "2 c #47473F", "3 c #0A0A09", "4 c #4B4B43", "5 c #B4B4B3", "6 c #F7F6F5", "7 c #9E9E9E", "8 c #A9A9A8", "9 c #34342E", "0 c #9D9D8D", "a c #CFCFB9", "b c #C4C4AF", "c c #8D8D7F", "d c #353530", "e c #ACACAA", "f c #F1F0EF", "g c #DEDDDC", "h c #D3D2D0", "i c #B7B7B5", "j c #9F9E9D", "k c #706F6F", "l c #65625A", "m c #46463F", "n c #9C9C8C", "o c #E2E2D0", "p c #EDEDE7", "q c #C0C0AC", "r c #B2B29F", "s c #828274", "t c #4C4C44", "u c #E4E4E2", "v c #E1E1DF", "w c #DAD9D7", "x c #D8D8D6", "y c #CDCCCA", "z c #AFAEAC", "A c #88847B", "B c #F8F8F7", "C c #090908", "D c #D5D5BF", "E c #FBFBFA", "F c #C3C3AE", "G c #B5B5A2", "H c #A6A695", "I c #9C9C8F", "J c #080807", "K c #CFCFCD", "L c #E3E2E0", "M c #ECEBE9", "N c #E9E8E6", "O c #D5D4D3", "P c #C4C3C2", "Q c #8F8A81", "R c #F6F5F4", "S c #F3F3F1", "T c #090909", "U c #CACAB5", "V c #DDDDD0", "W c #B7B7A4", "X c #AAAA98", "Y c #9B9B8B", "Z c #AEAEA3", "` c #BBBAB9", " . c #E8E7E5", ".. c #E5E4E2", "+. c #E4E3E0", "@. c #D2D1CE", "#. c #8D887E", "$. c #F4F3F2", "%. c #F0EFEE", "&. c #474740", "*. c #929283", "=. c #BABAA7", "-. c #ADAD9B", ";. c #9F9F8E", ">. c #ACACA1", ",. c #CFCFCB", "'. c #4C4C45", "). c #B3B2B1", "!. c #E2E1DE", "~. c #E1DFDC", "{. c #979288", "]. c #949493", "^. c #34342F", "/. c #878779", "(. c #A0A090", "_. c #AEAEA2", ":. c #C3C3BE", "<. c #010101", "[. c #B1B0AF", "}. c #D2D1CF", "|. c #A49E93", "1. c #F0F0EE", "2. c #EDEDEB", "3. c #DDDDDB", "4. c #898988", "5. c #414141", "6. c #737271", "7. c #A4A3A1", "8. c #DFDEDB", "9. c #E2E0DD", "0. c #E1E0DC", "a. c #E0DFDB", "b. c #A19C90", "c. c #E1E0DE", "d. c #CBCAC9", "e. c #B2B1B0", "f. c #A3A2A1", "g. c #9D9C9A", "h. c #9E9D9C", "i. c #9F9F9D", "j. c #ABAAA7", "k. c #DCDBD7", "l. c #DEDDD9", "m. c #DDDCD8", "n. c #A19B90", "o. c #EBEAE8", "p. c #E6E5E3", "q. c #C8C7C4", "r. c #B6B6B3", "s. c #B0AFAD", "t. c #B3B2B0", "u. c #747371", "v. c #9D9C99", "w. c #DAD9D5", "x. c #E7E6E3", "y. c #E6E5E2", "z. c #E3E2DF", "A. c #DBDAD7", "B. c #D4D3D0", "C. c #D0CFCB", "D. c #D1CFCC", "E. c #D1D0CC", "F. c #C9C8C4", "G. c #6B6B69", "H. c #CECDC9", "I. c #D6D4D0", "J. c #9F998D", "K. c #E3E2DE", "L. c #E4E2DF", "M. c #DFDEDA", "N. c #D5D4D0", "O. c #C0BFBC", "P. c #7B7A78", "Q. c #BCBAB6", "R. c #CECCC8", "S. c #9D978C", "T. c #EDEDED", "U. c #E1E0DD", "V. c #E2E1DD", "W. c #DBDAD6", "X. c #BBB9B6", "Y. c #A6A4A1", "Z. c #9E9C99", "`. c #ACABA7", " + c #C7C5C2", ".+ c #9B9589", "++ c #E1DFDB", "@+ c #E0DEDA", "#+ c #DEDCD8", "$+ c #DAD8D4", "%+ c #BDBCB8", "&+ c #ACABA8", "*+ c #B2B1AD", "=+ c #C6C4C0", "-+ c #999388", ";+ c #999891", ">+ c #A39E92", ",+ c #A39D92", "'+ c #A39D91", ")+ c #A29C90", "!+ c #A19B8F", "~+ c #9D978B", "{+ c #989286", "]+ c #918C82", "^+ c #938D83", "/+ c #979286", "(+ c #666258", " ", " . . . . . . . . . . . . . ", " . + @ # # # # # # # # $ % & . ", " . @ # # # # # # # # # # * = - . ", " . # # # # # # # ; # ; > , ' ) ! . ", " . # # # # # ; > ~ > ~ { ] ^ # / ( . ", " . # # # ; > ~ { _ { _ : < ) # [ } | . ", " . # ; > ~ 1 2 3 3 4 5 6 7 . . . . . . . ", " . # ~ { 8 9 0 a b c d e f g h i j k l . ", " . # _ : m n o p q r s t u v w x y z A . ", " . # B 6 C D E F G H I J K L M N O P Q . ", " . # R S T U V W X Y Z 3 ` w ...+.@.#.. ", " . # $.%.&.*.=.-.;.>.,.'.).h !.+.!.~.{.. ", " . # $.%.].^./.(._.:.<.<.[.}.!.+.!.~.|.. ", " . # 1.2.3.4.4 3 3 5.6.<.<.7.8.9.0.a.b.. ", " . # 2.M c.d.e.f.g.h.i.<.<.<.j.k.l.m.n.. ", " . # o.N p.w q.r.z s.t.u.. <.<.v.w.k.n.. ", " . # x.y.y.z.A.B.C.D.E.F.G.<.<.<.H.I.J.. ", " . $ +.z.K.L.K.a.a.M.M.N.O.P.<.<.Q.R.S.. ", " . T.U.~.0.a.V.a.0.a.0.W.E.X.Y.Z.`. +.+. ", " . = ++@+M.l.a.l.@+l.@+#+$+R.%+&+*+=+-+. ", " . ;+>+|.,+'+,+b.)+b.)+!+n.~+{+]+^+/+(+. ", " . . . . . . . . . . . . . . . . . . ", " "}; mh-e-8.5/emacs/trunk/etc/images/contact.xpm0000644000175000000620000000557512114520723020041 0ustar wohlerstaff/* XPM */ static char * stock_contact_xpm[] = { "24 24 102 2", " c None", ". c #000000", "+ c #E3E1DE", "@ c #ECEBE7", "# c #F0EEEB", "$ c #D2CFC9", "% c #81817F", "& c #4C4C4A", "* c #ECEAE6", "= c #ECEAE5", "- c #EBE9E5", "; c #D2CEC8", "> c #D9C7B8", ", c #D9C7B9", "' c #D8C5B8", ") c #D1C0B3", "! c #D6C5B7", "~ c #EBEAE5", "{ c #D3D0C9", "] c #CDBCAC", "^ c #AFA093", "/ c #3A3531", "( c #443F3A", "_ c #AE9F93", ": c #CBBAAB", "< c #4E4E4C", "[ c #595957", "} c #595857", "| c #7D7C7A", "1 c #D3D0CA", "2 c #C6B5A4", "3 c #3D3833", "4 c #433D37", "5 c #C2B0A2", "6 c #D4D1CA", "7 c #B0A08E", "8 c #261F18", "9 c #D37D1E", "0 c #D68021", "a c #B26616", "b c #27241F", "c c #9C8E7F", "d c #EAE9E5", "e c #A29281", "f c #2E2012", "g c #CC751A", "h c #CC761A", "i c #BF6C16", "j c #24211C", "k c #8E8170", "l c #EAE8E3", "m c #E9E8E3", "n c #E9E7E3", "o c #8E7F6C", "p c #221E17", "q c #C56D14", "r c #7D450D", "s c #AF5F11", "t c #221E19", "u c #7F7260", "v c #E9E7E2", "w c #E8E6E1", "x c #E7E5E1", "y c #E7E5E0", "z c #D5D1CB", "A c #3E372C", "B c #1C1F1F", "C c #301B06", "D c #542D07", "E c #291B0E", "F c #151412", "G c #473F33", "H c #E8E6E2", "I c #546371", "J c #849CB4", "K c #56687C", "L c #343332", "M c #495868", "N c #566D85", "O c #293643", "P c #E6E4DF", "Q c #E5E4DE", "R c #EEEDE9", "S c #7B95AF", "T c #7B96B0", "U c #68819B", "V c #8999AA", "W c #5A7088", "X c #607A96", "Y c #5B7691", "Z c #E5E3DE", "` c #4B4A48", " . c #757471", ".. c #E6E3DE", "+. c #3B3A39", "@. c #747371", "#. c #D3CFC8", "$. c #E2E1DD", "%. c #E7E4E0", "&. c #D2CFC8", "*. c #D1D0CA", "=. c #C2C0B9", " ", " ", " ", " . . . . . . . . . . . . . . . . . . . . ", " . + @ # # # # # # # # # # # # # # # # # $ . ", " . # % . . . . . . . & * = - - - - - - - ; . ", " . # . > , ' ) ! > , . * * ~ ~ ~ ~ - - ~ { . ", " . # . ] ^ / . ( _ : . * < [ ~ } } | - ~ 1 . ", " . # . 2 3 . . . 4 5 . * * ~ ~ - - - - - 6 . ", " . # . 7 8 9 0 a b c . * [ < | [ - } | d 6 . ", " . # . e f g h i j k . * * l l m n n n n 6 . ", " . # . o p q r s t u . v v w w w x y y y z . ", " . # . A B C D E F G . H H y y y y y y y 6 . ", " . # . I J K L M N O . y y P P P P P P Q { . ", " . R . S T U V W X Y . y y P P P P Z Z Z { . ", " . d ` . . . . . . . ` y y ...+.+.Z @.Z #.. ", " . $.y y y y y y y y y %.P Z Z Z Z Z Z Z &.. ", " . *.6 z 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 =.. ", " . . . . . . . . . . . . . . . . . . . . . ", " ", " ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/right-arrow.pbm0000644000175000000620000000027112114520723020611 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 ñ€@ 0 ÿà ÿÀ ÿ€ÿmh-e-8.5/emacs/trunk/etc/images/spell.xpm0000644000175000000620000000237712114520723017522 0ustar wohlerstaff/* XPM */ static char * spell_xpm[] = { "24 24 37 1", " c None", ". c #000000", "+ c #8BBB8C", "@ c #ABD0AC", "# c #1A3B1A", "$ c #8ABA88", "% c #B4D5B4", "& c #70A770", "* c #132C13", "= c #77A676", "- c #2D2D2D", "; c #CBDFCB", "> c #6FAE6E", ", c #A8CBA6", "' c #6D9D6C", ") c #D0E4D0", "! c #6FAF6F", "~ c #587055", "{ c #B8D6B8", "] c #5B9159", "^ c #D4E4D4", "/ c #67AF67", "( c #5D905B", "_ c #9FC59D", ": c #93BE92", "< c #B5D1B5", "[ c #67AF68", "} c #63A261", "| c #BBD6BA", "1 c #82B881", "2 c #75AF74", "3 c #6B8868", "4 c #9DC39D", "5 c #7DB17B", "6 c #6BA368", "7 c #485C46", "8 c #89BA88", " ", " ", " ", " ", " ... .... ... ", " .. . .. . .. . ", " .. . .... .. ", " ..... .. . .. ", " .. . .. . .. . . ", " .. . .... ... ... ", " .+. ", " .. .@# ", " .$. .%&. ", " *=. -;>. ", " .,'. .)!~. ", " .{].^/(. ", " ._:<[}~. ", " .|123. ", " .4567. ", " .83. ", " .37. ", " .. ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/data-save.xpm0000644000175000000620000001111112114520723020232 0ustar wohlerstaff/* XPM */ static char * data_save_xpm[] = { "24 24 211 2", " c None", ". c #000000", "+ c #C3D7F4", "@ c #A9CDE5", "# c #75757A", "$ c #EFC5BB", "% c #F1C8BE", "& c #F0C6BC", "* c #EEBCB2", "= c #EEBEB5", "- c #EEC1B8", "; c #EDBFB6", "> c #E9B7AD", ", c #E9B8AF", "' c #E9B9B1", ") c #E5BFBA", "! c #737277", "~ c #B3CDE3", "{ c #A1BED6", "] c #BBD6E8", "^ c #8AAAC5", "/ c #605F68", "( c #E08D7E", "_ c #E0826E", ": c #E0806E", "< c #DC7A68", "[ c #DC8171", "} c #DA7868", "| c #D48173", "1 c #D47D6E", "2 c #CE7265", "3 c #CF7264", "4 c #CE7567", "5 c #C4675B", "6 c #C36558", "7 c #626169", "8 c #87A3B7", "9 c #567187", "0 c #BAD5E9", "a c #88A7C3", "b c #686670", "c c #C8817B", "d c #CB7C74", "e c #CB7A73", "f c #CB7B73", "g c #CC7C72", "h c #CB7D73", "i c #BF6B64", "j c #CC7A70", "k c #C16A62", "l c #CC7C73", "m c #C2655B", "n c #C36459", "o c #BA6C6A", "p c #819EB6", "q c #547086", "r c #B6D3E7", "s c #87ABC1", "t c #737373", "u c #FFFFFF", "v c #83A0B8", "w c #526C80", "x c #B9D3E7", "y c #585858", "z c #4F697C", "A c #B9D3E6", "B c #9E9E9E", "C c #CDCDCD", "D c #BFBFBF", "E c #88A4BB", "F c #486276", "G c #B7D2E7", "H c #C4C4C4", "I c #465E70", "J c #B5CAE5", "K c #87A3BA", "L c #455C6D", "M c #AECCE5", "N c #ACACAC", "O c #C5C5C5", "P c #546069", "Q c #B0D1E4", "R c #515C64", "S c #AACEE3", "T c #6B6F72", "U c #6F6F6F", "V c #696969", "W c #6F777E", "X c #86A2B9", "Y c #3A515D", "Z c #A9C9E2", "` c #647A8D", " . c #829FB7", ".. c #7F9DB6", "+. c #7E9CB5", "@. c #7998B2", "#. c #85A1B8", "$. c #8CA7BD", "%. c #8AA5BB", "&. c #364A59", "*. c #ABC4E2", "=. c #556E84", "-. c #7192AE", ";. c #414A4E", ">. c #424A51", ",. c #525B63", "'. c #626F79", "). c #5F6C76", "!. c #5C6971", "~. c #5A666F", "{. c #58636B", "]. c #57636A", "^. c #3B5360", "/. c #39424B", "(. c #7897B3", "_. c #A4B9CB", ":. c #364853", "<. c #AAC9E2", "[. c #7091AA", "}. c #6F8FA7", "|. c #4A5359", "1. c #97938C", "2. c #DFDDDA", "3. c #E3E1DE", "4. c #EBEAE8", "5. c #EAE9E7", "6. c #CFCEC9", "7. c #C9C6C0", "8. c #9B968E", "9. c #566168", "0. c #4B657A", "a. c #54738C", "b. c #AAC6DD", "c. c #34464E", "d. c #AAC9E1", "e. c #6C8EA6", "f. c #6C8CA4", "g. c #40474D", "h. c #DAD8D3", "i. c #E7E6E2", "j. c #67655E", "k. c #524F47", "l. c #D9D7D4", "m. c #C7C5BF", "n. c #C0BCB5", "o. c #B8B3AB", "p. c #434C54", "q. c #4D697F", "r. c #4F6F84", "s. c #B3CADC", "t. c #313E49", "u. c #A8C8E1", "v. c #6B8DA6", "w. c #728FA4", "x. c #E2E1DD", "y. c #F0EFEC", "z. c #CDCAC6", "A. c #C2BFB9", "B. c #CAC6C0", "C. c #DCDAD7", "D. c #4B555D", "E. c #4E697F", "F. c #BACCDC", "G. c #A4C4DE", "H. c #698BA3", "I. c #708AA1", "J. c #383E43", "K. c #E0DEDA", "L. c #514E46", "M. c #4F4C44", "N. c #C7C4BE", "O. c #CBC8C2", "P. c #E1E0DC", "Q. c #E9E8E6", "R. c #475158", "S. c #4E6879", "T. c #4D6C80", "U. c #A3C3DB", "V. c #383F43", "W. c #778999", "X. c #6E899E", "Y. c #65859C", "Z. c #33383C", "`. c #D7D4D0", " + c #D6D4D0", ".+ c #4E4A43", "++ c #4D4942", "@+ c #D1CEC9", "#+ c #E6E5E2", "$+ c #EDECEA", "%+ c #454F55", "&+ c #486173", "*+ c #4D6678", "=+ c #A1C1DA", "-+ c #373C40", ";+ c #0C0D0F", ">+ c #4E5E6A", ",+ c #5B6E7C", "'+ c #4F5B62", ")+ c #A4A099", "!+ c #CCC9C3", "~+ c #D7D5D1", "{+ c #E4E2E0", "]+ c #DDDBD7", "^+ c #B8B5B0", "/+ c #3E474D", "(+ c #4A6176", "_+ c #4A6070", ":+ c #9BC3D8", "<+ c #363C41", "[+ c #28323E", " ", " . . . . . . . . . . . . . . . . . . . ", " . + @ # $ % & * = - ; > , > , ' ) ! ~ { . ", " . ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 . ", " . 0 a b c d e f g h i j k l m n o b p q . ", " . r s t u u u u u u u u u u u u u t v w . ", " . x . y u u u u u u u u u u u u u t v z . ", " . A . . B C C C C C C C C C C C D t E F . ", " . G . . . H u u u u u u u u u u u t E I . ", " . J . . . . H u u u u u u u u u u t K L . ", " . M . . . . . N C C C C C C C C O t K P . ", " . Q . . . . H u u u u u u u u u u t v R . ", " . S . . . y t t t t T U t t t t V W X Y . ", " . Z . . ` X ...+. .@.X #.#.K .$.v %.&.. ", " . *.. =.-.;.>.,.'.).!.~.{.].,.^./.(._.:.. ", " . <.[.}.|.1.2.3.4.4.5.2.6.7.8.9.0.a.b.c.. ", " . d.e.f.g.h.i.j.k.k.l.m.n.o.6.p.q.r.s.t.. ", " . u.v.w.g.x.y.j.k.k.z.A.n.B.C.D.E.r.F.t.. ", " . G.H.I.J.K.4.L.M.M.N.n.O.P.Q.R.S.T.U.V.. ", " . W.X.Y.Z.`. +.+++++n.@+#+$+#+%+&+*+=+-+. ", " ;+>+,+'+)+n.o.!+!+~+{+5.]+^+/+(+_+:+<+. ", " . . . . . . . . . . . . . . . . [+. ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/left-arrow.xpm0000644000175000000620000000253612114520723020462 0ustar wohlerstaff/* XPM */ static char * left_arrow_xpm[] = { "24 24 43 1", " c None", ". c #000000", "+ c #B9D0B9", "@ c #CDDECB", "# c #B6C7B6", "$ c #B1C9B0", "% c #B3C4B3", "& c #B4CBB2", "* c #B5CEB5", "= c #B7CCB5", "- c #B9CEB7", "; c #BAD1BA", "> c #BBCFBA", ", c #BBD0B9", "' c #B2C9B0", ") c #7EAB78", "! c #AAC7A8", "~ c #B3CAB1", "{ c #B0C9B0", "] c #B0C9AE", "^ c #AEC7AC", "/ c #AAC5A8", "( c #A9C4A7", "_ c #698267", ": c #2D2D2D", "< c #CFDFCC", "[ c #ADC8AB", "} c #B0C7AE", "| c #ADC6AB", "1 c #678C63", "2 c #9BAD9A", "3 c #85AE81", "4 c #87AF84", "5 c #87B083", "6 c #88AF84", "7 c #88B085", "8 c #86AF82", "9 c #547150", "0 c #3C5235", "a c #5B7950", "b c #4A6342", "c c #3B5035", "d c #415639", " ", " ", " ", " . ", " .. ", " .+. ", " .@#. ", " .@$%........ ", " .@&*=-;->,'). ", " .@!~{]^///^(_. ", " :<[}||[!^^}^[1. ", " .23444445645789. ", " .0aaaaaaaaaaab. ", " .0aaaaaaaaaab. ", " .0aabccccccd. ", " .0ab........ ", " .0b. ", " .b. ", " .. ", " . ", " ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/mh-logo.xpm0000644000175000000620000000234012114520723017733 0ustar wohlerstaff/* XPM */ /* MH-E Logo * * Copyright (C) 2003-2013 Free Software Foundation, Inc. * * Author: Satyaki Das * * This file is part of GNU Emacs. * * GNU Emacs is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GNU Emacs is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Emacs. If not, see . */ static char *mh-e[] = { /* width height num_colors chars_per_pixel */ " 18 13 2 1", /* colors */ "# c #666699", ". c None s None", /* pixels */ "........##........", ".......####.......", "......######......", "......######......", "....#########.....", "..##############..", ".##...######....#.", "##...#.#.####...#.", "....#..#.##.#...#.", "...#..##.#.#.#....", "...#..#..#..#.#...", "...#..#.##..#.##..", "...#..#.#..#....#." }; mh-e-8.5/emacs/trunk/etc/images/show.xpm0000644000175000000620000000724412114520723017361 0ustar wohlerstaff/* XPM */ static char * show_xpm[] = { "24 24 153 2", " c None", ". c #000000", "+ c #0E0E0E", "@ c #282828", "# c #616161", "$ c #D3D3D3", "% c #F6F6F6", "& c #FFFFFF", "* c #F9F9F9", "= c #F9F9F8", "- c #E7E7E7", "; c #E4E4E4", "> c #CDCDCD", ", c #1F1F1F", "' c #EFEFEE", ") c #AFAFAE", "! c #E9E9E9", "~ c #B3B3B3", "{ c #383838", "] c #C1C1C1", "^ c #B4B4B4", "/ c #A4A4A3", "( c #F0F0F0", "_ c #F4F4F4", ": c #ABABAB", "< c #050505", "[ c #FEFEFE", "} c #FDFDFD", "| c #FCFCFB", "1 c #FBFBFB", "2 c #F2F2F2", "3 c #9E9E9E", "4 c #C0C0C0", "5 c #BFBFBF", "6 c #BFBFBE", "7 c #BEBEBE", "8 c #BDBDBC", "9 c #BCBCBC", "0 c #B9B9B9", "a c #A0A0A0", "b c #B9B7B6", "c c #838381", "d c #848381", "e c #6A6763", "f c #FAFAF9", "g c #F8F8F7", "h c #F8F7F6", "i c #F3F2F1", "j c #E0E0DF", "k c #DCDAD8", "l c #CACAC8", "m c #B6B6B4", "n c #72706C", "o c #BCBCBB", "p c #BCBBBA", "q c #BBBAB9", "r c #BABAB9", "s c #B9B8B7", "t c #B6B6B5", "u c #B6B5B3", "v c #E5E4E2", "w c #C4C3C0", "x c #817D74", "y c #F7F6F5", "z c #F6F6F4", "A c #F5F4F3", "B c #F4F3F2", "C c #EBEAE8", "D c #E1DFDC", "E c #8B867D", "F c #B9B9B8", "G c #B8B8B6", "H c #B7B7B6", "I c #B5B5B3", "J c #B4B3B2", "K c #B3B3B2", "L c #ADADAB", "M c #A49E93", "N c #F6F5F4", "O c #F5F5F3", "P c #F3F3F1", "Q c #F2F2F0", "R c #F1F1EF", "S c #F1F0EE", "T c #EEEDEB", "U c #ECEBE9", "V c #E7E6E3", "W c #E2E1DF", "X c #E4E3E0", "Y c #B8B7B6", "Z c #B5B4B3", "` c #B3B2B0", " . c #B0AFAD", ".. c #ADADAA", "+. c #ADACAA", "@. c #E2E1DE", "#. c #F0F0EE", "$. c #EFEFED", "%. c #F0EFED", "&. c #EFEEEC", "*. c #E8E7E5", "=. c #E5E4E1", "-. c #B3B3B1", ";. c #AFAEAC", ">. c #E1E0DC", ",. c #E0DFDB", "'. c #A19C90", "). c #EDEDEB", "!. c #EDECEA", "~. c #E9E8E5", "{. c #E6E4E1", "]. c #E3E2DE", "^. c #DFDEDA", "/. c #DEDDD9", "(. c #DDDCD8", "_. c #A19B90", ":. c #B0B0AE", "<. c #AFADAB", "[. c #E4E2DF", "}. c #E2E1DD", "|. c #DCDBD7", "1. c #E6E5E2", "2. c #E5E4E0", "3. c #E4E3DF", "4. c #DBD9D5", "5. c #D9D7D3", "6. c #9F998D", "7. c #E3E2DF", "8. c #DDDBD7", "9. c #DCDAD6", "0. c #D8D6D2", "a. c #9E988D", "b. c #EDEDED", "c. c #E1E0DD", "d. c #E0DEDA", "e. c #D8D6D1", "f. c #D7D5D1", "g. c #9D978B", "h. c #D1D1D1", "i. c #E1DFDB", "j. c #DEDCD8", "k. c #D7D6D1", "l. c #D5D3CE", "m. c #9B958A", "n. c #999891", "o. c #A39E92", "p. c #A39D92", "q. c #A39D91", "r. c #A29C90", "s. c #A19B8F", "t. c #9D978C", "u. c #9B968A", "v. c #676359", " ", " . . . . . . . . . . . . . + @ # ", " . $ % & & & & & & & & * = = - ; > , ", " . % & & & & & & & & & & = ' ) ! & ~ { ", " . & & ] ] ] ] ] ] ] ] ] ] ^ / ( & _ : < ", " . & & & & & [ } | } | 1 = 2 3 . . . . . ", " . & & ] 4 5 6 7 8 7 8 9 9 0 a b c d e . ", " . & [ } | 1 f = g = g h = i j k l m n . ", " . & | 7 8 9 o p q p q r s t u u v w x . ", " . & f = g h y z A z A B B B B C D D E . ", " . & g p q r F s G s G H I J K L D D M . ", " . & N O B B P Q R Q R S T U V W X D M . ", " . & B Y H m I m u m u Z ` ...+.@.D M . ", " . & B i Q #.$.S %.S %.&.U *.=.X @.D M . ", " . & #.I I Z J -.-.-.-.` .;.W >.>.,.'.. ", " . & ).!.U U U C ~.C ~.~.=.{.].^./.(._.. ", " . & C :.:. . . .;. .;.<.[.}.,.(.(.|._.. ", " . & V 1.1.1.=.{.2.{.2.3.}.,./.|.4.5.6.. ", " . * X 7.].[.3.}.].}.].>.>./.8.9.5.0.a.. ", " . b.c.D >.,.}.,.>.,.>.^.d.8.9.5.e.f.g.. ", " . h.i.d.^./.,./.d./.d.j.j.9.9.0.k.l.m.. ", " . n.o.M p.q.p.'.r.'.r.s._.6.6.t.t.u.v.. ", " . . . . . . . . . . . . . . . . . . ", " "}; mh-e-8.5/emacs/trunk/etc/images/undo.xpm0000644000175000000620000000224412114520723017341 0ustar wohlerstaff/* XPM */ static char * undo_xpm[] = { "24 24 31 1", " c None", ". c #000000", "+ c #EFE5BA", "@ c #EFE7C1", "# c #EED680", "$ c #EFE4B6", "% c #D5B75D", "& c #B29544", "* c #D1B051", "= c #C0AF73", "- c #C0A048", "; c #986B07", "> c #D1940C", ", c #E0B74C", "' c #D9C374", ") c #8F6406", "! c #D59D1C", "~ c #B1933F", "{ c #DFB74A", "] c #CCB76D", "^ c #B8820A", "/ c #D9A72E", "( c #D7A62C", "_ c #C7B26A", ": c #D4B150", "< c #A39256", "[ c #E2CB79", "} c #C9B46B", "| c #8D7E4A", "1 c #AE9C5C", "2 c #96864F", " ", " ", " ", " . ", " .. ", " .+. ", " .@#.... ", " .$####%&. ", " .+#######*. ", " .=#########-. ", " .;>>>>>>,#'.. ", " .)>>>>>>!#~. ", " .)>...;>{]. ", " .;. ..^/#. ", " .. ..>#. ", " . .(_. ", " .:<. ", " .[. ", " .}|. ", " .12. ", " .. ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/right-arrow.xpm0000644000175000000620000000250112114520723020635 0ustar wohlerstaff/* XPM */ static char * right_arrow_xpm[] = { "24 24 41 1", " c None", ". c #000000", "+ c #8CA782", "@ c #B1CDAE", "# c #77A16E", "$ c #B4CEB1", "% c #ACC8A9", "& c #709867", "* c #C1D6BD", "= c #BDD3B8", "- c #BFD4BB", "; c #C2D7BE", "> c #B0CAAD", ", c #B2CBB0", "' c #AAC7A8", ") c #0F1308", "! c #AEC5A8", "~ c #AEC8AD", "{ c #ABC7A8", "] c #AAC6A7", "^ c #A8C6A5", "/ c #ADC8AD", "( c #A8C7A8", "_ c #A5C4A3", ": c #7F9F76", "< c #A6BFA0", "[ c #ABC7AA", "} c #A7C5A4", "| c #A9C7A6", "1 c #AFC8AD", "2 c #A4C3A2", "3 c #6B9060", "4 c #778E6F", "5 c #698D60", "6 c #6B9063", "7 c #445B2C", "8 c #6B8661", "9 c #5B7950", "0 c #6C8562", "a c #65815C", "b c #506B46", " ", " ", " ", " . ", " .. ", " .+. ", " .@#. ", " ........$%&. ", " .*=-;;;;>,'&) ", " .!~{{{]^'/(_:. ", " .<[^}^|{%'{123. ", " .45666666666657. ", " .8999999999997. ", " .099999999997. ", " .abbbbbb9997. ", " ........b97. ", " .b7. ", " .7. ", " .. ", " . ", " ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/search.pbm0000644000175000000620000000027112114520723017611 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 ÿ € @   ñü!""""!  þ  „ Ä Ä   ÿømh-e-8.5/emacs/trunk/etc/images/cut.xpm0000644000175000000620000000245212114520723017170 0ustar wohlerstaff/* XPM */ static char * cut_xpm[] = { "24 24 40 1", " c None", ". c #000000", "+ c #C9C7C2", "@ c #E6E4E0", "# c #EFEEED", "$ c #494946", "% c #73726E", "& c #F0EEED", "* c #7F7D75", "= c #F2F1EF", "- c #D2CFC8", "; c #E7E7E4", "> c #BAB5AB", ", c #565653", "' c #EDECE9", ") c #A4A097", "! c #817F7E", "~ c #4E4C48", "{ c #F6F5F4", "] c #474541", "^ c #EFEEEC", "/ c #8C8B8A", "( c #F3F2F0", "_ c #77746D", ": c #323232", "< c #EBEBEA", "[ c #605D58", "} c #F5F4F3", "| c #CECCC7", "1 c #363634", "2 c #6F6E6D", "3 c #BEBDBB", "4 c #EAE7E4", "5 c #B8B5B1", "6 c #474747", "7 c #DAD8D4", "8 c #9B9996", "9 c #161615", "0 c #6D6B6A", "a c #3A3837", " ", " ", " . . ", " . . ", " .+. .@. ", " .#$ %@. ", " .&*. .=-. ", " .;>, %'). ", " !#*. .=-~ ", " .{>] ~^>. ", " /(_.:<-[ ", " .}|123>. ", " .456>. ", " .78.. ", " .90a. ", " ............. ", " . ... ... ... ", " .. .. .. .. ", " . . . . ", " .. .. .. .. ", " .... .. . ", " .... .... ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/paste.pbm0000644000175000000620000000027112114520723017460 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 à~?€‚@‚Ð@„Àˆ À‡øÀ€À€ÿøhh‡ÿømh-e-8.5/emacs/trunk/etc/images/delete.xpm0000644000175000000620000001211412114520723017633 0ustar wohlerstaff/* XPM */ static char * stock_delete_xpm[] = { "24 24 243 2", " c None", ". c #000000", "+ c #1C1C1C", "@ c #767676", "# c #E6E6E6", "$ c #D3D3D3", "% c #C3C3C3", "& c #909090", "* c #494949", "= c #48473D", "- c #BAB8A6", "; c #E2E2DF", "> c #F1F1F0", ", c #EAE9E6", "' c #F2F2EE", ") c #EBEAE5", "! c #C1C0B5", "~ c #57564A", "{ c #525146", "] c #A8A68F", "^ c #BDBBA1", "/ c #C0BEA3", "( c #A3A18A", "_ c #6D6C5C", ": c #7C7C72", "< c #4C4C49", "[ c #45453F", "} c #44433A", "| c #6F6F67", "1 c #C6C5B9", "2 c #B6B59B", "3 c #6D6C5D", "4 c #B3B19B", "5 c #A7A68E", "6 c #908F7A", "7 c #AAA993", "8 c #CCCBB5", "9 c #D0CEBA", "0 c #D5D3C1", "a c #AEADA3", "b c #94938A", "c c #454442", "d c #232321", "e c #353431", "f c #292823", "g c #1E1E1A", "h c #535246", "i c #ADAC93", "j c #929189", "k c #C2C1AF", "l c #B1AF96", "m c #ACAA92", "n c #93927D", "o c #080808", "p c #D1D0C1", "q c #D6D5C4", "r c #DFDED1", "s c #CECDC0", "t c #ACACA6", "u c #908F8A", "v c #7E7D77", "w c #5C5C55", "x c #47463E", "y c #656456", "z c #777665", "A c #807E6F", "B c #BEBDA7", "C c #B5B39A", "D c #A19F88", "E c #D9D8CC", "F c #F6F5F2", "G c #DBDAD1", "H c #DAD9CE", "I c #E5E4D9", "J c #D0CFC3", "K c #D3D3C9", "L c #CAC9BC", "M c #B7B6A6", "N c #B8B6A1", "O c #B0AF96", "P c #B9B89D", "Q c #B9B79D", "R c #B8B69C", "S c #C4C2A9", "T c #AFAD97", "U c #8B8976", "V c #AAA998", "W c #B6B6B2", "X c #F9F9F7", "Y c #FAFAF8", "Z c #F4F4F0", "` c #E2E1DA", " . c #D9D9CE", ".. c #DBDACF", "+. c #D3D1BE", "@. c #C5C4AC", "#. c #D6D5C3", "$. c #CDCCBF", "%. c #BBBAAD", "&. c #7C7A69", "*. c #717060", "=. c #131313", "-. c #999882", ";. c #AFAE9D", ">. c #C3C3BE", ",. c #DEDEDC", "'. c #E9E9E8", "). c #FBFBFA", "!. c #FDFDFC", "~. c #FDFDFD", "{. c #FCFBFA", "]. c #F2F2EF", "^. c #EAE9E3", "/. c #C0BFB1", "(. c #959484", "_. c #787766", ":. c #6E6D5D", "<. c #5B5B4D", "[. c #5D5C4F", "}. c #A3A293", "|. c #B8B7A6", "1. c #D8D7D0", "2. c #DBDBD4", "3. c #D3D2CA", "4. c #C8C8C3", "5. c #C6C5BD", "6. c #BDBCAD", "7. c #BAB8A8", "8. c #9F9E8B", "9. c #8E8C78", "0. c #8C8B77", "a. c #7A7968", "b. c #6C6B5D", "c. c #4E4D45", "d. c #424242", "e. c #7B7B73", "f. c #9F9F96", "g. c #D2D1C7", "h. c #DCDBD2", "i. c #CCCBBE", "j. c #D1D0C2", "k. c #C4C3B6", "l. c #9A9883", "m. c #807F6D", "n. c #7D7C6B", "o. c #6A695E", "p. c #40403E", "q. c #37372D", "r. c #0F0F0F", "s. c #383734", "t. c #787875", "u. c #999893", "v. c #8A897E", "w. c #B3B2A4", "x. c #AAAA9E", "y. c #878673", "z. c #8F8D79", "A. c #626155", "B. c #545451", "C. c #31312E", "D. c #2B2B23", "E. c #71715D", "F. c #57574B", "G. c #42423A", "H. c #262620", "I. c #212121", "J. c #1B1B1B", "K. c #242424", "L. c #161613", "M. c #2A2A22", "N. c #303027", "O. c #3F3F34", "P. c #7A7A65", "Q. c #5B5B51", "R. c #858576", "S. c #76766B", "T. c #98988E", "U. c #75756B", "V. c #515146", "W. c #7F7F74", "X. c #6A6A58", "Y. c #404035", "Z. c #626251", "`. c #545445", " + c #3E3E33", ".+ c #555546", "++ c #34342B", "@+ c #515143", "#+ c #85856E", "$+ c #5D5D54", "%+ c #919182", "&+ c #828278", "*+ c #AAAAA3", "=+ c #7A7A71", "-+ c #4E4E45", ";+ c #8A8A80", ">+ c #7C7C6D", ",+ c #424237", "'+ c #606052", ")+ c #5A5A4A", "!+ c #3C3C32", "~+ c #4E4E41", "{+ c #35352C", "]+ c #ACAC9C", "^+ c #85857B", "/+ c #BBBBB3", "(+ c #A3A39A", "_+ c #54544B", ":+ c #93938A", "<+ c #919185", "[+ c #686856", "}+ c #414136", "|+ c #434337", "1+ c #A4A493", "2+ c #C1C1B6", "3+ c #B1B1A2", "4+ c #6B6B5F", "5+ c #9D9D8B", "6+ c #848470", "7+ c #71715E", "8+ c #A5A594", "9+ c #C2C2B7", "0+ c #7B7B65", "a+ c #5F5F4F", "b+ c #666654", "c+ c #49493C", "d+ c #575748", "e+ c #57574A", "f+ c #7D7D6D", "g+ c #767669", "h+ c #B3B3A8", "i+ c #A1A194", "j+ c #6D6D61", "k+ c #B3B3A5", "l+ c #696957", "m+ c #414135", "n+ c #565647", "o+ c #444438", "p+ c #595951", "q+ c #585849", "r+ c #4E4E40", "s+ c #747467", "t+ c #616153", " . . . . . . ", " . + @ # $ % & * . . ", " . . . = - ; > , ' ) ! ~ { . . . ", " . ] ^ / ( _ : < [ } | 1 2 3 4 5 6 . ", " . 7 8 9 0 a b c d e f g h i j k l m n . ", " o p 8 q r s t u v w x y z A B C 2 C D . ", " . E F G H I J K L M N O D P Q R S T U . ", " . V W X Y Z ` ...0 +.S / @.#.$.%.&.*.. ", " =.-.;.>.,.'.).!.~.{.X ].^.G /.(._.:.<.. ", " . [.n }.|.1.2.3.4.5.6.7.8.9.0.9.a.b.c. ", " . d.e.f.g.h.i.j.k.l l l l.m.n.o.p.. ", " . q.r.s.t.u.v.w.x.( y.z.A.B.C.. D.. ", " . E.F.G.H.I.J.. K.. . . . L.M.N.O.. ", " . P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+. ", " . #+$+%+&+*+=+-+;+>+,+'+)+!+~+{+`.. ", " . #+Q.]+^+/+(+_+:+<+,+'+[+}+X.|+X.. ", " . #+Q.1+^+2+3+4+3+5+`.6+7+|+X.|+X.. ", " . #+Q.8+^+9+3+4+3+5+`.6+7+|+X.|+X.. ", " . #+Q.5+^+2+3+4+3+5+`.6+7+|+X.|+X.. ", " . 0+Q.1+^+2+3+4+3+5+`.6+7+|+X.|+a+. ", " . b+Q.1+&+2+3+4+3+5+`.6+7+|+X.c+d+. ", " . e+f+g+h+i+j+k+5+`.6+l+m+n+o+. . ", " . . . p+q+r+s+t+~+c+c+. . . ", " . . . . . . . . . . "}; mh-e-8.5/emacs/trunk/etc/images/save.pbm0000644000175000000620000000017712114520723017307 0ustar wohlerstaffP4 # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 ?ÿøH$H,H,H,H,H,H,H,H,H,Cÿì@ CÿÌDìDàìDàìDàìDàì<ìÿømh-e-8.5/emacs/trunk/etc/images/preferences.pbm0000644000175000000620000000027112114520723020645 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 €   "$X Ã@"€€ Àö` „˜G0%"` à!À€mh-e-8.5/emacs/trunk/etc/images/zoom-out.pbm0000644000175000000620000000012112114520723020127 0ustar wohlerstaffP4 24 24 ø €0À @``@ Cü Cü @ `` @0À€ Àðøx|. mh-e-8.5/emacs/trunk/etc/images/zoom-out.xpm0000644000175000000620000000651012114520723020165 0ustar wohlerstaff/* XPM */ static char * zoom_out_xpm[] = { "24 24 131 2", " c None", ". c #343434", "+ c #2D2D2D", "@ c #292929", "# c #262626", "$ c #2E2E2E", "% c #303030", "& c #737373", "* c #A1A1A1", "= c #B4B4B4", "- c #B2B2B2", "; c #9D9D9D", "> c #676767", ", c #202020", "' c #1C1C1C", ") c #272727", "! c #616161", "~ c #CACACA", "{ c #CFCFCF", "] c #D0D0D0", "^ c #CECECE", "/ c #C9C9C9", "( c #C1C1C1", "_ c #A7A7A7", ": c #4C4C4C", "< c #131313", "[ c #222222", "} c #757575", "| c #D3D3D3", "1 c #DBDBDB", "2 c #E7E7E7", "3 c #EFEFEF", "4 c #F3F3F3", "5 c #F1F1F1", "6 c #E5E5E5", "7 c #D2D2D2", "8 c #BCBCBC", "9 c #5E5E5E", "0 c #101010", "a c #212121", "b c #5B5B5B", "c c #CCCCCC", "d c #D7D7D7", "e c #F5F5F5", "f c #FAFAFA", "g c #FBFBFB", "h c #F8F8F8", "i c #F0F0F0", "j c #E1E1E1", "k c #C2C2C2", "l c #434343", "m c #0F0F0F", "n c #1F1F1F", "o c #B9B9B9", "p c #D6D6D6", "q c #F9F9F9", "r c #FDFDFD", "s c #FCFCFC", "t c #F2F2F2", "u c #ECECEC", "v c #E4E4E4", "w c #ABABAB", "x c #0E0E0E", "y c #1B1B1B", "z c #6D6D6D", "A c #FEFEFE", "B c #EEEEEE", "C c #E6E6E6", "D c #575757", "E c #090909", "F c #141414", "G c #A8A8A8", "H c #D8D8D8", "I c #F6F6F6", "J c #F4F4F4", "K c #DCDCDC", "L c #9B9B9B", "M c #060606", "N c #111111", "O c #C5C5C5", "P c #DFDFDF", "Q c #444444", "R c #454545", "S c #424242", "T c #EDEDED", "U c #BFBFBF", "V c #C6C6C6", "W c #E3E3E3", "X c #414141", "Y c #EAEAEA", "Z c #E0E0E0", "` c #BABABA", " . c #050505", ".. c #0B0B0B", "+. c #A5A5A5", "@. c #D1D1D1", "#. c #939393", "$. c #020202", "%. c #0A0A0A", "&. c #5F5F5F", "*. c #D9D9D9", "=. c #EBEBEB", "-. c #E9E9E9", ";. c #D4D4D4", ">. c #000000", ",. c #E2E2E2", "'. c #DADADA", "). c #CBCBCB", "!. c #3B3B3B", "~. c #D5D5D5", "{. c #C8C8C8", "]. c #BDBDBD", "^. c #515151", "/. c #C7C7C7", "(. c #CDCDCD", "_. c #B8B8B8", ":. c #030303", "<. c #313131", "[. c #999999", "}. c #BBBBBB", "|. c #B6B6B6", "1. c #909090", "2. c #2B2B2B", "3. c #010101", "4. c #7A7A7A", "5. c #9A9A9A", "6. c #777777", "7. c #3C3C3C", "8. c #686868", "9. c #797979", "0. c #3A3A3A", " ", " . + @ # # # ", " $ % & * = - ; > , ' ", " ) ! = ~ { ] ^ / ( _ : < ", " [ } ~ | 1 2 3 4 5 6 7 8 9 0 ", " a b c d 6 e f g f h e i j k l m ", " n o p 2 q g r r s g h t u v w x ", " y z 7 j e f r A A r s q e B C 1 D E ", " F G H B I q s A A r g h J B C K L M ", " N O P 3 e Q Q R R R Q l S T 6 1 U M ", " x V W u t l Q Q Q Q l S X Y Z d ` . ", " ..+.j 2 T 5 J I I e 4 3 u v 1 @.#.$. ", " %.&.*.j C =.B 3 3 B T -.v 1 ;.~ : >. ", " %.= H K ,.6 C C 2 W P '.;.).* $. ", " M !.c 7 ;.'.1 '.1 H ~.] {.].$ >. ", " .^.k /.).c (.).).{.k _.R >. ", " :.<.[.}.].8 8 8 |.1.2.>.>.>. ", " 3.:.X 4.5.5.6.7.>.>. >.>.>.>. ", " >.>.>.>.>.>. , , >.>. ", " >.8.. >.>. ", " >.9.0.>.>. ", " >.8.n >. ", " >.>. ", " "}; mh-e-8.5/emacs/trunk/etc/images/help.pbm0000644000175000000620000000027112114520723017274 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 0üøÌÌXäp|`8Cú8G†  † ‚ ‚ ‚ ƒ A„ @øXpøxø^èNÈ?ÿ˜þðmh-e-8.5/emacs/trunk/etc/images/delete.pbm0000644000175000000620000000012112114520723017600 0ustar wohlerstaffP4 24 24 ~À𼈠~   <08øÿøoø'ø'ø%ø%ø%ø%ø%ø %øÿàÿ€mh-e-8.5/emacs/trunk/etc/images/contact.pbm0000644000175000000620000000012112114520723017771 0ustar wohlerstaffP4 24 24 ?ÿü@OðPS–ÂWÐTV¢TPUð_ð[ðP°_òÒ@@?ÿþmh-e-8.5/emacs/trunk/etc/images/copy.xpm0000644000175000000620000000213112114520723017341 0ustar wohlerstaff/* XPM */ static char * copy_xpm[] = { "24 24 26 1", " c None", ". c #000000", "+ c #B4B4B4", "@ c #F8F8F8", "# c #F6F6F6", "$ c #C3C3C3", "% c #E9E9E9", "& c #989898", "* c #828282", "= c #8A8A8A", "- c #E8E8E8", "; c #636363", "> c #5A5A5A", ", c #6B6B6B", "' c #B3B3B3", ") c #FFFFFF", "! c #D6D6D6", "~ c #818181", "{ c #A7A7A7", "] c #8F8F8F", "^ c #C6C6C6", "/ c #808080", "( c #E7E7E7", "_ c #6D6D6D", ": c #767676", "< c #F5F5F5", " ", " ", " ", "............. ", ".+@@@@@@@@@#$. ", ".@%%%%%%%%%%%. ", ".@&**=%+*%*+%. ", ".@%%%%%%%%---. ", ".@;>%,*+-............ ", ".@%%%%%%.'))))))))))!. ", ".@&**%*~.)))))))))))). ", ".@%%%%%-.){]]&)^])]^). ", ".@;>>%,/.)))))))))))). ", ".@%%%%%(.)_;):]^)^])). ", ".@&**%*~.)))))))))))). ", ".<%%%%%-.){]])]]^)&]). ", ".$%%%%%-.)))))))))))). ", " ........)_;;):]^)^]). ", " .)))))))))))). ", " .){]])]]^)&]). ", " .)))))))))))). ", " .!))))))))))!. ", " .............. ", " "}; mh-e-8.5/emacs/trunk/etc/images/attach.xpm0000644000175000000620000000551312114520723017642 0ustar wohlerstaff/* XPM */ static char * stock_attach_xpm[] = { "24 24 99 2", " c None", ". c #000000", "+ c #010101", "@ c #515151", "# c #9A9A9A", "$ c #CFCFCF", "% c #6F6F6F", "& c #464646", "* c #A5A5A5", "= c #E2E2E2", "- c #FFFFFF", "; c #F6F6F6", "> c #8A8A8A", ", c #393939", "' c #1C1C1C", ") c #8B8B8B", "! c #E6E6E6", "~ c #EEEEEE", "{ c #E1E1E1", "] c #F8F8F8", "^ c #F7F7F7", "/ c #CCCCCC", "( c #565656", "_ c #3E3E3E", ": c #818181", "< c #D4D4D4", "[ c #E7E7E7", "} c #D7D7D7", "| c #FAFAFA", "1 c #F9F9F9", "2 c #C2C2C2", "3 c #CBCBCB", "4 c #F5F5F5", "5 c #D9D9D9", "6 c #030303", "7 c #545454", "8 c #DEDEDE", "9 c #B3B3B3", "0 c #797979", "a c #F4F4F4", "b c #9D9D9D", "c c #282828", "d c #FBFBFB", "e c #A6A6A6", "f c #C5C5C5", "g c #F0F0F0", "h c #CACACA", "i c #C7C7C7", "j c #F2F2F2", "k c #CECECE", "l c #C4C4C4", "m c #D5D5D5", "n c #DADADA", "o c #F3F3F3", "p c #858585", "q c #BEBEBE", "r c #D3D3D3", "s c #DCDCDC", "t c #9C9C9C", "u c #484848", "v c #A7A7A7", "w c #D6D6D6", "x c #C8C8C8", "y c #C6C6C6", "z c #4C4C4C", "A c #EAEAEA", "B c #E5E5E5", "C c #D8D8D8", "D c #ADADAD", "E c #BCBCBC", "F c #E0E0E0", "G c #F1F1F1", "H c #909090", "I c #686868", "J c #A2A2A2", "K c #C0C0C0", "L c #C1C1C1", "M c #787878", "N c #AEAEAE", "O c #151515", "P c #D0D0D0", "Q c #979797", "R c #727272", "S c #4A4A4A", "T c #ECECEC", "U c #ACACAC", "V c #BABABA", "W c #DDDDDD", "X c #DBDBDB", "Y c #B1B1B1", "Z c #232323", "` c #696969", " . c #B7B7B7", ".. c #828282", "+. c #404040", "@. c #969696", "#. c #323232", "$. c #E8E8E8", "%. c #121212", " ", " . . . . . ", " . . . . ", " . + @ # $ % . ", " . . & * = - - ; > , ", " . ' ) ! ~ { - ] ^ ; / ( ", " . _ : < ' [ } | 1 ] 2 3 4 5 : . ", " 6 7 ! - - - . } 8 9 0 . = ; 4 a b c ", " . ; - - | | d . e f g ] . = 2 h a i ( ", " . j ] 1 k l f . m 1 ] ] . 9 n a o o 0 . ", " p - ] q 1 1 . r s 2 2 . = 4 a o j t c ", " u - ^ ^ ] ] . v w ^ ; . = a l x j y z ", " . A - ; q 2 . B C ; 4 . D E A F G A H . ", " I - 4 ; ; J . K L . M w o j G G m N O ", " , - a 4 4 n # . . 0 w j j G w P Q R S ", " . T - a U V W o k X T } w Y : ( Z . ", " ` - o o o o j j } ...+.Z . . ", " c - o j j } q @.#.Z . ", " . ! $./ # +.Z . . ", " , .., %.. ", " . . ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/save.xpm0000644000175000000620000001132412114520723017331 0ustar wohlerstaff/* XPM */ static char * save_xpm[] = { "24 24 220 2", " c None", ". c #000000", "+ c #C3D7F4", "@ c #A9CDE5", "# c #75757A", "$ c #EFC5BB", "% c #F1C8BE", "& c #F0C6BC", "* c #EEBCB2", "= c #EEBEB5", "- c #EEC1B8", "; c #EDBFB6", "> c #E9B7AD", ", c #E9B8AF", "' c #E9B9B1", ") c #E5BFBA", "! c #737277", "~ c #B3CDE3", "{ c #A1BED6", "] c #BBD6E8", "^ c #8AAAC5", "/ c #605F68", "( c #E08D7E", "_ c #E0826E", ": c #E0806E", "< c #DC7A68", "[ c #DC8171", "} c #DA7868", "| c #D48173", "1 c #D47D6E", "2 c #CE7265", "3 c #CF7264", "4 c #CE7567", "5 c #C4675B", "6 c #C36558", "7 c #626169", "8 c #87A3B7", "9 c #567187", "0 c #BAD5E9", "a c #88A7C3", "b c #686670", "c c #C8817B", "d c #CB7C74", "e c #CB7A73", "f c #CB7B73", "g c #CC7C72", "h c #CB7D73", "i c #BF6B64", "j c #CC7A70", "k c #C16A62", "l c #CC7C73", "m c #C2655B", "n c #C36459", "o c #BA6C6A", "p c #819EB6", "q c #547086", "r c #B6D3E7", "s c #87ABC1", "t c #737373", "u c #FFFFFF", "v c #83A0B8", "w c #526C80", "x c #B9D3E7", "y c #85A4BF", "z c #4F697C", "A c #B9D3E6", "B c #84A3BF", "C c #CECECE", "D c #CDCDCD", "E c #BFBFBF", "F c #88A4BB", "G c #486276", "H c #B7D2E7", "I c #82A0BB", "J c #636363", "K c #465E70", "L c #B5CAE5", "M c #7FA2B9", "N c #87A3BA", "O c #455C6D", "P c #AECCE5", "Q c #7DA0B6", "R c #C5C5C5", "S c #546069", "T c #B0D1E4", "U c #83A1B6", "V c #735B5B", "W c #515C64", "X c #AACEE3", "Y c #7B9BB2", "Z c #7A8E9A", "` c #7A7A7A", " . c #6B6F72", ".. c #6F6F6F", "+. c #696969", "@. c #6F777E", "#. c #86A2B9", "$. c #3A515D", "%. c #A9C9E2", "&. c #7494AF", "*. c #829FB7", "=. c #7F9DB6", "-. c #7E9CB5", ";. c #7998B2", ">. c #85A1B8", ",. c #8CA7BD", "'. c #8AA5BB", "). c #364A59", "!. c #ABC4E2", "~. c #7294AD", "{. c #6F90AC", "]. c #7192AE", "^. c #414A4E", "/. c #424A51", "(. c #525B63", "_. c #626F79", ":. c #5F6C76", "<. c #5C6971", "[. c #5A666F", "}. c #58636B", "|. c #57636A", "1. c #3B5360", "2. c #39424B", "3. c #7897B3", "4. c #A4B9CB", "5. c #364853", "6. c #AAC9E2", "7. c #7091AA", "8. c #6F8FA7", "9. c #4A5359", "0. c #97938C", "a. c #DFDDDA", "b. c #E3E1DE", "c. c #EBEAE8", "d. c #EAE9E7", "e. c #CFCEC9", "f. c #C9C6C0", "g. c #9B968E", "h. c #566168", "i. c #4B657A", "j. c #54738C", "k. c #AAC6DD", "l. c #34464E", "m. c #AAC9E1", "n. c #6C8EA6", "o. c #6C8CA4", "p. c #40474D", "q. c #DAD8D3", "r. c #E7E6E2", "s. c #67655E", "t. c #524F47", "u. c #D9D7D4", "v. c #C7C5BF", "w. c #C0BCB5", "x. c #B8B3AB", "y. c #434C54", "z. c #4D697F", "A. c #4F6F84", "B. c #B3CADC", "C. c #313E49", "D. c #A8C8E1", "E. c #6B8DA6", "F. c #728FA4", "G. c #E2E1DD", "H. c #F0EFEC", "I. c #CDCAC6", "J. c #C2BFB9", "K. c #CAC6C0", "L. c #DCDAD7", "M. c #4B555D", "N. c #4E697F", "O. c #BACCDC", "P. c #A4C4DE", "Q. c #698BA3", "R. c #708AA1", "S. c #383E43", "T. c #E0DEDA", "U. c #514E46", "V. c #4F4C44", "W. c #C7C4BE", "X. c #CBC8C2", "Y. c #E1E0DC", "Z. c #E9E8E6", "`. c #475158", " + c #4E6879", ".+ c #4D6C80", "++ c #A3C3DB", "@+ c #383F43", "#+ c #778999", "$+ c #6E899E", "%+ c #65859C", "&+ c #33383C", "*+ c #D7D4D0", "=+ c #D6D4D0", "-+ c #4E4A43", ";+ c #4D4942", ">+ c #D1CEC9", ",+ c #E6E5E2", "'+ c #EDECEA", ")+ c #454F55", "!+ c #486173", "~+ c #4D6678", "{+ c #A1C1DA", "]+ c #373C40", "^+ c #0C0D0F", "/+ c #4E5E6A", "(+ c #5B6E7C", "_+ c #4F5B62", ":+ c #A4A099", "<+ c #CCC9C3", "[+ c #D7D5D1", "}+ c #E4E2E0", "|+ c #DDDBD7", "1+ c #B8B5B0", "2+ c #3E474D", "3+ c #4A6176", "4+ c #4A6070", "5+ c #9BC3D8", "6+ c #363C41", "7+ c #28323E", " ", " ", " . . . . . . . . . . . . . . . . . . . ", " . + @ # $ % & * = - ; > , > , ' ) ! ~ { . ", " . ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 . ", " . 0 a b c d e f g h i j k l m n o b p q . ", " . r s t u u u u u u u u u u u u u t v w . ", " . x y t u u u u u u u u u u u u u t v z . ", " . A B t C D D D D D D D D D D D E t F G . ", " . H I J u u u u u u u u u u u u u t F K . ", " . L M t u u u u u u u u u u u u u t N O . ", " . P Q t C D D D D D D D D D D D R t N S . ", " . T U V u u u u u u u u u u u u u t v W . ", " . X Y Z ` t t t t t ...t t t t +.@.#.$.. ", " . %.&.p v #.*.=.-.*.;.#.>.>.N *.,.v '.).. ", " . !.~.{.].^./.(._.:.<.[.}.|.(.1.2.3.4.5.. ", " . 6.7.8.9.0.a.b.c.c.d.a.e.f.g.h.i.j.k.l.. ", " . m.n.o.p.q.r.s.t.t.u.v.w.x.e.y.z.A.B.C.. ", " . D.E.F.p.G.H.s.t.t.I.J.w.K.L.M.N.A.O.C.. ", " . P.Q.R.S.T.c.U.V.V.W.w.X.Y.Z.`. +.+++@+. ", " . #+$+%+&+*+=+-+;+;+w.>+,+'+,+)+!+~+{+]+. ", " ^+/+(+_+:+w.x.<+<+[+}+d.|+1+2+3+4+5+6+. ", " . . . . . . . . . . . . . . . . 7+. ", " "}; mh-e-8.5/emacs/trunk/etc/images/open.pbm0000644000175000000620000000027112114520723017305 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 ?€@@@@€`€?à€€ÿü°   € €€øÿðmh-e-8.5/emacs/trunk/etc/images/data-save.pbm0000644000175000000620000000012112114520723020203 0ustar wohlerstaffP4 24 24 ?ÿøH$H,H,H,X,X,\,^,_,^,_ÿìX [ÿÌDìDàìDàìDàìDàì<ìÿømh-e-8.5/emacs/trunk/etc/images/next-page.xpm0000644000175000000620000000533612114520723020271 0ustar wohlerstaff/* XPM */ static char * stock_next_page_xpm[] = { "24 24 92 2", " c None", ". c #000000", "+ c #5B7289", "@ c #FFFFFF", "# c #F2F2F2", "$ c #E5E5E5", "% c #D8D8D8", "& c #CCCCCC", "* c #B0B0B0", "= c #8B8B8B", "- c #6A6A6A", "; c #494949", "> c #888888", ", c #C9C9C9", "' c #E3E3E3", ") c #EEEEEE", "! c #E6E6E6", "~ c #DEDEDE", "{ c #D6D6D6", "] c #ADADAD", "^ c #556D85", "/ c #47617B", "( c #BFBFBF", "_ c #B2B2B2", ": c #ACACAC", "< c #A6A6A6", "[ c #F6F6F6", "} c #384F66", "| c #3A5067", "1 c #DADADA", "2 c #3A5168", "3 c #D3D3D3", "4 c #3B5269", "5 c #47617C", "6 c #3D526A", "7 c #48627D", "8 c #B6B6B6", "9 c #959595", "0 c #7C7C7C", "a c #616161", "b c #464646", "c c #262626", "d c #C5C5C5", "e c #3E546A", "f c #49637D", "g c #3F556B", "h c #4B647E", "i c #40566C", "j c #4C647F", "k c #41576D", "l c #4C657F", "m c #42586E", "n c #4E6780", "o c #44586F", "p c #4F6881", "q c #B5B5B5", "r c #45596F", "s c #506982", "t c #77838F", "u c #9C9FA1", "v c #91969C", "w c #91979C", "x c #92979C", "y c #92979D", "z c #A2A3A4", "A c #9D9FA2", "B c #8F9296", "C c #8F9396", "D c #8F9397", "E c #909397", "F c #868788", "G c #465B70", "H c #526A83", "I c #3E5975", "J c #3F5A76", "K c #415B77", "L c #425C78", "M c #435E79", "N c #445F7A", "O c #46607B", "P c #68727D", "Q c #7D8185", "R c #616A73", "S c #3B4F63", "T c #3C5064", "U c #3C5065", "V c #3E5166", "W c #3F5266", "X c #405367", "Y c #405468", "Z c #344353", "` c #2F4050", " ", " ", " . . . . . . . . . . . . . . . . ", " . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ . ", " . / @ # $ % & ( _ : < @ @ [ ) ! ~ { _ } . ", " . / @ # $ % & ( _ : < @ ' [ ) ! ~ { _ | . ", " . / @ # $ % & ( _ : < @ . 1 ) ! ~ { * 2 . ", " . / @ # $ % & ( _ : < @ . . 3 ! ~ { * 4 . ", " . 5 @ # $ % & ( _ : < @ . . . & ~ { * 6 . ", " . 7 @ # $ 8 9 0 a b c . . . . . d { * e . ", " . f @ # $ % & ( _ : < @ . . . & ~ { * g . ", " . h @ # $ % & ( _ : < @ . . 3 ! ~ { * i . ", " . j @ # $ % & ( _ : < @ . 1 ) ! ~ { * k . ", " . l @ # $ % & ( _ : < @ ' [ ) ! ~ { * m . ", " . n @ # $ % & ( _ : < @ @ [ ) ! ~ { * o . ", " . p @ # $ % & ( _ : < @ @ [ ) ! ~ { q r . ", " . s t u v w x y y z < A B C C D D E F G . ", " . H I J K L M N O P Q R S T U V W X Y Z . ", " . . . . . . . . . ` . . . . . . . . . . ", " . . . ", " ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/left-arrow.pbm0000644000175000000620000000027112114520723020426 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 (Hð0ÿðÿðÿðÿðx8mh-e-8.5/emacs/trunk/etc/images/paste.xpm0000644000175000000620000000401312114520723017504 0ustar wohlerstaff/* XPM */ static char * paste_xpm[] = { "24 24 89 1", " c None", ". c #000000", "+ c #B9B9B9", "@ c #FEFEFE", "# c #F9F9F9", "$ c #757575", "% c #F5F5E8", "& c #565651", "* c #FFFFFF", "= c #A0A0A0", "- c #939393", "; c #7C7C7C", "> c #C5C5BB", ", c #CFC6A0", "' c #D7CEAA", ") c #ADA689", "! c #4B483C", "~ c #6D6D6D", "{ c #6C6C6C", "] c #A9A9A9", "^ c #3D3A30", "/ c #979178", "( c #C1B898", "_ c #8A793D", ": c #C3BB9A", "< c #AFA78A", "[ c #444236", "} c #FAFAFA", "| c #EFEFEF", "1 c #C7C7C7", "2 c #D8D8D8", "3 c #D2D2D2", "4 c #7B7B7B", "5 c #302E26", "6 c #89846C", "7 c #C4BC9A", "8 c #847235", "9 c #C5C5C5", "0 c #A7A7A7", "a c #ADADAD", "b c #9A9A9A", "c c #9B9B9B", "d c #868686", "e c #424242", "f c #847033", "g c #C9C09E", "h c #464337", "i c #35332A", "j c #2D2B23", "k c #C6BE9D", "l c #826F33", "m c #7F7964", "n c #4C493C", "o c #171612", "p c #13120F", "q c #3E3B31", "r c #282210", "s c #474438", "t c #B3B3B3", "u c #D6D6D6", "v c #B7AE90", "w c #B1AA8C", "x c #37352B", "y c #151410", "z c #8F8F8F", "A c #989898", "B c #C6C6C6", "C c #B9B293", "D c #11100D", "E c #434035", "F c #636363", "G c #767676", "H c #AAA48B", "I c #A5A086", "J c #A19A7F", "K c #312F26", "L c #AFA88C", "M c #050403", "N c #12110E", "O c #A9A489", "P c #A39E85", "Q c #EBE7D0", "R c #D2C9A5", "S c #A29053", "T c #8E7C3D", "U c #88793B", "V c #806C2F", "W c #78652B", "X c #251F0C", " .... ", " ......+@#$...... ", ".%%%%%&*=-;&>%%%,. ", ".%''')!*~{]^/(''_. ", ".%::<[}|123456<78. ", ".%''!900abcde!)'f. ", ".%g:6hijjjjj56 c #CCE5C8", ", c #CDE6C9", "' c #CFE7CB", ") c #F3FFF2", "! c #7FA879", "~ c #689063", "{ c #CDE5C9", "] c #CFE7CA", "^ c #D0E9CC", "/ c #D4EAD0", "( c #D5ECD1", "_ c #AED5A9", ": c #9ABC95", "< c #63865F", "[ c #2B3A29", "} c #8CB887", "| c #70986A", "1 c #71986B", "2 c #729A6B", "3 c #759C6D", "4 c #759F6F", "5 c #76A170", "6 c #567453", "7 c #AFCBAC", "8 c #7EAB77", "9 c #78A472", "0 c #6F9669", "a c #70976A", "b c #71996B", "c c #739B6D", "d c #759F6E", "e c #77A170", "f c #526F4C", "g c #B7D2B2", "h c #60835B", "i c #A5C9A0", "j c #9AC195", "k c #4F6B4C", "l c #769F70", "m c #516D4C", "n c #B9D5B4", "o c #7BA574", "p c #C7E0C3", "q c #6D9568", "r c #51714E", "s c #B6D3B2", "t c #81AB7C", "u c #C3DBBF", "v c #6B9265", "w c #C8EFC3", "x c #A7CCA2", "y c #B5D2B1", "z c #80A87A", "A c #90B68B", "B c #79A674", "C c #C6EAC1", "D c #DEF7D9", "E c #B3D7AE", "F c #BBD9B8", "G c #AFCCAB", "H c #749E6D", "I c #5B7B57", "J c #8CB087", "K c #BBE1B6", "L c #DAF5D6", "M c #E1F7DD", "N c #DCF4D6", "O c #D7F0D3", "P c #CFECCB", "Q c #C6E3C3", "R c #BCD6B9", "S c #7EA778", "T c #64885F", "U c #A6C1A3", "V c #B3D5AE", "W c #CDEAC9", "X c #D0EBCB", "Y c #CAE9C5", "Z c #C7E6C3", "` c #C3E3BF", " . c #BDDCBA", ".. c #B5D2B2", "+. c #96B991", "@. c #76A071", "#. c #3A4E37", "$. c #5E7F5A", "%. c #8FAF8B", "&. c #9CBE97", "*. c #C7E0C4", "=. c #CBE3C6", "-. c #CDE4C9", ";. c #CBE4C8", ">. c #C7E1C4", ",. c #C2DBBF", "'. c #88AF82", "). c #6B9266", "!. c #557451", "~. c #63885E", "{. c #759C70", "]. c #749E6F", "^. c #72996B", "/. c #739A6D", "(. c #71996C", "_. c #6E9668", ":. c #6C9367", "<. c #5F815A", "[. c #70996B", "}. c #6E9467", "|. c #698F63", "1. c #6B9166", "2. c #5D8059", "3. c #4D6A49", "4. c #6A8F64", "5. c #283926", " . ", " . . ", " . + . ", " . . . . @ # . ", " $ % & @ @ * * = . . . ", " - ; @ @ * * > , ' ) . . ! ~ . ", " . % @ * * > { ] ^ / ( _ . . : < . ", " [ & @ } | 1 2 3 4 5 6 . . 7 . ", ". 8 @ 9 0 a b c d e f . . g h . ", ". i j 0 k . . . l m . . . n o . ", ". p q h . . r . . . . s t . ", ". u v . . . . w . . x y z . ", ". A B . . . C D . . . E F G H . ", ". I J . . K L M N O P Q R S T . ", " . U . . V W X Y Z ` ...+.@.#.. ", " . $.%.. . &.*.=., -.;.>.,.'.).!.. ", " . ~.{.. . ].^.c /.(.| _.:.<.. . ", " . . . [.}.|.~ 1.2.3.. . ", " . q 4.. . . . ", " 5.).. ", " . . ", " . ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/attach.pbm0000644000175000000620000000012112114520723017602 0ustar wohlerstaffP4 24 24 |‚À†`° € €0„@„@„„ „ „H0 8àxÀmh-e-8.5/emacs/trunk/etc/images/next-page.pbm0000644000175000000620000000012112114520723020226 0ustar wohlerstaffP4 24 24 ?Çø`0 ` ` ` ` ` `Œ` ` ` ` ` ` ` ïü?ÿü8mh-e-8.5/emacs/trunk/etc/images/open.xpm0000644000175000000620000000774412114520723017347 0ustar wohlerstaff/* XPM */ static char * open_xpm[] = { "24 24 173 2", " c None", ". c #000000", "+ c #010100", "@ c #B5B8A5", "# c #E4E7D2", "$ c #878A76", "% c #33342B", "& c #0B0B0B", "* c #E2E5CF", "= c #CFD4AF", "- c #CED3AE", "; c #B2B696", "> c #2D2D25", ", c #23241D", "' c #9D9F90", ") c #C6CAA6", "! c #C4C9A5", "~ c #C6CBA7", "{ c #C7CCA8", "] c #C9CEA9", "^ c #555847", "/ c #1A1B15", "( c #20201A", "_ c #D4D6C2", ": c #BEC2A0", "< c #B3B896", "[ c #B0B595", "} c #B3B797", "| c #B6BB99", "1 c #BBC09E", "2 c #BCC19F", "3 c #81856C", "4 c #3E3F32", "5 c #010101", "6 c #DADDC8", "7 c #AFB494", "8 c #AAAF8F", "9 c #A3A789", "0 c #A6AA8B", "a c #A9AD8E", "b c #A7AB8D", "c c #A4A88A", "d c #A1A588", "e c #AAAD96", "f c #B3B5A5", "g c #B8BBAA", "h c #BABCAB", "i c #C1C3B2", "j c #C7CAB7", "k c #CACDBB", "l c #BABDA8", "m c #0C0C09", "n c #DDDFCB", "o c #969B7E", "p c #9DA286", "q c #95987C", "r c #96997E", "s c #9A9D81", "t c #999D80", "u c #9DA184", "v c #A5AA8B", "w c #A4A98A", "x c #A3A889", "y c #A2A588", "z c #A2A587", "A c #9FA386", "B c #9B9E83", "C c #898D74", "D c #D8DBC9", "E c #84866E", "F c #7D8169", "G c #151612", "H c #D7DAC9", "I c #797D67", "J c #3D3F34", "K c #E0E0D9", "L c #EBEDDD", "M c #E8EBD9", "N c #E7EAD8", "O c #E3E6D4", "P c #DEE1D0", "Q c #DADCCC", "R c #DADCD1", "S c #2B2C28", "T c #D7DAC6", "U c #6F735E", "V c #0D0D0D", "W c #F4F4EC", "X c #CACFAB", "Y c #C6CBA8", "Z c #C2C6A4", "` c #ABB091", " . c #23251E", ".. c #494B3D", "+. c #DCDCD4", "@. c #EAECDD", "#. c #CDD2AD", "$. c #CCD1AC", "%. c #CACFAA", "&. c #BABF9D", "*. c #B5B999", "=. c #81836C", "-. c #070806", ";. c #D5D8C4", ">. c #161616", ",. c #F2F2EA", "'. c #C9CEAA", "). c #C8CDA9", "!. c #C4C9A6", "~. c #C1C5A3", "{. c #BCC09F", "]. c #B6BB9A", "^. c #B0B494", "/. c #9DA185", "(. c #535445", "_. c #B6B8A7", ":. c #747470", "<. c #ECECE2", "[. c #C3C8A5", "}. c #C2C7A4", "|. c #C0C5A2", "1. c #BFC4A1", "2. c #BDC2A0", "3. c #B9BD9C", "4. c #B9BE9D", "5. c #A9AD8F", "6. c #A3A78A", "7. c #80836D", "8. c #020201", "9. c #A6A998", "0. c #B8BC9B", "a. c #AFB394", "b. c #ACB091", "c. c #A8AC8E", "d. c #A6AA8C", "e. c #9FA286", "f. c #9B9F83", "g. c #9A9D82", "h. c #8A8D75", "i. c #4F5243", "j. c #070705", "k. c #9E9F91", "l. c #E5E6DA", "m. c #ADB192", "n. c #A5A98C", "o. c #9FA387", "p. c #999D81", "q. c #95987E", "r. c #92957B", "s. c #8C8F76", "t. c #8A8D74", "u. c #71735F", "v. c #080908", "w. c #E3E5D9", "x. c #C0C3AF", "y. c #94987C", "z. c #8F9379", "A. c #8B8F75", "B. c #8A8E74", "C. c #888C73", "D. c #858970", "E. c #868971", "F. c #82866E", "G. c #80836C", "H. c #7D8069", "I. c #797C66", "J. c #727560", "K. c #717460", "L. c #71745F", "M. c #6A6D59", "N. c #434538", "O. c #080907", "P. c #050504", " ", " ", " ", " . . . . . . . ", " + @ # # # # # $ % ", " & * = = = - - ; > ", ", ' * ) ! ~ { ] ] ^ / ", "( _ : < [ } | 1 2 3 4 5 . . . . . . . ", ", 6 7 8 9 0 8 a b c d e f g h i j k l . ", "m n o p q r s t r u v w x y 9 z A B C . ", ". D E F G . . . . . . . . . . . . . . . 5 5 ", ". H I J K L M M M M M M M M M M M N O P Q R S ", ". T U V W = = = = = = = = = - - - X Y Z 1 ` . ", ". T ..+.@.#.- - #.- #.#.#.#.#.$.%.Y Z &.*.=.-. ", ". ;.>.,.X %.X %.'.%.'.{ ).).Y !.~.{.].^./.(.m ", ". _.:.<.[.}.}.Z |.Z 1.2.|.2.3.4.} [ 5.6.7.8. ", ". 9.+.0.0.*.} } [ [ a.a.a.b.c.d.e.f.g.h.i.j. ", ". k.l.m.5.d.n.6.6.d o.e.f.p.q.r.s.t.t.u.v. ", ". w.x.y.z.A.B.C.C.D.E.F.G.H.I.J.K.L.M.N.O. ", " . . . . . . . . . . . . . . . . . . P. ", " ", " ", " ", " "}; mh-e-8.5/emacs/trunk/etc/images/undo.pbm0000644000175000000620000000027112114520723017311 0ustar wohlerstaffP4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 24 24 ` <€À@¼@ì@f@"@@€€ mh-e-8.5/ChangeLog0000644000175000000620000006672612114520723013164 0ustar wohlerstaff2013-03-02 Bill Wohler Release MH-E version 8.5. * README: Update for release 8.5. 2012-11-26 Bill Wohler * release-utils (tag): Ignore errors when unbinding unbound branches. 2012-11-25 Bill Wohler Release MH-E version 8.4. * README: Update for release 8.4. 2012-11-24 Bill Wohler * test-mh-e: Use EMACS_SRC environment variable to override default emacs/trunk branch (with emacs/mh-e, for example). Use it within the rest of the script and pass it to make. * mh-unit.el: Update copyright. (mh-unit): Use EMACS_SRC environment variable to override default emacs/trunk branch (with emacs/mh-e, for example). (mh-unit-test-x-image-url-cache-canonicalize): Update expected strings for Emacs 24. It appears that url-hexify-string now converts ! to %21 and uses capital letters for hexadecimal digits. 2011-11-20 Bill Wohler Release MH-E version 8.3.1. * README: Update for release 8.3.1. 2011-09-19 Bill Wohler Release MH-E version 8.3. * README: Update for release 8.3. 2011-07-17 Bill Wohler Release MH-E version 8.2.93. * README: Update for release 8.2.93. * test-mh-e: Add script used for testing MH-E. 2011-07-16 Bill Wohler Release MH-E version 8.2.92. * README: Update for release 8.2.92. * mh-xemacs.el (mh-modeline-glyph): Update glyph so that it does not cause errors on terminal window even when created on a window system. Thanks to Henrique Martins and Mike Kupfer. 2011-07-13 Bill Wohler * mh-xemacs.el (mh-modeline-glyph): Revert previous change since it didn't help on XEmacs. 2011-07-11 Bill Wohler Release MH-E version 8.2.91. * README: Update for release 8.2.91. * mh-xemacs.el (mh-modeline-glyph): Don't define in terminal windows to avoid errors. Thanks to Henrique Martins. * README: Add trunk to `load-path.' Thanks to Henrique Martins. 2011-07-10 Bill Wohler Release MH-E version 8.2.90. * README: Update for release 8.2.90. * COPYING, Makefile, mh-unit.el, mh-xemacs.el, release-utils: Update to GNU GPL version 3, use date ranges in copyright. * release-utils (tag): Remove errant @ character. Call bzr unbind before bzr bind, since bzr bind fails if branch already bound. 2011-07-09 Bill Wohler * mh-unit.el: Use eval-and-compile instead of eval-when-compile since mh-require-cl is needed at evaluation time too. (mh-unit): Append trunk to emacs paths. (mh-unit-construct-call-graph) (mh-unit-test-normalize-folder-name) (mh-unit-test-sub-folders-actual) (mh-unit-test-sub-folders): Use OK at end of message instead of done. (mh-unit-test-folder-completion-function): Update tests per Stefan's recent changes to MH-E's folder completion. (mh-unit-equal): Display expected string first to be consistent with JUnit, for example. 2011-07-04 Bill Wohler * release-utils (tag): Explicitly bind to branch so that tag affects upstream branch. 2011-07-03 Bill Wohler * Makefile: Put all copyrights written to files in ranges and add 2011 to range. 2011-07-02 Bill Wohler * release-utils (distCheck): Remove debugging code. Use -ne in comparison of numbers. 2011-06-26 Bill Wohler * README: Replace references to CVS with Bazaar. * release-utils (dist, tag, variable_changes): Update from cvs to Bazaar. * Makefile (CVSROOT, CVSLOGIN, CVSMETHOD) Replace with URL and DEV_URL. (MH_E_SRC, MH_E_SRC_NONCOMPILED, MH_E_LOADDEFS) (MH_E_AUTOLOADS, MH_E_CUSTOM_LOAD, MH_E_IMG, MH_E_ETC) (MH_E_MAINT): Define and use EMACS_SRC for emacs/trunk. (emacs, emacs-devel): Use bzr instead of cvs. (tag, dist): Update args for release-utils --tag. (backup): Remove. Obsolete. 2009-06-13 Bill Wohler Release MH-E version 8.2. * README: Update for release 8.2. 2008-08-18 Bill Wohler Release MH-E version 8.1. * README: Update for release 8.1. 2006-11-13 Bill Wohler * mh-unit.el (mh-unit-test-x-image-url-cache-canonicalize): Add test for invalid Window characters (closes SF #1396499). 2006-11-12 Bill Wohler Release MH-E version 8.0.3. * README: Update for release 8.0.3. * mh-unit.el (mh-unit-test-x-image-url-cache-canonicalize): Hex equivalents now use lowercase. 2006-07-03 Bill Wohler Release MH-E version 8.0.2. * README: Update for release 8.0.2. 2006-07-03 Bill Wohler * mh-xemacs.el: (mh-icon-image): New function. Returns XPM from icon file. (mh-xemacs-icon-list): New constant. List of icons used by MH-E. (mh-xemacs-icon-map): Initialize in place, using mh-icon-image to read images from icon files. (mh-modeline-glyph): Use mh-logo file instead of mh-modeline-logo constant. (mh-modeline-logo, mh-xemacs-attach-icon, mh-xemacs-close-icon) (mh-xemacs-copy-icon, mh-xemacs-cut-icon) (mh-xemacs-execute-icon, mh-xemacs-fld-open-icon) (mh-xemacs-help-icon, mh-xemacs-highlight-icon) (mh-xemacs-left-arrow-icon, mh-xemacs-mail-icon) (mh-xemacs-mail-alias-icon, mh-xemacs-mail-compose-icon) (mh-xemacs-mail-refile-icon, mh-xemacs-mail-repack-icon) (mh-xemacs-mail-reply-icon, mh-xemacs-mail-reply-all-icon) (mh-xemacs-reply-from-icon, mh-xemacs-reply-to-icon) (mh-xemacs-mail-send-icon, mh-xemacs-page-down-icon) (mh-xemacs-paste-icon, mh-xemacs-preferences-icon) (mh-xemacs-refresh-icon, mh-xemacs-right-arrow-icon) (mh-xemacs-save-icon, mh-xemacs-search-icon) (mh-xemacs-show-icon, mh-xemacs-spell-icon, mh-xemacs-undo-icon) (mh-xemacs-widen-icon): Delete. * Makefile (MH_E_IMG): Add save.pbm and save.xpm. 2006-07-03 Ted Phelps (tiny change) (mh-xemacs-unknown-icon): New icon. Used if icons can't be found. 2006-06-20 Bill Wohler Release MH-E version 8.0.1. * README: Update for release 8.0.1. 2006-06-20 Bill Wohler * README: Depend on GNU mailutils 1.0 (not yet released) and higher due to a bug in folder. 2006-05-06 Bill Wohler Release MH-E version 8.0. * README: Update for release 8.0. 2006-05-05 Bill Wohler * release-utils (variable_changes): Fix handling of defcustoms that don't start in the first column. Add faces. 2006-04-28 Bill Wohler Release MH-E version 7.95. * README: Update for release 7.95. 2006-04-21 Bill Wohler Release MH-E version 7.94. * README: Update for release 7.94. 2006-04-18 Bill Wohler * Makefile (custom-deps): Load mh-e in order to provide defcustom-mh, defgroup-mh, and defface-mh to [Cc]ustom-make-dependencies. This was necessary to bring back the the MH-E customization groups in mh-cus-load.el which disappeared when the macros above were introduced. (EMACS_OPTIONS): Add emacs/lisp/mh-e to load-path. Needed by custom-deps on Emacs 21. 2006-04-17 Bill Wohler * mh-unit.el (mh-test-rel-folder, mh-test-abs-folder) (mh-test-folders-set-up, mh-test-folders-tear-down) (mh-unit-test-sub-folders-actual) (mh-unit-test-sub-folders) (mh-unit-test-folder-completion-function): New unit tests to test mh-sub-folders-actual, mh-sub-folders, and mh-folder-completion-function. (mh-unit-test-normalize-folder-name, mh-unit-equal): Checkdoc fix. (mh-unit-test-sub-folders-actual, mh-unit-test-sub-folders): Fix order of lists in expected output. 2006-04-09 Mark D. Baushke * Makefile (MH_E_TMP): Extend need for workaround past Emacs 21. (all): Change 'true' to ':' on arg to recursive make for efficiency. (MH_E_LOADDEFS_HEADER): Append \n for use with printf. (MH_E_AUTOLOADS_HEADER): Ditto. (MH_E_LOADDEFS_FOOTER): Use \f instead of literal 0xc (Control-L). (MH_E_AUTOLOADS_FOOTER, MH_E_CUSTOM_LOAD_FOOTER): Ditto ($(MH_E_LOADDEFS)): Replace 'echo -e' with more portable printf. Replace sed expression with printf and cat combination for portability. ($(MH_E_AUTOLOADS)): Simplify if $(XEMACS) expression. Use printf and cat to replace non-portable sed command. (MH_E_CUSTOM_LOAD_HEADER): Append \n for use with printf. ($(MH_E_CUSTOM_LOAD)): Use sed, and printf to replace non-portable sed command. (Closes SF #1467222). 2006-03-28 Bill Wohler * Makefile (MH_E_IMG): Add emacs/etc/images/attach.xpm, emacs/etc/images/contact.pbm, emacs/etc/images/contact.xpm, emacs/etc/images/data-save.pbm, emacs/etc/images/data-save.xpm, emacs/etc/images/delete.pbm, emacs/etc/images/delete.xpm, emacs/etc/images/mail/flag-for-followup.pbm, emacs/etc/images/mail/flag-for-followup.xpm, emacs/etc/images/mail/inbox.pbm, emacs/etc/images/mail/inbox.xpm, emacs/etc/images/mail/move.pbm, emacs/etc/images/mail/move.xpm, emacs/etc/images/next-page.pbm, emacs/etc/images/next-page.xpm, emacs/etc/images/open.pbm, emacs/etc/images/open.xpm, emacs/etc/images/zoom-out.pbm, emacs/etc/images/zoom-out.xpm. Remove emacs/etc/images/close.pbm, emacs/etc/images/close.xpm, emacs/etc/images/execute.pbm, emacs/etc/images/execute.xpm, emacs/etc/images/fld-open.pbm, emacs/etc/images/fld-open.xpm, emacs/etc/images/highlight.pbm, emacs/etc/images/highlight.xpm, emacs/etc/images/mail.pbm, emacs/etc/images/mail.xpm, emacs/etc/images/mail/alias.pbm, emacs/etc/images/mail/alias.xpm, emacs/etc/images/mail/refile.pbm, emacs/etc/images/mail/refile.xpm, emacs/etc/images/page-down.pbm, emacs/etc/images/page-down.xpm, emacs/etc/images/widen.pbm, emacs/etc/images/widen.xpm. 2006-03-09 Bill Wohler * Makefile (MH_BACKUP_DIR, MH_DIRS, MH_FILES, backup): New variables and target used to back up CVS files at Savannah. 2006-03-05 Bill Wohler Release MH-E version 7.93. * README: Update for release 7.93. 2006-03-04 Bill Wohler * mh-unit.el (mh-unit-test-normalize-folder-name): Add. 2006-03-03 Bill Wohler * README (ADDITIONAL INFORMATION): Mention MH-E documentation package. Fix URL to online manual. * release-utils (variable_changes): Defcustoms now in mh-e.el. 2006-03-02 Bill Wohler * mh-unit.el (mh-unit-test-x-image-url-cache-canonicalize): Require mh-xface instead of mh-utils since the function moved. (mh-unit-test-quote-pick-expr): Add. 2006-02-27 Bill Wohler * Makefile (MH_E_CUSTOM_LOAD_FOOTER): Remove extra semicolon from End. 2006-02-18 Bill Wohler * Makefile (INSTALL): Add -m 644. (install-maint): Insert form feed ^L to keep local variable mechanism from finding local variables in the various targets. Clarify error message. 2006-02-18 Bill Wohler Release MH-E version 7.92. * README: Update for release 7.92. 2006-02-16 Bill Wohler * mh-unit.el (mh-unit): Set checkdoc-max-keyref-before-warn to 12 before calling checkdoc since we're over the default limit of 10. Rendering mh-search (the function with lots of functions in the docstrings) is still really fast. 2006-02-15 Bill Wohler * Makefile: (MH_E_TMP): New variable that contains name of temporary file. (loaddefs, autoloads, custom_deps): Use temporary file instead of sed -i. The -i (--inplace) option was probably introduced in sed 4.0 on 2002-10-23. As long as we support Emacs 21, which was first released in 2001-10-24, we should support other packages which existed at the time. When we drop Emacs 21 support, we can use sed -i (closes SF #1432060). (dist): Drop autoloads target as this is now part of the Emacs target. 2006-02-08 Jeffrey C Honig * Makefile (INSTALL, .PHONY, install-maint): Add install-maint target for developers to use to install compiled files and images for testing. 2006-02-03 Bill Wohler Release MH-E version 7.91. * README: Update for release 7.91. 2006-02-02 Bill Wohler Release MH-E version 7.90. * README: Update for release 7.90. 2006-02-01 Bill Wohler * README (INSTALL, CVS MH-E INSTALL): Move note about XEmacs users needing to add the top of the tree to their load-path to INSTALL since it is applicable there too. * Makefile (MH_E_IMG): Removed copies of page-down.pbm, page-down.xpm, undo.pbm, and undo.xpm. * mh-xemacs.el (mh-xemacs-compiling-flag): Move to mh-e.el and rename to mh-compiling-flag. (require, cancel-timer, display-color-cells) (line-beginning-position, line-end-position) (match-string-no-properties, replace-regexp-in-string) (view-mode-enter): Move definition to mh-compat.el and add mh- prefix since compatibility functions should have our package prefix (mh-) by Emacs convention and to avoid messing up checks for the same functions in other packages. 2006-01-29 Bill Wohler * Makefile (MH_E_SRC): Move mh-acros.el to MH_E_SRC_NONCOMPILED. Add mh-folder.el, mh-letter.el, mh-limit.el, mh-scan.el, mh-show.el, mh-thread.el, mh-tool-bar.el, mh-xface.el. Remove mh-customize.el, mh-exec.el, mh-init.el. (MH_E_SRC_NONCOMPILED): Add mh-acros.el and mh-compat.el. (EMACS_EXPORT_MH_AUTOLOADS): Change autoload-package-name to mh. (Emacs): Add autoloads and custom-deps since the former is mandatory now. (MH_E_LOADDEFS_HEADER) (MH_E_AUTOLOADS_HEADER, MH_E_AUTOLOADS_FOOTER) (MH_E_CUSTOM_LOAD_HEADER, MH_E_CUSTOM_LOAD_FOOTER): Minor cosmetic tweaks. (CVSMETHOD): Inline comment causes spaces to be inserted on substitution which causes error in emacs target. * README (INSTALL): Fix docs for mh-autoloads (required by Emacs 21 users). Mention mh-cus-load. * mh-unit.el (mh-unit-files): Add mh-autoloads.el, mh-compat.el, mh-cus-load.el, mh-folder.el, mh-letter.el, mh-limit.el, mh-scan.el, mh-show.el, mh-thread.el, mh-tool-bar.el, mh-xface.el. Remove mh-customize.el, mh-init.el. * mh-xemacs.el: (mh-acros): Don't require it, since this file doesn't use anything from it. (mh-xemacs-compiling-flag): New variable. (display-color-cells): Fix compile error by replacing defalias with defsubst that doesn't call device-color-cells when mh-xemacs-compiling-flag is t. (require): Add function to provide a noerror argument. (view-mode-enter): Add defsubst. 2006-01-27 Bill Wohler * release-utils (ver): Bumped to 1.2. (variable_changes): Updated to new paths for Emacs repository. 2006-01-25 Mark D. Baushke * Makefile ($(MH_E_LOADDEFS)): FreeBSD 4.10 has problems with inplace stream editing with a bare -i switch unless -e is present. ($(MH_E_AUTOLOADS): Ditto. ($(MH_E_CUSTOM_LOAD)): Ditto. 2006-01-16 Bill Wohler * Makefile (MH_E_SRC): Add mh-exec.el. 2006-01-12 Bill Wohler * Makefile (MH_E_SRC): Replace mh-index.el and mh-pick.el with mh-search.el. * mh-unit.el (mh-unit-files): Ditto. 2006-01-11 Bill Wohler * mh-unit.el (mh-unit-files): Add mh-buffers.el. (mh-unit-equal): Add label argument. (mh-unit-test-pick-args-list): Use it. (mh-unit-test-x-image-url-cache-canonicalize): Use it. Also updated expected output now that the function uses url-hexify-string. * Makefile (MH_E_SRC): Add mh-buffers.el. * mh-xemacs.el: Sort aliases. (replace-regexp-in-string): Add defsubst for replace-in-string. 2006-01-09 Bill Wohler * README (INTRODUCTION): Remove Emacs 20 support. 2006-01-08 Bill Wohler * README (CVS MH-E INSTALL): Mention that XEmacs users will have to add the src directory to their load-path as well. * Makefile: Clean up and fix compilation on XEmacs (closes #1127595). Makefile now creates mh-loaddefs.el, mh-autoloads.el, and mh-cus-load.el on both GNU Emacs and XEmacs using the same targets (loaddefs, autoloads, and custom-deps respectively). The compilation of the files works again (after the directory reorganization), but a couple of pesky compilation errors remain. At least the .el files load and run! (MH_E_CUSTOM_DEPS): Add. (MH_E_AUTOGEN): Add MH_E_CUSTOM_DEPS to it. (EMACS_EXPORT_MH_LOADDEFS): Move command to autoloads target. Add setting of autoload-package-name for XEmacs. Now used by both GNU Emacs and XEmacs. (EMACS_EXPORT_MH_AUTOLOADS): Add. Used in same fashion as EMACS_EXPORT_MH_LOADDEFS (which is used in the creation of mh-loeddefs.el) to create mh-autoloads.el. (XEMACS_OPTIONS): Replace --no-autoloads and --eval (push default-directory load-path) which both broke compile with --vanilla and added both "." and "emacs/lisp/mh-e" to load-path. (AUTOLOAD_PACKAGE_NAME): Delete. Moved code to EMACS_EXPORT_MH_LOADDEFS and EMACS_EXPORT_MH_AUTOLOADS. (AUTOLOAD_FILE): Delete. Use MH_E_AUTOLOADS. (XEMACS_EXPORT_MH_LOADDEFS): Delete. Broken. EMACS_EXPORT_MH_LOADDEFS now works on XEmacs too. (all): Delete passing of XEMACS_EXPORT_MH_LOADDEFS to make now that EMACS_EXPORT_MH_LOADDEFS supports XEmacs. Delete passing of MH_E_LOADDEFS_SRC since target uses directory, not actual files. It's also unlikely that mh-xemacs.el will contain functions that need to be autoloaded since the file is required when necessary. (Emacs): Depend on loaddefs, not autoloads. (MH_E_LOADDEFS_HEADER, MH_E_LOADDEFS_FOOTER): XEmacs fix. (loaddefs): Rename from loaddefs since it is really used to create mh-loaddefs.el. Move -f batch-update-autoloads here from EMACS_EXPORT_MH_LOADDEFS to be consistent with compile target as well as being easier to read and understand. XEmacs fix. Works for both GNU Emacs and XEmacs. (MH_E_AUTOLOADS_HEADER, MH_E_AUTOLOADS_FOOTER): Add. Parallel with MH_E_LOADDEFS_HEADER, MH_E_LOADDEFS_FOOTER. (autoloads): New target that depends on MH_E_AUTOLOADS. Use MH_E_AUTOLOADS_HEADER and MH_E_AUTOLOADS_FOOTER. Use EMACS_EXPORT_MH_AUTOLOADS when compiling. Works on both GNU Emacs and XEmacs. (xemacs): Drop clean, custom-load.elc, auto-autoloads.elc. Rename autoloads to loaddefs. (clean-xemacs): Rename to double-colon target clean. Remove custom-load.el as this has been added to MH_E_AUTOGEN and is cleaned elsewhere. (MH_E_CUSTOM_LOAD_HEADER, MH_E_CUSTOM_LOAD_FOOTER): Add. Used to create custom-load.el. Parallel with MH_E_LOADDEFS_HEADER, MH_E_LOADDEFS_FOOTER. (auto-autoloads.elc): Removed. Now built by common autoloads. (custom-deps) Renamed from custom-load.elc. Don't bother compiling. Add header and footer. Works with both GNU Emacs and XEmacs. (compile-xemacs): Compile $? (like compile target), not $^, whatever that is. (dist): Use autoloads instead of MH_E_AUTOLOADS. * mh-xemacs.el: Deleted all of the unnecessary requires, autoloads, and defvars at the top. (display-color-cells): Add alias to device-color-cells. (define-behavior): fboundp should be on define-behavior, not define-behavior-group. Wrap in eval-when-compile to avoid compiler error. (mh-modeline-glyph): Remove mh-do-in-xemacs wrapper. Unnecessary as this file is only loaded if you are in XEmacs. (mh-xemacs-compose-insertion-icon) (mh-xemacs-fully-kill-draft-icon, mh-xemacs-letter-help-icon): Unused. Delete. 2006-01-03 Bill Wohler * Makefile (CVSMETHOD): New variable. (emacs): Use it, so developers can get the minimum number of MH-E files from Savannah while still being able to use ssh to check in their changes (by setting it to "ext" on the command line). * README (CVS MH-E INSTALL): Add information about new CVSMETHOD variable. 2005-12-22 Bill Wohler * mh-unit.el: Revert to default docstring fill-column. 2005-12-19 Bill Wohler * Makefile (CVSROOT): Now at cvs.savannah.gnu.org. (emacs): Savannah now uses :pserver: for access. (XEMACS): New variable. Initialized to false. (all): Set XEMACS to true for XEmacs. (MH_E_LOADDEFS_HEADER, MH_E_LOADDEFS_FOOTER): New variables. Contains content of echo statements from (autoloads): Incorporate header in advance on GNU Emacs, but not on XEmacs. Insert later on XEmacs. Adapted patch from Clemens Fruhwirth. 2005-12-18 Bill Wohler * mh-xemacs.el (mh-xemacs-has-toolbar-flag): Rename to mh-xemacs-has-tool-bar-flag. Add conditions that were in mh-xemacs-use-tool-bar-flag. (mh-xemacs-icon-map): Declare near top of file and add elements as icons are defined. Previously, it was difficult to match up the association list with the icons. (mh-xemacs-toolbar-inc-folder-icon, mh-xemacs-mail-icon): Rename to use the same name as the GNU Emacs icon to reduce confusion, drop the -toolbar- since icons really can be used anywhere, and sort. (mh-xemacs-toolbar-mime-save-parts-icon, mh-xemacs-attach-icon): Ditto. (mh-xemacs-toolbar-next-undeleted-msg-icon) (mh-xemacs-right-arrow-icon): Ditto. (mh-xemacs-toolbar-page-msg-icon, mh-xemacs-page-down-icon): Ditto. (mh-xemacs-toolbar-previous-undeleted-msg-icon) (mh-xemacs-left-arrow-icon): Ditto. (mh-xemacs-toolbar-delete-msg-icon, mh-xemacs-close-icon): Ditto. (mh-xemacs-toolbar-kill-ring-save-icon) (mh-xemacs-copy-icon): Ditto (mh-xemacs-toolbar-undo-icon, mh-xemacs-undo-icon): Ditto. (mh-xemacs-toolbar-kill-region-icon, mh-xemacs-cut-icon): Ditto. (mh-xemacs-toolbar-execute-commands-icon, mh-xemacs-execute-icon): Ditto. (mh-xemacs-toolbar-visit-folder-icon, mh-xemacs-fld-open-icon): Ditto. (mh-xemacs-toolbar-help-icon, mh-xemacs-help-icon): Ditto. (mh-xemacs-toolbar-toggle-tick-icon, mh-xemacs-highlight-icon): Ditto. (mh-xemacs-toolbar-toggle-showing-icon, mh-xemacs-show-icon): Ditto. (mh-xemacs-toolbar-refile-msg-icon, mh-xemacs-mail-refile-icon): Ditto. (mh-xemacs-toolbar-reply-all-icon) (mh-xemacs-mail-reply-all-icon): Ditto. (mh-xemacs-toolbar-reply-from-icon, mh-xemacs-reply-from-icon): Ditto. (mh-xemacs-toolbar-reply-to-icon, mh-xemacs-reply-to-icon): Ditto. (mh-xemacs-toolbar-reply-icon, mh-xemacs-mail-reply-icon): Ditto. (mh-xemacs-toolbar-alias-grab-from-field-icon) (mh-xemacs-mail-alias-icon): Ditto. (mh-xemacs-toolbar-send-icon, mh-xemacs-mail-compose-icon): Ditto. (mh-xemacs-toolbar-rescan-folder-icon, mh-xemacs-refresh-icon): Ditto. (mh-xemacs-toolbar-pack-folder-icon, mh-xemacs-mail-repack-icon): Ditto. (mh-xemacs-toolbar-search-icon, mh-xemacs-search-icon): Ditto. (mh-xemacs-toolbar-visit-folder-icon, mh-xemacs-fld-open-icon): Ditto. (mh-xemacs-toolbar-send-letter-icon, mh-xemacs-mail-send-icon): Ditto. (mh-xemacs-toolbar-ispell-message-icon, mh-xemacs-spell-icon): Ditto. (mh-xemacs-toolbar-save-buffer-icon, mh-xemacs-save-icon): Ditto. (mh-xemacs-toolbar-kill-region-icon, mh-xemacs-cut-icon): Ditto. (mh-xemacs-toolbar-kill-ring-save-icon, mh-xemacs-copy-icon): Ditto. (mh-xemacs-toolbar-yank-icon, mh-xemacs-paste-icon): Ditto. (mh-xemacs-toolbar-preferences-icon, mh-xemacs-preferences-icon): Ditto. (mh-xemacs-toolbar-widen-icon, mh-xemacs-widen-icon): Ditto. (mh-xemacs-toolbar-compose-insertion-icon) (mh-xemacs-compose-insertion-icon): Rename to drop the -toolbar- since icons really can be used anywhere. However, this icon isn't listed in mh-xemacs-icon-map and is therefore unused. Delete? (mh-xemacs-toolbar-fully-kill-draft-icon) (mh-xemacs-fully-kill-draft-icon): Ditto. (mh-xemacs-toolbar-letter-help-icon, mh-xemacs-letter-help-icon): Ditto. 2005-12-01 Bill Wohler * Makefile ($(MH_E_LOADDEFS)): Follow comment conventions. 2005-10-24 Bill Wohler * Makefile (EMACSCVSROOT): Rename to CVSROOT for consistency with CVSLOGIN. (CVSLOGIN): New variable. Set to anoncvs. (emacs): Check out emacs with anoncvs for non-developers. Developers can check out minimum development environment with "make CVSLOGIN=$USER emacs". (emacs-devel): New target for developers. Checks out all of Emacs using $(USER) privileges. * README (CVS MH-E INSTALL): Mention new `emacs-devel' Makefile target. 2005-10-17 Bill Wohler * Makefile (MH_E_IMG): Several of the standard Emacs images were renamed so these needed to be added to the distribution so they would be found in Emacs 20 and 21. While I was at it, I thought I might as well as include all images. When the images are updated to the latest GNOME images, this will become essential to avoid a mix of old and new images in the MH-E toolbar. 2005-10-14 Bill Wohler Released MH-E version 7.85. * README: Updated for release 7.85. 2005-10-14 Bill Wohler * mh-unit.el (mh-unit): Check for files in ., emacs/lisp/mh-e/, and ../../../. * README: Mention that you get CVS MH-E with CVS Emacs. Added CVS MH-E INSTALL section for saying how to use CVS MH-E. * Makefile (MH_E_MAINT): Added .cvsignore files which need to be tagged as well. 2005-10-13 Bill Wohler * release-utils: Untabified. (dist): New variable and function used to create distributions. (tag): New variable and function used to tag files. (import_emacs): Deleted. Obsolete. (get_release): New function used to get the release name from the sticky tag. * Makefile: It turns out that using dashes (-) in identifiers is a bad idea. Identifiers with dashes don't work on Windows systems for example. Also, variables with dashes in them that are exported as as environment variables cannot be used in scripts. Thus, use underscores in identifiers instead of dashes. (MH_E_SRC_NONCOMPILED): New variable. Currently holds mh-gnus.el. (MH-E-OTHERS): Deleted. See MH_E_SRC_NONCOMPILED, MH_E_AUTOGEN, and MH_E_ETC. (MH_E_IMG): Many of the files were moved into the mail sub-directory. rescan* was renamed to refresh*. (MH-E-IMG2): Deleted. Moved files into MH_E_IMG and dropped "2" in filename. (MH_E_AUTOGEN): New. Contains MH_E_AUTOLOADS and MH_E_LOADDEFS. (MH-E--ETC): Now contains all non-source including Makefile, README, MH-E-NEWS, and ChangeLogs. (MH_E_MAINT): New. Contains mh-unit.el and release-utils. (MH_E_DIST_NOAUTOGEN): New. All files for distribution not including automatically generated files. (MH_E_DIST): New. All files for distribution. (MH_E_ALL): All MH-E files except for automatically generated files. Suitable for use by cvs tag. (clean): Remove $(MH_E_AUTOGEN) files too. (tag): New target. Tags files in $(MH_E_ALL) with $(TAG). Uses release-utils. (dist): Now uses release-utils. * README: Since the directory structure has changed and is expected to be fixed, you can no longer add the lisp files to a directory in your load-path. Now you must add the MH-E directory to your load-path. Renamed mh-e-autoloads.el to mh-autoloads.el. No longer have to make mh-autoloads as it's now included in the distribution. 2005-10-04 Bill Wohler * MH-E-NEWS, alias.pbm, alias.xpm, execute.pbm, execute.xpm: * highlight.pbm, highlight.xpm, mh-acros.el, mh-alias.el: * mh-comp.el, mh-customize.el, mh-e.el, mh-funcs.el: * mh-gnus.el, mh-identity.el, mh-inc.el, mh-index.el: * mh-init.el, mh-junk.el, mh-logo.xpm, mh-mime.el: * mh-pick.el, mh-print.el, mh-seq.el, mh-speed.el: * mh-utils.el, page-down.pbm, page-down.xpm, refile.pbm: * refile.xpm, repack.pbm, repack.xpm, reply-all.pbm: * reply-all.xpm, reply-from.pbm, reply-from.xpm, reply-to.pbm: * reply-to.xpm, rescan.pbm, rescan.xpm, show.pbm: * show.xpm, widen.pbm, widen.xpm, mail/reply2.pbm: * mail/reply2.xpm: Moved into the Attic since these are now served by the Emacs repository. * ChangeLog: Moved contents into ChangeLog.1 and trimmed. * ChangeLog.1: New file. Contains old ChangeLog. * Makefile: Added rules to check out MH-E from Emacs repository. (MH-E-AUTOLOADS): Renamed file from mh-e-autoloads.el to mh-autoloads.el to be consistent with other file names. Copyright (C) 2005, 2011-2013 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. mh-e-8.5/ChangeLog.10000644000175000000620000154145012114520723013314 0ustar wohlerstaff2005-09-30 Bill Wohler * mh-customize.el (mh-refile-msg, mh-tool-bar-reply-from) (mh-tool-bar-reply-to, mh-tool-bar-reply-all) (mh-alias-grab-from-field, mh-pack-folder): Image files moved to etc/images/mail so added "mail/" prefix. (mh-reply): Ditto. Also renamed reply2.* to reply.*. (mh-rescan-folder): Ditto. Renamed image file to refresh.* since it can be used in the general sense. Does not have "mail/" prefix. 2005-09-29 Bill Wohler Merged in changes from CVS Emacs including: * mh-mime.el (mh-compose-forward, mh-mhn-compose-forw): * mh-comp.el (mh-insert-letter): * mh-utils.el (mh-prompt-for-folder): Follow convention for reading with the minibuffer. Emilio C. Lopes 2005-09-24. 2005-09-26 Bill Wohler * mh-e.el (desktop-buffer-mode-handlers): Only add to this list if the variable exists. Not present pre-version 22. Merged in changes from CVS Emacs including: * mh-print.el (mh-ps-print-msg-show): Fix misplaced parenthesis in previous change. Juanma Barranquero 2005-09-19 * mh-alias.el (mh-alias-ali): Fix `message' call: first arg should be a format spec. * mh-print.el (mh-ps-spool-buffer, mh-ps-spool-a-msg) (mh-ps-print-msg, mh-ps-print-msg-show): Ditto. * mh-mime.el (mh-toggle-mh-decode-mime-flag): Ditto. * mh-index.el (mh-index-sequenced-messages): Ditto. * mh-e.el (mh-refile-or-write-again, mh-page-msg): Ditto. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist) (mh-spamassassin-blacklist, mh-spamassassin-whitelist): Ditto. D Goel 2005-09-18. * mh-customize.el: Do not use face-alias compatibility for faces that did not appear in the previous Emacs release. Dan Nicolaescu 2005-08-15. * mh-e.el: Add handler to desktop-buffer-mode-handlers. (mh-restore-desktop-buffer): Remove autoload cookie. (mh-folder-mode): Add autoload cookie. Lars Hansen 2005-08-10. Update FSF's address in GPL notices Lute Kamstra 2005-07-04 . * mh-customize.el (mh-folder-body-face, mh-folder-cur-msg-face) (mh-folder-cur-msg-number-face): New backward-compatibility aliases for renamed faces. Lute Kamstra 2005-06-17. * mh-customize.el (mh-folder-body, mh-folder-cur-msg) (mh-folder-cur-msg-number, mh-folder-date, mh-folder-followup) (mh-folder-msg-number, mh-folder-refiled, mh-folder-subject) (mh-folder-tick, mh-folder-to, mh-index-folder) (mh-letter-header-field, mh-show-cc, mh-show-date) (mh-show-header, mh-show-pgg-good, mh-show-pgg-unknown) (mh-show-pgg-bad, mh-show-signature, mh-show-to, mh-show-from) (mh-show-xface, mh-speedbar-folder, mh-speedbar-selected-folder) (mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder-with-unseen-messages) (mh-folder-msg-number, mh-folder-subject, mh-folder-followup) (mh-folder-subject): Remove "-face" suffix from face names. (mh-folder-body, mh-folder-cur-msg, mh-folder-cur-msg-number) (mh-folder-date-face, mh-folder-followup-face) (mh-folder-msg-number-face, mh-folder-refiled-face) (mh-folder-subject-face, mh-folder-tick-face, mh-folder-to-face) (mh-index-folder-face, mh-letter-header-field-face) (mh-show-cc-face, mh-show-date-face, mh-show-header-face) (mh-show-pgg-good-face, mh-show-pgg-unknown-face) (mh-show-pgg-bad-face, mh-show-signature-face, mh-show-to-face) (mh-show-from-face, mh-show-xface-face, mh-speedbar-folder-face) (mh-speedbar-selected-folder-face) (mh-speedbar-folder-with-unseen-messages-face) (mh-speedbar-selected-folder-with-unseen-messages-face): New backward-compatibility aliases for renamed faces. (mh-folder-body-face, mh-folder-cur-msg-face) (mh-folder-cur-msg-number-face, mh-folder-date-face) (mh-folder-followup-face, mh-folder-msg-number-face) (mh-folder-deleted-face, mh-folder-refiled-face) (mh-folder-subject-face, mh-folder-address-face) (mh-folder-scan-format-face, mh-folder-to-face) (mh-index-folder-face, mh-show-cc-face, mh-show-date-face) (mh-show-header-face, mh-show-pgg-good-face) (mh-show-pgg-unknown-face, mh-show-pgg-bad-face) (mh-show-to-face, mh-show-from-face, mh-show-subject-face) (mh-speedbar-folder-with-unseen-messages) (mh-speedbar-selected-folder-with-unseen-messages): Use renamed MH-E faces. * mh-utils.el (mh-letter-font-lock-keywords) (mh-face-display-function): Use renamed MH-E faces. * mh-speed.el (mh-folder-speedbar-buttons) (mh-speed-update-current-folder, mh-speed-normal-face) (mh-speed-bold-face, mh-speed-add-buttons) (mh-speed-invalidate-map): Likewise. * mh-mime.el (mh-signature-highlight): Likewise. Miles Bader 2005-06-17. * mh-comp.el (mh-send-sub): * mh-identity.el (mh-identity-field-handler): * mh-mime.el (mh-secure-message): Don't use `format' on `error' arguments. Juanma Barranquero 2005-06-16. * mh-mime.el (mh-secure-message): Follow error conventions. Juanma Barranquero 2005-06-14. 2005-09-24 Bill Wohler * mh-unit.el (mh-unit): Changed lm-verify test to Emacs 22. 2005-09-22 Bill Wohler * Makefile: Incorporated ideas from Clemens Fruhwirth to generalize mh-loaddefs.el to make it work for both GNU Emacs and XEmacs. (EMACS_OPTIONS, XEMACS_OPTIONS): Use double-dash for all long options. (EMACS_LOADDEFS_COOKIE): New variable for generate-autoload-cookie setting. Obsoletes XEMACS_LOADDEFS_COOKIE. (EMACS_EXPORT_MH_LOADDEFS): New variable for GNU Emacs commands to rebuild mh-loaddefs.el. (XEMACS_EXPORT_MH_LOADDEFS): New variable for XEmacs commands to rebuild mh-loaddefs.el. Obsoletes XEMACS_LOADDEFS_FILE and XEMACS_LOADDEFS_PKG_NAME. (MH-E-LOADDEFS-SRC): New variable which is set to $(MH-E-SRC) on GNU Emacs, and adds $(MH-E-XEMACS-SRC) on XEmacs. (all): Modify EMACS_EXPORT_MH_LOADDEFS and MH-E-LOADDEFS-SRC on XEMacs. (mh-loaddefs.el): Now depends on $(MH-E-LOADDEFS-SRC) and has generic compile command that works on both GNU Emacs XEmacs. (xemacs): Depend on autoloads instead of deleted loaddefs-xemacs. (loaddefs-xemacs): Deleted. 2005-07-19 Bill Wohler * README (INSTALL): Added info for Mac users. 2005-07-16 Satyaki Das * mh-comp.el (mh-font-lock-field-data): Fix a bug where the function would return t but match-data was being set to nil (closes SF #1241017). 2005-07-12 Jeffrey C Honig * mh-customize.el (mh-invisible-header-fields-internal) (mh-invisible-header-fields-internal): Add Received-SPF header and X-Gmail- prefixes seen from Gmail. 2005-06-08 Peter S Galbraith * mh-comp.el (mh-insert-auto-fields): Inset identity regardless of whether one was already set, since if one used a default identity it would never be overridden (closes SF #1204506). 2005-06-02 Bill Wohler * mh-customize.el (mh-customize): Use customization group mh-e. * mh-init.el (mh-path): Use customization group mh-e. Thanks to Peter Whaite for these patches (closes SF #1213716). 2005-06-01 Bill Wohler * mh-mime.el (mh-compose-forward): Only use mh-sent-from-msg as a default message if it's a number (as is done elsewhere). Otherwise, an error is thrown if this function is called from a draft created by mh-forward since this variable is a list. Also added a space after the "Messages [%s]:" prompt. 2005-05-30 Jeffrey C Honig * mh-mime.el (mh-compose-forward): Allow insertion of multiple forwarded messages by range (including sequences). For the sent folder the default message presented is the sent message. For other folders, the default message is "cur", if it exists. 2005-05-28 Bill Wohler * mh-e.el (Version, mh-version): Added +cvs to version. 2005-05-28 Bill Wohler 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 * 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 2005-05-26. 2005-05-25 Bill Wohler Merged in changes from CVS Emacs including: * mh-customize.el (mh-speedbar-selected-folder-face): Special case high number of colors displays. Dan Nicolaescu 2005-04-08. * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'. Replace `illegal' with `invalid'. Werner Lemberg 2005-03-25. * mh-inc.el (mh-inc-spool-list): Correctly declare the external var. Stefan 2004-09-07. 2005-05-18 Bill Wohler * mh-comp.el (mh-reply): Mention use of mh-repl-group-formfile in docstring. 2005-05-05 Bill Wohler * mh-e.el (Version, mh-version): Added +cvs to release number. 2005-05-05 Bill Wohler 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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. 2005-02-07 Bill Wohler * mh-customize.el (mh-inc-prog, mh-inc-spool-list): Synced docstrings with manual. 2005-02-06 Bill Wohler * 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 * 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 to add define-behavior on XEmacs. 2005-01-28 Jeffrey C Honig * mh-customize.el (mh-invisible-header-fields-internal): Added X-Evolution header added by Evolution mai client. 2005-01-18 Bill Wohler * 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 * 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 * 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 * 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 * 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 * mh-acros.el (advice): Load advice, since it isn't loaded in XEmacs causing compilation problems. 2004-10-24 Satyaki Das * 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 * 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 * 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 * 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 * mh-e.el (Version, mh-version): Added +cvs to release number. 2004-08-24 Bill Wohler Released MH-E version 7.82. * MH-E-NEWS, README: Updated for release 7.82. * mh-e.el (Version, mh-version): Updated for release 7.82. 2004-08-24 Bill Wohler * mh-init.el (mh-variant-set): Change MH to mh as that's what is emitted by `mh-variant-mh-info' (closes SF #1014781). (mh-variant-p): Add mu-mh to docstring. 2004-08-23 Satyaki Das * mh-acros.el (mh-require-cl): Remove unneeded autoloads. (require): Add an advice to the function so that at compile time the uncompiled file is loaded. This avoids compilation problems when built in the Emacs tree. * mh-mime.el (mh-identity-pgg-default-user-id): Defvar the variable, to avoid compiler warnings. * mh-e.el (mh-seq): Load mh-seq since functions defined there are used here. Without this, the state mh-seq.elc would be loaded. * mh-customize.el (mh-init, mh-identity): Load mh-init and mh-identity at compile time manually, before the corresponding stale elc files get autoloaded. 2004-08-21 Bill Wohler * mh-e.el (Version, mh-version): Add +cvs to release number. 2004-08-21 Bill Wohler Released MH-E version 7.81. * MH-E-NEWS, README: Updated for release 7.81. * mh-e.el (Version, mh-version): Updated for release 7.81. 2004-08-21 Bill Wohler * release-utils (variable_changes): Check for checked-out directory before proceeding. Remove temporary files. Rename --variable-update flag to --variable-changes. 2004-08-16 Mark D. Baushke * mh-mime.el (mh-toggle-mh-decode-mime-flag: New function. * mh-e.el (mh-help-messages): Add [;] help string for it. (mh-folder-mode-map): Add ";" key binding for it. 2004-08-15 Satyaki Das * mh-acros.el (mh-defstruct): Distinguishing structures created by mh-defstruct just based on the number of fields is not sufficient, since both the mh-thread-message and mh-thread-container structures have the same length. 2004-08-15 Mark D. Baushke * mh-customize.el (mh-identity-handlers): Use ":default" instead of "default" to avoid problems with "Default:" as a user defined field. * mh-identity.el (mh-identity-field-handler): Ditto. 2004-08-15 Bill Wohler * mh-e.el (Version, mh-version): Added +cvs to release number. 2004-08-15 Bill Wohler Released MH-E version 7.4.80. * MH-E-NEWS, README: Updated for release 7.4.80. * mh-e.el (Version, mh-version): Updated for release 7.4.80. 2004-08-15 Bill Wohler * mh-funcs.el, mh-gnus.el, mh-inc.el, mh-init.el, mh-junk.el, mh-pick.el, mh-print.el, mh-xemacs.el: Added 2004 to Copyright. * mh-acros.el, mh-alias.el: Checkdoc fixes. 2004-08-12 Satyaki Das * mh-acros.el (cl): Load cl in this file. That is all right, since this file is only used at compile time, and so cl doesn't get loaded at run time. This avoids problems with stale *.elc files present in the Emacs source tree during compilation. (mh-defstruct): Modify it to make it more CL like and in the process simplify it a bit. This makes the argument list of the constructor compatible with the previous version, thereby avoiding a compilation error when an old version of mh-seq.elc is present. * mh-seq.el (mh-thread-id-container, mh-thread-get-message) (mh-thread-get-message-container): Revert back to the CL style of using keyword arguments, since the mh-defstruct now produces code compatible to such usage. 2004-08-11 Satyaki Das * mh-acros.el (mh-defstruct, mh-require-cl): Checkdoc fixes. * mh-utils.el (message-tokenize-header, message-fetch-field): Add autoloads. (mh-folder-completing-read): Make the folder completion look better with CVS Emacs. * mh-init.el (mh-variant-set): Remove dead code. 2004-08-11 Bill Wohler * *.el: Use the following at the top of each file which seems to do a good job of suppressing compilation warnings in 21.3 and CVS Emacs (21.4). This replaces (require 'cl) or (require 'utils) (mh-require-cl) calls: (eval-when-compile (require 'mh-acros)) (mh-require-cl) 2004-08-10 Bill Wohler * release-utils (DESCRIPTION): Added one. (FILES, SEE ALSO, VERSION): Deleted empty and incorrect sections. * mh-e.el (mh-colors-available-p): Call x-display-color-cells with mh-funcall-if-exists since it no longer seems to be defined in GNU Emacs 21.4. 2004-08-10 Satyaki Das * mh-speed.el (mh-process-kill-without-query, mh-speed-flists): Avoid a compiler warning in versions of Emacs where process-kill-without-query is a deprecated function. * mh-seq.el (mh-thread-message, mh-thread-container): Use mh-defstruct instead of defstruct. (mh-thread-id-container, mh-thread-get-message-container) (mh-thread-get-message): Use the slightly different structure constructor function. * mh-acros.el (mh-defstruct): New macro which is a partial replacement of the defstruct in CL. (no-byte-compile): Don't compile the file since it isn't loaded at run time, so efficiency isn't an issue. * mh-utils.el (mh-buffer-data): Use mh-defstruct instead of defstruct. 2004-08-09 Satyaki Das * mh-funcs.el, mh-junk.el, mh-print.el: Use mh-require-cl to avoid compilation warnings in Emacs-21.3. * mh-acros.el (mh-require-cl): Add autoloads of CL functions used. 2004-08-09 Bill Wohler * mh-customize.el (mh-show-use-xface-flag): Mention that `fetch' and `curl' are supported as well. 2004-08-08 Bill Wohler * mh-xemacs.el (mh-xemacs-has-toolbar-flag): Checkdoc fixes. * mh-mime.el (mh-display-with-external-viewer): Checkdoc fixes. * mh-identity.el: (mh-identity-attribution-verb-end): Stripped trailing space; checkdoc fixes. * mh-e.el (mh-restore-desktop-buffer): Checkdoc fixes. * mh-customize.el: (mh-inc-spool-list, mh-compose-forward-as-mime-flag, defcustom): Stripped trailing space; checkdoc fixes. * mh-comp.el (mh-reply): Stripped trailing space. * mh-unit.el (mh-unit-files): Added mh-acros.el and mh-gnus.el. (mh-unit): Don't lm-verify pre-21.4. Save buffers before killing since we might have done some editing. * import-emacs: Deleted. Functionality subsumed by release-utils. * release-utils: New script. Performs import-emacs functionality and displays new and deleted options. * Makefile (import-emacs): Call release-utils instead of import-emacs. * mh-funcs.el (mh-undo-folder): Removed deprecated `ignore' argument. * mh-e.el (mh-scan-date-regexp): Deleted as Peter claims it is obsolete. (mh-folder-font-lock-keywords): Removed reference to deleted variable `mh-scan-date-regexp'. * mh-customize.el (mh-auto-fields-prompt-flag): Made reference to `mh-auto-fileds-lists'. (mh-forward-hook): Fixed docstring typo. 2004-08-07 Bill Wohler * mh-acros.el: New file. Currently holds macros needed by mh-customize.el but is planned to hold all macros to avoid dependency problems when compiling. * mh-utils.el (mh-xemacs-flag): Defined in mh-customize.el now. (mh-require-cl, mh-do-in-gnu-emacs, mh-do-in-xemacs) (mh-funcall-if-exists, mh-make-local-hook, mh-mark-active-p): Moved to new file mh-acros.el. * mh-customize.el: Require mh-acros and cl only when compiling and mh-loaddefs at runtime instead of mh-utils. (mh-xemacs-flag): Define it here instead of mh-utils.el. * Makefile (MH-E-SRC): Added mh-acros.el. * mh-gnus.el (default-enable-multibyte-characters): Don't define any more. It doesn't seem to be needed. * mh-customize.el (mh-junk-background): New variable. If on, spam programs are run in background. Running in foreground can be slow. Defaults to nil to spare machines with little memory. * mh-junk.el (mh-spamassassin-blacklist, mh-bogofilter-blacklist) (mh-bogofilter-whitelist, mh-spamprobe-blacklist) (mh-spamprobe-whitelist): Use new option mh-junk-background. 2004-07-25 Satyaki Das * mh-utils.el (mh-folder-completing-read): In recent CVS Emacs, the first letter of the possible choices in the completion buffer is highlighted. The change is needed for this feature to work during folder name completion. This is not entirely sufficient, since the leading "+" in folder names is still mishandled. A patch is required in Emacs itself to address that. 2004-07-22 Mark D. Baushke * mh-e.el (recursive-load-depth-limit): Move recursive-load-depth-limit code to ... * mh-utils.el (recursive-load-depth-limit): ... here to avoid problems compiling mh-utils.el and mh-alias.el with gnus-5.10.6 under emacs-21.1. Use eval-and-compile instead of eval-when. 2004-07-20 Bill Wohler * mh-customize.el (mh-invisible-header-fields-internal): Added header fields emitted by T-Mobile picture phones (X-Mms-*, and commented out X-Operator field saying it's like X-Mailer). 2004-07-12 Bill Wohler * mh-gnus.el: Set local variables indent-tabs-mode and sentence-end-double-space to nil. * mh-customize.el: Checkpoint from option docstring updates and manual synchronization from last summer. For the options listed below, docstring was usually completely rewritten. Use "on" instead of "t" in docstring to match what is seen in customization buffer. Use headline capitalization. Standardize on "Auto-detect" text when option has that capibility. (mh): Since we work on more than one type of Emacs, use Emacs instead of GNU Emacs. Prefer GNU mailutils over GNU Mailutils. (mh-variant): s/Autodetect at startup/Auto-detect/. (mh-alias-insertion-location): s/Sorted alphabetically/Alphabetical/. s/At the top of file/Top/. s/At the bottom of file/Bottom/. (mh-alias-local-users-prefix): s/Use login instead of real name/Use Login/. (mh-identity-list): Sorted values by fields, attribution, signature, GPG key. (mh-auto-fields-list): Missing quote. (mh-compose-insertion): s/Use Gnus/Gnus/. s/Use mhn/mhn/. (mh-compose-space-does-completion-flag): s/SPACE//. (mh-extract-from-attribution-verb): Since we have French, added German too ;-). (mh-letter-complete-function): Mention default in docstring. (mh-invisible-header-fields-internal): Added X-ELNK-Trace from Earthlink. (mh-alias-flash-on-comma, mh-alias-insert-file) (mh-alias-passwd-gecos-comma-separator-flag) (mh-recenter-summary-flag, mh-default-folder-for-message-function) (mh-default-folder-must-exist-flag, mh-index-program) (mh-index-ticked-messages-folders, mh-ins-buf-prefix) (mh-delete-yanked-msg-window-flag, mh-identity-default): See summary above. * mh-init.el (mh-variant-set, mh-sys-path, mh-variant-mu-mh-info): Prefer GNU mailutils over GNU Mailutils MH. * mh-comp.el (sc-cite-original, mh-smail, mh-smail-batch) (mh-edit-again, mh-extract-rejected-mail, mh-forward) (mh-smail-other-window, mh-reply, mh-send, mh-send-other-window): Use `mh-send' instead of \\[mh-send]] since links in the docstring 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. * mh-e.el (Version, mh-version): Set to 7.4.4+cvs. 2004-07-10 Bill Wohler Released MH-E version 7.4.4. * MH-E-NEWS, README: Updated for release 7.4.4. * mh-e.el (Version, mh-version): Updated for release 7.4.4. This patch release contains the following patches: * mh-xemacs.el: New file from concatenation of mh-xemacs-compat.el and mh-xemacs-icons.el which were removed since their names exceeded DOS 8+3 limits. * Makefile: (mh-e-autoloads.el): Add target to make `mh-e-autoloads.el', a file containg usual entry commands into MH-E to be used for users installing MH-E separately from Emacs. (XEMACS_LOADDEFS_FILE): New. Used to generate mh-loaddefs.el in XEmacs. (XEMACS_LOADDEFS_COOKIE): Ditto. (XEMACS_LOADDEFS_PKG_NAME): Ditto. (XEMACS_OPTIONS): Add '-no-autoloads' to give a cleaner build environment. (MH-E-SRC): Moved mh-xemacs.el to new variable MH-E-XEMACS-SRC. (MH-E-XEMACS-SRC): New variable to hold XEmacs source files. (MH-E-XEMACS-OBJ): New variable to hold XEmacs object files. (clean): Moved XEmacs-specific code to clean-xemacs. (xemacs): Added clean-xemacs prerequisite. Moved down to XEmacs section of file. Add target to build mh-loaddefs.el in XEmacs (loaddefs-xemacs): New rule to build mh-loaddefs.el in XEmacs. (clean-xemacs): New target to remove XEmacs-specific files. (compile-xemacs): New. It allows for the '-no-autoloads' option and byte-compiles all the source files with a single instance of XEmacs. (dist): Added $(MH-E-XEMACS-SRC) to tarball. (AUTO_PRELOADS): Removed, in favour of 'AUTOLOAD_PACKAGE_NAME' and 'AUTOLOAD_FILE'. (AUTOLOAD_PACKAGE_NAME): New. (AUTOLOAD_FILE): New. (all): Don't set $EMACS_HOME if building with XEmacs. (xemacs): Use 'compile-xemacs' instead of 'compile'. (auto-autoloads.elc): Use new $AUTOLOAD_* vars and allow for '-no-autoloads'. (custom-load.elc): Allow for '-no-autoloads'. * mh-e.el: Don't require mh-xemacs-compat which no longer exists. The XEmacs stuff gets required by mh-customize.el which is required by mh-utils.el which is required by mh-e.el. This all happens before mh-xemacs-compat was required, so all should be well. (mh-restore-desktop-buffer): Move from desktop.el. Add Parameters. (mh-restore-desktop-buffer): Delete with-no-warnings. (mh-folder-mode): Bind desktop-save-buffer to t. (Courtesy Lars Hansen). * mh-alias.el (mh-assoc-ignore-case): New macro to use assoc-string when available (Emacs 21.4+); assoc-ignore-case otherwise. (mh-alias-reload, mh-alias-expand, mh-alias-minibuffer-confirm-address): Use it. * mh-seq.el: Added mh-autoload to mh-read-seq-default. * mh-utils.el (mh-require-cl): 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 routines in their macro expansions. Use mh-require-cl to provide the cl routines in the best way possible (closes SF #930012). (require 'mouse): To shush compiler. Use new function mh-require-cl throughout. 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. * import-emacs: Also grab the ChangeLog. * *.pbm: Regenerated using GIMP to be consistent with other Emacs icons. 1. Edit .xpm image in GIMP. 2. Image > Mode > Indexed. Check Use Black/White Palette and No Color Dithering. 3. File > Save As file.xbm. 4. Run xbmtopbm < file.xbm > file.pbm. Thanks to jan.h.d@swipnet.se for the help. 2004-07-07 Stephen Gildea * mh-customize.el (mh-invisible-header-fields-internal): Add X-Greylist, X-Source*, and X-WebTV-Signature. Replace specific X-Spam-* headers with general pattern. 2004-06-15 Bill Wohler * README: Vladimir Ivanovic reports that mh-rmail works with XEmacs 21.5.17, so updated requirements text accordingly (closes SF #644321). 2004-05-12 Satyaki Das * mh-utils.el (mh-mail-header-end): Replace call to rfc822-goto-eoh with something that allows From_ lines in the mail header. 2004-04-14 Bill Wohler * mh-utils.el (mh-show-mouse): s/EVENT/event/. Thanks to John Paul Wallington for pointing this out. 2004-04-12 Satyaki Das * mh-e.el (mh-folder-size-flist): Add -showzero option so that the parsing code doesn't get confused by the presence of -noshowzero in the user's .mh_profile (closes SF #933954). 2004-04-07 Satyaki Das * mh-mime.el (mh-insert-mime-button) (mh-insert-mime-security-button): Add evaporate property to overlays used in MIME part buttons. This avoids problems with CVS Emacs. 2004-03-16 Satyaki Das * mh-e.el (mh-folder-from-address): Go to the end of buffer if the re-search-forward fails (closes SF #917096). 2004-02-02 Satyaki Das * mh-customize.el (mh-compose-forward-as-mime-flag): New user customizable variable that controls whether messages are forwarded as MIME attachments (closes SF #827203). * mh-comp.el (mh-forward): Call forw with -mime option only if mh-compose-forward-as-mime-flag is non-nil. 2003-12-26 Jeffrey C Honig * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist) (mh-spamassassin-blacklist, mh-spamassassin-blacklist) (mh-spamassassin-blacklist, mh-spamassassin-whitelist) (mh-spamassassin-whitelist, mh-bogofilter-blacklist) (mh-spamprobe-blacklist): Add progress messages. Change "Couldn't" to "Unable" in error messages. Run bogofilter and spamprobe in the foreground to prevent a large number of processes from swamping the system. 2003-12-25 Satyaki Das * mh-e.el (mh-prompt-for-refile-folder): Marking the whole folder and then refiling all messages throws an error, since this function expects point to be on a valid scan line. The change relaxes this requirement, thereby avoiding the above problem. 2003-12-14 Satyaki Das * mh-comp.el (mh-ascii-buffer-p): New function that checks if a buffer is entirely composed of ASCII. (mh-send-letter): Encode the draft if it contains non-ASCII characters. 2003-12-12 Satyaki Das * mh-customize.el (mh-invisible-headers): Keep only unique fields in list of header fields to hide. This avoids problems in XEmacs. 2003-12-10 Satyaki Das * mh-seq.el (mh-thread-print-scan-lines): The imenu index was not getting created for threaded index buffers. The change fixes this. * mh-index.el (mh-index-insert-folder-headers): Always create the imenu index. (mh-index-create-imenu-index): Set which-func-mode to t. If which-function-mode is turned on after the folder buffer has been prepared, display of the folder info was being inhibited. The change fixes that. 2003-12-09 Satyaki Das * mh-comp.el (mh-letter-mode): Setup mh-mail-header-separator based on draft contents. (mh-letter-mode, mh-letter-mail-header-end-marker) (mh-letter-header-end): Remove use of the variable mh-letter-mail-header-end-marker. Instead use mh-mail-header-separator. This avoids problems in font locking draft buffers (closes SF #855479). 2003-12-09 Satyaki Das * mh-index.el (mh-index-insert-folder-headers): Modified so that imenu--index-alist is updated. (mh-index-create-imenu-index): New function that generates an index usable by imenu. This adds which-func-mode support to index folders (closes SF #855520). * mh-e.el (which-func, which-func-modes): Tell which-func that mh-folder-mode supports it. (mh-folder-mode): Add support for imenu. 2003-11-22 Peter S Galbraith * Makefile: renamed mh-startup.el to mh-e-autoloads.el * README: renamed mh-startup.el to mh-e-autoloads.el * .cvsignore: Added mh-e-autoloads.el 2003-11-18 Bill Wohler Released MH-E version 7.4.3. * MH-E-NEWS, README: Updated for release 7.4.3. * mh-e.el (Version, mh-version): Updated for release 7.4.3. This patch release contains the following two patches: * mh-identity.el (mh-identity-make-menu): Removed condition on mh-auto-fields-list. Use it to enable or disable menu item instead. * mh-customize.el (mh-identity-list): Removed defvar and moved defcustom before mh-auto-fields-list so that defvar wouldn't clobber user's customization settings. 2003-11-17 Jeffrey C Honig * mh-print.el (mh-print-msg): Do not print a message on deprecated usage, the bindings have been removed. * mh-e.el (mh-folder-mode-map): Remove "l" binding for mh-print-msg. * mh-utils.el (mh-show-mode-map): Remove "l" binding for mh-print-msg. 2003-11-16 Satyaki Das * mh-comp.el (mh-beginning-of-word): Use the function mh-mail-abbrev-make-syntax-table instead of the function mail-abbrev-make-syntax-table. * mh-gnus.el (mh-mail-abbrev-make-syntax-table): Add a wrapper function that calls mail-abbrev-make-syntax-table if available. This is needed so that MH-E built with CVS Emacs will work with released versions of Emacs21 and vice versa. 2003-11-14 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields-internal): Add "X-NAI-Spam-" and "X-Spam-Report:". 2003-11-14 Mark D. Baushke * mh-customize.el (mh-invisible-header-fields-internal): Add X-AntiAbuse and X-MailScanner. (Patch from Stephen Gildea.) 2003-11-13 Peter S Galbraith * mh-identity.el (mh-identity-handler-attribution-verb): New function. A new Identity handler for the attribution verb (e.g. "wrote:") to allow for different identities to use different languages. (mh-identity-insert-attribution-verb): New function. Insert the attribution verb, placing special markers so it can be deleted and replaced later. (mh-identity-attribution-verb-start): New variable. Holds the marker for the start of the attribution verb. (mh-identity-attribution-verb-end): New variable. Holds the marker for the end of the attribution verb. * mh-customize.el (mh-identity-handlers): Add new ":attribution-verb" tag for the attribution-verb handler. (mh-identity-list): Idem. * mh-comp.el (mh-yank-cur-msg): Insert attribution verb using mh-identity-insert-attribution-verb. (mh-extract-from-attribution): Extract only the name from the From line, without appending `mh-extract-from-attribution-verb' since markers need to be inserted around that now. 2003-11-12 Bill Wohler * mh-e.el (mh-rmail, mh-nmail): Well, actually, we run in both GNU Emacs and XEmacs, so removed the "GNU" in the docstrings unless one is strictly talking about GNU Emacs. * mh-comp.el (mh-smail, mh-smail-batch, mh-smail-other-window): Ditto. 2003-11-11 Bill Wohler * mh-customize.el (mh-customize): Minor docstring change. (mh, mh-e): The short description for MH-E is: The GNU Emacs Interface to the MH Mail System. Therefore, updated docstrings accordingly. * mh-comp.el (mh-smail, mh-smail-batch, mh-smail-other-window): Ditto. * mh-e.el (mh-rmail, mh-nmail): Ditto. 2003-11-10 Satyaki Das * mh-mime.el (mh-mml-to-mime): In case errors happen in mml-to-mime, restore contents of the draft buffer (closes SF #839303). 2003-11-07 Bill Wohler * mh-customize.el (mh-letter-mode-hook): Moved to mh-sending-mail group (where it is now documented in the manual). (mh-pick-mode-hook): Moved to mh-index group (where it is now documented in the manual). * mh-loaddefs.el: Deleted per our discussion on mh-e-devel. No more conflicts! No more check-ins! Anyone pulling CVS MH-E is expected to compile. This file shall be added to the tarball so that users of the distribution are not. 2003-11-07 Mark D. Baushke * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-forward-hook): Define new hook. * mh-comp.el (mh-forward): Use it. 2003-11-07 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-toggle-mime-buttons) (mh-show-display-with-external-viewer): New interactive functions callable from the show buffer. (mh-show-mime-map): Add bindings for "K t" and "K e". (mh-show-msg): Propagate change to mh-display-buttons-for-inline-parts-flag to the show buffer. * mh-mime.el (mh-display-with-external-viewer): New interactive function to display MIME parts with external viewer (closes SF #839318). * mh-e.el (mh-folder-mode): Make the variable mh-display-buttons-for-inline-parts-flag buffer-local so that display of MIME buttons can be toggled. (mh-toggle-mime-buttons): New interactive function to toggle display of MIME buttons. (mh-mime-map): Modified to add bindings for "K t" and "K e". 2003-11-04 Steve Youngs * 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 (clean-xemacs): Remove `mh-loaddefs.el*' (loaddefs-xemacs): New rule to build mh-loaddefs.el in XEmacs. 2003-11-02 Peter S Galbraith * mh-init.el (mh-variant-set-variant): Reset `mh-x-mailer-string' when we select an MH variant. 2003-11-02 Jeffrey C Honig * mh-loaddefs.el: Regenerated. * mh-funcs.el (mh-print-msg): Move to mh-print.el. * mh-e.el (mh-folder-mode-map): Add mh-print-msg ("l") back, it will print a message that this usage is deprecated. * mh-print.el (require, mh-ps-print-msg, mh-ps-print-msg-file): Require mh-funcs for mh-note-printed. PS print functions were not setting the printed notation. Move mh-print-msg here for consistency. Print message if mh-print-msg invoked via deprecated key binding. 2003-11-01 Peter S Galbraith * Makefile: Add target to make `mh-startup.el', a file containg usual entry commands into MH-E to be used for users installing MH-E separately from Emacs. * README: Document the above for users. 2003-10-29 Jeffrey C Honig * mh-utils.el (mh-show-ps-print-map): Add "?" and "l" to mh-show-ps-print-map. * mh-e.el (mh-ps-print-map, mh-help-messages): Add "?" and "l" to mh-ps-print-map. Add "l" to help message. 2003-10-27 Bill Wohler * Makefile (MH-E-SRC): Moved mh-xemacs.el to new variable MH-E-XEMACS-SRC. (MH-E-XEMACS-SRC): New variable to hold XEmacs source files. (MH-E-XEMACS-OBJ): New variable to hold XEmacs object files. (clean): Moved XEmacs-specific code to clean-xemacs. (xemacs): Added clean-xemacs prerequisite. Moved down to XEmacs section of file. (clean-xemacs): New target to remove XEmacs-specific files. (compile-xemacs): Added $(MH-E-XEMACS-SRC) prerequisite. (dist): Added $(MH-E-XEMACS-SRC) to tarball. 2003-10-27 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-index.el (mh-indexer-choices): Remove option for the non-free glimpse indexer (closes SF #831276). (mh-glimpse-binary, mh-glimpse-directory) (mh-glimpse-execute-search, mh-glimpse-next-result): Functions and variables to implement glimpse support are removed. * mh-customize.el (mh-index-program): Remove option for glimpse. 2003-10-24 Satyaki Das * mh-customize.el: Remove top-level test for toolbar enabled XEmacs since it is not needed. (mh-tool-bar-define): Add test for XEmacs toolbar in the functions mh-toolbar-init, mh-tool-bar-letter-buttons-set and mh-tool-bar-folder-buttons-set. This enables proper compilation irrespective of whether the XEmacs was built with toolbar support or not. * mh-comp.el (mh-letter-mode): Remove conditional since it is not needed. * mh-e.el (mh-folder-mode): Same as above. * mh-utils.el (mh-show-mode): Same as above. * mh-xemacs.el (mh-xemacs-icon-map): Remove condition on toolbar presence since we want the build to work if XEmacs without toolbars is used during compilation. 2003-10-23 Bill Wohler * mh-customize.el: The Great Reorganization. Sorted groups alphabetically. Aligned variables in customization groups with manual sections. Group docstrings changed to match manual chapter titles. 2003-10-22 Satyaki Das * mh-speed.el (timer): Avoid compiler warning in XEmacs. 2003-10-22 Steve Youngs * Makefile (XEMACS_OPTIONS): Add '-no-autoloads' to give a cleaner build environment. (AUTO_PRELOADS): Removed, in favour of 'AUTOLOAD_PACKAGE_NAME' and 'AUTOLOAD_FILE'. (AUTOLOAD_PACKAGE_NAME): New. (AUTOLOAD_FILE): New. (all): Don't set $EMACS_HOME if building with XEmacs. (xemacs): Use 'compile-xemacs' instead of 'compile'. (auto-autoloads.elc): Use new $AUTOLOAD_* vars and allow for '-no-autoloads'. (custom-load.elc): Allow for '-no-autoloads'. (compile-xemacs): New. It allows for the '-no-autoloads' option and byte-compiles all the source files with a single instance of XEmacs. * mh-e.el (mh-folder-mode): Only load the toolbar in XEmacs if toolbar support is available. * mh-comp.el (mh-letter-mode): Only load the toolbar in XEmacs if toolbar support is available. * mh-customize.el: Require 'mh-xemacs' at toplevel when 'mh-xemacs-flag' is non-nil. Wrap all the toolbar code in a test that is true if using GNU/Emacs or a toolbar-enabled XEmacs. * mh-print.el (mh-ps-spool-a-msg): Comment out `clean-message-header-flag' because it isn't used anywhere. * mh-utils.el (mh-show-mode): Only load the toolbar in XEmacs if toolbar support is available. * mh-xemacs.el: Autoload `regexp-opt', `customize-group', `view-mode', `with-electric-help', `pp', `sort-numeric-fields', `reverse-region', and `goto-address' at compile time. (mh-xemacs-has-toolbar-flag): New. This is non-nil when XEmacs has toolbar support. (mh-xemacs-toolbar-*-icon): Use it. 2003-10-21 Mark D. Baushke * mh-identity.el (mh-identity-field-handler): Fields that begin with ":" must have an mh-identity-handler defined or the user gets an error. 2003-10-17 Peter S Galbraith * mh-customize.el (mh-identity-list): This change affects users! The keyword "signature" becomes ":signature". The recently added keyword "pgg-default-user-id" becomes ":pgg-default-user-id". (mh-auto-fields-list): The keyword "Identity" becomes ":identity". (mh-identity-handlers): Idem for signature and pgg-default-user-id. * mh-comp.el (mh-insert-auto-fields): Idem for Identity. 2003-10-17 Peter S Galbraith * mh-xemacs.el: Add eval-and-compile call to (load "toolbar" t t) to make sure `toolbar-make-button-list' is defined. We can't use require because Emacs doesn't have this library. 2003-10-16 Bill Wohler * mh-customize.el (mh-signature-file-name) (mh-letter-insert-signature-hook): Merge docstring with manual. * mh-comp.el (mh-file-is-vcard-p): Checkdoc fix. (mh-insert-signature): Merge docstring with manual. * mh-customize.el (mh-junk): Changed manual link in defgroup from Customizing mh-e to Junk. (mh-junk-function-alist): Moved SpamAssassin to first in list on the hunch that it is the most popular and should be chosen if other anti-spam programs exist. (mh-junk-mail-folder): Since the variable can accept values other than folder names, renamed to mh-junk-disposition to more accurately reflect the content. Merge docstring with manual. (mh-junk-program): Moved SpamAssassin to the top of the menu for the same reason presented in mh-junk-function-alist. Also, fixed case of spam programs to match official usage. Merge docstring with manual. * mh-junk.el (mh-junk-blacklist): s/mh-junk-mail-folder/mh-junk-disposition/. Merge docstring with manual. (mh-junk-whitelist): Merge docstring with manual. (mh-bogofilter-blacklist): No longer suggest using automatic classification so use -s instead of -Ns. (mh-bogofilter-whitelist): No longer suggest using automatic classification so use -n instead of -Sn. (mh-spamassassin-blacklist, mh-spamassassin-whitelist): Merge docstring with manual. Moved spamassassin functions to top of file so functions appear in same order that they are presented in menu. 2003-10-09 Peter S Galbraith * mh-customize.el (mail-citation-hook): Moved from mh-comp.el and made into a defcustom. 2003-10-09 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-get-header-field): Add autoload cookie. * mh-utils.el (mh-show-ps-print-toggle-mime) (mh-show-ps-print-toggle-color, mh-show-ps-print-toggle-faces) (mh-show-ps-print-msg-file, mh-show-ps-print-msg) (mh-show-ps-print-msg-show): New interactive functions callable from the show buffer. (mh-show-ps-print-map): New key map for printing. * mh-e.el (mh-folder-mode-map): Remove key binding for mh-print-msg. (mh-ps-print-map): Add new key map for printing. * Makefile (MH-E-SRC): Add mh-print.el. 2003-10-07 Satyaki Das * mh-utils.el (mh-x-image-url-fetch-image): In XEmacs, make-temp-file is not present. So to avoid security problems, use a temporary file in the user's home directory. This avoids issues in creating files in a world-writable directory. * mh-mime.el (mh-signature-highlight): In Emacs, arrange for the overlay to be freed when it is no longer needed. Also, implement signature highlighting in XEmacs. 2003-10-05 Satyaki Das * mh-mime.el (mh-mime-display, mh-mm-inline-message): Respect the value of `mm-verify-option' and `mm-decrypt-option'. (mh-mime-display-security): Rearrange code a bit to avoid too many new lines being inserted when message verification/decryption is carried out while the message is being read. Also use the point-m{in|ax}-marker functions to make the function easier to read. (mh-mime-security-press-button): Extend the function so that the user can verify/decrypt messages while reading them. * mh-gnus.el (mm-possibly-verify-or-decrypt): Added to avoid compiler warning with old Gnus. * mh-utils.el (mh-x-image-url-sane-p): New function which checks if the URL in X-Image-URL is something we can handle. (mh-x-image-url-display): Don't display image if the URL looks malformed. 2003-10-04 Mark D Baushke * mh-comp.el (mh-letter-menu): Simplify menu heading. 2003-10-03 Mark D Baushke * mh-mime.el (mh-mml-query-cryptographic-method): Avoid revisionist history and still provide a good default. * mh-comp.el (mh-letter-menu): Remove the Disable Security parenthetical comment. * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-mml-method-default): What method should be used in secure directives. * mh-mime.el (mh-secure-message): New function used to generate the mml security tags. (mh-mml-unsecure-message): New wrapper function around mml-unsecure-messages. (mh-mml-secure-message-sign-pgpmime): Remove function. (mh-mml-secure-message-encrypt-pgpmime): Ditto. (mh-mml-cryptographic-method-history): New variable. (mh-mml-query-cryptographic-method): New function. (mh-mml-secure-message-encrypt): Ditto. (mh-mml-secure-message-signencrypt): Ditto. (mh-mml-secure-message-sign): Ditto. * mh-comp.el (mh-letter-menu, mh-letter-mode-help-messages, (mh-letter-mode-map): Update to use new functions. 2003-09-26 Satyaki Das * mh-seq.el (mh-interactive-range): The function has been extended so that it now takes a default result to return if no interactive prefix arg is given and no region is active. * mh-e.el (mh-add-sequence-notation): If transient-mark-mode is on, then the active region is deactivated based on whether a user sequence or a internal sequence is being notated. The change removes this inconsistency. (mh-catchup, mh-folder-map): A new interactive function to mark messages as read has been added and bound to "F c" in the folder mode. * mh-utils.el (mh-show-catchup, mh-show-folder-map): New interactive function callable from show mode buffers has been bound to "F c". 2003-09-24 Bill Wohler * mh-customize.el (mh-clean-message-header-flag) (mh-invisible-header-fields-default, mh-invisible-header-fields): Merge docstring with manual. 2003-09-24 Mark D. Baushke * mh-junk.el (mh-junk-blacklist): Junked messages should be put into the mh-seen-list to avoid propagating the unseen sequence into the spam folder. * mh-loaddefs.el: Regenerated. * mh-mime.el (mh-mml-secure-message-sign-pgpmime): Add an optional dontsign argument to remove an existing secure message directive. Update the docstring -- this fuction does not allow for encrypt/sign, just sign directives. * mh-mime.el (mh-mml-secure-message-sign-pgpmime): Use mml-insert-tag directly to provide a sender if mh-identity-pgg-default-user-id is set. (mh-mml-secure-message-encrypt-pgpmime): Use mml-insert-tag directly to provide a sender if this message is to be both signed and encrypted and mh-identity-pgg-default-user-id is set. 2003-09-23 Bill Wohler * mh-alias.el (Commentary): Removed as it is now in the manual. (mh-alias-system-aliases): Moved here from mh-customize.el. By definition, "system" definitions are not user-visible, and user filenames are in the the Aliasfile: profile component, so this variable really shouldn't be a defcustom (mh-alias-tstamp, mh-alias-filenames, mh-alias-reload) (mh-alias-add-alias, mh-alias-grab-from-field) (mh-alias-add-address-under-point, mh-alias-apropos): Merge docstring with manual. (mh-alias-reload-maybe): Minor comment update. (mh-alias-insert-file): Merge docstring with manual. Removed "[press TAB]" from prompt since users should know about completion and space can be used as well. (mh-alias-for-from-p): No longer returns a surprising result (t if there was **not** an alias for the From field) if the From header field is missing. This function now returns what you would expect a function of this name to return. Renamed from mh-alias-from-has-no-alias-p since negatives in the function name make logic harder to follow. (mh-alias-add-alias-to-file): Merge docstring with manual. Improved verbiage of prompt. Aliases are now inserted "[b]efore" or "[a]fter" the existing alias instead of "[i]nsert" or "[a]ppend." Note how the new usage flows better. * mh-customize.el (mh-alias): Changed manual link in defgroup from Customizing mh-e to Aliases. (mh-alias-grab-from-field button): mh-alias-from-has-no-alias-p renamed to mh-alias-for-from-p and no longer returns surprising value if there isn't a From field. Therefore, enable button if there is a From header field and mh-alias-for-from-p returns nil. (mh-letter-complete-function) (mh-alias-completion-ignore-case-flag, mh-alias-flash-on-comma) (mh-alias-insert-file, mh-alias-insertion-location) (mh-alias-local-users, mh-alias-local-users-prefix) (mh-alias-passwd-gecos-comma-separator-flag): Merge docstring with manual. (mh-alias-system-aliases): Moved to mh-alias.el. * mh-comp.el (mh-letter-complete-function-alist): Removed comment about making this customizable since I didn't think it seemed appropriate in the manual. (mh-letter-complete): Merge docstring with manual. 2003-09-23 Satyaki Das * mh-speed.el (mh-speed-flists): When exiting emacs, don't ask if the flists process should be killed. * mh-e.el (mh-folder-message-menu): Enable undo menu entry only if something can be undone. * mh-customize.el (undo): Enable undo button only if something can be undone. 2003-09-22 Peter S Galbraith * mh-customize.el (mh-identity-handlers): New defcustom. Alist of Handler functions for mh-identity (downcased) fields. (mh-identity-list): Add support for pgg-default-user-id. * mh-identity.el (mh-insert-identity): Modified to use `mh-identity-handlers', adding hacking flexibility for those who might need it. (mh-identity-field-handler): New function. Return the handler for a FIELD or nil if none set. The field name is downcased. (mh-identity-handler-gpg-identity): New function; handler for pgg pgp identities. It sets a buffer-local value for `mh-pgg-default-user-id' which must be handled by mh-send-letter. (mh-identity-pgg-default-user-id): New buffer-local variable to hold the requested key ID. (mh-identity-handler-signature): New function; handler t insert and remove signature files. (mh-identity-handler-default): New function; the default handler to insert or remove generic field. (mh-identity-handler-top): Insert a field at the top of the header. (mh-identity-handler-bottom): Insert a field at the bottom of the header. (mh-header-field-delete): Make more robust wrt the field having a trailing colon or not. (mh-identity-make-menu): Add a "Customize Identities" menu entry. * mh-loaddefs.el: Regenerated. 2003-09-21 Peter S Galbraith * mh-init.el (mh-variant-set): Bug fix for mh-variant long names with version numbers. * mh-e.el (mh-scan-format): patch from Sergey Poznyakoff. GNU mailutils now supports the %(decode) format 2003-09-20 Satyaki Das * mh-gnus.el (mh-mm-text-html-renderer): New function to query which HTML renderer is being used by Gnus. * mh-mime.el (mh-signature-highlight): Renderers used to display HTML parts garble the signature separator in various ways. The function has been modified to take that into account. (mh-mime-display-single, mh-mm-display-part): Pass the new optional argument to `mh-signature-highlight'. 2003-09-19 Mark D. Baushke * mh-mime.el (mh-have-file-command, mh-file-mime-type): Made an mh-autoload as they are used in mh-comp.el. * mh-loaddefs.el: Regenerated. 2003-09-18 Peter S Galbraith * mh-comp.el (mh-insert-fields): Make sure field has a colon. 2003-09-18 Satyaki Das * mh-seq.el (mh-toggle-tick): Don't hardcode the name of the tick sequencence in the function. This would have caused improper highlighting of the tick sequence if the user had changed its name. 2003-09-15 Satyaki Das * mh-e.el (mh-folder-message-menu): Fix a little bug which shows up as a problem during compilation (closes SF #806577). 2003-09-15 Mark D. Baushke * mh-customize.el (mh-invisible-header-fields-internal): Added a new field for GNU mailutils per Sergey Poznyakoff. 2003-09-09 Satyaki Das * mh-utils.el (vcard): Unconditionally load vcard.el, if available, so that vcards are always inlined. 2003-09-09 Peter S Galbraith * mh-mime.el (mh-file-mime-type-substitutions): Add entry to convert text/plain .vcf files to text/x-vcard. (mh-mime-content-types): Add text/x-vcard. 2003-09-09 Bill Wohler * mh-comp.el (mh-rejected-letter-start): Added strings for qmail and exim (addresses SF #404965). 2003-09-09 Satyaki Das * mh-gnus.el (mm-inline-text-vcard): Make vcard display work with Gnus-5.9. The extra file vcard.el is still needed. * mh-mime.el (mh-signature-highlight): New function that highlights message signatures. (mh-mm-display-part, mh-mime-display-single): Highlight signatures using `mh-signature-highlight' (closes SF #802722). More work is needed for XEmacs. (mh-mime-display): Highlight signature in non-MIME email too. * mh-customize.el (mh-show-signature-face): New face used to display message signature. 2003-09-08 Peter S Galbraith * mh-e.el (mh-version): Do something sensible when mh-variant-in-use is undefined. * mh-junk.el (mh-spamassassin-blacklist) (mh-spamassassin-whitelist): Change options to be compatoble with old version of spamassassin (V2.20). 2003-09-07 Mark D. Baushke * mh-mime.el (mh-access-types): Per RFC 2049, the "afs" access-type for message/external-body has been removed. Update the comments to reference the current MIME RFCs 2045, 2046 and 2049 rather than the obsolete RFC 1521. 2003-09-05 Peter S Galbraith * mh-e.el (mh-version): Bumped version number to 7.4.2+cvs. 2003-09-04 Satyaki Das * mh-utils.el (mh-picon-directory-list, mh-picon-directory): The mh-picon-directory-list variable supersedes mh-picon-directory. (mh-picon-existing-directory-list): New variable that contains the list of picon directories that actually exist. (mh-picon-set-directory-list): New function to update mh-picon-existing-directory-list from mh-picon-directory-list. (mh-picon-get-image): The function has been modified to search a list of possible picon source directories. The regexp to extract the username from the email address has been made smarter so that it can recognize email addresses of the form user+random@foo.net and extract "user" from there. (mh-picon-file-contents): The file type recognition code has been moved from mh-picon-get-image into this function. (mh-picon-generate-path): The function has been generalized so that searching multiple paths is now feasible. * mh-pick.el, mh-e.el: Checkdoc fixes. 2003-09-02 Satyaki Das * mh-identity.el (eval-when): It seems that the mh-comp-loaded code isn't required any more. 2003-08-30 Satyaki Das * mh-init.el (mh-variant-set): Replace `error' with `message' so that Emacs CVS will compile without errors if no MH variant is present. 2003-08-29 Satyaki Das * mh-init.el (mh-variant-set): Add interactive spec to the function. * mh-mime.el (mh-mhn-compose-external-type): Optional arguments are prompted for only if prefix arg is given. 2003-08-29 Mark D. Baushke * mh-mime.el (mh-mhn-compose-external-type): Modified to be interactive and prompts for many of the fields. Made an mh-autoload. (mh-access-types): New table derived from RFC2017, RFC1521 and RFC1738, used in a completing-read in mh-mhn-compose-external-type. * mh-loaddefs.el: Regenerated. 2003-08-26 Satyaki Das * mh-utils.el (mh-picon-image-types, mh-picon-get-image): Avoid compiler warnings. (mh-sub-folders-actual): Parsing of the output from folders has been modified, so that it also works for MH (closes SF #792300). * mh-junk.el (mh-spamassassin-whitelist): Avoid calling ietf-drums-parse-address if it isn't present. (mh-spamassassin-identify-spammers): Avoid use of puthash so that Emacs20 doesn't complain. * mh-e.el (mh-colors-available-p): Wrap call to display-color-cells in a mh-funcall-if-exists to avoid compiler warning in Emacs20. 2003-08-25 Satyaki Das * mh-e.el (mh-colors-available-flag, mh-folder-mode): New variable to track if colors are available and it is set appropriately in mh-folder-mode. (mh-colors-available-p, mh-colors-in-use-p): Two functions to check whether colors are available and if they are actually being used. (mh-add-sequence-notation): Just changing a scan line doesn't make font-lock refontify the line in Emacs20. So explicitly refontify the scan line in such a situation. (mh-internal-seq): If colors aren't being used then treat the tick sequence like a normal user sequence. * mh-seq.el (mh-put-msg-in-seq): Do font-lock highlighting after the messages have been added to the sequence. (mh-toggle-tick): Modified so that highlighting of the ticked messages will be properly done. If font-lock isn't being used or if colors aren't supported by the Emacs where MH-E is running, then the `%' character is used to annotate ticked messages. * mh-utils.el (mh-picon-image-types): Since Emacs20 doesn't have image-type-available-p, wrap calls to that function in ignore-errors. (mh-add-msgs-to-seq): Do the font-lock highlighting after the messages have been added. 2003-08-24 Bill Wohler * Makefile (MH-E-SRC): Replaced mh-xemacs-compat.el and mh-xemacs-icons.el with mh-xemacs.el. * mh-e.el: Don't require mh-xemacs-compat which no longer exists. The XEmacs stuff gets required by mh-customize.el which is required by mh-utils.el which is required by mh-e.el. This all happens before mh-xemacs-compat was required, so all should be well. * mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and mh-xemacs-icons.el with mh-xemacs.el. * mh-xemacs.el: New file from concatenation of mh-xemacs-compat.el and mh-xemacs-icons.el which were removed since their names exceeded DOS 8+3 limits. * mh-customize.el (mh-compose-skipped-header-fields): Use uppercase for field names. 2003-08-21 Bill Wohler * mh-customize.el (mh-sequences): Introduced new customization group for sequences. (mh-refile-preserves-sequences-flag, mh-tick-seq) (mh-update-sequences-after-mh-show-flag): Moved option from mh-folder to mh-sequences group. Synced docstring with manual. (mh-index-ticked-messages-folders): Since mh-tick-seq is customizable, use it instead of tick in the docstring. * mh-index.el (mh-index-ticked-messages): Since mh-tick-seq is customizable, use it instead of tick in the docstring. * mh-seq.el (mh-msg-is-in-seq): Can now specify an alternate message number with a prefix argument. (mh-narrow-to-tick): Since mh-tick-seq is customizable, use it instead of tick in the docstring. Also, use mh-tick-seq instead of tick in warning message. 2003-08-20 Peter S Galbraith * mh-customize.el: setq mh-variant to 'none when byte-compiling, since we don't care what MH variant (if any) is on the system at that point. * mh-init.el (mh-variant-set): Don't probe for MH variant when mh-variant is set to'none (during byte-compilation). 2003-08-19 Peter S Galbraith * mh-pick.el (mh-pick-single-dash): New defconst. Search components that are supported by single-dash option in pick. (mh-pick-regexp-builder): Use `mh-pick-single-dash' and adapt patch from Sergey Poznyakoff. * mh-comp.el (mh-reply): mu-mh supports `repl -group', thanks to Sergey Poznyakof. * mh-init.el: checkdoc fixes. 2003-08-19 Bill Wohler * mh-seq.el: (mh-edit-pick-expr): Renamed from mh-read-pick-regexp since the new name is more indicative of what the function does. Prompt now says "Pick expression" instead of "Pick regexp". (mh-narrow-to-subject): Rewrote function to behave like other similar functions. (mh-narrow-to-header-field, mh-narrow-to-range) (mh-narrow-to-tick): s/regexp/pick-expr/. (mh-widen, mh-narrow-to-from, mh-narrow-to-cc, mh-narrow-to-to): Synced docstrings with manual 2003-08-19 Bill Wohler Released MH-E version 7.4.2. * MH-E-NEWS, README: Updated for release 7.4.2. * mh-e.el (Version, mh-version): Updated for release 7.4.2. * mh-e.el (mh-folder-size, mh-folder-size-folder) (mh-folder-size-flist): If flist is not present use folder to find the number of messages in the folder. Also the .mh_sequences file is read to find the number of unseen messages (patch from 1.349 and branched for 7.4.2, closes SF #791021). * mh-utils.el (mh-flists-present-flag, mh-find-progs): Introduce a new variable to test for the presence of the flists program and set it in mh-find-progs. (mh-collect-folder-names): Use folders instead of flists. One advantage is that folders is available on MH while flists is not. Another is that if an explicit -sequence argument isn't given and Unseen-Sequence profile is not present then flists croaks while folders doesn't. (mh-collect-folder-names-filter): Don't consider folder names that start with a `.' character. This is needed since the folders command doesn't filter them out like flists does. (patches from 1.307 and 1.309 and branched for 7.4.2, closes SF #791021). 2003-08-18 Bill Wohler * mh-index.el (mh-index-sequenced-messages) (mh-index-new-messages, mh-index-ticked-messages): Updated docstrings from manual (closes SF #718833). * mh-customize.el (mh-variant): Checkdoc fix. (mh-index-new-messages-folders): Don't mention defvar in docstring, use `+inbox' instead. (mh-index-ticked-messages-folders): Don't mention defvar in docstring, use `tick' instead. * mh-comp.el (mh-repl-group-formfile): Checkdoc fix. 2003-08-18 Peter S Galbraith * mh-init.el (mh-variant-set, mh-sys-path, mh-variant-info): Add support for GNU mailutils. (mh-variant-mu-mh-info): New function to detect mu-mh and return info about it for `mh-variants'. * mh-e.el (mh-regenerate-headers): mu-mh has different error message for a invalid mesage list. 2003-08-18 Peter S Galbraith * mh-customize.el (mh-e): New defgroup. Sort of an alias for the 'mh group that a user might be more likely to find. 2003-08-18 Bill Wohler * mh-comp.el (mh-insert-auto-fields-done-local): Docstring tweak. (mh-compose-and-send-mail): Do not call mh-insert-auto-fields. This should be done only once in mh-send-letter. 2003-08-18 Peter S Galbraith * mh-comp.el (mh-letter-mode): Call `mh-find-path unconditionally, like elsewehere in MH-E. * mh-utils.el (mh-find-path): Run setup code only if `mh-find-path-run' is nil such that this is only done once. Also remove the `setq' for `read-mail-command' and `mail-user-agent'. 2003-08-18 Peter S Galbraith * mh-e.el: require 'mh-utils first * mh-customize.el (mh-variant): defcustom moved here. * mh-init.el (mh-variants): Made an mh-autoload. 2003-08-18 Peter S Galbraith * Makefile (MH-E-SRC): Added mh-init.el to MH-E-SRC. * mh-utils.el (mh-find-progs): Deleted. Make obsolete by mh-init.el. (mh-find-path): Call `mh-variants' instead of now obsolete `mh-find-progs'. (mh-path-search): Deleted. Was only used by `mh-find-progs'. * mh-e.el: require mh-init.el. (mh-version): Use simpler `mh-variant-in-use'. (mh-scan-format): Use (mh-variant-p 'nmh) instead of mh-nmh-flag. * mh-comp.el (mh-insert-x-mailer): Use simpler `mh-variant-in-use'. * mh-utils.el (mh-progs, mh-lib, mh-lib-progs) (mh-flists-present-flag): Moved to mh-init.el. (mh-nmh-flag): Deleted. Use (mh-variant-p 'nmh) instead. * mh-comp.el (mh-repl-group-formfile, mh-forward, mh-reply) (mh-send-letter): Use (mh-variant-p 'nmh) instead of mh-nmh-flag. * mh-mime.el (mh-edit-mhn, mh-mime-save-parts): Use (mh-variant-p 'nmh) instead of mh-nmh-flag. 2003-08-16 Bill Wohler * mh-customize.el (mh-folder-selection): New group to hold variables described in Folder Selection section in manual. (mh-default-folder-list, mh-default-folder-must-exist-flag, mh-default-folder-prefix): Moved to mh-folder-selection group. Updated docstrings per manual update. (mh-default-folder-for-message-function): New defcustom. Was a defvar in mh-utils.el. Updated docstring per manual update. * mh-utils.el (mh-default-folder-for-message-function): Moved to mh-customize.el. * mh-e.el (mh-folder-from-address, mh-prompt-for-refile-folder): Updated docstrings per manual update. * mh-unit.el (mh-unit-files): Added mh-init.el. 2003-08-16 Peter S Galbraith * mh-init.el: New file. Code to initialize the MH-E back-end. Highlights: (mh-variant): New defcustom. Users may customize `mh-variant' to switch between available variants. (mh-variants): Available MH variants are described in this variable. (mh-variant-in-use, mh-variant-p): Developers may check which variant is currently in use with the variable `mh-variant-in-use' or the function `mh-variant-p'. 2003-08-15 Bill Wohler * mh-customize.el (mh-auto-fields-list): The manual uses Fcc instead of fcc, so I've changed the user-visible text accordingly. I've left the const alone for backwards compatibility. 2003-08-14 Bill Wohler * mh-identity.el (mh-insert-identity): Changed signature deletion test to test for both markers, rather than testing to see if the start marker is bound. Since the start marker is defined in this file, it should always be bound. Suggestion by Satyaki. * mh-comp.el (mh-send-letter): Go to the top of the draft so that the user can see which header fields have been inserted. I think this is more important than leaving point alone or going to the end to see the signature since Mail-Followup-To or Bcc or cc could have some deleterious effects. * mh-customize.el (mh-auto-fields-prompt-flag): New variable. Non-nil means to prompt before sending if fields inserted. * mh-comp.el (mh-insert-auto-fields): Now return t if fields inserted; otherwise nil. (mh-send-letter): Deleted obsolete documentation about adding X-Mailer and X-Face. Prompt before sending if auto fields added and mh-auto-fields-prompt-flag is t. * mh-customize.el (mh-identity-list): Allow signature to come from mh-signature-file-name. In this case, the "signature" value is set to nil. This might not be the best implementation. Suggestions welcome. * mh-identity.el (mh-insert-identity): Now that the signature can be a nil value, moved test higher up in cond so that the test for a nil value would not be executed first prevening signature handling. Handle nil signature value by calling mh-insert-signature with no arguments which means to use mh-signature-file-name. * mh-comp.el (mh-insert-signature): Changed text of message if no signature inserted. * mh-customize.el (mh-identity-list): Changed "Signature" constant back to "signature" so it *won't* be backwards-incompatible any more. I discovered one could use the :tag keyword to get headline captalization in the menu. * mh-identity.el (mh-insert-identity): Ditto. * mh-identity.el (mh-identity-make-menu): Always build menu. Always create Insert Auto Fields menu item. Just don't enable it if mh-auto-fields-list is nil. Enable radio buttons always. Make None a radio button choice with the other identities. * mh-comp.el (mh-letter-menu): Removed cond on fboundp 'easy-menu-define. We don't do this elsewhere. 2003-08-13 Bill Wohler * mh-identity.el (mh-identity-make-menu, mh-insert-identity): Use headline capitalization in menu items. Even the internal names are exposed in the customize interface, so they need to be uppercase too. (mh-insert-identity): Rather than goto-char to mh-identity-signature-start before deleting, simply pass it to delete-region. When setting markers, use point-min-marker and point-max-marker instead of moving point. Set marker type of mh-identity-signature-start to t to fix a bug where changing identity deleted user's text. * mh-customize.el (mh-identity-list, mh-auto-fields-list): Reworked docstring. Use headline capitalization. Commented out implementation details for later deletion or resurrection upon popular demand. N.B. If your mh-identity-list contains "signature" then you will need to either edit your .emacs file manually, or delete your existing "signature" which will become a regular field with this change and create a new signature. I figured I could get away with this since 8.0 is a major release, and coinciding with the manual update will be a MAJOR release. I apologize profusely that I didn't catch this before it was released. (mh-identity-default): Use headline capitalization in example. 2003-08-12 Jeffrey C Honig * mh-customize.el (mh-alias-reloaded-hook): Define `mh-alias-reloaded-hook'. * mh-alias.el (mh-alias-reload): Run `mh-alias-reloaded-hook' after reloading the aliases. 2003-08-12 Mark D. Baushke * mh-comp.el (mh-insert-signature): Use functionp to avoid the possibility of doing a funcall on a void function. 2003-08-12 Bill Wohler * mh-customize.el (mh-identity): Point group manual link to new Identities section. (mh-signature-separator-flag): New variable which can be used to suppress the output of the signature separator. * mh-comp.el (mh-insert-signature): Use mh-signature-separator-flag. * mh-identity.el (mh-insert-identity): If the identity's signature file didn't exist, an fboundp error was thrown. This was fixed by removing signature tests that were redundant and out of date with the tests in mh-insert-signature. Removed second signature condition as it is now handled in the first signature condition. 2003-08-12 Peter S Galbraith * mh-identity.el (mh-insert-identity): Don't insert new lines on signatures anymore. * mh-comp.el (mh-insert-signature): Make sure signature file is readable before trying to insert it. 2003-08-11 Bill Wohler * mh-comp.el (mh-insert-signature): Unconditionally insert a newline so that signatures are inserted consistently, and so that there isn't any text after the cursor so that the user can start typing his message immediately. Use new variable and function mh-signature-separator and mh-signature-separator-p. * mh-customize.el (mh-delete-yanked-msg-window-flag): Checkdoc fix. (mh-signature-file-name): Updated docstring now that this variable can be a function. Added cross-references to mh-signature-separator, mh-signature-separator-regexp, and mh-signature-separator-p which might be used in such functions. * mh-identity.el (mh-insert-identity): Don't include signature if signature separator already present. Useful when running mh-edit-again. * mh-mime.el (mh-inline-vcard-p): Use mh-signature-separator-p. * mh-utils.el (mh-signature-separator-regexp): New variable containing "^-- $" which should be used when looking for the signature separator. (mh-signature-separator): New variable containing "-- \n" which should be used when inserting the signature separator. (mh-signature-separator-p): New function that returns non-nil if mh-signature-separator-regexp is found in the buffer. 2003-08-09 Satyaki Das * mh-utils.el (mh-x-image-scaling-function): Variable that contains function used to scale images. Possible choices are mh-x-image-scale-with-convert and mh-x-image-scale-with-pnm. (mh-convert-executable): Removed. (mh-x-image-scale-with-pnm, mh-x-image-scale-with-convert): New functions that scale images using pnm tools or ImageMagick. (mh-x-image-scale-and-display, mh-x-image-url-display): Use mh-x-image-scaling-function instead of mh-convert-executable. 2003-08-08 Peter S Galbraith * mh-comp.el (mh-insert-signature): Bug fix. Handle case of nil `mh-signature-file-name' and hooks correctly. * mh-identity.el (mh-insert-identity): Refactor to use mh-insert-signature * mh-comp.el (mh-signature-separator-p): Removed. * mh-comp.el (mh-insert-signature): Merge MIME awareness from mh-insert-identity into this command. Allow `mh-signature-file-name' to be a function to call. See if "-- " needs to be inserted only after hooks have run. 2003-08-07 Bill Wohler * mh-customize.el (mh-compose-skipped-header-fields): Added X-Image-URL. (mh-autoload): Removed cookies. They aren't necessary in mh-e.el, mh-utils.el, or mh-customize.el. * mh-e.el (mh-autoload): Removed cookies. They aren't necessary in mh-e.el, mh-utils.el, or mh-customize.el. * mh-identity.el (mh-insert-identity): Made regexp for signature separator more explicit. Hmmm, maybe we should create mh-signature-separator-regexp... * mh-index.el (mh-replace-string): Moved to mh-utils.el. * mh-utils.el (mh-replace-string): Moved here from mh-index.el. (mh-autoload): Removed cookies. They aren't necessary in mh-e.el, mh-utils.el, or mh-customize.el. * mh-comp.el (mh-insert-signature): Added file argument to insert a file other than mh-signature-file-name. Insert signature separator, unless file already contains one. 2003-08-06 Satyaki Das * mh-e.el (mh-folder-size, mh-folder-size-folder) (mh-folder-size-flist): If flist is not present use folder to find the number of messages in the folder. Also the .mh_sequences file is read to find the number of unseen messages. * mh-utils.el (mh-flists-present-flag, mh-find-progs): Introduce a new variable to test for the presence of the flists program and set it in mh-find-progs. 2003-08-06 Peter S Galbraith * mh-customize.el: Change the order of `mh-identity-list' and `mh-auto-fields-list' and remove byte-compilation defvar for `mh-identity-list'. This fixes a customization bug for `mh-identity-list', where it wasn't set correctly. * mh-identity.el (mh-identity-make-menu): mh-auto-fields-list may not be bound yet when initially loaded. 2003-08-06 Bill Wohler * mh-alias.el (mh-alias-add-address-under-point): Removed trailing period from messages. The conventions say that errors should not end with a period and that "Foo...done" messages should not end in a period, but they aren't explicit about messages in general. Given what the conventions *do* say, and because most of our messages don't end with a period, let's just say that messages in general don't end in a period, just like error messages. * mh-comp.el (mh-extract-rejected-mail, mh-letter-mode-message): Ditto. * mh-e.el (mh-refile-a-msg): Ditto. * mh-funcs.el (mh-undo-folder): Ditto. * mh-mime.el (mh-mime-save-parts): Ditto. * mh-seq.el (mh-subject-to-sequence-unthreaded) (mh-narrow-to-subject, mh-delete-subject): Ditto. * mh-index.el (mh-index-sequenced-messages) (mh-index-new-messages, mh-index-ticked-messages): Discovered that in general we should only use question marks in yes-or-no-p or y-or-n-p prompts, but not in other prompts that use completing-read and offer defaults. In these cases, use colons instead (closes SF #730470). * mh-mime.el (mh-mime-save-parts): Ditto. * mh-utils.el (mh-prompt-for-folder): Ditto. * mh-alias.el (mh-alias-apropos): Multiple messages are usually shown one at a time rather than appended. Send output to mh-aliases-buffer instead of *Help*. (mh-alias-local-users): Checkdoc fix. * mh-funcs.el (mh-undo-folder): Removed commented-out code since its deadline had expired. * mh-utils.el (mh-aliases-buffer): New buffer name, used in mh-aliases.el. 2003-08-06 Satyaki Das * mh-utils.el (mh-x-image-url-cache-canonicalize): Make this function work for XEmacs too. (mh-collect-folder-names): Use folders instead of flists. One advantage is that folders is available on MH while flists is not. Another is that if an explicit -sequence argument isn't given and Unseen-Sequence profile is not present then flists croaks while folders doesn't. (mh-collect-folder-names-filter): Don't consider folder names that start with a `.' character. This is needed since the folders command doesn't filter them out like flists does. * mh-index.el (mh-replace-string): Add autoload for it. 2003-08-05 Satyaki Das * mh-mime.el (mh-compose-forward, mh-mhn-compose-forw) (mh-mml-forward-message): The variable mh-sent-from-msg can be a list. So check that the value is really a number before using it like one. * mh-comp.el (mh-insert-letter): Same as above. * mh-utils.el (mh-picon-get-image): Make the code that finds the address of the sender more robust. (mh-face-display-function): Make it work with XEmacs. (mh-picon-image-types): A new variable that stores what image types can be used. 2003-08-05 Satyaki Das * mh-customize.el (mh-tool-bar-define): Make the save button such that is activated only if the buffer needs to saved. * mh-utils.el (mh-face-display-function, mh-picon-get-image): Some domains, for instance cs.cmu.edu, don't have xpm files. So we need to search for all three files. The change does that. (mh-picon-file-contents): A utility function to return the contents of a file as a string. (mh-picon-get-image): Write it as a loop to make it simpler. (mh-x-image-set-download-state): Make the link simpler. 2003-08-04 Satyaki Das * mh-utils.el (mh-x-image-url-display): Don't bother to try to download image if we don't have the necessary tools to display it. (mh-face-display-function): Add preliminary support for "domain" picons. (mh-picon-get-image, mh-picon-generate-path): Functions to find best match for domain in the From header field. * mh-e.el (mh-previous-unread-msg): If some of the messages in the unseen sequence are not present in the folder buffer then calling this function gets stuck and can't skip over them. The change fixes this. (mh-next-unread-msg): Same as above. 2003-08-04 Bill Wohler * mh-utils.el (mh-show-mode): Added cross reference to mh-folder-mode in docstring (closes SF #728638). Added \\{mh-show-mode-map} to show keymap. * mh-e.el (mh-folder-mode): Added information about ranges to docstring (closes SF #728638). * mh-speed.el (mh-speed-refresh): New function that calls mh-speed-flists and mh-invalidate-map. (mh-folder-speedbar-key-map): Replaced keybindings for mh-speed-invalidate-map and mh-speed-flists with a single binding for mh-speed-refresh. (mh-folder-speedbar-menu-items): Replaced menu items for Run Flists and Invalidate Cached Folders with the single menu item Refresh Speedbar in order to simplify the UI. * mh-customize.el (mh-fetch-x-image-url): Added DOS as another reason not to set this to t. 2003-08-04 Satyaki Das * mh-e.el (mh-scan-folder): Handle ranges from user input properly. 2003-08-03 Satyaki Das * mh-utils.el (mh-find-msg-get-num): Removed. If threading isn't present, the messages are sorted by index. So `mh-goto-msg' was implemented as a binary search and this function was used in that implementation. So this isn't needed any more. (mh-msg-search-pat): Removed. Before the advent of message threading, this function was used to generate a regexp used to search for a particular message. It isn't used anymore. The variable `mh-scan-msg-number-regexp' should be updated and used in `mh-goto-msg' instead of hardcoding the regexp in the code. Then we might be able to better support other scan line formats in the future. * mh-seq.el (mh-map-to-seq-msgs, mh-notate-seq): Removed. These functions were used to notate user sequences. But calling `mh-goto-msg' inside of a loop is inefficient. So the sequence notation code was rewritten thereby making these functions redundant. (mh-copy-line-to-point): Removed. This function was used in the implementation the now removed function `mh-copy-seq-to-point'. That function was problematic and was replaced by the less general `mh-copy-seq-to-eob'. This makes `mh-copy-line-to-point' redundant. (mh-region-to-msg-list): Removed since this is a special case of the more general `mh-range-to-msg-list'. * mh-loaddefs.el: Regenerated. 2003-08-03 Jeffrey C Honig * mh-customize.el (mh-invisible-header-fields-default): Added several new fields to hide. Sorted the list with sort-lines. 2003-08-03 Peter S Galbraith * mh-customize.el (mh-invisible-headers): Variable renamed to `mh-invisible-header-fields-compiled'. (mh-invisible-headers): Implement above change. * mh-utils.el (mh-display-msg): Idem. * mh-mime.el (mh-mm-inline-message): Idem. * mh-comp.el (mh-insert-letter): Idem. 2003-08-03 Bill Wohler * mh-speed.el (mh-folder-speedbar-menu-items): Added separator between standard and MH-E menu items. Use headline capitalization in menu items. * mh-utils.el (mh-temp-fetch-buffer): New constant to hold buffer name for wget output. (mh-x-image-url-fetch-image): Use mh-temp-fetch-buffer instead of hard-coded buffer name. Use make-temp-file to avoid race conditions and subsequent security issues raised in make-temp-name docstring. 2003-08-03 Satyaki Das * mh-utils.el (mh-wget-executable, mh-wget-choice, mh-wget-option) (mh-x-image-url-fetch-image): Support the use of `curl' and `fetch' as alternatives to `wget'. (mh-wget-choice): Change order of search. (mh-x-image-url-fetch-image): Rename buffer. 2003-08-03 Satyaki Das * mh-utils.el (mh-x-image-set-download-state) (mh-x-image-get-download-state): Specially named symbolic links are used to keep track of whether a X-Image-URL header field needs to downloaded the next time it is seen. These functions get and set the symlinks appropriately. (mh-x-image-url-fetch-image): Simplified since the query has been moved to `mh-x-image-url-display'. Also if wget isn't present then try again next time since the user might install wget before trying once more. (mh-x-image-scale-and-display): Handle absence of the `convert' program better. If it isn't present then we will try to display the image the next time it is encountered. Also use the -geometry option to convert since the -resize option isn't present in older versions. (mh-x-image-url-display): Move all the code that decides whether an X-Image-URL header field will be fetched in this function. Also remember the user's decision so that if the image couldn't be fetched the first time, we will try to fetch it later on without asking again. 2003-08-02 Peter S Galbraith * mh-alias.el (mh-alias-local-users): Exclude all aliases already in mh-alias-alist from `ali' (closes SF #772595). 2003-08-01 Satyaki Das * mh-utils.el (mh-x-image-display, mh-x-image-url-display): Avoid a race. The X-Image-URL is displayed asynchronously. Suppose a message with a image is shown with `mh-show'. If a different message is displayed before the image can be fetched, then the new message will have the image displayed. With this change the race is less likely to happen. 2003-08-01 Peter S Galbraith * mh-inc.el (mh-inc-spool-map): Fix what `mh-inc-spool-map-help' must look like as a fake `mh-help-messages' in order to work correctly in mh-help. 2003-07-31 Bill Wohler * mh-inc.el (mh-inc-spool-map): Use mh-help instead of mh-ephem-message in order to display help in its own buffer instead of minibuffer. * mh-utils.el (mh-help-buffer): New variable to hold the name of the MH-E help buffer name. * mh-funcs.el (mh-help, mh-prefix-help): Use with-electric-help to display help messages. I observed a friend with a vision disability and the 5 seconds the help appeared on the screen was not long enough for him to lock on it. I've therefore changed the help function to display the help in its own buffer called *MH-E Help* (closes SF #493740 and SF #656631). * mh-customize.el (mh-fetch-x-image-url): Changed default from nil to 'ask. Updated docstring from manual. (mh-invisible-header-fields-internal): Added X-Image-URL. (mh-show-use-xface-flag): Updated docstring from manual. (mh-x-face-file): Ditto. * mh-mime.el (mh-mhn-compose-external-type): Don't insert the directory parameter if it's nil. The mhbuild man page indicates that this parameter is optional, so this should be fine. * mh-comp.el (mh-letter-mode-map): Added keybindings for mh-mhn-compose-anon-ftp and mh-mhn-compose-external-compressed-tar. (mh-letter-menu): Uncommented menu items for same. 2003-07-30 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-pick.el (mh-do-pick-search): Removed since the function `mh-pick-do-search' performs the same action as this function. * mh-index.el (mh-index-update-unseen): Removed since the generalized sequence synchronization code that keeps sequences in index folders in sync with the sequences in the source folders makes this function redundant. * mh-e.el (mh-folder-unseen-seq-name, mh-folder-unseen-seq-list): Removed. These two functions were used in the unseen sequence highlighting before the sequence highlighting code was generalized. In any event calls to the function `mh-folder-unseen-seq-name' can be replaced by the variable `mh-unseen-seq' and calls to `mh-folder-unseen-seq-list' can be replaced with (cdr (assoc mh-unseen-seq mh-seq-list)). (mh-unmark-all-headers): Removed since this function has been superseded by mh-remove-all-notation. (mh-map-over-seqs): Removed since we now have the generalized iteration over message ranges (the `mh-iterate-on-range' macro) that can be used instead. (mh-notate-if-in-one-seq): Removed. This function was used for changing the `%' notation for user sequences. It can't be used for that purpose any more, since we have a different scheme now. * mh-unit.el (mh-unit-tests): Removed since it isn't needed any more. (mh-unit): Run all function that start with the string "mh-unit-test-". 2003-07-30 Bill Wohler * mh-customize.el (mh-invisible-header-fields): Checkdoc fix. * mh-utils.el (mh-x-image-url-cache-canonicalize): Shortened using example in files.el:make-backup-file-name-1. (mh-face-display-function): Added X-Image-URL to docstring. * mh-unit.el (mh-unit-x-image-url-cache-canonicalize): New function to test mh-x-image-url-cache-canonicalize since it lent itself well to unit testing. Had to start somewhere! (mh-unit-equal): New function that throws an error if RESULT doesn't equal EXPECTED. (mh-unit): Call mh-unit-x-image-url-cache-canonicalize. 2003-07-29 Satyaki Das * mh-unit.el (mh-unit-update-call-graph): Make the function work better with dotted lists, that is lists of the form (a b c . d) where `d' isn't nil. With this we are able to avoid marking some functions as unused even though they are actually used in alists. 2003-07-28 Peter S Galbraith * mh-comp.el (mh-insert-letter): Remove `mh-visible-headers' operation. * mh-mime.el (mh-mm-inline-message): Same. * mh-utils.el (mh-display-msg): Same. (mh-clean-msg-header): Make a note of above change. * mh-customize.el (mh-invisible-header-fields-internal): Renamed from prior `mh-invisible-header-fields-default'. (mh-invisible-header-fields-default): Renamed from prior `mh-invisible-header-fields-default-override'. (mh-invisible-header-fields): Renamed from prior `mh-invisible-header-fields-user'. (mh-visible-headers): Removed! We use invisible fields only now. (mh-visible-header-fields): Removed! 2003-07-28 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields-default): Added 3 new fields to hide. 2003-07-28 Satyaki Das * mh-utils.el (mh-show): Add an extra argument to the function so that interactive use will always force redisplay of the message. * mh-mime.el (mh-mime-display, mh-mm-inline-message): Bind the variables `mm-verify-option' and `mm-decrypt-option' so that verification and decryption of mail can happen without any additional tinkering. 2003-07-25 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields-default): New defvar holding default fields to hide. This replaces the old `mh-invisible-header-fields' defcustom. (mh-invisible-header-fields-user): New defcustom. Users add fields to suppress that we didn't include in `mh-invisible-header-fields-default'. This could be named simply `mh-invisible-header-fields' and it wouldn't really break anything for users who have customized it to a long list now redundant with `mh-invisible-header-fields-default'. (mh-invisible-header-fields-default-override): New defcustom. Users check off the fields they want displyed from what we included in `mh-invisible-header-fields-default'. (mh-invisible-headers): Function adapted to new variables. 2003-07-25 Satyaki Das * mh-e.el (mh-inc-folder): If the user is in a different folder displaying a message and runs mh-inc-folder, then the folder changes to +inbox but the show window continues to display the message in the old folder. The change fixes this. (mh-visit-folder): Make the handling of the show window similar to that of mh-inc-folder. 2003-07-24 Satyaki Das * mh-e.el (mh-folder-message-menu, mh-folder-folder-menu): Use the predicate mh-outstanding-commands-p instead of its exapansion. Also use the same label in both menus. (mh-outstanding-commands-p): Generalized so that it will work in mh-show-mode buffers as well. * mh-customize.el (mh-tool-bar-define): Enable tool-bar button for mh-execute-commands only if there are pending deletes or refiles. 2003-07-19 Satyaki Das * mh-utils.el (mh-show-msg): If a unseen message is first marked for deletion/refiling and then displayed, the bold highlighting does not go away. This change fixes that. * mh-seq.el (mh-msg-is-in-seq): Fix a bug in the function. If any message was marked for refiling, then the function would have you believe that every message in the folder is being refiled. 2003-07-17 Bill Wohler * mh-e.el: Removed email address for Stephen Gildea's in Change Log at his request (damn spammers). Removed other email addresses while I was at it since the SourceForge URL should be sufficient contact information. (mh-scan-format-*mh): Fixed typo in comment above these variables. These variables are used if mh-scan-format-file is t, not nil. Also mh-scan-format-file is no longer "above" (courtesy Stephen Gildea). 2003-07-17 Satyaki Das * mh-mime.el (mh-mhn-quote-unescaped-sharp): New function that quotes `#' characters in the first column that aren't part of a MHN directive. (mh-mhn-directive-present-p): Generalized to allow the function to search for MHN directives in a part of the buffer. (mh-edit-mhn): Quote unescaped `#' characters in the draft (closes SF #762464). 2003-07-16 Satyaki Das * mh-alias.el (mh-alias-read-address-map): If mh-alias-flash-on-comma is nil when mh-alias is loaded, then setting mh-alias-flash-on-comma to t later on doesn't turn on address completion display till Emacs is restarted. The change fixes this. 2003-07-15 Bill Wohler * mh-utils.el (mh-cmd-note): Cleaned up docstring (changed phrase to sentences). Moved to Scan Line Formats section. (mh-scan-msg-number-regexp) (mh-scan-msg-overflow-regexp, mh-scan-msg-format-regexp) (mh-scan-msg-format-string, mh-scan-msg-search-regexp): Cleaned up docstrings (changed phrases to sentences). (mh-note-seq): Cleaned up docstring (changed phrase to sentences). Also, this variable is now a character and not a string. Moved to Scan Line Formats section. * mh-funcs.el (mh-note-copied, mh-note-printed): Cleaned up docstrings (changed phrases to sentences). Also, these variables are now characters and not strings. * mh-e.el (mh-scan-format-mh, mh-scan-format-nmh): Filled. I was hoping to quote the hint `t' but checkdoc wouldn't let me. (mh-note-deleted, mh-note-refiled, mh-note-cur): Moved to Scan Line Formats section. (mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp) (mh-scan-refiled-msg-regexp, mh-scan-valid-regexp) (mh-scan-cur-msg-number-regexp, mh-scan-date-regexp) (mh-scan-rcpt-regexp, mh-scan-body-regexp) (mh-scan-subject-regexp, mh-scan-format-regexp): Cleaned up docstrings (changed phrases to sentences). (mh-scan-cur-msg-regexp): Marked this variable as obsolete; it should be removed for 8.0. * mh-comp.el (mh-note-repl, mh-note-forw, mh-note-dist): Cleaned up docstrings (changed phrases to sentences). Also, these variables are now characters and not strings. 2003-07-15 Satyaki Das * mh-index.el (mh-index-update-single-msg) (mh-index-create-sequences): Handle the situation where there are copies of the exact same message correctly. 2003-07-15 Satyaki Das * mh-seq.el (mh-thread-update-scan-line-map): Modified since notation is already a character. * mh-utils.el (mh-note-seq): Convert from string to character. (mh-notate): Modified since characters are used to notate instead of strings of length one. * mh-comp.el (mh-note-repl, mh-note-forw, mh-note-dist): Convert from string to characters. * mh-e.el (mh-note-deleted, mh-note-refiled, mh-note-cur): Same as above (closes SF #770772). (mh-unmark-all-headers): Modified since mh-note-* variables are now characters. (mh-remove-sequence-notation): The mh-notate function remembers the previous notation. Before the change to the mh-note-* variables, mh-notate would only remember the change if a string was used to notate the message. Now mh-notate is always called with a character notation. So the deletion has to take place explicitly. 2003-06-28 Bill Wohler * mh-mime.el (mh-mhn-directive-present-p): If shell comments are present that have a space after the # but no content, then this function would throw an error. This has been fixed (closes SF #762458). 2003-06-27 Satyaki Das * mh-index.el (mh-index-search): Use the new and improved mh-index-new-folder. (mh-index-new-folder): Improved so that redoing the same search will reuse the old index folder. (mh-index-folder-search-regexp): New function which that extracts out the search expression that produced the index folder. 2003-06-24 Bill Wohler * mh-e.el (Version, mh-version): Set to 7.4.1+cvs. 2003-06-25 Bill Wohler Released MH-E version 7.4.1. * MH-E-NEWS, README: Updated for release 7.4.1. * mh-e.el (Version, mh-version): Updated for release 7.4.1. 2003-06-25 Bill Wohler * mh-unit.el (require 'cl): Added. Needed when compiling separately. * Makefile (clean): Now a double-colon rule. Added a second clean target to remove mh-unit.elc. (compile): Removed mh-unit.elc. (mh-unit.elc): New target used to compile mh-unit. 2003-06-24 Bill Wohler * mh-e.el (Version, mh-version): Set to 7.4+cvs. 2003-06-24 Bill Wohler Released MH-E version 7.4. * MH-E-NEWS, README: Updated for release 7.4. * mh-e.el (Version, mh-version): Updated for release 7.4. 2003-06-24 Bill Wohler * mh-alias.el (mh-alias-gecos-name, mh-alias-local-users) (mh-alias-suggest-alias): s/gcos/gecos. The original acronym was GECOS but was later renamed to GCOS (see http://info.astrian.net/jargon/terms/g/GCOS.html). But the term really needs to match the field named pw_gecos in struct passwd in /usr/include/pwd.h * mh-customize.el (mh-letter-faces): New group to house mh-letter-header-field-face. (mh-interpret-number-as-range-flag) (mh-kill-folder-suppress-prompt-hook): Use "you" instead of "the user" to make text more friendly. (mh-index-ticked-messages-folders, mh-visible-headers) (mh-visible-header-fields): Alphabetized. (mh-alias-passwd-gcos-comma-separator-flag): Alphabetized and s/gcos/gecos. (mh-alias-local-users-prefix): Fixed docstring. Prefixes are prepended, not appended. Additional checkdoc fix. (mh-letter-header-field-face): Set group to new group mh-letter-faces and moved option into this group. * mh-index.el (mh-index-sequenced-messages): Improved wording of docstring and mentioned use of prefix argument. * mh-seq.el (mh-widen): Made docstring more accurate (hopefully!). 2003-06-18 Satyaki Das * mh-index.el (mh-replace-string): Modified to preserve case of replacement text. (mh-index-parse-search-regexp): Preserve case of search terms. This is needed to take advantage of the acronym indexing in swish++ (closes SF #755718). 2003-06-13 Satyaki Das * mh-utils.el (mh-show-index-sequenced-messages): Interactive function callable from the show buffer. (mh-show-folder-map): Add key binding for "F q". * mh-e.el (mh-folder-map): Same as above. * mh-index.el (mh-index-sequenced-messages): Add interactive spec to the function (closes SF #718833). 2003-06-13 Bill Wohler * mh-index.el (mh-flists-execute): Needed to expand mhpath too. 2003-06-12 Satyaki Das * mh-index.el (mh-flists-execute): Modified so that flists present in mh-progs is called. 2003-06-07 Jeffrey C Honig * mh-comp.el (mh-forward, mh-forward): Use (mh-mail-header-end) to find the end of headers instead of doing an re-search-forward based on mh-mail-header-separator. 2003-06-06 Satyaki Das * mh-comp.el (mh-letter-toggle-header-field-display): Make the function callable from the show buffer. This means that the buffer is temporarily made writable and the modification status of the buffer restored to the original value. 2003-06-06 Peter S Galbraith * mh-utils.el (mh-address-mail-regexp): Bug fix! It wasn't a true copy of the goto-addr variable. My modification only recognized addresses with one dot after the @. Sorry about that. 2003-06-05 Satyaki Das * mh-utils.el (mh-replace-in-string): Move comment into doc string to satisfy checkdoc. * mh-alias.el (mh-alias-apropos): Checkdoc fix. 2003-06-05 Bill Wohler * mh-customize.el (mh-identity-list): Fixed typo in docstring. 2003-06-05 Peter S Galbraith * mh-comp.el (mh-letter-complete-function-alist): Add bcc an reply-to. 2003-06-04 Peter S Galbraith * mh-comp.el (mh-letter-complete-function-alist): Add dcc. 2003-06-03 Peter S Galbraith * mh-utils.el (mh-replace-in-string): New function name instead of `dired-replace-in-string'. * mh-alias.el (mh-alias-gcos-name): Use it. * mh-alias.el (mh-alias-apropos): New command. Show all aliases that match REGEXP either in name or content. * mh-alias.el (mh-alias-suggest-alias): Add no-comma-swap optional arg. (mh-alias-canonicalize-suggestion): Change a comma to a period in created aliases. (mh-alias-local-users): Call `mh-alias-suggest-alias' with `no-comma-swap' arg set to t. * mh-alias.el (mh-alias-local-users): Fix case of nil `mh-alias-passwd-gcos-comma-separator-flag'. * mh-alias.el (mh-alias-gcos-name): Fix for case of empty gcos name field. (mh-alias-local-users): Fix same. * mh-alias.el (mh-alias-canonicalize-suggestion): Replace use by verbose `replace-regexp' by a looped `replace-match' 2003-06-02 Peter S Galbraith * mh-utils.el (dired-replace-in-string): Bind if not already defined. Borrowed from dired.el * mh-alias.el (mh-alias-gcos-name): switch to using dired-replace-in-string. 2003-06-02 Satyaki Das * mh-utils.el (mh-letter-font-lock-keywords): Fontify header fields in the draft buffer that aren't skipped when navigating with TAB (or S-TAB). * mh-customize.el (mh-clean-message-header-flag) (mh-invisible-headers, mh-invisible-header-fields) (mh-alias-passwd-gcos-comma-separator-flag): Checkdoc fix. (mh-letter-header-field-face): New face to fontify the header fields. * mh-comp.el (mh-insert-auto-fields-done-local): Checkdoc fix. (mh-letter-mode, mh-letter-mail-header-end-marker): Remember the end of the message header in a marker. This is used to fontify the header fields. (mh-font-lock-field-data, mh-letter-header-end): Functions used to fontify message header fields. * mh-alias.el (mh-alias-gcos-name): Checkdoc fix. 2003-06-02 Peter S Galbraith * mh-alias.el (mh-alias-gcos-name): New function. Return a usable address string from a GCOS-NAME and USERNAME. (mh-alias-local-users): Use it. * mh-customize.el (mh-alias-passwd-gcos-comma-separator-flag): New defcustom. Whether the gcos field in the passwd file uses comma as a separator. * mh-customize.el (mh-alias-local-users-prefix): New defcustom. String to append to the real names of users from the passwd file. If nil, use the username string unmodified instead of the real name from the gcos field of the passwd file. * mh-alias.el (mh-alias-local-users): Use it to generate aliases which by default are now the real name prefixed by "local." 2003-06-01 Peter S Galbraith * mh-comp.el (mh-modify-header-field): Bug fix. Calling with with a value that was already inserted causes it to get inserted a second time. I have wrapped the value around \b word delimiters. Hope there are no side effects for other code. * mh-comp.el (mh-insert-auto-fields): Attempt regardless of `mh-insert-auto-fields-done-local' flag in interactive use. * mh-comp.el (mh-insert-auto-fields-done-local): Keep track of whether `mh-insert-auto-fields' was called in a buffer. (mh-insert-auto-fields): Set it and use it. Also, don't enter an identity if one was already entered manually. (mh-send-letter): Call `mh-insert-auto-fields' again when sending message. (mh-compose-and-send-mail): Call `mh-insert-auto-fields' _after_ `mh-letter-mode' so `mh-identity-local' doesn't get cleared by the mode invocation. 2003-06-01 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-thread-parse-scan-line): The value of mh-scan-field-from-start-offset was hardcoded in one place. The change fixes that. * mh-utils.el (mh-show-mode): Setup mh-show-mode to display elipsis for truncated header fields and to skip over them quickly. (mh-clean-msg-header): Make another pass over the message header fields truncating long headers. * mh-comp.el (mh-letter-complete): Remove unnecessary autoload. (mh-letter-toggle-header-field-display): Take into account that an empty line can also end the message header. The function was originally written with the draft buffer in mind. 2003-06-01 Mark D. Baushke * mh-comp.el (mh-letter-mode-map): Do not steal C-t. Use C-c C-t for the mh-letter-toggle-header-field-display command. 2003-05-31 Peter S Galbraith * mh-customize.el (mh-visible-headers): Changed to a defvar that will be set using new `mh-visible-headers' function using `mh-visible-header-fields' as input. (mh-visible-headers): New function, described above. (mh-visible-header-fields): New defcustom. The UI to set `mh-visible-headers'. (mh-invisible-header-fields-set): Deleted. Code merged into defcustom since it's so short. 2003-05-31 Satyaki Das * mh-comp.el (mh-letter-toggle-header-field-display): Extended to truncate headers if they are too long. (mh-letter-truncate-header-field): Make code that would be duplicated into a function. (mh-letter-hide-all-skipped-fields): Modified so that fields that are important are hidden if they are too long. 2003-05-31 Satyaki Das * mh-utils.el ("tool-bar"): Since tool-bar isn't available on XEmacs, requiring it causes problems. So load it instead. (mh-do-at-event-location): New macro to do stuff at location of events. This has been refactored out of mh-push-button. * mh-mime.el (mh-push-button): Simplified since it now uses the mh-do-at-event-location macro. * mh-comp.el (mh-hidden-header-keymap): Keymap to make mouse clicks on header toggle its display. (mh-letter-toggle-header-field-display-button): Interactive function to toggle header display when mouse button is clicked. 2003-05-31 Peter S Galbraith * mh-e.el (mh-folder-mode): Remove conditional on tool-bar-mode. * mh-comp.el (mh-letter-mode): Same. * mh-utils.el (mh-show-mode): Same. 2003-05-30 Satyaki Das * mh-utils.el (tool-bar): Load tool-bar explicitly. This avoids problems with incorrect initialization of tool-bar-map otherwise. 2003-05-30 Peter S Galbraith * mh-comp.el (mh-modify-header-field): Minor fix of spaces for when an entry already existed. (mh-insert-auto-fields): Make interactive. Add optional `quiet' arg for use when called systematically on every buffer. Won't be used interactively for more verbose output. (mh-letter-mode-map): Add \C-c\M-d keybinding for mh-insert-auto-fields. * mh-identity.el (mh-identity-make-menu): Add a menu entry in Identity menu for mh-insert-auto-fields. * mh-customize.el (mh-invisible-header-fields): Add entries for `Envelope-to' and `X-Original-To'. 2003-05-30 Satyaki Das * mh-comp.el (mh-letter-mode): Skip over invisible text quickly. 2003-05-30 Satyaki Das * mh-comp.el (mh-letter-mode): Use text properties to achieve invisibility. This is more portable and the same code can be used for all Emacs versions. (mh-letter-toggle-header-field-display): Rewritten to use text properties. (mh-dead-overlay-p, mh-letter-hidden-header-fields)): Removed. 2003-05-29 Satyaki Das * mh-comp.el (mh-letter-hidden-header-fields, mh-letter-mode): Add a hash table, initialized it in mh-letter-mode, to remember the overlays introduced to hide long headers fields. (mh-insert-x-mailer): checkdoc fix. (mh-compose-and-send-mail): Hide unimportant message header fields. (mh-letter-header-field-regexp, mh-letter-header-field-at-point) (mh-letter-next-header-field, mh-letter-previous-header-field): Add a variable that contains the header-field name regexp and use it instead of the regexp directly. (mh-letter-toggle-header-field-display, mh-letter-mode-map): Add new key binding in mh-letter-mode that toggles display of long header fields, in mh-letter-mode. (mh-dead-overlay-p): A predicate which checks if a given header field has an active overlay hiding it. (mh-letter-hide-all-skipped-fields): New function that shortens uninteresting headers. 2003-05-29 Eric Ding * mh-comp.el (mh-letter-next-header-field-or-indent): Call indent-relative rather than indent-for-tab-command. 2003-05-29 Satyaki Das * mh-comp.el (mh-letter-complete-or-space): The meaning of the customizable variable was reversed. Also make the doc string more accurate. 2003-05-28 Satyaki Das * mh-customize.el (mh-compose-skipped-header-fields): New customizable variable that lists headers that are skipped. (mh-compose-space-does-completion-flag): Option to do completion with space (closes SF #745634). * mh-comp.el (mh-insert-x-mailer): Check the value of mh-insert-x-mailer-flag in this function instead of in its caller. (mh-compose-and-send-mail, mh-send-letter): Insert X-Mailer and X-Face headers when the draft is first presented to the user instead of when the mail is sent (closes SF #745624). (mh-letter-complete-or-space): Allow for this key binding to be overridden. (mh-letter-next-header-field): Fix a problem with multiline header fields. (mh-letter-next-header-field, mh-letter-previous-header-field): Make these functions skip unwanted header fields. (mh-letter-skipped-header-field-p): New predicate that checks if a header field is to be skipped. * mh-seq.el (mh-thread-inc): Inc'ing email in threaded mode was causing duplication of the current notation. The change fixes that. 2003-05-28 Satyaki Das * mh-comp.el (mh-beginning-of-word): Generalize it to skip arbitrary number of words. (mh-letter-complete-or-space): New interactive function that allows space character to be used for completion. (mh-letter-mode-map): Add key binding to allow space to be used for completion. 2003-05-27 Satyaki Das * mh-customize.el (mh-compose-prompt-flag): Customizable variable that controls whether the user is prompted when composing a draft. It replaces mh-dont-prompt-for-address-flag (closes SF #745622). * mh-comp.el (mh-letter-next-header-field): If the point is in the header field name, then go the start of the header field instead of the next field. (mh-interactive-read-address, mh-interactive-read-string) (mh-letter-adjust-point): Use mh-compose-prompt-flag instead of mh-dont-prompt-for-address-flag. 2003-05-27 Satyaki Das * mh-customize.el (mh-tool-bar-define): Fix incorrect usage of set-specifier (closes SF #745655). Also the button enabling code interacts poorly with font-lock in XEmacs. So disable that. 2003-05-26 Satyaki Das * mh-e.el (mh-folder-from-address): The function message-fetch-field expects that the buffer is narrowed to the mail header. The change makes sure that this is indeed the case. * mh-mime.el (mh-add-missing-mime-version-header) (mh-decode-message-body): Same as above. 2003-05-25 Satyaki Das * mh-alias.el (mh-alias-minibuffer-confirm-address): Modified to use mh-beginning-of-word. * mh-comp.el (mh-letter-confirm-address): Calling mh-alias-reload-maybe can be expensive. So do it only if we really need to. 2003-05-25 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-letter-confirm-address): Load aliases if not yet loaded. * mh-alias.el (mh-alias-reload-maybe): Autoload it since it is used in mh-comp.el. 2003-05-24 Satyaki Das * mh-comp.el (mh-letter-skip-leading-whitespace-in-header-field): New function to skip leading space and tab characters when placing point in a header field. (mh-letter-next-header-field, mh-letter-previous-header-field): Skip leading whitespace when using TAB to navigate to header fields. (mh-letter-confirm-address): New interactive function that displays the last expansion of the last alias when "," is typed. (mh-letter-mode-map): Add key binding for "," (closes SF #745634). 2003-05-23 Satyaki Das * mh-comp.el (mh-edit-again, mh-forward, mh-send) (mh-send-other-window, mh-send-sub): Modified so that if mh-dont-prompt-for-address-flag is non-nil, then MH-E won't prompt for addresses to send mail to and instead directly jump to the draft (closes SF #745622). (mh-letter-complete-function-alist): An alist that is used to decide which completion function to use in which header. This variable should probably be customizable. (mh-letter-complete): Now uses mh-letter-complete-function-alist. (mh-letter-header-field-at-point, mh-letter-next-header-field) (mh-letter-next-header-field-or-indent) (mh-letter-previous-header-field): Commands for easier navigation to header fields. (mh-dont-prompt-for-address-flag): Variable which controls whether MH-E prompts for addresses. (mh-interactive-read-address, mh-interactive-read-string): Two functions to ask user for input depending on the value of the above flag. (mh-letter-adjust-point): New function that sets point to the first header field. (mh-letter-mode-map): Add key bindings for TAB and S-TAB (closes SF #745627). 2003-05-23 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-complete-word): New function which is approximately equivalent to mail-abbrev-complete-alias. (mh-beginning-of-word): Refactor repeated code into its own function. (mh-folder-expand-at-point): Make Fcc completion work in XEmacs by not using mail-abbrev-complete-alias. * mh-alias.el (mh-alias-letter-expand-alias): Make alias expansion work in XEmacs. Replace the use of the function mail-abbrev-complete-alias, which isn't present in XEmacs. * mh-mime.el (mh-mml-to-mime): If a MIME message is created immediately after starting MH-E then invoking mh-mml-to-mime causes an error because "message" isn't being loaded. The change works around this problem. (mh-mime-maybe-display-alternatives): Give better indication of which MIME parts are alternatives. 2003-05-22 Satyaki Das * mh-e.el (mh-add-sequence-notation, mh-remove-sequence-notation): Just delete and add the same character in the scan line to make font-lock refontify it. The previous trick of removing all text properties didn't work in XEmacs. * mh-seq.el (mh-put-msg-in-seq): Complain if the user tries to create an invalid MH sequence. * mh-mime.el (mh-mime-display-alternative): Modified to optionally display alternatives as buttons. (mh-mime-maybe-display-alternatives): New function which displays alternative MIME parts as buttons. (mh-mime-save-part): Initially mh-mime-save-parts-directory is nil and calling file-name-as-directory with nil arg leads to an error. So fall back on the default-directory in that case. * mh-customize.el (mh-display-buttons-for-alternatives-flag): New customizable variable that controls display of the alternative MIME parts (closes SF #741288). 2003-05-22 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields): Commented out "User-Agent:". It's similar to X-Mailer, so display it. 2003-05-21 Satyaki Das * mh-customize.el (mh-tool-bar-define): Add an optional argument to the button description that can dynamically enable/disable buttons. (mh-tool-bar-define): The alias grabbing button is disabled if the current message doesn't have a From header or if the sender is already in the user's alias. This functionality was inadvertently lost when the Emacs/XEmacs toolbar unification took place. 2003-05-20 Satyaki Das * mh-unit.el (mh-unit-construct-call-graph): Be more aggressive and flag interactive functions that aren't autoloaded or have no key bindings. (mh-unit-interactive-function-p): Remove now unused function. (mh-unit, mh-unit-construct-call-graph): Replace mh-files with mh-unit-files. 2003-05-20 Bill Wohler * mh-unit.el (mh-prune-trailing-spaces): Renamed to mh-unit-prune-trailing-spaces to clean up the namespace. (mh-files): Renamed to mh-unit-files. Ditto. (mh-unit): Checkdoc fix. * mh-index.el (mh-index-p): Added autoload cookie since mh-index-p is used by mh-customize.el. This calls for another mh-unit test that looks for mh-autoloads for functions that are no longer used in other files. * mh-loaddefs.el: Regenerated. 2003-05-20 Satyaki Das * mh-unit.el (mh-unit-construct-call-graph): Factor out the code to read the lisp files to a separate function. Also change it to construct a function call-graph. Autoloaded functions are taken into account. (mh-unit-find-all-used-functions, mh-unit-called-functions) (mh-unit-find-all-unused-functions): Find all unused functions by computing a fixed point starting from the set of top level functions. (mh-unit-analyze-block): Removed. (mh-unit-update-call-graph): mh-unit-functions-called was renamed with modifications to update the function call graph. 2003-05-19 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-notate): Modified to keep track of notation that was replaced when sequence notation is added. Thus when the sequence is deleted, the original notation is recovered. (mh-add-msgs-to-seq): Modified to work with the new sequence notation code. * mh-seq.el (mh-delete-seq, mh-put-msg-in-seq): Simplified since we don't need to handle tick and unseen sequences specially any more. (mh-narrow-to-seq): Don't need to call mh-notate-user-sequences since mh-copy-seq-to-eob already does that. (mh-widen): Remove sequence notation, so that notation when messages are replied to aren't lost. (mh-copy-seq-to-eob): Simplified with the use of mh-iterate-on-range. (mh-thread-inc): This function doesn't need to notate user sequences since its callers already do that. (mh-thread-parse-scan-line): Simplified since mh-note-seq doesn't appear in scan lines it is given as arguments. (mh-thread-update-scan-line-map): Remove the test, since its caller already does the required check. (mh-thread-folder): Simplified by the use of mh-iterate-on-range. (mh-tick-add-overlay, mh-tick-remove-overlay, mh-notate-tick): These functions aren't needed any more, since overlays aren't used any more. Also overlays aren't portable to XEmacs, so nasty conditional code that used overlays in Emacs and extents in Xemacs have been eliminated. (mh-toggle-tick): Generalize it to work on a range of messages like the other interactive messages. * mh-funcs.el (mh-undo-folder): Use mh-remove-all-notation instead of mh-unmark-all-headers. * mh-e.el (mh-folder-font-lock-keywords): The entry for unseen sequence highlighting is now done by the macro. (mh-generate-sequence-font-lock): New macro to highlight any arbitrary sequence. This macro is invoked twice to get the highlighting for unseen and tick sequences. (mh-sequence-notation-history, mh-folder-mode): New variable that keeps track of the old notation when a message is notated with mh-note-seq. (mh-regenerate-headers, mh-get-new-mail): Add appropriate calls to mh-notate-user-sequences and mh-remove-all-notation. (mh-unmark-all-headers): Add comment that this function shouldn't be used any more. (mh-add-sequence-notation, mh-remove-sequence-notation): New functions to notate message with mh-note-seq and to remove it. (mh-remove-all-notation): Simplified to use mh-iterate-on-range. (mh-process-commands): Use mh-remove-all-notation instead of mh-unmark-all-headers. (mh-notate-user-sequences, mh-delete-msg-from-seq): Simplified since the tick and unseen sequences don't need special handling any more. (mh-internal-seq): Make it possible to dynamically change what sequences are treated as internal (internal means font lock is used to highlight the sequence). (mh-clear-text-properties): Removed since it isn't needed anymore. 2003-05-19 Satyaki Das * mh-unit.el (mh-unit-analyze-block, mh-unit-interactive-function-p) (mh-unit-find-all-unused-functions): Change argument name bl to block. 2003-05-19 Satyaki Das * mh-unit.el (mh-unit-find-all-unused-functions): New interactive function to find all unused functions in MH-E. (mh-unit-analyze-block, mh-unit-interactive-function-p) (mh-unit-functions-called): Functions used by mh-unit-find-all-unused-functions do its job. * Makefile (compile): Byte-compile mh-unit.el, since the analysis to find unused code runs faster when compiled. 2003-05-18 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-notate-deleted-and-refiled): Add autoload declaration since this function is used in mh-index.el. * mh-e.el, mh-customize.el, mh-utils.el: Adjust require/provide statements so that mh-e.el isn't loaded twice. 2003-05-15 Satyaki Das * mh-utils.el (mh-defun-show-buffer): Arrange for the current line in the folder buffer to be highlighted even when we are in the show buffer. 2003-05-14 Satyaki Das * mh-seq.el (mh-read-range): Allow this to work on invalid sequences that only MH-E knows about. * mh-index.el (mh-create-sequence-map, mh-index-add-to-sequence) (mh-index-delete-from-sequence): Don't consider sequences that aren't valid MH sequences. * mh-e.el (mh-valid-seq-p): New predicate to check if a symbol could be a MH sequence. (mh-undefine-sequence, mh-define-sequence): Don't execute "mark" unless the sequence name is a valid MH sequence. * mh-utils.el (mh-exec-cmd): In case an error happens in the call-process and non-strings are present in ARGS, then the error message isn't properly displayed. The change fixes this. 2003-05-14 Peter S Galbraith * mh-mime.el (mh-mime-save-part): Bug Fix: Make sure `mm-default-directory' gets a trailing "/" if `mh-mime-save-parts-directory' doesn't have one. Otherwise the default in the prompt of `mh-mm-save-part' will be wrong. Perhaps `mh-mm-save-part' needs to do this check itself. 2003-05-14 Satyaki Das * mh-index.el (mh-unpropagated-sequences): New function and variable to keep track of sequences that shouldn't be propagated. (mh-create-sequence-map, mh-index-add-to-sequence) (mh-index-delete-from-sequence): Use mh-unpropagated-sequences to stop changes to some sequences being reflected back to the source folders. 2003-05-13 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-e.el (mh-process-commands): Preserve sequences when messages are refiled (closes SF #737128). * mh-index.el (mh-create-sequence-map) (mh-index-create-sequences): Refactor code that is reused into a new function. * mh-customize.el (mh-refile-preserves-sequences-flag): New customizable flag that controls whether sequences are preserved when messages are refiled. 2003-05-13 Eric Ding * mh-e.el (mh-scan-format): The argument for scan format files should be -form, not -format. 2003-05-13 Satyaki Das * mh-seq.el (mh-widen): The scan line map stack was not being properly updated when ALL-FLAG is non-nil. The change fixes that. * mh-e.el (mh-reset-threads-and-narrowing): The change resets the scan line map stack. 2003-05-12 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-thread-scan-line-map-stack) (mh-thread-old-scan-line-map): Instead of the old scan line map, now we need to maintain a stack of scan line maps. (mh-narrow-to-seq): Modified so that multiple level of narrowings can be done. We now maintain a stack of old views instead of hiding the old scan lines. This makes it possible to have multiple levels of narrowings. (mh-widen): A optional prefix arg was added to allow undoing all narrowing. (mh-read-seq-default, mh-read-range): Don't use mh-narrowed-to-seq, since it doesn't exist any more. (mh-thread-initialize-hash, mh-thread-initialize): The mh-thread-initialize function has been refactored. (mh-thread-update-scan-line-map): Maintain notations in the stack of scan line maps. (mh-notate-tick, mh-toggle-tick): Simplified, since we don't have mh-narrowed-to-seq any more. This means there is a slight loss of functionality. Earlier if we narrowed to the tick sequence the ticked messages weren't highlighted. This feature isn't present any more. * mh-e.el (mh-execute-commands, mh-reset-threads-and-narrowing) (mh-folder-sequence-menu, mh-get-new-mail): Use mh-folder-view-stack instead of the now removed mh-narrowed-to-seq. (mh-narrowed-to-seq, mh-tick-seq-changed-when-narrowed-flag): These variables have been removed. (mh-folder-view-stack): New variable to keep track of a stack of narrowings. (mh-execute-commands, mh-get-new-mail): Add extra argument to mh-widen so that all narrowings are undone. * Makefile (MH-E-SRC, MH-E-OTHERS): Move mh-gnus.el from MH-E-SRC to MH-E-OTHERS so that it isn't byte compiled. 2003-05-10 Satyaki Das * mh-seq.el (mh-read-seq): Improve the function a bit by adding history to the sequence prompt. 2003-05-09 Satyaki Das * mh-gnus.el: New file that won't be byte-compiled. From now on having different Gnus versions at run-time and compile-time won't cause errors in MH-E. * mh-mime.el (mh-small-show-buffer-p, mh-display-smileys) (mh-display-emphasis): Handle all legal values of font-lock-maximum-size. The existing code assumed didn't consider the case where it could be an alist. (mh-small-image-p): Simplified, so that aliasing XEmacs functions in Emacs isn't necessary any more. (mh-mm-display-part): Remove unnecessary call to fboundp. The mh-funcall-if-exists does that for us any way. (mh-defun-compat, gnus-local-map-property, mm-merge-handles) (mm-set-handle-multipart-parameter, mm-readable-p) (mm-long-lines-p, mm-keep-viewer-alive-p, mm-destroy-parts) (mh-mm-save-part, mm-handle-multipart-ctl-parameter): These compatibility functions have been moved to mh-gnus.el. * Makefile (MH-E-SRC): Add mh-gnus.el. * mh-seq.el (mh-narrow-to-header-field) (mh-current-message-header-field): Checkdoc fixes. * mh-e.el (mh-undefine-sequence): Since mh-coalesce-msg-list returns a list, apply is needed. 2003-05-09 Noel Cragg (tiny change) * mh-junk.el (mh-spamassassin-blacklist): Separate "--local" and "--no-rebuild" arguments to call-process. [Patch committed by satyaki] 2003-05-08 Satyaki Das * mh-seq.el (mh-translate-range): Take into account differnt semantics of split-string in Emacs and XEmacs. (mh-read-pick-regexp, mh-narrow-to-from, mh-narrow-to-cc) (mh-narrow-to-to, mh-narrow-to-header-field) (mh-current-message-header-field, mh-narrow-to-range): New narrowing functions that can select messages based on different message headers. * mh-utils.el (mh-show-limit-map): Add new narrowing functions callable from the show buffer. * mh-e.el (mh-help-messages): Add help text for new functions. (mh-limit-map): Add new narrowing functions (closes SF #732823). 2003-05-07 Satyaki Das * mh-utils.el (mh-collect-folder-names): Use mh-exec-daemon to run flists. This means we don't have to remember to expand the MH executable in the mh-progs path. (mh-exec-cmd-daemon): Return the new process object produced. 2003-05-06 Satyaki Das * mh-e.el (mh-folder-font-lock-unseen): Use mh-seq-list to do unseen sequence highlighting instead of reading the .mh_sequences file from disk every time. 2003-05-05 Satyaki Das * mh-utils.el (mh-show-sequence-map): Add key binding for S' (closes SF #732825). * mh-e.el (mh-sequence-map): Ditto. (mh-help-messages): Updated for S'. 2003-05-04 Satyaki Das * mh-index.el (mh-index-write-data): The with-temp-buffer macro is a bit better than write-file, so use that instead. 2003-05-03 Satyaki Das * mh-index.el (mh-index-update-maps, mh-index-search) (mh-index-sequenced-messages): Write index data to disk. This allows us to recover index folder information if Emacs is restarted, or the index folder is visited after the buffer has been killed (closes SF #701762). (mh-index-write-data, mh-index-read-data) (mh-index-write-hashtable, mh-index-read-hashtable): Functions to store and read index data information to disk. (mh-index-insert-folder-headers, mh-index-group-by-folder): We can no longer use object identity to compare strings, since they might have been read back from disk. * mh-e.el (mh-index-data-file): New variable that stores the name of the file that keeps track of index folder data. (mh-make-folder): Read index folder data if available. * mh-utils.el (mh-show, mh-summary-height, mh-modify): Make checkdoc happy. * mh-seq.el (mh-tick-add-overlay): Rearrange code to make code more uniform. * mh-loaddefs.el: Regenerated. 2003-05-02 Satyaki Das * mh-seq.el (mh-tick-add-overlay): If a message with a short scan line is ticked, then the highlighting didn't extend to the right margin. This change fixes that. 2003-05-01 Bill Wohler * mh-e.el (mh-help-messages): Added brackets around / and downcased limit to be consistent with other commands with punctuation keybindings. Don't document aliases. 2003-05-01 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-read-range): Fix comment. 2003-04-30 Mark D. Baushke * mh-e.el (mh-help-messages): Better documentation for the F map. 2003-04-30 Satyaki Das * mh-utils.el (mh-find-path): Cache folder names so that folder name completion is always fast. (mh-flists-partial-line, mh-flists-process): Variables used for pre-caching folder names. (mh-collect-folder-names, mh-collect-folder-names-filter) (mh-populate-sub-folders-cache): Functions to pre-cache folder names. (mh-exec-cmd): Produce more info in *MH-E Log*. * mh-index.el (mh-index-search): Call the correct function. (mh-index-sequenced-messages): If folders is nil, then all mail is searched. The change restores that. 2003-04-30 Peter S Galbraith * mh-customize.el (mh-summary-height): Move variable integer out of defcustom, and instead specify that `nil' means to calculate that size dynamically. Fixes SF #723267. * mh-utils.el (mh-summary-height): New function. Return ideal mh-summary-height value for current frame height. (mh-show-msg): Use it. 2003-04-30 Mark D. Baushke * mh-index.el (mh-index-ticked-messages): Fix prompt and description string. (mh-index-new-messages): Ditto. * mh-loaddefs.el: Regenerated. * mh-index.el (mh-index-sequenced-messages): Renamed from mh-index-new-messages with minor argument change. (mh-index-new-messages): Implement by calling mh-index-sequenced-messages with the appropriate arguments. (mh-index-ticked-messages): New function. Does the same thing as mh-index-new-messages, but on its own set of folders and using the mh-tick-seq instead of mh-unseen-seq. * mh-e.el (mh-folder-map): Add "F'" to the map for mh-index-ticked-messages. (mh-help-messages): Replace broken [t]hread with [n]ew messages. * mh-customize.el (mh-index-ticked-messages-folders): New user customizable flag that controls the folders to be searched by mh-index-ticked-messages. * mh-utils.el (mh-show-index-ticked-messages): Wrapper for mh-index-ticked-messages. (mh-show-folder-map): Add "F'" to the map for mh-index-ticked-messages. 2003-04-30 Satyaki Das * mh-index.el (mh-index-search): The old cur in the source folder might not exist. This could cause mh-exec-cmd to fail. So don't add an error message in that case. 2003-04-29 Satyaki Das * mh-e.el (mh-folder-from-address): Modified to allow multiple Cc: headers to work properly. (mh-inc-folder, mh-visit-folder): Fix an off by one error. * mh-utils.el (mh-notate): Update the scan line map. This fixes a tiny bug. In threaded view, if a message is replied to then the message is notated with a "-". Now if inc is done then the "-" added is lost. The change fixes this. * mh-seq.el (mh-translate-range): Use the correct function. (mh-thread-update-scan-line-map): New function that updates the scan line map when a message is notated. 2003-04-28 Satyaki Das * mh-index.el (mh-index-parse-search-regexp): Avoid compiler warning in GNU Emacs 21.3. * mh-seq.el (mh-widen): Ditto. 2003-04-28 Satyaki Das * mh-customize.el (mh-interpret-number-as-range-flag): New user customizable flag that controls whether a single number, N is interpreted as the range last:N. * mh-seq.el (mh-read-range): Generalize it for use when reading range to scan. (mh-interactive-range): Modified to use the new mh-read-range. * mh-speed.el (mh-speed-view): Use mh-read-range instead of the now removed mh-read-msg-range function. * mh-funcs.el (mh-pack-folder): Ditto. * mh-e.el (mh-rescan-folder, mh-visit-folder): Ditto. (mh-read-msg-range): Removed. * mh-loaddefs.el: Regenerated 2003-04-27 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-range-completion-function): Fix checkdoc warning. (mh-iterate-on-range): Mention that the macro can iterate over a MH message range too. 2003-04-27 Bill Wohler * mh-unit.el (mh-unit): As it turns out, lm-crack-copyright has been updated to handle multiple-line copyrights in 21.3, so updated code to run lm-verify only if user has 21.3 or greater. Delete buffers after use, unless user already had buffer open. 2003-04-27 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-index.el (mh-index-search): The MH command "refile" changes cur. The change restores cur in source folders. (mh-index-new-messages): Use the appropriate arguments for mh-read-seq. * mh-seq.el (mh-read-seq-default, mh-read-seq): Restore these functions to just read sequence names. (mh-range-seq-names, mh-range-history, mh-range-completion-map) (mh-range-completion-function, mh-read-range): New function which reads MH range with completion and history. (mh-interactive-range): Use mh-read-range instead of mh-read-seq-default. (mh-put-msg-in-seq): Change documentation about MH message range. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Change documentation about MH message range. * mh-funcs.el (mh-copy-msg, mh-print-msg): Ditto. * mh-e.el (mh-delete-msg, mh-delete-msg-no-motion) (mh-refile-msg, mh-undo, mh-delete-msg-from-seq): Ditto. * mh-comp.el (mh-forward): Ditto. 2003-04-26 Satyaki Das * mh-comp.el, mh-e.el, mh-funcs.el, mh-junk.el, mh-seq.el: Replace msg-or-seq with range everywhere. * mh-loaddefs.el: Regenerated. 2003-04-25 Satyaki Das * mh-e.el (mh-index-sequence-search-flag, mh-folder-mode): New local variable to remember that a folder buffer contains results from a sequence search. This is needed so that "C-u F i" will work as expected. (mh-visit-folder): Create sequences in the index folder. (mh-process-commands, mh-delete-msg-from-seq): If speedbar is on then update the speedbar message counts immediately. (mh-delete-msg-from-seq): Make the code faster by calling "mark" just once. Also update source folder sequence if messages are being deleted from a sequence in an index folder. (mh-undefine-sequence): Simplified to remove the speedbar updating code. Also DTRT and don't change any sequence when called with an empty list of messages. (mh-refile-msg, mh-delete-msg): Move to next message only if the current message has been deleted or refiled, as the case may be. * mh-utils.el (mh-show-msg): Update the message counts in the speedbar, if it is on, immediately. (mh-speed-flists-active-p, mh-speed-flists-inhibit-flag): A new flag has been added which inhibits updating of the speedbar. This is used to avoid needless speedbar updates when mh-execute-commands is called in index folders. * mh-speed.el (mh-speed-flists): Extended so that multiple folders can be given as arguments. Also the code that kept track of the current folder, needed since flists adds an extra ?+ char at the end of the current folder name, wasn't entirely correct. That has also been fixed. * mh-seq.el (mh-delete-seq, mh-put-msg-in-seq): Modified so that sequence in source folder is updated if we delete a sequence in an index folder. (mh-read-seq, mh-read-seq-default, mh-translate-range) (mh-interactive-msg-or-seq): The mh-interactive-msg-or-seq function can read in an arbitrary MH message range. (mh-iterate-on-msg-or-seq): The macro has been extended to work on a MH range. (mh-subject-to-sequence, mh-subject-to-sequence-unthreaded) (mh-subject-to-sequence-threaded, mh-thread-find-msg-subject): Fix the mh-subject-to-sequence function so that it will work in threaded folders too. (mh-tick-add-overlay): Fix a leak of overlays. (mh-toggle-tick): Ticking, or unticking, messages in the index folder is propagated to the source folders (closes SF #709664). * mh-index.el (mh-flists-results-folder, mh-flists-sequence) (mh-flists-called-flag): New variables to implement searching for arbitrary sequences. (mh-index-generate-pretty-name): Updated so that folder names are generated for flists search that can take any sequence name. (mh-index-search): Since sequences are now properly maintained the unseen-flag argument isn't needed and hence removed. Also redoing a sequence search with "C-u F i" is handled correctly. Finally the speedbar is updated to reflect the new index folder created. (mh-index-create-sequences): New function that creates sequences in the index folder. (mh-index-matching-source-msgs, mh-index-execute-commands): Improved so that scan lines for refiled/deleted messages are removed from the source folders as well. (mh-index-add-to-sequence, mh-index-delete-from-sequence): New functions to update sequences in source folder to reflect changes in index folder. (mh-index-quote-for-shell): A utility function to that quotes characters with special meaning to /bin/sh. (mh-flists-execute, mh-index-new-messages): Updated to search for arbitrary sequences (closes SF #718833). * mh-loaddefs.el: Regenerated. 2003-04-25 Bill Wohler * mh-customize.el (mh-kill-folder-suppress-prompt-hook): New hook used by mh-kill-folder to suppress the prompt. * mh-funcs.el (mh-kill-folder): Suppress prompt not if mh-index-data is non-nil, but if any functions in mh-kill-folder-suppress-prompt-hook return non-nil. * mh-index.el (mh-index-p): New function with returns non-nil if the current folder was generated by an index search for use by mh-kill-folder-suppress-prompt-hook * mh-unit.el (mh-unit): Commented out lm-verify step until code updated to handle split Copyright lines. * mh-e.el (mh-version): Set to 7.3+cvs. 2003-04-24 Bill Wohler Released MH-E version 7.3. * MH-E-NEWS, README: Updated for release 7.3. * mh-e.el (Version, mh-version): Updated for release 7.3. 2003-04-24 Satyaki Das * mh-xemacs-compat.el (mh-utils): Require mh-utils at compile time, since the mh-do-in-xemacs macro is used. * mh-inc.el (cl): Require cl at compile time since we are using the loop and setf macros. 2003-04-24 Satyaki Das * mh-unit.el (mh-files): Fix the list of files to check. 2003-04-24 Bill Wohler * ChangeLog: Appended copyright to end of file. * Makefile: Added copyright and license. * README: Added copyright. * import-emacs: Changed copyright from Newt Software to Bill Wohler and use license from mh-e.el, except that this file is a part of MH-E, not GNU Emacs. * mh-alias.el: Updated copyright so that it doesn't wrap upon advice from Richard Stallman who said to use two-digit years when they are surrounded by 4-digit years that are in the same century and to break up copyrights on multiple lines. * mh-comp.el: Ditto. * mh-e.el: Ditto. * mh-funcs.el: Ditto. * mh-identity.el: Ditto. * mh-mime.el: Ditto. * mh-seq.el: Ditto. * mh-utils.el: Ditto. * mh-xemacs-compat.el: Ditto. * mh-unit.el: New file. Unit tests for MH-E. This version merely runs checkdoc and lm-verify which is useful before releasing the software. It can and should be expanded to do real unit tests. 2003-04-22 Mark D Baushke * mh-alias.el: Update Copyright. * mh-comp.el: Ditto. * mh-customize.el: Ditto. * mh-e.el: Ditto. * mh-funcs.el: Ditto. * mh-identity.el: Ditto. * mh-index.el: Ditto. * mh-mime.el: Ditto. * mh-pick.el: Ditto. * mh-seq.el: Ditto. * mh-speed.el: Ditto. * mh-utils.el: Ditto. * mh-xemacs-compat.el: Ditto. 2003-04-22 Satyaki Das * mh-utils.el (mh-normalize-folder-name): Make the completion code work properly with XEmacs. This change is neeeded since split-string behaves differently in XEmacs than it does in GNU Emacs. (mh-exec-cmd-error): Add a comment, so that we change it later on. 2003-04-18 Steve Youngs * mh-xemacs-icons.el (mh-xemacs-icons): Provide 'mh-xemacs-icons' not 'mh-xemacs-toolbar'. * mh-xemacs-compat.el (mh-xemacs-toolbar): Remove require, it's now called 'mh-xemacs-icons' and it is required from 'mh-customize'. * mh-customize.el: Require 'mh-xemacs-icons' instead of 'mh-xemacs-toolbar'. 2003-04-17 Peter S Galbraith * mh-xemacs-icons.el: New file (renamed from mh-xemacs-toolbar.el). Holds XEmacs icons. * mh-xemacs-toolbar.el: Deleted. * Makefile: Incorporate the file renaming. 2003-04-15 Bill Wohler * mh-comp.el (mh-forward): Pass a list of messages into mh-compose-and-send-mail instead of msg-or-seq. (mh-annotate-msg): The previous version called mh-iterate-on-msg-or-seq in the letter buffer. The new version simply adds the ability to operate on message lists. Thanks to Satyaki for the fix and suggestion for passing a list from mh-forward. 2003-04-14 Bill Wohler * mh-comp.el (mh-annotate-msg): Updated to handle msg-or-seq for mh-forward was passing a msg-or-seq to mh-compose-and-send-mail which in turn passed the msg-or-seq to mh-annotate-msg. In particular, forwarding a region failed. Note that the msgs argument in much of mh-comp.el should really be converted to msg-or-seq accordingly. But not now, unless something is broken as was the case here. We can revamp after the release. 2003-04-13 Bill Wohler * mh-funcs.el (mh-kill-folder): Added space after prompt to give the (yes or no) bit a little elbow room. * mh-xemacs-toolbar.el: Removing a copyright is a no-no. Reinstated Steve's copyright. 2003-04-12 Satyaki Das * mh-utils.el (mh-do-in-gnu-emacs, mh-do-in-xemacs): Add indentation hooks for the macros. 2003-04-11 Bill Wohler * mh-alias.el, mh-comp.el, mh-customize.el, mh-funcs.el, mh-identity.el, mh-inc.el, mh-index.el, mh-junk.el, mh-utils.el: Merged in changes from CVS GNU Emacs. These included the removal of trailing whitespace. * mh-customize.el: The "anti-entropy" check-in. Moved groups around slightly to reflect commentary. Moved defcustoms around to preserve alphabetization. Big diff, little content. (mh-xemacs-use-toolbar-flag): Doc fix. (mh-xemacs-toolbar-position): Fixed typo in docstring. (mh-default-folder-list): Updated docstring to reflect new Check Recipient tag. Also, set type of Address to regexp. (mh-x-mailer-string): Moved to mh-comp.el where it is used. * mh-comp.el (mh-x-mailer-string): Moved here from customize.el. Not quite sure how it got to mh-customize.el in the first place. * mh-e.el (mh-folder-folder-menu): Added Folder -> View New Messages menu item. * mh-utils.el (mh-show-folder-menu): Ditto. * mh-inc.el: Added Change Log comment (lm-verify fix). * mh-index.el (mh-index-search): Added documentation about prefix argument for users, in addition to documentation for programmers. * mh-mime.el (mh-edit-mhn, mh-edit-mhn, mh-mml-to-mime): Docstring fixes germaine to the change whereby we now check for MIME directives before sending. * mh-xemacs-toolbar.el: Fixed copyright. Added Change Log comment (lm-verify fix). Added standard MH-E local variables. Removed time-stamp stuff. 2003-04-11 Satyaki Das * mh-seq.el (mh-iterate-on-msg-or-seq): Add a missed comma. 2003-04-10 Satyaki Das * mh-index.el (mh-index-visit-folder): Prompt before reusing existing folder buffer. * mh-xemacs-toolbar.el (require): Require mh-utils at compile time to avoid compilation error when doing "make bootstrap" in CVS Emacs. * mh-inc.el (mh-inc-spool-list): Declare it so that a compile time warning is avoided when doing "make bootstrap" in CVS Emacs. 2003-04-10 Peter S Galbraith * mh-inc.el (mh-inc-spool-generator): Changed to a defun instead of a defmacro, applying Satyaki's patch. (mh-inc-spool-def-key): same. (mh-inc-spool-make): same. * mh-utils.el: define-key "I" in mh-show-mode-map for mh-inc-spool-map. * mh-comp.el (mh-modify-header-field): Remove debug message. 2003-04-10 Peter S Galbraith * mh-inc.el (mh-inc-spool-map-help): Default to nil. (mh-inc-spool-map): Make "?" key display message when `mh-inc-spool-map-help' is nil (instead of mh-inc-spool-map-help containing the message). * mh-e.el: require mh-inc.el * mh-e.el: define-key "I" in mh-folder-mode-map for mh-inc-spool-map. (mh-help-messages): Add help string for "I" key. 2003-04-09 Peter S Galbraith * mh-inc.el: New file. New feature to `inc' mail from various spool files into different folders. * mh-loaddefs.el: Regenerate for mh-inc's mh-inc-spool-list-set. * Makefile (MH-E-IMG): Add highlight icon. (MH-E-SRC): Add mh-inc.el file. * mh-customize.el (mh-inc-spool-list): New variable for new feature to `inc' mail from various spool files into different folders. 2003-04-09 Satyaki Das * mh-utils.el (mh-mail-delivery-buffer): Add a defconst for mh-mail-delivery-buffer. * mh-comp.el (mh-send-letter): Use mh-mail-delivery-buffer. * mh-mime.el (mh-small-image-p): Add mh-funcall-if-exists to avoid compiler warning in GNU Emacs. 2003-04-08 Satyaki Das * mh-mime.el (mh-small-image-p): Make the function slightly more error-resistant in XEmacs. * mh-seq.el (mh-narrow-to-seq, mh-widen): Update tool-bar-map in the show buffer if needed. This allows us to display the widen button in the show buffer only when the folder is narrowed. * mh-customize.el (mh-tool-bar-define): Changed so that a separate tool-bar-map is used in show-mode when folder is narrowed to a sequence. 2003-04-08 Satyaki Das * mh-seq.el (mh-iterate-on-msg-or-seq): Reinstate the use of make-symbol since using gensym causes compiler warnings in CVS Emacs. 2003-04-08 Bill Wohler * mh-comp.el (mh-forward): Function didn't handle a region of messages. Use new function mh-msg-or-seq-to-msg-list to get a list of messages in all circumstances. Also, use mh-coalesce-msg-list on message list before submitting to forw since this should always be done when calling a program to reduce the chance of exceeding command-line limits. * mh-seq.el (mh-iterate-on-msg-or-seq): Backed out previous change. A nil msg-or-seq should mean no messages, and Satyaki is going to use gensym instead of make-symbol. (mh-msg-or-seq-to-msg-list): New function to convert a msg-or-seq to a list of message numbers. * mh-e.el (mh-coalesce-msg-list): Touched up the docstring a little. * mh-funcs.el (mh-print-msg): Can now print regions, message lists, sequences and, of course, single messages. This version works a little differently from the old version. Instead of calling mhl | lpr once on all messages, mhl | lpr is called once per message in order to put each message's number in the header. Thanks to Satyaki for some code and ideas. * mh-seq.el (mh-iterate-on-msg-or-seq): The argument msg-or-seq can now be nil which means the current message. Make local symbols so that local variables don't step on user's symbols (the msgs symbol got me). 2003-04-06 Bill Wohler * mh-comp.el (mh-forward): Updated docstrings to indicate that a list of messages is acceptable as well. * mh-e.el (mh-delete-msg, mh-delete-msg-no-motion, mh-refile-msg) (mh-undo, mh-notate-user-sequences, mh-delete-msg-from-seq): Ditto. * mh-funcs.el (mh-copy-msg, mh-print-msg): Ditto. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Ditto. * mh-seq.el (mh-put-msg-in-seq, mh-iterate-on-msg-or-seq) (mh-interactive-msg-or-seq): Ditto. 2003-04-06 Satyaki Das * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Call mh-refile-a-msg and mh-delete-a-msg with nil as the message number since that is more efficient. * mh-seq.el (mh-iterate-on-msg-or-seq): Extended so that it will handle lists of messages numbers as well. (mh-put-msg-in-seq): Use mh-iterate-on-msg-or-seq to simplify the function. * mh-funcs.el (mh-copy-msg): Same as above. * mh-e.el (mh-refile-msg): Make it more efficient. Using nil in mh-refile-a-msg avoids needing to re-search-forward to that message. (mh-undo): Fix typo in interactive spec. (mh-notate-user-sequences): Generalize the function to take a msg-or-seq as argument. (mh-delete-msg-from-seq): Extend the function so that it is now able to subtract messages belonging in one sequence from another. (mh-undo): Unify the region and sequence handling. The message number branch of the function does extra stuff, so we can't merge that in. 2003-04-06 Bill Wohler * mh-comp.el (mh-forward): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. (mh-reply): Don't mention default in opening line in all docstrings. * mh-e.el (mh-delete-msg, mh-refile-msg) (mh-undo, mh-delete-msg-from-seq): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. In mh-delete-msg-from-seq, renamed msg-or-region to msg-or-seq. * mh-funcs.el (mh-copy-msg, mh-print-msg): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Inserted consistent verbiage in docstring for msg-or-seq. * mh-seq.el (mh-msg-is-in-seq): Don't mention default in opening line in all docstrings. (mh-put-msg-in-seq): Use mh-interactive-msg-or-seq. Inserted consistent verbiage in docstring for msg-or-seq. * mh-e.el (mh-delete-msg, mh-delete-msg-no-motion, mh-refile-msg): Rewritten to use new mh-interactive-msg-or-seq function and mh-iterate-on-msg-or-seq macro. mh-delete-msg-no-motion gained the ability to operate on regions. * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist): Rewritten to use new mh-interactive-msg-or-seq function and mh-iterate-on-msg-or-seq macro thereby gaining the ability to operate on sequences or regions. * mh-seq.el (mh-iterate-on-msg-or-seq): New macro to execute code on a message, a region of messages, or a sequence. This macro should be in all functions that operate on messages to provide a uniform interface. (mh-interactive-msg-or-seq): New function used in interactive calls to obtain a message number, region, or sequence. This function should be in all functions that operate on messages to provide a uniform interface. * mh-utils.el (with-mh-folder-updating, mh-in-show-buffer): Use 'defun lisp-indent-hook property instead of 1 to fix indentation of these macros. 2003-04-05 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-funcs.el (mh-ephem-message): autoload. 2003-04-04 Peter S Galbraith * mh-e.el (mh-folder-from-address): Minor Fix. Wrong ending of `when' block. 2003-04-04 Satyaki Das * mh-mime.el (mh-mml-directive-present-p): The regexp has been modified to recognize directives to encrypt/sign messages. 2003-04-03 Mark D. Baushke * mh-e.el (mh-folder-from-address): E-mail messages missing the To: field, but which have a Cc: field should also be handled. 2003-04-03 Bill Wohler * mh-e.el (mh-inc-folder): Modified the prompt text to read better. * mh-comp.el (mh-forward): Deleted local variable `compose'. Deleted obsolete setting of mh-{mmh|mml}-compose-insert-flag. (mh-letter-menu): Use mh-{mmh|mml}-directive-present-p instead of obsolete. mh-{mmh|mml}-compose-insert-flag. (mh-letter-mode): Deleted obsolete setting of mh-{mmh|mml}-compose-insert-flag. (mh-send-letter): This function now automatically runs the directive-to-MIME conversion if any directives are detected, rather than relying on the unreliable mh-{mmh|mml}-compose-insert-flag variables. Updated docstring accordingly. * mh-identity.el (mh-insert-identity): Use mh-{mmh|mml}-directive-present-p instead of obsolete. mh-{mmh|mml}-compose-insert-flag. * mh-loaddefs.el: Regenerated. * mh-mime.el (mh-mhn-compose-type, mh-mhn-compose-external-type) (mh-mhn-compose-forw, mh-edit-mhn, mh-mml-to-mime) (mh-mml-forward-message, mh-mml-attach-file) (mh-mml-secure-message-sign-pgpmime) (mh-mml-secure-message-encrypt-pgpmime): Deleted obsolete setting of mh-{mmh|mml}-compose-insert-flag. (mh-mml-directive-present-p): Checkdoc fix. * mh-utils.el (mh-mhn-compose-insert-flag, mh-mml-compose-insert-flag): Deleted. Replaced by mh-{mhn|mml}-directive-present-p. 2003-04-03 Mark D. Baushke * mh-e.el (mh-folder-from-address): Fix minor problem with To: address processing. * mh-e.el (mh-folder-from-address): Bugfix match ?+ character not a "?+" string. 2003-04-03 Peter S Galbraith * mh-e.el (mh-inc-folder): Add second optional argument for the folder to inc new mail into instead of mh-inbox. 2003-04-03 Peter S Galbraith * mh-e.el (mh-folder-from-address): The first match found in `mh-default-folder-list' is used. * mh-customize.el (mh-default-folder-list): Tweak docs 2003-04-03 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-mime.el (mh-mhn-directive-present-p): New function to test if a MHN directive is present in the current buffer. (mh-mml-directive-present-p): New function to test if a MML directive is present in the current buffer. * mh-comp.el (mh-letter-mode): Originally this function checked if a #forw directive was present and set mh-mhn-compose-insert-flag to t. The modification generalizes this test so that one of the variables mh-{mml|mhn}-compose-insert-flag will get set if we have any sort of MHN or MML directive is already present. * mh-seq.el (tool-bar-map): Add a defvar to avoid compiler warnings in CVS version of GNU Emacs. * mh-utils.el (tool-bar-map): Same as above. * mh-e.el (tool-bar-map): same as above. 2003-04-02 Satyaki Das * mh-xemacs-toolbar.el (mh-xemacs-toolbar-toggle-tick-icon): Change color to match mh-folder-tick-face. * highlight.xpm: Same as above. 2003-04-02 Peter S Galbraith * mh-e.el (mh-folder-from-address): Check `mh-default-folder-list' for cases against the recipient instead of the originator. * mh-customize.el (mh-default-folder-list): Add extra boolean flag to conditionally check the recipient address instead of the originator. 2003-04-02 Peter S Galbraith * mh-customize.el (mh-folder-tick-face): Change tick highlight face to a background yellow-green, as suggested by Bill. 2003-04-01 Peter S Galbraith * highlight.xpm: New icon for mh-toggle-tick. * mh-xemacs-toolbar.el (mh-xemacs-icon-map): Add tool-bar entry for mh-toggle-tick. (mh-xemacs-toolbar-toggle-tick-icon): New constant. * mh-customize.el: Add tool-bar entry for mh-toggle-tick. 2003-03-31 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-narrow-to-tick, mh-show-limit-map) (mh-show-sequence-menu): Add new interactive function mh-show-narrow-to-tick callable from the show buffer and arrange for a key binding and a menu entry. * mh-seq.el (mh-narrow-to-tick): New interactive function that narrows to the tick sequence. * mh-e.el (mh-folder-sequence-menu, mh-limit-map): Arrange for a key binding and a menu entry for mh-narrow-to-tick. * mh-comp.el (mh-letter-mode): Enable undo since we could be reusing a show buffer where undo is disabled (closes SF #712777). 2003-03-31 Peter S Galbraith * mh-e.el (mh-folder-sequence-menu): Add entry for mh-toggle-tick. * mh-utils.el (mh-show-sequence-menu): Add entry for mh-show-toggle-tick. 2003-03-28 Satyaki Das * mh-seq.el (mh-delete-seq): If the tick sequence is killed with "S k" then the highlighting wasn't getting removed. The change fixes this. 2003-03-27 Satyaki Das * mh-e.el (mh-notate-user-sequences): Extend it so that only the messages in a part of the folder are notated. (mh-delete-msg-from-seq): Extend it so that it will delete all messages in the marked region. (mh-delete-a-msg-from-seq): New function that deletes a single message from a sequence. (mh-clear-text-properties): If there is a ticked unseen message and the message is removed from the unseen list with "S d" then unticking the message doesn't change the highlight. This change fixes this. 2003-03-27 Peter S Galbraith * mh-xemacs-toolbar.el (mh-xemacs-toolbar-*-icon): Use original 24x24 icons, changing background only. 2003-03-27 Satyaki Das * mh-junk.el (mh-spamassassin-identify-spammers): Remove unused variable buffer-exists. (mh-spamassassin-identify-spammers): Remove unused variable user. * mh-customize.el (mh-junk-choose): Tweak it to remove XEmacs compiler warning. 2003-03-26 Satyaki Das * mh-seq.el (mh-thread-print-scan-lines): Handling of a boundary condition when messages from the last source folder had been removed was incorrect. This caused a folder header to appear without any messages listed under it. This change fixes this. (mh-thread-forget-message): Remove the entry from the scan line table as well. This is needed for proper display of threaded view of index folders. 2003-03-26 Bill Wohler * Makefile, README, import-emacs, mh-alias.el, mh-comp.el, mh-customize.el, mh-e.el, mh-funcs.el, mh-identity.el, mh-index.el, mh-loaddefs.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el, mh-xemacs-compat.el, mh-xemacs-toolbar.el: Removed RCS keywords per Emacs conventions (closes SF #680731). 2003-03-26 Satyaki Das * mh-index.el: Fix commentary to mention that mairix is supported as well. * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-junk-blacklist, mh-show-junk-whitelist): Interactive functions callable from the show buffer. (mh-show-junk-map): Key bindings in show mode. * mh-e.el (mh-junk-map): Key bindings to call spam program. (mh-help-messages): Update help text. * mh-customize.el (mh-junk): New customization group for spam program interface. (mh-junk-choice, mh-junk-function-alist, mh-junk-choose): Functions and variables that decide which junk program is used. (mh-junk-program, mh-junk-mail-folder): User customizable variables that control the choice of spam program and the action performed on received spam. * Makefile (MH-E-SRC): Add mh-junk.el. 2003-03-26 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-show-toggle-tick, mh-show-mode-map): New interactive function callable from the show buffer and a key binding for it. * mh-seq.el (mh-delete-seq): Remove highlight from tick sequence. (mh-put-msg-in-seq): Disable adding messages to tick sequence. (mh-widen): Reset mh-tick-seq-changed-when-narrowed-flag. (mh-tick-add-overlay, mh-tick-remove-overlay, mh-notate-tick) (mh-toggle-tick): New functions to highlight/unhighlight tick sequence and the interactive function that is used to toggle tick. * mh-e.el (mh-tick-seq-changed-when-narrowed-flag): New variable that remembers if we are narrowed to the tick sequence. In that case the highlighting isn't shown, since it adds no extra info. (mh-folder-mode): Initialize mh-tick-seq-changed-when-narrowed-flag. (mh-notate-user-sequences): Notate the tick sequence. (mh-internal-seq): Treat mh-tick-seq like an internal sequence. (mh-delete-msg-from-seq): Don't allow deletion from tick sequence. (mh-folder-mode-map): Add key binding for "'" * mh-customize.el (mh-tick-seq, mh-folder-tick-face): New customizable variables that contain the name of the tick sequence and the face to use to highlight it. 2003-03-25 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-thread-print-scan-lines): New function which prints out thread tree. It maintains the original folder info if the folder was created by index search (closes SF #709672). (mh-copy-seq-to-eob, mh-thread-inc, mh-thread-folder): Use factored out function mh-thread-print-scan-lines. (mh-toggle-threads): Since threading is allowed in index folders there can be lines in the folder which aren't valid message scan lines. So it is OK for mh-get-msg-num to fail once in a while. * mh-index.el (mh-index-update-maps): Make the parsing of messages that need to annotated with the X-MHE-Checksum header more robust. If the search yielded no results then an error was being produced. (mh-index-search): Enable automatic threading of index folders if mh-show-threads-flag is non-nil (closes SF #709667). (mh-index-next-folder): Relax error checking since index folder can be threaded while the source folder info is visible. (mh-index-group-by-folder): New function that is used in mh-thread-folder to keep source folder info visible during threading. 2003-03-25 Bill Wohler * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-index-new-messages-folders): New variable that controls which folders "F n (mh-index-new-messages)" accesses. Was mh-flists-search-folders. * mh-index.el (mh-flists-search-folders): Still used internally, but users now use new option mh-index-new-messages-folders. Removed documentation since to avoid duplication with mh-index-new-messages-folders. (mh-flists-recursive-search-flag): Deleted. Use mh-recursive-folders-flag instead. (mh-flists-execute): Updated docs to specify which global variables are used. Use mh-recursive-folders-flag instead of mh-flists-recursive-search-flag. (mh-index-new-messages): Edited doc, and refer to new option mh-index-new-messages-folders. Ditto within code. Don't need to prepend + to folder name as flists does that for us. Use 2003-03-24 Satyaki Das * mh-e.el (mh-refile-msg): Add optional argument that controls whether mh-last-destination-folder is updated or not. 2003-03-22 Satyaki Das * mh-customize.el (mh-tool-bar-define): Fix a problem in the XEmacs version which caused the show mode toolbar to have the buttons in the reverse order. Also the add-hooks are no longer needed since mh-toolbar-init is called in the appropriate modes. * mh-comp.el (mh-letter-mode): Call mh-toolbar-init in XEmacs to initialize toolbar. * mh-utils.el (mh-show-mode): Same as above. * mh-e.el (mh-folder-mode): Same as above. 2003-03-21 Satyaki Das * mh-utils.el (mh-exec-cmd-env-daemon): New function which executes a command asynchronously with its own environment. * mh-comp.el (mh-redistribute): The function has been modified so that /bin/sh isn't used to run send. It has also been refactored so that the same code isn't repeated. 2003-03-21 Bill Wohler * mh-customize.el (mh-invisible-header-fields): Added X-Bogosity for bogofilter. 2003-03-21 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-xemacs-toolbar.el: Remove the code since that gets generated when mh-tool-bar-define is expanded. (mh-xemacs-icon-map): A alist to map GNU Emacs icon names to the actual icons to be used in XEmacs. This is used in mh-tool-bar-define. * mh-customize.el (mh-toolbar): Use this group in XEmacs as well. (mh-tool-bar-item-*): All these constants have been removed since they aren't needed in the new scheme. (mh-tool-bar-reply-3-buttons-flag): This variable has been removed. (mh-tool-bar-search-function): This is now used in XEmacs as well. (mh-tool-bar-folder-set, mh-tool-bar-folder-buttons-set) (mh-tool-bar-letter-buttons-set, mh-tool-bar-show-set) (mh-tool-bar-letter-set): These functions aren't defined at the top level any more. (mh-tool-bar-reply-generator): A macro to generate the required functions for the three reply buttons. (mh-tool-bar-search, mh-tool-bar-customize) (mh-tool-bar-folder-help, mh-tool-bar-letter-help) (mh-tool-bar-reply-from, mh-show-tool-bar-reply-from) (mh-tool-bar-reply-to, mh-show-tool-bar-reply-to) (mh-tool-bar-reply-all, mh-show-tool-bar-reply-all): New interactive functions that are called when tool bar buttons are clicked. (mh-xemacs-use-toolbar-flag, mh-xemacs-toolbar-position): Additional customizable variables that are present only for XEmacs. (mh-tool-bar-define): A macro that generates the required code for GNU Emacs and XEmacs tool bar. (mh-tool-bar-define): Define the MH-E tool bar. 2003-03-17 Satyaki Das * mh-seq.el (mh-notate-cur): Notate current message only if it hasn't been marked for deletion or refiling. 2003-03-15 Bill Wohler * mh-customize.el (mh-invisible-header-fields): Added X-Spam-Checker-Version. (mh-auto-fields-list): checkdoc fix. 2003-03-12 Satyaki Das * mh-index.el (mh-index-new-messages): If the destination folder where the unseen messages are supposed to be copied to was already present, but MH-E doesn't have it open, then a new folder was being created. The change fixes this. (mh-index-update-unseen, mh-flists-recursive-search-flag): Fix checkdoc warnings. * mh-loaddefs.el: Regenerated. 2003-03-11 Satyaki Das * mh-index.el (mh-flists-results-folder): Subfolder under +mhe-index where the results of the flists call is put. (mh-index-generate-pretty-name): Make sure that normal index searching will never use the folder reserved for the flists results. (mh-index-search): Add an extra parameter that marks all the messages in the index folder to the unseen sequence. (mh-index-update-unseen): Function to keep unseen sequence of index folder synced with the actual folders from where the messages were copied. This works only if the unseen messages are displayed with mh-show. Killing the unseen sequence in the index folder or adding/removing messages to it doesn't change the unseen sequence in the source folders yet. (mh-flists-search-folders): Variable that decides the folders on which flists is run. (mh-flists-recursive-search-flag): If non-nil, flists is passed the -recurse option. (mh-flists-execute): Function which uses /bin/sh to execute flists and then print out the list of message files that match. (mh-index-new-messages): New interactive function which searches for messages in the unseen sequence (closes SF #701756). * mh-utils.el (mh-show-folder-map): Add binding for mh-index-new-messages. (mh-show-msg): Update the unseen sequence in the source folder. * mh-e.el (mh-folder-font-lock-unseen): The function assumes that the end of buffer is reached when there isn't a valid scan line on the current line. This doesn't work in the index folder since we have lines containing the folder name and empty lines in between the actual scan lines. The modification removes this assumption. (mh-folder-map): Add key binding for "Fn" * mh-seq.el (mh-iterate-on-messages-in-region): If the point is not at the beginning of the line, then the first message in the region would be missed. The fix avoids this. * mh-mime.el (mh-inline-vcard-p): Don't try to inline vcards if we don't have the right libraries. 2003-03-10 Satyaki Das * mh-e.el (mh-next-undeleted-msg, mh-previous-undeleted-msg) (mh-next-msg): Add optional argument wait-after-complaining-flag. If non-nil and there are no undeleted messages after (or before) the current one, then pause for a second after printing out the message. (mh-refile-or-write-again): Modify call to mh-next-msg to use the wait-after-complaining-flag. 2003-03-10 Satyaki Das * mh-e.el (mh-refile-or-write-again): If mh-next-msg fails to find a message to go to it prints out a diagnostic, which overwrites the diagnostic about the folder the message was refiled to. The change fixes this. 2003-03-09 Satyaki Das * mh-seq.el (mh-widen, mh-narrow-to-seq): Update mh-narrowed-to-seq before notating sequences. This is a bit helpful for mh-tick.el. (mh-put-msg-in-seq): Fix a minor bug. No internal sequence should be notated -- the original code was doing the right thing only for the "unseen" sequence. * mh-index.el (mh-index-choose): Add autoload cookie for mh-index-choose. This is needed for GNU Emacs 20.5. * mh-loaddefs.el: Regenerated. 2003-03-09 Bill Wohler * mh-mime.el (mh-display-smileys): This function originally had a test to see if font-lock-maximum-size was bound, but this was recently removed. The test was put in for a reason; if font-lock-maximum-size isn't bound, void-variable errors would ensue. I put the bound test back in. 2003-03-08 Steve Youngs * mh-mime.el (mh-mime-security-button-map): Use 'mh-push-button' in XEmacs as well. 2003-03-07 Satyaki Das * mh-xemacs-toolbar.el: Declare a whole bunch of stuff for GNU Emacs, so that we don't get so many compiler warnings. Also surround calls to set-specifier and toolbar-make-button-list with mh-funcall-if-exists. Maybe GNU Emacs shouldn't try to compile this file in the first place. * mh-xemacs-compat.el (mh-modeline-glyph): Declare it within mh-do-in-xemacs to avoid compiler warning in GNU Emacs. (mh-xemacs-push-button): Removed. * mh-mime.el (mh-mime-button-map): Use the generalized mh-push-button function. (mh-push-button): Enhance it so that it works on XEmacs too. 2003-03-08 Steve Youngs * mh-xemacs-compat.el (mh-modeline-logo): New constant holding the modeline image. (mh-modeline-glyph): Use it. 2003-03-08 Steve Youngs * mh-xemacs-toolbar.el: New file that defines and displays a toolbar in XEmacs. * mh-xemacs-compat.el (mh-xemacs-toolbar): Require it here. * Makefile (MH-E-SRC): Add mh-xemacs-toolbar.el. * mh-customize.el (mh-toolbar): (mh-tool-bar-letter-buttons): (mh-tool-bar-letter-buttons-set): (mh-tool-bar-folder-buttons): (mh-tool-bar-folder-buttons-set): (mh-tool-bar-search-function): (mh-tool-bar-reply-3-buttons-flag): (mh-tool-bar-item-inc): (mh-tool-bar-item-save-mime): (mh-tool-bar-item-prev-msg): (mh-tool-bar-item-page-msg): (mh-tool-bar-item-next-msg): (mh-tool-bar-item-delete): (mh-tool-bar-item-refile): (mh-tool-bar-item-undo): (mh-tool-bar-item-perform): (mh-tool-bar-item-toggle-show): (mh-tool-bar-item-reply-from): (mh-tool-bar-item-reply-to): (mh-tool-bar-item-reply-all): (mh-tool-bar-item-reply): (mh-tool-bar-item-alias): (mh-tool-bar-item-compose): (mh-tool-bar-item-rescan): (mh-tool-bar-item-repack): (mh-tool-bar-item-search): (mh-tool-bar-item-visit): (mh-tool-bar-item-prefs): (mh-tool-bar-item-help): (mh-tool-bar-item-widen): (mh-tool-bar-item-send): (mh-tool-bar-item-attach): (mh-tool-bar-item-spell): (mh-tool-bar-item-save): (mh-tool-bar-item-undo-op): (mh-tool-bar-item-kill): (mh-tool-bar-item-copy): (mh-tool-bar-item-paste): (mh-tool-bar-item-kill-draft): (mh-tool-bar-item-comp-prefs): The MH-E toolbar for XEmacs is defined differently from the GNU/Emacs version, so only define these if we're in GNU/Emacs. XEmacs doesn't need to see them and it's always good to cut down on pollution. 2003-03-08 Steve Youngs * mh-mime.el (mh-mime-button-map): Bind the 2nd mouse button to `mh-xemacs-push-button' in XEmacs. (mh-mime-security-button-map): Ditto. * mh-xemacs-compat.el: Shush the byte-compiler. (mh-xemacs-push-button): New function to make MIME buttons work in XEmacs. 2003-03-08 Steve Youngs * mh-mime.el (mh-display-emphasis): Don't test `font-lock-maximum-size' to see if it is bound, just test for a non-nil value. This variable can have a nil value which makes it bound and dividing nil by 8 throws an error. This fixes a bug in MH-E under XEmacs when `font-lock-maximum-size' is nil that prevented article emphasis and smiley display which in turn was causing the "Flush changes in article x y/n" errors. (mh-display-smileys): Ditto. 2003-03-08 Steve Youngs * mh-utils.el (mh-logo-display): Display logo in XEmacs as well. * mh-xemacs-compat.el (mh-modeline-glyph): New. The MH-E modeline logo for XEmacs. 2003-03-06 Satyaki Das * mh-utils.el (mh-allow-root-folder-flag): New global variable that decides if "+" is an acceptable folder name. (mh-folder-completion-function): Refine the test for existing folders to take mh-allow-root-folder-flag into account. (mh-folder-completing-read, mh-prompt-for-folder): Use the allow-root-folder-flag argument of mh-prompt-for-folder and add a similar argument to mh-folder-completing-read. (mh-exec-cmd-error): Make the function nicer by using process-environment to pass the environment variable assignments. 2003-03-05 Satyaki Das * mh-mime.el (mh-push-button): Preserve point in the show buffer if the mouse is used to expand/contract a button. * mh-customize.el (mh-x-face-file): Mention X-Image-URL in documentation. * mh-comp.el (mh-insert-x-face): Modified to allow insertion of X-Image-URL header field. 2003-03-04 Satyaki Das * mh-utils.el (mh-face-display-function): Modified to facilitate display of X-Image-URL images. (mh-find-path): Initialize X-Image-URL cache directory. (mh-x-image-url-cache-canonicalize, mh-x-image-url-fetch-image) (mh-x-image-scale-and-display, mh-x-image-url-display) (mh-x-image-display): New functions for X-Image-URL image display and cache management. * mh-customize.el (mh-show-use-xface-flag): Add info about requirements for X-Image-URL display. (mh-fetch-x-image-url): New customizable variable that controls fetching of X-Image-URL. 2003-03-04 Satyaki Das * mh-utils.el (mh-make-local-hook): New macro which works around API changes in add-hook. Version of GNU Emacs before 21.1 and XEmacs require a call to make-local-hook and just the LOCAL argument of add-hook is not sufficient. (mh-show-mode): Make kill-buffer-hook buffer local. * mh-e.el (mh-folder-mode): Same as above. * mh-comp.el (mh-compose-and-send-mail): Same as above. 2003-03-02 Satyaki Das * mh-mime.el (mh-push-button): Clicking on a MIME button used to cause the window with the show buffer to be selected. With this change the selected window doesn't change. 2003-03-01 Satyaki Das * mh-speed.el (mh-speed-flists): Avoid a potential race condition. When flists is called manually, or when an unseen message is read, mh-speed-partial-line was not reinitialized. * mh-e.el (mh-visit-folder): If mh-visit-folder is used to visit the folder currently being visited (effectively doing a rescan) then mh-previous-window-config is erroneously set. The change fixes this. * mh-customize.el (mh-index-show-hook): Remove unused variable. 2003-02-28 Satyaki Das * mh-e.el (mh-scan-folder): Call mh-reset-threads-and-narrowing only after the user has replied to question. This avoids premature clearing of the folder. (mh-rescan-folder, mh-visit-folder): Remove calls to mh-reset-threads-and-narrowing since it is now called in mh-scan-folder anyway. * mh-funcs.el (mh-sort-folder): Same as above. 2003-02-26 Satyaki Das * mh-alias.el (mh-alias-alist): Change initial value to a symbol, so that it is different from the empty list, which could also mean that there are no aliases. (mh-alias-reload-maybe): Change test so that empty alist of aliases is properly handled (closes SF #693859). 2003-02-25 Satyaki Das * mh-mime.el (mh-decode-message-header): The message header could be encoded, for instance the author's name could contain characters not in ASCII. This function will decode such header fields. (mh-mm-inline-message): Use mh-decode-message-header. * mh-utils.el (mh-display-msg): Use mh-decode-message-header. (mh-message-number-width): Use mh-scan-prog instead of "scan". * mh-loaddefs.el: Regenerated. 2003-02-24 Satyaki Das * mh-utils.el (mh-truncate-log-buffer): Refine it so that the function will do the right thing even if called from a buffer other than mh-log-buffer. 2003-02-22 Peter S Galbraith * mh-alias.el (mh-alias-add-alias): Really fix SF #690216. This functions needs to strip brackets on standalone addresses as well. 2003-02-21 Satyaki Das * mh-xemacs-compat.el (replace-regexp-in-string): Remove the definition since it isn't used any more. 2003-02-20 Peter S Galbraith * mh-alias.el (mh-alias-which-file-has-alias): Bug fix. Needed to specify `noerror' on search. * mh-alias.el (mh-alias-suggest-alias): Add condition for input string being an email address in brackets. We need to strip out the brackets. (closes SF #690216) 2003-02-20 Satyaki Das * mh-pick.el (mh-search-folder): The function was setting the global value of the variables mh-current-folder and mh-previous-window-config. This can lead to problems in code which assumes that these variables are nil when we aren't in a folder buffer. So make the variables local before setting them. 2003-02-19 Satyaki Das * mh-mime.el (mh-mime-display): All the MIME display code has been wrapped in a condition-case so that if something goes wrong, the raw message will be displayed. * mh-funcs.el (mh-undo-folder): Comment out call to sit-for that seems unnecessary. * mh-e.el (mh-scan-folder): Messages marked for deletion or refiling weren't getting annotated properly. The change fixes this. (mh-process-or-undo-commands): Change prompt to reflect what really happens in the code. 2003-02-18 Satyaki Das * mh-comp.el (mh-folder-expand-at-point): The function mail-abbrev-complete-alias often returns nil. This had the unfortunate consequence of always causing an error. The change fixes this. * mh-alias.el (mh-alias-canonicalize-suggestion): New function which obviates the our need replace-regexp-in-string. (mh-alias-suggest-alias): Use mh-alias-canonicalize-suggestion to eliminate calls to replace-regexp-in-string. This avoids problems in Emacs20. * mh-utils.el (mh-notate): Handle the case when nil is passed as notation gracefully. (mh-speed-flists-active-p): New function that returns non-nil if flists is being used in the speedbar to update message counts. * mh-seq.el (mh-put-msg-in-seq): Fix a bug which made it impossible to add messages to the unseen sequence. Also adding messages to the unseen sequence will now update the speedbar message counts immediately. * mh-e.el (mh-get-new-mail, mh-process-commands) (mh-undefine-sequence): Update speedbar message counts, if the speedbar is active and is displaying message counts. (mh-delete-msg-from-seq): In addition to updating message counts, unhighlight the message so that interactively removing messages from the unseen sequence makes the bold highlight of unseen messages in the scan buffer go away. (mh-clear-text-properties): New function that removes all text properties from the current scan line. 2003-02-15 Satyaki Das * mh-utils.el (mh-face-display-function): Wrap call of insert-image in mh-funcall-if-exists. This avoids a compiler warning in Emacs20. * mh-speed.el (mh-speed-flists): Weaken test a bit to avoid compiler warning in Emacs20. (mh-speedbar-change-expand-button-char): Wrap call of speedbar-insert-image-button-maybe in mh-funcall-if-exists. This function isn't present in the speedbar that ships with Emacs20, so calling it there causes an error. * mh-seq.el (mh-msg-is-in-seq): Adjust loop call a bit to avoid compiler warning in XEmacs. The XEmacs compiler should be improved so that such spurious warnings from builtin macros are suppressed. * mh-index.el (mh-index-search): Same as above. * mh-e.el (tool-bar-mode): The declaration is needed for Emacs20 too. * mh-comp.el (mailabbrev): Try loading it any way. Some day XEmacs will get it and then MH-E will just use it. (tool-bar-mode, tool-bar-map): These declarations are needed for Emacs20 too. (mh-mail-abbrev-make-syntax-table, mh-folder-expand-at-point): Remove mh-mail-abbrev-make-syntax-table since mh-funcall-if-exists can be used instead. * mh-alias.el (require): Avoid autoloading functions that may not be defined. (mh-read-address, mh-alias-letter-expand-alias): Rewrite using mh-funcall-if-exists. 2003-02-15 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-speed.el (mh-folder-speedbar-buttons, mh-speed-add-buttons) (mh-speed-toggle): Reuse markers instead of creating more of them. (mh-speed-flists-folder, mh-speed-flists): Add optional folder argument to mh-speed-flists so that message counts are updated only for that one folder. (mh-speed-parse-flists-output): If no change in counts then avoid consing. * mh-index.el (mh-index-execute): Rewritten to use a temporary buffer that is not left behind. * mh-funcs.el (mh-store-buffer): Use mh-log-buffer instead of the special purpose *Store Output* buffer. 2003-02-14 Satyaki Das * mh-customize.el (mh-show-xface-face): Make it always be black foreground on a white background (the reverse of that can make some X-Face images look creepy). * mh-utils.el (mh-truncate-log-buffer): Modify the function to return the current size of mh-log-buffer. Also we are now a bit more careful in adding separators between consecutive messages. (mh-exec-cmd): Fix a bug where the the log buffer would be displayed even if no error happened in the current command but the log buffer had messages from a previous error. * mh-mime.el (mh-mime-save-parts): Use mh-log-buffer to show error messages. * mh-alias.el (mh-alias-local-users): Add a space between parens. 2003-02-14 Steve Youngs * mh-utils.el (mh-face-display-function): Call `x-face-xmas-wl-display-x-face' using `mh-funcall-if-exists'. * mh-xemacs-compat.el (replace-regexp-in-string): New. 2003-02-13 Satyaki Das * mh-utils.el (mh-log-buffer-lines): New variable that keeps track of the number of lines to keep in mh-log-buffer. (mh-truncate-log-buffer): New function that is used to make sure that the log buffer doesn't grow to unbounded size. (mh-exec-cmd, mh-exec-cmd-daemon, mh-handle-process-error): Use mh-truncate-log-buffer instead of erase-buffer to keep some number of previous log messages around (closes SF #685476). 2003-02-13 Satyaki Das * mh-e.el (tool-bar-mode): Declare it in XEmacs. (mh-folder-mode): Use mh-funcall-if-exists to call hl-line-mode. * mh-utils.el (mh-funcall-if-exists): New macro that calls a function only if it exists. (mh-logo-display, mh-defun-show-buffer): Use mh-funcall-if-exists to call the functions find-image and deactivate-mark. * mh-mime.el (mh-mime-cleanup, mh-small-image-p) (mh-mm-display-part): Use mh-funcall-if-exists to call the functions image-size and remove-images. * mh-comp.el (tool-bar-map, tool-bar-mode): Declare the variables in XEmacs. (mh-folder-expand-at-point): Use mh-funcall-if-exists to call mail-abbrev-complete-alias if it exists. * mh-alias.el (mh-read-address): Use mh-funcall-if-exists for future extensibility. 2003-02-13 Satyaki Das * mh-utils.el (mh-logo-display): The function find-image is present only in GNU Emacs. (mh-defun-show-buffer): The function deactivate-mark is present only in GNU Emacs. (default-enable-multibyte-characters): Declare it in XEmacs to avoid compiler warning. (mh-face-display-function): Avoid inserting space if there isn't any Face or X-Face header field to display. * mh-seq.el (mh-thread-last-ancestor): Move declaration of variable before its first use to silence XEmacs warning. * mh-mime.el (default-enable-multibyte-characters, dots, type): Declare these in XEmacs to remove compiler warnings in XEmacs. (mh-mime-cleanup, mh-mm-display-part): Call remove-images only in GNU Emacs. (mh-small-image-p): Call image-size only in GNU Emacs. * mh-index.el (mh-mairix-next-result): Fix a bug where a quote was missing. (mh-swish++-regexp-builder): Remove the unused binding meta. * mh-e.el (mh-folder-size): Pass on an extra value to remove XEmacs warning. (mh-folder-mode): Surround calls to hl-line-mode and tool-bar-mode with mh-do-in-gnu-emacs since these functions aren't present in XEmacs. * mh-customize.el (mh-tool-bar-show-set, mh-tool-bar-letter-set) (mh-tool-bar-folder-set): These functions call tool-bar-* functions which are present only in GNU Emacs. So surround them with mh-do-in-gnu-emacs. * mh-comp.el (mh-letter-mode, mh-folder-expand-at-point): Only call these functions in GNU Emacs. (mail-abbrevs): Declare it in XEmacs. * mh-alias.el (mh-read-address): Call completing-read-multiple only in GNU Emacs. (mail-abbrevs): Declare it in XEmacs. (mh-alias-add-alias-to-file): Remove unused code. 2003-02-14 Ville Skyttä * mh-comp.el: Add autoloaded auto-mode-alist association. 2003-02-13 Satyaki Das * mh-utils.el (mh-face-display-function): Make the XEmacs part a little simpler. 2003-02-14 Steve Youngs * mh-customize.el (mh-show-xface-face): XEmacs doesn't have the ':inherit' keyword for defface, rewrite with sane defaults. * mh-utils.el (mh-face-display-function): Fix bug that was corrupting xface images when displayed with XEmacs' internal xface image support. Also make XEmacs honour 'mh-show-xface-face' when using internal xface image support. 2003-02-12 Peter S Galbraith * mh-comp.el (mh-modify-header-field): New function. To header FIELD add VALUE. If OVERWRITE-FLAG is non-nil then the old value, if present, is discarded. This is more flexible than before. (mh-insert-auto-fields): Use it. This and the new function are a courtesy of Satyaki. Thanks! * mh-customize.el (mh-auto-fields-list): Doc tweaks suggested by Bill. 2003-02-12 Satyaki Das * mh-comp.el (mh-folder-expand-at-point): Tweak the error message. Completion in the Fcc header field is only supported in GNU Emacs 21. 2003-02-12 Peter S Galbraith * mh-customize.el (mh-auto-fields-list): Reorder after `mh-identity-list' since it needs it to be defined. Move to mh-identity customization group. 2003-02-11 Peter S Galbraith * mh-customize.el (mh-insert-mail-followup-to-flag): Removed. Obsolete. (mh-insert-mail-followup-to-list): Removed. Obsolete. Use `mh-auto-fields-list' instead, which is a more general solution. (mh-auto-fields-list): New defcustom. Alist of addresses for which header lines are automatically inserted. Replaces `mh-insert-mail-followup-to-list'. * mh-comp.el (mh-insert-mail-followup-to): Removed. Obsolete. (mh-insert-auto-fields): New function. Insert custom fields if To or Cc match `mh-auto-fields-list', replacing mh-insert-mail-followup-to with a more general solution. (mh-compose-and-send-mail): Call mh-insert-auto-fields instead of mh-insert-mail-followup-to. Also don't call mh-insert-identity to insert default setting if mh-insert-auto-fields inserted an identity. 2003-02-11 Satyaki Das * mh-utils.el (mh-show-xface-function): Try to load the external x-face library only if XEmacs doesn't have xface support. (mh-face-display-function): Renamed. Also handle various permutations of x-face and xface support in XEmacs better. * mh-customize.el (mh-show-use-xface-flag): Any emacs whose major version is greater than or equal to 21 supports display of X-Face and Face header fields. 2003-02-11 Satyaki Das * mh-utils.el (mh-do-in-gnu-emacs, mh-do-in-xemacs): Macros that execute code only in GNU Emacs and XEmacs respectively. (mh-emacs21-face-display-function): Refactor to make it slightly nicer. Get rid of compiler warnings in GNU Emacs by using the above macros. Also check for presence of xface feature (in XEmacs specific code) before trying to display X-Face header field image. 2003-02-11 Steve Youngs * mh-customize.el (mh-show-use-xface-flag): If using XEmacs and can't find the external x-face pkg still enable X-Face images if feature 'xface is present. Update the doc string. * mh-utils.el (mh-emacs21-face-display-function): Make it work in XEmacs. (mh-show-xface-function): If using XEmacs without xface support, use x-face.el pkg. If using XEmacs with xface support, or Emacs 21, use mh-emacs21-face-display-function. 2003-02-11 Mark D. Baushke * mh-customize.el (mh-invisible-header-fields): Add "X-Notes-Item:" which is generated by Lotus Notes Domino. See URL for details on how Domino users may disable (restore the default) generation of these headers. 2003-02-10 Satyaki Das * mh-comp.el (mh-folder-expand-at-point): Add function doc string and produce a nicer error message for Emacs versions that lack mail-abbrev-complete-alias. * mh-utils.el (mh-handle-process-error): Check doc fix. * mh-e.el (mh-folder-from-address): Same as above. 2003-02-10 Peter S Galbraith * mh-comp.el: require mailabbrev, except in XEmacs. (mh-mail-abbrev-make-syntax-table): New defmacro to call mail-abbrev-make-syntax-table introduced in Emacs21. (mh-folder-expand-at-point): Handle nested folders. All of the above was written by Satyaki. I just applied the patch and tested. 2003-02-09 Satyaki Das * mh-comp.el: Fixes to keep the byte compiler happy. * mh-customize.el (mh-invisible-header-fields): Modified to remove space after ":" in header field names. 2003-02-09 Peter S Galbraith * mh-comp.el (mh-letter-complete): Add completion for fcc lines. (mh-folder-expand-at-point): Do completion at point for folder name. Like `mh-alias-letter-expand-alias' for aliases, it doesn't work on XEmacs because it relies on `mail-abbrev-complete-alias' to do completion. Maybe Steve could update XEmacs' mailabbrev.el? 2003-02-09 Peter S Galbraith * mh-customize.el (mh-invisible-header-fields): Remove trailing space in "X-Face: " and "Face: " entries since those line often break there. 2003-02-08 Satyaki Das * mh-utils.el (mh-emacs21-face-display-function): Use mh-show-xface-face to colorize X-Face image. * mh-customize.el (mh-invisible-header-fields): Add extra headers to ignore. (mh-show-xface-face): Allow customization of the X-Face colors. 2003-02-07 Satyaki Das * mh-utils.el (mh-uncompface-executable, mh-uncompface): Remember the path of the uncompface executable so that we don't need to search for it every time. (mh-emacs21-face-display-function): If more than one X-Face (or Face) header field was present then the fields would get concatenated, leading to garbled output. The change only displays the first image. * mh-customize.el (mh-x-face-file): Change documentation since it can now be used to insert a Face header field. * mh-comp.el (mh-insert-x-face): Generalized to allow insertion of Face header field. 2003-02-06 Bill Wohler * mh-utils.el (mh-emacs21-face-display-function): Updated docstring. It is a common mistake to refer to a header field as a header. The term header refers to the entire header while the term header field refers to a single field. * mh-customize.el (mh-show-use-xface-flag): Ditto. 2003-02-06 Satyaki Das * mh-utils.el (mh-show-xface-function): Modified to use mh-emacs21-face-display-function if we are running GNU Emacs 21. (mh-face-to-png): New function to convert a Face header to a png image. (mh-uncompface): New function which converts an X-Face header to a pbm image. (mh-icontopbm): New function that does the job of icontopbm. (mh-emacs21-face-display-function): New function that displays Face/X-Face image in GNU Emacs 21. (mh-show-xface): Modified to test if we are running in X. Otherwise face display is suppressed. * mh-customize.el (mh-show-use-xface-flag): Tweak it, now that MH-E supports face display natively on Emacs 21. Also remove the check for window-system since it doesn't belong in a customizable variable. 2003-02-06 Satyaki Das * mh-utils.el (sendmail): Require it so that XEmacs can find rfc822-goto-eoh. (mh-mail-header-end): A substitute for mail-header-end that doesn't widen the buffer. This is essential to avoid problems when dealing with nested messages. (mh-in-header-p, mh-letter-header-font-lock) (mh-header-field-font-lock, mh-show-font-lock-fontify-region) (mh-show-unquote-From): Use mh-mail-header-end instead of mail-header-end. * mh-mime.el (mh-decode-message-body): same as above (closes SF #681518). * mh-comp.el (mh-yank-cur-msg): same as above. 2003-02-05 Satyaki Das * mh-utils.el (mh-display-msg): Call mh-show-mode before invisible headers are cleaned. This means that any surviving X-Face header can be removed unconditionally in mh-clean-msg-header. (mh-clean-msg-header): Since the function is now called with a read-only buffer, make the buffer temporarily writable. * mh-mime.el (mh-mm-inline-message): Do X-Face display before invisible headers are removed. * mh-customize.el (mh-invisible-headers): Simplified since the X-Face header isn't treated specially any more. (mh-invisible-header-fields): Add Face: and X-Face: to list of invisible headers. * mh-mime.el (mh-mime-display): If body is empty the headers would be treated like the body. The change fixes this (closes SF #681162). (mh-mime-display): This change really fixes the above problem. 2003-02-04 Satyaki Das * mh-utils.el (mh-current-folder-name): Global variable that keeps track of current folder. (mh-normalize-folder-name): Substitute @ with mh-current-folder-name (closes SF #666774). (mh-prompt-for-folder): Bind mh-current-folder-name. Also invalidate cache if we are visiting a folder that wasn't found in the sub-folder cache. This is an indication that folders may have been created outside of MH-E and so the cache may be stale. 2003-02-03 Satyaki Das * mh-utils.el (mh-decode-content-transfer-encoded-message): Removed. (mh-display-msg): Remove the use of the above function. (mh-normalize-folder-name): Leading "/" characters were being lost. The change fixes this (closes SF #676890). * mh-mime.el (mh-decode-message-body): New function, factored out from mh-mime-display and enhanced, to decode message based on charset and content-transfer-encoding. This eliminates the need for the external mimencode (closes SF #674857). (mh-mime-display): Use mh-decode-message-body. * mh-e.el (mh-header-display): Don't need the binding since the variable isn't present any more. (mh-inc-folder): Avoid calling mh-show if point is not on a valid scan line (closes SF #678115). * mh-customize.el (mh-decode-content-transfer-encoded-message-flag): Removed. 2003-02-03 Bill Wohler * import-emacs: MH-E now has its own directory in Emacs. * mh-e.el: (mh-version): Set to 7.2+cvs. 2003-02-03 Bill Wohler Released MH-E version 7.2. * MH-E-NEWS, README: Updated for release 7.2. * mh-e.el (Version, mh-version): Updated for release 7.2. 2003-02-03 Bill Wohler * Makefile (dist): mkdir needs to happen *before* files are copied. * MH-E-NEWS: Fixed some awkward verbiage. 2003-02-02 Bill Wohler * mh-customize.el (mh-invisible-headers): Surround regexp-opt expression in parens to avoid problems viewing certain messages. 2003-01-30 Satyaki Das * mh-speed.el (mh-speed-flists): Search for flists in mh-progs. The original was inadvertently searching for flists in the user's path. 2003-01-27 Bill Wohler * mh-customize.el (mh-default-folder-must-exist-flag): Changed default to t according to the principle of least surprise. 2003-01-26 Bill Wohler * mh-utils.el: Checkdoc fixes. * mh-pick.el (mh-do-search, mh-search-folder): Checkdoc fixes. * mh-loaddefs.el: Regenerated (lm-verify fixes). * mh-index.el (mh-mairix-next-result): Checkdoc fixes. * mh-alias.el: lm-verify fix. * Makefile (MH-E-SRC): Added ChangeLog, now that Emacs has a lisp/mh-e directory. (MH-E-ETC-ETC): Removed ChangeLog. (dist): Moved creation of mail directory next to copy of files into mail directory. (install-emacs): Copy $(MH-E-SRC) into new directory $(EMACS_HOME/lisp/mh-e. (MH-E-SRC): Moved ChangeLog into new variable MH-E-OTHERS and include MH-E-LOADDEFS there too. (mh-loaddefs.el): Added lines so that lm-verify passes. (dist, install-emacs): Use MH-E-OTHERS instead of MH-E-LOADDEFS. 2003-01-26 Jeffrey C Honig * mh-comp.el (mh-tidy-draft-buffer, mh-compose-and-send-mail): Rename mh-kill-draft-hook to mh-tidy-draft-buffer. 2003-01-25 Jeffrey C Honig * mh-utils.el (mh-exec-cmd, mh-exec-cmd-daemon) (mh-process-daemon): Use mh-log-buffer for the output of commands from mh-exec-cmd. * mh-utils.el (mh-temp-folders-buffer): Sequences and folders loose the -temp from their buffer names as they are interesting to the user. * mh-seq.el (mh-list-sequences): New name, mh-sequences-buffer as it is intended to be interesting to the user. * mh-funcs.el (mh-list-folders): New name, mh-folders-buffer as it is intended to be interesting to the user. * mh-comp.el (mh-check-whom, mh-compose-and-send-mail): Use mh-recipients-buffer constant. Add a kill buffer hook to delete the recipients buffer when a draft buffer is killed. 2003-01-25 Satyaki Das * mh-customize.el (mh-customize): New interactive argument deletes other windows. (mh-tool-bar-show-set, mh-tool-bar-letter-set) (mh-tool-bar-folder-set): Modified so that clicking the customize and help buttons deletes the other windows in the frame. * mh-mime.el (mh-mm-inline-message): Remove unused code. * mh-seq.el (mh-notate-deleted-and-refiled): Fix a small bug where the wrong notation was being used. (mh-toggle-threads): The function had a bug if you did the following starting from an unthreaded wide folder: (1) Create a sequence with S p (2) Narrow to new sequence with S n (3) Thread narrowed folder with T t (4) Kill sequence with S k (5) Unthread narrowed folder with T t At this point we would have an empty folder. The change fixes this. (mh-toggle-threads): Fix documentation. * mh-customize.el (mh-invisible-header-fields): Add X-MHE-Checksum to invisible headers. * mh-comp.el (mh-insert-x-mailer): Slightly more informative X-Mailer header. 2003-01-24 Satyaki Das * mh-e.el (mh-header-display): Modified so that quoted-printable or base64 encoded messages are left untouched. * mh-utils.el (mh-decode-content-transfer-encoded-message): Munge the Content-Transfer-Encoding header so that the MIME decoding routines of Gnus doesn't get confused. (mh-display-msg): Use insert-file-contents-literally so that display will work for non-ascii. * mh-mime.el (mh-mime-display): Use charset info to decode message file (closes SF #655123). 2003-01-24 Bill Wohler * mh-alias.el (mh-alias-add-alias-to-file): Removed period from error message and added parens around error function. 2003-01-24 Satyaki Das * mh-customize.el (mh-decode-quoted-printable-flag): Removed. (mh-decode-content-transfer-encoded-message-flag): This replaces mh-decode-quoted-printable-flag. * mh-utils.el (mh-decode-content-transfer-encoded-message): New function which handles messages that are encoded as base64 or quoted-printable (closes SF #674190). (mh-decode-quoted-printable): Removed. (mh-display-msg): Use mh-decode-content-transfer-encoded-message instead of mh-decode-quoted-printable. 2003-01-23 Satyaki Das * mh-seq.el (mh-thread-generate-scan-lines): Fix a little bug that would occasionally cause angles ('<' and '>') to appear at root level. 2003-01-21 Satyaki Das * mh-seq.el (mh-notate-cur): Enable overlay arrow display in text mode too. * mh-e.el (mh-folder-mode): Initialize overlay-arrow-string so that a '>' is displayed in text mode. 2003-01-20 Satyaki Das * mh-utils.el (mh-scan-msg-overflow-regexp): Change the variable so that a space is always maintained in the beginning of the scan line. * mh-seq.el (mh-notate-seq, mh-notate-cur): Make the functions faster by cutting down on the use of mh-goto-msg. (mh-toggle-threads): Add call to mh-notate-cur, since inserting the folder names in a search results folder screws up the location of the overlay arrow. * mh-index.el (mh-index-delete-folder-headers): Position the point on a message line if possible. * mh-funcs.el (mh-copy-msg): Use the mh-iterate macro to make the function faster. * mh-e.el (mh-scan-folder): Reuse mh-notate-deleted-and-refiled. * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-add-msgs-to-seq): Add a new parameter that suppresses the annotation of the sequence since it is inefficient. * mh-seq.el (mh-delete-seq): Speed up the part of the function that removes the sequence notation. (mh-put-msg-in-seq, mh-notate-deleted-and-refiled): Use mh-iterate-on-messages-in-region to make the function fasters when operating on regions. The key idea is to loop over the folder buffer exactly once and do all annotations. The existing algo would walk over the buffer multiple times thereby slowing things down. (mh-iterate-on-messages-in-region): Added an extra parameter which is bound to the message index as the loop is executed. (mh-region-to-msg-list, mh-thread-delete, mh-thread-refile): Use the new mh-iterate-on-messages-in-region macro. * mh-e.el (mh-delete-msg-no-motion, mh-refile-msg, mh-undo): Same as above. (mh-notate-user-sequences): Change algorithm to make notating of user sequences fast. 2003-01-19 Satyaki Das * mh-logo.xpm: New image file that contains the MH-E logo. Change foreground color to the blue in the MH-E logo. * Makefile (MH-E-IMG): Add mh-logo.xpm to list of image files. * mh-utils.el (mh-show-buffer-mode-line-buffer-id): Adjust it to keep space in the beginning for the logo. (mh-logo-cache): New variable that caches the logo image file location. (mh-logo-display): Display the MH-E logo on the mode line. (mh-display-msg): Display logo in mh-show-mode. * mh-e.el (mh-make-folder-mode-line): Display logo in mh-folder-mode. * mh-comp.el (mh-compose-and-send-mail): Display logo in mh-letter-mode. * mh-loaddefs.el: Regenerated. * mh-seq.el (mh-iterate-on-messages-in-region): New macro to iterate on all messages in a region. (mh-region-to-msg-list): Simplified since it uses mh-iterate-on-messages-in-region now. * mh-e.el (mh-delete-msg, mh-refile-msg): Change interactive spec to pass the region that is to be deleted when appropriate. (mh-delete-msg-no-motion, mh-refile-msg, mh-undo): Operate on regions directly without creating the list of messages to be deleted/refiled. (mh-delete-a-msg, mh-refile-a-msg, mh-undo-msg): The msg parameter in these functions can now be nil. If so, the current message is deleted, refiled or undone respectively. Avoids the use of mh-goto-msg in this case and speeds up operations on regions quite a bit. 2003-01-19 Peter S Galbraith * mh-alias.el (mh-read-address): Bug Fix. In XEmacs and Emacs20, it would always prompt using "To: " instead of using the command argument (closes SF #670913). 2003-01-19 Satyaki Das * mh-utils.el (mh-folder-completion-function): If there is a +foo/bar folder and the user types foo//bar then the completion function would say a match happened without showing the normalized folder name. This change fixes that. 2003-01-18 Satyaki Das * mh-e.el (mh-rmail): Modified so that new and unseen messages are shown (closes SF #667542). 2003-01-17 Satyaki Das * mh-index.el (mh-index-generate-pretty-name): Generate nicer names. In particular all '-' characters are removed. 2003-01-16 Satyaki Das * mh-customize.el (mh-index-program): Documentation fix. * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-index-program): Add choices for mairix and pick. * mh-index.el (mh-indexer-choices): Add search interfaces for mairix and pick. (mh-index-search): Add links for mairix and pick. (mh-index-pick-folder, mh-pick-binary): Variables needed to implement pick support. (mh-pick-execute-search, mh-pick-next-result): New functions to implement pick support. (mh-mairix-binary, mh-mairix-directory, mh-mairix-folder): New variables for mairix support. (mh-mairix-execute-search, mh-mairix-next-result) (mh-mairix-regexp-builder, mh-mairix-convert-to-sop*): New functions for mairix. * mh-funcs.el (mh-kill-folder): Move message to the end. * mh-e.el (mh-folder-mode): Make overlay-arrow-position and overlay-arrow-string local variables so that the arrow will remain even if some other folder is visited. (mh-remove-cur-notation, mh-remove-all-notation): The test isn't required any more since overlay-arrow-position is local. (mh-goto-cur-msg): Remove overlay arrow if current message doesn't exist. * mh-seq.el (mh-notate-cur): Don't need to set overlay-arrow-string any more since it is local and has been set at initialization. 2003-01-15 Satyaki Das * mh-speed.el (mh-speed-current-folder): Keep track of current folder when flists is called. (mh-speed-flists, mh-speed-parse-flists-output): Try to avoid ambiguity when folders are present with + at the end of the name. Unfortunately it can't always be avoided. * mh-e.el (mh-folder-size): Remove the unnecessary error check. (mh-parse-flist-output-line): Add extra argument which occasionally avoid problems with folder names that end with '+'. * mh-utils.el (mh-sub-folders-actual): Fix the folder name parsing so that it doesn't get confused by trailing '+' chars in the folder name. 2003-01-14 Satyaki Das * mh-utils.el (mh-normalize-folder-name): Enhanced so that it can now handle ".." and "." correctly during folder name completion. (mh-normalize-folder-name): Avoid error in boundary condition where the folder string is empty. 2003-01-14 Mark D. Baushke * mh-e.el (mh-visit-folder): Pass `current-prefix-arg' to the `mh-read-msg-range' function as the optional always-prompt-flag. 2003-01-14 Satyaki Das * mh-utils.el (mh-normalize-folder-name): New function that normalizes folder names. (mh-sub-folders): Use mh-normalize-folder-name. Also the function has been modified so that a trailing slash is only added if the folder potentially has subfolders. (mh-sub-folders-actual): Simplified since the folder has already been normalized in mh-sub-folders. (mh-remove-from-sub-folders-cache): Modified so that the cached results of two of the folders ancestors are invalidated. (mh-folder-completion-map): Ugly hack to make the error go away when minibuffer-complete-word is called. (mh-folder-completion-function): The completion function will now be more selective in adding '/' at the end of completed folder names. (mh-folder-completing-read): The folder name is normalized before return. The minibuffer-local-completion-map is shadowed to avoid error with SPC (bound to minibuffer-complete-word). We really need a better solution. 2003-01-13 Bill Wohler * mh-seq.el: Edited comment and docstring text to conform with RFC 2822 terminology. Message-ID is the header field. It contains a message identifier. 2003-01-13 Satyaki Das * mh-utils.el (mh-sub-folders): Add an argument that returns sub-folders with a / character appended at the end. (mh-folder-completion-function): Modify the function so that one tab is now sufficient to complete the folder name and add a trailing /. (mh-folder-completing-read): Remove the trailing / that the completion function now adds to the folder name. Also multiple / characters in the folder input are removed. So if the user inputs +foo///bar//baz///// then that will be converted to +foo/bar/baz. This will improve the performance of caching. * mh-seq.el (mh-notate-cur): Check that a valid current message exists before trying to notate (closes SF #667331). (mh-message-id-regexp): New variable to store regexp to recognize message-ids. (mh-thread-generate): Use mh-message-id-regexp to filter out non message-id's from the References: header. 2003-01-12 Satyaki Das * mh-seq.el (mh-notate-cur): Disable overlay-arrow display if we aren't on a graphic display. 2003-01-11 Satyaki Das * mh-seq.el (mh-notate-cur): New function to notate the current message. The marker in the fringe is updated too. (mh-narrow-to-seq, mh-widen, mh-thread-inc, mh-thread-folder): Use the specialized function mh-notate-cur instead of mh-notate-seq. * mh-e.el (mh-arrow-marker): New buffer local variable to store the position where the marker in the fringe is going to be displayed (closes SF #664824). (mh-folder-mode): Create a marker for the fringe. (mh-update-sequences, mh-get-new-mail, mh-goto-cur-msg): Call the specialized function mh-notate-cur instead of mh-notate-seq or mh-notate. (mh-remove-cur-notation, mh-remove-all-notation): Reset the overlay-arrow-position if needed. * mh-loaddefs.el: Regenerated. 2003-01-10 Satyaki Das * mh-utils.el (mh-remove-from-sub-folders-cache): Modified so that creating nested folders doesn't produce inconsistent results. (mh-prompt-for-folder): Remove call of mh-folder-list-change-hook. * mh-funcs.el (mh-kill-folder): Don't ask for confirmation if called on a folder holding index search results. Also the now removed mh-folder-list-change-hook is called no more. * mh-customize.el (mh-auto-folder-collect-flag) (mh-folder-list-change-hook): Removed. * mh-loaddefs.el: Regenerated. 2003-01-10 Bill Wohler * mh-customize.el (mh-default-folder-must-exist-flag): New variable to suppress suggested folder if the folder doesn't already exist (closes SF #657096). (mh-default-folder-list): New variable that holds mapping between an address and the desired folder for filing (closes SF #657096). (mh-default-folder-prefix, mh-default-folder-must-exist-flag): In docstring, refer to documentation for mh-prompt-for-refile-folder and mh-folder-from-address. (mh-highlight-citation-p, mh-compose-insertion, (mh-insert-mail-followup-to-list, mh-index-program, (mh-identity-default): Fixed case of tags. * mh-e.el (mh-folder-from-address): Use new variable mh-default-folder-must-exist-flag to return nil if this variable is t and the folder doesn't already exist. In addition, can now look up a default folder in the new variable mh-default-folder-list (closes SF #657096). (mh-prompt-for-refile-folder): In docstring, refer to documentation in mh-folder-from-address. * mh-index.el (mh-swish-execute-search): Changed \..* to \\..* in the FileRules filename in the sample config file. Otherwise, the users don't see the backslash at all, and no files are indexed! (closes SF #665888). 2003-01-10 Satyaki Das * mh-seq.el (mh-thread-folder): Get headers for exactly the messages that are present. If only messages 1-10 and 3800-3900 are being shown then we will now scan exactly those messages and not the full range from 1-3900 as was being done earlier. (mh-toggle-threads): When converting from threaded to normal view only the messages present in the buffer are scanned. Earlier all messages from the minimum to the maximum would be scanned (closes SF #626117). * mh-pick.el (mh-search-folder): Fix typo. (mh-pick-do-search): Fix bug from cut and paste. Also set window config properly. * mh-utils.el (mh-prompt-for-folder): Add new argument to allow it to accept + as a folder name. This allows the user to search all folders when "Fs" is used. * mh-pick.el (mh-search-folder): Fix interactive spec of function. (mh-pick-do-search): Rewritten to call pick in one go. This will make adding pick as a default index search program easier. Also pick now accepts the same query syntax as the index search programs (closes SF #664816). (mh-next-pick-field): Removed. (mh-pick-parse-search-buffer): New function to parse the search buffer. (mh-pick-construct-regexp, mh-pick-regexp-builder): New function to produce a pick query from the parsed representation. * mh-index.el (mh-index-do-search): Refactor the search pattern parser into a new function and use that instead. * mh-loaddefs.el: Regenerated. 2003-01-10 Satyaki Das * mh-loaddefs.el: Regenerated. * mh-utils.el (mh-remove-from-sub-folders-cache) (mh-prompt-for-folder): Replace mh-update-sub-folders-cache with mh-remove-from-sub-folders-cache. (mh-exec-cmd-daemon): Mention set-process-filter in documentation. * mh-pick.el (mh-searching-function): New buffer local variable that keeps track of the default searching function to be used. (mh-pick-mode): Make mh-searching-function buffer local. (mh-search-folder): Set mh-searching-function to use pick. (mh-search-folder, mh-pick-menu, mh-pick-mode-help-messages) (mh-pick-mode, mh-do-pick-search, mh-pick-do-search): Rename mh-do-pick-search to mh-pick-do-search. But keep mh-do-pick-search as a deprecated function. (mh-do-search): New interactive function that performs the default search. (mh-pick-mode-map): Update keymap. * mh-index.el (mh-index-search): Set mh-searching-function to do index search. (mh-index-new-folder): Replace mh-update-sub-folders-cache with mh-remover-from-sub-folders-cache. * mh-funcs.el (mh-kill-folder): Same as above. * mh-index.el (mh-index-evaluate, mh-swish++-regexp-builder): Checkdoc fixes. * mh-customize.el: Fixes to make byte compiler in CVS Emacs perfectly happy. 2003-01-09 Bill Wohler * mh-e.el (mh-folder-from-address): New function that proposes the name of a folder with an alias for the address in the current message. (mh-prompt-for-refile-folder): Use it (closes SF #657096). * mh-customize.el (mh-default-folder-prefix): New variable used by mh-folder-from-address. (mh-invisible-header-fields): Edited docstring. * mh-alias.el (mh-alias-address-to-alias): Added ;;;###mh-autoload cookie (used by mh-folder-from-address in mh-e.el). Edited text in comment. * mh-utils.el: Provided naming conventions for buffer and buffer variable names. (mh-temp-folders-buffer): Renamed buffer to " *mh-folders*". (mh-temp-sequences-buffer): Renamed buffer to " *mh-sequences*". (mh-info-buffer): Renamed from mh-temp-info-buffer. (mh-log-buffer): New buffer variable to hold name of "*MH-E Log*" buffer which is expected to be used for the output of MH commands. Perhaps we always create this buffer at initialization and append to it rather than erase it each time? * mh-e.el (mh-quit): Loop over all buffers and delete MH-E temporary and working buffers. As long as the buffer naming conventions are followed, new buffers will be automatically killed. (mh-version): Renamed mh-temp-info-buffer to mh-info-buffer. * mh-comp.el (mh-insert-x-mailer): Renamed mh-temp-info-buffer to mh-info-buffer. 2003-01-09 Satyaki Das * mh-e.el (mh-folder-size): If the user doesn't have a Unseen-Sequence definition in .mh_profile then an error was produced. This change fixes that. * mh-seq.el (mh-thread-generate): Replace the *mh-thread* buffer with a temporary buffer which is cleaned up when the function exits. * mh-e.el (mh-prompt-for-refile-folder): New function which refactors out the intelligent folder guessing code from mh-refile-msg. (mh-refile-msg): Use mh-prompt-for-refile-folder. * mh-seq.el (mh-thread-refile): Use mh-prompt-for-refile-folder to do the same intelligent destination folder guessing as mh-refile-msg (closes SF #664829). * mh-utils.el (mh-folder-list, mh-make-folder-list-process) (mh-folder-list-temp, mh-folder-list-partial-line) (mh-set-folder-list): Removed. (mh-sub-folders-cache, mh-sub-folders, mh-sub-folders-actual): Moved over from mh-speed.el to implement hierarchical completion. (mh-update-sub-folders-cache): Utility function called when new folders are created or folders are removed. (mh-folder-completion-function): New function is the folder name completion function used in completing-read. (mh-folder-completing-read): A thin wrapper function that is used instead of completing-read directly. In the future we might want to allow the user a customizable variable which will turn off folders based completion. (mh-prompt-for-folder): Use mh-folder-completing-read to read in the folder name with hierachical completion (closes SF #664821). * mh-speed.el (mh-speed-folders, mh-speed-folders-cache) (mh-speed-folders-actual): Moved to mh-utils.el as mh-sub-folders, mh-sub-folders-cache and mh-sub-folders-actual respectively. (mh-speed-invalidate-map, mh-speed-invalidate-map) (mh-speed-add-folder): Use the new names. * mh-funcs.el (mh-kill-folder): Remove code that used to update mh-folder-list which is no longer present. Instead mh-update-sub-folders-cache is called. * mh-index.el (mh-index-new-folder): Same as above. 2003-01-08 Satyaki Das * mh-utils.el (mh-exec-cmd-daemon): An argument was added which controls what is done with the process output. * mh-funcs.el (mh-kill-folder): Use mh-previous-window-config to restore window configuration. Also the call to mh-exec-cmd-daemon only displays output if an error happened (closes SF #664828). (mh-rmf-daemon): Check rmf output and display it only if something went wrong. (mh-print-msg): Pass in nil argument to mh-exec-cmd-daemon. * mh-comp.el (mh-redistribute, mh-send-letter): Pass in nil argument to mh-exec-cmd-daemon so that the functions will behave as before. * mh-pick.el (mh-search-folder): The current window config is stored. (mh-make-pick-template): Make the message headers read-only. (mh-pick-mode-help-messages): Update help message. (mh-do-pick-search): Fix problem when buffer isn't showing any messages. (mh-next-pick-field): Use buffer-substring-no-properties is better. (mh-pick-mode-map): Add key bindings (partially addresses SF #664816) * mh-index.el (mh-indexer-choices): Add a new field for each index program choice. If it is non-nil then it is the name of a function that given a lisp expression to search for generates a pattern that is acceptable to the search program. (mh-index-regexp-builder): New variable that stores the function to be used to convert from the lisp expression syntax to something that the search program understands. (mh-index-generate-pretty-name): Generalized so that it can take a list of strings as input. (mh-index-search): Modified so that if the configured program has a corresponding regexp-builder then a search buffer like pick search is produced. Otherwise the previous behavior is maintained. (mh-index-do-search): New interactive function that takes the contents of the search buffer, generates an appropriate query and produces the search results buffer by calling mh-index-search. (mh-replace-string, mh-index-parse-search-regexp) (mh-index-add-implicit-ops, mh-index-evaluate): New functions which parses the infix search expression that the user enters. A parse tree from which queries for different search programs can be produced is produced. (mh-swish++-regexp-builder, mh-swish++-print-regexp): Takes the internal form of the query and produces input suitable for swish++. * mh-loaddefs.el: Regenerated. 2003-01-08 Bill Wohler * Makefile (emacs-logs): New target for viewing CVS Emacs logs. Useful to see if an Emacs developer has changed MH-E. * MH-E-NEWS: Fixed case of MH-E in the "Changes" title. * mh-utils.el (mh-temp-info-buffer): New variable to hold name of buffer that contains version info. * mh-e.el (mh-version): Use mh-temp-info-buffer instead of mh-temp-buffer since version information was getting clobbered by the aliasing code before it could be seen (closes SF #664467). (mh-quit): Delete mh-temp-info-buffer. * mh-comp.el (mh-insert-x-mailer): Use mh-temp-info-buffer to find version info instead of mh-temp-buffer. You kind of need this patch to send mail. 2003-01-07 Bill Wohler * mh-e.el (Version, mh-version): Set to 7.1+cvs. 2003-01-07 Bill Wohler Released MH-E version 7.1. * MH-E-NEWS, README: Updated for release 7.1. * mh-e.el (Version, mh-version): Updated for release 7.1. 2003-01-07 Bill Wohler * mh-customize.el (mh-auto-folder-collect-flag, mh-alias-system-aliases, mh-alias-insert-file): Edited docstrings. * Makefile (MH-E-IMG): Added alias.pbm and alias.xpm. * mh-alias.el (mh-alias-insert-file, mh-alias-add-alias): Fixed checkdoc warnings. 2003-01-07 Satyaki Das * mh-utils.el (mh-search-from-end): New function that is used to replace our usage of the CL function search. (font-lock): The library is loaded to avoid compilation warning in CVS Emacs. * mh-speed.el (mh-speed-goto-folder, mh-speed-add-folder) (mh-speed-extract-folder-name, mh-speed-invalidate-map): Use mh-search-from-end instead of search. * mh-seq.el (mh-thread-remove-parent-link): Use loop instead of remove*. (mh-thread-process-in-reply-to): Use mh-search-from-end instead of search. * mh-index.el (mh-md5-parser): Fix name of function. (mh-index-update-single-msg, mh-index-update-maps): Avoid using destructuring-bind since Emacs-20.7 can't handle this particular usage. (mh-namazu-next-result): Use mh-search-from-end instead of search. * mh-e.el (recursive-load-depth-limit): Add a defvar since CVS emacs which doesn't have the variable defined causes a compiler warning. (mh-refile-a-msg): Rewritten to avoid using pushnew. (mh-undo-msg): Use loop instead of remove-if. * mh-comp.el (mh-show-buffer-message-number): Use mh-search-from-end instead of search. 2003-01-01 Satyaki Das * mh-e.el (mh-visit-folder): Modified so that if RANGE is nil then all messages are displayed. Documentation modified so that this is explicitly stated. (mh-visit-folder): Really fix it this time. 2003-01-01 Mark D Baushke * mh-alias.el (mh-alias-from-has-no-alias-p): Needs the mh-autoload comment or mh-customize may have problems finding the function. * mh-loaddefs.el: Regenerated. 2002-12-28 Satyaki Das * mh-index.el (mh-namazu-execute-search): Fix bug in documentation. 2002-12-28 Bill Wohler * mh-comp.el (mh-letter-mode): Mention mh-compose-insertion variable in docstring, explain how to expand directives, and don't mention mh-mhn-compose-insertion which isn't used directly any more. (mh-send-letter): Mention that X-Mailer and X-Face are inserted automatically so that a user isn't tempted to do so himself in mh-before-send-letter-hook. (mh-insert-letter): Use "variable" prefix for mh-invisible-headers now that we have both a function and a variable. Clarified language a bit. 2002-12-26 Satyaki Das * mh-utils.el (mh-show-xface-function): Only load x-face-e21 if the emacs is not XEmacs. * mh-index.el (mh-index-new-folder): The folder created should always be added to mh-folder-list. Otherwise folder name completion doesn't find the new folder created. 2002-12-24 Satyaki Das * mh-customize.el (mh-clean-message-header-flag) (mh-visible-headers, mh-invisible-headers) (mh-invisible-header-fields-set): Reworded to satisfy checkdoc. * mh-loaddefs.el: Regenerated. * mh-e.el (mh-inc-folder, mh-visit-folder, mh-read-msg-range): Handle nil value of mh-large-folder properly. * mh-customize.el (mh-tool-bar-show-set, mh-tool-bar-letter-set) (mh-tool-bar-folder-set, mh-tool-bar-folder-buttons) (mh-invisible-headers, mh-invisible-header-fields-set): Checkdoc fixes. (mh-large-folder): Updated to allow for infinity. If mh-large-folder is nil then all folders are deemed small. 2002-12-23 Satyaki Das * mh-e.el (mh-inc-folder, mh-visit-folder): Emit a message if threading was suppressed because the number of messages exceed mh-large-folder. 2002-12-23 Peter S Galbraith * mh-utils.el (mh-invisible-headers): Deleted. Moved to mh-customize.el * mh-customize.el (mh-invisible-header-fields): New defcustom. Simple user interface to change mh-invisible-headers. (mh-invisible-header-fields-set): New function called when mh-invisible-header-fields is set. (mh-invisible-headers): New function. Does the actual work of building the variable mh-invisible-headers from mh-invisible-header-fields. (mh-invisible-headers): defvar moved from mh-utils.el 2002-12-22 Satyaki Das * mh-speed.el (mh-speed-folder-size): Removed. Something very similar appears as mh-folder-size. (mh-speed-view): Simplified since the range selection logic has been moved to mh-read-msg-range. (mh-speed-parse-flists-output-line): Moved to mh-e.el as mh-parse-flist-output-line. * mh-funcs.el (mh-pack-folder): Use the new mh-read-msg-range. * mh-e.el (mh-rescan-folder): Use the new mh-read-msg-range. (mh-parse-flist-output-line): Moved from mh-speed.el where this function was called mh-speed-parse-flists-output-line. (mh-folder-size): Renamed from mh-speed-folder-size. The function has been made more general and can be called from any buffer and not just the speedbar buffer. (mh-visit-folder): Use the new mh-read-msg-range (addresses SF #655891). (mh-read-msg-range): Rewritten. 2002-12-21 Satyaki Das * mh-seq.el (mh-delete-subject-or-thread): New interactive function that intelligently deletes messages based on threading, if the folder is threaded, or on subject if folder isn't threaded. * mh-utils.el (mh-show-delete-subject-or-thread): New interactive function, callable from the show buffer, to intelligently delete messages based on threading info or subject. (mh-show-mode-map): Change binding of "k" to call mh-show-delete-subject-or-thread. * mh-e.el (mh-folder-mode-map): Change binding of "k" to call mh-delete-subject-or-thread. * mh-comp.el (mh-letter-mode-map): Add key binding for mh-insert-identity. * mh-loaddefs.el: Regenerated. 2002-12-21 Peter S Galbraith * mh-customize.el (mh-tool-bar-letter-set): Bug fix. The `tool-bar-add-item-from-menu' items were broken. I can't use my constants there. 2002-12-21 Peter S Galbraith * mh-alias.el (mh-alias-insert-file): Bug fix. I never checked that an AliasFile entry existed in .mh_profile. 2002-12-21 Peter S Galbraith * mh-customize.el (mh-alias-insertion-location): New defustom. Specifies where new aliases are entered in alias files. * mh-alias.el (mh-alias-add-alias-to-file): Use it. 2002-12-21 Peter S Galbraith * mh-alias.el (mh-alias-add-alias-to-file): If ALIAS matches exactly, prompt to [i]nsert before old value or [a]ppend after it. (mh-alias-insert-file): Make sure we don't edit the passwd file. Add optional argument for alias; If ALIAS is specified and it already exists, try to return the file that contains it. (mh-alias-which-file-has-alias): New function. Return the name of writable file which defines ALIAS from list FILE-LIST. (mh-alias-add-alias): Remove prompts for case of alias already defined; done in mh-alias-add-alias-to-file. 2002-12-21 Satyaki Das * mh-speed.el (mh-speed-folders-actual): Fix bug in parsing of folder names that have spaces in them. The original function would truncate the folder name at the first space. (mh-speed-flists): Add -sequence option to flists. This guards against the user specifying something other than the unseen sequence in his .mh_profile. (mh-speed-parse-flists-output-line): New function that parses a single line in the output of flists to find the folder name and the counts of unseesn and total messages. (mh-speed-parse-flists-output): Fix parsing bug which truncates the folder names at the first space. * mh-index.el (mh-index-generate-pretty-name): New function which generates a nicer name for the search results. It trims white space at the beginning and end and replaces white space with underscores within the search regexp. (mh-index-search): Use mh-index-generate-pretty-name. * mh-loaddefs.el: Regenerated. 2002-12-20 Satyaki Das * mh-index.el (mh-index-new-folder): Add new folder to mh-folder-list to enable name completion. (mh-glimpse-execute-search, mh-swish-execute-search) (mh-swish++-execute-search): Fix documentation. * mh-seq.el (mh-thread-generate): Fixed a stupid bug where the wrong folder could get 'scan'ed when generating the threaded view. * mh-index.el (mh-index-search): If optional prefix arg is given then the search in the current index buffer is redone. (mh-glimpse-execute-search, mh-swish-execute-search) (mh-namazu-execute-search): Documentation fixes. * mh-e.el (mh-index-previous-search): New buffer local variable stores parameters of search that created the buffer. (mh-folder-mode): Make mh-index-previous-search buffer local. (mh-visit-folder): Tweak the function so that only a single window with the folder buffer is shown if mh-showing-mode is nil. * mh-loaddefs.el: Regenerated. 2002-12-19 Peter S Galbraith * mh-alias.el (mh-alias-add-alias): Bug fix. 2002-12-19 Peter S Galbraith * mh-alias.el (mh-alias-add-alias): New interactive command. Add ALIAS for ADDRESS in personal alias file. (mh-alias-grab-from-field): New interactive command. Add ALIAS for ADDRESS in personal alias file. (mh-alias-add-address-under-point): New interactive command. Insert an alias for email address under point. (mh-alias-suggest-alias): New function. Suggest an alias for STRING. (mh-alias-insert-file): New function. Return the alias file to write a new entry in. (mh-alias-address-to-alias): New function. Return the ADDRESS alias if defined, or nil." (mh-alias-from-has-no-alias-p): New function. Return t is From has no current alias set. Used as tool-bar button enable function. (mh-alias-add-alias-to-file): New function. Add ALIAS for ADDRESS in alias FILE without alias check or prompts. * alias.xpm, alias.pbm: New tool-bar icon for mh-alias-grab-from-field. * mh-e.el (mh-folder-line-matches-show-buffer-p): New function. Return t if the message under point in folder-mode is in the show buffer. * mh-utils.el (mh-goto-address-find-address-at-point): New function copied from goto-addr.el, which we don't want to force-load on users. Find e-mail address around or before point. (mh-address-mail-regexp): New defvar. A regular expression probably matching an e-mail address. * mh-customize.el (mh-alias-insert-file): New defcustom. Filename to use to store new MH-E aliases. (mh-tool-bar-folder-buttons): Enable mh-tool-bar-item-alias icon. * mh-comp.el (mh-extract-from-header-value): New function. Extract From: string from header. 2002-12-19 Satyaki Das * mh-index.el (mh-index-update-single-msg): New defvar controls max number of command line args. (mh-index-execute): New function which is to be used instead of xargs so that we don't give the shell too many command line args. (mh-index-update-maps): Use mh-index-execute instead of xargs. (mh-index-search): Remove unused code. Also the first message in folder buffer is made current. 2002-12-18 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-letter-tool-bar-map): Moved to mh-customize.el * mh-e.el (mh-folder-tool-bar-map): Moved to mh-customize.el * mh-utils.el (mh-get-msg-num): autoloaded. (mh-show-tool-bar-map): Moved to mh-customize.el * mh-customize.el (mh-tool-bar-item-*): 33 new defconsts for tool-bar setup and customization. (mh-tool-bar-folder-buttons-set): New function to setup the tool-bar after customization. (mh-tool-bar-folder-buttons): New defcustom to specify which icons appears in the tool-bar. (mh-tool-bar-letter-buttons-set): New function to setup the tool-bar after customization. (mh-tool-bar-letter-buttons): New defcustom to specify which icons appears in the tool-bar. (mh-tool-bar-show-set): New function to setup mh-letter-tool-bar-map. (mh-tool-bar-letter-set): New function to setup mh-letter-tool-bar-map. 2002-12-18 Satyaki Das * mh-e.el (mh-folder-mode-map): Change entries for "\t", "\M-\t" and backtab to call mh-index-next-folder and mh-index-previous-folder as appropriate. * mh-index.el (mh-index-next-folder, mh-index-previous-folder): New interactive functions which jumps to search results of next and previous folders respectively. * mh-loadddefs.el: Regenerated. * mh-index.el (mh-index-delete-folder-headers): Arrange for mh-goto-cur-msg to just go to the current message. * mh-e.el (mh-visit-folder): Since mh-scan-folder erases the whole buffer anyway, we don't need to delete the folder headers. Also index-data is non-nil only when the buffer folder doesn't exist. So we need to call mh-make-folder. (mh-folder-mode): Fix bug in that mh-index-checksum-origin-map was not being made buffer local! 2002-12-17 Satyaki Das * mh-e.el (mh-visit-folder): Fix bug. * mh-index.el (mh-md5sum-buffer): Buffer from which md5sum is run. (mh-index-folder-first, mh-index-folder-last) (mh-index-original-msg-list): Convenience macros aren't needed anymore since the data structure has been changed. (mh-index-update-single-msg): New function to update maps that relate MD5 checksums to actual messages and vice-versa for a single message. (mh-index-update-maps): Do the above for all messages. If some messages don't have MD5 checksums, they are annotated with the result of md5sum. (mh-index-search): Updated for the new version of mh-index-data. (mh-msg-exists-p): New function to test a message exists. (mh-index-insert-folder-headers): Updated for new mh-index-data. (mh-index-delete-folder-headers): New function used to eliminate original folder names from the buffer and make it look like a plain folder buffer. This is used from mh-process-commands. (mh-index-visit-folder): Use new version of mh-index-data. (mh-index-match-checksum): New function which checks if the X-MHE-Checksum header of a message matches. (mh-index-execute-commands): New function that rmm's the original messages. Then after mh-execute-commands executes it will seem that the original messages were executed upon. This completes the fix of SF #623321. (mh-checksum-buffer): Renamed from mh-md5sum-buffer. (mh-checksum-cmd, mh-checksum-parser): New globals to allow different checksum programs to be used. (mh-checksum-choose): New functions to find a checksum program. (mh-openssl-parser, mh-md5sum-parser, mh-md5-parser): Functions to parse the output of md5, md5sum and openssl. (mh-index-update-maps): Use checksum parsing function. (mh-index-search): Set checksum choice. Add a call to recenter, otherwise the window point in the index buffer doesn't get set properly. * mh-funcs.el (mh-pack-folder, mh-sort-folder): Enable these functions in folders created by index search. * mh-e.el (mh-index-msg-checksum-map) (mh-index-checksum-origin-map): New buffer local variables that keep track of message checksums (used to implement refiling/deletion for folders created by index folders). (mh-last-msg): Make the function behave like mh-first-msg. (mh-visit-folder): Add new optional argument which initializes folders created by mh-index-search. (mh-folder-mode): Make the variables mh-index-msg-checksum-map and mh-index-checksum-origin-map buffer local. (mh-process-commands): Call mh-index-execute-commands when called from an index search buffer. This will reflect the changes being made in the search folder to the original folders. * mh-loaddefs.el: Regenerated. 2002-12-16 Satyaki Das * mh-index.el (mh-index-insert-folder-headers): Fix a bug which caused the folder buffer to be marked as modified after rescanning an index folder. 2002-12-15 Satyaki Das * mh-e.el (mh-visit-folder): The function should insert folder names if it is visiting a folder created by index search. * mh-index.el (mh-index-insert-folder-headers): The function now maintains the old value of buffer-modified-p and temporarily makes the buffer writable. * mh-utils.el (mh-show-index-visit-folder): New interactive function callable from show buffer that displays search results from one folder. (mh-show-mode-map): Key binding for "v". * mh-speed.el: Fix credits. (mh-index-folder-speedbar-buttons) (mh-index-show-speedbar-buttons) (mh-index-folder-speedbar-key-map) (mh-index-show-speedbar-key-map) (mh-index-folder-speedbar-menu-items) (mh-index-show-speedbar-menu-items): Removed since the modes mh-index-folder-mode and mh-index-show-mode no longer exist. (mh-speed-extract-folder-name): Remove the bits about mh-index-folder-mode and mh-index-show-mode. * mh-seq.el (mh-copy-seq-to-eob): Updated to work properly with index search results. (mh-region-to-msg-list): Skip over non-scan lines. (mh-thread-inc, mh-thread-add-spaces, mh-thread-folder): Skip non-scan lines when populating mh-thread-scan-line-map. (mh-thread-folder, mh-toggle-threads): Move the check for buffer modification from mh-thread-folder to mh-toggle-threads. (mh-toggle-threads): When returning to unthreaded view insert the folder names if called from a index folder. * mh-index.el: Fix credits and update commentary. (font-lock-defaults, mh-index-buffer, mh-index-show-buffer) (mh-index-ma-x-msg-index, mh-index-other-buffer) (mh-index-matches, mh-index-previous-window-configuration) (mh-index-current-msg, mh-index-folder-mode-keymap) (mh-index-button-map, mh-index-folder-mode-help-messages): Remove eliminated variables. (mh-index-folder): New variable sets the MH folder under which the index searches are stored. (mh-index-folder-first, mh-index-folder-last) (mh-index-original-msg-list): Convenience macros used to pull data elements out of a list. If needed setf can be used to change them as well. (mh-index-search): Rewritten to create real folders where all the normal folder operation. This partially fixes SF #623321 (refiles and deletes doesn't work on original messages). (mh-index-find-max-width, mh-index-search-again) (mh-index-insert-scan, mh-index-callback, mh-index-search) (mh-index-notate, mh-index-show, mh-index-header-display) (mh-index-next, mh-index-folder-mode, mh-index-show-mode): Functions, macros and modes removed. (mh-folder-exists-p): New function to check if a folder exists. (mh-index-new-folder): Generate a new folder name from a given base string that mimics the way emacs generates buffer names. (mh-index-insert-folder-headers): Insert folder names among the search results. (mh-index-visit-folder): New interactive function to show the search results of one individual folder. (mh-swish++-execute-search): Update documentation. * mh-funcs.el (mh-pack-folder, mh-sort-folder): Disable these functions if index search results are being viewed. * mh-e.el (mh-folder-font-lock-keywords): Add highlight for folder. (mh-index-data): New buffer local variable that will be used to store info about index search results. (mh-rescan-folder): Implement rescanning for index search results. (mh-folder-mode): Make mh-index-data buffer local. (mh-remove-all-notation): Modified to take into account not all lines in the folder buffer are normal scan lines. (mh-folder-mode-map): Add key binding for "v" to jump to original folder narrowed to search results. * mh-customize.el (mh-index-folder-face): Make it bold so that it will look like before. * mh-loaddefs.el: Regenerated. 2002-12-12 Satyaki Das * mh-seq.el (mh-map-to-seq-msgs): Modified so that it can be given a list of messages in addition to a sequence. (mh-region-to-sequence, mh-region-to-msg-list): The function mh-region-to-msg-list replaces mh-region-to-sequence. The new function avoids creating a dummy sequence in MH-E. (mh-thread-delete, mh-thread-refile, mh-put-msg-in-seq): Modified to use mh-region-to-msg-list. * mh-funcs.el (mh-copy-msg): Modified to use mh-region-to-msg-list. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Modified to use mh-region-to-msg-list. * mh-comp.el (mh-forward): Modified to use mh-region-to-msg-list. The buffer-local variable mail-header-separator is no longer bound. This fixes a bug where the default value of mail-header-separator gets used if mh-forward is called in a fresh emacs session. (mh-annotate-msg): Update this so that it will handle message lists too. (mh-insert-letter): Make the test stronger. Since %d is being used the argument better be an integer. * mh-loaddefs.el: Regenerated. 2002-12-11 Satyaki Das * mh-funcs.el (mh-copy-msg): Add support for transient-mark-mode. If mark is active and transient-mark-mode is enabled then all the messages in the region are copied. * mh-seq.el (mh-list-sequences): Use mh-coalesce-msg-list to print messages in sequence nicely. The prompt for the folder is removed (the current folder is always used) and the output is made nicer by not overflowing the screen width. * mh-loaddefs.el: Regenerated. 2002-12-09 Satyaki Das * mh-comp.el (mh-letter-complete): Checkdoc fix. * mh-seq.el (mh-thread-current-indentation-level): New function which returns the thread indentation level of current message. (mh-thread-next-sibling, mh-thread-previous-sibling): New interactive functions to jump to the next and previous siblings in thread tree respectively. (mh-thread-immediate-ancestor): New function to jump to ancestor of current message in thread tree. (mh-thread-ancestor): New interactive function to jump to immediate ancestor or to root message of current thread depending on optional argument. * mh-utils.el (mh-show-thread-ancestor) (mh-show-thread-next-sibling, mh-show-thread-previous-sibling): Interactive functions callable from the show buffer. (mh-show-thread-map): Bindings for Tu, Tp and Tn. * mh-e.el (mh-thread-map): Bindings for Tu, Tp and Tn. * mh-loaddefs.el: Regenerated. 2002-12-09 Satyaki Das * mh-seq.el (mh-region-to-sequence): Change name of region sequence created to 'mhe-region. This avoids any chance of collision with actual MH sequences. (mh-put-msg-in-seq, mh-thread-delete, mh-thread-refile): Change name of region sequence used to 'mhe-region. Also delete the 'mhe-region sequence when done. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Same as above. * mh-comp.el (mh-forward): Same as above. * mh-loaddefs.el: Regenerated. 2002-12-08 Bill Wohler * mh-alias.el: Edited documentation. Broke up file into 2 sections: Alias Loading and Alias Expansion. Made terminology consistent (replaced expand, substitute, and translate with expand). (mh-alias-reload): Brought message in line with coding conventions and made more concise too. (mh-alias-translate): Renamed to mh-alias-expand. (mh-alias-substitute-aliases-flag): Renamed to mh-alias-expand-aliases-flag. (mh-alias-reload-local-users): Renamed to mh-alias-local-users. Now just returns an alist of local users rather than have side-effects. (mh-alias-reload): Set timestamp at beginning of function to catch edge case when alias added just after ali runs. Changed logic to reflect return value of mh-alias-local-users. * mh-customize.el (mh-alias-substitute-aliases-flag): Renamed to mh-alias-expand-aliases-flag. (mh-alias-local-users): Fixed documentation. * mh-loaddefs.el: Regenerated 2002-12-08 Satyaki Das * mh-e.el (require): Load Gnus at compile time so that the constant gnus-version is defined when MH-E is being compiled. (mh-macro-expansion-time-gnus-version, mh-run-time-gnus-version): Use the constant gnus-version instead of the function gnus-version to find out about gnus version information. (gnus-version): Remove the autoload since it is not needed any more. 2002-12-08 Bill Wohler * mh-e.el (mh-version): Moved compilation information in front of Emacs information. The idea is that you start at MH-E and move outwards. Show N/A if Gnus not compiled (be explicit). Matched coding style with other output statements. (Aside: not that efficiency matters here, but fewer calls to format have to be faster, right? ;-). Matched output style of old output to new statement--liked Satyaki's indentation better ;-). 2002-12-08 Satyaki Das * mh-e.el (gnus-version): Autoload the function for use in mh-version. (mh-macro-expansion-time-gnus-version): New macro that finds the Gnus version at macro expansion time. (mh-run-time-gnus-version): New function to find the Gnus version at run time. (mh-version): Add information about Gnus versions available at compile time and run time. 2002-12-07 Peter S Galbraith * mh-alias.el (mh-alias-ali): Add optional argument. if USER is t, then assume ALIAS is an address and call ali with option -user. * mh-alias.el (mh-alias-filenames): if ARG is t, appends list of files from `mh-alias-system-aliases' to output list obtained from mhparam output user list only. (mh-alias-tstamp): Use it. 2002-12-05 Satyaki Das * mh-mime.el (mh-inline-vcard-p): A new function which decides if a vcard should be displayed inline. (mh-mime-display-single): Use mh-inline-vcard-p to display attached vcard as a signature if no other signature is present (this partially addresses SF #649216). 2002-12-05 Peter S Galbraith * mh-comp.el (mh-send-letter): Edits docs for mh-mml-to-mime getting run if variable `mh-mml-compose-insert-flag' is set. (mh-get-header-field): use buffer-substring-no-properties instead of buffer-substring. 2002-12-04 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-customize.el (mh-customize): Add ;;;###mh-autoload tag. 2002-12-04 Peter S Galbraith * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-letter-complete): New command to do alias or word completion in letter-mode. (mh-letter-mode-map): Add \M-\t binding for mh-letter-complete. * mh-alias.el (mh-alias-letter-mode-expand-alias-hook): Obsolete. Replaced by mh-letter-complete command. (mh-alias-reload-maybe): New function to rebuild alias table if out of date. (mh-alias-letter-expand-alias): No longer interactive. Use mh-letter-complete instead. 2002-12-04 Peter S Galbraith * mh-customize.el (mh-letter-complete-function): New defcustom. Function to call when completing outside of fields specified to aliases. * mh-alias.el (mh-alias-filenames): s/mh-mhparam-component/mh-profile-component/ (mh-profile-component): Move to mh-utils.el and make interactive. (mh-read-address): Make it autoloaded. * mh-loaddefs.el: Regenerated. * mh-comp.el (mh-read-address): Removed. Replaced by mh-alias version. * mh-utils.el (mh-profile-component): Moved from mh-alias.el. 2002-12-04 Satyaki Das * mh-seq.el (mh-msg-is-in-seq): Formatting change. * mh-index.el (mh-index-insert-scan): Remove unused variable. 2002-12-04 Bill Wohler * mh-loaddefs.el: Regenerated. * Makefile (MH-E-SRC): Moved mh-loaddefs.el into MH-E-LOADDEFS as this was causing a cycle. (MH-E-LOADDEFS): New variable to house mh-loaddefs.el. (emacs): Reintroduced autoloads. (autoloads): We're baaa-aack! (dist, install-emacs): Use MH-E-LOADDEFS. * mh-comp.el (mh-customize): Moved to mh-customize.el. * mh-customize.el (mh-customize): Moved here from mh-comp. Makes more sense, doesn't it? * mh-alias.el, mh-comp.el, mh-e.el, mh-index.el, mh-mime.el, mh-pick.el, mh-speed.el: Added mh-autoload cookie to all interactive functions. 2002-12-04 Satyaki Das * Makefile (world): Remove target. (mh-loaddefs.el): Add comment that only GNU Emacs can be used to regenerate mh-loaddefs.el. * mh-make.el: Removed. 2002-12-04 Mark D. Baushke * mh-e.el (recursive-load-depth-limit): Only modify the limit if it is an integer. 2002-12-04 Peter S Galbraith * mh-utils.el (mh-header-field-beginning): New function. Move to the beginning of the current header field. 2002-12-04 Satyaki Das * mh-make.el (mh-files): Read in the MH-E filenames from the environment variable where the Makefile puts it. (mh-generate-autoloads, step2): Simplified since we now have the complete file names. * Makefile (world): Pass the MH-E files into the script, so that the filenames don't need to be repeated in the script. 2002-12-04 Bill Wohler * mh-loaddefs.el: New file. Check in automatically generated file and include in package for the benefit of those who don't want to or can't compile. * Makefile (MH-E-SRC): Added mh-loaddefs.el now that it is checked in and will be packaged. (emacs): Removed autoloads. Adding mh-loaddefs.el to MH-E-SRC is sufficient to build it. (compile): Depend on MH-E-SRC instead of MH-E-OBJ and pass $? into emacs so that Emacs is only invoked once to compile files. This speeds things up by a factor of 3. It would be nice to only pass those files that have been modified, but Emacs 21.4 will have batch-byte-compile-if-not-done which we might be able to copy into mh-make.el (or my proposed mh-e-dev.el which would be more general-purpose). (.SUFFIXES): Removed. Now that compile works directly on the sources, the implicit rule is obsolete. (autoloads): Deleted. See emacs change above. 2002-12-03 Bill Wohler * Makefile (MH-E-SRC, emacs): 2002-12-03 Satyaki Das * mh-make.el (mh-emacs): Make failing condition more strict. (mh-loaddefs-end): Remove redundant statement. * Makefile (world): A little typo. The bug didn't seem to make any difference though. * mh-make.el: New script that compiles MH-E. (mh-loaddefs-beginning, mh-loaddefs-end): Don't save the autoloads file in between. Only save at the end. (mh-emacs-generate-autoloads, mh-xemacs-generate-autoloads) (mh-generate-autoloads): Replace the separate functions in Emacs and XEmacs with one that works in both variants. This simplifies the script a lot. (mh-generate-autoloads): doc fix. * Makefile (world): New target which works for both GNU Emacs and XEmacs. 2002-12-03 Peter S Galbraith * mh-alias.el (mh-mhparam-component): Don't raise error if call to mhparam fails. * mh-alias.el (mh-alias-letter-expand-alias): Build alias table if not already available. 2002-12-03 Bill Wohler * mh-customize.el (mh-show-threads-flag): Alphabetized. 2002-12-03 Jeffrey C Honig * Makefile: Moved .PHONY rule after all rule for compatibility with BSD/OS's old pmake. 2002-12-03 Mark D Baushke * mh-e.el (mh-get-new-mail): Simplify no-new-mail test. (mh-add-cur-notation): Remove unnecessary function. 2002-12-03 Peter S Galbraith * mh-identity.el (mh-identity-make-menu): Check if 'mh-letter-mode-map' is bound, since this code also gets run when mh-customize.el is loaded at startup. 2002-12-03 Satyaki Das * mh-customize.el (mh-show-threads-flag): New customizable variable which controls if new folders start of in threaded mode (closes SF #646794). * mh-e.el (mh-rescan-folder): Fix the function so that threading is preserved across rescans. (mh-visit-folder, mh-inc-folder): The folder is threaded if it was already threaded or if mh-show-threads-flag is non-nil and the number of scan lines is fewer than mh-large-folders (closes SF #646794). 2002-12-02 Mark D Baushke * mh-e.el (mh-add-cur-notation): New function to mark the current message with the mh-note-cur character. (mh-get-new-mail): Use mh-add-cur-notation to undo the work of mh-remove-cur-notation if there was no new mail (closes SF #647681). * mh-e.el (mh-set-cmd-note): Do not update the default mh-cmd-note value (closes SF #643701). 2002-12-02 Peter S Galbraith * mh-alias.el (mh-alias-reload): Renamed from mh-alias-learn-aliases. (mh-alias-load-local-users): Renamed from mh-alias-learn-local-users. (mh-alias-passwd-alist): New variable, holding aliases extracted from the passwd file. (mh-alias-tstamp): New variable storing the timestamp for alias list generation. (mh-read-address, mh-alias-reload, mh-alias-reload-local-users): Complete rewrite. (mh-alias-minibuffer-confirm-address): Use mh-alias-translate. (mh-alias-translate): New function. Return translation for alias, checking if in blind or passwd list. (mh-alias-letter-expand-alias): Rewrite using mail-abbrev-complete-alias from mailabbrev.el (mh-alias-expand-alias-map): New variable. (mh-alias-ali): New function. Return formatted string of translated ALIAS from ali. (mh-mhparam-component): New function. Return COMPONENT value from mhparam, or nil if unset. (mh-alias-filenames): New function. Provide list of alias filenames from mhparam, or nil if none are set. * mh-customize.el (mh-alias-display-blind-name-on-completion-flag): Obsoleted. (mh-alias-timestamp): Renamed to mh-alias-system-aliases. 2002-12-02 Bill Wohler * Makefile (mh-loaddefs.el): Suppress creation of backup file. 2002-12-02 Mark D. Baushke * Makefile (mh-loaddefs.el): Simplify rule. * Makefile (clean): Remove mh-loaddefs.el* for good measure. ($(MH-E-OBJ)): Depend on mh-loaddefs.el to compile these. (autoloads, mh-loaddefs.el): Revamp rules. (mh-loaddefs.el-tail, autoloads-gen): Remove rules. * mh-e.el (recursive-load-depth-limit): Do not try to bump the value unless the variable exists. * mh-e.el (recursive-load-depth-limit): Bump value of recursive-load-depth-limit to 50 to allow emacs 21.1 which normally has a default value of 10 to be able to compile MH-E. 2002-12-02 Satyaki Das * mh-funcs.el (mh-pack-folder, mh-sort-folder): Fix the functions so that threading is preserved (needed for SF #646794). * mh-identity.el (mh-identity-signature-start) (mh-identity-signature-end): Checkdoc fixes. * mh-e.el (mh-previous-unread-msg, mh-next-unread-msg): Checkdoc fixes. 2002-12-01 Satyaki Das * mh-identity.el (compile): Make mh-identity.el compile without warnings. * mh-e.el (mh-previous-unread-msg, mh-next-unread-msg): New interactive functions that go to next and previous unread messages (closes SF #630328). (mh-folder-mode-map): Add key bindings for M-n and M-p to mh-folder-mode-map. * mh-utils.el (mh-show-next-unread-msg) (mh-show-previous-unread-msg): New interactive functions that go to the next and previous unread messages respectively. These are callable from the show buffer. (mh-show-mode-map): Add key bindings for M-n and M-p to mh-show-mode-map. 2002-12-01 Bill Wohler * mh-mime.el (mh-defun-compat): Make it indent like a defun. * mh-index.el (mh-defun-index): Make it indent like a defun. * mh-customize.el: New file (closes SF #643722). * Makefile (MH-E-SRC): Added mh-customize.el (closes SF #643722). * mh-speed.el, mh-pick.el, mh-mime.el, mh-index.el, mh-e.el, mh-comp.el: Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722). * mh-utils.el (mh-xemacs-flag): Moved here from below since needed by mh-customize.el. (mh-customize): Required. mh-invisible-headers) (mh-bury-show-buffer-flag, mhl-formfile): Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722) . * mh-identity.el (mh-comp-loaded): New variable in a desparate attempt to prevent an infinite loop. (eval-when-compile): Was able to remove these defvars as they are now predefined in mh-loaddefs and mh-customize. (mh-identity-list-set): Added ;;;###mh-autoload cookie. Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722). * mh-alias.el (mh-e): Require this, as it needs defcustoms, which is in mh-customize which is required by mh-utils which is required by mh-e. Moved all defgroups, defcustoms, and deffaces to mh-customize.el (closes SF #643722). 2002-11-30 Satyaki Das * mh-e.el (mh-thread-map): Add key bindings "Td" and "To" (closes SF #630493). (mh-help-messages): Update help message for prefix map. (mh-help-messages): Doc fix. (mh-help-messages): Really fix it. * mh-utils.el (mh-show-thread-delete, mh-show-thread-refile): New interactive functions corresponding to mh-thread-delete and mh-thread-refile callable from the show buffer. (mh-show-thread-map): Add key bindings for "Td" "To". * mh-seq.el (mh-narrow-to-seq, mh-put-msg-in-seq, mh-rename-seq) (mh-narrow-to-subject, mh-delete-subject, mh-toggle-threads): Add mh-autoload cookies. (mh-thread-find-children): New function which finds the region containing all children of a message. (mh-thread-delete): New interactive function that marks for deletion the current message and its children. (mh-thread-refile): New interactive function that marks for refiling the current message and its children. 2002-11-30 Bill Wohler * mh-funcs.el, mh-identity.el, mh-index.el, mh-pick.el, mh-seq.el: Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722). * mh-mime.el (mh-buffer-data): Moved to mh-utils where it is used. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * mh-utils.el (mh-loaddefs): Added require. (mh-buffer-data): Moved here from mh-mime.el as it is used in mh-display-msg. (mh-set-cmd-note): Moved to mh-e.el. Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * mh-e.el (mh-set-cmd-note): Moved here from mh-utils.el since it uses mh-scan-format-file which is defined here. Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * mh-comp.el, mh-speed.el (mh-utils): Removed require. mh-utils is provided via mh-e.el. Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in mh-loaddefs.el (closes half of SF #643722).. * Makefile (emacs): Add dependency on autoloads. (clean): Remove mh-loaddefs.el too. (autoloads): New target. Builds mh-loaddefs.el. (mh-loaddefs.el): New target. Initializes mh-loaddefs.el. (mh-loaddefs.el-tail): New target. Appends to mh-loaddefs.el. (autoloads-gen): Runs batch-update-autoloads to populate mh-loaddefs.el (closes half of SF #643722).. (auto-autoloads.elc): Renamed from autoloads to be explicit about file that's created. (custom-load.elc): Ditto. 2002-11-30 Satyaki Das * mh-seq.el (mh-thread-last-ancestor): New variable which keeps track of oldest ancestor of last message. If due to narrowing the common ancestor of two messages is lost then one of them is promoted to be the parent of the other. This variable helps in this process. (mh-thread-generate-scan-lines): Group messages which belong to the same thread tree, even if a common ancestor is no longer present. (mh-thread-folder, mh-copy-seq-to-eob, mh-thread-inc): Bind mh-thread-last-ancestor to nil when calling mh-thread-generate-scan-lines. * mh-mime.el (font-lock): Font-lock required at compile time to avoid warning about font-lock-maximum-size (mh-display-smileys, mh-display-emphasis): Show graphical smileys and emphasis only if message isn't too large. * mh-e.el (mh-visit-folder): Revisiting a buried folder which has been threaded or narrowed confuses MH-E. Even though the folder is displayed as not threaded and not narrowed, MH-E still believes the folder is in the previous state. This can cause problems when trying to narrow/thread the folder. The change fixes this. * mh-mime.el (mh-mime-display-alternative): The setting of mh-display-buttons-for-inline-parts-flag was not being used when displaying one of the alternatives. This change fixes that. * mh-comp.el (mh-show-buffer-message-number): Replace subseq with substring. (mh-filter-out-non-text): When filtering out MIME buttons from yanked text, the last line of the MIME part was getting lost. The fix avoids that and removes only the last new line instead. 2002-11-29 Peter S Galbraith * Makefile (MH-E-SRC): Add mh-alias. * mh-alias.el: Assign copyright to FSF instead of myself. (mh-read-address): Add support for emacs-21's completing-read-multiple to prompt for multiple entries. (mh-alias-PC-complete-address): Deleted. (mh-alias-learn-aliases): Use mh-exec-cmd-quiet instead of old kludge. (mh-alias-letter-mode-expand-alias-hook): Simplify. (mh-alias-hostname): Deleted. (mh-alias-substitute-aliases-flag): Change default to nil. (mh-alias-display-blind-name-on-completion-flag) Change default to nil. (mh-alias-alist): Now holds alias values. (mh-alias-lowercase-alist): Deleted. (mh-alias-minibuffer-confirm-address, mh-alias-learn-aliases) (mh-alias-learn-local-users, mh-alias-letter-expand-alias): Use new mh-alias-alist instead of old mh-alias-lowercase-alist. * mh-alias.el: Moved from contrib/ directory. Now part of MH-E! * Makefile (MH-E-SRC): Add mh-identity. * mh-identity.el (mh-compose-and-send-mail, mh-insert-identity) (mh-identity-make-menu, mh-identity-default, mh-identity-menu): Moved to mh-comp.el. * mh-comp.el (mh-compose-and-send-mail): Add mh-identity support. (mh-insert-identity, mh-identity-make-menu, mh-identity-default) (mh-identity-menu): Added from mh-identity.el 2002-11-29 Bill Wohler * mh-comp.el, mh-e.el, mh-funcs.el, mh-identity.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el: Ran indent-region, reformatted long lines, ran untabify. (indent-tabs-mode): Set file local variable to nil. 2002-11-29 Bill Wohler Released MH-E version 7.0. * mh-e.el (Version, mh-version): Updated for release 7.0. * mh-comp.el (subseq, search): Require cl instead of autoloading these due to compilation warnings in CVS Emacs. 2002-11-23 Bill Wohler * MH-E-NEWS: Emphasize the renaming of the variables at the top of the notes. 2002-11-22 Satyaki Das * mh-utils.el (mh-show-mode-map): Remove binding for RET since it is not needed and the binding is more useful to toggle display of MIME parts. * mh-mime.el (mh-mime-button-commands): Remove bindings for "i" and "o" from MIME buttons. (mh-insert-mime-button): Change comment to reflect change in button key map. 2002-11-21 Bill Wohler Released MH-E version 6.1.91. * mh-e.el (Version, mh-version): Updated for release 6.1.91. * MH-E-NEWS: Inline HTML parts supported with Gnus 5.10, not 5.9. 2002-11-21 Mark D. Baushke * mh-comp.el (mh-letter-insert-signature-hook): This should be in customize-group mh-compose. 2002-11-21 Satyaki Das * mh-utils.el (load): Load mm-view.el here so that mm-inline-text-html would be defined if available. (mh-mm-inline-media-tests): If mm-inline-text-html is available then use it, otherwise fall back on using mm-inline-text (closes SF #641482). * mh-mime.el (load): Remove the load of mm-view here since it happens in mh-utils.el now. 2002-11-15 Bill Wohler 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. * Makefile (MH-E-IMG): Added reply-all.pbm, reply-all.xpm, reply-from.pbm, reply-from.xpm, reply-to.pbm, reply-to.xpm. (MH-E-ETC-ETC): Added Makefile and README. (dist): Depend on all, so clean happens. Don't add .elc files to tarball as they are built upon installation now. 2002-11-15 Satyaki Das * mh-e.el (mh-process-commands): Fix a bug in mh-execute-commands. If called in threaded mode, cur was always getting set to the last message in the folder. 2002-11-14 Bill Wohler * mh-e.el (Version, mh-version): Updated for release 6.1.90. * MH-E-NEWS, README: Updated for release 7.0. * mh-utils.el (mh-index-search): Added full docstring which new users will need before they run a search! (mh-swish++-execute-search, mh-swish-execute-search, mh-namazu-execute-search mh-glimpse-execute-search): Added autoloads with full docstrings for the same reason! * mh-e.el (mh-limit-map): Removed / / alias for mh-narrow-to-subject. * mh-utils.el (mh-show-thread-map): Removed / / alias for mh-show-narrow-to-subject. * mh-seq.el (mh-delete-subject): Checkdoc fix. * mh-e.el (mh-help-messages): Added / prefix character to help string. Tweaked / helpstring a little. 2002-11-14 Mark D. Baushke * mh-utils.el (mh-set-cmd-note): Fix nitpick by adding one to the width for cosmetic reasons. 2002-11-14 Peter S Galbraith * mh-identity.el (mh-insert-identity): Fix a few things undone by Jeff's patch. (mml-insert-tag): Add autoload. 2002-11-13 Mark D. Baushke * mh-identity.el (mh-insert-identity): A value of either nil or "" should cause the field to be removed. (mh-identity-list): Update the docstring. 2002-11-13 Peter S Galbraith * mh-e.el (mh-limit-map): New key map for limits (subject for now). * mh-utils.el (mh-show-limit-map): Same. * mh-seq.el (mh-delete-subject): Renamed from mh-delete-subject-sequence. (mh-narrow-to-subject): Renamed from mh-narrow-to-subject-sequence. (mh-next-unseen-subject-sequence): Removed. :-( * mh-e.el: Use 'em * mh-seq.el: Use 'em. 2002-11-13 Mark D. Baushke * mh-e.el (mh-alt-show): New defalias for mh-show. (mh-alt-refile-msg): New defalias for mh-refile-msg. (mh-alt-send): New defalias for mh-send. (mh-folder-mode-map): Use mh-alt-show, mh-alt-refile-msg and mh-alt-send for the alias bindings. (mh-alt-visit-folder): New defalias for mh-visit-folder. (mh-folder-map): Use it. (mh-folder-message-menu): Revert previous change. 2002-11-13 Peter S Galbraith * mh-e.el (mh-folder-message-menu): Make key binding "o" appear in menu for mh-refile-msg. 2002-11-13 Satyaki Das * mh-seq.el (mh-thread-generate-scan-lines): In threaded view, scan lines of duplicate messages were too long. The change fixes that. 2002-11-13 Bill Wohler * mh-utils.el (mh-adaptive-cmd-note-flag): Improved grammar in docstring. * mh-speed.el (mh-speed-run-flists-flag): While documenting this variable in the release notes, I was unsure what would happen if set to nil. So, I clarified the docstring and indicated implications of setting this variable to nil, and offered manual workaround. 2002-11-13 Satyaki Das * mh-index.el (mh-index-quit): Fix documentation and run mh-before-quit-hook and mh-quit-hook. 2002-11-13 Bill Wohler * mh-utils.el (with-mh-folder-updating): Renamed local variable mh-save-modification-flag to save-modification-flag. 2002-11-12 Bill Wohler * mh-index.el (mh-index-keymap): Renamed to mh-index-folder-mode-keymap to be a closer to the usual keymap naming convention. Since we want our own keymap and not inherit the one in mh-folder-mode, we need to use a suffix other than -map. * mh-e.el (mh-folder-sequence-menu): s/Msg/Message. s/Seq/Sequence. (mh-folder-message-menu): s/Msg/Message. Removed redundant refile item. (mh-folder-folder-menu): Aligned symbols. * mh-index.el (mh-index-folder-message-menu): s/Msg/Message. * mh-utils.el (mh-show-sequence-menu): s/Msg/Message. s/Seq/Sequence. (mh-show-message-menu): s/Msg/Message. Removed redundant refile item. (mh-show-folder-menu): Aligned symbols. 2002-11-12 Satyaki Das * mh-index.el (mh-index-matches, mh-index-current-match): Remove these variables since they were only used for glimpse and grep. Now the functionality of all the indexing programs will be uniform. (mh-index-search, mh-index-insert-scan, mh-defun-index) (mh-index-show): Simplify functions since matches are no longer shown. (mh-index-parse-match): Remove function. * mh-e.el (mh-scan-cmd-note-width, mh-scan-destination-width) (mh-scan-date-width, mh-scan-date-flag-width) (mh-scan-from-mbox-width, mh-scan-from-mbox-sep-width): New variables to keep track of the widths of the different fields in the scan lines. (mh-scan-field-from-start-offset, mh-scan-field-from-end-offset) (mh-scan-field-subject-start-offset): Offsets that are computed from the scan line widths. * mh-seq.el (mh-copy-seq-to-eob, mh-thread-inc) (mh-thread-parse-scan-line): Use new variables that remember the various offsets in place of integer constants. (mh-thread-generate-scan-lines): Space shouldn't be added here! 2002-11-12 Bill Wohler * mh-e.el (mh-scan-format-mh, mh-scan-format-nmh): Noted that the first column is column number 0 and changed "sixth column" to "fifth column" accordingly. * mh-index.el (mh-index-folder-mode): Clarified method of replying in mode documentation. (mh-index-folder-tool-bar-map): s/mh-e/MH-E/. * mh-e.el (mh-generate-new-cmd-note): Try not to mention internal variable mh-cmd-note in docstrings. * mh-utils.el (mh-adaptive-cmd-note-flag): Set default value to t. Reworded docstring so it doesn't mention internal variable mh-cmd-note. Added information about using fixed-width message numbers. (mh-cmd-note): Mention mh-set-cmd-note in docstring. Also suggest that it is updated dynamically only if mh-scan-format-file is t. (mh-set-cmd-note): Grammer fix in docstring. (mh-cmd-note): Noted that the first column is column number 0. * mh-e.el (mh-scan-format-file): Added information about mh-set-cmd-note and mh-adaptive-cmd-note-flag to docstring. * mh-index.el (mh-index-keymap): Added bindings for i (mh-inc-folder), m (mh-send alias), and s (mh-send) since these appear to be supported and are found in the toolbar. (mh-index-folder-key-map): Ditto for f (mh-visit-folder alias), o (mh-visit-folder) alias, and v (mh-visit-folder). (mh-index-folder-mode-help-messages): Changes for above. (mh-index-folder-message-menu, mh-index-folder-folder-menu): New menus. I decided to delete the unavailable items since greying out implies that the user can do something to access them. In this case, that's not the case. Well, that's not entirely true--the user could write code for those functions ;-). (mh-index-folder-mode): Use new menus. * mh-utils.el (mh-prompt-for-folder): Added optional argument default-string which can be used in case the string for default isn't intuitive enough. * mh-index.el (mh-index-search): Made default prompt more intuitive (I hope!). 2002-11-11 Peter S Galbraith * mh-identity.el (mh-header-field-delete): Remove save-excursion. Strange that this worked for me before... Thanks to Jeff for the patch. (mh-insert-identity): Numerous tweaks and fixes from Jeff who also adds a nicer-looking MIME header for signatures inserted after MIME insertions. 2002-11-11 Satyaki Das * mh-seq.el (mh-thread-parse-scan-line): Generalize this function so that it can take a string containing the scan-line as argument in addition to using the line at point. (mh-thread-add-spaces): New function to pad each scan line to the appropriate length. This is called when mh-cmd-note is increased. * mh-e.el (mh-generate-new-cmd-note): Make this work on a threaded folder by using mh-thread-add-spaces to pad the pre-existing lines in mh-thread-scan-line-map appropriately. (mh-thread-add-spaces): Autoload from mh-seq. 2002-11-11 Mark D. Baushke * mh-index.el: Fix checkdoc nit. * mh-mime.el (mh-display-buttons-for-inline-parts-flag): Renamed from mh-display-buttons-for-inline-parts. (mh-mime-display-single): Use it. This addresses part of SF #627015. * mh-e.el (mh-print-background-flag): Renamed from mh-print-background. * mh-funcs.el (mh-print-msg): Use it. This addresses part of SF #627015. * mh-comp.el (mh-delete-yanked-msg-window-flag): Renamed from mh-delete-yanked-msg-window. (mh-yank-from-start-of-msg, mh-yank-cur-msg): Use it. This addresses part of SF #627015. * mh-utils.el (mh-update-sequences-after-mh-show-flag): Renamed from mh-update-sequences-after-mh-show. (mh-show-msg): Use it. This addresses part of SF #627015. * mh-utils.el (mh-decode-quoted-printable-flag): Renamed from mh-decode-quoted-printable (mh-display-msg, mh-decode-quoted-printable-have-mimedecode): Use it. This addresses part of SF #627015. * mh-utils.el (mh-recursive-folders-flag): Renamed from mh-recursive-folders. (mh-make-folder-list-background): Use it. * mh-funcs.el (mh-list-folders): Ditto. This addresses part of SF #627015. * mh-utils.el (mh-auto-folder-collect-flag): Renamed from mh-auto-folder-collect. (mh-find-path): Use it. This addresses part of SF #627015. * mh-utils.el (mh-decode-mime-flag): Renamed from mh-decode-mime. * mh-utils.el (mh-show-mode, mh-show-xface) (mh-decode-quoted-printable, mh-display-msg, mh-display-msg): Use it. * mh-mime.el (mh-graphical-smileys-flag) (mh-graphical-emphasis-flag): Ditto. * mh-index.el (mh-index-search, mh-index-show): Ditto. * mh-e.el (mh-header-display): Ditto. This addresses part of SF #627015. * mh-e.el (mh-make-folder-mode-line): Use save-window-excursion to get back to the current message. 2002-11-10 Satyaki Das * mh-index.el (mh-index-keymap, mh-index-page-msg) (mh-index-folder-tool-bar-map): Replace mh-index-scroll-up with mh-index-page-msg. (mh-index-keymap, mh-index-previous-page): Replace mh-index-scroll-down with mh-index-previous-page. 2002-11-09 Satyaki Das * mh-index.el (autoload/require): Load mh-mime when mh-index.el is loaded. This fixes the infinite load loop. I am not sure what the actual problem is. Also removed the nop requires/autoloads. (mh-defun-index): Use the right argument for mh-recenter. Otherwise it misbehaves for the default value of mh-summary-height. * mh-e.el (mh-goto-next-button): Fix infinite loop when S-Tab was used on first line of index folder buffer. 2002-11-09 Peter S Galbraith * mh-index.el (mh-index-folder-tool-bar-map): Tool-bar for mh-index-mode. (mh-index-folder-mode): Use it. (mh-index-keymap): Added mouse-2 binding, like in regular folder-mode. 2002-11-08 Satyaki Das * mh-index.el (mh-index-folder-mode): Fix doc string for major mode. It was pointing to the wrong keymap. (mh-index-show-mode): Fix doc string for mode. Also add mh-help support. * mh-comp.el (mh-forward, mh-yank-cur-msg): Use new macro mh-mark-active-p instead. This does the right thing for different variants of Emacs. (mh-yank-cur-msg): Add a space between sexprs. * mh-utils.el (mh-mark-active-p): New macro which papers over diffences between GNU Emacs and XEmacs. The variables mark-active and transient-mark-mode are used in GNU Emacs while zmacs-regions and region-active-p are used in XEmacs. * mh-seq.el (mh-put-msg-in-seq, mh-thread-ancestor-p): Use mh-mark-active-p as above. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Use mh-mark-active-p as above. 2002-11-06 Peter S Galbraith * mh-comp.el (mh-yank-cur-msg): Fix for XEmacs. It didn't work with a selected region, and left the inserted text selected (in reverse video). I didn't use SF patch #402315 to implement this. 2002-11-05 Peter S Galbraith * mh-utils.el (mh-show-tool-bar-map): Change call to mh-tool-bar-search-command such that user can customize it for the current session. * mh-e.el (mh-folder-tool-bar-map): Same. 2002-11-05 Bill Wohler * mh-utils.el, mh-e.el (mh-tool-bar-search-function): Renamed from mh-tool-bar-search-command. * mh-index.el (mh-index-search): Backed out previous change to prompt. There ain't no folder named "all." * mh-utils.el (mh-tool-bar-search-command): Added mh-search-folder and mh-index-search to the docstring so that user can easily click on them for more information. * mh-pick.el (mh-search-folder): Mention that this function uses the MH pick command to give the user more information when choosing between mh-search-folder and mh-index-folder. * mh-index.el (mh-index-search): Edited the docstring. Direct the user to mh-index-program if necessary. (mh-index-program): Edited this docstring too. Viewing the help in a *Help* buffer really exposes grammatical flaws. 2002-11-05 Peter S Galbraith * mh-utils.el (mh-tool-bar-search-command): New defcustom to set what search function to use in tool-bar. (mh-show-tool-bar-map): Use it. * mh-e.el (mh-folder-tool-bar-map): Use it. 2002-11-05 Bill Wohler * mh-index.el (mh-index-search): Changed default prompt from "+" to "all". mh-prompt-for-folder doesn't seem to mind. * mh-e.el (mh-folder-folder-menu): Added menu entry for mh-index-search. * mh-utils.el (mh-show-folder-menu): Added menu entry for mh-index-search. * mh-index.el: Added commentary on supported search engines and for getting started (initializing database). 2002-11-04 Satyaki Das * mh-index.el (mh-index-keymap, mh-index-folder-key-map): Move key binding of "i" to "Fi". (mh-index-folder-mode-help-messages): Change help message to reflect above change. 2002-11-04 Bill Wohler * mh-index.el (mh-index-program, mh-indexer): Swapped names since the former seems like a better user variable name. If you've customized mh-indexer, be sure to toss it out and customize mh-index-program. 2002-11-04 Satyaki Das * mh-index.el (mh-indexer-choices): Not having the quotes in the binary names is a bit nicer since that maintains uniformity with the other names. (mh-index-choose): Use symbol-value instead of eval. Eval should be avoided except when it can't be :-). 2002-11-04 Bill Wohler * mh-index.el (mh-index-program): New variable to hold the name of the indexer that was found; use this instead of clobbering user-customizable variable mh-indexer. (mh-index-search): Use it. Added comments to keep others from doing what I had done (fortunately, I caught myself before checking it in ;-). (mh-index-choose): Set mh-index-program instead of mh-indexer. Update docstring to describe side-effects. * mh-index.el (mh-indexer): Added swish++ to docstring. Chances are good that if someone has both swish++ and swish, they want to use the much faster, much smaller swish, so move it up in the list. (mh-indexer-choices): Ditto for rationale for moving swish++ up in priority over swish. Also, use -binary symbols instead of hard-coding binary names. This allows package installers to customize the location of the binaries in site-lisp and still have the auto-detection code work. It also allows one to have alternate binary names (see mh-swish++-binary). (mh-index-search): Ditto (moving swish++ up). (mh-swish++-binary): Look for search++, then search. The rationale is that a package maintainer may rename search to search++ if search is already in use (e.g., Debian) so try it first. (mh-swish++-execute-search): Replaced Satyaki's path with dummy path in docstring. Also removed RecurseSubdirs since this is the default. Added comment that index might be named index++ on some systems (e.g., Debian). (mh-index-choose): Updated to work with new mh-indexer-choices. 2002-11-04 Peter S Galbraith * mh-identity.el (mh-identity-list-set): Don't call easy-menu-add here, since that adds the menu to the Customize buffer in XEmacs. 2002-11-04 Peter S Galbraith * mh-comp.el (mh-mhn-compose-insert-flag) (mh-mml-compose-insert-flag): Removed eval-when-compile defvar. * mh-mime.el (mh-mhn-compose-insert-flag) (mh-mml-compose-insert-flag): Move variables to mh-utils.el. Fixes mh-letter-menu for XEmacs. 2002-11-04 Eric Ding * mh-comp.el (mh-rejected-letter-start): add another string 2002-11-04 Eric Ding * mh-comp.el (mh-rejected-letter-start): regexp-opt doesn't take regexps as args, only regular strings 2002-11-04 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to): Don't modify a pre-existing M-F-T field. If a nmh replgroupcomps propagates a M-F-T field in a message reply, then we have to have it alone. 2002-11-02 Bill Wohler * mh-comp.el, mh-e.el, mh-funcs.el, mh-identity.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el, mh-xemacs-compat.el: Added Local Variables section. Defined sentence-end-double-space to be nil so that those who might not buy my setting of this variable can at least run checkdoc without a whole lot of noise. 2002-11-02 Peter S Galbraith * mh-identity.el: New file. Multiple Identify support for MH-E. Used to easily set different fields such as From and Organization, as well as diffrent signature files. This file won't be included with V7.0. 2002-11-02 Bill Wohler * mh-mime.el (mh-mm-save-part): New function to wrap mm-save-part from Gnus 5.10 to make it explicit which code has been commandeered. (mh-mime-save-part): Call mh-mm-save-part instead of cut-n-pasted code from Gnus 5.10. 2002-11-02 Peter S Galbraith * mh-comp.el (mh-yank-from-start-of-msg): Edit docstring to mention related variables mh-reply-show-message-flag and mh-delete-yanked-msg-window. (mh-reply): Change the "Reply to whom" prompt. 2002-11-01 Bill Wohler * mh-e.el (mh-show-hook): Moved to mh-utils.el where it is used. (mh-folder-list-change-hook): Converted this from defvar in other files to defcustom here. It is called, not documented as obsolete, and might as well be documented. (mh-inc-folder, mh-quit, mh-delete-a-msg, mh-refile-a-msg, mh-process-commands, mh-update-unseen): Added missing documentation about hook, or made verbiage about hook consistent throughout, even if the function isn't interactive. * mh-utils.el (mh-folder-list-change-hook): Moved defvar to mh-e and made it a defcustom. (mh-show-mode-hook): Put it back in (actually, it was in mh-e.el, but this is the place where it is called). (mh-show-hook): Moved here from mh-e.el since it's called here. (mh-show-mode): Call mh-show-mode-hook. (mh-show-mode, mh-show-msg, mh-find-path, mh-prompt-for-folder, mh-prompt-for-folder, mh-set-folder-list): Added missing documentation about hook, or made verbiage about hook consistent throughout, even if the function isn't interactive. * mh-comp.el (mh-send-letter): Made verbiage about hook consistent throughout. (mh-insert-prefix-string): Made docstring more descriptive of what is going on. * mh-funcs.el (mh-kill-folder): Added missing documentation about hook. * mh-index.el (mh-index-show-hook): Moved defvar to defcustom. (mh-index-show): Made verbiage about hook consistent throughout. * mh-mime.el (mh-edit-mhn-hook): Moved defvar to defcustom. (mh-edit-mhn): Added missing documentation about hook. * mh-pick.el (mh-pick-mode): Made verbiage about hook consistent throughout. Call the damn hook. 2002-11-01 Satyaki Das * mh-comp.el (mh-insert-mail-followup-to-list): Fix typo so that it will look right in info. * mh-index.el (mh-index-search): Change argument name from new-buffer-p to new-buffer-flag. (mh-index-search-again, mh-index-search): New index-buffers were being named *mh-index*<2>, *m-index*<2><2> and so on. This problem is fixed. (mh-index-scroll-up, mh-index-scroll-down): Scrolling in index show buffers (after the first one) was broken. (mh-index-quit): Bury show buffer instead of killing it. Killing it, without killing the corresponding folder buffer, can cause confusion with two folder buffers trying to display in the same show buffer. * mh-seq.el (mh-thread-prune-containers): Rewritten without recursion. Also removed the top-level-p argument since it isn't required anymore. (mh-thread-sort-containers): New function factored out from previous definition of mh-thread-prune-containers. It sorts message containers in ascending order wrt their message indices. (mh-thread-generate): Use new mh-thread-prune-containers. * mh-e.el (mh-remove-all-notation): Fix the test. It was testing at the wrong place! 2002-10-31 Bill Wohler * Makefile, README, import-emacs, mh-comp.el, mh-e.el, mh-funcs.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el: Replaced mh-e with MH-E. 2002-10-31 Satyaki Das * mh-seq.el (mh-thread-parse-scan-line): Modified to remove user sequence notation and leave notation for other things alone. This ensures that threading doesn't lose notations for replied-to messages. * mh-e.el (mh-inc-folder): Remove call to mh-widen here and instead do it in mh-get-new-mail. This way the widening happens only if new mail is incorporated. (mh-generate-new-cmd-note): The function now returns the point from which the new messages start. This will allow threading to do the right thing. (mh-get-new-mail): Always call mh-remove-cur-notation. Otherwise adaptive scan mode leaves two messages marked as current in certain cases. Fix indentation of if statement. If there are messages to be incorporated, the folder is widened. If mh-cmd-note changes set start-of-inc correctly. (mh-remove-all-notation): Change this function to only remove user sequence notation and leave notation for replied-to messages and similar notation alone. This means operations like narrowing to subject sequence and widening don't lose notations. 2002-10-31 Bill Wohler * mh-comp.el (mh-insert-mail-followup-to-list): Fixed typo in docstring and other minor edits. Checkdoc removed trailing spaces. (mh-insert-signature): Checkdoc flagged docstring. Reverted to previous value. Added specific name of hook that is run. (mh-regexp-in-field-p, mh-insert-letter): Checkdoc removed trailing spaces. 2002-10-31 Jeffrey C Honig * mh-e.el (mh-show-mode-hook): Remove the unused mh-show-mode-hook, mh-show-hook is the one that is used. * mh-utils.el (mh-show-mode): Change the documentation to refer to mh-show-hook instead of the unused mh-show-mode-hook. 2002-10-31 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to-list): Set default to nil and include example in doc string. 2002-10-31 Satyaki Das * mh-index.el (mh-indexer): Add customization choice for swish++. (mh-indexer-choices): Add swish++ choice. (mh-index-search): Change doc to reflect addition of swish++ option. (mh-swish++-binary, mh-swish++-directory): New variables for swish++ interface. (mh-swish++-execute-search): New function to execute swish++ search. (mh-swish++-next-result): Function aliased to mh-swish-next-result since the result format of swish++ is the same as that of swish-e. (mh-index-search): Always overwrite window-configuration with new value. This is needed since we don't kill the index-buffer when quitting which means the window configuration wasn't getting set properly. (mh-index-search-again): If index buffer is reused, reset the old window config to its original value. 2002-10-30 Bill Wohler * Makefile (emacs, xemacs): New targets. (all): Use these targets instead of calling specific targets. (.PHONY): Added emacs, xemacs, autoloads, custom-loads. Broke up target and moved pieces into their own sections. 2002-10-30 Peter S Galbraith * mh-utils.el (mh-show-font-lock-keywords): Wrap an 'eval-and-compile around its defvar, otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite'. 2002-10-29 Jeffrey C Honig * mh-comp.el (mh-letter-insert-signature-hook) (mh-insert-signature): Add a hook to be called before inserting the signature. Do not attempt to insert the signature if mh-insert-signature-file-name is nil. 2002-10-29 Peter S Galbraith * mh-e.el (mh-inc-folder): Call mh-widen when mh-narrowed-to-seq (Closes SF #629233: inc in narrowed folder suboptimal) * mh-comp.el (mh-insert-letter): Stop using mhl to include a message before it mangles the header, and supercite fails (Closes SF #629153: mh-insert-letter uses mhl?). (mh-insert-prefix-string): Leave point at beginning instead of end, since that's what sc-cite-original does. (mh-yank-cur-msg): Adjust for mh-insert-prefix-string change. 2002-10-30 Steve Youngs * mh-e.el (mh-folder-mode): Check for 'font-lock-auto-fontify' when in XEmacs so we don't do font-locking unconditionally. * mh-utils.el (mh-show-mode): Ditto. 2002-10-29 Peter S Galbraith * mh-e.el (mh-folder-refiled-face, mh-folder-cur-msg-number-face) (mh-folder-to-face, mh-folder-body-face): Define faces instead of copying them from font-lock faces. This mh-e will look the same in XEmacs as it does in Emacs. * mh-utils.el (mh-show-cc-face, mh-show-date-face) (mh-show-header-face): Ditto. 2002-10-29 Jeffrey C Honig * mh-comp.el (mh-send-letter): I meant to use mh-goto-header-field, not mh-get-header-field. The former returns nil if the header is not found and doesn't need a conditional. 2002-10-29 Peter S Galbraith * mh-comp.el (mh-forward): Bug fix. Change 'kill-line for a 'delete-region, because I don't want that text yanked with C-y. * mh-seq.el (mh-put-msg-in-seq): Add support for selected region (Closes SF feature request #630324). 2002-10-28 Satyaki Das * mh-seq.el (mh-thread-prune-subject): Make the regexp a little general so that a subject of the form "Re[218]: howdy" would be properly pruned. * mh-mime.el (mh-mime-save-part): Copy function definition of mm-save-part from cvs gnus since that function is buggy in gnus that comes with emacs21.2. 2002-10-28 Peter S Galbraith * mh-e.el (mh-scan-subject-regexp): Add an expression to match an optional bracketed number after "Re", such as in "Re[2]:" (Patch by Satyaki; I checked it and applied). (mh-folder-font-lock-subject): Adapt to new mh-scan-subject-regexp. * mh-seq.el (mh-subject-to-sequence): Ditto. * mh-e.el (mh-folder-sequence-menu): Remove "Toggle Subject Thread" from menu. mh-toggle-threads is in the Folder menu. * mh-e.el (mh-folder-sequence-menu): Minor menu text edits. * mh-utils.el (mh-show-update-sequences): Added to mh-defun-show-buffer builds; needed for menu. (mh-show-sequence-menu, mh-show-message-menu) (mh-show-folder-menu): 3 new menus in mh-show-mode-map that mirror the menus used in mh-folder-mode. (mh-show-mode): easy-menu-add the 3 menus. 2002-10-28 Satyaki Das * mh-utils.el (mh-goto-msg): Fix the regexp to search so that we go to the right message. In a threaded folder message 2 may be present after 26 and the previous regexp would go to 26 when we really wanted to go to 2! * mh-seq.el (mh-widen): Add call to mh-recenter to make it like mh-narrow-to-seq. 2002-10-28 Bill Wohler * mh-utils.el (mh-show-mime-save-parts): Deleted definition. (mh-show-mime-map, tool-bar-map): Use mh-mime-save-parts instead of mh-show-mime-save-parts. 2002-10-28 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): tool-bar-add-item key name bug fix. * mh-utils.el (mh-show-tool-bar-map): Same. * mh-e.el (mh-folder-tool-bar-map, mh-folder-seq-tool-bar-map): Same 2002-10-27 Satyaki Das * mh-seq.el (mh-toggle-threads): Add call to mh-recenter to make its behavior like that of mh-narrow-to-seq. 2002-10-27 Bill Wohler * mh-mime.el (mh-mime-save-parts): Renamed from mh-store-mime-parts for consistency with mh-mime-save-part. Fixed bug whereby mh-mime-save-parts-directory was not getting initialized properly from a string-valued mh-mime-save-parts-default-directory. (mh-mime-save-parts-default-directory): Ditto. Check your customizations! (mh-mime-save-parts-directory): Ditto. * mh-utils.el (mh-show-mime-save-parts): Renamed from mh-store-mime-parts. (mh-show-mime-map): Added keybinding "K a" for mh-show-mime-save-parts. * mh-e.el (mh-mime-save-parts) Renamed from mh-store-mime-parts. (mh-mime-map): Added keybinding "K a" for mh-mime-save-parts. (mh-help-messages): Added help for "K a". 2002-10-27 Peter S Galbraith * mh-comp.el (mh-search-addr-regexp, mh-regexp-in-field-p): Rename the first to the second (and recode a bit). (mh-insert-mail-followup-to): Use it. 2002-10-27 Bill Wohler * mh-utils.el (mh-invisible-headers): Backed out change. Removed Mail-Followup-To due to objections from Peter and Mark. 2002-10-27 Satyaki Das * mh-seq.el (mh-msg-is-in-seq): Modified to show info about whether the message being queried about has been marked to be deleted or refiled. * mh-mime.el (mh-insert-mime-security-button): Make pressed-details a local. 2002-10-27 Steve Youngs * .cvsignore: New file. 2002-10-26 Steve Youngs * mh-seq.el (mh-notate-deleted-and-refiled): Don't bind local variable 'dest', it isn't used anywhere. * mh-pick.el (mh-do-pick-search): Don't bind local variable 'finding-messages', it isn't used anywhere. * mh-utils.el: Byte-compiler warning suppression. (mh-gnus-article-highlight-citation): Rather than redefining 'gnus-cite-face-list', just re-order it. (mh-show-mode): Force turning on font-lock in XEmacs. * mh-seq.el: Byte-compiler warning suppression. * mh-index.el: Byte-compiler warning suppression. * mh-comp.el: Byte-compiler warning suppression. * mh-xemacs-compat.el: Add defaliases for 'timerp' & 'cancel-timer' to the equivalent 'itimer' functions. (rfc822): Require it for 'rfc822-goto-eoh'. Byte-compiler warning suppression. * mh-e.el (mh-folder-mode): Force turning on font-lock in XEmacs. (mh-toggle-threads): Remove duplicate autoload. Byte-compiler warning suppression. (mh-folder-unseen-seq-list): Use 'with-temp-buffer' to fix a bug in XEmacs when font-lock is on. (mh-folder-unseen-seq-name): Ditto. 2002-10-27 Mark D. Baushke * Makefile: Reorganize to allow for building also compiling for XEmacs too. Sanitize so that it will work using least-common denominator versions of 'make'. Tested using GNU make, Solaris make, and Berkely make. (all): Use recursive invokation based on the emacs or xemacs executable passed on the 'make EMACS=xemacs' command line. (XEMACS_OPTIONS): The incantation to be passed to an xemacs editor to compile things properly. (AUTO_PRELOADS): Magic XEmacs glue. (clean): Ditto. (autoloads): Ditto. (custom-loads): Ditto. 2002-10-26 Satyaki Das * mh-e.el (mh-last-msg): Add call to mh-recenter. 2002-10-26 Peter S Galbraith * mh-comp.el (mh-search-addr-regexp, mh-re-search-to-cc): Remove `mh-re-search-to-cc' in favour of more generalized new function `mh-search-addr-regexp'. (mh-insert-mail-followup-to): Use it. 2002-10-26 Satyaki Das * mh-seq.el (mh-copy-seq-to-eob): Avoid rethreading when the folder is already threaded. This is more efficient and also avoids problems when the folder is widened. (mh-thread-inc): Don't try to restore the point to original location since mh-inc-folder from where this is called changes point location after calling this function. * mh-e.el (mh-make-folder-mode-line): Fix a small bug where the test was wrong. 2002-10-26 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to): Fix for new defcustom. 2002-10-26 Satyaki Das * mh-seq.el (mh-notate-deleted-and-refiled): Remove unused binding of dest. The problem was pointed out by Steve as well. * mh-e.el (mh-toggle-threads): Remove duplicate autoload as pointed out by Steve. 2002-10-26 Bill Wohler * mh-utils.el (mh-invisible-headers): Added Mail-Followup-To. 2002-10-26 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to-list): Change defvar to defcustom. 2002-10-25 Satyaki Das * mh-e.el (mh-remove-all-notation): New function that removes all notation. * mh-seq.el (mh-narrow-to-seq): When hiding the original folder remove all notation. This avoids stale notation hanging around. Also changes in show buffer and position in folder buffer are avoided if possible. (mh-widen): When widening the scan-lines are notated based on the current state of the folder. This means any changes made when the folder was narrowed are shown consistently. (mh-notate-deleted-and-refiled): Update the documentation. (mh-thread-parse-scan-line): For some reason the ASCII value of the space character was being used here. This is fixed. (mh-thread-inc, mh-toggle-threads): Avoid change of point in folder and message being displayed in shown buffer. * mh-utils.el (mh-recenter): Rewrite mh-recenter to show fewer blank lines when point is towards the end of the folder buffer. 2002-10-25 Peter S Galbraith * mh-comp.el (mh-insert-mail-followup-to-flag): New boolean defcustom to append a Mail-Followup-To field to the header. The insertion is done if the To: or Cc: fields matches an entry in `mh-insert-mail-followup-to-list'." (mh-insert-mail-followup-to-list): New defvar. List of addresses for which a Mail-Followup-To field is inserted. (mh-re-search-to-cc): New function. Search for REGEXP in To: and Cc: fields. (mh-insert-mail-followup-to): New function. Insert Mail-Followup-To: if To or Cc match `mh-insert-mail-followup-to-list'. (mh-compose-and-send-mail): Call mh-insert-mail-followup-to if mh-insert-mail-followup-to-flag is true. 2002-10-25 Mark D. Baushke * mh-utils.el (mh-show-maximum-size): New variable to control the display of large messages. (mh-display-msg): Use it (Closes SF #488696). * mh-seq.el (mh-toggle-threads): Checkdoc fix. * mh-e.el (mh-reset-threads-and-narrowing): Checkdoc fix. * mh-comp.el (mh-insert-x-mailer-flag): Renamed from mh-insert-x-mailer-p. Update docstring. (mh-send-letter): Use it. (mh-reply-show-message-flag): Renamed from mh-reply-show-message-p. Update docstring. (mh-reply): Use it. This addresses part of SF #627015. * mh-e.el (mh-recenter-summary-flag): Renamed from mh-recenter-summary-p. Update docstring. (mh-set-scan-mode): Use it. This addresses part of SF #627015. 2002-10-25 Satyaki Das * mh-e.el (mh-reset-threads-and-narrowing): New function which resets all thread and narrowing state to completely unthreaded and widened state. As a side effect, the folder buffer is erased. (mh-rescan-folder): Reset threads and narrowing state. * mh-funcs.el (mh-pack-folder-1): Reset threads and narrowing state. * mh-seq.el (mh-copy-seq-to-eob): Change mh-view-ops after threading is over so that if user aborts threading, it doesn't leave mh-e in an inconsistent state. (mh-toggle-threads): Use mh-scan-folder to populate the folder buffer instead of mh-rescan-folder which resets threading and narrowing state. 2002-10-24 Bill Wohler * mh-e is completely checkdoc clean now. * mh-utils.el (mh-clean-message-header-flag): Renamed from mh-clean-message-header. (mh-bury-show-buffer-flag): Renamed from mh-bury-show-buffer. (mh-show-use-goto-addr-flag): Renamed from mh-show-use-goto-addr. This addresses part of SF #627015. * mh-mime.el (mh-clean-message-header-flag): Renamed from mh-clean-message-header. Checkdoc fixes. This addresses part of SF #627015. * mh-index.el (mh-clean-message-header-flag): Renamed from mh-clean-message-header. This addresses part of SF #627015. * mh-funcs.el (mh-do-not-confirm-flag): Renamed from mh-do-not-confirm. This addresses part of SF #627015. * mh-e.el (mh-do-not-confirm-flag): Renamed from mh-do-not-confirm. (mh-clean-message-header-flag): Renamed from mh-clean-message-header. This addresses part of SF #627015. * mh-comp.el: checkdoc fixes. 2002-10-24 Satyaki Das * mh-seq.el (mh-copy-seq-to-eob): Rewritten to scan the headers fresh instead of yanking from buffer. This is needed to get correct threading in copied sequence. (mh-thread-inc, mh-thread-update-scan-line-map) (mh-thread-parse-scan-line): Eliminate the use, and hence the definition of, the kludgy mh-thread-update-scan-line-map. Instead the functions mh-notate-deleted-and-refiled and mh-notate-user-sequences are used to get the message marks right. (mh-thread-generate-scan-lines): Updated to allow the thread tree to be used in a narrowed folder buffer. (mh-thread-folder, mh-toggle-threads): Remove mh-folder-threaded-view-flag. (mh-thread-old-scan-line-map): New buffer-local variable that remembers the original scan-line map so that the sequence thread, narrow, widen will work. (mh-narrow-to-seq, mh-widen): Remember the scan-line map when narrowing and restore it when widening. * mh-e.el (mh-folder-threaded-view-flag, mh-folder-folder-menu) (mh-regenerate-headers, mh-get-new-mail) (mh-make-folder-mode-line, mh-process-commands) (mh-delete-scan-msgs): Remove mh-folder-threaded-view-flag. Instead (memq 'unthread mh-view-ops) is used to test if the folder is threaded. * mh-mime.el (mh-display-emphasis): Shadow article-goto-body here since we want to do emphasis on the whole of the region and not just after the first blank line. (mh-mm-display-part): When displaying a text part show smilies and emphasis. * mh-index.el (mh-index-insert-scan): Attempt to keep number of args to scan small if there are lots of adjacent matches. (mh-index-quit): Bury index-buffer on quit instead of killing it. This behavior is more like that of mh-quit. * mh-seq.el (mh-widen): If folder was threaded after narrowing then make mh-widen undo the threading instead of erroring out. 2002-10-24 Peter S Galbraith * mh-seq.el (mh-toggle-threads): Add a cond (as suggested by Satyaki) to properly unthread a narrowed-to-sequence. * mh-seq.el (mh-thread-generate-scan-lines): Fix threading breakage from partial switch to mh-container-real-child-flag and to dupl-flag. * mh-comp.el (mh-yank-cur-msg): Bug fix: specify (eq t mh-yank-from-start-of-msg) when that's what we want. 2002-10-24 Mark D. Baushke * mh-seq.el (mh-thread-prune-subject): Renamed subject-pruned-p as subject-pruned-flag. (mh-thread-inc): Renamed old-buffer-modified-p as old-buffer-modified-flag. (mh-thread-generate-scan-lines): Renamed dupl-p as dupl-flag. This addresses part of SF #627015. * mh-index.el (mh-index-advance): Renamed backward-p local variable as backward-flag. (mh-index-next-button): Renamed backward-p argument as backward-flag. (mh-index-show): Renamed display-headers-p argument as display-headers-flag. This addresses part of SF #627015. * mh-e.el (mh-scan-format, mh-version): Use mh-nmh-flag. (mh-folder-mime-action): Renamed include-security-p argument as include-security-flag. (mh-goto-next-button, mh-next-button): Renamed backward-p argument as backward-flag. (mh-get-new-mail): Renamed new-mail-p local variable as new-mail-flag. (mh-goto-cur-msg): Renamed minimal-changes-p argument as minimal-changes-flag. (redraw-needed-flag): Renamed redraw-needed-p local variable as redraw-needed-flag. (mh-seq-containing-msg): Renamed include-internal-p argument as include-internal-flag. (mh-page-msg): Use mh-page-to-next-msg-flag. This addresses part of SF #627015. * mh-mime.el (mh-mhn-compose-insert-flag): Renamed from mh-mhn-compose-insert-p. Make it buffer-local. (mh-mhn-compose-type, mh-mhn-compose-external-type, mh-mhn-compose-forw, mh-edit-mhn): Use mh-mhn-compose-insert-flag. (mh-mml-to-mime, mh-mml-secure-message-encrypt-pgpmime, mh-mime-display-part, mh-mime-display-single): Use mh-gnus-pgp-support-flag renamed from mh-gnus-pgp-support-p. (mh-mime-display-single): Renamed small-image-p local variable as small-image-flag. (mh-mime-inline-part): Renamed local variable inserted-p as inserted-flag. (mh-mime-inline-part): Renamed local variable displayed-p as displayed-flag. This addresses part of SF #627015. * mh-comp.el (mh-letter-menu, mh-letter-mode, mh-send-letter): mh-mhn-compose-insert-flag. (mh-repl-group-formfile, mh-forward): Use mh-nmh-flag renamed from mh-nmh-p. (mh-reply, mh-insert-x-mailer, mh-send-letter): Use mh-nmh-flag. (mh-letter-mode-map): Use mh-gnus-pgp-support-flag renamed from mh-gnus-pgp-support-p. (mh-mml-secure-message-sign-pgpmime): Use mh-gnus-pgp-support-flag. This addresses part of SF #627015. * mh-utils.el (mh-page-to-next-msg-flag): Renamed from mh-page-to-next-msg-p. (mh-show-msg): Use mh-page-to-next-msg-flag. (mh-gnus-pgp-support-flag): Renamed from mh-gnus-pgp-support-p. (mh-show-font-lock-fontify-region): Fix docstring per checkdoc. (with-mh-folder-updating): Renamed argument save-modification-flag-p as mh-save-modification-flag. (mh-prompt-for-folder): Renamed new-file-p local variable as new-file-flag. This addresses part of SF #627015. 2002-10-24 Mark D Baushke * mh-comp.el (mh-forward): Fix mh-mml-compose-insert-p reference in last commit to be mh-mml-compose-insert-flag. (mh-mml-compose-insert-flag): Move defvar to fix compiler warning. 2002-10-24 Jeffrey C Honig * mh-comp.el (mh-forward): Add support for transient-mark mode. When using nmh, always specify -mime so as to preserve the original message(s). If mh-compose-insertion is 'gnus, convert the mhbuild format forwarding directives into MML. 2002-10-24 Eric Ding * mh-comp.el (mh-send-letter): Fix for earlier change that added "-mime" for bcc'ed MIME mail; still doesn't work with nmh 1.0, but at least no longer triggered for every outgoing message! 2002-10-24 Peter S Galbraith * mh-comp.el (mh-yank-cur-msg): Fix selected regions for supercite (see text below). * mh-comp.el (mh-yank-cur-msg): Fix for supercite. Someone played with the point and mark setting prior to the call to 'mh-insert-prefix-string and that broke supercite. I put comments to make it obvious to future coders why those settings exists. Note that supercite is still broken when a region is selected in the show buffer. Presumably it's been like that for a long time. We need to insert the header as well as the selected region oin that case. I'll submit an SF bug. 2002-10-24 Jeffrey C Honig * mh-comp.el (mh-yank-from-start-of-msg, mh-reply): Use -noformat flag to reply when 'autosupercite or 'autoattrib are specified to prevent duplicate cites of the body of a message. 2002-10-23 Satyaki Das * mh-utils.el (font-lock-default-fontify-region): Add autoload to avoid compiler warning. 2002-10-23 Peter S Galbraith * mh-comp.el (mh-letter-mode): set fill-paragraph-function to our own 'mh-fill-paragraph-function instead of simply 'mail-mode-fill-paragraph (because it doesn't handle a non-nil fill-prefix correctly). (mh-fill-paragraph-function): New function for mh-letter-mode fill-paragraph-function in order to handle non-nil fill-prefix. Call sendmail's mail-mode-fill-paragraph if in the mail header, else call default fill-paragraph with fill-prefix set to nil. (Closes SF #489927) * mh-comp.el (mh-letter-mode): Let's use font-lock even if gnus is used in show-mode. The reason is that gnus uses static text properties which are not appropriate for a buffer that will be edited. So the choice here is either fontify the citations and header or the header only. * mh-utils.el (mh-show-font-lock-fontify-region): Limit font-lock in mh-show-mode to the header. Used when mh-highlight-citation-p is set to gnus, leaving the body to be dealt with by gnus highlighting. This fixes gnus text emphasis in mh-show-mode. (mh-show-mode): In font-lock-defaults, set font-lock-fontify-region-function to mh-show-font-lock-fontify-region. 2002-10-23 Bill Wohler * mh-mime.el (mh-mml-attach-file): Prompt for disposition should be Disposition, not Content-Type. The Content-Type has been determined automatically. 2002-10-23 Mark D. Baushke * MH-E-NEWS: s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ s/mh-show-use-xface/mh-show-use-xface-flag/ s/mh-tool-bar-reply-3-buttons/mh-tool-bar-reply-3-buttons-flag/ This addresses part of SF #627015. * mh-comp.el: s/mh-mml-compose-insert-p/mh-mml-compose-insert-flag/ s/mh-xemacs-p/mh-xemacs-flag/ (mh-letter-menu): Use mh-mml-compose-insert-flag. (mh-insert-x-mailer): Use mh-xemacs-flag. (mh-mml-compose-insert-flag): Renamed from mh-mml-compose-insert-p. (mh-send-letter): Use mh-mml-compose-insert-flag. This addresses part of SF #627015. * mh-e.el: s/mh-folder-threaded-view-p/mh-folder-threaded-view-flag/ s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ s/mh-xemacs-p/mh-xemacs-flag/ (mh-folder-threaded-view-flag): Renamed from mh-folder-threaded-view-p. Make it buffer local. (mh-folder-tool-bar-map): Use mh-tool-bar-reply-3-buttons-flag. (mh-remove-xemacs-horizontal-scrollbar): Use mh-xemacs-flag. (mh-make-folder, mh-regenerate-headers, mh-get-new-mail): Use mh-adaptive-cmd-note-flag. (mh-folder-folder-menu, mh-regenerate-headers, mh-get-new-mail, mh-make-folder-mode-line, mh-process-commands, mh-delete-scan-msgs): Use mh-folder-threaded-view-flag. This addresses part of SF #627015. * mh-index.el: s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ (mh-index-search): Use mh-adaptive-cmd-note-flag. This addresses part of SF #627015. * mh-mime.el: s/mh-mml-compose-insert-p/mh-mml-compose-insert-flag/ s/mh-xemacs-p/mh-xemacs-flag/ (mh-mml-compose-insert-flag): Renamed from mh-mml-compose-insert-p. Make it buffer local. (mh-mml-attach-file, mh-mml-secure-message-sign-pgpmime, mh-mml-secure-message-encrypt-pgpmime): Use it. (gnus-local-map-property): Use mh-xemacs-flag. This addresses part of SF #627015. * mh-seq.el: s/mh-folder-threaded-view-p/mh-folder-threaded-view-flag/ (mh-thread-generate, mh-thread-folder, mh-toggle-threads): Use mh-folder-threaded-view-flag. This addresses part of SF #627015. * mh-speed.el: s/mh-speed-run-flists-p/mh-speed-run-flists-flag/ s/mh-speed-refresh-p/mh-speed-refresh-flag/ (mh-speed-run-flists-flag): Renamed from mh-speed-run-flists-p. (mh-folder-speedbar-buttons): Use it. (mh-speed-refresh-flag): Renamed from mh-speed-refresh-p. (mh-speed-update-current-folder, mh-speed-invalidate-map, mh-speed-add-folder): Use it. This addresses part of SF #627015. * mh-utils.el: s/mh-xemacs-p/mh-xemacs-flag/ s/mh-tool-bar-reply-3-buttons/mh-tool-bar-reply-3-buttons-flag/ s/mh-show-use-xface/mh-show-use-xface-flag/ (mh-xemacs-flag): Renamed from mh-xemacs-p. (mh-show-xface-function): Use it. (mh-tool-bar-reply-3-buttons-flag): Renamed from mh-tool-bar-reply-3-buttons. (mh-show-tool-bar-map): Use it. (mh-adaptive-cmd-note-flag): Renamed from mh-adaptive-cmd-note. (mh-cmd-note): Use it in description. (mh-show-use-xface-flag): Renamed from mh-show-use-xface. Use mh-xemacs-flag. (mh-show-xface): Use mh-show-use-xface-flag. This addresses part of SF #627015. 2002-10-23 Bill Wohler * Makefile (all): Rather than have to run "make clean all" all the time, make the default target do a clean so all you have to say is "make". * mh-e.el (mh-folder-map): Moved "t (mh-toggle-threads)" to T prefix. 2002-10-22 Satyaki Das * mh-index.el (mh-indexer-choices, mh-swish-binary): The executable swish-e can be used to search (just like swish-search). However the Makefile in swish-e-2.2.2 doesn't install swish-search. So it is preferable to use swish-e. 2002-10-22 Bill Wohler * mh-comp.el (mh-letter-mode-map): Added aliases for keybindings. For example, you now have "C-c C-m C-i" in addition to "C-c C-m i". 2002-10-22 Mark D. Baushke * mh-mime.el (mh-graphical-smileys-flag): Renamed from mh-graphical-smileys-p. (mh-display-smileys): Use it. (mh-graphical-emphasis-flag): Renamed from mh-graphical-emphasis-p. (mh-display-emphasis): Use it. This addresses part of SF #627015. 2002-10-22 Satyaki Das * mh-mime.el (mh-insert-mime-security-button): A message is produced if PGP decryption/verification fails. This addresses SF# 627025. 2002-10-21 Bill Wohler * mh-seq.el (mh-widen): Checkdoc removed the period in the error. The info node (elisp) Coding Conventions says: "An error message should start with a capital letter but should not end with a period." * mh-e.el, mh-utils.el (mh-tool-bar-reply-3-buttons): Moved defcustom to mh-utils because I got an error about a nil value for mh-tool-bar-reply-3-buttons when I fired up mh-rmail. * mh-comp.el, mh-funcs.el, mh-mime.el, mh-pick.el: Moved (provide) to the end of the file to be consistent with most other files (see additional rationale in mh-e.el description below). * mh-e.el: Had to remove eval-when-compile from the (require 'cl) here too (because the remove-if generated a warning in CVS Emacs). Moved (provide) to the end of the file to be consistent with most other files. My guess is that this is good to keep a feature from being "provided" if the file craps out while being loaded. 2002-10-21 Satyaki Das * mh-utils.el (mh-reply, Info-goto-node): Add autoloads to avoid compiler warnings. (mh-tool-bar-reply-3-buttons): Add defvar to avoid compiler warning. * mh-seq.el (mh-narrow-to-seq): Remember that a narrowing has occurred. (mh-valid-view-change-operation-p): New function that checks if the widening or unthreading that we are about to perform is allowed. (mh-widen): Check if widening is applicable. (mh-thread-inc, mh-thread-folder): Use delete-region instead of erase-buffer. This means if the buffer is narrowed then the hidden parts aren't removed. This allows widening of the folder later on. (mh-toggle-threads): Maintain mh-view-ops. * mh-e.el (mh-view-ops, mh-folder-mode): New buffer-local variable that keeps track of the sequence in which threading and narrowing of the folder buffer has been carried out. This is needed so that narrowing followed by threading (or vice versa) behaves in a reasonable manner. (mh-regenerate-headers): Use delete-region instead of erase-buffer. (mh-make-folder-mode-line): Change mh-first-msg-num and mh-last-msg-num conservatively. This might show a larger range in the mode-line but allows the unthreading to not miss messages present initially. 2002-10-21 Bill Wohler * mh-mime.el (mh-graphical-emphasis-p): Added _underline_ to the docstring, as well as the source of the strings, gnus-emphasis-alist. (mh-graphical-emphasis-p, mh-graphical-smileys-p): Set the default to t. 2002-10-21 Peter S Galbraith * mh-utils.el (mh-show-mode): Invoke new toolbar. (mh-show-tool-bar-map): New tool-bar for mh-show-mode, similar to mh-letter-mode. 2002-10-21 Satyaki Das * mh-utils.el (mh-display-msg): Call the smiley display function after the call to mh-show-mode. This is needed since mh-show-mode kills all buffer-local variables and resets the variable that controls display of graphical smileys. 2002-10-21 Bill Wohler * mh-e.el (mh-folder-mime-action): Change mime to MIME in message. * mh-comp.el (mh-mml-to-mime autoload): Ditto. 2002-10-21 Mark D Baushke * mh-mime.el (smiley-region): Use load for a non-fatal dependency on the smiley library. 2002-10-21 Jeffrey C Honig * mh-comp.el (mh-forward): Search for a blank line as well as mail-header-separator. (mh-letter-mode): Search for a blank line as well as mail-header-separator. (mh-send-letter): The default BCC encapsulation will make a MIME message unreadable. If we are running nmh and the letter contains a Bcc: and a Content-Type: field, add the -mime switch to to the arguments to send. 2002-10-21 Peter S Galbraith * mh-utils.el: Add a mh-defun-show-buffer call to define mh-show-pack-folder. 2002-10-21 Peter S Galbraith * mh-mime.el (mh-store-mime-parts): Simplify code a bit. * mh-e.el (mh-help-messages): Update help message for changed keybindings. 2002-10-21 Satyaki Das * mh-speed.el (mh-speed-invalidate-map): Invalidate mh-speed-folders-cache before it is used by mh-speed-folders. Also fix indentation of if statement. (mh-speed-folder-size): The folder name should be extracted from the speedbar buffer and not from the temp buffer has was happening before. (mh-speed-folder-size): Harden the function some more. It shouldn't produce errors any more unless flist really didn't work. 2002-10-21 Bill Wohler * mh-seq.el (mh-put-msg-in-seq): Formatting only. The reason I was in there is because I was trying to use mh-put-msg-in-seq and mh-msg-is-in-seq non-interactively and found that although the docstring says it uses the current message by default, I got errors if I passed in nil for the message. Is this expected, or is this a bug? I suppose the fix would be to make the arguments optional, right? This would cause the arguments in mh-put-msg-in-seq to be reversed, however. Might be a backwards compatibility problem. * mh-speed.el (mh-speed-view): Convert default size to string before passing it to read-string. This was done because XEmacs can't handle a numeric value for the default. 2002-10-20 Satyaki Das * mh-utils.el (mh-show-mode-map, mh-show-folder-map) (mh-show-sequence-map, mh-show-thread-map, mh-show-extract-map) (mh-show-digest-map, mh-show-mime-map): Interactive functions callable in show buffer are now prefixed with mh-show. * mh-seq.el (mh-notate-deleted-and-refiled): Take into account the changes to mh-refile-list and the removal of the 'deleted sequence. (mh-toggle-threads): Changing from threaded to normal view doesn't try to push out message refiles and deletions to MH. * mh-e.el (mh-rescan-folder, mh-scan-folder): Add a new optional argument to both functions that prevents them from carrying out pending refiles and deletes. (mh-undo): Remove dead code. (mh-delete-a-msg, mh-undo-msg): Get rid of the 'deleted sequence. The same information is present in mh-delete-list any way. (mh-refile-a-msg, mh-undo-msg, mh-process-commands): Change the semantics of mh-refile-list to make it self-contained. This variable now contains a list of lists. The first element of each sublist is the destination folder name. The remaining elements are the messages that are to be refiled to the destination folder. (mh-toggle-threads, mh-folder-folder-menu): Use mh-toggle-threads instead of mh-thread-folder. 2002-10-20 Peter S Galbraith * mh-mime.el (mh-store-mime-parts): Bug fix? Make this command work when in the show buffer, and not just in the folder buffer pointing to a message. 2002-10-20 Peter S Galbraith * mh-seq.el (mh-narrow-to-subject-sequence): Renamed from mh-narrow-to-subject-thread. (mh-subject-to-sequence): Renamed from mh-subject-thread-to-sequence. (mh-delete-subject-sequence): Renamed from mh-delete-subject-thread. (mh-next-unseen-subject-sequence): Renamed from mh-next-unseen-subject-thread. (mh-toggle-subject-thread): Removed. :-( * mh-e.el: s/subject-thread/subject-sequence/ (mh-thread-map): Bind mh-widen to "w". * mh-utils.el: s/subject-thread/subject-sequence/ (mh-show-thread-map): Bind mh-widen to "w". 2002-10-20 Satyaki Das * mh-seq.el (mh-thread-folder): This function is no longer interactive. The mh-toggle-threads is the interactive function that gets called by the user. Also the already computed values in mh-first-msg-num and mh-last-msg-num are used instead of recomputing the first and last message indices in the current folder. (mh-toggle-threads): New interactive function that toggles threaded view of the folder. * mh-utils.el (mh-letter-toggle-threads): New interactive function which toggles thread view from show buffer. This function replaces mh-letter-thread-folder. (mh-show-folder-map): Use mh-letter-toggle-threads instead of mh-letter-thread-folder. * mh-e.el (mh-folder-map): Use mh-toggle-threads instead of mh-thread-folder. 2002-10-20 Bill Wohler * mh-e.el (mh-scan-folder): Formatting only. (mh-goto-cur-msg): Removed call to mh-last-msg in those cases where there isn't a current message. Since I've started using the speedbar to read my mh-e mail, I've had to use M-< every time to go to the beginning of the new messages. Very annoying! Thus, if there isn't a current message, the cursor is left alone, which sounds like the right thing to do anyway. 2002-10-19 Peter S Galbraith * mh-seq.el (mh-subject-thread-to-sequence): Bug fix. After making the 'subject sequence real, I now have to delete it globally. * mh-seq.el (mh-toggle-subject-thread): Make toggle back to full scan exactly mh-widen (removed moving to current message). * mh-seq.el (mh-subject-thread-to-sequence): Make 'subject sequence a real one, exported to MH. This means you can, for example, mh-forward it. But it also shows up with a mark in the scan output. (Closes SF #489445). 2002-10-19 Bill Wohler * mh-speed.el (mh-speed-view): If there weren't any unseen messages, and you specified a string (a sequence like "last") when prompted for the number of messages to display, you got an error. This has been fixed. 2002-10-19 Mark D Baushke * mh-e.el (mh-last-destination-folder): Destination of last refile command. (mh-last-destination-write): Destination of last write command. (mh-refile-msg): Use 'mh-last-destination-folder and update both it and 'mh-last-destination. (mh-write-msg-to-file): Use 'mh-last-destination-write and update both it and 'mh-last-destination (Closes SF #580772). 2002-10-19 Bill Wohler * mh-comp.el (mh-yank-from-start-of-msg): Changed default to 'attribution. (mh-letter-mode-map): Removed commented-out keybindings as well as alias "C-c C-m a (mh-compose-insertion)." Prefer "C-c C-m i." * mh-utils.el: Removed autoload of help. It no longer appears to be necessary in cvs Emacs (21.4). 2002-10-18 Bill Wohler * mh-e.el (mh-execute-commands): Doc fix. (mh-compat-write-file-hook): Renamed to mh-write-file-functions-compat. (mh-folder-mode): Add mh-write-file-functions-compat instead of mh-compat-write-file-hook 2002-10-18 Peter S Galbraith * mh-utils.el (mh-invisible-headers-show-xface): Killed this variable. (mh-invisible-headers): Use 'mh-show-use-xface instead of 'mh-invisible-headers-show-xface to determine whether to render the X-Face header line visible or not. 2002-10-18 Satyaki Das * mh-e.el (mh-compat-write-file-hook, mh-folder-mode): Use the new macro mh-compat-write-file-hook to use write-file-functions for Emacs 21.4 and local-write-file-hooks for older versions. 2002-10-18 Mark D Baushke * mh-utils.el (mh-invisible-headers): Add more anti-spam headers. 2002-10-18 Peter S Galbraith * mh-mime.el (mh-mml-forward-message): mml-attach-file constructs a malformed composition if the description string is empty, so test for that and call mml-attach-file without that argument if it's an empty string (closes SF #625168). 2002-10-17 Satyaki Das * mh-index.el (mh-index-keymap): Removed extra binding of " ". (mh-index-folder-mode-help-messages): Made the cheat sheet entry of quit like the others. (mh-index-search): If space was pressed in the index buffer before a search result has been shown with ".", the old show buffer would be scrolled. This is confusing since the index and show buffer contents are contradictory. Killing the show buffer here avoids this problem. (mh-index-configure-windows): Refine the window configuration logic. Avoid the two window view unless there is a message being displayed in the show buffer. (mh-index-scroll-up): Rewrite this function. The old version had a bizarre problem where the show buffer wouldn't be scrolled if the speedbar was present. (mh-index-scroll-down): Rewritten because of similar reason as above. 2002-10-17 Peter S Galbraith * mh-comp.el (mh-reply): Add an undo boundary in the undo list before calling 'mh-yank-cur-msg (closes SF #623693). 2002-10-17 Satyaki Das * mh-e.el (mh-folder-mode): Use local-write-file-hooks instead of write-file-hooks. This is required for XEmacs and also the right thing according to GNU Emacs21 documentation. 2002-10-16 Satyaki Das * mh-seq.el (mh-thread-generate): Get threading to work correctly on partial folders. The fix here disregards messages that aren't already present in the buffer. (mh-thread-folder): When querying scan about thread info try to avoid asking about messages that aren't present in the folder buffer. A more efficient fix would be to ask scan about just the messages that are present instead of a range of messages. However that runs the risk of sending long command lines to scan. Another change was to populate the mh-scan-line-map early so that the change in mh-thread-generate would work. (mh-thread-generate-scan-lines): In case duplicates are present make one of them the pseudo parent of the rest. This makes it look prettier if there are multiple duplicates at top level. * mh-comp.el (mh-edit-again): If a buffer in show-mode is being reused then reinsert message file. This should fix SF #624283. * mh-mime.el (mh-mm-display-part): Make sure mh-display-part is always called when we want to remove the displayed MIME part. 2002-10-16 Bill Wohler * mh-speed.el (mh-speed-folder-size): checkdoc fix. (mh-speed-view): Tweaked output to mirror gnus verbiage. Offer to view number of messages in folder rather than mh-large-folder. Replaced (intern mh-unseen-seq) with mh-unseen-seq since the former was generating errors. 2002-10-15 Satyaki Das * mh-speed.el (mh-large-folder): New customizable variable to control mh-e's perception of large folders. (mh-speed-folder-size): New function which computes the size of folder on current line. (mh-speed-view): Modified to handle large folders. If the folder being clicked has unseen messages then only those messages are shown. Otherwise if number of messages in folder is larger than mh-large-folders then the user is asked for the number of messages to be shown. If the folder satisfies neither of the above cases then it is displayed in its entirety 2002-10-15 Bill Wohler * mh-index.el (mh-index-keymap): Use gnus-define-keys. Sorted. Noticed that there were two key bindings for SPACE... * mh-speed.el (mh-folder-speedbar-key-map): Ditto (except for the dup SPACE binding). Completed help in other modes: * mh-utils.el (mh-xemacs-p): Fixed doc. (mh-show-mode-map, mh-show-folder-map, mh-show-sequence-map) (mh-show-thread-map, mh-show-extract-map): Added binding for mh-help. * mh-pick.el (mh-search-folder): Added startup help message. (mh-pick-mode-help-messages): New variable that contains help messages for pick buffer. (mh-pick-mode): Set local buffer variable mh-help-messages to mh-pick-mode-help-messages. * mh-index.el (mh-index-keymap): Added binding for mh-help (mh-index-folder-mode-help-messages): New variable that contains help messages for MH Index buffer. (mh-index-folder-mode): Set local buffer variable mh-help-messages to mh-index-mode-help-messages. * mh-funcs.el (mh-help, mh-prefix-help): Call substitute-command-keys on the help messages. * mh-e.el (mh-help-messages): Added ,. Ran C-M-q. (mh-help): This autoload doc is now used for more than just the MH-Folder, so drop that specific text. * mh-comp.el (mh-edit-again, mh-extract-rejected-mail) (mh-forward, mh-reply, mh-send-sub): Call mh-letter-mode-message to display a help message at startup. (mh-letter-mode): Set local buffer variable mh-help-messages to mh-letter-mode-help-messages. (mh-letter-mode-help-messages): New variable with help messages for the MH-Letter buffer. (mh-letter-mode-message): New function that displays a startup help message. (mh-letter-mode-map): Added binding for mh-help. Sorted. 2002-10-15 Satyaki Das * mh-speed.el (mh-speedbar-selected-folder-with-unseen-messages-face) (mh-speedbar-folder-face, mh-speedbar-selected-folder-face) (mh-speedbar-folder-with-unseen-messages-face): New faces for mh-e speedbar. (mh-folder-speedbar-buttons, mh-speed-update-current-folder) (mh-speed-add-buttons): Use the new faces. (mh-speed-normal-face, mh-speed-bold-face): Functions to convert to bold face and back to normal face. (mh-speed-set-face): Removed. (mh-speed-highlight): Modified to allow it to be used instead of mh-speed-set-face. Also changes were made to fontify folders with unread messages. (mh-speed-parse-flists-output, mh-speed-parse-flists-output) (mh-speed-invalidate-map): Use mh-speed-highlight instead of mh-speed-set-face. 2002-10-15 Bill Wohler * mh-mime.el, mh-seq.el, mh-speed.el, mh-utils.el: It appears that the cl package has been restructured in 21.4 in such a way that the use of eval-when-compile no longer suppresses warnings when compiling so that (require 'cl) must be called directly (maybe this is a bug in 21.4 ;-). Thus the autoloads of cl are no longer needed. Now compiles clean under 21.4. * mh-e.el (mh-folder-mode): The use of local-write-file-hooks is deprecated in Emacs 21.4, so use add-hook write-file-functions (or write-file-hook for older versions) with the LOCAL argument instead. Now compiles clean under 21.4. * mh-comp.el (mh-yank-cur-msg): Push a mark at the opposite end of the included text to make it easy to jump or delete to the other end of the included text. 2002-10-15 Satyaki Das * mh-comp.el (mh-insert-prefix-string): Remove the erroneous use of set-mark and other related functions. 2002-10-14 Bill Wohler * mh-comp.el (mh-yank-from-start-of-msg): Fixed documentation. It isn't ignored if there is a region. It is still used for the attribution. (mh-yank-cur-msg): Removed unnecessary push-mark when snarfing the entire message. Move the cursor to the end of the snarfed message if there is a region. In this case, push a mark so user can pop to the beginning of the snarfed fragment. (mh-insert-prefix-string): This calls set-mark which I find suspect since I found that my last user mark was deleted after yanking a message. Added a comment to this effect. Will probably add a bug report... * README (Installed, Supported versions): To appear in GNU Emacs 21.3; supported on Emacs 21, 20.7 and XEmacs 21. * mh-funcs.el (mh-concat-list): Deleted. Use mapconcat instead. (mh-help, mh-prefix-help): Use mapconcat instead of mh-concat-list. (mh-ephem-message): Use "%s" in message. * mh-funcs.el (mh-concat-list): New function to concatenate a list of strings into a single string. I would have thought elisp already contained a function like this, but I couldn't find it. (mh-ephem-message): New function to display a message in the minibuffer ephemerally. minibuffer-message seemed like the right function, but it writes to the current buffer oddly enough. (mh-help, mh-prefix-help): New functions to display command cheat sheets in the minibuffer (closes SF #493740). It would be nice to refactor these two into a single function if possible. * mh-e.el (mh-folder-mode-map, mh-folder-map, mh-sequence-map) (mh-thread-map, mh-extract-map): Added ? keybinding for `mh-help' and `mh-prefix-help' (closes SF #493740). (mh-help-messages): New variable to hold various help messages. (mh-help, mh-prefix-help): Autoload from mh-funcs.el. 2002-10-13 Bill Wohler * mh-index.el (mh-glimpse-directory, mh-swish-directory, mh-namazu-directory): New variables that hold the name of the configuration and indexing directory. All are now hidden `.' directories. * mh-e.el, mh-funcs.el, mh-index.el, mh-mime.el, mh-pick.el, mh-seq.el, mh-xemacs-compat.el (Docstrings): Converted comments to docstrings, reworded some docstrings to conform to Emacs documentation conventions, and eliminated all checkdoc warnings (except for -flag, which we'll fix after 6.2 is released). 2002-10-13 Satyaki Das * mh-index.el (mh-swish-next-result): Fix a bug in a corner case where the lack of a trailing "/" caused the function to wrongly filter out correct hits. This should fix SF #622679. 2002-10-12 Steve Youngs * mh-utils.el (mh-xemacs-p): Simplify it, don't test for 'defvaralias' and don't use 'running-xemacs'. 2002-10-11 Bill Wohler * mh-comp.el: (Docstrings): Eliminated all checkdoc warnings by converting comments to docstrings and rewording some docstrings to conform to Emacs documentation conventions. 2002-10-11 Steve Youngs * mh-utils.el (mh-xemacs-p): New. (mh-show-use-xface): Use it. (mh-show-xface-function): Ditto. * mh-e.el (toplevel): Ditto. (mh-remove-xemacs-horizontal-scrollbar): Ditto. (mh-folder-mode-map): Ditto. * mh-comp.el (mh-insert-x-mailer): Ditto. * mh-mime.el (gnus-local-map-property): Ditto. (mh-mml-to-mime): Move (require 'mh-utils) to toplevel. (mh-prompt-for-folder): Autoloading this not needed because mh-utils is now required at toplevel. (mh-show-xface): Ditto. (mh-show-addr): Ditto. 2002-10-11 Bill Wohler * Makefile (EMACS_HOME): Set default to $(TOP)/../emacs so it would be useful. * mh-utils.el (mh-invisible-headers): Added various spam header fields. (mh-path-search): Removed argument `func-p' and related code. It was not documented and no one used it. (Docstrings): Converted comments to docstrings, reworded some docstrings to conform to Emacs documentation conventions, and basically eliminated all checkdoc warnings (except for -flag warnings). 2002-10-11 Satyaki Das * mh-seq.el (mh-thread-generate): Kill dead code. 2002-10-10 Satyaki Das * mh-seq.el (mh-region-to-sequence): Don't include point-max in region (closes SF #621632). * mh-utils.el (mh-defun-show-buffer): Fix call of frame-first-window to work with XEmacs. Also avoid warning about cur-buffe-name in XEmacs. (mh-modify, mh-goto-msg): Remove dead code. * mh-speed.el (mh-speed-toggle, mh-speed-add-buttons): Remove dead code. * mh-seq.el (mh-subject-thread-to-sequence, mh-thread-get-message, mh-thread-generate, mh-thread-folder): Remove dead code. * mh-mime.el (mh-mm-inline-message): Remove dead code. * mh-index.el (mh-index-search): Remove dead code. * mh-comp.el (mh-open-line): Remove dead code. * mh-e.el (mh-folder-mode): Use the macro mh-remove-xemacs-horizontal-scrollbar to avoid compiler-warning in Emacs. (mh-remove-xemacs-horizontal-scrollbar): New macro to avoid compiler-warnings. 2002-10-10 Mark D Baushke * Makefile (EMACS_OPTIONS): New macro for command-line compile options. (EMACS): Allow the user to specify which emacs command to use for the compile. (COMPILE_COMMAND): Combine the compile command with its options. (.el.elc): Use the new $(COMPILE_COMMAND). 2002-10-10 Mark D Baushke * mh-speed.el (mh-speed-select-attached-frame): Define a new compatibility macro for getting to the attached-frame. (mh-speed-update-current-folder): Use it. 2002-10-10 Mark D Baushke * mh-speed.el (mh-speed-update-current-folder): Use 'dframe-select-attached-frame if we are in a newer speedbar version that no longer supports the 'speedbar-attached-frame variable. 2002-10-10 Steve Youngs * mh-speed.el (mh-speed-update-current-folder): Use 'dframe-select-attached-frame' if we're in XEmacs. * mh-e.el (mh-folder-mode): Remove the horizontal scrollbar from the MH-Folder buffer if we're in XEmacs. 2002-10-09 Satyaki Das * mh-utils.el (mh-show-xface-function): New global that stores what function needs to be called to display X-Face. (mh-show-xface): Rewritten to avoid compiler warning. 2002-10-09 Peter S Galbraith * mh-utils.el (mh-exchange-point-and-mark-preserving-active-mark): Simplify code for all emacsen to avoid byte-compilation warnings. 2002-10-09 Satyaki Das * mh-mime.el (mh-mm-display-part): If a sub-part of the current part is an inline image then clicking the button keeps the image around. The change fixes this bug. 2002-10-09 Peter S Galbraith * mh-utils.el (mh-exec-cmd-output): Use new function 'mh-exchange-point-and-mark-preserving-active-mark instead of 'exchange-point-and-mark. Fixes a bug in emacs20 and XEmacs21. (mh-exchange-point-and-mark-preserving-active-mark): New function. Does like 'exchange-point-and-mark but doesn't activate the mark. * mh-comp.el (mh-letter-menu): Allow access to "Pull in All Compositions" menu entries when edits have really occurred. Works with "forw: -mime" mh_profile entry, so this fixes a bug. * mh-mime.el (mh-mime-inline-part, mh-mm-display-part): Use line-beginning-position and line-end-position instead of point-at-bol and point-at-eol XEmacs functions. * mh-xemacs-compat.el: Added line-end-position and line-beginning-position compatibility aliases. 2002-10-08 Mark D. Baushke * mh-utils.el (mh-scan-msg-format-regexp): The regexp to find %number(msg). (mh-scan-msg-format-string): Format to be used with the current maximum width of message number for the folder in the `mh-upate-scan-format' function. (mh-update-scan-format): Use `mh-scan-msg-format-regexp' for greater flexibility. The message number is no longer anchored to the beginning of the `mh-scan-format-nmh' or `mh-scan-format-mh' format strings. The `mh-update-scan-format' allows for using zero-filled message numbers. 2002-10-08 Peter S Galbraith * mh-e.el (mh-folder-folder-menu): Add entry for "Thread Folder". 2002-10-07 Satyaki Das * mh-seq.el (mh-thread-generate): Use mh-progs to get path to mh executables. * mh-speed.el (mh-speed-flists): Use mh-progs to get path to mh executables right. (mh-speed-folders-actual): Same as above. 2002-10-05 Steve Youngs * mh-comp.el (mh-yank-from-start-of-msg): Make default setting 't' a const. * mh-xemacs-compat.el (match-string-no-properties): Rewrite as a defsubst using 'buffer-substring-no-properties' so we don't grab any extents. (rfc822-goto-eoh): Removed. This exists in the XEmacs mail-lib package. (mail-header-end): Ditto. (mail-mode-fill-paragraph): Ditto. 2002-10-05 Satyaki Das * mh-speed.el (mh-speed-invalidate-map): When called interactively the function will clear mh-speed-folders-cache. 2002-10-02 Satyaki Das * mh-mime.el (mh-insert-mime-button): Rewrite without using replace-match. 2002-10-01 Satyaki Das * mh-mime.el (mh-file-mime-type-substitutions): Reorder code to avoid compiler warning. 2002-10-01 Bill Wohler * Makefile (MH-E-ETC): Moved ChangeLog into MH-E-ETC-ETC since it shouldn't get installed in Emacs. (install-emacs): Install MH-E-IMG into Emacs' lisp/toolbar and MH-E-IMG2 into Emacs' lisp/mail. 2002-10-01 Peter S Galbraith * mh-e.el (mh-tool-bar-reply-3-buttons): New customization. Non-nil means use three buttons for reply commands in tool-bar. If you have room on your tool-bar because you are using a large font, you may set this variable to expand the single reply button into three buttons that won't lead to minibuffer prompt about who to reply to. (mh-folder-tool-bar-map): Use mh-tool-bar-reply-3-buttons to decide how many buttons to use for replying. * mh-mime.el (mh-file-mime-type-substitutions) (mh-file-mime-type-substitute): Fix typos and doc strings. 2002-09-30 Peter S Galbraith * mh-mime.el (mh-file-mime-type): Run Content-Type string returned by file command through mh-file-mime-type-substitute (see below). (mh-file-mime-type-substitute): Possibly change Content-Type string using mh-file-mime-type-substitutions variable. This is mostly because all MS-Office file are seen as application/msword by the file command. (mh-file-mime-type-substitutions): New variable. Defines substitutions to make for Content-Type returned from file command. 2002-09-27 Bill Wohler * README: Moved Id to end of file since it broke outline mode at the beginning. * import-emacs (release): Renamed "mainline" tag to "emacs-mainline" to correspond with existing CVS tag. (EMACS_HOME): Fixed typo in docstring. * mh-utils.el (mh-folder-name-p, mh-defun-show-buffer): Lowercase NIL and T in docstring. (mh-update-scan-format): Fixed typo. * mh-comp.el, mh-e.el, mh-pick.el, mh-utils.el: Updated from CVS Emacs. The only new thing appears to be to downcase NIL and T in the documentation. 2002-09-26 Satyaki Das * mh-seq.el (mh-thread-generate): The threading code will now be more resistant to corruption of messages. Before the change any corruption of message x would cause all messages with indices higher than x to be neglected when threading! 2002-09-23 Peter S Galbraith * mh-mime.el (mh-store-mime-parts): Don't store value into user-customizable variable mh-store-mime-parts-default-directory and use mh-store-mime-parts-directory instead. 2002-09-20 Satyaki Das * mh-seq.el (mh-thread-prune-subject): Use regular expressions to make the subject pruning behave the way it is specified in the imap-thread RFC. * mh-speed.el (mh-speed-folders-actual): Don't use pop when we are not going to use the first element. This avoids a compilation warning with cvs emacs. 2002-09-19 Satyaki Das * mh-utils.el (mh-display-msg): Put the call to set-buffer-modified after mh-show-mode. This is needed for CVS emacs since calling mh-show-mode marks the buffer as modified if font-lock is on. 2002-09-17 Peter S Galbraith * mh-mime.el (mh-store-mime-parts-default-directory): Renamed from mh-store-mime-parts-directory (mh-store-mime-parts-directory): Renamed from mh-store-mime-parts-directory-default. 2002-09-16 Peter S Galbraith * mh-comp.el (mail-citation-hook): Doc tweaks suggested by Bill. 2002-09-08 Satyaki Das * mh-e.el (autoloads): Reorder autoload of mh-reply to avoid compiler warning. 2002-09-03 Peter S Galbraith * mh-mime.el (mh-store-mime-parts-directory): New defcustom. Default directory to use for mh-store-mime-parts. (mh-store-mime-parts): New Command. Store the MIME parts of the current message. (mh-store-mime-parts-directory-default): New internal working variable. Default to use for mh-store-mime-parts-directory, set from last use. * mh-e.el (mh-folder-seq-tool-bar-map): Add mh-store-mime-parts to toolbar. 2002-08-22 Satyaki Das * mh-seq.el (mh-thread-generate-scan-lines): In threaded view, complete scan lines are printed for all messages (not just the ones at the top of a thread). * mh-index.el (mh-index-insert-scan): Replace use of kill-line since that pollutes the kill-ring. * mh-comp.el (autoloads): Add autoloads for search and subseq to get rid of compiler warnings. 2002-08-19 Peter S Galbraith * reply-to.xpm, reply-to.pbm, reply-from.xpm, reply-from.pbm, * reply-all.xpm, reply-all.bpm: New icons for various reply methods. * mh-e.el (mh-folder-tool-bar-map): Split reply button into three that won't prompt for "from", "to" and "all". * mh-comp.el (mh-reply): Put variable reply-to in the interactive list since it's specified on the command line for the new toolbar. * mh-comp.el (mail-citation-hook): Tweak docs concerning historical usage for supercite. (mh-yank-from-start-of-msg): Add settings 'supercite and 'autosupercite. Rename 'automatic to 'autoattrib. (mh-insert-prefix-string): Invoke sc-cite-original if mh-yank-from-start-of-msg is et to 'supercite or 'autosupercite. 2002-08-17 Satyaki Das * mh-comp.el (compilation-fix): Reorder defvars to avoid warnings during compilation. 2002-08-17 Peter S Galbraith * mh-comp.el (mh-yank-from-start-of-msg): Add 'automatic choice. Do as for `attribution' automatically when show buffer matches the message being replied-to. (mh-reply): Call 'mh-yank-cur-msg when mh-yank-from-start-of-msg is set to 'automatic and show buffer matches message number being replied-to. (mh-show-buffer-message-number): New helper function to get the message number of the current show-buffer. (mh-yank-cur-msg): Handle 'automatic choice the same as 'attribution. (mh-yank-cur-msg): Bug fix. It would bail on error if mh-show-buffer didn't exists. 2002-08-16 Peter S Galbraith * mh-comp.el (mh-insert-x-mailer): It wrongly assumed that Emacs was used even when XEmacs was used. Fixed so X-Mailer header is more exact about what we are using. 2002-08-15 Peter S Galbraith * mh-e.el (mh-version): Change CVS version number to 6.1+cvs just so X-Mailer header is more exact about what we are using. * mh-mime.el (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp, mh-mml-attach-file): "Jeffrey P. Morgenthaler" reported that "require" in emacs 20.3 doesn't handle 3 arguments. We use "load" at the top of file elsewhere anyway to handle such a case of non-essential loading, so switch to that here. 2002-08-06 Satyaki Das * mh-funcs.el (autoload): Add autoload for mh-speed-invalidate-map. * mh-speed.el (mh-speed-add-folder): New function to make the speedbar aware of new folders when they are created by mh-e. * mh-utils.el (mh-prompt-for-folder): Use mh-speed-add-folder to tell speedbar that new folder is being created. Also use folder instead of mkdir to create new folders. 2002-08-01 Peter S Galbraith * mh-utils.el (mh-decode-quoted-printable): Conditionalize the limit of search for quoted-printable. If we're using mm-decode for MIME decoding, it's possible that `mimedecode' could mess our message, so we only run a full search for quoted-printable parts when not using gnus' mm-decode. When using mm-decode, mimedecode can still help by handling the case of the whole message being quoted-printable as opposed to only a part. 2002-07-31 Peter S Galbraith * mh-comp.el (mh-compose-insertion): Moved from mh-mime.el because the pulldown menu were broken in XEmacs21 from this variable being undefined. 2002-07-28 Mark D. Baushke * mh-utils.el (mh-show-mode): Use the default paragraph-start rather than the inherited text-mode value. 2002-07-28 Satyaki Das * mh-seq.el (mh-thread-duplicates): New hash table to track duplicate messages. (mh-thread-get-message): Remove debug code. (mh-thread-canonicalize-id): Modified to handle messages without message-id header. Such messages are given distinct copies of the empty string as message-id. (mh-thread-generate): The function was inadvertently rebuilding the thread tree when message refiles and message deletes are processed. The change here fixes that. Also code has been added to keep track of duplicate message-id's. (mh-thread-generate-scan-lines): Modified to print scan lines for duplicate messages (that is messages with the same message-id). (mh-thread-forget-message): Modified to maintain mh-thread-duplicates. 2002-07-22 Satyaki Das * mh-speed.el (mh-speed-parse-flists-output): Use delete-region instead of kill-region. Otherwise the kill ring gets polluted. 2002-07-16 Satyaki Das * mh-seq.el (mh-thread-update-scan-line-map): New function to refresh the stale scan lines. (mh-thread-inc): Update old scan lines when mh-thread-inc is called. Otherwise notations for deleted and refiled messages get lost and the folder display gets out of sync with real mh-e state. * mh-mime.el (mh-mm-display-part): Call Gnus citation highlight code when text part is displayed. Otherwise buttonized text parts aren't correctly fontified when they are displayed. 2002-07-15 Mark D. Baushke * mh-utils.el (mm-decode): Use load for the Non-fatal depencency on the mm-decode library. * mh-mime.el (mm-decode, mm-uu, mm-view): Use load for the Non-fatal depencencies on the mm-decode, mm-uu and mm-view libraries. 2002-07-15 Satyaki Das * mh-utils.el (mh-require, mh-autoload): Remove these macros. (mh-decode-mime): Initialized to t iff the mm-decode library is present in the load-path. * mh-mime.el (mh-require): Don't use it anymore. 2002-07-15 Mark D Baushke * mh-utils.el (mh-update-scan-format): Rewrite for compatibility with Xemacs as replace-match appears not to have identical functionality with FSF emacs. (mh-scan-msg-format-regexp): Deleted. This regexp is now hardcoded into the mh-update-scan-format function. 2002-07-12 Satyaki Das * mh-seq.el: Add message threading code. * mh-utils.el (mh-letter-thread-folder): New interactive function that allows switching to threaded view from show buffer. (mh-show-folder-map): Bound "F t" to call mh-letter-thread-folder. (mh-goto-msg): Replace the function to not assume that messages are sorted in the folder buffer. * mh-e.el (mh-folder-threaded-view-p): New buffer local variable in the folder buffer that records whether threaded view is being used currently. (mh-scan-subject-regexp, mh-scan-format-regexp): Get font lock working for threaded view as well. (mh-regenerate-headers): Reset mh-folder-threaded-view-p to nil. (mh-get-new-mail, mh-process-commands): Do incremental threading if folder is in threaded view. (mh-delete-scan-msgs): Update thread tables if folder is in threaded view. (mh-folder-map): Add "F t" as key binding for mh-thread-folder * mh-comp.el (mh-yank-cur-msg): Bug fix. mh-show-buffer is only has a meaningful value in the folder buffer. 2002-07-11 Peter S Galbraith * mh-comp.el (mh-yank-cur-msg): Run only if mh-show-buffer actually exists (otherwise a back-traceable error occurred). * mh-utils.el (mh-find-progs): Run PATH search only when mh-progs, mh-lib and mh-lib-progs are not all already set. This allows the user to set them using a simple setq prior to loading mh-e. This is useful for implementation of mh-e on win32. Note that many commands still call mh-find-path which also parses the mh_profile file (that may still fail on win32), so this is still done often. But it lets us change the mh_profile file and have mh-e see the changed file without exiting emacs and starting over so I left that in. 2002-07-04 Satyaki Das * mh-index.el (mh-index-show): Fixed a bug in mh-index-show which caused it to lose track of point when called from show buffer. 2002-07-04 Mark D. Baushke * Makefile: Add more information and common methods to allow both GNU make and Berkeley make to properly build everything. 2002-07-04 Satyaki Das * mh-mime.el (mh-push-button): Bug fix for mime display with mouse. Select show window before executing the mime display functions. 2002-07-01 Mark D. Baushke * Makefile: Use a conditional variable assignment operator rather than ifndef to let Makefile be used by both GNU make and Berkeley make (or similar versions of make). This does not help Solaris /usr/ccs/bin/make, but Solaris make has problems with the ifndef syntax too. 2002-07-01 Satyaki Das * mh-index.el (mh-index-search): Check for mh-decode-mime before adding mh-mime-cleanup to kill-buffer-hook. * mh-mime.el (mm-destroy-parts): Add definition for old emacs. 2002-06-30 Mark D Baushke * mh-utils.el (mh-update-scan-format): Add documentation string. (mh-scan-msg-format-regexp): Update the regexp to find %(msg). (mh-set-cmd-note): When mh-scan-format-file is not t, dynamic update of mh-cmd-note is wrong. Do not assume that mh-scan-format-nmh and mh-scan-format-mh can be kept in lock-step with mh-cmd-note via mh-set-cmd-note. The mh-scan-format function is now where the updated mh-cmd-note value is put into the scan format. * mh-e.el (mh-generate-new-cmd-note): Add documentation string. (mh-scan-format): Use mh-update-scan-format to get updated copies of mh-scan-format-nmh and mh-scan-format-mh to avoid format skew. (mh-get-new-mail): Do not try to adapt mh-cmd-note unless mh-scan-format-file is equal to t. (mh-scan-format-nmh): No longer buffer local. (mh-scan-format-mh): No longer buffer local. 2002-06-30 Satyaki Das * mh-index.el (mh-index-max-msg-index): New variable to keep track of max message index among search results. If mh-adaptive-cmd-note is non-nil this is used to compute the width of the index field. (mh-index-search): Keep track of max index seen while parsing the search results and set it if mh-adaptive-cmd-note is non-nil. (mh-index-find-max-width): New function to find the required width of the message index field. (mh-defun-index): Binding buffer local variables is bad, so don't do that. (mh-index-show): New argument display-headers-p decides whether the message is displayed in raw form or not. (mh-index-header-display): New interactive function bound to "," which shows the message in raw form. (mh-index-keymap): Add appropriate bindings for backtab and ",". (read-from-string): Add ignore-errors around it so that the code doesn't die when it gets unexpected input. 2002-06-29 Satyaki Das * mh-index.el (mh-count-windows): This function works around the lack of the window-list builtin function in emacs20. 2002-06-29 Mark D Baushke * mh-utils.el (mh-message-number-width): New function to scan the last message of a folder and return its width. (mh-adaptive-cmd-note): New variable, if Non-nil indicates that mh-set-cmd-note should be called with the message width for the folder. (mh-cmd-note): Update documentation. (mh-update-scan-format): Helper function for updating the mh-scan-format-nmh and mh-scan-format-mh variables. (mh-scan-msg-overflow-regexp): New variable to help find problem messages after an inc. (mh-scan-msg-format-regexp): New variable to find the old message width in one of the mh-scan-format-nmh or mh-scan-format-mh variables. (mh-set-default-cmd-note): Replaced by mh-set-cmd-note. (mh-set-cmd-note): New function to replace update mh-cmd-note value. * mh-e.el (mh-regenerate-headers): If mh-adaptive-cmd-note is non-nil, use mh-set-cmd-note on empty folder buffers. (mh-make-folder): Ditto. (mh-generate-new-cmd-note): New function to adapt the mh-cmd-note to fit when mh-get-new-mail gets message number truncation. (mh-get-new-mail): Maybe use mh-generate-new-cmd-note if mh-adaptive-cmd-note is Non-nil. 2002-06-29 Satyaki Das * mh-speed.el (mh-speed-view): The display gets confused if the cursor is in the show buffer when mh-speed-view is called. This is a fix for that. 2002-06-27 Satyaki Das * mh-e.el (mh-next-undeleted-msg): Get rid of optional arg reverse-p. If there are no more undeleted messages the the point remains at its original position and a message is produced (closes SF #494304). (mh-previous-undeleted-msg): Change similar to mh-next-undeleted-msg. (mh-next-msg, mh-refile-msg, mh-delete-msg): Backout previous change. (mh-folder-map): Bind "S-tab" and "K S-tab" to mh-prev-button. * mh-utils.el (mh-show-mode-map): Bind "S-tab" and "K S-tab" to mh-letter-prev-button. * mh-mime.el (gnus-newsgroup-name): Initialize it to nil, so that mm-uu-dissect doesn't cause error. 2002-06-27 Mark D Baushke * mh-utils.el (mh-cmd-note): Make buffer-local. Changes to this variable should be made via the new mh-set-default-cmd-note function. (mh-set-default-cmd-note): New function to setq-default the mh-cmd-note, mh-scan-format-mh and mh-scan-format-nmh values to related values. * mh-e.el (mh-scan-format-mh): Make buffer-local. (mh-scan-format-nmh): Ditto. (mh-scan-good-msg-regexp): Use a more general regular expression so that the width of message numbers, mh-cmd-note, may vary. (mh-scan-deleted-msg-regexp): Ditto. (mh-scan-refiled-msg-regexp): Ditto. (mh-scan-cur-msg-number-regexp): Ditto. (mh-scan-cur-msg-regexp): Ditto. (mh-scan-subject-regexp): Ditto. 2002-06-26 Satyaki Das * mh-speed.el: Speedbar support code. * Makefile: Add mh-speed.el to MH-E-SRC. * mh-utils.el (mh-prompt-for-folder): Add speedbar hook if speedbar is being used. * mh-funcs.el (mh-kill-folder): Add speedbar hook if speedbar is being used. * mh-e.el (speedbar-autoloads): Autoload speedbar initialization functions so that speedbar can find them. 2002-06-25 Satyaki Das * mh-index.el (mh-grep-execute-search, mh-grep-next-result): Allow grep to be used to search mail. (mh-index-font-lock-keywords): Modified to avoid bug when using lazy font-lock. * mh-e.el (mh-delete-msg, mh-refile-msg): Modify so that if no undeleted (or unrefiled) message exists in the current movement direction then try to find an undeleted (or unrefiled) message in the opposite direction instead. (mh-next-undeleted-msg): Added a new optional argument. If non-nil search for undeleted message backwards if none exists in the forward direction. (mh-previous-undeleted-msg): Added an optional argument. If non-nil search for undeleted message in the forward direction if none exists in the backward direction. (mh-next-msg): Optional argument to change direction if undeleted messages are not found in the current direction. * mh-index.el (mh-cmd-note): Use mh-cmd-note instead of hardcoding the index field size to 4. * mh-utils.el (mh-show-addr, mh-show-xface): New functions added to do xface display and goto-addr interface to allow reuse by the mime display code. (mh-show-mode): Use mh-show-addr and mh-show-xface. Only add mh-mime-cleanup to kill-buffer-hook if mime decoding is enabled. (mh-modify): Use mh-letter-mode instead of mh-show-mode when editing messages. * mh-mime.el (mh-mm-inline-message): Arrange for xface and highlighting to work in forwarded messages. 2002-06-23 Peter S Galbraith * mh-comp.el (mh-yank-from-start-of-msg): Add 'attribution' option to add an attribution line in mh-yank-cur-msg. (mh-extract-from-attribution-verb): Verb to use for attribution when a message is yanked by mh-yank-cur-msg. Provides a method for setting a different language. (mh-yank-cur-msg): Add support for 'attribution' option. (mh-extract-from-attribution): Function to get the attribution line, or the sender from the From: line in the current show buffer. 2002-06-20 Satyaki Das * mh-index.el (mh-index-show): mh-display-msg was not being called in the show buffer. This causes weird results on some mime messages. * mh-mime.el (gnus-newsgroup-charset): Defvar to avoid error in pgp messages if gnus hasn't been used yet. * mh-comp.el (mh-letter-mode-map): Typo fix. 2002-06-19 Satyaki Das * mh-mime.el (mh-mml-secure-message-encrypt-pgpmime): Typo fix. (compiler-warnings): Add autoloads to remove compiler warnings. * mh-index.el (autoload-fixes): Fix autoload forms. 2002-06-18 Satyaki Das * mh-comp.el (mh-letter-mode-map): Change binding of "\C-c\C-ma" to mh-compose-insertion. Remove duplicate binding for "C-c\C-mf". (compiler-warnings): Add defvar to remove compiler-warning. 2002-06-18 Peter S Galbraith * mh-comp.el (mh-letter-menu): Conditionalize GPG function on mh-gnus-pgp-support-p. * mh-mime.el (mh-mml-forward-message): s/subseq/substring/. (mh-compose-forward): cut&paste typo: s/messages/message/. (mml-minibuffer-read-file): autoload added. (mml-minibuffer-read-description): autoload added. (mml-insert-empty-tag): autoload added. (mh-mml-secure-message-sign-pgpmime): Check mh-gnus-pgp-support-p. (mh-mml-secure-message-encrypt-pgpmime): Check mh-gnus-pgp-support-p. 2002-06-17 Peter S Galbraith * mh-utils.el (mh-show-use-xface): Check for availability of `uncompface' executable on system. * mh-mime.el (mh-compose-forward): New front end for both mh-mml-forward-message and mh-mhn-compose-forw. (mh-compose-insertion): New front end for both mh-mml-attach-file and mh-mhn-compose-insertion. (mh-mml-to-mime): New function. Compose mime message from mml directives. (mh-mml-forward-message): New function. Forward a message as attachment. (mh-mml-attach-file): New function. Attach a file to the outgoing MIME message. (mh-mml-compose-insert-p): New variable. Buffer-local variable to know whether MIME insertion was done. Triggers an automatic call to `mh-mml-to-mime' in `mh-send-letter'. (mh-mml-secure-message-sign-pgpmime): New function. Front end to mml-secure-message-sign-pgpmime. (mh-mml-secure-message-encrypt-pgpmime): New function. Front end to mml-secure-message-encrypt-pgpmime. * mh-comp.el (mh-send-letter): automatic call to `mh-mml-to-mime' if mh-mml-compose-insert-p is set. (mh-letter-mode-map): Add keys for new mh-mime functions above. * mh-comp.el: Added autoloads for new mh-mime functions above. 2002-06-17 Peter S Galbraith * mh-utils.el (mh-show-use-xface): new defcustom to determine whether to call external package x-face to display the x-face. (mh-invisible-headers-show-xface): variable now defaults to value of mh-show-use-xface. (mh-show-mode): When mh-show-use-xface is t, invoke external package x-face to display the x-face. 2002-06-15 Satyaki Das * mh-e.el (mh-prev-button): New interactive function which moves point to the previous mime button in the show buffer. (mh-folder-mode-map): Bind M-TAB and K M-TAB to mh-prev-button. * mh-utils.el (mh-show-mode-map): Bind M-TAB and K M-TAB to call mh-letter-prev-button (which is analogous to mh-prev-button). (mh-gnus-pgp-support-p): New global variable to replace the variable mh-recent-gnus-p. The name better describes what it is used for. * mh-mime.el (mh-mime-display-part, mh-mime-display-single): Use mh-gnus-pgp-support-p instead of mh-recent-gnus-p. 2002-06-12 Satyaki Das * mh-mime.el (mh-display-buttons-for-inline-parts): New customizable variable. When non-nil inline parts have are displayed with a button (that is initially expanded). (mh-maybe-insert-newline): The function has been removed. (mh-mime-display-single): Add code to display buttons for inline parts. Reduce the insertion of extra newlines between inline parts and also for pgp signature parts. (mh-mm-display-part): The function has been rewritten and cleaned up. There was a bug which could change the show buffer if the user pressed C-g while a mime part was being displayed has been fixed. (mh-press-button, mh-push-button): Use unwind-protect to make sure that set-buffer-modified-p is always called after mime display. (mh-mime-inline-part): The behavior of the function has been changed so that it toggles the display of the raw bytes. (mh-mime-display-security): Remove the display of too many newlines. (documentation): Remove most check-doc warnings. * mh-comp.el (mh-filter-out-non-text): Updated since whitespace added around mime buttons have changed. 2002-06-10 Satyaki Das * mh-index.el (mh-index-last-search, mh-index-search): The default prompt in mh-index-search has been removed since currently there is no good way of reading "+" with mh-prompt-for-folder. (mh-index-folder-mode, mh-index-show-mode): New major modes derived from mh-folder-mode and mh-show-mode respectively. They use a restricted keymap compared to the parent modes. (mh-index-folder-face): New customizable face to display folder names in the index buffer. (documentation): Change two spaces after period back to one. 2002-06-08 Satyaki Das * mh-e.el (mh-folder-toggle-mime-part): New interactive function to control mime display from folder buffer. (mh-folder-inline-mime-part): New interactive function to inline raw mime part from folder buffer. (mh-folder-save-mime-part): New interactive function to save mime part from folder buffer. (mh-folder-mode-map): Add keybindings for "K v", "K o", "K i" and "K \t" to mh-folder-mode-map. (mh-goto-next-button): Modified to allow searching for next button that satisfies some condition. (mh-folder-mime-action): Support function for mh-folder-save-mime-part, mh-folder-inline-mime-part and mh-folder-toggle-mime-part. * mh-utils.el (mh-show-mode-map): Modify keymap to add appropriate bindings for "K v", "K o", "K i" and "K \t". * mh-index.el (documentation): Fix docs according to checkdoc format. 2002-06-07 Satyaki Das * mh-seq.el, mh-funcs.el (Compiler): Remove (require 'view) and instead add defvar for view-exit-action. 2002-06-06 Satyaki Das * mh-comp.el (mh-insert-x-face): If transient-mark-mode is enabled the call to mark returns error. So avoid using mark. * mh-index.el: Support for new interactive function mh-index-search. * mh-e.el (mh-next-button, mh-goto-next-button): Refactor mh-next-button so that the code may be reused by mh-index.el. (mh-folder-map): Add key "F i" to call mh-index-search. * mh-utils.el (mh-recent-gnus-p): Fix documentation. (mh-msg-folder, mh-display-msg): The new function mh-msg-folder maps a MH folder name to the buffer displaying it. In normal operation the two names are identical but they are different in a folder buffer generated by index search. Minor modification to mh-display-msg to use mh-msg-folder to enable mh-index-search to reuse code. (mh-show-mode-map): Add key "F i" to call mh-index-search. * Makefile: Add mh-index.el 2002-06-05 Peter S Galbraith * mh-e.el (mh-folder-message-menu): Add an entry for mh-modify. 2002-05-31 Satyaki Das * mh-utils.el (mh-decode-quoted-printable): Only decode if the whole message is encoded. So restrict the search for the content-transfer-encoding header to the headers of the message itself. * mh-mime.el (mh-mime-display-alternative): Make sure that point is moved after mm-display-part is called. 2002-05-29 Satyaki Das * mh-mime.el (mh-mime-display-single): Fix the logic that determines when an attachment is buttonized. For inline parts that can't be displayed a button is now created. 2002-05-29 Satyaki Das * mh-e.el (mh-regenerate-headers): Fix an error in which the mh-mode-line-annotation was not being set properly. * mh-mime.el, mh-utils.el (compilation): Macros mh-require and mh-autoload are used to make sure that emacs20 doesn't croak when it tries to load non-existent mm-* files. (mh-decode-mime): Make it default to nil for Emacs major version below 21. 2002-05-28 Satyaki Das * mh-e.el (mh-regenerate-headers): Generalize the function to handle multiple ranges. 2002-05-25 Satyaki Das * compilation: Reduce use of eval-when-compile so that load-path is not changed if lisp files are loaded without compilation. Small changes were made to Makefile, mh-comp.el mh-e.el, mh-funcs.el, mh-seq.el, mh-utils.el * mh-e.el (mh-next-button, mh-folder-mode-map): New interactive function to advance point to next MIME button. It is bound to TAB. * mh-utils.el (mh-letter-next-button, mh-show-mode-map): New interactive function mh-letter-next-button has been added to advance point to the next MIME button. It is bound to TAB. * mh-mime.el (comments): Added some comments. 2002-05-24 Satyaki Das * mh-mime.el (compilation): Replace (eval-when-compile ...) by (eval-when (compile) ...) to remove a bug when mh-e is loaded without compilation. 2002-05-23 Satyaki Das * mh-comp.el (compilation): Some code was rearranged to avoid compiler warnings. * mh-e.el (compilation): Code rearrangement and extra autoloads to remove compiler warnings (mh-quit): Add call to mh-destroy-postponed-handles to remove handles that are associated with external viewers. Also fixed a bug that I accidentally introduced by adding an extra line when cut and pasting my changes. * mh-func.el (compilation): Code rearrangement to remove compiler warnings. * mh-mime.el (compilation): Code rearrangement to remove compiler warnings. (mh-defun-compat): New macro to define to useful functions that aren't present present in old Gnus. (mh-destroy-postponed-handles): New function to cleanup handles that are associated with external viewers. (mh-handle-set-external-undisplayer): New function to replace mm-handle-set-external-undisplayer. It associates handles for external viewers with the folder buffer. These are released when the user quits the folder. (mh-mime-display, mh-press-button, mh-push-button): Hook in mh-handle-set-external-undisplayer. (mh-maybe-insert-newline): New function to avoid inserting too many newlines between mime parts. (mh-mm-display-part): Workaround for Gnus bug which causes new lines to be inserted when images are shown inline. (mh-mime-display-security): Cut down on newlines inserted. * mh-pick.el (compilation): Code rearrangement to remove compiler warnings. * mh-seq.el (compilation): Code rearrangement to remove compiler warnings. (comments): Remove @SD from comments. * mh-utils.el (compilation): Slight code rearrangement. (mh-defun-show-buffer): Fix documentation so that the first line is not too long as was the case earlier. Use mh-previous-window-config to remember where the cursor should return functions like mh-reply. (mh-display-msg): Initialize handles data-structure for the folder buffer so that postponed handles can be added to it. (mh-add-msgs-to-seq): Always keep messages in the sequences sorted. This removes some unexpected behavior when working with sequences that go out of sync with the corresponding MH sequences. (mh-canonicalize-sequence): New function to sort and remove duplicates from mh-e sequence. 2002-05-21 Satyaki Das * mh-utils.el (require): Load mm-decode.el here so that mm-inline-media-tests is properly initialized. * mh-comp.el (mh-yank-cur-msg): Don't try to remove the displayed mime parts when yanking the message. This also fixes the problem of regions not being respected during the yank. 2002-05-20 Satyaki Das * mh-utils.el (compiler-warnings): Some code was rearranged to remove all compiler warnings. (mh-decode-mime): New defcustom to control whether mime attachments are shown using Gnus. (mh-globals-hash): New global variable which maps a given buffer to the corresponding mime data structures. (mh-recent-gnus-p): New global variable which checks if Gnus is recent enough so that PGP/GPG encrypted messages can be handled. (mh-mm-inline-media-tests): Tests to determine whether a mime part can be shown inline. (mh-gnus-article-highlight-citation): Shadow the Gnus function, gnus-article-add-button before gnus-article-highlight-citation is called. This prevents the insertion of useless buttons in the message. (mh-show-mode): Don't set font-lock-support-mode to nil. Modify kill-buffer-hook to call mh-mime-cleanup. (mh-modify): Only the edit buffer is shown. (mh-display-msg): Add call to mh-mime-display, mh-display-smileys, mh-display-emphasis when mh-decode-mime is non-nil. * mh-mime.el (mh-buffer-data): New structure to keep track of per-buffer mime information. (compiler-warnings): Some code was rearranged to get rid of all compiler warnings. (mh-graphical-smileys-p): New defcustom which controls whether graphical smileys are shown. (mh-graphical-emphasis-p): New defcustom for graphical emphasis. (mh-max-inline-image-width, mh-max-inline-image-height): New defcustoms for inlining image. (gnus-local-map-property, mm-merge-handles): Copy utility functions for use with version of Gnus that ships with Emacs21.1. (mh-mime-cleanup): New function to free mime data-structures. (mh-add-missing-mime-version-header): New function to add missing Mime-Version header if a Content-Type header exists. (mh-display-smileys): New function to show graphical smileys. (mh-display-emphasis): New function to show graphical emphasis. (new-globals): New variables mh-mime-button-* and mh-mime-security-* were added to control mime buttons. (mh-mime-display): New function to display mime messages. The functions mh-mime-display-part, mh-mime-display-alternative, mh-mime-display-mixed, mh-mime-part-index, mh-small-image-p, mh-mime-display-single, mh-insert-mime-button, mh-mm-display-part, mh-press-button, mh-push-button, mh-mime-save-part, mh-mime-inline-part, mh-widget-press-button, mh-mm-inline-message, mh-mime-display-security, mh-mime-security-show-details, mh-mime-security-press-button and mh-insert-mime-security-button were added to support mh-mime-display. * mh-e.el (mh-header-display): Bind mh-decode-mime to nil when mh-show-msg is called, so that mime isn't decoded when headers are displayed. (mh-quit): The show buffer is killed instead of invalidating and burying it. * mh-comp.el (mh-yank-cur-msg): Filter out the mime buttons from the yanked message. (mh-filter-out-non-text): New function to filter out attachments from message being yanked. 2002-05-20 Bill Wohler * mh-utils.el (mh-invisible-headers-show-xface): First sentence of docstring was not entirely on first line so was truncated in customize and help buffers. Reworded so first sentence could fit within 80 columns per checkdoc recommendation. (mh-defun-show-buffer): Reworded per checkdoc recommendations. Removed @SD while I was in there. 2002-05-18 Satyaki Das * mh-seq.el (mh-narrow-to-seq): This function now removes the current message notation in the folder. Otherwise, two current message notations may be present after mh-widen is called. Also mh-copy-seq-to-eob is called instead of mh-copy-seq-to-point since the latter has a bug. (mh-copy-seq-to-point): This function has a tricky problem. It calls mh-map-to-seq-msgs which uses mh-goto-msg. mh-goto-msg assumes that the folder is sorted (since it uses binary search). The assumption isn't true, so it may not copy all the messages. Since this function is not used any more it has been removed. (mh-copy-seq-to-eob): This function is a specialized (and hopefully correct) replacement for mh-copy-seq-to-point. 2002-05-17 Satyaki Das * mh-utils.el (mh-gnus-article-highlight-citation): Workaround for problem caused by low value of recursive-load-depth-limit in Emacs21.1 and CVS version of Gnus. (mh-show-mode-map): New keymap variable to facilitate use of summary commands from the show buffer. (mh-show-folder-buffer): New local variable which keeps track of the folder-buffer corresponding to the message being shown. (mh-defun-show-buffer): New macro to convert interactive functions callable in the summary buffer to interactive functions callable in the show buffer. (mh-show-mode): Make buffer read-only and use mh-show-mode-map as keymap (closes SF #527946). (mh-modify): New interactive function to edit a message in-place. * mh-e.el (mh-goto-cur-msg): Add an optional argument, minimal-changes-p. If non-nil, the function will just change the point to current message and do not change folder display. (mh-folder-mode-map): Make "M" call mh-modify. 2002-05-07 Peter S Galbraith * mh-utils.el (mh-invisible-headers-show-xface): New defcustom variable. If non-nil, the X-Face header line will be excluded from the variable `mh-invisible-headers'. Set this when using a package such as x-face-el to display X-Face icons in mh-show-mode. This variable's setting will eventually be set automatically when mh-e does its own X-Face decoding (or this variable will be replaced by one telling mh-e to decode the X-Face). We may not ship the next release with this variable. 2002-05-07 Peter S Galbraith * mh-comp.el (mh-x-face-file): New defcustom variable. File name containing the encoded X-Face string to insert in outgoing mail. (mh-insert-x-face): New function. Appends an X-Face field to the header, but only if it doesn't already exist and if 'mh-x-face-file' is non-nil and points to an existing file. (mh-send-letter): Invoke mh-insert-x-face. 2002-04-29 Mike Kupfer * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Check whether XEmacs region is actually active (needed at least for 21.1). [Patch committed by psg] 2002-04-29 Mike Kupfer * mh-utils.el (mh-prompt-for-folder): Remove "default" argument from completing-read as XEmacs-21.1 doesn't have it (21.4 does however) and using the argument adds no functionality. [Patch committed by psg] 2002-04-11 Peter S Galbraith * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): Add support for XEmacs to act on selected region when active. 2002-04-10 Peter S Galbraith * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): XEmacs fix; Add check to see if mark-active is bound, because Mandrake Linux include XEmacs initialization code that binds transient-mark-mode. This fix gets around a problem in Mandrake only. It wasn't a problem on XEmacs generally. Fixes SF #541915. 2002-04-08 Bill Wohler Released mh-e version 6.1. * mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp to increase robustness. (mh-folder-unseen-seq-list): Use `expand-file-name' as `mh-expand-file-name' isn't needed and the former saves function call. (Version, mh-version): Updated for release 6.1. 2002-04-08 Peter S Galbraith * mh-e.el (mh-folder-unseen-seq-list): Specify mh-progs path in call to mark command. Fixes a bug in which unseen messages weren't highlighted if "mark" wasn't in the path. 2002-04-07 Bill Wohler * MH-E-NEWS: Updated for release 6.1. * README: Updated for release 6.1. Updated verbiage about reading MH-E-NEWS. * mh-comp.el, mh-e.el, mh-funcs.el, mh-mime.el, mh-seq.el, mh-utils.el, mh-xemacs-compat.el: Updated copyright in files modified this year. * mh-xemacs-compat.el: Put Author field back in, but set to FSF. * mh-comp.el, mh-funcs.el, mh-mime.el, mh-seq.el, mh-utils.el: Fixed all checkdoc errors, except for no documentation, and documentation in comments. Also removed the- prefix from certain local variables. * mh-e.el: Fixed all checkdoc errors, except for no documentation, and documentation in comments. Also removed the- prefix from certain local variables. (mh-folder-unseen-seq-name): Refactored to make default sequence name more explicit and to handle undefined Unseen-Sequence MH profile entry better. 2002-04-02 Peter S Galbraith * mh-e.el: 'defvar mh-folder-unseen-seq-name' called a function to set it's value, and this happens also on byte-compilation (where it can fail if the user's MH environment is not setup correctly). I now set the value of mh-folder-unseen-seq-name at runtime when I first need it. This should fix Debian bugs http://bugs.debian.org/140232 and http://bugs.debian.org/140817 2002-03-25 Peter S Galbraith * mh-utils.el: remove "(require 'mh-e)" since mh-utils.el should be at the bottom of the dependency tree. * mh-e.el (mh-folder-unseen-seq-name): Make sure mh-progs is set and use it as path to mhparam command in call-process. 2002-01-23 Peter S Galbraith * mh-e.el (mh-folder-font-lock-keywords): Add call to mh-folder-font-lock-unseen to fontify unseen messages in bold. (mh-folder-unseen-seq-name): Provide name of unseen sequence from mhparam. Used as default for variable of same name. (mh-folder-unseen-seq-list): Returns a list of unseen messages numbers for current folder. (mh-folder-unseen-seq-cache): Cache variable to hold list of unseen message numbers while font-lock iterates. This variable is buffer-local. (mh-folder-font-lock-unseen): Returns unseen message lines to font-lock one by one. 2002-01-15 Peter S Galbraith * mh-comp.el (mh-insert-prefix-string): Wrap a "(let ((zmacs-regions nil))" around (mark) so it works in XEmacs. Bug reported and fix suggested by Will Partain Indeed, this is how it appears in XEmacs-21's mh-comp.el. 2001-12-16 Jeffrey C Honig * mh-comp.el (mh-forward): Move the assignment to `fwd-msg-file' to before the assignment to `draft' as the later changes buffers and invalidates `mh-seq-list' (which is used in a function called by (mh-seq-to-msgs)). Resolves SF #489448. * mh-utils.el: Add defcustoms for `mh-temp-folders-buffer' and `mh-temp-sequences-buffer'. * mh-e.el (mh-quit): If they exist, kill 'mh-temp-buffer, 'mh-temp-folders-buffer and 'mh-temp-sequences-buffer when quitting. * mh-funcs.el (mh-list-folders): Use `mh-temp-folders-buffer' (a defcustom initialized to "*Folders*") for folder listing. Put into view mode and set it up to kill the buffer when exiting view mode. * mh-seq.el (mh-list-sequences): Use `mh-temp-sequences-buffer' (a defcustom initialized to "*Sequences") for sequences listing. Put into view mode and set it up to kill the buffer when exiting view mode. 2001-12-16 Bill Wohler Released mh-e version 6.0. * MH-E-NEWS: Be a little more specific about incompatible changes. Added info about outdated manual. Removed variables in mh-scan regexp table that did not exist in 5.0.2. Added helpful documentation about finding relevant variables containing regexps to mh-scan-format-file's description. * mh-e.el (mh-scan-format-file): Added information about getting a list of regexp variables that you'll need to change if you customize your scan's output. (mh-folder-mode): Added documentation about `mh-scan-format-file' for those users who modify their scan formats. * README: New file. Describes packages and provides simple installation instructions. * Makefile (clean, dist, install-emacs): Replaced $(RM) with rm -rf (closes SF #488661). 2001-12-14 Bill Wohler 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 all. (MH-E-IMG2): New variable to hold images in mail sub-directory. (dist): Updated target to make mail sub-directory and copy MH-E-IMG2 images there. * mh-xemacs-compat.el: Modified docs per GNU coding conventions. * mh-e.el: Reorganized variables having to do with the scan line. Moved some random variables that were interspersed out of the middle. Moved `mh-scan-format-file' first and let the variables flow from there. As the number of variables increases, it is becoming important to organize the mh-e namespace. Several variables having to do with the format of scan lines were renamed, as follows: (mh-good-msg-regexp): Renamed to mh-scan-good-msg-regexp. (mh-deleted-msg-regexp): Renamed to mh-scan-deleted-msg-regexp. (mh-refiled-msg-regexp): Renamed to mh-scan-refiled-msg-regexp. (mh-valid-scan-line): Renamed to mh-scan-valid-regexp. (mh-cur-msg-number-regexp): Renamed to mh-scan-cur-msg-number-regexp. (mh-cur-msg-line-regexp): Renamed to mh-scan-cur-msg-regexp. (mh-scan-rcpt-addr-regexp): Renamed to mh-scan-rcpt-regexp. (mh-scan.font-lock-regexp): Renamed to mh-scan-format-regexp. (mh-folder-scan-font-lock-face): Renamed to mh-folder-scan-format-face. (mh-folder-cur-msg-line-face): Renamed to mh-folder-cur-msg-face). 2001-12-13 Bill Wohler * mh-utils.el (mh-msg-number-regexp): Renamed to mh-scan-msg-number-regexp. (mh-msg-search-regexp): Renamed to mh-scan-msg-search-regexp. * Corrected typos, quoted variables in doc strings, and made minor wording changes in docs. 2001-12-13 Peter S Galbraith * mh-xemacs-compat.el: defalias 'match-string-no-properties to 'match-string for XEmacs. I've seen a better function for this that actually removes text properties, but this will do for now. * mh-utils.el (mh-decode-quoted-printable): deactivate-mark not bound in XEmacs. * mh-xemacs-compat.el: GNU Emacs Functions needed by XEmacs. New file. * mh-e.el: (require 'mh-xemacs-compat) when running XEmacs. 2001-12-12 Peter S Galbraith * mh-comp.el (mh-send-letter): function local-variable-p needs two arguments in XEmacs. (mh-send-letter): sendmail-coding-system not bound in XEmacs. (mh-send-letter): default-buffer-file-coding-system not bound in Xemacs. * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): transient-mark-mode not bound in XEmacs. The feature of operations made on all messages in the selected range when transient-mark-mode is on doesn't work in XEmacs. * mh-e.el, mh-utils.el: Conditionalize calls to 'add-to-list 'facemenu-unlisted-faces for XEmacs. 2001-12-11 Jeffrey C Honig * mh-e.el (mh-scan-format): Add `mh-scan-format-file' variable to specify the scan format string or file to use. Define formats for MH and nmh that are compatible with the standard format, but provide hints for font-lock. Define (mh-scan-format) for use by (mh-regenerate-headers) and (mh-get-new-mail) to specify the args necessary to inform the scan program which scan format string or file to use. 2001-12-07 Peter S Galbraith * mh-e.el (scan.font-lock): New format file documented in comments. (mh-scan.font-lock-regexp): Adapted to new format. (mh-folder-font-lock-keywords): Use new format. * mh-e.el (page-down.xpm): Icon renamed from nextpage. * mh-utils.el (mh-decode-quoted-printable): Bug fix. Better check on what actually is a quoted-printable attachment. 2001-12-06 Eric Ding * mh-mime.el (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp): require mailcap.el here rather than using autoload at top of mh-mime. (mh-file-mime-type): get rid of unused variables (why were they there to begin with?) 2001-12-06 Peter S Galbraith * mh-e.el (mh-cur-msg-number-regexp, mh-cur-msg-line-regexp): mh-cur-scan-msg-regexp splits into these two variables. The whole-line fontification is disabled, but easily restored by a user (although it could be a defcustom with choices DISABLED or the correct regexp?) (mh-folder-cur-msg-line-face): mh-folder-current-msg-face renamed to this. (mh-folder-cur-msg-number-face): mh-folder-current-face renamed to this. * cabinet.xpm: Revert to rescan icon name. * mh-e.el (mh-folder-tool-bar-map): s/cabinet/rescan/ * mh-e.el (mh-folder-font-lock-keywords): Reorder and tweak such that current message line highlight doesn't mess up other highlights. 2001-12-05 Eric Ding * mh-utils.el (mh-show-from-face): Change mh-show-from-face to cyan on dark backgrounds; through a series of changes, it had become the same color as mh-show-subject-face! 2001-12-05 Bill Wohler * mh-e.el, mh-utils.el: Fixed typos in face definitions, and made a couple of small doc string tweaks while I was in there. Peter, if you don't agree, let me know and I'll back them out. I thought the "mh-e" in the text was redundant since the variables start with "mh"; I was also thinking ahead to how the documentation may read. 2001-12-05 Peter S Galbraith * mh-e.el (mh-cur-scan-msg-regexp): Match 0 is the whole line. (mh-folder-current-msg-face): New face with only a background settings, used in font-lock for the current message. (mh-folder-font-lock-keywords): Use mh-folder-current-msg-face for mh-cur-scan-msg-regexp. * mh-utils.el (mh-show-from-face): Use red3 instead of red for light backgrounds. It's not as bright on the eyes. (mh-show-subject-face): copy from mh-folder-subject-face instead. Makes the look consistent with folder-mode. * mh-e.el (mh-folder-subject-face): Moved to mh-utils since we need it to copy to mh-show-subject-face. 2001-12-05 Bill Wohler * mh-e.el (mh-folder-mode-map): Moved `mh-extract-rejected-mail' from "a" to "E". Better mnemonic, nicer to folks used to using a for `mh-reply'. 2001-12-04 Bill Wohler * mh-e.el (mh-folder-map): Added "S" for `mh-sort-folder'. 2001-12-04 Peter S Galbraith * mh-e.el (mh-folder-subject-face et al.): Yet another attempt at colours for folder-mode. Still themed, but fewer and darker colours (Blame Eric this time!). I'll get to underlining tomorrow night. * mh-e.el (mh-folder-tool-bar-map): Renamed all icons so they don't have the word mail in them. Also generated a pbm format of each icon for users without XPM support conpiled into Emacs. 2001-12-04 Eric Ding * mh-utils.el (mh-show-font-lock-keywords): Use mh-header-subject-font-lock instead of regexp for subject headers, which may go multiple lines. (mh-header-subject-font-lock): New function. Fix typos (hightlight -> highlight). 2001-12-04 Eric Ding * mh-e.el: changes to face colors on dark backgrounds. (mh-folder-followup-face): change to LightGoldenRod. (mh-folder-date-face): change to snow3. (mh-folder-msg-number-face): change to snow4. 2001-12-04 Bill Wohler Released mh-e version 5.0.92. * mh-utils.el (gnus-cite-face-list) (mh-gnus-article-highlight-citation): Don't autoload. Revert to requiring in `mh-gnus-article-highlight-citation' as before. With the autoloads, if you ran mh-e before gnus, you'd get an undefined gnus variable when viewing an article in gnus. Go figure. 2001-12-03 Bill Wohler Released mh-e version 5.0.91. * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now that workaround has been implemented. * Makefile (MH-E-OBJ): New variable to hold .elc files. (all): Just compile. (clean): New target that blows away MH-E-OBJ. (dist): Added $(MH-E-OBJ) to tarball. Attempt to quiet compilation errors to a dull roar. * mh-e.el: Require easymenu, added autoload of info. (mh-smail, mh-smail-other-window): Comment says these were needed by Emacs 18. Out! * mh-utils.el: Don't require sendmail, but require mh-e. Moved autoloads to top of file, and autoload gnus-cite and sendmail too. * mh-pick.el: Require easymenu. Remove cond on `easy-menu-define'--it exists. * mh-mime.el: Autoload mailcap. * mh-comp.el: Require mh-e and easymenu, moved autoloads to top of file. * Makefile: (EMACS): New constant to hold emacs calling sequence. (install): Renamed to install-emacs. (compile): New target to compile all files. (dist): Make dependent on compile. (import): Renamed to import-emacs. (%.elc): New implicit rule to compile elisp files. * mh-e.el (mh-thread-map): Added "Td" for mh-delete-subject-thread. 2001-12-03 Peter S Galbraith * mh-e.el (mh-folder-tool-bar-map): Change tooltip for exec icon. * mh-e.el (mh-folder-subject-face): Change to IndianRed1. (mh-folder-followup-face): Change to IndianRed. (mh-folder-deleted-face): Use sedate face instead of bright one. 2001-12-03 Bill Wohler * mh-utils.el (mh-invisible-headers): Increase size of `max-specpdl-size' locally to work around insufficient default. (mh-invisible-headers): Added X-Info and X-VSMLoop (NTMail). 2001-12-03 Jeffrey C Honig * mh-utils.el (mh-find-progs): Searches should not stop if the strings are not found, there is error detection at the end of the routine (closes SF #488231). 2001-12-02 Bill Wohler * MH-E-NEWS: Added info about bumping up `max-specpdl-size'. * Makefile (MH-E-IMG): New variable that contains images used by mh-e. Add these files to release. * MH-E-NEWS: Second draft of mh-e 6.0 (was 5.1) release notes. * mh-e.el (mh-folder-updated-hook): Reworded to avoid ambiguity. Is the hook called when you type `d' or when you type `x'? (mh-unseen-updated-hook): Reworded to be consistent with `mh-folder-updated-hook.' * mh-utils.el (mh-recenter): Accepted Gerd's change which is evaluated at compile time. 2001-12-02 Bill Wohler * mh-e.el Major, major keymap changes. The specific changes are listed below, but view the sources, or use "C-h m" in MH Folder mode for the complete list. Use of sub-keymaps inspired by gnus. The changes tripped me up at first too, but after about 5 minutes of shock (which is to be expected, I've been using the old keybindings for 16 years), I honestly found the new bindings to be nice indeed. It will also provide flexibility to allow for future functionality. I hate to do this on the eve of the beta release, but you asked for it! It's likely I'll have to pull an Eric and back this change out, but if we can live with pink subjects, this can't be so bad ;-). Question: will the users revolt? If they do, I suppose we can release 6.0.1 the next day ;-). (mh-folder-map, mh-sequence-map, mh-extract-map, mh-digest-map): New keymaps which start with F, S, X, and D, respectively. The mhstore commands can go in the mh-extract-map eventually. (mh-thread-map): Renamed from mh-folder-thread-map. Keymap changes and rationale. The sub-keymaps allowed some consistency (e.g., esp. with l(ist) and k(ill). e Deleted. Already have x. Now used by mh-edit-again. a Deleted. Already have r. Now used by mh-extract-rej.. j Deleted. Already have g. M-a -> e Better mnemonic. Matches rmail. Frees movement cmd. M-e -> a Try `a'gain! M-f -> Fv Frees movement command M-f -> Ff Alias (keep?) M-f -> Fo Alias (keep?) M-k -> Fk No reason but to keep with folder commands M-l -> Fl No reason but to keep with folder commands M-p -> Fp No reason but to keep with folder commands M-r -> Fr Frees movement command M-s -> Fs No reason but to keep with folder commands M-u -> Fu No reason but to keep with folder commands M-% -> Sd Better mnemonic M-# -> Sk Better mnemonic M-q -> Sl Better mnemonic C-xn -> Sn Frees up standard key binding % -> Sp Better mnemonic for putting a message in a sequence ? -> Ss Shows sequences that message is in C-xw -> Sw Frees up standard key binding M-n -> Xs Better mnemonic (shar) M-n -> Xu Better mnemonic (uuencode) M-SPC -> DSPC Frees mark command M-\177 -> D\177 No reason but to keep with digest commands M-b -> Db Frees movement command 2001-12-01 Bill Wohler * mh-e.el: Use gnus style of keymaps. Now requires gnus-util. (mh-folder-thread-map): New map, created by gnus-define-keys. Reached when typing T in mh-folder-mode-map. Moved threading functions to this new keymap so we can use dired again. (mh-folder-mode-map): Defined by gnus-define-keys. Otherwise than the new threading functions, no changes to the UI were made at this point--saving that for the next check-in. * mh-pick.el (mh-pick-mode-map): Use gnus-define-keys. Now requires gnus-util. * mh-comp.el (mh-letter-mode-map): Use gnus-define-keys. Now requires gnus-util. 2001-12-01 Jeffrey C Honig * mh-e.el: Update the documentation for the regexps used by `mh-folder-font-lock-keywords' to specify how many parethesized expressions they are expected to have and what those expressions are expected to match. 2001-12-01 Bill Wohler * mh-e.el (mh-folder-mode): Removed iteration of key bindings, \\{mh-folder-mode-map} suffices. Removed variable documentation also as this is already out of date and a maintenance hassle. Reference new mh customization group instead. * mh-comp.el (mh-letter-mode): Ditto. Also added new information about MIME directives getting processed automatically if inserted via mh-e commands. * mh-pick.el (mh-pick-mode): Edited documentation so it reads like the other modes. * mh-e.el (mh-compat-quit): Deleted obsolete and unused function. Comment in this function said that `b' shouldn't be used for burst-digest, as it is used for `back' in info, less, and rn. But what does `back' mean in MH Folder? I suppose if you visit a folder, you would go `back' to the original folder. Hmmm, I guess we'll leave the `b' binding alone for now. * mh-utils.el: Moved some of the variable comments to the first column so they wouldn't wrap in such an ugly fashion. (mh-showing-mode): Renamed variable and function from mh-showing to conform with minor mode conventions. Added optional arg to function so it would behave like a normal minor mode: no or nil arg toggles mode, 0 arg turns off, non-nil turns on. It also turns out that desktop-create-buffer would barf when recreating mh-e buffers because it was calling mh-show with an arg. (mh-show-mode): Use define-derived-mode to simplify definition a *lot*. (mh-set-mode-name): Deprecated by use of define-derived-mode. Removed. * mh-pick.el (mh-pick-mode): Use define-derived-mode to simplify definition a *lot*. * mh-e.el (mh-scan-prog): Removed message about "Buffer local" as this message will appear in a future version of Emacs. (mh-inc-folder): mh-showing renamed to mh-show-mode and made a real minor mode. (mh-folder-mode): Use define-derived-mode to simplify definition a *lot*. * import-emacs (release): Change `(none)' to `mainline' so import doesn't choke after running `cvs up -A' on Emacs. (COPYING): Moved from $EMACS_HOME/etc to $EMACS_HOME. (cvs update): Whoops! Forgot the second join (-jemacs). make import works fine again. 2001-11-30 Peter S Galbraith * mh-e.el (mh-folder-font-lock-keywords): Change order of font-lock patterns such that subject body text doesn't get date fontification. * mh-e.el (mh-scan-subject-regexp): Bug fix. Remove a dot. scan.font-lock users have to setq it separately. 2001-11-30 Eric Ding * mh-utils.el (mh-clean-msg-header): Go back to using mh-delete-line. Using invisible text property is nicer in some ways, but winds up with somewhat mysterious behavior should user kill/yank stuff from the header (i.e., text gets yanked invisibly and won't be seen by user until file is reloaded). 2001-11-29 Bill Wohler * mh-e.el (mh-page-msg): Use mh-next-direction to page in the right direction. 2001-11-29 Jeffrey C Honig * mh-e.el (mh-scan-folder): Fix logic to not attempt to go to the current message if there are no messages in the folder. 2001-11-29 Peter S Galbraith * mh-e.el (mh-folder-font-lock-subject): New fontifier function for subject lines in folder-mode (mh-scan-followup-regexp): Deleted obsolete regexp. Use mh-scan-subject-regexp instead. (mh-folder-font-lock-keywords): Use mh-folder-font-lock-subject instead of obsolete mh-scan-followup-regexp variable. (mh-folder-date-face, mh-folder-msg-number-face): (mh-folder-subject-face, mh-folder-followup-face): Now defined as proper faces instead of copied from font-lock faces. * mh-mime.el (mh-media-type-regexp): New variable. Regexp matching valid media types used in MIME attachment compositions. (mh-file-mime-type): Use mh-media-type-regexp instead of hard-wiring its value. * mh-utils.el (mh-show-unquote-From): New function to unquote "^>From" in mh-show-mode (not saved to disk). (mh-show-mode): Call mh-show-unquote-From. 2001-11-29 Eric Ding * mh-utils.el (mh-clean-msg-header): Use mh-make-line-invisible rather than mh-delete-line. (mh-make-line-invisible): New function to make line(s) invisible rather than deleting line(s). Optional argument specifies number of lines to delete. (mh-show-msg): screen-height has been deprecated; use no more. (mh-notate): screen-width has been deprecated; use no more. 2001-11-29 Jeffrey C Honig * mh-utils.el: (mh-find-progs): Change mh-find-progs to rely on the existence of mhparam. The location of mhparam is used to find `mh-progs'. It uses the libdir and etcdir to find the `mh-lib-progs' and `mh-lib' directories. If etcdir doesn't return anything we assume `mh-lib-progs' is the same as `mh-lib' and that we are using MH instead of nmh. 2001-11-29 Peter S Galbraith * mh-e.el (mh-scan.font-lock-regexp): Change docs to reflect that second paren expression is the user match. (mh-folder-font-lock-keywords): Change from 1st to 2nd parenthesized expression to match user name, after Jeffrey's change to the regexps. 2001-11-29 Bill Wohler * mh-utils.el (mh-clean-message-header): Default is now t. (mh-invisible-headers): Padded out to contain all the headers that the mh-e developers don't like to see (closes SF #415759). 2001-11-28 Bill Wohler * mh-comp.el (mh-rejected-letter-start): Added MIME MDN. While this allows mh-extract-rejected-mail to strip the start of the MDN, there is still a closing MIME marker at the end. This should be cleaned up eventually. 2001-11-28 Peter S Galbraith * mh-e.el (mh-folder-seq-tool-bar-map): New tool-bar used for folder-mode when narrowed to sequence. * mh-seq.el (mh-narrow-to-seq): Set tool-bar to mh-folder-seq-tool-bar-map. (mh-widen): Set tool-bar to mh-folder-tool-bar-map. * widen.xpm: New icon used in mh-folder-seq-tool-bar-map. * mh-mime.el (mh-file-mime-type): Much better check on validity of 'file' output. * mh-e.el (mh-scan-subject-regexp): New regexp variable for subject string in folder mode. Used to extract subject sequence, and will be used for font-lock soon. * mh-seq.el (mh-subject-thread-to-sequence): More robust code by using mh-scan-subject-regexp, allows users with non-standard scan format to use subject sequences. * mh-comp.el (mh-letter-fill-column): Fill column to use in mh-letter-mode. (Yes, I'm doing this in spite of what Bill said; Someone can always undo it later) (mh-letter-mode): setq fill-column to mh-letter-fill-column. 2001-11-28 Bill Wohler * mh-e.el (mh-page-msg): The first time the end of page is hit, set mh-page-to-next-msg-p to t. The second time the end of page is hit, go to the next message. * mh-utils.el: (mh-show-msg): Initialize mh-page-to-next-msg-p to nil. 2001-11-27 Bill Wohler * mh-mime.el (mh-mime-content-types): Updated list of types to contain types used by mh-e developers, but not including types not listed in http://www.isi.edu/in-notes/iana/assignments/media-types/media-types. 2001-11-27 Peter S Galbraith * mh-seq.el (mh-subject-thread-to-sequence) New function placing all messages with similar subject line into a sequence named 'subject. (mh-narrow-to-subject-thread): New command to narrow to all messages with similar subject line into a sequence named 'subject. (mh-toggle-subject-thread): New command to toggle between a new 'subject sequence or the wide view of a folder. (mh-delete-subject-thread): New command to delete all following messages with similar subject lines (leaving preceeding ones untouched). (mh-next-unseen-subject-thread): New command to create and move to a new subject thread created from the next unseen message as a starting point. * mh-e.el (mh-folder-message-menu): New menu entries for subject threads. (mh-folder-mode-map): New keybindings for subject threads. (mh-lessp): New function to sort messages. * mh-utils.el (mh-show-font-lock-keywords): and various faces... scoped within eval-after-load "font-lock" to avoid requiring font-lock to use its faces. * mh-e.el (mh-folder-font-lock-keywords): Same. 2001-11-27 Jeffrey C Honig * mh-mime.el (mh-file-mime-type): Use mh-temp-buffer instead of " *mh-temp". * mh-comp.el (mh-insert-x-mailer): Kill mh-temp-buffer after use. 2001-11-26 Eric Ding * mh-utils.el: revert to using external mimedecode to decode MIME quoted-printable parts 2001-11-26 Jeffrey C Honig * mh-e.el (mh-process-commands): Added mh-folder-updated-hook. * mh-e.el (mh-update-unseen): Added mh-unseen-updated-hook. 2001-11-26 Peter S Galbraith * mh-mime.el (mh-file-mime-type): Make sure output from file command is known to mailcap file, otherwise prompt the user. (mh-mime-content-types): Add "image/png" type. * mh-e.el (mh-folder-font-lock-keywords): Use a bunch of new mh-folder-*-face faces. * mh-utils.el (mh-show-font-lock-keywords): Use a bunch of new mh-show-*-face faces. * mh-utils.el (mh-letter-header-font-lock): Bug fix. Fix infinite loop in emacs20 font-locking. (mh-header-field-font-lock): Preventive fix with similar change. * mh-comp.el (mh-reply-show-message-p): Typo. diplayed -> displayed. * MH-E-NEWS: Same. * mh-e.el (mh-folder-tool-bar-map): Bug fix. I had mh-repack-folder instead of mh-pack-folder. 2001-11-26 Bill Wohler * mh-e.el: Updated header for consistency and to conform with (elisp)Library Headers. (mh-do-not-confirm): Updated documentation string to reflect reality (e.g., is no longer used by mh-kill-folder and is used by more functions than just mh-undo-folder). (mh-page-msg): Now shows the next undeleted message if looking at the bottom of the current message. (mh-process-or-undo-commands): Fixed indentation. * mh-mime.el: (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp): If MIME type cannot be determined with file command, use mailcap-mime-types (if available) to provide list for completing read. * MH-E-NEWS: First draft of mh-e 5.1 release notes. 2001-11-26 Eric Ding * mh-utils.el (mh-decode-quoted-printable): Implement quoted-printable decoding in elisp (starting with code copied from FLIM). (mh-decode-quoted-printable-region): Move (require 'hexl) outside while loop. (mh-decode-quoted-printable): give user a choice between using internal code or external program to decode quoted-printable content. Resurrect code that calls external mimedecode program. 2001-11-25 Peter S Galbraith * mh-utils.el (mh-highlight-citation-p): New variable to determine whether to hightlight citations in message body with gnus, font-lock or not at all. (mh-show-font-lock-keywords): removed citations from keywords. (mh-show-font-lock-keywords-with-cite): New variable, equivalent to prior mh-show-font-lock-keywords. (mh-gnus-article-highlight-citation): hook into gnus for multi-level citation highlighting. (mh-show-mode): Use either mh-show-font-lock-keywords or mh-show-font-lock-keywords-with-cite, depending on value of mh-highlight-citation-p, and possibly call mh-gnus-article-highlight-citation. * mh-comp.el (mh-letter-mode): Same as for mh-show-mode above. 2001-11-25 Jeffrey C Honig * mh-comp.el (mh-redistribute): Added mh-redist-background variable to cause mh-redistribute to run the redist command in the background. This causes the transaction log to be visible, like with send. 2001-11-25 Peter S Galbraith * mh-e.el (mh-inc-folder): 'inc' finishes by displaying the first new message if already showing messages. 2001-11-22 Peter S Galbraith * mh-utils.el (mh-prompt-for-folder): Exit with error if no folder specified, otherwise mh-refile-msg may try to create a folder with empty name, and this creates problems; even mh-undo can't handle it (Closes SF #476824). * mh-comp.el (mh-letter-tool-bar-map): Info button needed to require 'info. Also tweaked help texts. (mh-letter-menu): Use headline capitalization (Closes SF #483203). * mh-e.el (mh-folder-tool-bar-map): Same as above. (mh-folder-folder-menu, mh-folder-message-menu): (mh-folder-sequence-menu): Same as above. * mh-pick.el (mh-pick-menu): Same as above. 2001-11-21 Peter S Galbraith * mh-comp.el (mh-reply-show-message-p): The setting of this variable determines whether the MH show-buffer is diplayed 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. (mh-reply): Don't show message in other window if mh-reply-show-message-p is nil. * mh-e.el (mh-folder-tool-bar-map): Add mail_exec.xpm icon for mh-execute-commands. * mh-utils.el (mh-show-mouse): New function to click on a message in folder-mode and show that message. * mh-e.el (mh-folder-mode-map): Bind mh-show-mouse to mouse-2. * mh-e.el (mh-page-msg): Show buffer first if not displayed, instead of simply complaining there's no other window. * mh-e.el (mh-folder-tool-bar-map): New tool-bar for folder mode! (mh-folder-mode): Setup tool-bar. * mh-mime.el (mh-have-file-command): try to non-fatally load executable.el because emacs20 doesn't autoload it. * mh-utils.el (load "executable" t t): Idem. * mh-utils.el (mh-clean-msg-header): Bug fix. locally bind after-change-functions to nil, working around a strange font-lock bug in emacs20 when (add-hook 'mh-show-mode-hook 'turn-on-font-lock) was used. * mh-comp.el (require 'sendmail): Moved from mh-comp.el to mh-utils.el because it is needed in reading mail too. (mh-header-field-end, mh-in-header-p): Moved to mh-utils.el because they are needed by mh-show-mode's font-lock code. Unfortunately, this splits the field related code into two files. Perhaps it should all go into mh-utils? 2001-11-20 Eric Ding * mh-utils.el (mh-show-from-face): Fix typo in defface 2001-11-20 Bill Wohler * mh-utils.el (mh-mail-header-separator): Set to -------- as defined by MH (components, and replcomps files). This variable cannot be a regexp since it is used as an argument to insert and is passed through regexp-quote before being used. The previous value broke a lot of code, including mailcrypt. * mh-comp.el (mh-letter-mode, mh-send-letter): Insert X-Mailer header field from mh-send-letter. (mh-edit-again, mh-extract-rejected-mail): Call mh-insert-header-separator to ensure that there is a separator. Packages such as mailcrypt depend on it. (mh-insert-header-separator): New function to insert mh-mail-header-separator if it doesn't exist. 2001-11-20 Peter S Galbraith * mh-comp.el (mh-letter-mode): Make font-lock-defaults a local variable * mh-e.el (mh-folder-mode): Same. * mh-utils.el (mh-show-mode): Same. * mh-e.el (mh-scan-msg-num-regexp): Delete variable and replace with mh-good-msg-regexp. * mh-utils.el (mh-mail-header-separator): Bug fix. Moved from mh-comp.el to mh-utils.el (which mh-comp.el loads). * mh-comp.el (mh-in-header-p): Recycle sendmail.el code (as suggested by Bill). * mh-utils.el (mh-letter-header-font-lock): Use mh-in-header-p. * mh-comp.el (mh-letter-tool-bar-map): tool-bar customize button goes to customizing mh-compose group. * mh-utils.el (mh-show-mode): font-lock bug fix. Locally set font-lock-support-mode to nil. (mh-letter-header-font-lock, mh-header-field-font-lock): font-lock bug fix. Don't return match beyond font-lock search limit. * mh-comp.el (mh-letter-mode): Emacs20 bug fix. tool-bar-mode is not a bound variable. 2001-11-19 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): tool-bar help button goes to 'Draft Editing' info node. * mh-utils.el (mh-show-from-face, mh-show-to-face): New faces used for font-lock. (mh-header-to-font-lock, mh-header-cc-font-lock) (mh-header-field-font-lock): New helper function returning whole header field arguments to font-lock. (mh-show-font-lock-keywords): Heavily modified using the above. * mh-e.el (mh-scan-msg-num-regexp): Regexp matching the message number in scan lines. (mh-scan-date-regexp): Regexp matching a valid date in scan lines. (mh-scan-rcpt-addr-regexp): Regexp specifying the recipient in scan lines for messages we sent. (mh-scan-followup-regexp): Regexp matching a followup subject line, starting with Re: (mh-scan-body-regexp): Regexp matching the message body beginning displayed in scan lines. (mh-scan.font-lock-regexp): Regexp matching output of the the optional scan.font-lock format file. (mh-folder-font-lock-keywords): New font-lock for folder-mode that uses the above regexps. 2001-11-19 chad * mh-comp.el (mh-letter-tool-bar-map): made both references to mh-letter-tool-bar-map conditional on tool-bar-mode, instead of just one. 2001-11-19 Bill Wohler * mh-comp.el (mh-position-on-field): Move to the end of the header if the field is not present. This function was documented to do this, but wasn't doing so. (mh-insert-x-mailer): Simplified by using existing mh-goto-header-field and mh-insert-fields functions. Now that mh-insert-fields is used to insert X-Mailer header field, no longer need to include X-Mailer in mh-x-mailer-string. 2001-11-18 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): New version of mh-letter-mode tool-bar. Changed order of buttons; made customize and info buttons specific to mh-e. * mh-e.el (mh-folder-font-lock-keywords): New font-lock regexp uses variables mh-deleted-msg-regexp, mh-refiled-msg-regexp and mh-cur-scan-msg-regexp, so will better adapt to non-default scan formats. Also, lines marked for refiling are now fontified. 2001-11-18 Bill Wohler * mh-utils.el (mh-show-mode): Added local variable mail-header-separator which is initialized to mh-mail-header-separator. * mh-comp.el (mh-mail-header-separator): Updated to include ^$. Needed when running mh-edit-again, since by then the separator is gone. Added documentation saying one should use mail-header-separator and initialize it from mh-mail-header-separator. (mh-forward): Initialize mail-header-separator since mh-letter-mode hasn't kicked in yet (which does initialize mail-header-separator). (mh-letter-mode): Initialize mail-header-separator from mh-mail-header-separator, not hard-coded string. * mh-comp.el (mh-insert-x-mailer-p): New variable to control whether X-Mailer string is inserted. Default: t. (mh-x-mailer-string): New variable that caches actual X-Mailer string. (mh-letter-mode): Call mh-insert-x-mailer if mh-insert-x-mailer-p is t. (mh-insert-x-mailer): New function that inserts X-Mailer header field. 2001-11-17 Peter S Galbraith * mh-utils.el (mh-letter-header-font-lock): New function to return the entire mail header to font-lock for sedate font-locking. (mh-show-font-lock-keywords): Modified to fontify whole lines and use mh-letter-header-font-lock above to fontify whole header. 2001-11-17 Bill Wohler * mh-comp.el (mail-header-separator): Added ^ and $ to make more specific. (mh-forward, mh-letter-mode): Replaced hard-coded string with mail-header-separator. 2001-11-16 Bill Wohler * mh-e.el (mh-e-RCS-id): Renamed to mh-version. (mh-version): The variable: Set to a number instead of Id since the Id didn't have the mh-e version number, and both Emacs and gnus do it this way too. (mh-version): The function: Fixed for nmh. Now displays mh-e version correctly. Cleaned up output and display mh-progs, etc. (Closes SF #405620.) 2001-11-15 Peter S Galbraith * mh-comp.el (mh-letter-tool-bar-map): New tool-bar support for mh-letter-mode in emacs21. Uses icons from gnus/message.el. * mh-comp.el (mh-letter-mode): Add buffer-local binding of tool-bar-map to mh-letter-tool-bar-map. 2001-11-15 Peter S Galbraith * mh-mime.el (mh-have-file-command): Add check for existence of executable-find command, which Jeffrey didn't exist in emacs-20.4. * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): same as above. * mh-mime.el (mh-file-mime-type): Bug Fix. Some versions of 'file' output a string like "file: Using regular magic file..." to stderr, so discard stderr when using call-process with 'file'. 2001-11-14 Peter S Galbraith * mh-mime.el (mh-have-file-command): Check if 'file' command on system accepts arguments -i -b before accepting it for our use. 2001-11-14 Peter S Galbraith * mh-utils.el (mh-find-progs): Use expand-file-name instead of concatenating together strings into a path. 2001-11-14 Peter S Galbraith * mh-e.el (mh-folder-sequence-menu): Enable mh-widen in sequence menu only when mh-narrowed-to-seq is t. 2001-11-14 Peter S Galbraith * mh-mime.el (mh-have-file-command): Use 'executable-find' instead of more complicated and error-prone call-process to which command. * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): Same change as above. 2001-11-14 Jeffrey C Honig * mh-e.el (mh-make-folder-mode-line): Bug fix. Properly deal with folders that do not have any lines in them. Print "no msgs" instead of "0 msgs". Do not try to print a range when there are no messages. * mh-e.el (mh-regenerate-headers): Bug fix. Catch and remove the "scan: band message list" message. 2001-11-13 Jeffrey C Honig * mh-utils.el (mh-find-progs): Bug fix. Add "mh/etc" to the subdirectories to search for "components". On BSD/OS, nmh is in "/usr/contrib/mh/*". 2001-11-13 Peter S Galbraith * mh-comp.el (mh-letter-mode): Bug fix. Load mh-mime before setting mh-mhn-compose-insert-p (when looking at a "forw: -mime" message containing a MIME composition) such that the variable is properly declared as buffer-local. 2001-11-12 Bill Wohler * mh-funcs.el (mh-print-msg): mhl is in the mh-lib-progs directory, not mh-lib (closes SF #481128). 2001-11-12 Peter S Galbraith * mh-seq.el (mh-widen): Bug fix (closes SF #481036). In a sequence with pending deletes and refiles, running mh-widen would wipe out their notations, even though the sequences are still defined. Fixed by calling a new function, mh-notate-deleted-and-refiled. Also changed the coping of mh-goto-msg-num since it didn't work consistently. * mh-seq.el (mh-notate-deleted-and-refiled): New functions written to fix above mh-widen bug. It's a first cut, we may want to clear all notations first, and notate the current-message sequence and user sequences. Time will tell. 2001-11-12 Peter S Galbraith * mh-seq.el (mh-widen): Make it attempt to stay on the same message number (closes SF bug #480922). 2001-11-11 Bill Wohler * import-emacs: New shell script to import Emacs changes to mh-e. * Makefile (import): New target to import Emacs changes. 2001-11-09 Peter S Galbraith * mh-mime.el (mh-file-mime-type): Bug fix. Change regexp to extract mime type from 'file -i' command output. 2001-11-08 Peter S Galbraith * mh-utils.el (mh-update-sequences-after-mh-show): New customizable variable telling whether to run mh-update-sequences in mh-show-mode. Default is t. * mh-utils.el (mh-show-msg): Run mh-update-sequences when mh-update-sequences-after-mh-show is set. 2001-11-08 Peter S Galbraith * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): New variable telling whether command 'mimedecode' is on system. (http://www.freesoft.org/CIE/FAQ/mimedeco.c) * mh-utils.el (mh-decode-quoted-printable): New customizable variable telling whether to run mimedecode on MIME message containing quoted-printable parts. mimedecode will only alter quoted-printable parts , leaving others intact, and the resulting message is still fully MIME. * mh-utils.el (mh-decode-quoted-printable): New function to run mimedecode on the current buffer. * mh-utils.el (mh-display-msg): Conditionnaly call mh-decode-quoted-printable function if mh-decode-quoted-printable variable is set, to view messages containing quoted-printable characters into 8-bit. 2001-11-08 Peter S Galbraith * mh-comp.el (mh-letter-mode): Set mh-mhn-compose-insert-p if looking at a "forw: -mime" message containing a MIME composition. * mh-mime.el (mh-file-mime-type): Bug fix. Failed on files like "~/.mh_profile" because of shell construct. Wrapped filename with expand-file-name. * mh-comp.el (mh-letter-mode-map): C-cC-o keybinding in mh-letter-mode-map for mh-open-line. 2001-11-07 Peter S Galbraith * mh-comp.el (mh-open-line): New user function to split open a line when editing a reply with included text. * mh-comp.el (mh-current-fill-prefix): New function used by mh-open-line to get the fill-prefix on the current line. * mh-comp.el: Add mh-open-line to mh-letter-mode menubar. 2001-11-06 Peter S Galbraith * mh-seq.el (mh-region-to-sequence): New function, creating a sequence named 'region containing the message list in the selected region. * mh-e.el (mh-delete-msg): Mark messages in region for deletion if mark is active and in transient-mark-mode. * mh-e.el (mh-refile-msg): Mark messages in region for refiling if mark is active and in transient-mark-mode. * mh-e.el (mh-undo): Undo message marks for refile or deletion if region if mark is active and in transient-mark-mode. 2001-11-06 Peter S Galbraith * mh-comp.el (mh-letter-mode): Use sendmail.el's fill-paragraph. Copy its settings for paragraph-start, paragraph-separate, fill-paragraph-function, adaptive-fill-regexp and adaptive-fill-first-line-regexp. This make M-q (fill-paragraph) work correctly! 2001-11-05 Peter S Galbraith * mh-funcs.el (mh-kill-folder): Remove mh-do-not-confirm condition and always prompt the user for such a drastic step. Also change the prompt a bit to clarify it. 2001-11-04 Peter S Galbraith * mh-mime.el (mh-mhn-compose-insert-p): New buffer-local variable to tell when a MIME insertion was done in a letter. * mh-mime.el (mh-mhn-compose-type): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-mhn-compose-external-type): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-mhn-compose-forw): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-edit-mhn): Clear mh-mhn-compose-insert-p. * mh-comp.el (mh-send-letter): Run mh-edit-mhn when mh-mhn-compose-insert-p is set. 2001-11-03 Peter S Galbraith * mh-mime.el (mh-have-file-command): new function testing whether file command is on the system. * mh-mime.el (mh-file-mime-type): new function returning MIME type from file command. * mh-mime.el (mh-mhn-compose-insertion): Make use of mh-file-mime-type function instead of prompting. 2001-10-30 Peter S Galbraith * mh-utils.el (mh-show-use-goto-addr): defcustom this new variable, determining whether to call goto-addr in mh-show-mode. * mh-utils.el (mh-show-mode): Call goto-address when mh-show-use-goto-addr is t. 2001-10-25 Peter S Galbraith * mh-utils.el (mh-recenter): Clarify docs and change '(t) to (list 4) to match elisp doc on what C-u prefix argument actually is. 2001-10-23 Peter S Galbraith * mh-utils.el (mh-summary-height): In my quest to make mh-e more useful out-of-the-box for new users, set mh-summary-height to a minimum of 4 and a maximum of 10 depending on frame height. I typically have 70 lines in my Emacs frame, so having a default of 4 was silly for my case. * mh-e.el (mh-update-sequences): Check for nil value of mh-current-folder, which happens if mh-summary-height < 4 although I haven't tracked doen why that happens. 2001-10-22 Peter S Galbraith * mh-comp.el (mh-insert-fields): Test for nil value when inserting field. 2001-10-20 Peter S Galbraith * mh-comp.el (mh-user-agent-compose): Merged-in from XEmacs-21.4 source * mh-comp.el (mh-letter-mode): Add easy-menu-add statement for XEmacs21 * mh-pick.el (mh-pick-mode): Add easy-menu-add statement for XEmacs21. * mh-e.el (mh-folder-mode): Add easy-menu-add statements for XEmacs21. * mh-utils.el: defalias 'screen-height to 'frame-height for XEmacs21. 2001-10-19 Peter S Galbraith * mh-mime.el (mh-edit-mhn): Use mhbuild in nmh context. * mh-utils.el (mh-find-progs): The variable mh-nmh-p (t when nmh is in use rather than MH) was set assuming that the string "nmh" will be in mh-lib-progs or mh-lib. This failed on Debian systems. Better to check for the existence of mhbuild in directory mh-progs. (closes SF bug #441776) 2001-10-18 Peter S Galbraith * mh-e.el: Add menubar entry from contrib/mh-menubar.el * mh-comp.el: Add menubar entry from contrib/mh-menubar.el * mh-pick.el: Add menubar entry from contrib/mh-menubar.el 2001-07-30 Peter S Galbraith * mh-e.el: Change font-lock patterns for folders. Fontify scan.font-lock patterns (which will be documented) and fontify subject lines prefixed with "Re:" differently. * mh-comp.el (mh-letter-mode): Add font-lock support as in mh-show-mode. 2001-04-14 chad brown Rearrange the font-lock keywords a bit. 2001-04-12 chad brown 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 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 * Makefile (EMACS): Renamed to EMACS_HOME. Also, don't define if EMACS_HOME already exists to give developer a chance to set environment variable. (install): $MH-E-SRC is copied to $(EMACS_HOME)/lisp/mail, not $(EMACS_HOME)/src. (dist): Leave release in current directory. 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. mh-e-8.5/COPYING0000644000175000000620000010451312114520723012430 0ustar wohlerstaff GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . mh-e-8.5/mh-xemacs.el0000644000175000000620000001210612114520723013575 0ustar wohlerstaff;;; mh-xemacs.el --- XEmacs MH-E support ;; Copyright (C) 2001-2006, 2011 Free Software Foundation, Inc. ;; Author: FSF and others (see below) ;; Maintainer: Bill Wohler ;; Keywords: mail ;; See: mh-e.el ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;;; Change Log: ;;; Code: (eval-when-compile (if (fboundp 'define-behavior) (define-behavior 'mh "Emacs interface to the MH mail system. MH is the Rand Mail Handler. Other implementations include nmh and GNU mailutils." :short-doc "Emacs interface to the MH mail system" :group 'internet :commands '(["Read Mail (MH-E)..." (mh-rmail t)])))) ;;; Tool Bar Icons ;; This section contains the tool bar icons that MH-E uses under ;; XEmacs. The XPM files are read from the files, the background ;; color is updated to match XEmacs' background, and the resulting ;; images are added to the association list mh-xemacs-icon-map. (defconst mh-xemacs-has-tool-bar-flag (and (featurep 'toolbar) (featurep 'xpm) (device-on-window-system-p) (boundp 'default-toolbar-visible-p) (fboundp 'toolbar-make-button-list)) "Non-nil means that XEmacs has tool bar support.") ;; TODO Isn't there a built-in icon we can use for this? (defconst mh-xemacs-unknown-icon "/* XPM */ static char * file[] = { \"24 24 6 1\", \": c None s backgroundToolBarColor\", \"# c #011801180102\", \"r c #ff6666\", \"g c #00cc00\", \"b c #6666ff\", \". c #e79de79dd134\", \"::::::::::::::::::::::::\", \"::################::::::\", \"::#...............#:::::\", \"::#................#::::\", \"::#....ggg..........#:::\", \"::#...g..gg..........#::\", \"::#...g.ggg#.........#::\", \"::#...ggggg#.........#::\", \"::#....ggg##.........#::\", \"::#.....###bbbbbbb...#::\", \"::#........b..bbbb#..#::\", \"::#........b.bbbbb#..#::\", \"::#...r....bbbbbbb#..#::\", \"::#...rr...bbbbbbb#..#::\", \"::#...rrr..bbbbbbb#..#::\", \"::#...rrrr..#######..#::\", \"::#...rrrrr..........#::\", \"::#...rrrrrr.........#::\", \"::#...rrrrrrr........#::\", \"::#...########.......#::\", \"::#..................#::\", \"::#..................#::\", \"::####################::\", \":::::::::::::::::::::::::};" "*MH unknown-icon icon.") (defun mh-icon-image (icon &optional background) "Return the XPM image for ICON. Returns nil if ICON.xpm cannot be found in `load-path'. Optional argument BACKGROUND can be used to override transparent background. For tool bars, \"c None s backgroundToolBarColor\" is a good choice." (let ((filename (locate-library (format "%s.xpm" icon)))) (if filename (with-temp-buffer (insert-file-contents-literally filename) (when background (search-forward "c None") (replace-match background)) (buffer-substring (point-min) (point-max))) mh-xemacs-unknown-icon))) ;; TODO Extract names from mh-tool-bar.el. ;; These names are duplicated in the Makefile and mh-tool-bar.el. (defconst mh-xemacs-icon-list '( attach contact copy cut data-save delete help left-arrow mail/compose mail/flag-for-followup mail/inbox mail/move mail/repack mail/reply mail/reply-all mail/reply-from mail/reply-to mail/send next-page open paste preferences refresh right-arrow save search show spell undo zoom-out) "List of icons used by MH-E.") (defvar mh-xemacs-icon-map (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) (background "c None s backgroundToolBarColor")) (loop for icon in mh-xemacs-icon-list collect (cons icon (toolbar-make-button-list (mh-icon-image icon background))))) "Map of GNU Emacs icon file names to XEmacs images.") ;;; Modeline Glyph (defvar mh-modeline-glyph (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) (file-xpm (locate-library "mh-logo.xpm")) (glyph (make-glyph (cond ((and (featurep 'xpm) (device-on-window-system-p) has-modeline-p) `[xpm :file ,file-xpm]) (t [string :data "MH-E"]))))) (set-glyph-face glyph 'modeline-buffer-id) glyph) "Cute little logo to put in the modeline of MH-E buffers.") (provide 'mh-xemacs) ;;; Local Variables: ;;; indent-tabs-mode: nil ;;; sentence-end-double-space: nil ;;; End: ;;; mh-xemacs.el ends here mh-e-8.5/README0000644000175000000620000001117112114520723012252 0ustar wohlerstaff* COPYRIGHT Copyright (C) 2003-2006, 2008, 2009, 2011-2013 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. * INTRODUCTION Thank you for using MH-E 8.5, the newest release of the GNU Emacs front end for MH. This file contains installation directions; the release notes contain important information regarding this release. We encourage you to read these documents before using the software. The release notes for all versions are packaged with MH-E in a file called MH-E-NEWS. Emacs comes prepackaged with MH-E; the files in this package may be more recent however. To ascertain the version of MH-E in your version of Emacs and to determine whether it is necessary to install these files, run the command `M-x mh-version' within Emacs. If this package contains a more recent version of MH-E, read on. MH-E is built into Emacs, so if you check out the Emacs source, then you have no need of this release. You are already running the bleeding edge. This version of MH-E will appear in GNU Emacs 24.4 (unless MH-E is superseded by a newer version before Emacs is released). It is supported in GNU Emacs 23 and higher, as well as XEmacs 21.4.22 and 21.5.31. MH-E is known not to work with GNU Emacs versions 20 and below, and XEmacs version 21.5.9 - 21.5.16. It is compatible with MH versions 6.8.4 and higher, all versions of nmh, and GNU mailutils 1.0 and higher. Gnus is also required; version 5.10 or higher is recommended. * INSTALL ** Extract the tarball. If you don't have GNU tar, use gzip to uncompress the tarball and drop the `z' option. tar xzf mh-e-8.5.tgz ** Compile. It is suggested, but not required, to compile MH-E. To do so, run `make' in the distribution directory: cd mh-e-8.5 make If you run Emacs by any name other than `emacs', use the following instead: cd mh-e-8.5 make EMACS=myemacs For example, Mac users might have to use something like: make EMACS=/Applications/DarwinPorts/Emacs.app/Contents/MacOS/Emacs If `M-x mh-version' shows that your compile- and run-time versions of Gnus are different, then it is likely that you compiled with the wrong version of Emacs. Note that the Makefile assumes an XEmacs variant if `xemacs' appears somewhere in the command name. Otherwise, it is assumed that GNU Emacs is being used. ** Place these files in your load path. Add something like the following to your .emacs: (add-to-list 'load-path (expand-file-name "~/mh-e-8.5/emacs/trunk/lisp/mh-e")) XEmacs users will also have to add this as well: (add-to-list 'load-path (expand-file-name "~/mh-e-8.5")) ** Enable the entry points into MH-E as autoloads. The MH-E entry points are predefined in Emacs 22 and higher. If you are using Emacs 21, which contains old autoload definitions, you *must* add the following to your .emacs to get the updated definitions: (require 'mh-autoloads) If you want to customize MH-E before explicitly loading it, you may optionally add the following to your .emacs as well: (require 'mh-cus-load) ** Read the commentary at the top of mh-e.el. ** Read the release notes in MH-E-NEWS. This is particularly important if you're already using MH-E and the major version number has changed. We don't bump major version numbers in MH-E for marketing reasons; it always means incompatible improvements were made. * BAZAAR MH-E INSTALL After checking out the src module, you must run `make emacs' or just `make' to check out Emacs, which includes MH-E proper, from Savannah. Then follow the steps that apply to you in INSTALL above. Developers should run `make emacs-devel' which checks out Emacs using the $USER environment variable as their Savannah login. * ADDITIONAL INFORMATION ** Documentation Documentation comes in the form of a manual which comes in the following forms: *** info The info pages can be found by running the following command within Emacs: C-h i m mh-e RET If the version of the manual that you get doesn't match this version of MH-E, download the latest version of the manual. See below. *** HTML & PDF An online version of the documentation is available here: http://mh-e.sourceforge.net/manual/ *** Source The source for the documentation can be obtained here: https://sourceforge.net/project/showfiles.php?group_id=13357 With the source, you can build the Info pages, HTML, and PDF. ** Mailing Lists, Bug Reports and Other Support Please read the commentary at the top of `mh-e.el'. Visit http://mh-e.sourceforge.net/ ! Local variables: mode: outline paragraph-separate: "[ ]*$" end: