aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-06-15 00:14:58 +0000
committerMiles Bader2005-06-15 00:14:58 +0000
commite4c067b5d5d0f373d7f5796e7ceb5bf06f1ddca3 (patch)
tree63a5a9e0ea9cb4f5cab72d59229889e0301da5b4
parent9ce2eb5ebbfda09baafdc5b1cb8f807192f96bfe (diff)
downloademacs-e4c067b5d5d0f373d7f5796e7ceb5bf06f1ddca3.tar.gz
emacs-e4c067b5d5d0f373d7f5796e7ceb5bf06f1ddca3.zip
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418
Remove "-face" suffix from cperl-mode faces 2005-06-14 Miles Bader <miles@gnu.org> * lisp/progmodes/cperl-mode.el (cperl-nonoverridable, cperl-array) (cperl-hash): Remove "-face" suffix from face names. (cperl-nonoverridable-face, cperl-array-face, cperl-hash-face): New backward-compatibility alias for renamed faces. (cperl-find-pods-heres, cperl-init-faces, cperl-ps-print-init) (cperl-ps-print-face-properties): Use renamed cperl-mode faces.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/cperl-mode.el97
2 files changed, 55 insertions, 49 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d932c49995c..7cae0df4661 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,12 @@
12005-06-14 Miles Bader <miles@gnu.org> 12005-06-14 Miles Bader <miles@gnu.org>
2 2
3 * progmodes/cperl-mode.el (cperl-nonoverridable, cperl-array)
4 (cperl-hash): Remove "-face" suffix from face names.
5 (cperl-nonoverridable-face, cperl-array-face, cperl-hash-face):
6 New backward-compatibility alias for renamed faces.
7 (cperl-find-pods-heres, cperl-init-faces, cperl-ps-print-init)
8 (cperl-ps-print-face-properties): Use renamed cperl-mode faces.
9
3 * progmodes/which-func.el (which-func): Remove "-face" suffix from face 10 * progmodes/which-func.el (which-func): Remove "-face" suffix from face
4 name. 11 name.
5 (which-func-face): New backward-compatibility alias for renamed face. 12 (which-func-face): New backward-compatibility alias for renamed face.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 355b9694189..d81ee1ad5c2 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -564,11 +564,11 @@ when syntaxifying a chunk of buffer."
564 (font-lock-variable-name-face nil nil bold) 564 (font-lock-variable-name-face nil nil bold)
565 (font-lock-function-name-face nil nil bold italic box) 565 (font-lock-function-name-face nil nil bold italic box)
566 (font-lock-constant-face nil "LightGray" bold) 566 (font-lock-constant-face nil "LightGray" bold)
567 (cperl-array-face nil "LightGray" bold underline) 567 (cperl-array nil "LightGray" bold underline)
568 (cperl-hash-face nil "LightGray" bold italic underline) 568 (cperl-hash nil "LightGray" bold italic underline)
569 (font-lock-comment-face nil "LightGray" italic) 569 (font-lock-comment-face nil "LightGray" italic)
570 (font-lock-string-face nil nil italic underline) 570 (font-lock-string-face nil nil italic underline)
571 (cperl-nonoverridable-face nil nil italic underline) 571 (cperl-nonoverridable nil nil italic underline)
572 (font-lock-type-face nil nil underline) 572 (font-lock-type-face nil nil underline)
573 (underline nil "LightGray" strikeout)) 573 (underline nil "LightGray" strikeout))
574 "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'." 574 "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'."
@@ -583,7 +583,7 @@ when syntaxifying a chunk of buffer."
583(defvar cperl-dark-foreground 583(defvar cperl-dark-foreground
584 (cperl-choose-color "orchid1" "orange")) 584 (cperl-choose-color "orchid1" "orange"))
585 585
586(defface cperl-nonoverridable-face 586(defface cperl-nonoverridable
587 `((((class grayscale) (background light)) 587 `((((class grayscale) (background light))
588 (:background "Gray90" :slant italic :underline t)) 588 (:background "Gray90" :slant italic :underline t))
589 (((class grayscale) (background dark)) 589 (((class grayscale) (background dark))
@@ -595,8 +595,10 @@ when syntaxifying a chunk of buffer."
595 (t (:weight bold :underline t))) 595 (t (:weight bold :underline t)))
596 "Font Lock mode face used non-overridable keywords and modifiers of regexps." 596 "Font Lock mode face used non-overridable keywords and modifiers of regexps."
597 :group 'cperl-faces) 597 :group 'cperl-faces)
598;; backward-compatibility alias
599(put 'cperl-nonoverridable-face 'face-alias 'cperl-nonoverridable)
598 600
599(defface cperl-array-face 601(defface cperl-array
600 `((((class grayscale) (background light)) 602 `((((class grayscale) (background light))
601 (:background "Gray90" :weight bold)) 603 (:background "Gray90" :weight bold))
602 (((class grayscale) (background dark)) 604 (((class grayscale) (background dark))
@@ -608,8 +610,10 @@ when syntaxifying a chunk of buffer."
608 (t (:weight bold))) 610 (t (:weight bold)))
609 "Font Lock mode face used to highlight array names." 611 "Font Lock mode face used to highlight array names."
610 :group 'cperl-faces) 612 :group 'cperl-faces)
613;; backward-compatibility alias
614(put 'cperl-array-face 'face-alias 'cperl-array)
611 615
612(defface cperl-hash-face 616(defface cperl-hash
613 `((((class grayscale) (background light)) 617 `((((class grayscale) (background light))
614 (:background "Gray90" :weight bold :slant italic)) 618 (:background "Gray90" :weight bold :slant italic))
615 (((class grayscale) (background dark)) 619 (((class grayscale) (background dark))
@@ -621,6 +625,8 @@ when syntaxifying a chunk of buffer."
621 (t (:weight bold :slant italic))) 625 (t (:weight bold :slant italic)))
622 "Font Lock mode face used to highlight hash names." 626 "Font Lock mode face used to highlight hash names."
623 :group 'cperl-faces) 627 :group 'cperl-faces)
628;; backward-compatibility alias
629(put 'cperl-hash-face 'face-alias 'cperl-hash)
624 630
625 631
626 632
@@ -867,8 +873,8 @@ B) Speed of editing operations.
867(defvar cperl-tips-faces 'please-ignore-this-line 873(defvar cperl-tips-faces 'please-ignore-this-line
868 "CPerl mode uses following faces for highlighting: 874 "CPerl mode uses following faces for highlighting:
869 875
870 `cperl-array-face' Array names 876 `cperl-array' Array names
871 `cperl-hash-face' Hash names 877 `cperl-hash' Hash names
872 `font-lock-comment-face' Comments, PODs and whatever is considered 878 `font-lock-comment-face' Comments, PODs and whatever is considered
873 syntaxically to be not code 879 syntaxically to be not code
874 `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of 880 `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of
@@ -879,7 +885,7 @@ B) Speed of editing operations.
879 (except those conflicting with Perl operators), 885 (except those conflicting with Perl operators),
880 package names (when recognized), format names 886 package names (when recognized), format names
881 `font-lock-keyword-face' Control flow switch constructs, declarators 887 `font-lock-keyword-face' Control flow switch constructs, declarators
882 `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen 888 `cperl-nonoverridable' Non-overridable keywords, modifiers of RExen
883 `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, 889 `font-lock-string-face' Strings, qw() constructs, RExen, POD sections,
884 literal parts and the terminator of formats 890 literal parts and the terminator of formats
885 and whatever is syntaxically considered 891 and whatever is syntaxically considered
@@ -887,7 +893,7 @@ B) Speed of editing operations.
887 `font-lock-type-face' Overridable keywords 893 `font-lock-type-face' Overridable keywords
888 `font-lock-variable-name-face' Variable declarations, indirect array and 894 `font-lock-variable-name-face' Variable declarations, indirect array and
889 hash names, POD headers/item names 895 hash names, POD headers/item names
890 `cperl-invalid-face' Trailing whitespace 896 `cperl-invalid' Trailing whitespace
891 897
892Note that in several situations the highlighting tries to inform about 898Note that in several situations the highlighting tries to inform about
893possible confusion, such as different colors for function names in 899possible confusion, such as different colors for function names in
@@ -3167,7 +3173,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
3167 (cperl-nonoverridable-face 3173 (cperl-nonoverridable-face
3168 (if (boundp 'cperl-nonoverridable-face) 3174 (if (boundp 'cperl-nonoverridable-face)
3169 cperl-nonoverridable-face 3175 cperl-nonoverridable-face
3170 'cperl-nonoverridable-face)) 3176 'cperl-nonoverridable))
3171 (stop-point (if ignore-max 3177 (stop-point (if ignore-max
3172 (point-max) 3178 (point-max)
3173 max)) 3179 max))
@@ -3661,7 +3667,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
3661 (forward-word 1) ; skip modifiers s///s 3667 (forward-word 1) ; skip modifiers s///s
3662 (if tail (cperl-commentify tail (point) t)) 3668 (if tail (cperl-commentify tail (point) t))
3663 (cperl-postpone-fontification 3669 (cperl-postpone-fontification
3664 e1 (point) 'face 'cperl-nonoverridable-face))) 3670 e1 (point) 'face 'cperl-nonoverridable)))
3665 ;; Check whether it is m// which means "previous match" 3671 ;; Check whether it is m// which means "previous match"
3666 ;; and highlight differently 3672 ;; and highlight differently
3667 (setq is-REx 3673 (setq is-REx
@@ -4710,7 +4716,7 @@ indentation and initial hashes. Behaves usually outside of comment."
4710 "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" 4716 "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|"
4711 "while\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually 4717 "while\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually
4712 "\\|[sm]" ; Added manually 4718 "\\|[sm]" ; Added manually
4713 "\\)\\>") 2 'cperl-nonoverridable-face) 4719 "\\)\\>") 2 'cperl-nonoverridable)
4714 ;; (mapconcat 'identity 4720 ;; (mapconcat 'identity
4715 ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if" 4721 ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if"
4716 ;; "#include" "#define" "#undef") 4722 ;; "#include" "#define" "#undef")
@@ -4854,21 +4860,21 @@ indentation and initial hashes. Behaves usually outside of comment."
4854 [nil nil t t t] 4860 [nil nil t t t]
4855 nil 4861 nil
4856 [nil nil t t t]) 4862 [nil nil t t t])
4857 (list 'cperl-nonoverridable-face 4863 (list 'cperl-nonoverridable
4858 ["chartreuse3" ("orchid1" "orange") 4864 ["chartreuse3" ("orchid1" "orange")
4859 nil "Gray80"] 4865 nil "Gray80"]
4860 [nil nil "gray90"] 4866 [nil nil "gray90"]
4861 [nil nil nil t t] 4867 [nil nil nil t t]
4862 [nil nil t t] 4868 [nil nil t t]
4863 [nil nil t t t]) 4869 [nil nil t t t])
4864 (list 'cperl-array-face 4870 (list 'cperl-array
4865 ["blue" "yellow" nil "Gray80"] 4871 ["blue" "yellow" nil "Gray80"]
4866 ["lightyellow2" ("navy" "os2blue" "darkgreen") 4872 ["lightyellow2" ("navy" "os2blue" "darkgreen")
4867 "gray90"] 4873 "gray90"]
4868 t 4874 t
4869 nil 4875 nil
4870 nil) 4876 nil)
4871 (list 'cperl-hash-face 4877 (list 'cperl-hash
4872 ["red" "red" nil "Gray80"] 4878 ["red" "red" nil "Gray80"]
4873 ["lightyellow2" ("navy" "os2blue" "darkgreen") 4879 ["lightyellow2" ("navy" "os2blue" "darkgreen")
4874 "gray90"] 4880 "gray90"]
@@ -4891,15 +4897,15 @@ indentation and initial hashes. Behaves usually outside of comment."
4891 "Face for variable names") 4897 "Face for variable names")
4892 (cperl-force-face font-lock-type-face 4898 (cperl-force-face font-lock-type-face
4893 "Face for data types") 4899 "Face for data types")
4894 (cperl-force-face cperl-nonoverridable-face 4900 (cperl-force-face cperl-nonoverridable
4895 "Face for data types from another group") 4901 "Face for data types from another group")
4896 (cperl-force-face font-lock-comment-face 4902 (cperl-force-face font-lock-comment-face
4897 "Face for comments") 4903 "Face for comments")
4898 (cperl-force-face font-lock-function-name-face 4904 (cperl-force-face font-lock-function-name-face
4899 "Face for function names") 4905 "Face for function names")
4900 (cperl-force-face cperl-hash-face 4906 (cperl-force-face cperl-hash
4901 "Face for hashes") 4907 "Face for hashes")
4902 (cperl-force-face cperl-array-face 4908 (cperl-force-face cperl-array
4903 "Face for arrays") 4909 "Face for arrays")
4904 ;;(defvar font-lock-constant-face 'font-lock-constant-face) 4910 ;;(defvar font-lock-constant-face 'font-lock-constant-face)
4905 ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face) 4911 ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face)
@@ -4909,7 +4915,7 @@ indentation and initial hashes. Behaves usually outside of comment."
4909 ;; "Face to use for data types.")) 4915 ;; "Face to use for data types."))
4910 ;;(or (boundp 'cperl-nonoverridable-face) 4916 ;;(or (boundp 'cperl-nonoverridable-face)
4911 ;; (defconst cperl-nonoverridable-face 4917 ;; (defconst cperl-nonoverridable-face
4912 ;; 'cperl-nonoverridable-face 4918 ;; 'cperl-nonoverridable
4913 ;; "Face to use for data types from another group.")) 4919 ;; "Face to use for data types from another group."))
4914 ;;(if (not cperl-xemacs-p) nil 4920 ;;(if (not cperl-xemacs-p) nil
4915 ;; (or (boundp 'font-lock-comment-face) 4921 ;; (or (boundp 'font-lock-comment-face)
@@ -4925,26 +4931,24 @@ indentation and initial hashes. Behaves usually outside of comment."
4925 ;; 'font-lock-function-name-face 4931 ;; 'font-lock-function-name-face
4926 ;; "Face to use for function names."))) 4932 ;; "Face to use for function names.")))
4927 (if (and 4933 (if (and
4928 (not (cperl-is-face 'cperl-array-face)) 4934 (not (cperl-is-face 'cperl-array))
4929 (cperl-is-face 'font-lock-emphasized-face)) 4935 (cperl-is-face 'font-lock-emphasized-face))
4930 (copy-face 'font-lock-emphasized-face 'cperl-array-face)) 4936 (copy-face 'font-lock-emphasized-face 'cperl-array))
4931 (if (and 4937 (if (and
4932 (not (cperl-is-face 'cperl-hash-face)) 4938 (not (cperl-is-face 'cperl-hash))
4933 (cperl-is-face 'font-lock-other-emphasized-face)) 4939 (cperl-is-face 'font-lock-other-emphasized-face))
4934 (copy-face 'font-lock-other-emphasized-face 4940 (copy-face 'font-lock-other-emphasized-face 'cperl-hash))
4935 'cperl-hash-face))
4936 (if (and 4941 (if (and
4937 (not (cperl-is-face 'cperl-nonoverridable-face)) 4942 (not (cperl-is-face 'cperl-nonoverridable))
4938 (cperl-is-face 'font-lock-other-type-face)) 4943 (cperl-is-face 'font-lock-other-type-face))
4939 (copy-face 'font-lock-other-type-face 4944 (copy-face 'font-lock-other-type-face 'cperl-nonoverridable))
4940 'cperl-nonoverridable-face))
4941 ;;(or (boundp 'cperl-hash-face) 4945 ;;(or (boundp 'cperl-hash-face)
4942 ;; (defconst cperl-hash-face 4946 ;; (defconst cperl-hash-face
4943 ;; 'cperl-hash-face 4947 ;; 'cperl-hash
4944 ;; "Face to use for hashes.")) 4948 ;; "Face to use for hashes."))
4945 ;;(or (boundp 'cperl-array-face) 4949 ;;(or (boundp 'cperl-array-face)
4946 ;; (defconst cperl-array-face 4950 ;; (defconst cperl-array-face
4947 ;; 'cperl-array-face 4951 ;; 'cperl-array
4948 ;; "Face to use for arrays.")) 4952 ;; "Face to use for arrays."))
4949 ;; Here we try to guess background 4953 ;; Here we try to guess background
4950 (let ((background 4954 (let ((background
@@ -4983,17 +4987,17 @@ indentation and initial hashes. Behaves usually outside of comment."
4983 "pink"))) 4987 "pink")))
4984 (t 4988 (t
4985 (set-face-background 'font-lock-type-face "gray90")))) 4989 (set-face-background 'font-lock-type-face "gray90"))))
4986 (if (cperl-is-face 'cperl-nonoverridable-face) 4990 (if (cperl-is-face 'cperl-nonoverridable)
4987 nil 4991 nil
4988 (copy-face 'font-lock-type-face 'cperl-nonoverridable-face) 4992 (copy-face 'font-lock-type-face 'cperl-nonoverridable)
4989 (cond 4993 (cond
4990 ((eq background 'light) 4994 ((eq background 'light)
4991 (set-face-foreground 'cperl-nonoverridable-face 4995 (set-face-foreground 'cperl-nonoverridable
4992 (if (x-color-defined-p "chartreuse3") 4996 (if (x-color-defined-p "chartreuse3")
4993 "chartreuse3" 4997 "chartreuse3"
4994 "chartreuse"))) 4998 "chartreuse")))
4995 ((eq background 'dark) 4999 ((eq background 'dark)
4996 (set-face-foreground 'cperl-nonoverridable-face 5000 (set-face-foreground 'cperl-nonoverridable
4997 (if (x-color-defined-p "orchid1") 5001 (if (x-color-defined-p "orchid1")
4998 "orchid1" 5002 "orchid1"
4999 "orange"))))) 5003 "orange")))))
@@ -5045,20 +5049,15 @@ indentation and initial hashes. Behaves usually outside of comment."
5045 '(setq ps-bold-faces 5049 '(setq ps-bold-faces
5046 ;; font-lock-variable-name-face 5050 ;; font-lock-variable-name-face
5047 ;; font-lock-constant-face 5051 ;; font-lock-constant-face
5048 (append '(cperl-array-face 5052 (append '(cperl-array cperl-hash)
5049 cperl-hash-face)
5050 ps-bold-faces) 5053 ps-bold-faces)
5051 ps-italic-faces 5054 ps-italic-faces
5052 ;; font-lock-constant-face 5055 ;; font-lock-constant-face
5053 (append '(cperl-nonoverridable-face 5056 (append '(cperl-nonoverridable cperl-hash)
5054 cperl-hash-face)
5055 ps-italic-faces) 5057 ps-italic-faces)
5056 ps-underlined-faces 5058 ps-underlined-faces
5057 ;; font-lock-type-face 5059 ;; font-lock-type-face
5058 (append '(cperl-array-face 5060 (append '(cperl-array cperl-hash underline cperl-nonoverridable)
5059 cperl-hash-face
5060 underline
5061 cperl-nonoverridable-face)
5062 ps-underlined-faces)))) 5061 ps-underlined-faces))))
5063 5062
5064(defvar ps-print-face-extension-alist) 5063(defvar ps-print-face-extension-alist)
@@ -5091,27 +5090,27 @@ Style of printout regulated by the variable `cperl-ps-print-face-properties'."
5091;;; (defvar ps-italic-faces nil) 5090;;; (defvar ps-italic-faces nil)
5092;;; (setq ps-bold-faces 5091;;; (setq ps-bold-faces
5093;;; (append '(font-lock-emphasized-face 5092;;; (append '(font-lock-emphasized-face
5094;;; cperl-array-face 5093;;; cperl-array
5095;;; font-lock-keyword-face 5094;;; font-lock-keyword-face
5096;;; font-lock-variable-name-face 5095;;; font-lock-variable-name-face
5097;;; font-lock-constant-face 5096;;; font-lock-constant-face
5098;;; font-lock-reference-face 5097;;; font-lock-reference-face
5099;;; font-lock-other-emphasized-face 5098;;; font-lock-other-emphasized-face
5100;;; cperl-hash-face) 5099;;; cperl-hash)
5101;;; ps-bold-faces)) 5100;;; ps-bold-faces))
5102;;; (setq ps-italic-faces 5101;;; (setq ps-italic-faces
5103;;; (append '(cperl-nonoverridable-face 5102;;; (append '(cperl-nonoverridable
5104;;; font-lock-constant-face 5103;;; font-lock-constant-face
5105;;; font-lock-reference-face 5104;;; font-lock-reference-face
5106;;; font-lock-other-emphasized-face 5105;;; font-lock-other-emphasized-face
5107;;; cperl-hash-face) 5106;;; cperl-hash)
5108;;; ps-italic-faces)) 5107;;; ps-italic-faces))
5109;;; (setq ps-underlined-faces 5108;;; (setq ps-underlined-faces
5110;;; (append '(font-lock-emphasized-face 5109;;; (append '(font-lock-emphasized-face
5111;;; cperl-array-face 5110;;; cperl-array
5112;;; font-lock-other-emphasized-face 5111;;; font-lock-other-emphasized-face
5113;;; cperl-hash-face 5112;;; cperl-hash
5114;;; cperl-nonoverridable-face font-lock-type-face) 5113;;; cperl-nonoverridable font-lock-type-face)
5115;;; ps-underlined-faces)) 5114;;; ps-underlined-faces))
5116;;; (cons 'font-lock-type-face ps-underlined-faces)) 5115;;; (cons 'font-lock-type-face ps-underlined-faces))
5117 5116