Mercurial > emacs
changeset 104227:da1290c3d63f
Remove "-face" suffix from face names in j2-mode.el
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1620
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 10 Aug 2009 02:52:57 +0000 |
parents | e312dc3a4650 |
children | 1261930ee0d2 |
files | lisp/ChangeLog lisp/progmodes/js2-mode.el |
diffstat | 2 files changed, 42 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Aug 10 02:44:58 2009 +0000 +++ b/lisp/ChangeLog Mon Aug 10 02:52:57 2009 +0000 @@ -1,3 +1,17 @@ +2009-08-10 Miles Bader <miles@gnu.org> + + * progmodes/js2-mode.el (js2-warning, js2-error, js2-jsdoc-tag) + (js2-jsdoc-type, js2-jsdoc-value, js2-function-param) + (js2-instance-member, js2-private-member, js2-private-function-call) + (js2-jsdoc-html-tag-name, js2-jsdoc-html-tag-delimiter) + (js2-magic-paren, js2-external-variable): + Remove "-face" suffix from face names. + (js2-jsdoc-highlight-helper, js2-highlight-jsdoc) + (js2-highlight-undeclared-vars, js2-peek-token) + (js2-parse-function-params, js2-mode-show-errors) + (js2-mode-show-warnings, js2-make-magic-delimiter) + (js2-mode-highlight-magic-parens): Update to use new face names. + 2009-08-09 Michael Albinus <michael.albinus@gmx.de> * net/tramp.el (tramp-get-ls-command-with-dired): New defun.
--- a/lisp/progmodes/js2-mode.el Mon Aug 10 02:44:58 2009 +0000 +++ b/lisp/progmodes/js2-mode.el Mon Aug 10 02:52:57 2009 +0000 @@ -1007,7 +1007,7 @@ called after the new parse tree is built. This can take some time in large files.") -(defface js2-warning-face +(defface js2-warning `((((class color) (background light)) (:underline "orange")) (((class color) (background dark)) @@ -1016,7 +1016,7 @@ "Face for JavaScript warnings." :group 'js2-mode) -(defface js2-error-face +(defface js2-error `((((class color) (background light)) (:foreground "red")) (((class color) (background dark)) @@ -1025,45 +1025,45 @@ "Face for JavaScript errors." :group 'js2-mode) -(defface js2-jsdoc-tag-face +(defface js2-jsdoc-tag '((t :foreground "SlateGray")) "Face used to highlight @whatever tags in jsdoc comments." :group 'js2-mode) -(defface js2-jsdoc-type-face +(defface js2-jsdoc-type '((t :foreground "SteelBlue")) "Face used to highlight {FooBar} types in jsdoc comments." :group 'js2-mode) -(defface js2-jsdoc-value-face +(defface js2-jsdoc-value '((t :foreground "PeachPuff3")) "Face used to highlight tag values in jsdoc comments." :group 'js2-mode) -(defface js2-function-param-face +(defface js2-function-param '((t :foreground "SeaGreen")) "Face used to highlight function parameters in javascript." :group 'js2-mode) -(defface js2-instance-member-face +(defface js2-instance-member '((t :foreground "DarkOrchid")) "Face used to highlight instance variables in javascript. Not currently used." :group 'js2-mode) -(defface js2-private-member-face +(defface js2-private-member '((t :foreground "PeachPuff3")) "Face used to highlight calls to private methods in javascript. Not currently used." :group 'js2-mode) -(defface js2-private-function-call-face +(defface js2-private-function-call '((t :foreground "goldenrod")) "Face used to highlight calls to private functions in javascript. Not currently used." :group 'js2-mode) -(defface js2-jsdoc-html-tag-name-face +(defface js2-jsdoc-html-tag-name (if js2-emacs22 '((((class color) (min-colors 88) (background light)) (:foreground "rosybrown")) @@ -1079,7 +1079,7 @@ "Face used to highlight jsdoc html tag names" :group 'js2-mode) -(defface js2-jsdoc-html-tag-delimiter-face +(defface js2-jsdoc-html-tag-delimiter (if js2-emacs22 '((((class color) (min-colors 88) (background light)) (:foreground "dark khaki")) @@ -1095,7 +1095,7 @@ "Face used to highlight brackets in jsdoc html tags." :group 'js2-mode) -(defface js2-magic-paren-face +(defface js2-magic-paren '((t :underline t)) "Face used to color parens that will be auto-overwritten." :group 'js2-mode) @@ -1107,7 +1107,7 @@ :type 'list :group 'js2-mode) -(defface js2-external-variable-face +(defface js2-external-variable '((t :foreground "orange")) "Face used to highlight assignments to undeclared variables. An undeclared variable is any variable not declared with var or let @@ -6547,21 +6547,21 @@ (defsubst js2-jsdoc-highlight-helper () (js2-set-face (match-beginning 1) (match-end 1) - 'js2-jsdoc-tag-face) + 'js2-jsdoc-tag) (if (match-beginning 2) (if (save-excursion (goto-char (match-beginning 2)) (= (char-after) ?{)) (js2-set-face (1+ (match-beginning 2)) (1- (match-end 2)) - 'js2-jsdoc-type-face) + 'js2-jsdoc-type) (js2-set-face (match-beginning 2) (match-end 2) - 'js2-jsdoc-value-face))) + 'js2-jsdoc-value))) (if (match-beginning 3) (js2-set-face (match-beginning 3) (match-end 3) - 'js2-jsdoc-value-face))) + 'js2-jsdoc-value))) (defun js2-highlight-jsdoc (ast) "Highlight doc comment tags." @@ -6588,13 +6588,13 @@ (while (re-search-forward js2-jsdoc-html-tag-regexp nil t) (js2-set-face (match-beginning 1) (match-end 1) - 'js2-jsdoc-html-tag-delimiter-face) + 'js2-jsdoc-html-tag-delimiter) (js2-set-face (match-beginning 2) (match-end 2) - 'js2-jsdoc-html-tag-name-face) + 'js2-jsdoc-html-tag-name) (js2-set-face (match-beginning 3) (match-end 3) - 'js2-jsdoc-html-tag-delimiter-face)))))))) + 'js2-jsdoc-html-tag-delimiter)))))))) (defun js2-highlight-assign-targets (node left right) "Highlight function properties and external variables." @@ -6638,7 +6638,7 @@ (member name js2-default-externs) (member name js2-additional-externs) (js2-get-defining-scope scope name)) - (js2-set-face pos end 'js2-external-variable-face 'record) + (js2-set-face pos end 'js2-external-variable 'record) (js2-record-text-property pos end 'help-echo "Undeclared variable") (js2-record-text-property pos end 'point-entered #'js2-echo-help)))) (setq js2-recorded-assignments nil))) @@ -7079,7 +7079,7 @@ (when js2-parse-ide-mode (cond ((minusp tt) - (js2-record-face 'js2-error-face)) + (js2-record-face 'js2-error)) ((setq face (aref js2-kwd-tokens tt)) (js2-record-face face)) ((and (= tt js2-NAME) @@ -7375,7 +7375,7 @@ ;; simple name (t (js2-must-match js2-NAME "msg.no.parm") - (js2-record-face 'js2-function-param-face) + (js2-record-face 'js2-function-param) (setq param (js2-create-name-node)) (js2-define-symbol js2-LP js2-ts-string param) (push param params))) @@ -10443,7 +10443,7 @@ "Highlight syntax errors." (when js2-mode-show-parse-errors (dolist (e (js2-ast-root-errors js2-mode-ast)) - (js2-mode-show-warn-or-err e 'js2-error-face)))) + (js2-mode-show-warn-or-err e 'js2-error)))) (defun js2-mode-remove-suppressed-warnings () "Take suppressed warnings out of the AST warnings list. @@ -10477,7 +10477,7 @@ "Highlight strict-mode warnings." (when js2-mode-show-strict-warnings (dolist (e (js2-ast-root-warnings js2-mode-ast)) - (js2-mode-show-warn-or-err e 'js2-warning-face)))) + (js2-mode-show-warn-or-err e 'js2-warning)))) (defun js2-echo-error (old-point new-point) "Called by point-motion hooks." @@ -10653,11 +10653,11 @@ (nth 4 parse-state))))) (defsubst js2-make-magic-delimiter (delim &optional pos) - "Add `js2-magic' and `js2-magic-paren-face' to DELIM, a string. + "Add `js2-magic' and `js2-magic-paren' to DELIM, a string. Sets value of `js2-magic' text property to line number at POS." (propertize delim 'js2-magic (line-number-at-pos pos) - 'face 'js2-magic-paren-face)) + 'face 'js2-magic-paren)) (defun js2-mode-match-delimiter (open close) "Insert OPEN (a string) and possibly matching delimiter CLOSE. @@ -10755,7 +10755,7 @@ (if (get-text-property beg 'js2-magic) (js2-with-unmodifying-text-property-changes (put-text-property beg (or end (1+ beg)) - 'face 'js2-magic-paren-face)))))) + 'face 'js2-magic-paren)))))) (defun js2-mode-mundanify-parens () "Clear all magic parens and brackets."