aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-06-10 08:48:45 +0000
committerMiles Bader2005-06-10 08:48:45 +0000
commita01853d708e066ebed3557f3fcd005b265e164a8 (patch)
tree813ce48829661b0327fcb36961d24d902cf8ac1a
parentf0b3dcbfb1bec0db039c4c1b276c278f97ad695b (diff)
downloademacs-a01853d708e066ebed3557f3fcd005b265e164a8.tar.gz
emacs-a01853d708e066ebed3557f3fcd005b265e164a8.zip
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377
Remove "-face" suffix from highlight-changes faces 2005-06-10 Miles Bader <miles@gnu.org> * lisp/hilit-chg.el (highlight-changes, highlight-changes-delete): Remove "-face" suffix from face names. (highlight-changes-face, highlight-changes-delete-face): New backward-compatibility aliases for renamed faces. (hilit-chg-cust-fix-changes-face-list, hilit-chg-make-ov) (hilit-chg-make-list): Use renamed highlight-changes faces.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/hilit-chg.el34
2 files changed, 26 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5b142fc4677..e1034b4bfc3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,12 @@
12005-06-10 Miles Bader <miles@gnu.org> 12005-06-10 Miles Bader <miles@gnu.org>
2 2
3 * hilit-chg.el (highlight-changes, highlight-changes-delete):
4 Remove "-face" suffix from face names.
5 (highlight-changes-face, highlight-changes-delete-face):
6 New backward-compatibility aliases for renamed faces.
7 (hilit-chg-cust-fix-changes-face-list, hilit-chg-make-ov)
8 (hilit-chg-make-list): Use renamed highlight-changes faces.
9
3 * generic-x.el (show-tabs-tab, show-tabs-space): 10 * generic-x.el (show-tabs-tab, show-tabs-space):
4 Remove "-face" suffix from face names. 11 Remove "-face" suffix from face names.
5 (show-tabs-tab-face, show-tabs-space-face): 12 (show-tabs-tab-face, show-tabs-space-face):
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index a6db060ce0f..4e9fbeb53f6 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -37,9 +37,9 @@
37;; it on to active mode to see them, then toggle it back off to avoid 37;; it on to active mode to see them, then toggle it back off to avoid
38;; distraction. 38;; distraction.
39;; 39;;
40;; When active, changes are displayed in `highlight-changes-face'. When 40;; When active, changes are displayed in the `highlight-changes' face.
41;; text is deleted, the following character is displayed in 41;; When text is deleted, the following character is displayed in the
42;; `highlight-changes-delete-face' face. 42;; `highlight-changes-delete' face.
43;; 43;;
44;; 44;;
45;; You can "age" different sets of changes by using 45;; You can "age" different sets of changes by using
@@ -48,7 +48,7 @@
48;; changes. You can customize these "rotated" faces in two ways. You can 48;; changes. You can customize these "rotated" faces in two ways. You can
49;; either explicitly define each face by customizing 49;; either explicitly define each face by customizing
50;; `highlight-changes-face-list'. If, however, the faces differ from 50;; `highlight-changes-face-list'. If, however, the faces differ from
51;; `highlight-changes-face' only in the foreground color, you can simply set 51;; the `highlight-changes' face only in the foreground color, you can simply set
52;; `highlight-changes-colours'. If `highlight-changes-face-list' is nil when 52;; `highlight-changes-colours'. If `highlight-changes-face-list' is nil when
53;; the faces are required they will be constructed from 53;; the faces are required they will be constructed from
54;; `highlight-changes-colours'. 54;; `highlight-changes-colours'.
@@ -212,20 +212,24 @@
212;; However, having it set for non-delete changes can be annoying because all 212;; However, having it set for non-delete changes can be annoying because all
213;; indentation on inserts gets underlined (which can look pretty ugly!). 213;; indentation on inserts gets underlined (which can look pretty ugly!).
214 214
215(defface highlight-changes-face 215(defface highlight-changes
216 '((((min-colors 88) (class color)) (:foreground "red1" )) 216 '((((min-colors 88) (class color)) (:foreground "red1" ))
217 (((class color)) (:foreground "red" )) 217 (((class color)) (:foreground "red" ))
218 (t (:inverse-video t))) 218 (t (:inverse-video t)))
219 "Face used for highlighting changes." 219 "Face used for highlighting changes."
220 :group 'highlight-changes) 220 :group 'highlight-changes)
221;; backward-compatibility alias
222(put 'highlight-changes-face 'face-alias 'highlight-changes)
221 223
222;; This looks pretty ugly, actually. Maybe the underline should be removed. 224;; This looks pretty ugly, actually. Maybe the underline should be removed.
223(defface highlight-changes-delete-face 225(defface highlight-changes-delete
224 '((((min-colors 88) (class color)) (:foreground "red1" :underline t)) 226 '((((min-colors 88) (class color)) (:foreground "red1" :underline t))
225 (((class color)) (:foreground "red" :underline t)) 227 (((class color)) (:foreground "red" :underline t))
226 (t (:inverse-video t))) 228 (t (:inverse-video t)))
227 "Face used for highlighting deletions." 229 "Face used for highlighting deletions."
228 :group 'highlight-changes) 230 :group 'highlight-changes)
231;; backward-compatibility alias
232(put 'highlight-changes-delete-face 'face-alias 'highlight-changes-delete)
229 233
230 234
231 235
@@ -347,15 +351,15 @@ remove it from existing buffers."
347 ) 351 )
348 (while p 352 (while p
349 (setq old-name (car p)) 353 (setq old-name (car p))
350 (setq new-name (intern (format "highlight-changes-face-%d" n))) 354 (setq new-name (intern (format "highlight-changes-%d" n)))
351 (if (eq old-name new-name) 355 (if (eq old-name new-name)
352 nil 356 nil
353 ;; A new face has been inserted: we don't want to modify the 357 ;; A new face has been inserted: we don't want to modify the
354 ;; default face so copy it. Better, though, (I think) is to 358 ;; default face so copy it. Better, though, (I think) is to
355 ;; make a new face have the same attributes as 359 ;; make a new face have the same attributes as
356 ;; highlight-changes-face . 360 ;; the `highlight-changes' face.
357 (if (eq old-name 'default) 361 (if (eq old-name 'default)
358 (copy-face 'highlight-changes-face new-name) 362 (copy-face 'highlight-changes new-name)
359 (copy-face old-name new-name) 363 (copy-face old-name new-name)
360 )) 364 ))
361 (setq new-list (append (list new-name) new-list)) 365 (setq new-list (append (list new-name) new-list))
@@ -379,7 +383,7 @@ remove it from existing buffers."
379Normally the variable is initialized to nil and the list is created from 383Normally the variable is initialized to nil and the list is created from
380`highlight-changes-colours' when needed. However, you can set this variable 384`highlight-changes-colours' when needed. However, you can set this variable
381to any list of faces. You will have to do this if you want faces which 385to any list of faces. You will have to do this if you want faces which
382don't just differ from `highlight-changes-face' by the foreground colour. 386don't just differ from the `highlight-changes' face by the foreground colour.
383Otherwise, this list will be constructed when needed from 387Otherwise, this list will be constructed when needed from
384`highlight-changes-colours'." 388`highlight-changes-colours'."
385 :type '(choice 389 :type '(choice
@@ -445,7 +449,7 @@ This is the opposite of `hilit-chg-hide-changes'."
445 (let ((ov (make-overlay start end)) 449 (let ((ov (make-overlay start end))
446 face) 450 face)
447 (if (eq prop 'hilit-chg-delete) 451 (if (eq prop 'hilit-chg-delete)
448 (setq face 'highlight-changes-delete-face) 452 (setq face 'highlight-changes-delete)
449 (setq face (nth 1 (member prop hilit-chg-list)))) 453 (setq face (nth 1 (member prop hilit-chg-list))))
450 (if face 454 (if face
451 (progn 455 (progn
@@ -731,20 +735,20 @@ Hook variables:
731 (n 1) name) 735 (n 1) name)
732 (setq highlight-changes-face-list nil) 736 (setq highlight-changes-face-list nil)
733 (while p 737 (while p
734 (setq name (intern (format "highlight-changes-face-%d" n))) 738 (setq name (intern (format "highlight-changes-%d" n)))
735 (copy-face 'highlight-changes-face name) 739 (copy-face 'highlight-changes name)
736 (set-face-foreground name (car p)) 740 (set-face-foreground name (car p))
737 (setq highlight-changes-face-list 741 (setq highlight-changes-face-list
738 (append highlight-changes-face-list (list name))) 742 (append highlight-changes-face-list (list name)))
739 (setq p (cdr p)) 743 (setq p (cdr p))
740 (setq n (1+ n))))) 744 (setq n (1+ n)))))
741 (setq hilit-chg-list (list 'hilit-chg 'highlight-changes-face)) 745 (setq hilit-chg-list (list 'hilit-chg 'highlight-changes))
742 (let ((p highlight-changes-face-list) 746 (let ((p highlight-changes-face-list)
743 (n 1) 747 (n 1)
744 last-category last-face) 748 last-category last-face)
745 (while p 749 (while p
746 (setq last-category (intern (format "change-%d" n))) 750 (setq last-category (intern (format "change-%d" n)))
747 ;; (setq last-face (intern (format "highlight-changes-face-%d" n))) 751 ;; (setq last-face (intern (format "highlight-changes-%d" n)))
748 (setq last-face (car p)) 752 (setq last-face (car p))
749 (setq hilit-chg-list 753 (setq hilit-chg-list
750 (append hilit-chg-list 754 (append hilit-chg-list