diff options
Diffstat (limited to 'lisp/mh-e')
-rw-r--r-- | lisp/mh-e/ChangeLog | 65 | ||||
-rw-r--r-- | lisp/mh-e/mh-alias.el | 24 | ||||
-rw-r--r-- | lisp/mh-e/mh-e.el | 408 | ||||
-rw-r--r-- | lisp/mh-e/mh-mime.el | 4 | ||||
-rw-r--r-- | lisp/mh-e/mh-show.el | 16 | ||||
-rw-r--r-- | lisp/mh-e/mh-utils.el | 61 |
6 files changed, 333 insertions, 245 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 3dcf689767a..f484912d490 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,68 @@ +2006-02-19 Bill Wohler <wohler@newt.com> + + * mh-alias.el (mh-address-mail-regexp) + (mh-goto-address-find-address-at-point): Delete copies from + goto-addr.el. + (mh-alias-suggest-alias): Use goto-address-mail-regexp instead of + mh-address-mail-regexp. + (mh-alias-add-address-under-point): Use + goto-address-find-address-at-point instead of + mh-goto-address-find-address-at-point. + + * mh-e.el (mh-show-use-goto-addr-flag): Delete. + + * mh-show.el (mh-show-mode): Mention goto-address-highlight-p in + docstring. + (mh-show-addr): Call goto-address unconditionally. User should use + goto-address-highlight-p instead of mh-show-use-goto-addr-flag. + +2006-02-18 Bill Wohler <wohler@newt.com> + + * mh-e.el (Version, mh-version): Add +cvs to version. + +2006-02-18 Bill Wohler <wohler@newt.com> + + Release MH-E version 7.92. + + * mh-e.el (Version, mh-version): Update for release 7.92. + +2006-02-17 Bill Wohler <wohler@newt.com> + + * mh-e.el (mh-folder-msg-number): Use purple on low-color, light + backgrounds per Mark's suggestion. + + * mh-utils.el (mh-image-load-path): Fix problem that images on + load-path or image-load-path would win over relative paths (newer + MH-E or Emacs distribution). + +2006-02-16 Bill Wohler <wohler@newt.com> + + * mh-e.el (mh-inherit-face-flag): New variable. Non-nil means that + the defface :inherit keyword is available. + (mh-face-data): New variable (contains all face specs) and + function (accessor). + (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number) + (mh-folder-date, mh-folder-deleted, mh-folder-followup) + (mh-folder-msg-number, mh-folder-refiled) + (mh-folder-sent-to-me-hint, mh-folder-sent-to-me-sender) + (mh-folder-subject, mh-folder-tick, mh-folder-to) + (mh-search-folder, mh-letter-header-field, mh-show-cc) + (mh-show-date, mh-show-from) + (mh-show-header, mh-show-pgg-bad, mh-show-pgg-good) + (mh-show-pgg-unknown, mh-show-signature, mh-show-subject) + (mh-show-to, mh-show-xface, mh-speedbar-folder) + (mh-speedbar-folder-with-unseen-messages) + (mh-speedbar-selected-folder) + (mh-speedbar-selected-folder-with-unseen-messages): Use + mh-face-data. + + * mh-utils.el (mh-image-load-path): The variables image-load-path + or load-path would not get updated if user set mh-image-load-path. + Moved tests and add-to-list calls outside of cond so they are + applied consistently, even if they are redundant in some + circumstances. Efficiency isn't a concern here. Made error + messages more user-friendly. + 2006-02-15 Peter S Galbraith <psg@debian.org> * mh-compat.el (mh-image-search-load-path): Compatibility code. diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 9dc2871241f..6dba65d69df 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -35,6 +35,8 @@ (mh-require-cl) +(require 'goto-addr) + (defvar mh-alias-alist 'not-read "Alist of MH aliases.") (defvar mh-alias-blind-alist nil @@ -62,11 +64,6 @@ alias files listed in your \"Aliasfile:\" MH profile component are automatically included. You can update the alias list manually using \\[mh-alias-reload].") -;; Copy of `goto-address-mail-regexp'. -(defvar mh-address-mail-regexp - "[-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" - "A regular expression probably matching an e-mail address.") - ;;; Alias Loading @@ -343,7 +340,7 @@ NO-COMMA-SWAP is non-nil." ((string-match "^\\(.*\\) +<.*>$" string) ;; Some name <somename@foo.bar> -> recurse -> Some name (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) - ((string-match (concat mh-address-mail-regexp " +(\\(.*\\))$") string) + ((string-match (concat goto-address-mail-regexp " +(\\(.*\\))$") string) ;; somename@foo.bar (Some name) -> recurse -> Some name (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) ((string-match "^\\(Dr\\|Prof\\)\\.? +\\(.*\\)" string) @@ -595,24 +592,11 @@ filing messages." (defun mh-alias-add-address-under-point () "Insert an alias for address under point." (interactive) - (let ((address (mh-goto-address-find-address-at-point))) + (let ((address (goto-address-find-address-at-point))) (if address (mh-alias-add-alias nil address) (message "No email address found under point")))) -;; From goto-addr.el, which we don't want to force-load on users. -(defun mh-goto-address-find-address-at-point () - "Find e-mail address around or before point. - -Then search backwards to beginning of line for the start of an -e-mail address. If no e-mail address found, return nil." - (re-search-backward "[^-_A-z0-9.@]" (mh-line-beginning-position) 'lim) - (if (or (looking-at mh-address-mail-regexp) ; already at start - (and (re-search-forward mh-address-mail-regexp - (mh-line-end-position) 'lim) - (goto-char (match-beginning 0)))) - (mh-match-string-no-properties 0))) - (defun mh-alias-apropos (regexp) "Show all aliases or addresses that match a regular expression REGEXP." (interactive "sAlias regexp: ") diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index ab0143c0c85..3dc509c09f0 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -6,7 +6,7 @@ ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> -;; Version: 7.91+cvs +;; Version: 7.92+cvs ;; Keywords: mail ;; This file is part of GNU Emacs. @@ -121,7 +121,7 @@ ;; Try to keep variables local to a single file. Provide accessors if ;; variables are shared. Use this section as a last resort. -(defconst mh-version "7.91+cvs" "Version number of MH-E.") +(defconst mh-version "7.92+cvs" "Version number of MH-E.") ;; Variants @@ -2615,22 +2615,6 @@ message are shown regardless of size." :type 'integer :group 'mh-show) -(defcustom mh-show-use-goto-addr-flag (and (boundp 'goto-address-highlight-p) - goto-address-highlight-p) - "*Non-nil means highlight URLs and email addresses\\<goto-address-highlight-keymap>. - -To send a message using the highlighted email address or to view -the web page for the highlighted URL, use the middle mouse button -or \\[goto-address-at-point]. - -See Info node `(mh-e)Sending Mail' to see how to configure Emacs -to send the message using MH-E. - -The default value of this option comes from the value of -`goto-address-highlight-p'." - :type 'boolean - :group 'mh-show) - (defcustom mh-show-use-xface-flag (>= emacs-major-version 21) "*Non-nil means display face images in MH-show buffers. @@ -2968,6 +2952,8 @@ sequence." (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-")) +;; Temporary function and data structure used for defining faces. +;; These will be unbound after the faces are defined. (defvar mh-min-colors-defined-flag (and (not mh-xemacs-flag) (>= emacs-major-version 22)) "Non-nil means defface supports min-colors display requirement.") @@ -2999,80 +2985,219 @@ colors." (setq new-spec (cons entry new-spec))))) new-spec))) -(defface mh-folder-address '((t (:inherit mh-folder-subject))) +(defvar mh-inherit-face-flag (assq :inherit custom-face-attributes) + "Non-nil means that the `defface' :inherit keyword is available. +The :inherit keyword is available on all supported versions of +GNU Emacs and XEmacs from at least 21.5.23 on.") + +(defvar mh-face-data + '((mh-folder-followup + ((((class color) (background light)) + (:foreground "blue3")) + (((class color) (background dark)) + (:foreground "LightGoldenRod")) + (t + (:bold t)))) + (mh-folder-msg-number + ((((class color) (min-colors 64) (background light)) + (:foreground "snow4")) + (((class color) (min-colors 64) (background dark)) + (:foreground "snow3")) + (((class color) (background light)) + (:foreground "purple")) + (((class color) (background dark)) + (:foreground "cyan")))) + (mh-folder-refiled + ((((class color) (min-colors 64) (background light)) + (:foreground "DarkGoldenrod")) + (((class color) (min-colors 64) (background dark)) + (:foreground "LightGoldenrod")) + (((class color)) + (:foreground "yellow" :weight light)) + (((class grayscale) (background light)) + (:foreground "Gray90" :bold t :italic t)) + (((class grayscale) (background dark)) + (:foreground "DimGray" :bold t :italic t)) + (t + (:bold t :italic t)))) + (mh-folder-subject + ((((class color) (background light)) + (:foreground "blue4")) + (((class color) (background dark)) + (:foreground "yellow")) + (t + (:bold t)))) + (mh-folder-tick + ((((class color) (background light)) + (:background "#dddf7e")) + (((class color) (background dark)) + (:background "#dddf7e")) + (t + (:underline t)))) + (mh-folder-to + ((((class color) (min-colors 64) (background light)) + (:foreground "RosyBrown")) + (((class color) (min-colors 64) (background dark)) + (:foreground "LightSalmon")) + (((class color)) + (:foreground "green")) + (((class grayscale) (background light)) + (:foreground "DimGray" :italic t)) + (((class grayscale) (background dark)) + (:foreground "LightGray" :italic t)) + (t + (:italic t)))) + (mh-letter-header-field + ((((class color) (background light)) + (:background "gray90")) + (((class color) (background dark)) + (:background "gray10")) + (t + (:bold t)))) + (mh-search-folder + ((((class color) (background light)) + (:foreground "dark green" :bold t)) + (((class color) (background dark)) + (:foreground "indian red" :bold t)) + (t + (:bold t)))) + (mh-show-cc + ((((class color) (min-colors 64) (background light)) + (:foreground "DarkGoldenrod")) + (((class color) (min-colors 64) (background dark)) + (:foreground "LightGoldenrod")) + (((class color)) + (:foreground "yellow" :weight light)) + (((class grayscale) (background light)) + (:foreground "Gray90" :bold t :italic t)) + (((class grayscale) (background dark)) + (:foreground "DimGray" :bold t :italic t)) + (t + (:bold t :italic t)))) + (mh-show-date + ((((class color) (min-colors 64) (background light)) + (:foreground "ForestGreen")) + (((class color) (min-colors 64) (background dark)) + (:foreground "PaleGreen")) + (((class color)) + (:foreground "green")) + (((class grayscale) (background light)) + (:foreground "Gray90" :bold t)) + (((class grayscale) (background dark)) + (:foreground "DimGray" :bold t)) + (t + (:bold t :underline t)))) + (mh-show-from + ((((class color) (background light)) + (:foreground "red3")) + (((class color) (background dark)) + (:foreground "cyan")) + (t + (:bold t)))) + (mh-show-header + ((((class color) (min-colors 64) (background light)) + (:foreground "RosyBrown")) + (((class color) (min-colors 64) (background dark)) + (:foreground "LightSalmon")) + (((class color)) + (:foreground "green")) + (((class grayscale) (background light)) + (:foreground "DimGray" :italic t)) + (((class grayscale) (background dark)) + (:foreground "LightGray" :italic t)) + (t + (:italic t)))) + (mh-show-pgg-bad ((t (:bold t :foreground "DeepPink1")))) + (mh-show-pgg-good ((t (:bold t :foreground "LimeGreen")))) + (mh-show-pgg-unknown ((t (:bold t :foreground "DarkGoldenrod2")))) + (mh-show-signature ((t (:italic t)))) + (mh-show-to + ((((class color) (background light)) + (:foreground "SaddleBrown")) + (((class color) (background dark)) + (:foreground "burlywood")) + (((class grayscale) (background light)) + (:foreground "DimGray" :underline t)) + (((class grayscale) (background dark)) + (:foreground "LightGray" :underline t)) + (t (:underline t)))) + (mh-speedbar-folder + ((((class color) (background light)) + (:foreground "blue4")) + (((class color) (background dark)) + (:foreground "light blue")))) + (mh-speedbar-selected-folder + ((((class color) (background light)) + (:foreground "red1" :underline t)) + (((class color) (background dark)) + (:foreground "red1" :underline t)) + (t + (:underline t)))))) + +(defun mh-face-data (face &optional inherit) + "Return spec for FACE. +If INHERIT is non-nil and `defface' supports the :inherit +keyword, return INHERIT literally; otherwise, return spec for FACE. + +This isn't a perfect implementation. In the case that +the :inherit keyword is not supported, any additional attributes +in the inherit parameter are not added to the returned spec." + (if (and inherit mh-inherit-face-flag) + inherit + (mh-defface-compat (cadr (assoc face mh-face-data))))) + +(defface mh-folder-address + (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) "Recipient face." :group 'mh-faces :group 'mh-folder) (defface mh-folder-body - '((((class color)) - (:inherit mh-folder-msg-number)) - (t - (:inherit mh-folder-msg-number :italic t))) + (mh-face-data 'mh-folder-msg-number + '((((class color)) + (:inherit mh-folder-msg-number)) + (t + (:inherit mh-folder-msg-number :italic t)))) "Body text face." :group 'mh-faces :group 'mh-folder) (defface mh-folder-cur-msg-number - '((t - (:inherit mh-folder-msg-number :bold t))) + (mh-face-data 'mh-folder-msg-number + '((t (:inherit mh-folder-msg-number :bold t)))) "Current message number face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-date '((t (:inherit mh-folder-msg-number))) +(defface mh-folder-date + (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) "Date face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-deleted '((t (:inherit mh-folder-msg-number))) +(defface mh-folder-deleted + (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) "Deleted message face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-followup - '((((class color) (background light)) - (:foreground "blue3")) - (((class color) (background dark)) - (:foreground "LightGoldenRod")) - (t - (:bold t))) +(defface mh-folder-followup (mh-face-data 'mh-folder-followup) "\"Re:\" face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-msg-number - (mh-defface-compat - '((((class color) (min-colors 64) (background light)) - (:foreground "snow4")) - (((class color) (min-colors 64) (background dark)) - (:foreground "snow3")) - (((class color)) - (:foreground "cyan")))) - +(defface mh-folder-msg-number (mh-face-data 'mh-folder-msg-number) "Message number face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-refiled - (mh-defface-compat - '((((class color) (min-colors 64) (background light)) - (:foreground "DarkGoldenrod")) - (((class color) (min-colors 64) (background dark)) - (:foreground "LightGoldenrod")) - (((class color)) - (:foreground "yellow" :weight light)) - (((class grayscale) (background light)) - (:foreground "Gray90" :bold t :italic t)) - (((class grayscale) (background dark)) - (:foreground "DimGray" :bold t :italic t)) - (t - (:bold t :italic t)))) +(defface mh-folder-refiled (mh-face-data 'mh-folder-refiled) "Refiled message face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-sent-to-me-hint '((t (:inherit mh-folder-date))) +(defface mh-folder-sent-to-me-hint + (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date)))) "Fontification hint face in messages sent directly to us. The detection of messages sent to us is governed by the scan format `mh-scan-format-nmh' and the regular expression @@ -3080,7 +3205,8 @@ format `mh-scan-format-nmh' and the regular expression :group 'mh-faces :group 'mh-folder) -(defface mh-folder-sent-to-me-sender '((t (:inherit mh-folder-followup))) +(defface mh-folder-sent-to-me-sender + (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup)))) "Sender face in messages sent directly to us. The detection of messages sent to us is governed by the scan format `mh-scan-format-nmh' and the regular expression @@ -3088,212 +3214,122 @@ format `mh-scan-format-nmh' and the regular expression :group 'mh-faces :group 'mh-folder) -(defface mh-folder-subject - '((((class color) (background light)) - (:foreground "blue4")) - (((class color) (background dark)) - (:foreground "yellow")) - (t - (:bold t))) +(defface mh-folder-subject (mh-face-data 'mh-folder-subject) "Subject face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-tick - '((((class color) (background dark)) - (:background "#dddf7e")) - (((class color) (background light)) - (:background "#dddf7e")) - (t - (:underline t))) +(defface mh-folder-tick (mh-face-data 'mh-folder-tick) "Ticked message face." :group 'mh-faces :group 'mh-folder) -(defface mh-folder-to - (mh-defface-compat - '((((class color) (min-colors 64) (background light)) - (:foreground "RosyBrown")) - (((class color) (min-colors 64) (background dark)) - (:foreground "LightSalmon")) - (((class color)) - (:foreground "green")) - (((class grayscale) (background light)) - (:foreground "DimGray" :italic t)) - (((class grayscale) (background dark)) - (:foreground "LightGray" :italic t)) - (t - (:italic t)))) +(defface mh-folder-to (mh-face-data 'mh-folder-to) "\"To:\" face." :group 'mh-faces :group 'mh-folder) -(defface mh-search-folder - '((((class color) (background light)) - (:foreground "dark green" :bold t)) - (((class color) (background dark)) - (:foreground "indian red" :bold t)) - (t - (:bold t))) - "Folder heading face in MH-Folder buffers created by searches." - :group 'mh-faces - :group 'mh-search) - -(defface mh-letter-header-field - '((((class color) (background light)) - (:background "gray90")) - (((class color) (background dark)) - (:background "gray10")) - (t - (:bold t))) +(defface mh-letter-header-field (mh-face-data 'mh-letter-header-field) "Editable header field value face in draft buffers." :group 'mh-faces :group 'mh-letter) -(defface mh-show-cc - (mh-defface-compat - '((((class color) (min-colors 64) (background light)) - (:foreground "DarkGoldenrod")) - (((class color) (min-colors 64) (background dark)) - (:foreground "LightGoldenrod")) - (((class color)) - (:foreground "yellow" :weight light)) - (((class grayscale) (background light)) - (:foreground "Gray90" :bold t :italic t)) - (((class grayscale) (background dark)) - (:foreground "DimGray" :bold t :italic t)) - (t - (:bold t :italic t)))) +(defface mh-search-folder (mh-face-data 'mh-search-folder) + "Folder heading face in MH-Folder buffers created by searches." + :group 'mh-faces + :group 'mh-search) + +(defface mh-show-cc (mh-face-data 'mh-show-cc) "Face used to highlight \"cc:\" header fields." :group 'mh-faces :group 'mh-show) -(defface mh-show-date - (mh-defface-compat - '((((class color) (min-colors 64) (background light)) - (:foreground "ForestGreen")) - (((class color) (min-colors 64) (background dark)) - (:foreground "PaleGreen")) - (((class color)) - (:foreground "green")) - (((class grayscale) (background light)) - (:foreground "Gray90" :bold t)) - (((class grayscale) (background dark)) - (:foreground "DimGray" :bold t)) - (t - (:bold t :underline t)))) +(defface mh-show-date (mh-face-data 'mh-show-date) "Face used to highlight \"Date:\" header fields." :group 'mh-faces :group 'mh-show) -(defface mh-show-from - '((((class color) (background light)) - (:foreground "red3")) - (((class color) (background dark)) - (:foreground "cyan")) - (t - (:bold t))) +(defface mh-show-from (mh-face-data 'mh-show-from) "Face used to highlight \"From:\" header fields." :group 'mh-faces :group 'mh-show) -(defface mh-show-header - (mh-defface-compat - '((((class color) (min-colors 64) (background light)) - (:foreground "RosyBrown")) - (((class color) (min-colors 64) (background dark)) - (:foreground "LightSalmon")) - (((class color)) - (:foreground "green")) - (((class grayscale) (background light)) - (:foreground "DimGray" :italic t)) - (((class grayscale) (background dark)) - (:foreground "LightGray" :italic t)) - (t - (:italic t)))) +(defface mh-show-header (mh-face-data 'mh-show-header) "Face used to deemphasize less interesting header fields." :group 'mh-faces :group 'mh-show) -(defface mh-show-pgg-bad '((t (:bold t :foreground "DeepPink1"))) +(defface mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad) "Bad PGG signature face." :group 'mh-faces :group 'mh-show) -(defface mh-show-pgg-good '((t (:bold t :foreground "LimeGreen"))) +(defface mh-show-pgg-good (mh-face-data 'mh-show-pgg-good) "Good PGG signature face." :group 'mh-faces :group 'mh-show) -(defface mh-show-pgg-unknown '((t (:bold t :foreground "DarkGoldenrod2"))) +(defface mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown) "Unknown or untrusted PGG signature face." :group 'mh-faces :group 'mh-show) -(defface mh-show-signature '((t (:italic t))) +(defface mh-show-signature (mh-face-data 'mh-show-signature) "Signature face." :group 'mh-faces :group 'mh-show) -(defface mh-show-subject '((t (:inherit mh-folder-subject))) +(defface mh-show-subject + (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) "Face used to highlight \"Subject:\" header fields." :group 'mh-faces :group 'mh-show) -(defface mh-show-to - '((((class color) (background light)) - (:foreground "SaddleBrown")) - (((class color) (background dark)) - (:foreground "burlywood")) - (((class grayscale) (background light)) - (:foreground "DimGray" :underline t)) - (((class grayscale) (background dark)) - (:foreground "LightGray" :underline t)) - (t (:underline t))) +(defface mh-show-to (mh-face-data 'mh-show-to) "Face used to highlight \"To:\" header fields." :group 'mh-faces :group 'mh-show) -(defface mh-show-xface '((t (:inherit (mh-show-from highlight)))) - "X-Face image face. +(defface mh-show-xface + (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight))))) + +"X-Face image face. The background and foreground are used in the image." :group 'mh-faces :group 'mh-show) -(defface mh-speedbar-folder - '((((class color) (background light)) - (:foreground "blue4")) - (((class color) (background dark)) - (:foreground "light blue"))) +(defface mh-speedbar-folder (mh-face-data 'mh-speedbar-folder) "Basic folder face." :group 'mh-faces :group 'mh-speedbar) (defface mh-speedbar-folder-with-unseen-messages - '((t - (:inherit mh-speedbar-folder :bold t))) + (mh-face-data 'mh-speedbar-folder + '((t (:inherit mh-speedbar-folder :bold t)))) "Folder face when folder contains unread messages." :group 'mh-faces :group 'mh-speedbar) (defface mh-speedbar-selected-folder - '((((class color) (background light)) - (:foreground "red1" :underline t)) - (((class color) (background dark)) - (:foreground "red1" :underline t)) - (t - (:underline t))) + (mh-face-data 'mh-speedbar-selected-folder) "Selected folder face." :group 'mh-faces :group 'mh-speedbar) (defface mh-speedbar-selected-folder-with-unseen-messages - '((t - (:inherit mh-speedbar-selected-folder :bold t))) + (mh-face-data 'mh-speedbar-selected-folder + '((t (:inherit mh-speedbar-selected-folder :bold t)))) "Selected folder face when folder contains unread messages." :group 'mh-faces :group 'mh-speedbar) +;; Get rid of temporary functions and data structures. +(fmakunbound 'mh-defface-compat) +(fmakunbound 'mh-face-data) +(makunbound 'mh-face-data) +(makunbound 'mh-inherit-face-flag) +(makunbound 'mh-min-colors-defined-flag) + (provide 'mh-e) ;; Local Variables: diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index b35b1e6aace..4b0ce65cf5d 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -1741,9 +1741,9 @@ Returns nil if file command not on system." ("application/x-zip" "\.sxw" "application/vnd.sun.xml.writer") ("application/x-zip" "\.odg" "application/vnd.oasis.opendocument.graphics") ("application/x-zip" "\.odi" "application/vnd.oasis.opendocument.image") - ("application/x-zip" "\.odp" + ("application/x-zip" "\.odp" "application/vnd.oasis.opendocument.presentation") - ("application/x-zip" "\.ods" + ("application/x-zip" "\.ods" "application/vnd.oasis.opendocument.spreadsheet") ("application/x-zip" "\.odt" "application/vnd.oasis.opendocument.text")) "Substitutions to make for Content-Type returned from file command. diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index ab636ae8ab6..3ae609d9204 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el @@ -36,13 +36,13 @@ (require 'mh-e) (require 'mh-scan) +(require 'font-lock) (require 'gnus-cite) (require 'gnus-util) +(require 'goto-addr) (autoload 'mh-make-buffer-data "mh-mime") ;can't be automatically generated -(require 'font-lock) - ;;; MH-Folder Commands @@ -818,6 +818,13 @@ operation." (define-derived-mode mh-show-mode text-mode "MH-Show" "Major mode for showing messages in MH-E.\\<mh-show-mode-map> +Email addresses and URLs in the message are highlighted if the +option `goto-address-highlight-p' is on, which it is by default. +To view the web page for a highlighted URL or to send a message +using a highlighted email address, use the middle mouse button or +\\[goto-address-at-point]. See Info node `(mh-e)Sending Mail' to +see how to configure Emacs to send the message using MH-E. + The hook `mh-show-mode-hook' is called upon entry to this mode. See also `mh-folder-mode'. @@ -877,10 +884,7 @@ See also `mh-folder-mode'. ;;;###mh-autoload (defun mh-show-addr () "Use `goto-address'." - (when mh-show-use-goto-addr-flag - (mh-require 'goto-addr nil t) - (if (fboundp 'goto-address) - (goto-address)))) + (goto-address)) ;;;###mh-autoload (defun mh-gnus-article-highlight-citation () diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index bf0d29fd2a7..c00558860d1 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -96,10 +96,11 @@ This variable is used by that function to avoid doing the work repeatedly.") "Ensure that the MH-E images are accessible by `find-image'. Images for MH-E are found in \"../../etc/images\" relative to the -files in \"lisp/mh-e\". This function saves the actual location -found in the variable `mh-image-load-path'. If the images on your -system are actually located elsewhere, then set the variable -`mh-image-load-path' before starting MH-E. +files in \"lisp/mh-e\", in `image-load-path', or in `load-path'. +This function saves the actual location found in the variable +`mh-image-load-path'. If the images on your system are actually +located elsewhere, then set the variable `mh-image-load-path' +before starting MH-E. If `image-load-path' exists (since Emacs 22), then the contents of the variable `mh-image-load-path' is added to it if isn't @@ -110,40 +111,38 @@ already there. See also variable `mh-image-load-path-called-flag'." (unless mh-image-load-path-called-flag (cond - ((and mh-image-load-path - (file-exists-p (expand-file-name "mh-logo.xpm" - mh-image-load-path)))) - ;; User setting exists. We're done. - ((and mh-image-load-path - (not (file-exists-p (expand-file-name "mh-logo.xpm" - mh-image-load-path)))) - ;; User setting does not exist. - (message "Variable mh-image-load-path %s does not contain MH-E images" - mh-image-load-path)) - ((mh-image-search-load-path "mh-logo.xpm") - ;; Emacs 22 already knows where the images are. - (setq mh-image-load-path - (file-name-directory (mh-image-search-load-path "mh-logo.xpm")))) - ((locate-library "mh-logo.xpm") - ;; Other Emacs already knows where the images are... - (setq mh-image-load-path - (file-name-directory (locate-library "mh-logo.xpm")))) - (t - ;; Guess `mh-image-load-path' if it wasn't provided by the user. - (let (mh-library-name) + (mh-image-load-path) ; user setting exists + ((let (mh-library-name) ; try relative setting ;; First, find mh-e in the load-path. (setq mh-library-name (locate-library "mh-e")) (if (not mh-library-name) (error "Can not find MH-E in load-path")) + ;; And then set mh-image-load-path relative to that. (setq mh-image-load-path (expand-file-name (concat (file-name-directory mh-library-name) - "../../etc/images")))) - (if (not (file-exists-p mh-image-load-path)) - (error "Can not find image directory %s" mh-image-load-path)) - (if (boundp 'image-load-path) - (add-to-list 'image-load-path mh-image-load-path) - (add-to-list 'load-path mh-image-load-path)))) + "../../etc/images"))) + (file-exists-p (expand-file-name "mh-logo.xpm" mh-image-load-path)))) + ((mh-image-search-load-path "mh-logo.xpm") + ;; Images in image-load-path. + (setq mh-image-load-path + (file-name-directory (mh-image-search-load-path "mh-logo.xpm")))) + ((locate-library "mh-logo.xpm") + ;; Images in load-path. + (setq mh-image-load-path + (file-name-directory (locate-library "mh-logo.xpm"))))) + + (if (not (file-exists-p mh-image-load-path)) + (error "Directory %s in mh-image-load-path does not exist" + mh-image-load-path)) + (if (not (file-exists-p + (expand-file-name "mh-logo.xpm" mh-image-load-path))) + (error "Directory %s in mh-image-load-path does not contain MH-E images" + mh-image-load-path)) + (if (boundp 'image-load-path) + (add-to-list 'image-load-path mh-image-load-path) + (add-to-list 'load-path mh-image-load-path)) + (setq mh-image-load-path-called-flag t))) ;;;###mh-autoload |