aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2010-05-27 11:25:58 -0400
committerChong Yidong2010-05-27 11:25:58 -0400
commit4da3541bbe03a21225fd0d409c54b2fc3778c6ee (patch)
treef716c43fcbe95bef93d41a7a1fcc6f89fd10ad11
parent397eb3f3e779ed4bd20facb34e4b418f65540643 (diff)
downloademacs-4da3541bbe03a21225fd0d409c54b2fc3778c6ee.tar.gz
emacs-4da3541bbe03a21225fd0d409c54b2fc3778c6ee.zip
* progmodes/verilog-mode.el (verilog-type-font-keywords): Use
font-lock-constant-face, not obsolete font-lock-reference-face. * htmlfontify.el (hfy-face-resolve-face): New function. (hfy-face-to-style): Use it (Bug#6279).
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/htmlfontify.el15
-rw-r--r--lisp/progmodes/verilog-mode.el6
3 files changed, 26 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ed5d215a953..63a2d0bc027 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12010-05-27 Chong Yidong <cyd@stupidchicken.com>
2
3 * progmodes/verilog-mode.el (verilog-type-font-keywords): Use
4 font-lock-constant-face, not obsolete font-lock-reference-face.
5
62010-05-27 Masatake YAMATO <yamato@redhat.com>
7
8 * htmlfontify.el (hfy-face-resolve-face): New function.
9 (hfy-face-to-style): Use it (Bug#6279).
10
12010-05-25 Stefan Monnier <monnier@iro.umontreal.ca> 112010-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * epa.el (epa--select-keys): Don't explicitly delete the window since 13 * epa.el (epa--select-keys): Don't explicitly delete the window since
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 19aae590cb2..b363156c311 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -1059,14 +1059,25 @@ haven't encountered them yet. Returns a `hfy-style-assoc'."
1059 (setq n (apply '* m)) 1059 (setq n (apply '* m))
1060 (nconc r (hfy-size (if x (round n) (* n 1.0)))) )) 1060 (nconc r (hfy-size (if x (round n) (* n 1.0)))) ))
1061 1061
1062(defun hfy-face-resolve-face (fn)
1063 (cond
1064 ((facep fn)
1065 (hfy-face-attr-for-class fn hfy-display-class))
1066 ((and (symbolp fn)
1067 (facep (symbol-value fn)))
1068 ;; Obsolete faces like `font-lock-reference-face' are defined as
1069 ;; aliases for another face.
1070 (hfy-face-attr-for-class (symbol-value fn) hfy-display-class))
1071 (t nil)))
1072
1073
1062(defun hfy-face-to-style (fn) 1074(defun hfy-face-to-style (fn)
1063 "Take FN, a font or `defface' style font specification, 1075 "Take FN, a font or `defface' style font specification,
1064\(as returned by `face-attr-construct' or `hfy-face-attr-for-class') 1076\(as returned by `face-attr-construct' or `hfy-face-attr-for-class')
1065and return a `hfy-style-assoc'.\n 1077and return a `hfy-style-assoc'.\n
1066See also `hfy-face-to-style-i', `hfy-flatten-style'." 1078See also `hfy-face-to-style-i', `hfy-flatten-style'."
1067 ;;(message "hfy-face-to-style");;DBUG 1079 ;;(message "hfy-face-to-style");;DBUG
1068 (let ((face-def (if (facep fn) 1080 (let ((face-def (hfy-face-resolve-face fn))
1069 (hfy-face-attr-for-class fn hfy-display-class) fn))
1070 (final-style nil)) 1081 (final-style nil))
1071 1082
1072 (setq final-style (hfy-flatten-style (hfy-face-to-style-i face-def))) 1083 (setq final-style (hfy-flatten-style (hfy-face-to-style-i face-def)))
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index e391216796b..4a704b0416c 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -2425,12 +2425,12 @@ See also `verilog-font-lock-extra-types'.")
2425 (list 2425 (list
2426 (concat "\\<function\\>\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" ) 2426 (concat "\\<function\\>\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" )
2427 '(1 font-lock-keyword-face) 2427 '(1 font-lock-keyword-face)
2428 '(3 font-lock-reference-face prepend)) 2428 '(3 font-lock-constant-face prepend))
2429 '("\\<function\\>\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)" 2429 '("\\<function\\>\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)"
2430 (1 font-lock-keyword-face) 2430 (1 font-lock-keyword-face)
2431 (2 font-lock-reference-face append)) 2431 (2 font-lock-constant-face append))
2432 '("\\<function\\>\\s-+\\(\\sw+\\)" 2432 '("\\<function\\>\\s-+\\(\\sw+\\)"
2433 1 'font-lock-reference-face append)))) 2433 1 'font-lock-constant-face append))))
2434 2434
2435 (setq verilog-font-lock-keywords-2 2435 (setq verilog-font-lock-keywords-2
2436 (append verilog-font-lock-keywords-1 2436 (append verilog-font-lock-keywords-1