Article View: comp.mail.mh
Article #2085Re: MH-E customizations?
From: Eric J. Ding
Date: Fri, 12 Jan 1996 00:00
Date: Fri, 12 Jan 1996 00:00
55 lines
2721 bytes
2721 bytes
>>>>> morgan@isp.net (Morgan Fletcher) writes:
> ... using different colors & fonts for different components of the
> message, and causing all URLs to be designated as a "button", in that
> the URL would be colored differently, and a click would launch some web
> browser with that URL.
...
> With these changes, I think mh-e would improve a lot.
These *have* been implemented! =) If you have emacs 19.30, you'll find
that the package goto-addr does exactly what you want. Otherwise, you'll
find goto-addr at the elisp archive (though I'm not sure it's the most
recent version). In fact, browse-url does what you want; goto-addr adds
the functionality of making e-mail addresses "buttons" as well.
As for the different colored headers, I believe this elisp code will do
what you'd like for the header (but I've only tested it with the
font-lock.el that comes with emacs 19.30)...
Eric
;;; Code
(defvar mail-header-keywords
'(
("^[ \t]+\\(.+\\)$"
(1 slate-gray1-normal t))
("^\\([^: ]*\\): \\(.*\\)"
(1 moccasin-bold t)
(2 slate-gray1-normal t))
("^\\(From\\|Sender\\|Reply-To\\|Resent-From\\): \\(.*\\)"
2 light-goldenrod-bold t)
("^\\(To\\|Apparently-To\\|[Cc]c\\|Resent-To\\): \\(.*\\)"
2 light-salmon-bold t)
("^\\(Subject\\): \\(.*\\)" 2 aquamarine-bold t)
("^\\(Newsgroups\\): \\(.*\\)" 2 khaki1-bold t)
)
"Additions to font-lock-keywords for mail headers.")
(defun my-mh-show-mode-x-hook ()
(require 'font-lock)
(let ((font-lock-verbose nil)
(font-lock-keywords-only t))
(let ((font-lock-keywords
(append mail-header-keywords font-lock-keywords)))
(font-lock-fontify-region
(goto-char (point-min))
(re-search-forward "^$" nil t)))))
(if window-system
(add-hook 'mh-show-mode-hook 'my-mh-show-mode-x-hook))
;;; code ends here
Technical Details
Message-ID:
<nhsd98qj5ou.fsf@unca-donald.MIT.EDU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<4cv95v$r89@news2.isp.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fe14c,a3e75c5ea591a139 X-Google-Attributes: gidfe14c,public X-Google-Thread: 106243,a3e75c5ea591a139 X-Google-Attributes: gid106243,public X-Google-Thread: 103b8b,a3e75c5ea591a139 X-Google-Attributes: gid103b8b,public From: ericding@mit.edu (Eric J. Ding) Subject: Re: MH-E customizations? Date: 1996/01/12 Message-ID: <nhsd98qj5ou.fsf@unca-donald.MIT.EDU> X-Deja-AN: 134908973 sender: ericding@unca-donald.MIT.EDU references: <4cv95v$r89@news2.isp.net> cc: morgan@slip.net x-face: Z~3)^x:wz~+J\.2@_+t*U3Gy|[!M`)vi:fn(o2o15zG?T-uy0KT>&T%40fcFqQ>P:<H]IU\ organization: Massachusetts Institute of Technology m&.o;|lwwvg;/,f: )%VYUJ<MlE^8Nmx]n)fRp5"<R<;0Kh)B-h07"!qBG!C6n~:g*jA'>#vJ[<BNJf newsgroups: comp.mail.mh,comp.emacs.xemacs,gnu.emacs.help