+2005-12-19 Bill Wohler <wohler@newt.com>
+
+ * 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 <wohler@newt.com>
* mh-customize.el (mh-toolbar): Rename to mh-tool-bar.
`(require 'cl)
`(eval-when-compile (require 'cl))))
-;;; Macros to generate correct code for different emacs variants
+;; Macros to generate correct code for different emacs variants
(defmacro mh-do-in-gnu-emacs (&rest body)
"Execute BODY if in GNU Emacs."
(provide 'mh-acros)
-;;; Local Variables:
-;;; no-byte-compile: t
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; no-byte-compile: t
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
;; arch-tag: b383b49a-494f-4ed0-a30a-cb6d5d2da4ff
;;; mh-acros.el ends here
; completing-read-multiple.
(eval-when-compile (defvar mail-abbrev-syntax-table))
+\f
+
;;; Autoloads
+
(eval-when (compile load eval)
(ignore-errors
(require 'mailabbrev)
You can update the alias list manually using \\[mh-alias-reload].")
\f
+
;;; Alias Loading
(defun mh-alias-tstamp (arg)
(mh-alias-reload)))
\f
+
;;; Alias Expansion
(defun mh-alias-ali (alias &optional user)
(delete-region begin end)
(insert expansion)))))
\f
+
;;; Adding addresses to alias file.
(defun mh-alias-suggest-alias (string &optional no-comma-swap)
(provide 'mh-alias)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 49879e46-5aa3-4569-bece-e5a58731d690
+;; arch-tag: 49879e46-5aa3-4569-bece-e5a58731d690
;;; mh-alias.el ends here
(defvar mh-mml-mode-default)
(defvar mh-identity-menu)
+\f
;;; Autoloads
+
(autoload 'mail-mode-fill-paragraph "sendmail")
(autoload 'mm-handle-displayed-p "mm-decode")
when this function is called. Also, the hook `sc-pre-hook' is run
before, and `sc-post-hook' is run after the guts of this function.")
+\f
+
;;; Site customization (see also mh-utils.el):
(defvar mh-send-prog "send"
This allows transaction log to be visible if -watch, -verbose or -snoop are
used.")
+\f
+
;;; Scan Line Formats
(defvar mh-note-repl ?-
(put 'mh-letter-mode 'mode-class 'special)
-;;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
+;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
(eval-when-compile (defvar mh-letter-menu nil))
(easy-menu-define
mh-letter-menu mh-letter-mode-map "Menu for MH-E letter mode."
mh-mh-to-mime-undo (equal mh-compose-insertion 'mh)]
["Kill This Draft" mh-fully-kill-draft t]))
+\f
+
;;; Help Messages
-;;; Group messages logically, more or less.
+
+;; Group messages logically, more or less.
(defvar mh-letter-mode-help-messages
'((nil
"Send letter: \\[mh-send-letter]"
(goto-char (point-max))
(mh-letter-next-header-field)))
-;;; Build the letter-mode keymap:
-;;; If this changes, modify mh-letter-mode-help-messages accordingly, above.
+\f
+
+;;; Build mh-letter-mode keymap
+
+;; 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
(provide 'mh-comp)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 62865511-e610-4923-b0b5-f45a8ab70a34
+;; arch-tag: 62865511-e610-4923-b0b5-f45a8ab70a34
;;; mh-comp.el ends here
(require 'mh-init)
(require 'mh-identity))
+;; For compiler warnings...
+(eval-when-compile
+ (defvar mh-show-buffer)
+ (defvar mh-show-folder-buffer))
+
(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
\f
-;;; For compiler warnings...
-(eval-when-compile
- (defvar mh-show-buffer)
- (defvar mh-show-folder-buffer))
-
;;; MH-E Customization Groups
(defgroup mh-e nil
:prefix "mh-"
:group 'mh-e)
+\f
+
;;; Faces
(defgroup mh-folder-faces nil
;;; Scan Line Formats (:group 'mh-scan-line-formats)
-;;; Forward definition to avoid compiler and runtime error.
+;; Forward definition to avoid compiler and runtime error.
(defvar mh-scan-format-file t)
(defun mh-adaptive-cmd-note-flag-check (symbol value)
;;; 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
+;; 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-refile-preserves-sequences-flag t
"*Non-nil means that sequences are preserved when messages are refiled.
;;; Faces (:group 'mh-*-faces + group where faces described)
+\f
+
;;; Faces Used in Scan Listing (:group 'mh-folder-faces)
(defvar mh-folder-body-face 'mh-folder-body
"Face used for the current folder when it has unread messages."
:group 'mh-speed-faces)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 778d2a20-82e2-4276-be9d-309386776a68
+;; arch-tag: 778d2a20-82e2-4276-be9d-309386776a68
;;; mh-customize.el ends here
The string is displayed after the folder's name. nil for no annotation.")
\f
+
;;; Scan Line Formats
-;;; Parameterize MH-E to work with different scan formats. The defaults work
-;;; with the standard MH scan listings, in which the first 4 characters on
-;;; the line are the message number, followed by two places for notations.
+;; Parameterize MH-E to work with different scan formats. The defaults work
+;; with the standard MH scan listings, in which the first 4 characters on
+;; the line are the message number, followed by two places for notations.
;; 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
(defvar mh-colors-available-flag nil) ;Are colors available?
+\f
+
;;; Macros and generic functions:
(defun mh-mapc (function list)
(mh-index-read-data))
(mh-make-folder-mode-line))
-;;; Ensure new buffers won't get this mode if default-major-mode is nil.
+;; Ensure new buffers won't get this mode if default-major-mode is nil.
(put 'mh-folder-mode 'mode-class 'special)
\f
-;;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
-;;; Menus for folder mode: folder, message, sequence (in that order)
-;;; folder-mode "Sequence" menu
+;;; Build mh-folder-mode menu
+
+;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
+;; Menus for folder mode: folder, message, sequence (in that order)
+;; folder-mode "Sequence" menu
(easy-menu-define
mh-folder-sequence-menu mh-folder-mode-map "Menu for MH-E folder-sequence."
'("Sequence"
"--"
["Push State Out to MH" mh-update-sequences t]))
-;;; folder-mode "Message" menu
+;; folder-mode "Message" menu
(easy-menu-define
mh-folder-message-menu mh-folder-mode-map "Menu for MH-E folder-message."
'("Message"
["Unpack Uuencoded Message..." mh-store-msg (mh-get-msg-num nil)]
["Burst Digest Message" mh-burst-digest (mh-get-msg-num nil)]))
-;;; folder-mode "Folder" menu
+;; folder-mode "Folder" menu
(easy-menu-define
mh-folder-folder-menu mh-folder-mode-map "Menu for MH-E folder."
'("Folder"
(mh-visit-folder desktop-buffer-name)
(current-buffer))
-;;; desktop-buffer-mode-handlers appeared in Emacs 22.
+;; desktop-buffer-mode-handlers appeared in Emacs 22.
(if (fboundp 'desktop-buffer-mode-handlers)
(add-to-list 'desktop-buffer-mode-handlers
'(mh-folder-mode . mh-restore-desktop-buffer)))
\f
-;;; Build the folder-mode keymap:
+;;; Build mh-folder-mode keymap:
(suppress-keymap mh-folder-mode-map)
;;; 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.
+;; 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-help-messages
'((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n"
"[d]elete, [o]refile, e[x]ecute,\n"
(provide 'mh-e)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b
+;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b
;;; mh-e.el ends here
(mh-require-cl)
(require 'mh-e)
+\f
+
;;; Scan Line Formats
(defvar mh-note-copied "C"
(defvar mh-note-printed "P"
"Messages that have been printed are marked by this character.")
+\f
+
;;; Functions
;;;###mh-autoload
(provide 'mh-funcs)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 1936c4f1-4843-438e-bc4b-a63bb75a7762
+;; arch-tag: 1936c4f1-4843-438e-bc4b-a63bb75a7762
;;; mh-funcs.el ends here
;;; Code:
-;;; Load libraries in a non-fatal way in order to see if certain functions are
-;;; pre-defined.
+;; Load libraries in a non-fatal way in order to see if certain functions are
+;; pre-defined.
(load "mailabbrev" t t)
(load "mailcap" t t)
(load "mm-decode" t t)
disposition
default)))
-;;; This is mm-save-part from Gnus 5.10 since that function in emacs21.2 is
-;;; buggy (the args to read-file-name are incorrect). When all supported
-;;; versions of Emacs come with at least Gnus 5.10, we can delete this
-;;; function and rename calls to mh-mm-save-part to mm-save-part.
+;; This is mm-save-part from Gnus 5.10 since that function in emacs21.2 is
+;; buggy (the args to read-file-name are incorrect). When all supported
+;; versions of Emacs come with at least Gnus 5.10, we can delete this
+;; function and rename calls to mh-mm-save-part to mm-save-part.
(defun mh-mm-save-part (handle)
"Write HANDLE to a file."
(let ((name (mail-content-type-get (mm-handle-type handle) 'name))
(provide 'mh-gnus)
-;;; Local Variables:
-;;; no-byte-compile: t
-;;; no-update-autoloads: t
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
;; arch-tag: 1e3638af-cad3-4c69-8427-bc8eb6e5e4fa
;;; mh-gnus.el ends here
(provide 'mh-identity)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 07d66ef6-8726-4ac6-9ecf-e566cd5bfb45
+;; arch-tag: 07d66ef6-8726-4ac6-9ecf-e566cd5bfb45
;;; mh-identity.el ends here
(provide 'mh-inc)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835
+;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835
;;; mh-inc.el ends here
;;; Commentary:
-;;; (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-index-search' to get started. That
-;;; documentation will direct you to the specific instructions for your
-;;; particular indexer.
+;; (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-index-search' to get started. That
+;; documentation will direct you to the specific instructions for your
+;; particular indexer.
;;; Change Log:
\f
-;;; 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 checsum program and
-;;; should set mh-checksum-parser to a function which returns a cons cell
-;;; containing the message number and checksum string.
+;; 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 checsum 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)
\f
-;;; Make sure that we don't produce too long a command line.
-
+;; Make sure that we don't produce too long a command line.
(defvar mh-index-max-cmdline-args 500
"Maximum number of command line args.")
(provide 'mh-index)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 607762ad-0dff-4fe1-a27e-6c0dde0dcc47
+;; arch-tag: 607762ad-0dff-4fe1-a27e-6c0dde0dcc47
;;; mh-index ends here
-;;; mh-init.el --- MH-E initialization.
+;;; mh-init.el --- MH-E initialization
;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
(mh-require-cl)
(require 'mh-utils)
-;;; Avoid compiler warnings.
+;; Avoid compiler warnings.
(eval-when-compile (defvar image-load-path))
-;;; Set for local environment:
-;;; mh-progs and mh-lib used to be set in paths.el, which tried to
-;;; figure out at build time which of several possible directories MH
-;;; was installed into. But if you installed MH after building Emacs,
-;;; this would almost certainly be wrong, so now we do it at run time.
+;; Set for local environment:
+;; mh-progs and mh-lib used to be set in paths.el, which tried to
+;; figure out at build time which of several possible directories MH
+;; was installed into. But if you installed MH after building Emacs,
+;; this would almost certainly be wrong, so now we do it at run time.
(defvar mh-progs nil
"Directory containing MH commands, such as inc, repl, and rmm.")
(provide 'mh-init)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
;; arch-tag: e8372aeb-d803-42b1-9c95-3c93ad22f63c
;;; mh-init.el ends here
(provide 'mh-junk)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 603335f1-77ff-4306-8828-5d3dad51abe1
+;; arch-tag: 603335f1-77ff-4306-8828-5d3dad51abe1
;;; mh-junk.el ends here
See also \\[mh-mh-to-mime].")
-;;; Delete mh-minibuffer-read-type and mh-mime-content-types and use
-;;; mml-minibuffer-read-type when Emacs20 is no longer supported unless we
-;;; think (mh-file-mime-type) is better than (mm-default-file-encoding).
+;; Delete mh-minibuffer-read-type and mh-mime-content-types and use
+;; mml-minibuffer-read-type when Emacs20 is no longer supported unless we
+;; think (mh-file-mime-type) is better than (mm-default-file-encoding).
(defun mh-minibuffer-read-type (filename &optional default)
"Return the content type associated with the given FILENAME.
(mm-set-handle-multipart-parameter
handle 'mh-region (cons (point-min-marker) (point-max-marker)))))
-;;; 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.
+;; 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 (mm-handle-multipart-ctl-parameter handle 'gnus-details)))
(provide 'mh-mime)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 0dd36518-1b64-4a84-8f4e-59f422d3f002
+;; arch-tag: 0dd36518-1b64-4a84-8f4e-59f422d3f002
;;; mh-mime.el ends here
(add-text-properties (point) (1- (line-end-position)) '(read-only t))
(goto-char (point-max)))
-;;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
+\f
+
+;;; Build mh-pick-mode menu
+
+;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
(easy-menu-define
mh-pick-menu mh-pick-mode-map "Menu for MH-E pick-mode"
'("Pick"
["Execute the Search" mh-pick-do-search t]))
+\f
+
;;; Help Messages
-;;; Group messages logically, more or less.
+
+;; Group messages logically, more or less.
(defvar mh-pick-mode-help-messages
'((nil
"Search messages using pick: \\[mh-pick-do-search]\n"
\f
;;; Build the pick-mode keymap:
-;;; If this changes, modify mh-pick-mode-help-messages accordingly, above.
+
+;; If this changes, modify mh-pick-mode-help-messages accordingly, above.
(gnus-define-keys mh-pick-mode-map
"\C-c?" mh-help
"\C-c\C-i" mh-index-do-search
(provide 'mh-pick)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: aef2b271-7768-42bd-a782-9a14ba9f83f7
+;; arch-tag: aef2b271-7768-42bd-a782-9a14ba9f83f7
;;; mh-pick.el ends here
(setq mh-ps-print-color-option nil)
(message "Colors will not be printed"))))
-;;; Old non-PS based printing
+;; Old non-PS based printing
;;;###mh-autoload
(defun mh-print-msg (range)
"Print RANGE the old fashioned way\\<mh-folder-mode-map>.
(provide 'mh-print)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
;; arch-tag: 8d84d50b-2a49-4d0d-b51e-ba9c9b6fc679
;;; mh-print.el ends here
;; Shush the byte-compiler
(defvar tool-bar-mode)
+\f
+
;;; Data structures (used in message threading)...
+
(mh-defstruct (mh-thread-message (:conc-name mh-message-)
(:constructor mh-thread-make-message))
(id nil)
message parent children
(real-child-p t))
+\f
;;; Internal 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.")
+\f
+
;;; Maps and hashes...
+
(defvar mh-thread-id-hash nil
"Hashtable used to canonicalize message identifiers.")
(defvar mh-thread-subject-hash nil
\f
-;;; Commands to manipulate sequences. Sequences are stored in an alist
-;;; of the form:
-;;; ((seq-name msgs ...) (seq-name msgs ...) ...)
+;;; Commands to manipulate sequences.
+
+;; Sequences are stored in an alist of the form:
+;; ((seq-name msgs ...) (seq-name msgs ...) ...)
(defvar mh-sequence-history ())
(error "No messages in sequence `%s'" seq))
seq))
+\f
+
;;; Functions to read ranges with completion...
+
(defvar mh-range-seq-names)
(defvar mh-range-history ())
(defvar mh-range-completion-map (copy-keymap minibuffer-local-completion-map))
\f
-;;; Commands to handle new 'subject sequence.
-;;; Or "Poor man's threading" by psg.
+;;; Commands to handle new 'subject sequence ("Poor man's threading" by psg)
-;;; XXX: The function mh-subject-to-sequence-unthreaded uses the magic number
-;;; 41 for the max size of the subject part. Avoiding this would be desirable.
+;; XXX: The function mh-subject-to-sequence-unthreaded uses the magic number
+;; 41 for the max size of the subject part. Avoiding this would be desirable.
(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.
(mh-thread-delete)
(mh-delete-subject)))
+\f
+
;;; Message threading:
(defmacro mh-thread-initialize-hash (var test)
(provide 'mh-seq)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 8e952711-01a2-485b-bf21-c9e3ad4de942
+;; arch-tag: 8e952711-01a2-485b-bf21-c9e3ad4de942
;;; mh-seq.el ends here
(provide 'mh-speed)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: d38ddcd4-3c00-4e37-99bf-8b89dda7b32c
+;; arch-tag: d38ddcd4-3c00-4e37-99bf-8b89dda7b32c
;;; mh-speed.el ends here
(defvar font-lock-defaults)
(defvar mark-active)
+\f
+
;;; Autoloads
+
(autoload 'gnus-article-highlight-citation "gnus-cite")
(autoload 'message-fetch-field "message")
(autoload 'message-tokenize-header "message")
(unless (fboundp 'make-hash-table)
(autoload 'make-hash-table "cl"))
+\f
+
;;; CL Replacements
+
(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
when (equal (aref string index) char) return index
finally return nil))
-;;; Additional header fields that might someday be added:
-;;; "Sender: " "Reply-to: "
+;; Additional header fields that might someday be added:
+;; "Sender: " "Reply-to: "
\f
+
;;; Scan Line Formats
(defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)"
; this number
(part-index-hash (make-hash-table))) ; Avoid incrementing the part number
; for nested messages
-;;; This has to be a macro, since we do: (setf (mh-buffer-data) ...)
+
+;; This has to be a macro, since we do: (setf (mh-buffer-data) ...)
(defmacro mh-buffer-data ()
"Convenience macro to get the MIME data structures of the current buffer."
`(gethash (current-buffer) mh-globals-hash))
(gnus-article-highlight-citation t)
(set-buffer-modified-p modified))))
+\f
+
;;; Internal bookkeeping variables:
;; Cached value of the `Path:' component in the user's MH profile.
;;Non-nil means next SPC or whatever goes to next undeleted message.
(defvar mh-page-to-next-msg-flag nil)
+\f
+
;;; Internal variables local to a folder.
;; Name of current folder, a string.
(cons modeline-buffer-id-left-extent "XEmacs%N:"))
(cons modeline-buffer-id-right-extent " %17b")))))
-;;; This holds a documentation string used by describe-mode.
+;; This holds a documentation string used by describe-mode.
(defun mh-showing-mode (&optional arg)
"Change whether messages should be displayed.
With arg, display messages iff ARG is positive."
;; Showing message with headers or normally.
(defvar mh-showing-with-headers nil)
+\f
+
;;; MH-E macros
(defmacro with-mh-folder-updating (save-modification-flag &rest body)
(mh-expand-file-name folder)
mh-folder-filename)))
-;;; 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.
+;; 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.
(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.
+;; 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-defun-show-buffer mh-show-display-with-external-viewer
mh-display-with-external-viewer)
-;;; Populate mh-show-mode-map
+\f
+
+;;; Build mh-show-mode keymaps
+
(gnus-define-keys mh-show-mode-map
" " mh-show-page-msg
"!" mh-show-refile-or-write-again
["Quit MH-E" mh-quit t]))
-;;; Ensure new buffers won't get this mode if default-major-mode is nil.
+;; Ensure new buffers won't get this mode if default-major-mode is nil.
(put 'mh-show-mode 'mode-class 'special)
;; Avoid compiler warnings in XEmacs and Emacs 20
\f
-;; Picon display
+;;; 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.
+;; 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"
(insert "\n\f\n"))
(buffer-size)))
+\f
+
;;; Issue commands to MH.
(defun mh-exec-cmd (command &rest args)
(provide 'mh-utils)
-;;; Local Variables:
-;;; indent-tabs-mode: nil
-;;; sentence-end-double-space: nil
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
-;;; arch-tag: 1af39fdf-f66f-4b06-9b48-18a7656c8e36
+;; arch-tag: 1af39fdf-f66f-4b06-9b48-18a7656c8e36
;;; mh-utils.el ends here