[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Font lock & RMAIL enhancement patch
From: |
Eric M. Ludlam |
Subject: |
Font lock & RMAIL enhancement patch |
Date: |
Thu, 29 Nov 2001 23:16:41 -0500 |
I was playing around with faces and noticed that Emacs 21 supports the
nifty `strike-through' feature for faces, but it doesn't seem to be
used. The following patch adds a `deleted-face' to font lock which
uses strike through, and then uses it for deleted messages in RMAIL.
There are a bunch of other modes such ad dired, gnus, and buff-menu
which could also take advantage of such a face, which is why I added
it to font lock.
What do you think?
Eric
-----------------------------
*** font-lock.el.~1.184.~ Mon Nov 12 08:28:56 2001
--- font-lock.el Thu Nov 29 23:09:07 2001
***************
*** 339,344 ****
--- 339,347 ----
(defvar font-lock-warning-face 'font-lock-warning-face
"Face name to use for things that should stand out.")
+ (defvar font-lock-deleted-face 'font-lock-deleted-face
+ "Face name to use for things that should be crossed out.")
+
(defvar font-lock-reference-face 'font-lock-constant-face
"This variable is obsolete. Use `font-lock-constant-face'.")
***************
*** 1917,1922 ****
--- 1920,1934 ----
(t (:inverse-video t :bold t)))
"Font Lock mode face used to highlight warnings."
:group 'font-lock-highlighting-faces)
+
+ (defface font-lock-deleted-face
+ '((((type tty) (class color)) (:underline t))
+ (((class color) (background light)) (:strike-through "Red"))
+ (((class color) (background dark)) (:strike-through "Pink"))
+ (t (:inverse-video t)))
+ "Font Lock mode face used to highlight deleted information."
+ :group 'font-lock-highlighting-faces)
+
;;; End of Colour etc. support.
-------------------------------------
*** rmailsum.el.~1.122.~ Mon Nov 12 08:32:22 2001
--- rmailsum.el Thu Nov 29 23:09:38 2001
***************
*** 47,53 ****
:group 'rmail-summary)
(defvar rmail-summary-font-lock-keywords
! '(("^.....D.*" . font-lock-string-face) ; Deleted.
("^.....-.*" . font-lock-type-face) ;
Unread.
;; Neither of the below will be highlighted if either of the above are:
("^.....[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date.
--- 47,53 ----
:group 'rmail-summary)
(defvar rmail-summary-font-lock-keywords
! '(("^.....D.*" . font-lock-deleted-face) ; Deleted.
("^.....-.*" . font-lock-type-face) ;
Unread.
;; Neither of the below will be highlighted if either of the above are:
("^.....[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date.
--
Eric Ludlam: address@hidden, address@hidden
Home: www.ultranet.com/~zappo Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: www.gnu.org
- Font lock & RMAIL enhancement patch,
Eric M. Ludlam <=