(defvar mh-scan-msg-format-string "%d"
"This is a format string for width of the message number in a scan format.
-Use `0%d' for zero-filled message numbers. This variable is only
+Use \"0%d\" for zero-filled message numbers. This variable is only
consulted if `mh-scan-format-file' is set to \"Use MH-E scan
Format\".")
(defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]"
"This regular expression matches a particular message.
-It is a format string; use `%d' to represent the location of the
+It is a format string; use \"%d\" to represent the location of the
message number within the expression as in the default of
\"^[^0-9]*%d[^0-9]\".")
(defvar mh-note-seq ?%
"Messages in a user-defined sequence are marked by this character.
-Messages in the `search' sequence are marked by this character as
+Messages in the \"search\" sequence are marked by this character as
well.")
\f
(eval-and-compile
;; Otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite'
(defvar mh-show-font-lock-keywords
- '(("^\\(From:\\|Sender:\\)\\(.*\\)" (1 'default) (2 mh-show-from-face))
- (mh-header-to-font-lock (0 'default) (1 mh-show-to-face))
- (mh-header-cc-font-lock (0 'default) (1 mh-show-cc-face))
+ '(("^\\(From:\\|Sender:\\)\\(.*\\)"
+ (1 'default)
+ (2 'mh-show-from))
+ (mh-header-to-font-lock
+ (0 'default)
+ (1 'mh-show-to))
+ (mh-header-cc-font-lock
+ (0 'default)
+ (1 'mh-show-cc))
("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$"
- (1 'default) (2 mh-show-from-face))
- (mh-header-subject-font-lock (0 'default) (1 mh-show-subject-face))
+ (1 'default)
+ (2 'mh-show-from))
+ (mh-header-subject-font-lock
+ (0 'default)
+ (1 'mh-show-subject))
("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)"
- (1 'default) (2 mh-show-cc-face))
+ (1 'default)
+ (2 'mh-show-cc))
("^\\(In-reply-to\\|Date\\):\\(.*\\)$"
- (1 'default) (2 mh-show-date-face))
- (mh-letter-header-font-lock (0 mh-show-header-face append t)))
- "Additional expressions to highlight in MH-show mode."))
+ (1 'default)
+ (2 'mh-show-date))
+ (mh-letter-header-font-lock
+ (0 'mh-show-header append t)))
+ "Additional expressions to highlight in MH-Show buffers."))
(defvar mh-show-font-lock-keywords-with-cite
(eval-when-compile
(beginning-of-line) (end-of-line)
(2 font-lock-constant-face nil t)
(4 font-lock-comment-face nil t)))))))
- "Additional expressions to highlight in MH-show mode.")
+ "Additional expressions to highlight in MH-Show buffers.")
(defvar mh-letter-font-lock-keywords
`(,@mh-show-font-lock-keywords-with-cite
- (mh-font-lock-field-data (1 'mh-letter-header-field prepend t))))
+ (mh-font-lock-field-data
+ (1 'mh-letter-header-field prepend t)))
+ "Additional expressions to highlight in MH-Letter buffers.")
(defun mh-show-font-lock-fontify-region (beg end loudly)
"Limit font-lock in `mh-show-mode' to the header.
If the buffer we start in is still visible and DONT-RETURN is nil
then switch to it after that."
`(defun ,function ()
- ,(format "Calls %s from the message's folder.\n%s\nSee `%s' for more info.\n"
+ ,(format "Calls %s from the message's folder.\n%s\nSee \"%s\" for more info.\n"
original-function
(if dont-return ""
"When function completes, returns to the show buffer if it is
(mh-do-in-xemacs (defvar default-enable-multibyte-characters))
+(defmacro mh-face-foreground-compat (face &optional frame inherit)
+ "Return the foreground color name of FACE, or nil if unspecified.
+See documentation for `face-foreground' for a description of the
+arguments FACE, FRAME, and INHERIT.
+
+Calls `face-foreground' correctly in older environments. Versions
+of Emacs prior to version 22 lacked an INHERIT argument which
+when t tells `face-foreground' to consider an inherited value for
+the foreground if the face does not define one itself."
+ (if (>= emacs-major-version 22)
+ `(face-foreground ,face ,frame ,inherit)
+ `(face-foreground ,face ,frame)))
+
+(defmacro mh-face-background-compat (face &optional frame inherit)
+ "Return the background color name of face, or nil if unspecified.
+See documentation for `back-foreground' for a description of the
+arguments FACE, FRAME, and INHERIT.
+
+Calls `face-background' correctly in older environments. Versions
+of Emacs prior to version 22 lacked an INHERIT argument which
+when t tells `face-background' to consider an inherited value for
+the background if the face does not define one itself."
+ (if (>= emacs-major-version 22)
+ `(face-background ,face ,frame ,inherit)
+ `(face-background ,face ,frame)))
+
(defun mh-face-display-function ()
"Display a Face, X-Face, or X-Image-URL header field.
If more than one of these are present, then the first one found
(mh-funcall-if-exists
insert-image (create-image
raw type t
- :foreground (face-foreground 'mh-show-xface)
- :background (face-background 'mh-show-xface))
- " ")))
+ :foreground
+ (mh-face-foreground-compat 'mh-show-xface nil t)
+ :background
+ (mh-face-background-compat 'mh-show-xface nil t))
+ " ")))
;; XEmacs
(mh-do-in-xemacs
(cond
;; Initialize mh-sub-folders-cache...
(defun mh-collect-folder-names ()
- "Collect folder names by running `flists'."
+ "Collect folder names by running \"flists\"."
(unless mh-flists-process
(setq mh-flists-process
(mh-exec-cmd-daemon "folders" 'mh-collect-folder-names-filter
This variable should never be set.")
(defvar mh-folder-completion-map (copy-keymap minibuffer-local-completion-map))
-(define-key mh-folder-completion-map " " 'minibuffer-complete)
+(define-key mh-folder-completion-map " " 'minibuffer-complete) ;Why???
(defvar mh-speed-flists-inhibit-flag nil)
(let ((new-file-flag
(not (file-exists-p (mh-expand-file-name folder-name)))))
(cond ((and new-file-flag
+ can-create
(y-or-n-p
(format "Folder %s does not exist. Create it? "
folder-name)))
(mh-speed-add-folder folder-name))
(message "Creating %s...done" folder-name))
(new-file-flag
- (error "Folder %s is not created" folder-name))
+ (error "Folder %s does not exist" folder-name))
((not (file-directory-p (mh-expand-file-name folder-name)))
(error "\"%s\" is not a directory"
(mh-expand-file-name folder-name)))))
"PROCESS daemon that puts OUTPUT into a temporary buffer.
Any output from the process is displayed in an asynchronous
pop-up window."
- (set-buffer (get-buffer-create mh-log-buffer))
- (insert-before-markers output)
- (display-buffer mh-log-buffer))
+ (with-current-buffer (get-buffer-create mh-log-buffer)
+ (insert-before-markers output)
+ (display-buffer mh-log-buffer)))
(defun mh-exec-cmd-quiet (raise-error command &rest args)
"Signal RAISE-ERROR if COMMAND with ARGS fails.