diff options
| author | Bill Wohler | 2006-01-01 18:51:18 +0000 |
|---|---|---|
| committer | Bill Wohler | 2006-01-01 18:51:18 +0000 |
| commit | d49ed7d4bc39227447297f960f497f1b51552cec (patch) | |
| tree | d2976f6fb595258a4d6a2efca4123dda28181d64 | |
| parent | bb951f0e9e5930e053f8491e419ad59a821fed34 (diff) | |
| download | emacs-d49ed7d4bc39227447297f960f497f1b51552cec.tar.gz emacs-d49ed7d4bc39227447297f960f497f1b51552cec.zip | |
* mh-customize.el: Sync docstrings with manual for faces and sort them
alphabetically.
(mh-faces): Move below mh-hooks. (mh-folder-faces, mh-index-faces,
mh-letter-faces)
(mh-show-faces, mh-speed-faces): Delete. Organize faces like hooks.
(mh-speed-update-interval): Fix group (mh-speedbar, not mh-speed).
(facemenu-unlisted-faces): Might as well ignore all MH-E faces.
(mh-folder-body-face, mh-folder-cur-msg-face)
(mh-folder-cur-msg-number-face, mh-folder-date-face)
(mh-folder-followup-face, mh-folder-msg-number-face)
(mh-folder-deleted-face, mh-folder-refiled-face)
(mh-folder-subject-face, mh-folder-address-face)
(mh-folder-scan-format-face, mh-folder-to-face) (mh-index-folder-face,
mh-show-cc-face, mh-show-date-face) (mh-show-header-face,
mh-show-pgg-good-face) (mh-show-pgg-unknown-face,
mh-show-pgg-bad-face)
(mh-show-to-face, mh-show-from-face, mh-show-subject-face): Delete.
(mh-folder-cur-msg): Unused. Delete.
(mh-folder-address): Use defface; inherit from mh-folder-subject.
(mh-folder-body, mh-folder-cur-msg-number, mh-folder-date): Inherit
from mh-folder-msg-number.
(mh-folder-deleted): Use defface. Inherit from mh-folder-msg-number.
(mh-folder-sent-to-me-hint): New face. Inherit from mh-folder-date.
(mh-folder-sent-to-me-sender): Rename from mh-folder-scan-format. Use
defface. Inherit from mh-folder-followup.
(mh-show-xface): Inherit from mh-show-from and highlight.
(bw-face-generation, bw-toggle-faces)
(bw-new-face-to-old, bw-old-face-to-new): New (tempoarary) variables,
functions for toggling between old and new faces.
* mh-e.el (font-lock-auto-fontify, font-lock-defaults): Hide in
eval-when-compile. We should probably do this throughout.
(mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp)
(mh-scan-refiled-msg-regexp, mh-scan-cur-msg-number-regexp)
(mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp)
(mh-scan-subject-regexp): Sync docstrings with manual
(mh-scan-format-regexp): Rename to mh-scan-sent-to-me-sender-regexp.
Drop date parenthesized expression. Make expression more like the
others (anchored at the beginning of line). Sync docstrings with
manual.
(mh-folder-font-lock-keywords): Use faces directly rather than -face
variables. Use mh-scan-sent-to-me-sender-regexp instead of
mh-scan-format-regexp, and within that expression, use faces
mh-folder-sent-to-me-hint and mh-folder-sent-to-me-sender instead of
mh-folder-date-face and mh-folder-scan-format-face which were
misleading.
* mh-mime.el (mh-mime-security-button-face): Use faces directly rather
than -face variables.
* mh-utils.el (mh-show-font-lock-keywords): Use faces directly rather
than -face variables.
(mh-face-foreground-compat, mh-face-background-compat): New macros.
(mh-face-display-function): Use mh-face-foreground-compat and
mh-face-background-compat to use inherited attributes of mh-show-xface
on Emacs 22 while still working on Emacs 21.
| -rw-r--r-- | lisp/mh-e/ChangeLog | 63 | ||||
| -rw-r--r-- | lisp/mh-e/mh-customize.el | 493 | ||||
| -rw-r--r-- | lisp/mh-e/mh-e.el | 106 | ||||
| -rw-r--r-- | lisp/mh-e/mh-init.el | 7 | ||||
| -rw-r--r-- | lisp/mh-e/mh-mime.el | 11 | ||||
| -rw-r--r-- | lisp/mh-e/mh-utils.el | 70 |
6 files changed, 427 insertions, 323 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 74fd15a2c19..4f3d56f98c9 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,66 @@ | |||
| 1 | 2006-01-01 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | * mh-customize.el: Sync docstrings with manual for faces and sort | ||
| 4 | them alphabetically. | ||
| 5 | (mh-faces): Move below mh-hooks. | ||
| 6 | (mh-folder-faces, mh-index-faces, mh-letter-faces) | ||
| 7 | (mh-show-faces, mh-speed-faces): Delete. Organize faces like | ||
| 8 | hooks. | ||
| 9 | (mh-speed-update-interval): Fix group (mh-speedbar, not mh-speed). | ||
| 10 | (facemenu-unlisted-faces): Might as well ignore all MH-E faces. | ||
| 11 | (mh-folder-body-face, mh-folder-cur-msg-face) | ||
| 12 | (mh-folder-cur-msg-number-face, mh-folder-date-face) | ||
| 13 | (mh-folder-followup-face, mh-folder-msg-number-face) | ||
| 14 | (mh-folder-deleted-face, mh-folder-refiled-face) | ||
| 15 | (mh-folder-subject-face, mh-folder-address-face) | ||
| 16 | (mh-folder-scan-format-face, mh-folder-to-face) | ||
| 17 | (mh-index-folder-face, mh-show-cc-face, mh-show-date-face) | ||
| 18 | (mh-show-header-face, mh-show-pgg-good-face) | ||
| 19 | (mh-show-pgg-unknown-face, mh-show-pgg-bad-face) | ||
| 20 | (mh-show-to-face, mh-show-from-face, mh-show-subject-face): | ||
| 21 | Delete. | ||
| 22 | (mh-folder-cur-msg): Unused. Delete. | ||
| 23 | (mh-folder-address): Use defface; inherit from mh-folder-subject. | ||
| 24 | (mh-folder-body, mh-folder-cur-msg-number, mh-folder-date): | ||
| 25 | Inherit from mh-folder-msg-number. | ||
| 26 | (mh-folder-deleted): Use defface. Inherit from | ||
| 27 | mh-folder-msg-number. | ||
| 28 | (mh-folder-sent-to-me-hint): New face. Inherit from | ||
| 29 | mh-folder-date. | ||
| 30 | (mh-folder-sent-to-me-sender): Rename from mh-folder-scan-format. | ||
| 31 | Use defface. Inherit from mh-folder-followup. | ||
| 32 | (mh-show-xface): Inherit from mh-show-from and highlight. | ||
| 33 | (bw-face-generation, bw-toggle-faces) | ||
| 34 | (bw-new-face-to-old, bw-old-face-to-new): New (tempoarary) | ||
| 35 | variables, functions for toggling between old and new faces. | ||
| 36 | |||
| 37 | * mh-e.el (font-lock-auto-fontify, font-lock-defaults): Hide in | ||
| 38 | eval-when-compile. We should probably do this throughout. | ||
| 39 | (mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp) | ||
| 40 | (mh-scan-refiled-msg-regexp, mh-scan-cur-msg-number-regexp) | ||
| 41 | (mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp) | ||
| 42 | (mh-scan-subject-regexp): Sync docstrings with manual | ||
| 43 | (mh-scan-format-regexp): Rename to | ||
| 44 | mh-scan-sent-to-me-sender-regexp. Drop date parenthesized | ||
| 45 | expression. Make expression more like the others (anchored at the | ||
| 46 | beginning of line). Sync docstrings with manual. | ||
| 47 | (mh-folder-font-lock-keywords): Use faces directly rather than | ||
| 48 | -face variables. Use mh-scan-sent-to-me-sender-regexp instead of | ||
| 49 | mh-scan-format-regexp, and within that expression, use faces | ||
| 50 | mh-folder-sent-to-me-hint and mh-folder-sent-to-me-sender instead | ||
| 51 | of mh-folder-date-face and mh-folder-scan-format-face which were | ||
| 52 | misleading. | ||
| 53 | |||
| 54 | * mh-mime.el (mh-mime-security-button-face): Use faces directly | ||
| 55 | rather than -face variables. | ||
| 56 | |||
| 57 | * mh-utils.el (mh-show-font-lock-keywords): Use faces directly | ||
| 58 | rather than -face variables. | ||
| 59 | (mh-face-foreground-compat, mh-face-background-compat): New macros. | ||
| 60 | (mh-face-display-function): Use mh-face-foreground-compat and | ||
| 61 | mh-face-background-compat to use inherited attributes of | ||
| 62 | mh-show-xface on Emacs 22 while still working on Emacs 21. | ||
| 63 | |||
| 1 | 2005-12-28 Bill Wohler <wohler@newt.com> | 64 | 2005-12-28 Bill Wohler <wohler@newt.com> |
| 2 | 65 | ||
| 3 | * mh-comp.el (mh-e-user-agent): Move here from simple.el. Use | 66 | * mh-comp.el (mh-e-user-agent): Move here from simple.el. Use |
diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index f5556bda2ba..edd6ee41b01 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el | |||
| @@ -204,57 +204,18 @@ and GNU mailutils." | |||
| 204 | :prefix "mh-" | 204 | :prefix "mh-" |
| 205 | :group 'mh-e) | 205 | :group 'mh-e) |
| 206 | 206 | ||
| 207 | (defgroup mh-faces nil | ||
| 208 | "Faces used in MH-E." | ||
| 209 | :link '(custom-manual "(mh-e)Top") | ||
| 210 | :prefix "mh-" | ||
| 211 | :group 'faces | ||
| 212 | :group 'mh-e) | ||
| 213 | |||
| 214 | (defgroup mh-hooks nil | 207 | (defgroup mh-hooks nil |
| 215 | "MH-E hooks." | 208 | "MH-E hooks." |
| 216 | :link '(custom-manual "(mh-e)Top") | 209 | :link '(custom-manual "(mh-e)Top") |
| 217 | :prefix "mh-" | 210 | :prefix "mh-" |
| 218 | :group 'mh-e) | 211 | :group 'mh-e) |
| 219 | 212 | ||
| 220 | 213 | (defgroup mh-faces nil | |
| 221 | 214 | "Faces used in MH-E." | |
| 222 | ;;; Faces | 215 | :link '(custom-manual "(mh-e)Top") |
| 223 | |||
| 224 | (defgroup mh-folder-faces nil | ||
| 225 | "Faces used in scan listing." | ||
| 226 | :link '(custom-manual "(mh-e)Folders") | ||
| 227 | :prefix "mh-" | ||
| 228 | :group 'mh-faces | ||
| 229 | :group 'mh-folder) | ||
| 230 | |||
| 231 | (defgroup mh-index-faces nil | ||
| 232 | "Faces used in searching." | ||
| 233 | :link '(custom-manual "(mh-e)Searching") | ||
| 234 | :prefix "mh-" | ||
| 235 | :group 'mh-faces | ||
| 236 | :group 'mh-index) | ||
| 237 | |||
| 238 | (defgroup mh-letter-faces nil | ||
| 239 | "Faces used in message drafts." | ||
| 240 | :link '(custom-manual "(mh-e)Editing Drafts") | ||
| 241 | :prefix "mh-" | ||
| 242 | :group 'mh-faces | ||
| 243 | :group 'mh-letter) | ||
| 244 | |||
| 245 | (defgroup mh-show-faces nil | ||
| 246 | "Faces used in message display." | ||
| 247 | :link '(custom-manual "(mh-e)Reading Mail") | ||
| 248 | :prefix "mh-" | ||
| 249 | :group 'mh-faces | ||
| 250 | :group 'mh-show) | ||
| 251 | |||
| 252 | (defgroup mh-speed-faces nil | ||
| 253 | "Faces used in speedbar." | ||
| 254 | :link '(custom-manual "(mh-e)Speedbar") | ||
| 255 | :prefix "mh-" | 216 | :prefix "mh-" |
| 256 | :group 'mh-faces | 217 | :group 'faces |
| 257 | :group 'mh-speed) | 218 | :group 'mh-e) |
| 258 | 219 | ||
| 259 | 220 | ||
| 260 | 221 | ||
| @@ -1883,13 +1844,13 @@ lines you'd like to see." | |||
| 1883 | 1844 | ||
| 1884 | 1845 | ||
| 1885 | 1846 | ||
| 1886 | ;;; The Speedbar (:group 'mh-speed) | 1847 | ;;; The Speedbar (:group 'mh-speedbar) |
| 1887 | 1848 | ||
| 1888 | (defcustom mh-speed-update-interval 60 | 1849 | (defcustom mh-speed-update-interval 60 |
| 1889 | "Time between speedbar updates in seconds. | 1850 | "Time between speedbar updates in seconds. |
| 1890 | Set to 0 to disable automatic update." | 1851 | Set to 0 to disable automatic update." |
| 1891 | :type 'integer | 1852 | :type 'integer |
| 1892 | :group 'mh-speed) | 1853 | :group 'mh-speedbar) |
| 1893 | 1854 | ||
| 1894 | 1855 | ||
| 1895 | 1856 | ||
| @@ -2526,81 +2487,42 @@ sequence." | |||
| 2526 | 2487 | ||
| 2527 | 2488 | ||
| 2528 | 2489 | ||
| 2529 | ;;; Faces (:group 'mh-*-faces + group where faces described) | 2490 | ;;; Faces (:group 'mh-faces + group where faces described) |
| 2530 | 2491 | ||
| 2531 | 2492 | (if (boundp 'facemenu-unlisted-faces) | |
| 2493 | (add-to-list 'facemenu-unlisted-faces "^mh-")) | ||
| 2532 | 2494 | ||
| 2533 | ;;; Faces Used in Scan Listing (:group 'mh-folder-faces) | 2495 | (defface mh-folder-address '((t (:inherit mh-folder-subject))) |
| 2496 | "Recipient face." | ||
| 2497 | :group 'mh-faces | ||
| 2498 | :group 'mh-folder) | ||
| 2534 | 2499 | ||
| 2535 | (defvar mh-folder-body-face 'mh-folder-body | ||
| 2536 | "Face used to highlight body text in MH-Folder buffers.") | ||
| 2537 | (defface mh-folder-body | 2500 | (defface mh-folder-body |
| 2538 | (mh-defface-compat | 2501 | '((((class color)) |
| 2539 | '((((class color) (min-colors 88) (background light)) | 2502 | (:inherit mh-folder-msg-number)) |
| 2540 | (:foreground "RosyBrown")) | 2503 | (t |
| 2541 | (((class color) (min-colors 88) (background dark)) | 2504 | (:inherit mh-folder-msg-number :italic t))) |
| 2542 | (:foreground "LightSalmon")) | 2505 | "Body text face." |
| 2543 | (((class color)) | 2506 | :group 'mh-faces |
| 2544 | (:foreground "green")) | 2507 | :group 'mh-folder) |
| 2545 | (((class grayscale) (background light)) | ||
| 2546 | (:foreground "DimGray" :italic t)) | ||
| 2547 | (((class grayscale) (background dark)) | ||
| 2548 | (:foreground "LightGray" :italic t)) | ||
| 2549 | (t | ||
| 2550 | (:italic t)))) | ||
| 2551 | "Face used to highlight body text in MH-Folder buffers." | ||
| 2552 | :group 'mh-folder-faces) | ||
| 2553 | |||
| 2554 | (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg | ||
| 2555 | "Face used for the current message line in MH-Folder buffers.") | ||
| 2556 | (defface mh-folder-cur-msg | ||
| 2557 | (mh-defface-compat | ||
| 2558 | '((((class color) (min-colors 88) (background light)) | ||
| 2559 | (:background "LightGreen") ;Use this for solid background colour | ||
| 2560 | ;; (:underline t) ;Use this for underlining | ||
| 2561 | ) | ||
| 2562 | (((class color) (min-colors 88) (background dark)) | ||
| 2563 | (:background "DarkOliveGreen4")) | ||
| 2564 | (((class color)) | ||
| 2565 | (:background "LightGreen")) | ||
| 2566 | (t | ||
| 2567 | (:underline t)))) | ||
| 2568 | "Face used for the current message line in MH-Folder buffers." | ||
| 2569 | :group 'mh-folder-faces) | ||
| 2570 | 2508 | ||
| 2571 | (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number | ||
| 2572 | "Face used to highlight the current message in MH-Folder buffers.") | ||
| 2573 | (defface mh-folder-cur-msg-number | 2509 | (defface mh-folder-cur-msg-number |
| 2574 | (mh-defface-compat | 2510 | '((t |
| 2575 | '((((class color) (min-colors 88) (background light)) | 2511 | (:inherit mh-folder-msg-number :bold t))) |
| 2576 | (:foreground "Purple")) | 2512 | "Current message number face." |
| 2577 | (((class color) (min-colors 88) (background dark)) | 2513 | :group 'mh-faces |
| 2578 | (:foreground "Cyan")) | 2514 | :group 'mh-folder) |
| 2579 | (((class color)) | ||
| 2580 | (:foreground "cyan" :weight bold)) | ||
| 2581 | (((class grayscale) (background light)) | ||
| 2582 | (:foreground "LightGray" :bold t)) | ||
| 2583 | (((class grayscale) (background dark)) | ||
| 2584 | (:foreground "DimGray" :bold t)) | ||
| 2585 | (t | ||
| 2586 | (:bold t)))) | ||
| 2587 | "Face used to highlight the current message in MH-Folder buffers." | ||
| 2588 | :group 'mh-folder-faces) | ||
| 2589 | 2515 | ||
| 2590 | (defvar mh-folder-date-face 'mh-folder-date | 2516 | (defface mh-folder-date '((t (:inherit mh-folder-msg-number))) |
| 2591 | "Face used to highlight the date in MH-Folder buffers.") | 2517 | "Date face." |
| 2592 | (defface mh-folder-date | 2518 | :group 'mh-faces |
| 2593 | '((((class color) (background light)) | 2519 | :group 'mh-folder) |
| 2594 | (:foreground "snow4")) | 2520 | |
| 2595 | (((class color) (background dark)) | 2521 | (defface mh-folder-deleted '((t (:inherit mh-folder-msg-number))) |
| 2596 | (:foreground "snow3")) | 2522 | "Deleted message face." |
| 2597 | (t | 2523 | :group 'mh-faces |
| 2598 | (:bold t))) | 2524 | :group 'mh-folder) |
| 2599 | "Face used to highlight the date in MH-Folder buffers." | ||
| 2600 | :group 'mh-folder-faces) | ||
| 2601 | 2525 | ||
| 2602 | (defvar mh-folder-followup-face 'mh-folder-followup | ||
| 2603 | "Face used to highlight Re: subject text in MH-Folder buffers.") | ||
| 2604 | (defface mh-folder-followup | 2526 | (defface mh-folder-followup |
| 2605 | '((((class color) (background light)) | 2527 | '((((class color) (background light)) |
| 2606 | (:foreground "blue3")) | 2528 | (:foreground "blue3")) |
| @@ -2608,27 +2530,19 @@ sequence." | |||
| 2608 | (:foreground "LightGoldenRod")) | 2530 | (:foreground "LightGoldenRod")) |
| 2609 | (t | 2531 | (t |
| 2610 | (:bold t))) | 2532 | (:bold t))) |
| 2611 | "Face used to highlight Re: subject text in MH-Folder buffers." | 2533 | "\"Re:\" face." |
| 2612 | :group 'mh-folder-faces) | 2534 | :group 'mh-faces |
| 2535 | :group 'mh-folder) | ||
| 2613 | 2536 | ||
| 2614 | (defvar mh-folder-msg-number-face 'mh-folder-msg-number | ||
| 2615 | "Face used to highlight the message number in MH-Folder buffers.") | ||
| 2616 | (defface mh-folder-msg-number | 2537 | (defface mh-folder-msg-number |
| 2617 | '((((class color) (background light)) | 2538 | '((((class color) (background light)) |
| 2618 | (:foreground "snow4")) | 2539 | (:foreground "snow4")) |
| 2619 | (((class color) (background dark)) | 2540 | (((class color) (background dark)) |
| 2620 | (:foreground "snow3")) | 2541 | (:foreground "snow3"))) |
| 2621 | (t | 2542 | "Message number face." |
| 2622 | (:bold t))) | 2543 | :group 'mh-faces |
| 2623 | "Face used to highlight the message number in MH-Folder buffers." | 2544 | :group 'mh-folder) |
| 2624 | :group 'mh-folder-faces) | ||
| 2625 | |||
| 2626 | (defvar mh-folder-deleted-face 'mh-folder-deleted | ||
| 2627 | "Face used to highlight deleted messages in MH-Folder buffers.") | ||
| 2628 | (copy-face 'mh-folder-msg-number 'mh-folder-deleted) | ||
| 2629 | 2545 | ||
| 2630 | (defvar mh-folder-refiled-face 'mh-folder-refiled | ||
| 2631 | "Face used to highlight refiled messages in MH-Folder buffers.") | ||
| 2632 | (defface mh-folder-refiled | 2546 | (defface mh-folder-refiled |
| 2633 | (mh-defface-compat | 2547 | (mh-defface-compat |
| 2634 | '((((class color) (min-colors 88) (background light)) | 2548 | '((((class color) (min-colors 88) (background light)) |
| @@ -2643,13 +2557,26 @@ sequence." | |||
| 2643 | (:foreground "DimGray" :bold t :italic t)) | 2557 | (:foreground "DimGray" :bold t :italic t)) |
| 2644 | (t | 2558 | (t |
| 2645 | (:bold t :italic t)))) | 2559 | (:bold t :italic t)))) |
| 2646 | "Face used to highlight refiled messages in MH-Folder buffers." | 2560 | "Refiled message face." |
| 2647 | :group 'mh-folder-faces) | 2561 | :group 'mh-faces |
| 2562 | :group 'mh-folder) | ||
| 2563 | |||
| 2564 | (defface mh-folder-sent-to-me-hint '((t (:inherit mh-folder-date))) | ||
| 2565 | "Fontification hint face in messages sent directly to us. | ||
| 2566 | The detection of messages sent to us is governed by the scan | ||
| 2567 | format `mh-scan-format-nmh' and the regular expression | ||
| 2568 | `mh-scan-sent-to-me-sender-regexp'." | ||
| 2569 | :group 'mh-faces | ||
| 2570 | :group 'mh-folder) | ||
| 2571 | |||
| 2572 | (defface mh-folder-sent-to-me-sender '((t (:inherit mh-folder-followup))) | ||
| 2573 | "Sender face in messages sent directly to us. | ||
| 2574 | The detection of messages sent to us is governed by the scan | ||
| 2575 | format `mh-scan-format-nmh' and the regular expression | ||
| 2576 | `mh-scan-sent-to-me-sender-regexp'." | ||
| 2577 | :group 'mh-faces | ||
| 2578 | :group 'mh-folder) | ||
| 2648 | 2579 | ||
| 2649 | (defvar mh-folder-subject-face 'mh-folder-subject | ||
| 2650 | "Face used to highlight subject text in MH-Folder buffers.") | ||
| 2651 | (if (boundp 'facemenu-unlisted-faces) | ||
| 2652 | (add-to-list 'facemenu-unlisted-faces "^mh-folder")) | ||
| 2653 | (defface mh-folder-subject | 2580 | (defface mh-folder-subject |
| 2654 | '((((class color) (background light)) | 2581 | '((((class color) (background light)) |
| 2655 | (:foreground "blue4")) | 2582 | (:foreground "blue4")) |
| @@ -2657,8 +2584,9 @@ sequence." | |||
| 2657 | (:foreground "yellow")) | 2584 | (:foreground "yellow")) |
| 2658 | (t | 2585 | (t |
| 2659 | (:bold t))) | 2586 | (:bold t))) |
| 2660 | "Face used to highlight subject text in MH-Folder buffers." | 2587 | "Subject face." |
| 2661 | :group 'mh-folder-faces) | 2588 | :group 'mh-faces |
| 2589 | :group 'mh-folder) | ||
| 2662 | 2590 | ||
| 2663 | (defface mh-folder-tick | 2591 | (defface mh-folder-tick |
| 2664 | '((((class color) (background dark)) | 2592 | '((((class color) (background dark)) |
| @@ -2667,19 +2595,10 @@ sequence." | |||
| 2667 | (:background "#dddf7e")) | 2595 | (:background "#dddf7e")) |
| 2668 | (t | 2596 | (t |
| 2669 | (:underline t))) | 2597 | (:underline t))) |
| 2670 | "Face used to show ticked messages." | 2598 | "Ticked message face." |
| 2671 | :group 'mh-folder-faces) | 2599 | :group 'mh-faces |
| 2672 | 2600 | :group 'mh-folder) | |
| 2673 | (defvar mh-folder-address-face 'mh-folder-address | ||
| 2674 | "Face used to highlight the address in MH-Folder buffers.") | ||
| 2675 | (copy-face 'mh-folder-subject 'mh-folder-address) | ||
| 2676 | |||
| 2677 | (defvar mh-folder-scan-format-face 'mh-folder-scan-format | ||
| 2678 | "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.") | ||
| 2679 | (copy-face 'mh-folder-followup 'mh-folder-scan-format) | ||
| 2680 | 2601 | ||
| 2681 | (defvar mh-folder-to-face 'mh-folder-to | ||
| 2682 | "Face used to highlight the To: string in MH-Folder buffers.") | ||
| 2683 | (defface mh-folder-to | 2602 | (defface mh-folder-to |
| 2684 | (mh-defface-compat | 2603 | (mh-defface-compat |
| 2685 | '((((class color) (min-colors 88) (background light)) | 2604 | '((((class color) (min-colors 88) (background light)) |
| @@ -2694,15 +2613,10 @@ sequence." | |||
| 2694 | (:foreground "LightGray" :italic t)) | 2613 | (:foreground "LightGray" :italic t)) |
| 2695 | (t | 2614 | (t |
| 2696 | (:italic t)))) | 2615 | (:italic t)))) |
| 2697 | "Face used to highlight the To: string in MH-Folder buffers." | 2616 | "\"To:\" face." |
| 2698 | :group 'mh-folder-faces) | 2617 | :group 'mh-faces |
| 2699 | 2618 | :group 'mh-folder) | |
| 2700 | |||
| 2701 | |||
| 2702 | ;;; Faces Used in Searching (:group 'mh-index-faces) | ||
| 2703 | 2619 | ||
| 2704 | (defvar mh-index-folder-face 'mh-index-folder | ||
| 2705 | "Face used to highlight folders in MH-Index buffers.") | ||
| 2706 | (defface mh-index-folder | 2620 | (defface mh-index-folder |
| 2707 | '((((class color) (background light)) | 2621 | '((((class color) (background light)) |
| 2708 | (:foreground "dark green" :bold t)) | 2622 | (:foreground "dark green" :bold t)) |
| @@ -2710,12 +2624,9 @@ sequence." | |||
| 2710 | (:foreground "indian red" :bold t)) | 2624 | (:foreground "indian red" :bold t)) |
| 2711 | (t | 2625 | (t |
| 2712 | (:bold t))) | 2626 | (:bold t))) |
| 2713 | "Face used to highlight folders in MH-Index buffers." | 2627 | "Folder heading face in MH-Folder buffers created by searches." |
| 2714 | :group 'mh-index-faces) | 2628 | :group 'mh-faces |
| 2715 | 2629 | :group 'mh-index) | |
| 2716 | |||
| 2717 | |||
| 2718 | ;;; Faces Used in Message Drafts (:group 'mh-letter-faces) | ||
| 2719 | 2630 | ||
| 2720 | (defface mh-letter-header-field | 2631 | (defface mh-letter-header-field |
| 2721 | '((((class color) (background light)) | 2632 | '((((class color) (background light)) |
| @@ -2724,15 +2635,10 @@ sequence." | |||
| 2724 | (:background "gray10")) | 2635 | (:background "gray10")) |
| 2725 | (t | 2636 | (t |
| 2726 | (:bold t))) | 2637 | (:bold t))) |
| 2727 | "Face used to display header fields in draft buffers." | 2638 | "Editable header field value face in draft buffers." |
| 2728 | :group 'mh-letter-faces) | 2639 | :group 'mh-faces |
| 2729 | 2640 | :group 'mh-letter) | |
| 2730 | |||
| 2731 | |||
| 2732 | ;;; Faces Used in Message Display (:group 'mh-show-faces) | ||
| 2733 | 2641 | ||
| 2734 | (defvar mh-show-cc-face 'mh-show-cc | ||
| 2735 | "Face used to highlight cc: header fields.") | ||
| 2736 | (defface mh-show-cc | 2642 | (defface mh-show-cc |
| 2737 | (mh-defface-compat | 2643 | (mh-defface-compat |
| 2738 | '((((class color) (min-colors 88) (background light)) | 2644 | '((((class color) (min-colors 88) (background light)) |
| @@ -2747,11 +2653,10 @@ sequence." | |||
| 2747 | (:foreground "DimGray" :bold t :italic t)) | 2653 | (:foreground "DimGray" :bold t :italic t)) |
| 2748 | (t | 2654 | (t |
| 2749 | (:bold t :italic t)))) | 2655 | (:bold t :italic t)))) |
| 2750 | "Face used to highlight cc: header fields." | 2656 | "Face used to highlight \"cc:\" header fields." |
| 2751 | :group 'mh-show-faces) | 2657 | :group 'mh-faces |
| 2658 | :group 'mh-show) | ||
| 2752 | 2659 | ||
| 2753 | (defvar mh-show-date-face 'mh-show-date | ||
| 2754 | "Face used to highlight the Date: header field.") | ||
| 2755 | (defface mh-show-date | 2660 | (defface mh-show-date |
| 2756 | (mh-defface-compat | 2661 | (mh-defface-compat |
| 2757 | '((((class color) (min-colors 88) (background light)) | 2662 | '((((class color) (min-colors 88) (background light)) |
| @@ -2766,11 +2671,21 @@ sequence." | |||
| 2766 | (:foreground "DimGray" :bold t)) | 2671 | (:foreground "DimGray" :bold t)) |
| 2767 | (t | 2672 | (t |
| 2768 | (:bold t :underline t)))) | 2673 | (:bold t :underline t)))) |
| 2769 | "Face used to highlight the Date: header field." | 2674 | "Face used to highlight \"Date:\" header fields." |
| 2770 | :group 'mh-show-faces) | 2675 | :group 'mh-faces |
| 2676 | :group 'mh-show) | ||
| 2677 | |||
| 2678 | (defface mh-show-from | ||
| 2679 | '((((class color) (background light)) | ||
| 2680 | (:foreground "red3")) | ||
| 2681 | (((class color) (background dark)) | ||
| 2682 | (:foreground "cyan")) | ||
| 2683 | (t | ||
| 2684 | (:bold t))) | ||
| 2685 | "Face used to highlight \"From:\" header fields." | ||
| 2686 | :group 'mh-faces | ||
| 2687 | :group 'mh-show) | ||
| 2771 | 2688 | ||
| 2772 | (defvar mh-show-header-face 'mh-show-header | ||
| 2773 | "Face used to deemphasize unspecified header fields.") | ||
| 2774 | (defface mh-show-header | 2689 | (defface mh-show-header |
| 2775 | (mh-defface-compat | 2690 | (mh-defface-compat |
| 2776 | '((((class color) (min-colors 88) (background light)) | 2691 | '((((class color) (min-colors 88) (background light)) |
| @@ -2785,46 +2700,35 @@ sequence." | |||
| 2785 | (:foreground "LightGray" :italic t)) | 2700 | (:foreground "LightGray" :italic t)) |
| 2786 | (t | 2701 | (t |
| 2787 | (:italic t)))) | 2702 | (:italic t)))) |
| 2788 | "Face used to deemphasize unspecified header fields." | 2703 | "Face used to deemphasize less interesting header fields." |
| 2789 | :group 'mh-show-faces) | 2704 | :group 'mh-faces |
| 2705 | :group 'mh-show) | ||
| 2790 | 2706 | ||
| 2791 | (defvar mh-show-pgg-good-face 'mh-show-pgg-good | 2707 | (defface mh-show-pgg-bad '((t (:bold t :foreground "DeepPink1"))) |
| 2792 | "Face used to highlight a good PGG signature.") | 2708 | "Bad PGG signature face." |
| 2793 | (defface mh-show-pgg-good | 2709 | :group 'mh-faces |
| 2794 | '((t | 2710 | :group 'mh-show) |
| 2795 | (:bold t :foreground "LimeGreen"))) | ||
| 2796 | "Face used to highlight a good PGG signature." | ||
| 2797 | :group 'mh-show-faces) | ||
| 2798 | |||
| 2799 | (defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown | ||
| 2800 | "Face used to highlight a PGG signature whose status is unknown. | ||
| 2801 | This face is also used for a signature when the signer is | ||
| 2802 | untrusted.") | ||
| 2803 | (defface mh-show-pgg-unknown | ||
| 2804 | '((t | ||
| 2805 | (:bold t :foreground "DarkGoldenrod2"))) | ||
| 2806 | "Face used to highlight a PGG signature whose status is unknown. | ||
| 2807 | This face is also used for a signature when the signer is untrusted." | ||
| 2808 | :group 'mh-show-faces) | ||
| 2809 | |||
| 2810 | (defvar mh-show-pgg-bad-face 'mh-show-pgg-bad | ||
| 2811 | "Face used to highlight a bad PGG signature.") | ||
| 2812 | (defface mh-show-pgg-bad | ||
| 2813 | '((t | ||
| 2814 | (:bold t :foreground "DeepPink1"))) | ||
| 2815 | "Face used to highlight a bad PGG signature." | ||
| 2816 | :group 'mh-show-faces) | ||
| 2817 | 2711 | ||
| 2818 | (defface mh-show-signature | 2712 | (defface mh-show-pgg-good '((t (:bold t :foreground "LimeGreen"))) |
| 2819 | '((t | 2713 | "Good PGG signature face." |
| 2820 | (:italic t))) | 2714 | :group 'mh-faces |
| 2821 | "Face used to highlight the message signature." | 2715 | :group 'mh-show) |
| 2822 | :group 'mh-show-faces) | 2716 | |
| 2717 | (defface mh-show-pgg-unknown '((t (:bold t :foreground "DarkGoldenrod2"))) | ||
| 2718 | "Unknown or untrusted PGG signature face." | ||
| 2719 | :group 'mh-faces | ||
| 2720 | :group 'mh-show) | ||
| 2721 | |||
| 2722 | (defface mh-show-signature '((t (:italic t))) | ||
| 2723 | "Signature face." | ||
| 2724 | :group 'mh-faces | ||
| 2725 | :group 'mh-show) | ||
| 2726 | |||
| 2727 | (defface mh-show-subject '((t (:inherit mh-folder-subject))) | ||
| 2728 | "Face used to highlight \"Subject:\" header fields." | ||
| 2729 | :group 'mh-faces | ||
| 2730 | :group 'mh-show) | ||
| 2823 | 2731 | ||
| 2824 | (defvar mh-show-to-face 'mh-show-to | ||
| 2825 | "Face used to highlight the To: header field.") | ||
| 2826 | (if (boundp 'facemenu-unlisted-faces) | ||
| 2827 | (add-to-list 'facemenu-unlisted-faces "^mh-show")) | ||
| 2828 | (defface mh-show-to | 2732 | (defface mh-show-to |
| 2829 | '((((class color) (background light)) | 2733 | '((((class color) (background light)) |
| 2830 | (:foreground "SaddleBrown")) | 2734 | (:foreground "SaddleBrown")) |
| @@ -2835,43 +2739,31 @@ This face is also used for a signature when the signer is untrusted." | |||
| 2835 | (((class grayscale) (background dark)) | 2739 | (((class grayscale) (background dark)) |
| 2836 | (:foreground "LightGray" :underline t)) | 2740 | (:foreground "LightGray" :underline t)) |
| 2837 | (t (:underline t))) | 2741 | (t (:underline t))) |
| 2838 | "Face used to highlight the To: header field." | 2742 | "Face used to highlight \"To:\" header fields." |
| 2839 | :group 'mh-show-faces) | 2743 | :group 'mh-faces |
| 2840 | 2744 | :group 'mh-show) | |
| 2841 | (defvar mh-show-from-face 'mh-show-from | ||
| 2842 | "Face used to highlight the From: header field.") | ||
| 2843 | (defface mh-show-from | ||
| 2844 | '((((class color) (background light)) | ||
| 2845 | (:foreground "red3")) | ||
| 2846 | (((class color) (background dark)) | ||
| 2847 | (:foreground "cyan")) | ||
| 2848 | (t | ||
| 2849 | (:bold t))) | ||
| 2850 | "Face used to highlight the From: header field." | ||
| 2851 | :group 'mh-show-faces) | ||
| 2852 | |||
| 2853 | (defface mh-show-xface | ||
| 2854 | '((t | ||
| 2855 | (:foreground "black" :background "white"))) | ||
| 2856 | "Face used to display the X-Face image. | ||
| 2857 | The background and foreground is used in the image." | ||
| 2858 | :group 'mh-show-faces) | ||
| 2859 | |||
| 2860 | (defvar mh-show-subject-face 'mh-show-subject | ||
| 2861 | "Face used to highlight the Subject: header field.") | ||
| 2862 | (copy-face 'mh-folder-subject 'mh-show-subject) | ||
| 2863 | |||
| 2864 | |||
| 2865 | 2745 | ||
| 2866 | ;;; Faces Used in Speedbar (:group 'mh-speed-faces) | 2746 | (defface mh-show-xface '((t (:inherit (mh-show-from highlight)))) |
| 2747 | "X-Face image face. | ||
| 2748 | The background and foreground are used in the image." | ||
| 2749 | :group 'mh-faces | ||
| 2750 | :group 'mh-show) | ||
| 2867 | 2751 | ||
| 2868 | (defface mh-speedbar-folder | 2752 | (defface mh-speedbar-folder |
| 2869 | '((((class color) (background light)) | 2753 | '((((class color) (background light)) |
| 2870 | (:foreground "blue4")) | 2754 | (:foreground "blue4")) |
| 2871 | (((class color) (background dark)) | 2755 | (((class color) (background dark)) |
| 2872 | (:foreground "light blue"))) | 2756 | (:foreground "light blue"))) |
| 2873 | "Face used for folders in the speedbar buffer." | 2757 | "Basic folder face." |
| 2874 | :group 'mh-speed-faces) | 2758 | :group 'mh-faces |
| 2759 | :group 'mh-speedbar) | ||
| 2760 | |||
| 2761 | (defface mh-speedbar-folder-with-unseen-messages | ||
| 2762 | '((t | ||
| 2763 | (:inherit mh-speedbar-folder :bold t))) | ||
| 2764 | "Folder face when folder contains unread messages." | ||
| 2765 | :group 'mh-faces | ||
| 2766 | :group 'mh-speedbar) | ||
| 2875 | 2767 | ||
| 2876 | (defface mh-speedbar-selected-folder | 2768 | (defface mh-speedbar-selected-folder |
| 2877 | '((((class color) (background light)) | 2769 | '((((class color) (background light)) |
| @@ -2880,20 +2772,111 @@ The background and foreground is used in the image." | |||
| 2880 | (:foreground "red1" :underline t)) | 2772 | (:foreground "red1" :underline t)) |
| 2881 | (t | 2773 | (t |
| 2882 | (:underline t))) | 2774 | (:underline t))) |
| 2883 | "Face used for the current folder." | 2775 | "Selected folder face." |
| 2884 | :group 'mh-speed-faces) | 2776 | :group 'mh-faces |
| 2885 | 2777 | :group 'mh-speedbar) | |
| 2886 | (defface mh-speedbar-folder-with-unseen-messages | ||
| 2887 | '((t | ||
| 2888 | (:inherit mh-speedbar-folder :bold t))) | ||
| 2889 | "Face used for folders in the speedbar buffer which have unread messages." | ||
| 2890 | :group 'mh-speed-faces) | ||
| 2891 | 2778 | ||
| 2892 | (defface mh-speedbar-selected-folder-with-unseen-messages | 2779 | (defface mh-speedbar-selected-folder-with-unseen-messages |
| 2893 | '((t | 2780 | '((t |
| 2894 | (:inherit mh-speedbar-selected-folder :bold t))) | 2781 | (:inherit mh-speedbar-selected-folder :bold t))) |
| 2895 | "Face used for the current folder when it has unread messages." | 2782 | "Selected folder face when folder contains unread messages." |
| 2896 | :group 'mh-speed-faces) | 2783 | :group 'mh-faces |
| 2784 | :group 'mh-speedbar) | ||
| 2785 | |||
| 2786 | ;;; XXX Temporary function for comparing old and new faces. Delete | ||
| 2787 | ;;; when everybody is happy. | ||
| 2788 | (defvar bw-face-generation 'new) | ||
| 2789 | |||
| 2790 | (defun bw-toggle-faces () | ||
| 2791 | "Toggle between old and new faces." | ||
| 2792 | (interactive) | ||
| 2793 | (cond ((eq bw-face-generation 'new) | ||
| 2794 | (message "Going from new to old...") | ||
| 2795 | (bw-new-face-to-old) | ||
| 2796 | (message "Going from new to old...done") | ||
| 2797 | (setq bw-face-generation 'old)) | ||
| 2798 | ((eq bw-face-generation 'old) | ||
| 2799 | (message "Going from old to new...") | ||
| 2800 | (bw-old-face-to-new) | ||
| 2801 | (message "Going from old to new...done") | ||
| 2802 | (setq bw-face-generation 'new)))) | ||
| 2803 | |||
| 2804 | (defun bw-new-face-to-old () | ||
| 2805 | "Sets old faces." | ||
| 2806 | (face-spec-set 'mh-folder-body | ||
| 2807 | (mh-defface-compat | ||
| 2808 | '((((class color) (min-colors 88) (background light)) | ||
| 2809 | (:foreground "RosyBrown")) | ||
| 2810 | (((class color) (min-colors 88) (background dark)) | ||
| 2811 | (:foreground "LightSalmon")) | ||
| 2812 | (((class color)) | ||
| 2813 | (:foreground "green")) | ||
| 2814 | (((class grayscale) (background light)) | ||
| 2815 | (:foreground "DimGray" :italic t)) | ||
| 2816 | (((class grayscale) (background dark)) | ||
| 2817 | (:foreground "LightGray" :italic t)) | ||
| 2818 | (t | ||
| 2819 | (:italic t))))) | ||
| 2820 | |||
| 2821 | (face-spec-set 'mh-folder-msg-number | ||
| 2822 | '((((class color) (background light)) | ||
| 2823 | (:foreground "snow4")) | ||
| 2824 | (((class color) (background dark)) | ||
| 2825 | (:foreground "snow3")) | ||
| 2826 | (t | ||
| 2827 | (:bold t)))) | ||
| 2828 | |||
| 2829 | (face-spec-set 'mh-folder-cur-msg-number | ||
| 2830 | (mh-defface-compat | ||
| 2831 | '((((class color) (min-colors 88) (background light)) | ||
| 2832 | (:foreground "Purple")) | ||
| 2833 | (((class color) (min-colors 88) (background dark)) | ||
| 2834 | (:foreground "Cyan")) | ||
| 2835 | (((class color)) | ||
| 2836 | (:foreground "cyan" :weight bold)) | ||
| 2837 | (((class grayscale) (background light)) | ||
| 2838 | (:foreground "LightGray" :bold t)) | ||
| 2839 | (((class grayscale) (background dark)) | ||
| 2840 | (:foreground "DimGray" :bold t)) | ||
| 2841 | (t | ||
| 2842 | (:bold t))))) | ||
| 2843 | |||
| 2844 | (face-spec-set 'mh-folder-date | ||
| 2845 | '((((class color) (background light)) | ||
| 2846 | (:foreground "snow4")) | ||
| 2847 | (((class color) (background dark)) | ||
| 2848 | (:foreground "snow3")) | ||
| 2849 | (t | ||
| 2850 | (:bold t)))) | ||
| 2851 | |||
| 2852 | (face-spec-set 'mh-folder-msg-number | ||
| 2853 | '((((class color) (background light)) | ||
| 2854 | (:foreground "snow4")) | ||
| 2855 | (((class color) (background dark)) | ||
| 2856 | (:foreground "snow3")) | ||
| 2857 | (t | ||
| 2858 | (:bold t))))) | ||
| 2859 | |||
| 2860 | (defun bw-old-face-to-new () | ||
| 2861 | "Sets new faces." | ||
| 2862 | (face-spec-set 'mh-folder-body | ||
| 2863 | '((((class color)) | ||
| 2864 | (:inherit mh-folder-msg-number)) | ||
| 2865 | (t | ||
| 2866 | (:inherit mh-folder-msg-number :italic t)))) | ||
| 2867 | |||
| 2868 | (face-spec-set 'mh-folder-cur-msg-number | ||
| 2869 | '((t | ||
| 2870 | (:inherit mh-folder-msg-number :bold t)))) | ||
| 2871 | |||
| 2872 | (face-spec-set 'mh-folder-date '((t (:inherit mh-folder-msg-number)))) | ||
| 2873 | |||
| 2874 | (face-spec-set 'mh-folder-msg-number | ||
| 2875 | '((((class color) (background light)) | ||
| 2876 | (:foreground "snow4")) | ||
| 2877 | (((class color) (background dark)) | ||
| 2878 | (:foreground "snow3"))))) | ||
| 2879 | |||
| 2897 | 2880 | ||
| 2898 | ;; Local Variables: | 2881 | ;; Local Variables: |
| 2899 | ;; indent-tabs-mode: nil | 2882 | ;; indent-tabs-mode: nil |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 30034008cec..1deb465c1fe 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -95,8 +95,9 @@ | |||
| 95 | (require 'easymenu) | 95 | (require 'easymenu) |
| 96 | 96 | ||
| 97 | ;; Shush the byte-compiler | 97 | ;; Shush the byte-compiler |
| 98 | (defvar font-lock-auto-fontify) | 98 | (eval-when-compile |
| 99 | (defvar font-lock-defaults) | 99 | (defvar font-lock-auto-fontify) |
| 100 | (defvar font-lock-defaults)) | ||
| 100 | 101 | ||
| 101 | (defconst mh-version "7.85+cvs" "Version number of MH-E.") | 102 | (defconst mh-version "7.85+cvs" "Version number of MH-E.") |
| 102 | 103 | ||
| @@ -194,7 +195,8 @@ matches the message number as in the default of | |||
| 194 | \"^\\\\( *[0-9]+\\\\)[^D^0-9]\". | 195 | \"^\\\\( *[0-9]+\\\\)[^D^0-9]\". |
| 195 | 196 | ||
| 196 | This expression includes the leading space within the parenthesis | 197 | This expression includes the leading space within the parenthesis |
| 197 | since it looks better to highlight it as well. This regular | 198 | since it looks better to highlight it as well. The highlighting |
| 199 | is done with the face `mh-folder-msg-number'. This regular | ||
| 198 | expression should be correct as it is needed by non-fontification | 200 | expression should be correct as it is needed by non-fontification |
| 199 | functions.") | 201 | functions.") |
| 200 | 202 | ||
| @@ -209,7 +211,8 @@ matches the message number as in the default of | |||
| 209 | \"^\\\\( *[0-9]+\\\\)D\". | 211 | \"^\\\\( *[0-9]+\\\\)D\". |
| 210 | 212 | ||
| 211 | This expression includes the leading space within the parenthesis | 213 | This expression includes the leading space within the parenthesis |
| 212 | since it looks better to highlight it as well. This regular | 214 | since it looks better to highlight it as well. The highlighting |
| 215 | is done with the face `mh-folder-deleted'. This regular | ||
| 213 | expression should be correct as it is needed by non-fontification | 216 | expression should be correct as it is needed by non-fontification |
| 214 | functions. See also `mh-note-deleted'.") | 217 | functions. See also `mh-note-deleted'.") |
| 215 | 218 | ||
| @@ -224,7 +227,8 @@ matches the message number as in the default of | |||
| 224 | \"^\\\\( *[0-9]+\\\\)\\\\^\". | 227 | \"^\\\\( *[0-9]+\\\\)\\\\^\". |
| 225 | 228 | ||
| 226 | This expression includes the leading space within the parenthesis | 229 | This expression includes the leading space within the parenthesis |
| 227 | since it looks better to highlight it as well. This regular | 230 | since it looks better to highlight it as well. The highlighting |
| 231 | is done with the face `mh-folder-refiled'. This regular | ||
| 228 | expression should be correct as it is needed by non-fontification | 232 | expression should be correct as it is needed by non-fontification |
| 229 | functions. See also `mh-note-refiled'.") | 233 | functions. See also `mh-note-refiled'.") |
| 230 | 234 | ||
| @@ -246,9 +250,10 @@ matches the message number as in the default of | |||
| 246 | 250 | ||
| 247 | This expression includes the leading space and current message | 251 | This expression includes the leading space and current message |
| 248 | marker \"+\" within the parenthesis since it looks better to | 252 | marker \"+\" within the parenthesis since it looks better to |
| 249 | highlight these items as well. This regular expression should be | 253 | highlight these items as well. The highlighting is done with the |
| 250 | correct as it is needed by non-fontification functions. See also | 254 | face `mh-folder-cur-msg-number'. This regular expression should |
| 251 | `mh-note-cur'.") | 255 | be correct as it is needed by non-fontification functions. See |
| 256 | also `mh-note-cur'.") | ||
| 252 | 257 | ||
| 253 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" | 258 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" |
| 254 | "This regular expression matches a valid date. | 259 | "This regular expression matches a valid date. |
| @@ -258,8 +263,8 @@ Note that the default setting of `mh-folder-font-lock-keywords' | |||
| 258 | expects this expression to contain only one parenthesized | 263 | expects this expression to contain only one parenthesized |
| 259 | expression which matches the date field as in the default of | 264 | expression which matches the date field as in the default of |
| 260 | \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular expression | 265 | \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular expression |
| 261 | is not correct, the date will not be highlighted. See also | 266 | is not correct, the date will not be highlighted with the face |
| 262 | `mh-scan-format-regexp'.") | 267 | `mh-folder-date'.") |
| 263 | 268 | ||
| 264 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" | 269 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" |
| 265 | "This regular expression specifies the recipient in messages you sent. | 270 | "This regular expression specifies the recipient in messages you sent. |
| @@ -270,8 +275,9 @@ The first is expected to match the \"To:\" that the default scan | |||
| 270 | format file generates. The second is expected to match the | 275 | format file generates. The second is expected to match the |
| 271 | recipient's name as in the default of | 276 | recipient's name as in the default of |
| 272 | \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular | 277 | \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular |
| 273 | expression is not correct, the recipient will not be | 278 | expression is not correct, the \"To:\" string will not be |
| 274 | highlighted.") | 279 | highlighted with the face `mh-folder-to' and the recipient will |
| 280 | not be highlighted with the face `mh-folder-address'") | ||
| 275 | 281 | ||
| 276 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" | 282 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" |
| 277 | "This regular expression matches the message body fragment. | 283 | "This regular expression matches the message body fragment. |
| @@ -280,7 +286,8 @@ Note that the default setting of `mh-folder-font-lock-keywords' | |||
| 280 | expects this expression to contain at least one parenthesized | 286 | expects this expression to contain at least one parenthesized |
| 281 | expression which matches the body text as in the default of | 287 | expression which matches the body text as in the default of |
| 282 | \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this regular expression is | 288 | \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this regular expression is |
| 283 | not correct, the body fragment will not be highlighted.") | 289 | not correct, the body fragment will not be highlighted with the |
| 290 | face `mh-folder-body'.") | ||
| 284 | 291 | ||
| 285 | (defvar mh-scan-subject-regexp | 292 | (defvar mh-scan-subject-regexp |
| 286 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" | 293 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" |
| @@ -289,12 +296,13 @@ not correct, the body fragment will not be highlighted.") | |||
| 289 | It must match from the beginning of the line. Note that the | 296 | It must match from the beginning of the line. Note that the |
| 290 | default setting of `mh-folder-font-lock-keywords' expects this | 297 | default setting of `mh-folder-font-lock-keywords' expects this |
| 291 | expression to contain at least three parenthesized expressions. | 298 | expression to contain at least three parenthesized expressions. |
| 292 | The first is expected to match the \"Re:\" string, if any. The | 299 | The first is expected to match the \"Re:\" string, if any, and is |
| 293 | second matches an optional bracketed number after \"Re:\", such as | 300 | highlighted with the face `mh-folder-followup'. The second |
| 294 | in \"Re[2]:\" (and is thus a sub-expression of the first | 301 | matches an optional bracketed number after \"Re:\", such as in |
| 295 | expression) and the third is expected to match the subject line | 302 | \"Re[2]:\" (and is thus a sub-expression of the first expression) |
| 296 | itself as in the default of (broken on multiple lines for | 303 | and the third is expected to match the subject line itself which |
| 297 | readability): | 304 | is highlighted with the face `mh-folder-subject'. For example, |
| 305 | the default (broken on multiple lines for readability) is | ||
| 298 | 306 | ||
| 299 | ^ *[0-9]+........[ ]*................... | 307 | ^ *[0-9]+........[ ]*................... |
| 300 | \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* | 308 | \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* |
| @@ -303,22 +311,22 @@ readability): | |||
| 303 | This regular expression should be correct as it is needed by | 311 | This regular expression should be correct as it is needed by |
| 304 | non-fontification functions.") | 312 | non-fontification functions.") |
| 305 | 313 | ||
| 306 | (defvar mh-scan-format-regexp | 314 | (defvar mh-scan-sent-to-me-sender-regexp |
| 307 | (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") | 315 | "^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)" |
| 308 | "This regular expression matches the output of scan. | 316 | "This regular expression matches messages sent to us. |
| 309 | 317 | ||
| 310 | Note that the default setting of `mh-folder-font-lock-keywords' | 318 | Note that the default setting of `mh-folder-font-lock-keywords' |
| 311 | expects this expression to contain at least three parenthesized | 319 | expects this expression to contain at least two parenthesized |
| 312 | expressions. The first should match the fontification hint (see | 320 | expressions. The first should match the fontification hint (see |
| 313 | `mh-scan-format-nmh'), the second is found in | 321 | `mh-scan-format-nmh') and the second should match the user name |
| 314 | `mh-scan-date-regexp', and the third should match the user name | ||
| 315 | as in the default of | 322 | as in the default of |
| 316 | 323 | ||
| 317 | \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp | 324 | ^ *[0-9]+.\\\\([bct]\\\\).....[ ]*\\\\(..................\\\\) |
| 318 | \"*\\\\(..................\\\\)\")\". | ||
| 319 | 325 | ||
| 320 | If this regular expression is not correct, the notation hints and | 326 | If this regular expression is not correct, the notation hints |
| 321 | the sender will not be highlighted.") | 327 | will not be highlighted with the face |
| 328 | `mh-mh-folder-sent-to-me-hint' and the sender will not be | ||
| 329 | highlighted with the face `mh-folder-sent-to-me-sender'.") | ||
| 322 | 330 | ||
| 323 | 331 | ||
| 324 | 332 | ||
| @@ -326,31 +334,37 @@ the sender will not be highlighted.") | |||
| 326 | (list | 334 | (list |
| 327 | ;; Folders when displaying index buffer | 335 | ;; Folders when displaying index buffer |
| 328 | (list "^\\+.*" | 336 | (list "^\\+.*" |
| 329 | '(0 mh-index-folder-face)) | 337 | '(0 'mh-index-folder)) |
| 330 | ;; Marked for deletion | 338 | ;; Marked for deletion |
| 331 | (list (concat mh-scan-deleted-msg-regexp ".*") | 339 | (list (concat mh-scan-deleted-msg-regexp ".*") |
| 332 | '(0 mh-folder-deleted-face)) | 340 | '(0 'mh-folder-deleted)) |
| 333 | ;; Marked for refile | 341 | ;; Marked for refile |
| 334 | (list (concat mh-scan-refiled-msg-regexp ".*") | 342 | (list (concat mh-scan-refiled-msg-regexp ".*") |
| 335 | '(0 mh-folder-refiled-face)) | 343 | '(0 'mh-folder-refiled)) |
| 336 | ;;after subj | 344 | ;; After subject |
| 337 | (list mh-scan-body-regexp '(1 mh-folder-body-face nil t)) | 345 | (list mh-scan-body-regexp |
| 346 | '(1 'mh-folder-body nil t)) | ||
| 347 | ;; Subject | ||
| 338 | '(mh-folder-font-lock-subject | 348 | '(mh-folder-font-lock-subject |
| 339 | (1 mh-folder-followup-face append t) | 349 | (1 'mh-folder-followup append t) |
| 340 | (2 mh-folder-subject-face append t)) | 350 | (2 'mh-folder-subject append t)) |
| 341 | ;;current msg | 351 | ;; Current message number |
| 342 | (list mh-scan-cur-msg-number-regexp | 352 | (list mh-scan-cur-msg-number-regexp |
| 343 | '(1 mh-folder-cur-msg-number-face)) | 353 | '(1 'mh-folder-cur-msg-number)) |
| 354 | ;; Message number | ||
| 344 | (list mh-scan-good-msg-regexp | 355 | (list mh-scan-good-msg-regexp |
| 345 | '(1 mh-folder-msg-number-face)) ;; Msg number | 356 | '(1 'mh-folder-msg-number)) |
| 346 | (list mh-scan-date-regexp '(1 mh-folder-date-face)) ;; Date | 357 | ;; Date |
| 358 | (list mh-scan-date-regexp | ||
| 359 | '(1 'mh-folder-date)) | ||
| 360 | ;; Messages from me (To:) | ||
| 347 | (list mh-scan-rcpt-regexp | 361 | (list mh-scan-rcpt-regexp |
| 348 | '(1 mh-folder-to-face) ;; To: | 362 | '(1 'mh-folder-to) |
| 349 | '(2 mh-folder-address-face)) ;; address | 363 | '(2 'mh-folder-address)) |
| 350 | ;; scan font-lock name | 364 | ;; Messages to me |
| 351 | (list mh-scan-format-regexp | 365 | (list mh-scan-sent-to-me-sender-regexp |
| 352 | '(1 mh-folder-date-face) | 366 | '(1 'mh-folder-sent-to-me-hint) |
| 353 | '(3 mh-folder-scan-format-face))) | 367 | '(2 'mh-folder-sent-to-me-sender))) |
| 354 | "Keywords (regular expressions) used to fontify the MH-Folder buffer.") | 368 | "Keywords (regular expressions) used to fontify the MH-Folder buffer.") |
| 355 | 369 | ||
| 356 | (defvar mh-scan-cmd-note-width 1 | 370 | (defvar mh-scan-cmd-note-width 1 |
diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el index 6b8feda8ccc..2818674afae 100644 --- a/lisp/mh-e/mh-init.el +++ b/lisp/mh-e/mh-init.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mh-init.el --- MH-E initialization | 1 | ;;; mh-init.el --- MH-E initialization |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Peter S. Galbraith <psg@debian.org> | 5 | ;; Author: Peter S. Galbraith <psg@debian.org> |
| 6 | ;; Maintainer: Bill Wohler <wohler@newt.com> | 6 | ;; Maintainer: Bill Wohler <wohler@newt.com> |
| @@ -334,7 +334,7 @@ there. Otherwise, the images directory is added to the | |||
| 334 | 334 | ||
| 335 | (defun mh-defface-compat (spec) | 335 | (defun mh-defface-compat (spec) |
| 336 | "Convert SPEC for defface if necessary to run on older platforms. | 336 | "Convert SPEC for defface if necessary to run on older platforms. |
| 337 | See `defface' for the spec definition. | 337 | Modifies SPEC in place and returns it. See `defface' for the spec definition. |
| 338 | 338 | ||
| 339 | When `mh-min-colors-defined-flag' is nil, this function finds a | 339 | When `mh-min-colors-defined-flag' is nil, this function finds a |
| 340 | display with a single \"class\" requirement with a \"color\" | 340 | display with a single \"class\" requirement with a \"color\" |
| @@ -351,7 +351,8 @@ requirements." | |||
| 351 | (loop for entry in spec do | 351 | (loop for entry in spec do |
| 352 | (when (not (eq (car entry) t)) | 352 | (when (not (eq (car entry) t)) |
| 353 | (if (assoc 'min-colors (car entry)) | 353 | (if (assoc 'min-colors (car entry)) |
| 354 | (delq (assoc 'min-colors (car entry)) (car entry))))))) | 354 | (delq (assoc 'min-colors (car entry)) (car entry)))))) |
| 355 | spec) | ||
| 355 | 356 | ||
| 356 | (provide 'mh-init) | 357 | (provide 'mh-init) |
| 357 | 358 | ||
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 4338a94381b..c028890f6a1 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el | |||
| @@ -1407,14 +1407,15 @@ Parameter EL is unused." | |||
| 1407 | (defun mh-mime-security-button-face (info) | 1407 | (defun mh-mime-security-button-face (info) |
| 1408 | "Return the button face to use for encrypted/signed mail based on INFO." | 1408 | "Return the button face to use for encrypted/signed mail based on INFO." |
| 1409 | (cond ((string-match "OK" info) ;Decrypted mail | 1409 | (cond ((string-match "OK" info) ;Decrypted mail |
| 1410 | mh-show-pgg-good-face) | 1410 | 'mh-show-pgg-good) |
| 1411 | ((string-match "Failed" info) ;Decryption failed or signature invalid | 1411 | ((string-match "Failed" info) ;Decryption failed or signature invalid |
| 1412 | mh-show-pgg-bad-face) | 1412 | 'mh-show-pgg-bad) |
| 1413 | ((string-match "Undecided" info);Unprocessed mail | 1413 | ((string-match "Undecided" info);Unprocessed mail |
| 1414 | mh-show-pgg-unknown-face) | 1414 | 'mh-show-pgg-unknown) |
| 1415 | ((string-match "Untrusted" info);Key not trusted | 1415 | ((string-match "Untrusted" info);Key not trusted |
| 1416 | mh-show-pgg-unknown-face) | 1416 | 'mh-show-pgg-unknown) |
| 1417 | (t mh-show-pgg-good-face))) | 1417 | (t |
| 1418 | 'mh-show-pgg-good))) | ||
| 1418 | 1419 | ||
| 1419 | (defun mh-mime-security-press-button (handle) | 1420 | (defun mh-mime-security-press-button (handle) |
| 1420 | "Callback from security button for part HANDLE." | 1421 | "Callback from security button for part HANDLE." |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index b5d97a2be05..e008c93916e 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -402,18 +402,30 @@ Argument LIMIT limits search." | |||
| 402 | (eval-and-compile | 402 | (eval-and-compile |
| 403 | ;; Otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite' | 403 | ;; Otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite' |
| 404 | (defvar mh-show-font-lock-keywords | 404 | (defvar mh-show-font-lock-keywords |
| 405 | '(("^\\(From:\\|Sender:\\)\\(.*\\)" (1 'default) (2 mh-show-from-face)) | 405 | '(("^\\(From:\\|Sender:\\)\\(.*\\)" |
| 406 | (mh-header-to-font-lock (0 'default) (1 mh-show-to-face)) | 406 | (1 'default) |
| 407 | (mh-header-cc-font-lock (0 'default) (1 mh-show-cc-face)) | 407 | (2 'mh-show-from)) |
| 408 | (mh-header-to-font-lock | ||
| 409 | (0 'default) | ||
| 410 | (1 'mh-show-to)) | ||
| 411 | (mh-header-cc-font-lock | ||
| 412 | (0 'default) | ||
| 413 | (1 'mh-show-cc)) | ||
| 408 | ("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$" | 414 | ("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$" |
| 409 | (1 'default) (2 mh-show-from-face)) | 415 | (1 'default) |
| 410 | (mh-header-subject-font-lock (0 'default) (1 mh-show-subject-face)) | 416 | (2 'mh-show-from)) |
| 417 | (mh-header-subject-font-lock | ||
| 418 | (0 'default) | ||
| 419 | (1 'mh-show-subject)) | ||
| 411 | ("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)" | 420 | ("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)" |
| 412 | (1 'default) (2 mh-show-cc-face)) | 421 | (1 'default) |
| 422 | (2 'mh-show-cc)) | ||
| 413 | ("^\\(In-reply-to\\|Date\\):\\(.*\\)$" | 423 | ("^\\(In-reply-to\\|Date\\):\\(.*\\)$" |
| 414 | (1 'default) (2 mh-show-date-face)) | 424 | (1 'default) |
| 415 | (mh-letter-header-font-lock (0 mh-show-header-face append t))) | 425 | (2 'mh-show-date)) |
| 416 | "Additional expressions to highlight in MH-show mode.")) | 426 | (mh-letter-header-font-lock |
| 427 | (0 'mh-show-header append t))) | ||
| 428 | "Additional expressions to highlight in MH-Show buffers.")) | ||
| 417 | 429 | ||
| 418 | (defvar mh-show-font-lock-keywords-with-cite | 430 | (defvar mh-show-font-lock-keywords-with-cite |
| 419 | (eval-when-compile | 431 | (eval-when-compile |
| @@ -432,11 +444,13 @@ Argument LIMIT limits search." | |||
| 432 | (beginning-of-line) (end-of-line) | 444 | (beginning-of-line) (end-of-line) |
| 433 | (2 font-lock-constant-face nil t) | 445 | (2 font-lock-constant-face nil t) |
| 434 | (4 font-lock-comment-face nil t))))))) | 446 | (4 font-lock-comment-face nil t))))))) |
| 435 | "Additional expressions to highlight in MH-show mode.") | 447 | "Additional expressions to highlight in MH-Show buffers.") |
| 436 | 448 | ||
| 437 | (defvar mh-letter-font-lock-keywords | 449 | (defvar mh-letter-font-lock-keywords |
| 438 | `(,@mh-show-font-lock-keywords-with-cite | 450 | `(,@mh-show-font-lock-keywords-with-cite |
| 439 | (mh-font-lock-field-data (1 'mh-letter-header-field prepend t)))) | 451 | (mh-font-lock-field-data |
| 452 | (1 'mh-letter-header-field prepend t))) | ||
| 453 | "Additional expressions to highlight in MH-Letter buffers.") | ||
| 440 | 454 | ||
| 441 | (defun mh-show-font-lock-fontify-region (beg end loudly) | 455 | (defun mh-show-font-lock-fontify-region (beg end loudly) |
| 442 | "Limit font-lock in `mh-show-mode' to the header. | 456 | "Limit font-lock in `mh-show-mode' to the header. |
| @@ -1229,6 +1243,32 @@ See also `mh-folder-mode'. | |||
| 1229 | 1243 | ||
| 1230 | (mh-do-in-xemacs (defvar default-enable-multibyte-characters)) | 1244 | (mh-do-in-xemacs (defvar default-enable-multibyte-characters)) |
| 1231 | 1245 | ||
| 1246 | (defmacro mh-face-foreground-compat (face &optional frame inherit) | ||
| 1247 | "Return the foreground color name of FACE, or nil if unspecified. | ||
| 1248 | See documentation for `face-foreground' for a description of the | ||
| 1249 | arguments FACE, FRAME, and INHERIT. | ||
| 1250 | |||
| 1251 | Calls `face-foreground' correctly in older environments. Versions | ||
| 1252 | of Emacs prior to version 22 lacked an INHERIT argument which | ||
| 1253 | when t tells `face-foreground' to consider an inherited value for | ||
| 1254 | the foreground if the face does not define one itself." | ||
| 1255 | (if (>= emacs-major-version 22) | ||
| 1256 | `(face-foreground ,face ,frame ,inherit) | ||
| 1257 | `(face-foreground ,face ,frame))) | ||
| 1258 | |||
| 1259 | (defmacro mh-face-background-compat (face &optional frame inherit) | ||
| 1260 | "Return the background color name of face, or nil if unspecified. | ||
| 1261 | See documentation for `back-foreground' for a description of the | ||
| 1262 | arguments FACE, FRAME, and INHERIT. | ||
| 1263 | |||
| 1264 | Calls `face-background' correctly in older environments. Versions | ||
| 1265 | of Emacs prior to version 22 lacked an INHERIT argument which | ||
| 1266 | when t tells `face-background' to consider an inherited value for | ||
| 1267 | the background if the face does not define one itself." | ||
| 1268 | (if (>= emacs-major-version 22) | ||
| 1269 | `(face-background ,face ,frame ,inherit) | ||
| 1270 | `(face-background ,face ,frame))) | ||
| 1271 | |||
| 1232 | (defun mh-face-display-function () | 1272 | (defun mh-face-display-function () |
| 1233 | "Display a Face, X-Face, or X-Image-URL header field. | 1273 | "Display a Face, X-Face, or X-Image-URL header field. |
| 1234 | If more than one of these are present, then the first one found | 1274 | If more than one of these are present, then the first one found |
| @@ -1259,9 +1299,11 @@ in this order is used." | |||
| 1259 | (mh-funcall-if-exists | 1299 | (mh-funcall-if-exists |
| 1260 | insert-image (create-image | 1300 | insert-image (create-image |
| 1261 | raw type t | 1301 | raw type t |
| 1262 | :foreground (face-foreground 'mh-show-xface) | 1302 | :foreground |
| 1263 | :background (face-background 'mh-show-xface)) | 1303 | (mh-face-foreground-compat 'mh-show-xface nil t) |
| 1264 | " "))) | 1304 | :background |
| 1305 | (mh-face-background-compat 'mh-show-xface nil t)) | ||
| 1306 | " "))) | ||
| 1265 | ;; XEmacs | 1307 | ;; XEmacs |
| 1266 | (mh-do-in-xemacs | 1308 | (mh-do-in-xemacs |
| 1267 | (cond | 1309 | (cond |