1. xemacs
  2. mh-e

Commits

youngs  committed a8882ea

2003-01-08 Steve Youngs <youngs@xemacs.org>

* Makefile (AUTHOR_VERSION): Bump to version 7.1.
(ELCS): Add mh-alias.elc, mh-customize.elc, mh-identity.elc.
(EXTRA_SOURCES): Add mh-loaddefs.el
(REQUIRES): Add sh-script, fsf-compat.

  • Participants
  • Parent commits f75ce2f
  • Branches default

Comments (0)

Files changed (19)

File ChangeLog

View file
+2003-01-08  Steve Youngs  <youngs@xemacs.org>
+
+	* Makefile (AUTHOR_VERSION): Bump to version 7.1.
+	(ELCS): Add mh-alias.elc, mh-customize.elc, mh-identity.elc.
+	(EXTRA_SOURCES): Add mh-loaddefs.el
+	(REQUIRES): Add sh-script, fsf-compat.
+
 2003-01-03  Steve Youngs  <youngs@xemacs.org>
 
 	* Makefile (REQUIRES): Add rmail tm apel.

File ChangeLog.upstream

View file
+2003-01-07  Bill Wohler  <wohler@newt.com>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <mdb@gnu.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* mh-index.el (mh-namazu-execute-search): Fix bug in documentation.
+
+2002-12-28  Bill Wohler  <wohler@newt.com>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* 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  <psg@debian.org>
+
+	* 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  <psg@debian.org>
+
+	* 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  <psg@debian.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* mh-alias.el (mh-alias-add-alias): Bug fix. 
+
+2002-12-19  Peter S Galbraith  <psg@debian.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* 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  <psg@debian.org>
+
+	* mh-loaddefs.el: Regenerated.
+
+	* mh-customize.el (mh-customize): Add ;;;###mh-autoload tag.
+
+2002-12-04  Peter S Galbraith  <psg@debian.org>
+
+	* 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  <psg@debian.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <mdb@gnu.org>
+
+	* mh-e.el (recursive-load-depth-limit): Only modify the limit
+	if it is an integer.
+
+2002-12-04  Peter S Galbraith  <psg@debian.org>
+
+	* mh-utils.el (mh-header-field-beginning): New function. Move to
+	the beginning of the current header field.
+
+2002-12-04  Satyaki Das  <satyaki@theforce.stanford.edu>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <wohler@newt.com>
+
+	* Makefile (MH-E-SRC, emacs): 
+
+2002-12-03  Satyaki Das  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* 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  <wohler@newt.com>
+
+	* mh-customize.el (mh-show-threads-flag): Alphabetized.
+
+2002-12-03  Jeffrey C Honig  <jch@honig.net>
+
+	* Makefile: Moved .PHONY rule after all rule for compatibility
+	with BSD/OS's old pmake.
+
+2002-12-03  Mark D Baushke  <mdb@gnu.org>
+
+	* 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  <psg@debian.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <mdb@gnu.org>
+
+	* 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  <psg@debian.org>
+
+	* 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  <wohler@newt.com>
+
+	* Makefile (mh-loaddefs.el): Suppress creation of backup file.
+
+2002-12-02  Mark D. Baushke  <mdb@gnu.org>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <satyaki@theforce.stanford.edu>
+
+	* 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  <psg@debian.org>
+
+	* 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  <wohler@newt.com>
+
+	* 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  <wohler@newt.com>
 
 	* Released MH-E version 7.0.
 	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
+	(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.

File MH-E-NEWS

View file
+* 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
 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

File Makefile

View file
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.16
-AUTHOR_VERSION = 7.0
+AUTHOR_VERSION = 7.1
 MAINTAINER = Steve Youngs <mh-e-devel@lists.sf.net>
 PACKAGE = mh-e
 PKG_TYPE = regular
-REQUIRES = gnus mail-lib xemacs-base speedbar rmail tm apel
+REQUIRES = gnus mail-lib xemacs-base speedbar rmail tm apel sh-script fsf-compat
 CATEGORY = standard
 
 ELCS =  mh-comp.elc mh-e.elc mh-funcs.elc mh-mime.elc mh-pick.elc mh-index.elc \
-        mh-seq.elc mh-speed.elc mh-utils.elc mh-xemacs-compat.elc
+        mh-seq.elc mh-speed.elc mh-utils.elc mh-xemacs-compat.elc mh-alias.elc \
+	mh-customize.elc mh-identity.elc 
 
-EXTRA_SOURCES = ChangeLog.upstream COPYING MH-E-NEWS README
+EXTRA_SOURCES = ChangeLog.upstream COPYING MH-E-NEWS README mh-loaddefs.el
 
 INFO_FILES = mh-e.info*
 HTML_FILES = $(PACKAGE)*.html

File README

View file
 If you don't have GNU tar, use gzip to uncompress the tarball and drop
 the `z' option.
 
-	tar xzf mh-e-7.0.tgz
+	tar xzf mh-e-7.1.tgz
 
 ** Compile.
 
 It is suggested, but not required, to compile MH-E. To do so, run
 `make' in the distribution directory:
 
-	cd mh-e-7.0
+	cd mh-e-7.1
 	make
 
 If you run Emacs by any name other than `emacs', use the following
 instead:
 
-	cd mh-e-7.0
+	cd mh-e-7.1
 	make EMACS=myemacs
 
 Note that the Makefile assumes an XEmacs variant if `xemacs' appears
 load path, or you could add something like the following to your
 .emacs:
 
-	(add-to-list 'load-path (expand-file-name "~/mh-e-7.0"))
+	(add-to-list 'load-path (expand-file-name "~/mh-e-7.1"))
 
 ** Read the commentary at the top of mh-e.el.
 

File mh-alias.el

View file
+;;; mh-alias.el --- MH-E mail alias completion and expansion
+;;
+;; Copyright (C) 1994, 1995, 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+ 
+;; Author: Peter S. Galbraith <psg@debian.org>
+;; Maintainer: Bill Wohler <wohler@newt.com>
+;; 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 2, 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:
+
+;;  [To be deleted when documented in MH-E manual.]
+;;
+;;  This module provides mail alias completion when entering addresses.
+;;
+;;  Use the TAB key to complete aliases (and optionally local usernames) when
+;;  initially composing a message in the To: and Cc: minibuffer prompts. You
+;;  may enter multiple addressees separated with a comma (but do *not* add any
+;;  space after the comma).
+;;
+;;  In the header of a message draft, use "M-TAB (mh-letter-complete)" to
+;;  complete aliases. This is useful when you want to add an addressee as an
+;;  afterthought when creating a message, or when adding an additional
+;;  addressee to a reply.
+;;
+;;  By default, completion is case-insensitive. This can be changed by
+;;  customizing the variable `mh-alias-completion-ignore-case-flag'. This is
+;;  useful, for example, to differentiate between people aliases in lowercase
+;;  such as:
+;;
+;;    p.galbraith: Peter Galbraith <GalbraithP@dfo-mpo.gc.ca>
+;;
+;;  and lists in uppercase such as:
+;;
+;;    MH-E: MH-E mailing list <mh-e-devel@lists.sourceforge.net>
+;;
+;;  Note that this variable affects minibuffer completion only. If you have an
+;;  alias for P.Galbraith and type in p.galbraith at the prompt, it will still
+;;  be expanded in the letter buffer because MH is case-insensitive.
+;;
+;;  When you press ", (mh-alias-minibuffer-confirm-address)" after an alias in
+;;  the minibuffer, the expansion for the previous mail alias appears briefly.
+;;  To inhibit this, customize the variable `mh-alias-flash-on-comma'.
+;;
+;;  The addresses and aliases entered in the minibuffer are added to the
+;;  message draft. To expand the aliases before they are added to the draft,
+;;  customize the variable `mh-alias-expand-aliases-flag'.
+;;
+;;  Completion is also performed on usernames extracted from the /etc/passwd
+;;  file. This can be a handy tool on a machine where you and co-workers
+;;  exchange messages, but should probably be disabled on a system with
+;;  thousands of users you don't know. This is done by customizing the
+;;  variable `mh-alias-local-users'. This variable also takes a string which
+;;  is executed to generate the password file. For example, you'd use "ypcat
+;;  passwd" for NIS.
+;;
+;;  Aliases are loaded the first time you send mail and get the "To:" prompt
+;;  and whenever a source of aliases changes. Sources of system aliases are
+;;  defined in the customization variable `mh-alias-system-aliases' and
+;;  include:
+;;
+;;    /etc/nmh/MailAliases
+;;    /usr/lib/mh/MailAliases
+;;    /etc/passwd
+;;
+;;  Sources of personal aliases are read from the files listed in your MH
+;;  profile component Aliasfile. Multiple files are separated by white space
+;;  and are relative to your mail directory.
+;;
+;;  Alias Insertions
+;;  ~~~~~~~~~~~~~~~~
+;;  There are commands to insert new aliases into your alias file(s) (defined
+;;  by the `Aliasfile' component in the .mh_profile file or by the variable
+;;  `mh-alias-insert-file').  In particular, there is a tool-bar icon to grab
+;;  an alias from the From line of the current message.
+
+;;; Code:
+
+(require 'mh-e)
+(load "cmr" t t)                        ; Non-fatal dependency for
+					; completing-read-multiple.
+(eval-when-compile (defvar mail-abbrev-syntax-table))
+
+;;; Autoloads
+(autoload 'mail-abbrev-complete-alias "mailabbrev")
+(autoload 'multi-prompt "multi-prompt")
+
+(defvar mh-alias-alist nil
+  "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 nil)
+(if mh-alias-read-address-map
+    ()
+  (setq mh-alias-read-address-map
+	(copy-keymap minibuffer-local-completion-map))
+  (if mh-alias-flash-on-comma
+      (define-key mh-alias-read-address-map
+	"," 'mh-alias-minibuffer-confirm-address))
+  (define-key mh-alias-read-address-map " " 'self-insert-command))
+
+
+;;; Alias Loading
+
+(defun mh-alias-tstamp (arg)
+  "Check whether alias files have been modified.
+Return t if any file listed in the MH profile component Aliasfile 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 MH profile component Aliasfile 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-local-users ()
+  "Return an alist of local users from /etc/passwd."
+  (let (passwd-alist)
+    (save-excursion
+      (set-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-int (match-string 2)) 200)
+            (let* ((username (match-string 1))
+                   (gecos-name (match-string 3))
+                   (realname
+                    (if (string-match "&" gecos-name)
+                        (concat
+                         (substring gecos-name 0 (match-beginning 0))
+                         (capitalize username)
+                         (substring gecos-name (match-end 0)))
+                      gecos-name)))
+              (setq passwd-alist
+                    (cons (list username
+                                (if (string-equal "" realname)
+                                    (concat "<" username ">")
+                                  (concat realname " <" username ">")))
+                          passwd-alist))))))
+        (forward-line 1)))
+    passwd-alist))
+
+;;;###mh-autoload
+(defun mh-alias-reload ()
+  "Load MH aliases into `mh-alias-alist'."
+  (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 (assoc-ignore-case (match-string 1) mh-alias-blind-alist))
+          (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 (assoc-ignore-case (match-string 1) mh-alias-alist))
+          (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 (assoc-ignore-case (car user) mh-alias-alist))
+            (setq mh-alias-alist (append mh-alias-alist (list user))))
+        (setq local-users (cdr local-users)))))
+  (message "Loading MH aliases...done"))
+
+(defun mh-alias-reload-maybe ()
+  "Load new MH aliases."
+  (if (or (not mh-alias-alist)		; Doesn't exist, so create it.
+          (mh-alias-tstamp nil))        ; Out of date, so recreate it.
+      (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."
+  (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-backward-char 1))
+    (buffer-substring (point-min)(point-max))))
+
+(defun mh-alias-expand (alias)
+  "Return expansion for ALIAS.
+Blind aliases or users from /etc/passwd are not expanded."
+  (cond
+   ((assoc-ignore-case alias mh-alias-blind-alist)
+    alias)                              ; Don't expand a blind alias
+   ((assoc-ignore-case alias mh-alias-passwd-alist)
+    (cadr (assoc-ignore-case alias mh-alias-passwd-alist)))
+   (t
+    (mh-alias-ali alias))))
+
+;;;###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
+            (or (cond
+                 ((fboundp 'completing-read-multiple)
+                  (completing-read-multiple prompt mh-alias-alist nil nil))
+                 ((featurep 'multi-prompt)
+                  (multi-prompt "," nil prompt mh-alias-alist nil nil))
+                 (t
+                  (split-string
+                   (completing-read "To: " mh-alias-alist nil nil)
+                   ","))))))
+      (if (not mh-alias-expand-aliases-flag)
+          (mapconcat 'identity the-answer ", ")
+        ;; Loop over all elements, checking if in passwd aliast 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)
+  (if (not mh-alias-flash-on-comma)
+      ()
+    (save-excursion
+      (let* ((case-fold-search t)
+             (the-name (buffer-substring
+                        (progn (skip-chars-backward " \t")(point))
+                        ;; This moves over to previous comma, if any
+                        (progn (or (and (not (= 0 (skip-chars-backward "^,")))
+                                        ;; the skips over leading whitespace
+                                        (skip-chars-forward " "))
+                                   ;; no comma, then to beginning of word
+                                   (skip-chars-backward "^ \t"))
+                               ;; In Emacs21, the beginning of the prompt
+                               ;; line is accessible, which wasn't the case
+                               ;; in emacs20.  Skip over it.
+                               (if (looking-at "^[^ \t]+:")
+                                   (skip-chars-forward "^ \t"))
+                               (skip-chars-forward " ")
+                               (point)))))
+        (if (assoc-ignore-case the-name mh-alias-alist)
+            (message "%s -> %s" the-name (mh-alias-expand the-name))
+          ;; Check if if 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 ((mail-abbrevs mh-alias-alist))
+    (mail-abbrev-complete-alias))
+  (when mh-alias-expand-aliases-flag
+    (let* ((end (point))
+           (syntax-table (syntax-table))
+           (beg (unwind-protect
+                    (save-excursion
+                      (set-syntax-table mail-abbrev-syntax-table)
+                      (backward-word 1)
+                      (point))
+                  (set-syntax-table syntax-table)))
+           (alias (buffer-substring beg end))
+           (expansion (mh-alias-expand alias)))
+      (delete-region beg end)
+      (insert expansion))))
+
+;;; Adding addresses to alias file.
+
+(defun mh-alias-suggest-alias (string)
+  "Suggest an alias for STRING."
+  (cond
+   ((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" <somename@foo.bar>  -> recurse -> "Some name"
+    (mh-alias-suggest-alias (match-string 1 string)))
+   ((string-match "^\\(.*\\) +<.*>$" string)
+    ;; Some name <somename@foo.bar>  -> recurse -> Some name
+    (mh-alias-suggest-alias (match-string 1 string)))
+   ((string-match (concat mh-address-mail-regexp " +(\\(.*\\))$") string)
+    ;; somename@foo.bar (Some name)  -> recurse -> Some name
+    (mh-alias-suggest-alias (match-string 1 string)))
+   ((string-match "^\\(Dr\\|Prof\\)\\.? +\\(.*\\)" string)
+    ;; Strip out title
+    (mh-alias-suggest-alias (match-string 2 string)))
+   ((string-match "^\\(.*\\), +\\(Jr\\.?\\|II+\\)$" string)
+    ;; Strip out tails with comma
+    (mh-alias-suggest-alias (match-string 1 string)))
+   ((string-match "^\\(.*\\) +\\(Jr\\.?\\|II+\\)$" string)
+    ;; Strip out tails
+    (mh-alias-suggest-alias (match-string 1 string)))
+   ((string-match "^\\(\\sw+\\) +[A-Z]\\.? +\\(.*\\)$" string)
+    ;; Strip out initials
+    (mh-alias-suggest-alias
+     (format "%s %s" (match-string 1 string) (match-string 2 string))))
+   ((string-match "^\\([^,]+\\), +\\(.*\\)$" string)
+    ;; Reverse order of comma-separated fields
+    (mh-alias-suggest-alias
+     (format "%s %s" (match-string 2 string) (match-string 1 string))))
+   (t
+    ;; Output string, with spaces replaced by dots.
+    (downcase (replace-regexp-in-string
+               "\\.\\.+" "."
+               (replace-regexp-in-string " +" "." string))))))
+
+(defun mh-alias-which-file-has-alias (alias file-list)
+  "Return the name of writable file which defines ALIAS from list FILE-LIST."
+  (save-excursion
+    (set-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) ":"))
+              (setq found (car file-list)
+                    the-list nil)
+            (setq the-list (cdr the-list)))))
+      found)))
+
+(defun mh-alias-insert-file (&optional alias)
+  "Return the alias file to write a new entry for ALIAS in.
+Use variable `mh-alias-insert-file' if non-nil, else use AliasFile component
+value.
+If ALIAS is specified and it already exists, try to return 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 [press Tab]: "
+                           (mapcar 'list mh-alias-insert-file) nil t)
+        (or (mh-alias-which-file-has-alias alias mh-alias-insert-file)
+            (completing-read "Alias file [press Tab]: "
+                             (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 set AliasFile in your .mh_profile file"))
+       ((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 [press Tab]: "
+                         (mapcar 'list autolist) nil t))
+       (t
+        (or (mh-alias-which-file-has-alias alias autolist)
+            (completing-read "Alias file [press Tab]: "
+                             (mapcar 'list autolist) nil t))))))))
+
+(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.
+      ;; For the comma-separated aliases reyurned by ali, check that one of
+      ;; them doesn't expand into a list.  e.g. we do have an individual
+      ;; alias for that adress.
+      (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-from-has-no-alias-p ()
+  "Return t is From has no current alias set."
+  (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))
+      (not (mh-alias-address-to-alias (mh-extract-from-header-value))))))
+
+(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 ALIAS matches exactly, prompt to [i]nsert before old value or [a]ppend
+after it."
+  (if (not file)
+      (setq file (mh-alias-insert-file alias)))
+  (save-excursion
+    (set-buffer (find-file-noselect file))
+    (goto-char (point-min))
+    (let ((alias-search (concat alias ":"))
+          (letter)
+          (here (point))
+          (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 "Exists for %s; [i]nsert, [a]ppend: "
+                               (match-string 1))))
+              (case-fold-search t))
+          (cond ((string-match "^i" answer))
+                ((string-match "^a" answer)
+                 (forward-line 1))
+                (t
+                 error "Quitting."))))
+       ;; 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)))
+
+;;;###mh-autoload
+(defun mh-alias-add-alias (alias address)
+  "*Add ALIAS for ADDRESS in personal alias file.
+Prompts for confirmation if the address already has an alias.
+If the alias is already is use, `mh-alias-add-alias-to-file' will prompt."
+  (interactive "P\nP")
+  (mh-alias-reload-maybe)
+  (setq alias (completing-read "Alias: " mh-alias-alist nil nil alias))
+  (setq address (read-string "Address: " 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 ADDRESS in personal alias file.
+Prompts for confirmation if the alias is already in use or if the address
+already has an alias."
+  (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 (mh-extract-from-header-value))
+           (alias (mh-alias-suggest-alias address)))
+      (mh-alias-add-alias alias address))))
+
+;;;###mh-autoload
+(defun mh-alias-add-address-under-point ()
+  "Insert an alias for email address under point."
+  (interactive)
+  (let ((address (mh-goto-address-find-address-at-point)))
+    (if address
+        (mh-alias-add-alias nil address)
+      (message "No email address found under point."))))
+
+(provide 'mh-alias)
+
+;;; Local Variables:
+;;; indent-tabs-mode: nil
+;;; sentence-end-double-space: nil
+;;; End:
+
+;;; mh-alias.el ends here

File mh-comp.el

View file
 ;;; Code:
 
 (require 'mh-e)
-(require 'mh-utils)
 (require 'gnus-util)
 (require 'easymenu)
 (require 'cl)
 (defvar font-lock-defaults)
 (defvar mark-active)
 (defvar sendmail-coding-system)
-(defvar tool-bar-mode)
+(defvar mh-identity-list)
+(defvar mh-identity-default)
+(defvar mh-identity-menu)
 
-;;; autoloads from mh-mime
-(autoload 'mh-press-button "mh-mime")
-
-;;; autoloads for mh-seq
-(autoload 'mh-notate-seq "mh-seq")
-
-(autoload 'mh-compose-insertion "mh-mime"
-  "Add a MIME directive to insert a file, using mhn or gnus.
-If the variable mh-compose-insertion is set to 'mhn, then that will be used.
-If it is set to 'gnus, then that will be used instead.")
-
-(autoload 'mh-compose-forward "mh-mime"
-  "Add a MIME directive to forward a message, using mhn or gnus.
-If the variable mh-compose-insertion is set to 'mhn, then that will be used.
-If it is set to 'gnus, then that will be used instead.")
-
-(autoload 'mh-mhn-compose-insertion "mh-mime"
-  "Add a directive to insert a MIME message part from a file.
-This is the typical way to insert non-text parts in a message.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-mhn-compose-anon-ftp "mh-mime"
-  "Add a directive for a MIME anonymous ftp external body part.
-This directive tells MH to include a reference to a
-message/external-body part retrievable by anonymous FTP.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-mhn-compose-external-compressed-tar "mh-mime"
-  "Add a directive to include a MIME reference to a compressed tar file.
-The file should be available via anonymous ftp.  This directive
-tells MH to include a reference to a message/external-body part.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-mhn-compose-forw "mh-mime"
-  "Add a forw directive to this message, to forward a message with MIME.
-This directive tells MH to include another message in this one.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-edit-mhn "mh-mime"
-  "Format the current draft for MIME, expanding any mhn directives.
-Process the current draft with the mhn program, which,
-using directives already inserted in the draft, fills in
-all the MIME components and header fields.
-This step should be done last just before sending the message.
-The mhn program is part of MH version 6.8 or later.
-The \\[mh-revert-mhn-edit] command undoes this command.
-For assistance with creating mhn directives to insert
-various types of components in a message, see
-\\[mh-mhn-compose-insertion] (generic insertion from a file),
-\\[mh-mhn-compose-anon-ftp] (external reference to file via anonymous ftp),
-\\[mh-mhn-compose-external-compressed-tar] \
-\(reference to compressed tar file via anonymous ftp), and
-\\[mh-mhn-compose-forw] (forward message)." t)
-
-(autoload 'mh-revert-mhn-edit "mh-mime"
-  "Undoes the effect of \\[mh-edit-mhn] by reverting to the backup file.
-Optional non-nil argument means don't ask for confirmation." t)
-
-(autoload 'mh-mml-to-mime "mh-mime"
-  "Compose MIME message from mml directives.")
-
-(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.")
-
-(autoload 'mh-mml-attach-file "mh-mime"
-  "Attach a file to the outgoing MIME message.
-The file is not inserted or encoded until you send the message with
-`\\[message-send-and-exit]' or `\\[message-send]'.
-
-Message dispostion is \"inline\" is INLINE is non-nil, else the default is
-\"attachment\".
-FILE is the name of the file to attach.  TYPE is its content-type, a
-string of the form \"type/subtype\".  DESCRIPTION is a one-line
-description of the attachment.")
-
-(autoload 'mh-mml-secure-message-sign-pgpmime "mh-mime"
-  "Add MML tag to encrypt/sign the entire message.")
-
-(autoload 'mh-mml-secure-message-encrypt-pgpmime "mh-mime"
-  "Add MML tag to encrypt and sign the entire message.
-If called with a prefix argument, only encrypt (do NOT sign).")
-
-;;; Other Autoloads.
-
+;;; Autoloads
 (autoload 'Info-goto-node "info")
 (autoload 'mail-mode-fill-paragraph "sendmail")
 (autoload 'mm-handle-displayed-p "mm-decode")
 
 ;;; Site customization (see also mh-utils.el):
 
-(defgroup mh-compose nil
-  "MH-E functions for composing messages."
-  :prefix "mh-"
-  :group 'mh)
-
 (defvar mh-send-prog "send"
   "Name of the MH send program.
 Some sites need to change this because of a name conflict.")
 `mh-yank-from-start-of-msg' to 'supercite or, for more automatic insertion,
 to 'autosupercite.")
 
-;;; Personal preferences:
-
-(defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn)
-  "Use either 'gnus or 'mhn to insert MIME message directives in messages."
-  :type '(choice (const :tag "Use gnus" gnus)
-                 (const :tag "Use mhn"  mhn))
-  :group 'mh-compose)
-
-(defcustom mh-x-face-file "~/.face"
-  "*File name containing the encoded X-Face string to insert in outgoing mail.
-If nil, or the file does not exist, nothing is added to message headers."
-  :type 'file
-  :group 'mh-compose)
-
-(defcustom mh-insert-x-mailer-flag t
-  "*Non-nil means append an X-Mailer field to the header."
-  :type 'boolean
-  :group 'mh-compose)
-
-(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.")
-
-(defcustom mh-insert-mail-followup-to-flag t
-  "Non-nil means maybe 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'."
-  :type 'boolean
-  :group 'mh-compose)
-
-(defcustom mh-insert-mail-followup-to-list nil
-  "Alist of addresses for which a Mail-Followup-To field is inserted.
-Each element has the form (REGEXP ADDRESS).
-When the REGEXP appears in the To or cc fields of a message, the corresponding
-ADDRESS is inserted in a Mail-Followup-To field.
-
-Here's a customization example:
-
-  regexp: mh-e-users@lists.s\\\\(ourceforge\\\\|f\\\\).net
- address: mh-e-users@lists.sourceforge.net
-
-This corresponds to:
-
-  (setq mh-insert-mail-followup-to-list
-	'((\"mh-e-users@lists.s\\\\(ourceforge\\\\|f\\\\).net\"
-	   \"mh-e-users@lists.sourceforge.net\")))
-
-While it might be tempting to add a descriptive name to the mailing list
-address, consider that this field will appear in other people's outgoing
-mail in their To: field.  It might be best to keep it simple."
-  :type '(repeat (list (string :tag "regexp") (string :tag "address")))
-  :group 'mh-compose)
-
-(defcustom mh-delete-yanked-msg-window-flag nil
-  "*Non-nil means delete any window displaying the message.
-Controls window display when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
-If non-nil, yanking the current message into a draft letter deletes any
-windows displaying the message."
-  :type 'boolean
-  :group 'mh-compose)
-
-(defcustom mh-yank-from-start-of-msg 'attribution
-  "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
-If t, include the entire message, with full headers.  This is historically
-here for use with supercite, but is now deprecated in favor of the setting
-`supercite' below.