emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99816: * progmodes/verilog-mode.e


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99816: * progmodes/verilog-mode.el (verilog-type-font-keywords): Use
Date: Thu, 27 May 2010 11:25:58 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99816
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Thu 2010-05-27 11:25:58 -0400
message:
  * 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).
modified:
  lisp/ChangeLog
  lisp/htmlfontify.el
  lisp/progmodes/verilog-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-05-25 17:53:37 +0000
+++ b/lisp/ChangeLog    2010-05-27 15:25:58 +0000
@@ -1,3 +1,13 @@
+2010-05-27  Chong Yidong  <address@hidden>
+
+       * progmodes/verilog-mode.el (verilog-type-font-keywords): Use
+       font-lock-constant-face, not obsolete font-lock-reference-face.
+
+2010-05-27  Masatake YAMATO  <address@hidden>
+
+       * htmlfontify.el (hfy-face-resolve-face): New function.
+       (hfy-face-to-style): Use it (Bug#6279).
+
 2010-05-25  Stefan Monnier  <address@hidden>
 
        * epa.el (epa--select-keys): Don't explicitly delete the window since

=== modified file 'lisp/htmlfontify.el'
--- a/lisp/htmlfontify.el       2010-04-17 02:07:48 +0000
+++ b/lisp/htmlfontify.el       2010-05-27 15:25:58 +0000
@@ -1059,14 +1059,25 @@
     (setq  n (apply '* m))
     (nconc r (hfy-size (if x (round n) (* n 1.0)))) ))
 
+(defun hfy-face-resolve-face (fn)
+  (cond
+   ((facep fn)
+    (hfy-face-attr-for-class fn hfy-display-class))
+   ((and (symbolp fn)
+        (facep (symbol-value fn)))
+    ;; Obsolete faces like `font-lock-reference-face' are defined as
+    ;; aliases for another face.
+    (hfy-face-attr-for-class (symbol-value fn) hfy-display-class))
+   (t nil)))
+
+
 (defun hfy-face-to-style (fn)
   "Take FN, a font or `defface' style font specification,
 \(as returned by `face-attr-construct' or `hfy-face-attr-for-class')
 and return a `hfy-style-assoc'.\n
 See also `hfy-face-to-style-i', `hfy-flatten-style'."
   ;;(message "hfy-face-to-style");;DBUG
-  (let ((face-def (if (facep fn)
-                      (hfy-face-attr-for-class fn hfy-display-class) fn))
+  (let ((face-def (hfy-face-resolve-face fn))
         (final-style nil))
 
     (setq final-style (hfy-flatten-style (hfy-face-to-style-i face-def)))

=== modified file 'lisp/progmodes/verilog-mode.el'
--- a/lisp/progmodes/verilog-mode.el    2010-01-13 08:35:10 +0000
+++ b/lisp/progmodes/verilog-mode.el    2010-05-27 15:25:58 +0000
@@ -2425,12 +2425,12 @@
                 (list
                  (concat 
"\\<function\\>\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" )
                       '(1 font-lock-keyword-face)
-                      '(3 font-lock-reference-face prepend))
+                      '(3 font-lock-constant-face prepend))
                 '("\\<function\\>\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)"
                   (1 font-lock-keyword-face)
-                  (2 font-lock-reference-face append))
+                  (2 font-lock-constant-face append))
                 '("\\<function\\>\\s-+\\(\\sw+\\)"
-                  1 'font-lock-reference-face append))))
+                  1 'font-lock-constant-face append))))
 
   (setq verilog-font-lock-keywords-2
        (append verilog-font-lock-keywords-1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]