diff options
| author | Miles Bader | 2009-08-10 02:52:57 +0000 |
|---|---|---|
| committer | Miles Bader | 2009-08-10 02:52:57 +0000 |
| commit | 83326559df895ca06f8ad731a13842e6ccf7eb1e (patch) | |
| tree | e18d38cefac457493265cc8e050490aeb1a5cecf | |
| parent | 6807d8ca512a3516df3e56e185204f2845bc121e (diff) | |
| download | emacs-83326559df895ca06f8ad731a13842e6ccf7eb1e.tar.gz emacs-83326559df895ca06f8ad731a13842e6ccf7eb1e.zip | |
Remove "-face" suffix from face names in j2-mode.el
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1620
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/progmodes/js2-mode.el | 56 |
2 files changed, 42 insertions, 28 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85242eacf7b..2e661e20e7e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2009-08-10 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/js2-mode.el (js2-warning, js2-error, js2-jsdoc-tag) | ||
| 4 | (js2-jsdoc-type, js2-jsdoc-value, js2-function-param) | ||
| 5 | (js2-instance-member, js2-private-member, js2-private-function-call) | ||
| 6 | (js2-jsdoc-html-tag-name, js2-jsdoc-html-tag-delimiter) | ||
| 7 | (js2-magic-paren, js2-external-variable): | ||
| 8 | Remove "-face" suffix from face names. | ||
| 9 | (js2-jsdoc-highlight-helper, js2-highlight-jsdoc) | ||
| 10 | (js2-highlight-undeclared-vars, js2-peek-token) | ||
| 11 | (js2-parse-function-params, js2-mode-show-errors) | ||
| 12 | (js2-mode-show-warnings, js2-make-magic-delimiter) | ||
| 13 | (js2-mode-highlight-magic-parens): Update to use new face names. | ||
| 14 | |||
| 1 | 2009-08-09 Michael Albinus <michael.albinus@gmx.de> | 15 | 2009-08-09 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 16 | ||
| 3 | * net/tramp.el (tramp-get-ls-command-with-dired): New defun. | 17 | * net/tramp.el (tramp-get-ls-command-with-dired): New defun. |
diff --git a/lisp/progmodes/js2-mode.el b/lisp/progmodes/js2-mode.el index 1422fa3a470..3e098c44606 100644 --- a/lisp/progmodes/js2-mode.el +++ b/lisp/progmodes/js2-mode.el | |||
| @@ -1007,7 +1007,7 @@ callback to `js2-mode-wait-for-parse', and your callback will be | |||
| 1007 | called after the new parse tree is built. This can take some time | 1007 | called after the new parse tree is built. This can take some time |
| 1008 | in large files.") | 1008 | in large files.") |
| 1009 | 1009 | ||
| 1010 | (defface js2-warning-face | 1010 | (defface js2-warning |
| 1011 | `((((class color) (background light)) | 1011 | `((((class color) (background light)) |
| 1012 | (:underline "orange")) | 1012 | (:underline "orange")) |
| 1013 | (((class color) (background dark)) | 1013 | (((class color) (background dark)) |
| @@ -1016,7 +1016,7 @@ in large files.") | |||
| 1016 | "Face for JavaScript warnings." | 1016 | "Face for JavaScript warnings." |
| 1017 | :group 'js2-mode) | 1017 | :group 'js2-mode) |
| 1018 | 1018 | ||
| 1019 | (defface js2-error-face | 1019 | (defface js2-error |
| 1020 | `((((class color) (background light)) | 1020 | `((((class color) (background light)) |
| 1021 | (:foreground "red")) | 1021 | (:foreground "red")) |
| 1022 | (((class color) (background dark)) | 1022 | (((class color) (background dark)) |
| @@ -1025,45 +1025,45 @@ in large files.") | |||
| 1025 | "Face for JavaScript errors." | 1025 | "Face for JavaScript errors." |
| 1026 | :group 'js2-mode) | 1026 | :group 'js2-mode) |
| 1027 | 1027 | ||
| 1028 | (defface js2-jsdoc-tag-face | 1028 | (defface js2-jsdoc-tag |
| 1029 | '((t :foreground "SlateGray")) | 1029 | '((t :foreground "SlateGray")) |
| 1030 | "Face used to highlight @whatever tags in jsdoc comments." | 1030 | "Face used to highlight @whatever tags in jsdoc comments." |
| 1031 | :group 'js2-mode) | 1031 | :group 'js2-mode) |
| 1032 | 1032 | ||
| 1033 | (defface js2-jsdoc-type-face | 1033 | (defface js2-jsdoc-type |
| 1034 | '((t :foreground "SteelBlue")) | 1034 | '((t :foreground "SteelBlue")) |
| 1035 | "Face used to highlight {FooBar} types in jsdoc comments." | 1035 | "Face used to highlight {FooBar} types in jsdoc comments." |
| 1036 | :group 'js2-mode) | 1036 | :group 'js2-mode) |
| 1037 | 1037 | ||
| 1038 | (defface js2-jsdoc-value-face | 1038 | (defface js2-jsdoc-value |
| 1039 | '((t :foreground "PeachPuff3")) | 1039 | '((t :foreground "PeachPuff3")) |
| 1040 | "Face used to highlight tag values in jsdoc comments." | 1040 | "Face used to highlight tag values in jsdoc comments." |
| 1041 | :group 'js2-mode) | 1041 | :group 'js2-mode) |
| 1042 | 1042 | ||
| 1043 | (defface js2-function-param-face | 1043 | (defface js2-function-param |
| 1044 | '((t :foreground "SeaGreen")) | 1044 | '((t :foreground "SeaGreen")) |
| 1045 | "Face used to highlight function parameters in javascript." | 1045 | "Face used to highlight function parameters in javascript." |
| 1046 | :group 'js2-mode) | 1046 | :group 'js2-mode) |
| 1047 | 1047 | ||
| 1048 | (defface js2-instance-member-face | 1048 | (defface js2-instance-member |
| 1049 | '((t :foreground "DarkOrchid")) | 1049 | '((t :foreground "DarkOrchid")) |
| 1050 | "Face used to highlight instance variables in javascript. | 1050 | "Face used to highlight instance variables in javascript. |
| 1051 | Not currently used." | 1051 | Not currently used." |
| 1052 | :group 'js2-mode) | 1052 | :group 'js2-mode) |
| 1053 | 1053 | ||
| 1054 | (defface js2-private-member-face | 1054 | (defface js2-private-member |
| 1055 | '((t :foreground "PeachPuff3")) | 1055 | '((t :foreground "PeachPuff3")) |
| 1056 | "Face used to highlight calls to private methods in javascript. | 1056 | "Face used to highlight calls to private methods in javascript. |
| 1057 | Not currently used." | 1057 | Not currently used." |
| 1058 | :group 'js2-mode) | 1058 | :group 'js2-mode) |
| 1059 | 1059 | ||
| 1060 | (defface js2-private-function-call-face | 1060 | (defface js2-private-function-call |
| 1061 | '((t :foreground "goldenrod")) | 1061 | '((t :foreground "goldenrod")) |
| 1062 | "Face used to highlight calls to private functions in javascript. | 1062 | "Face used to highlight calls to private functions in javascript. |
| 1063 | Not currently used." | 1063 | Not currently used." |
| 1064 | :group 'js2-mode) | 1064 | :group 'js2-mode) |
| 1065 | 1065 | ||
| 1066 | (defface js2-jsdoc-html-tag-name-face | 1066 | (defface js2-jsdoc-html-tag-name |
| 1067 | (if js2-emacs22 | 1067 | (if js2-emacs22 |
| 1068 | '((((class color) (min-colors 88) (background light)) | 1068 | '((((class color) (min-colors 88) (background light)) |
| 1069 | (:foreground "rosybrown")) | 1069 | (:foreground "rosybrown")) |
| @@ -1079,7 +1079,7 @@ Not currently used." | |||
| 1079 | "Face used to highlight jsdoc html tag names" | 1079 | "Face used to highlight jsdoc html tag names" |
| 1080 | :group 'js2-mode) | 1080 | :group 'js2-mode) |
| 1081 | 1081 | ||
| 1082 | (defface js2-jsdoc-html-tag-delimiter-face | 1082 | (defface js2-jsdoc-html-tag-delimiter |
| 1083 | (if js2-emacs22 | 1083 | (if js2-emacs22 |
| 1084 | '((((class color) (min-colors 88) (background light)) | 1084 | '((((class color) (min-colors 88) (background light)) |
| 1085 | (:foreground "dark khaki")) | 1085 | (:foreground "dark khaki")) |
| @@ -1095,7 +1095,7 @@ Not currently used." | |||
| 1095 | "Face used to highlight brackets in jsdoc html tags." | 1095 | "Face used to highlight brackets in jsdoc html tags." |
| 1096 | :group 'js2-mode) | 1096 | :group 'js2-mode) |
| 1097 | 1097 | ||
| 1098 | (defface js2-magic-paren-face | 1098 | (defface js2-magic-paren |
| 1099 | '((t :underline t)) | 1099 | '((t :underline t)) |
| 1100 | "Face used to color parens that will be auto-overwritten." | 1100 | "Face used to color parens that will be auto-overwritten." |
| 1101 | :group 'js2-mode) | 1101 | :group 'js2-mode) |
| @@ -1107,7 +1107,7 @@ declarations to `js2-recorded-assignments', which see." | |||
| 1107 | :type 'list | 1107 | :type 'list |
| 1108 | :group 'js2-mode) | 1108 | :group 'js2-mode) |
| 1109 | 1109 | ||
| 1110 | (defface js2-external-variable-face | 1110 | (defface js2-external-variable |
| 1111 | '((t :foreground "orange")) | 1111 | '((t :foreground "orange")) |
| 1112 | "Face used to highlight assignments to undeclared variables. | 1112 | "Face used to highlight assignments to undeclared variables. |
| 1113 | An undeclared variable is any variable not declared with var or let | 1113 | An undeclared variable is any variable not declared with var or let |
| @@ -6547,21 +6547,21 @@ of a simple name. Called before EXPR has a parent node." | |||
| 6547 | (defsubst js2-jsdoc-highlight-helper () | 6547 | (defsubst js2-jsdoc-highlight-helper () |
| 6548 | (js2-set-face (match-beginning 1) | 6548 | (js2-set-face (match-beginning 1) |
| 6549 | (match-end 1) | 6549 | (match-end 1) |
| 6550 | 'js2-jsdoc-tag-face) | 6550 | 'js2-jsdoc-tag) |
| 6551 | (if (match-beginning 2) | 6551 | (if (match-beginning 2) |
| 6552 | (if (save-excursion | 6552 | (if (save-excursion |
| 6553 | (goto-char (match-beginning 2)) | 6553 | (goto-char (match-beginning 2)) |
| 6554 | (= (char-after) ?{)) | 6554 | (= (char-after) ?{)) |
| 6555 | (js2-set-face (1+ (match-beginning 2)) | 6555 | (js2-set-face (1+ (match-beginning 2)) |
| 6556 | (1- (match-end 2)) | 6556 | (1- (match-end 2)) |
| 6557 | 'js2-jsdoc-type-face) | 6557 | 'js2-jsdoc-type) |
| 6558 | (js2-set-face (match-beginning 2) | 6558 | (js2-set-face (match-beginning 2) |
| 6559 | (match-end 2) | 6559 | (match-end 2) |
| 6560 | 'js2-jsdoc-value-face))) | 6560 | 'js2-jsdoc-value))) |
| 6561 | (if (match-beginning 3) | 6561 | (if (match-beginning 3) |
| 6562 | (js2-set-face (match-beginning 3) | 6562 | (js2-set-face (match-beginning 3) |
| 6563 | (match-end 3) | 6563 | (match-end 3) |
| 6564 | 'js2-jsdoc-value-face))) | 6564 | 'js2-jsdoc-value))) |
| 6565 | 6565 | ||
| 6566 | (defun js2-highlight-jsdoc (ast) | 6566 | (defun js2-highlight-jsdoc (ast) |
| 6567 | "Highlight doc comment tags." | 6567 | "Highlight doc comment tags." |
| @@ -6588,13 +6588,13 @@ of a simple name. Called before EXPR has a parent node." | |||
| 6588 | (while (re-search-forward js2-jsdoc-html-tag-regexp nil t) | 6588 | (while (re-search-forward js2-jsdoc-html-tag-regexp nil t) |
| 6589 | (js2-set-face (match-beginning 1) | 6589 | (js2-set-face (match-beginning 1) |
| 6590 | (match-end 1) | 6590 | (match-end 1) |
| 6591 | 'js2-jsdoc-html-tag-delimiter-face) | 6591 | 'js2-jsdoc-html-tag-delimiter) |
| 6592 | (js2-set-face (match-beginning 2) | 6592 | (js2-set-face (match-beginning 2) |
| 6593 | (match-end 2) | 6593 | (match-end 2) |
| 6594 | 'js2-jsdoc-html-tag-name-face) | 6594 | 'js2-jsdoc-html-tag-name) |
| 6595 | (js2-set-face (match-beginning 3) | 6595 | (js2-set-face (match-beginning 3) |
| 6596 | (match-end 3) | 6596 | (match-end 3) |
| 6597 | 'js2-jsdoc-html-tag-delimiter-face)))))))) | 6597 | 'js2-jsdoc-html-tag-delimiter)))))))) |
| 6598 | 6598 | ||
| 6599 | (defun js2-highlight-assign-targets (node left right) | 6599 | (defun js2-highlight-assign-targets (node left right) |
| 6600 | "Highlight function properties and external variables." | 6600 | "Highlight function properties and external variables." |
| @@ -6638,7 +6638,7 @@ it is considered declared." | |||
| 6638 | (member name js2-default-externs) | 6638 | (member name js2-default-externs) |
| 6639 | (member name js2-additional-externs) | 6639 | (member name js2-additional-externs) |
| 6640 | (js2-get-defining-scope scope name)) | 6640 | (js2-get-defining-scope scope name)) |
| 6641 | (js2-set-face pos end 'js2-external-variable-face 'record) | 6641 | (js2-set-face pos end 'js2-external-variable 'record) |
| 6642 | (js2-record-text-property pos end 'help-echo "Undeclared variable") | 6642 | (js2-record-text-property pos end 'help-echo "Undeclared variable") |
| 6643 | (js2-record-text-property pos end 'point-entered #'js2-echo-help)))) | 6643 | (js2-record-text-property pos end 'point-entered #'js2-echo-help)))) |
| 6644 | (setq js2-recorded-assignments nil))) | 6644 | (setq js2-recorded-assignments nil))) |
| @@ -7079,7 +7079,7 @@ The flags, if any, are saved in `js2-current-flagged-token'." | |||
| 7079 | (when js2-parse-ide-mode | 7079 | (when js2-parse-ide-mode |
| 7080 | (cond | 7080 | (cond |
| 7081 | ((minusp tt) | 7081 | ((minusp tt) |
| 7082 | (js2-record-face 'js2-error-face)) | 7082 | (js2-record-face 'js2-error)) |
| 7083 | ((setq face (aref js2-kwd-tokens tt)) | 7083 | ((setq face (aref js2-kwd-tokens tt)) |
| 7084 | (js2-record-face face)) | 7084 | (js2-record-face face)) |
| 7085 | ((and (= tt js2-NAME) | 7085 | ((and (= tt js2-NAME) |
| @@ -7375,7 +7375,7 @@ Scanner should be initialized." | |||
| 7375 | ;; simple name | 7375 | ;; simple name |
| 7376 | (t | 7376 | (t |
| 7377 | (js2-must-match js2-NAME "msg.no.parm") | 7377 | (js2-must-match js2-NAME "msg.no.parm") |
| 7378 | (js2-record-face 'js2-function-param-face) | 7378 | (js2-record-face 'js2-function-param) |
| 7379 | (setq param (js2-create-name-node)) | 7379 | (setq param (js2-create-name-node)) |
| 7380 | (js2-define-symbol js2-LP js2-ts-string param) | 7380 | (js2-define-symbol js2-LP js2-ts-string param) |
| 7381 | (push param params))) | 7381 | (push param params))) |
| @@ -10443,7 +10443,7 @@ Defaults to point." | |||
| 10443 | "Highlight syntax errors." | 10443 | "Highlight syntax errors." |
| 10444 | (when js2-mode-show-parse-errors | 10444 | (when js2-mode-show-parse-errors |
| 10445 | (dolist (e (js2-ast-root-errors js2-mode-ast)) | 10445 | (dolist (e (js2-ast-root-errors js2-mode-ast)) |
| 10446 | (js2-mode-show-warn-or-err e 'js2-error-face)))) | 10446 | (js2-mode-show-warn-or-err e 'js2-error)))) |
| 10447 | 10447 | ||
| 10448 | (defun js2-mode-remove-suppressed-warnings () | 10448 | (defun js2-mode-remove-suppressed-warnings () |
| 10449 | "Take suppressed warnings out of the AST warnings list. | 10449 | "Take suppressed warnings out of the AST warnings list. |
| @@ -10477,7 +10477,7 @@ This ensures that the counts and `next-error' are correct." | |||
| 10477 | "Highlight strict-mode warnings." | 10477 | "Highlight strict-mode warnings." |
| 10478 | (when js2-mode-show-strict-warnings | 10478 | (when js2-mode-show-strict-warnings |
| 10479 | (dolist (e (js2-ast-root-warnings js2-mode-ast)) | 10479 | (dolist (e (js2-ast-root-warnings js2-mode-ast)) |
| 10480 | (js2-mode-show-warn-or-err e 'js2-warning-face)))) | 10480 | (js2-mode-show-warn-or-err e 'js2-warning)))) |
| 10481 | 10481 | ||
| 10482 | (defun js2-echo-error (old-point new-point) | 10482 | (defun js2-echo-error (old-point new-point) |
| 10483 | "Called by point-motion hooks." | 10483 | "Called by point-motion hooks." |
| @@ -10653,11 +10653,11 @@ Actually returns the quote character that begins the string." | |||
| 10653 | (nth 4 parse-state))))) | 10653 | (nth 4 parse-state))))) |
| 10654 | 10654 | ||
| 10655 | (defsubst js2-make-magic-delimiter (delim &optional pos) | 10655 | (defsubst js2-make-magic-delimiter (delim &optional pos) |
| 10656 | "Add `js2-magic' and `js2-magic-paren-face' to DELIM, a string. | 10656 | "Add `js2-magic' and `js2-magic-paren' to DELIM, a string. |
| 10657 | Sets value of `js2-magic' text property to line number at POS." | 10657 | Sets value of `js2-magic' text property to line number at POS." |
| 10658 | (propertize delim | 10658 | (propertize delim |
| 10659 | 'js2-magic (line-number-at-pos pos) | 10659 | 'js2-magic (line-number-at-pos pos) |
| 10660 | 'face 'js2-magic-paren-face)) | 10660 | 'face 'js2-magic-paren)) |
| 10661 | 10661 | ||
| 10662 | (defun js2-mode-match-delimiter (open close) | 10662 | (defun js2-mode-match-delimiter (open close) |
| 10663 | "Insert OPEN (a string) and possibly matching delimiter CLOSE. | 10663 | "Insert OPEN (a string) and possibly matching delimiter CLOSE. |
| @@ -10755,7 +10755,7 @@ already have been inserted." | |||
| 10755 | (if (get-text-property beg 'js2-magic) | 10755 | (if (get-text-property beg 'js2-magic) |
| 10756 | (js2-with-unmodifying-text-property-changes | 10756 | (js2-with-unmodifying-text-property-changes |
| 10757 | (put-text-property beg (or end (1+ beg)) | 10757 | (put-text-property beg (or end (1+ beg)) |
| 10758 | 'face 'js2-magic-paren-face)))))) | 10758 | 'face 'js2-magic-paren)))))) |
| 10759 | 10759 | ||
| 10760 | (defun js2-mode-mundanify-parens () | 10760 | (defun js2-mode-mundanify-parens () |
| 10761 | "Clear all magic parens and brackets." | 10761 | "Clear all magic parens and brackets." |