From 6c27f0f80c4d521dca7b75dcc52a143106561820 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 24 Sep 2012 19:39:33 +0800 Subject: [PATCH] Fix uses of long-obsolete font-lock-reference face. * generic-x.el (rul-generic-mode): Use font-lock-constant-face. * calendar/calendar.el (calendar-font-lock-keywords): * calendar/diary-lib.el (diary-font-lock-keywords) (diary-fancy-font-lock-keywords): * textmodes/reftex-sel.el (reftex-insert-docstruct): * textmodes/reftex-index.el (reftex-insert-index): * textmodes/reftex-cite.el (reftex-format-bib-entry): * progmodes/ruby-mode.el (ruby-font-lock-keywords): * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1): * progmodes/prolog.el (prolog-font-lock-keywords): * progmodes/idlwave.el (idlwave-idl-keywords): * progmodes/ada-mode.el (ada-font-lock-keywords): * net/snmp-mode.el (snmp-font-lock-keywords-3): Likewise. * font-lock.el (font-lock-reference-face): Use define-obsolete-variable-alias. --- lisp/ChangeLog | 19 +++++++++++++++++++ lisp/calendar/calendar.el | 2 +- lisp/calendar/diary-lib.el | 8 ++++---- lisp/generic-x.el | 6 +++--- lisp/progmodes/ada-mode.el | 4 ++-- lisp/progmodes/idlwave.el | 10 +++++----- lisp/progmodes/prolog.el | 2 +- lisp/progmodes/ps-mode.el | 4 ++-- lisp/progmodes/ruby-mode.el | 4 ++-- lisp/textmodes/reftex-cite.el | 5 +---- lisp/textmodes/reftex-index.el | 4 +--- lisp/textmodes/reftex-sel.el | 8 ++------ lisp/textmodes/reftex.el | 4 +--- 13 files changed, 44 insertions(+), 36 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6203b2a7790..95c9b7930af 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2012-09-24 Chong Yidong + + * font-lock.el (font-lock-reference-face): Use + define-obsolete-variable-alias. + + * generic-x.el (rul-generic-mode): Use font-lock-constant-face. + * calendar/calendar.el (calendar-font-lock-keywords): + * calendar/diary-lib.el (diary-font-lock-keywords) + (diary-fancy-font-lock-keywords): + * textmodes/reftex-sel.el (reftex-insert-docstruct): + * textmodes/reftex-index.el (reftex-insert-index): + * textmodes/reftex-cite.el (reftex-format-bib-entry): + * progmodes/ruby-mode.el (ruby-font-lock-keywords): + * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1): + * progmodes/prolog.el (prolog-font-lock-keywords): + * progmodes/idlwave.el (idlwave-idl-keywords): + * progmodes/ada-mode.el (ada-font-lock-keywords): + * net/snmp-mode.el (snmp-font-lock-keywords-3): Likewise. + 2012-09-24 Glenn Morris * mail/emacsbug.el (report-emacs-bug): Include `lsb_release -d'. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 93ef440541e..c85b775d9d3 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -2298,7 +2298,7 @@ Negative years are interpreted as years BC; -1 being 1 BC, and so on." ;; First two chars of each day are used in the calendar. (,(regexp-opt (mapcar (lambda (x) (substring x 0 calendar-day-header-width)) calendar-day-name-array)) - . font-lock-reference-face)) + . font-lock-constant-face)) "Default keywords to highlight in Calendar mode.") (defun calendar-day-name (date &optional abbrev absolute) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 4bce8ec0927..27c6f76581c 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -2400,10 +2400,10 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL." (cons (format "^%s?\\(%s\\)" (regexp-quote diary-nonmarking-symbol) (regexp-quote diary-sexp-entry-symbol)) - '(1 font-lock-reference-face)) + '(1 font-lock-constant-face)) (cons (format "^%s" (regexp-quote diary-nonmarking-symbol)) - 'font-lock-reference-face) + 'font-lock-constant-face) (cons (format "^%s?%s" (regexp-quote diary-nonmarking-symbol) (regexp-opt (mapcar 'regexp-quote @@ -2411,7 +2411,7 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL." diary-islamic-entry-symbol diary-bahai-entry-symbol)) t)) - '(1 font-lock-reference-face)) + '(1 font-lock-constant-face)) '(diary-font-lock-sexps . font-lock-keyword-face) ;; Don't need to worry about space around "-" because the first ;; match takes care of that. It does mean the "-" itself may or @@ -2482,7 +2482,7 @@ This depends on the calendar date style." (defvar diary-fancy-font-lock-keywords `((diary-fancy-date-matcher . diary-face) ("^.*\\([aA]nniversary\\|[bB]irthday\\).*$" . 'diary-anniversary) - ("^.*Yahrzeit.*$" . font-lock-reference-face) + ("^.*Yahrzeit.*$" . font-lock-constant-face) ("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face) ("^Day.*omer.*$" . font-lock-builtin-face) ("^Parashat.*$" . font-lock-comment-face) diff --git a/lisp/generic-x.el b/lisp/generic-x.el index a97c5649c95..ce1599b9010 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -1531,15 +1531,15 @@ like an INI file. You can add this hook to `find-file-hook'." '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face) '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" - (1 font-lock-reference-face) + (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t)) ;; indirect string constants '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face) ;; gotos - '("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face) + '("[ \t]*\\(\\sw+:\\)" 1 font-lock-constant-face) '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) - (2 font-lock-reference-face nil t)) + (2 font-lock-constant-face nil t)) ;; system variables (generic-make-keywords-list installshield-system-variables-list diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 1825098a55e..745320b6eb2 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -5218,11 +5218,11 @@ Return nil if no body was found." ;; correctly highlight a with_clause that spans multiple lines. (list (concat "\\<\\(goto\\|raise\\|use\\|with\\)" "[ \t]+\\([a-zA-Z0-9_., \t]+\\)\\W") - '(1 font-lock-keyword-face) '(2 font-lock-reference-face nil t)) + '(1 font-lock-keyword-face) '(2 font-lock-constant-face nil t)) ;; ;; Goto tags. - '("<<\\(\\sw+\\)>>" 1 font-lock-reference-face) + '("<<\\(\\sw+\\)>>" 1 font-lock-constant-face) ;; Highlight based-numbers (R. Reagan ) (list "\\([0-9]+#[0-9a-fA-F_]+#\\)" '(1 font-lock-constant-face t)) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 9b634328fa7..e58fb2b3eab 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -1151,7 +1151,7 @@ As a user, you should not set this to t.") (common-blocks '("\\<\\(common\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*,?" (1 font-lock-keyword-face) ; "common" - (2 font-lock-reference-face nil t) ; block name + (2 font-lock-constant-face nil t) ; block name ("[ \t]*\\(\\sw+\\)[ ,]*" ;; Start with point after block name and comma (goto-char (match-end 0)) ; needed for XEmacs, could be nil @@ -1169,20 +1169,20 @@ As a user, you should not set this to t.") ;; Labels (label - '("^[ \t]*\\([a-zA-Z]\\sw*:\\)" (1 font-lock-reference-face))) + '("^[ \t]*\\([a-zA-Z]\\sw*:\\)" (1 font-lock-constant-face))) ;; The goto statement and its label (goto '("\\(goto\\)[ \t]*,[ \t]*\\([a-zA-Z]\\sw*\\)" (1 font-lock-keyword-face) - (2 font-lock-reference-face))) + (2 font-lock-constant-face))) ;; Tags in structure definitions. Note that this definition ;; actually collides with labels, so we have to use the same ;; face. It also matches named subscript ranges, ;; e.g. vec{bottom:top]. No good way around this. (structtag - '("\\<\\([a-zA-Z][a-zA-Z0-9_]*:\\)[^:]" (1 font-lock-reference-face))) + '("\\<\\([a-zA-Z][a-zA-Z0-9_]*:\\)[^:]" (1 font-lock-constant-face))) ;; Structure names (structname @@ -1195,7 +1195,7 @@ As a user, you should not set this to t.") ;; fontification. Slow, use it only in fancy fontification. (keyword-parameters '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\([ \t]*\\(;.*\\)?\n\\)*[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" - (6 font-lock-reference-face))) + (6 font-lock-constant-face))) ;; System variables start with a bang. (system-variables diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 33d43cb3d5a..99df94d3805 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -2110,7 +2110,7 @@ Argument BOUND is a buffer position limiting searching." (if (eq prolog-system 'mercury) (list (prolog-make-keywords-regexp prolog-mode-specificators-i t) - 0 'font-lock-reference-face))) + 0 'font-lock-constant-face))) (directives (if (eq prolog-system 'mercury) (list diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el index bf52eff8f9a..a8fc11f71c0 100644 --- a/lisp/progmodes/ps-mode.el +++ b/lisp/progmodes/ps-mode.el @@ -213,9 +213,9 @@ If nil, use `temporary-file-directory'." ;; - 8bit characters (warning face) ;; Multiline strings are not supported. Strings with nested brackets are. (defconst ps-mode-font-lock-keywords-1 - '(("\\`%!PS.*" . font-lock-reference-face) + '(("\\`%!PS.*" . font-lock-constant-face) ("^%%BoundingBox:[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]*$" - . font-lock-reference-face) + . font-lock-constant-face) (ps-mode-match-string-or-comment (1 font-lock-comment-face nil t) (2 font-lock-string-face nil t)) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 0f02e81cbad..84cf7308d75 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1567,7 +1567,7 @@ See `font-lock-syntax-table'.") 2 font-lock-variable-name-face) ;; symbols '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" - 2 font-lock-reference-face) + 2 font-lock-constant-face) ;; variables '("\\(\\$\\([^a-zA-Z0-9 \n]\\|[0-9]\\)\\)\\W" 1 font-lock-variable-name-face) @@ -1576,7 +1576,7 @@ See `font-lock-syntax-table'.") ;; constants '("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)" 2 font-lock-type-face) - '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-reference-face) + '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) ;; expression expansion '(ruby-match-expression-expansion 0 font-lock-variable-name-face t) diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 31001c78e54..229d12b2906 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -542,10 +542,7 @@ (t "")))) (setq authors (reftex-truncate authors 30 t t)) (when (reftex-use-fonts) - (put-text-property 0 (length key) 'face - (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face) + (put-text-property 0 (length key) 'face reftex-label-face key) (put-text-property 0 (length authors) 'face reftex-bib-author-face authors) diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index 2d395fe3df2..1d15dfbed7e 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -585,9 +585,7 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help (if (memq reftex-highlight-selection '(mouse both)) reftex-mouse-selected-face nil)) - (index-face (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face)) + (index-face reftex-label-face) sublist cell from to first-char) ;; Make the sublist and sort it diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index 627dfba0071..1a400436311 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el @@ -245,12 +245,8 @@ During a selection process, these are the local bindings. (if (memq reftex-highlight-selection '(mouse both)) reftex-mouse-selected-face nil)) - (label-face (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face)) - (index-face (reftex-verified-face reftex-index-face - 'font-lock-constant-face - 'font-lock-reference-face)) + (label-face reftex-label-face) + (index-face reftex-index-face) all cell text label typekey note comment master-dir-re prev-inserted offset from to index-tag docstruct-symbol) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 8584c496a97..8318dc0d5f3 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2311,9 +2311,7 @@ IGNORE-WORDS List of words which should be removed from the string." ;; Return the first valid face in FACES, or nil if none is valid. ;; Also, when finding a nil element in FACES, return nil. This ;; function is just a safety net to catch name changes of builtin - ;; fonts. Currently it is only used for reftex-label-face, which has - ;; as default font-lock-reference-face, which was recently renamed - ;; to font-lock-constant-face. + ;; fonts. Currently it is only used for reftex-label-face. (let (face) (catch 'exit (while (setq face (pop faces)) -- 2.39.2