aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2016-11-03 01:15:30 -0400
committerMark Oteiza2016-11-03 01:15:30 -0400
commit76735c116d3d49f0e1ba84ccf657729e91cb1ad0 (patch)
treea5403e8a53262fbcf506ba40023d651d6719bdf3
parente5cdb5ce7d4ad96b7cd5ca7888e34076b9267eee (diff)
downloademacs-76735c116d3d49f0e1ba84ccf657729e91cb1ad0.tar.gz
emacs-76735c116d3d49f0e1ba84ccf657729e91cb1ad0.zip
Remove antlr face aliases obsoleted in 22.1
* lisp/progmodes/antlr-mode.el: Remove obsolete aliases (antlr-default-face, antlr-keyword-face, antlr-syntax-face): (antlr-ruledef-face, antlr-tokendef-face, antlr-ruleref-face): (antlr-tokenref-face, antlr-literal-face): (antlr-literal-face): Remove. (antlr-font-lock-additional-keywords): Use face symbols instead.
-rw-r--r--lisp/progmodes/antlr-mode.el78
1 files changed, 24 insertions, 54 deletions
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index ee81add340c..3df7c1312ef 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -824,16 +824,11 @@ font-lock keywords according to `font-lock-defaults' used for the code
824in the grammar's actions and semantic predicates, see 824in the grammar's actions and semantic predicates, see
825`antlr-font-lock-maximum-decoration'.") 825`antlr-font-lock-maximum-decoration'.")
826 826
827(defvar antlr-default-face 'antlr-default)
828(defface antlr-default '((t nil)) 827(defface antlr-default '((t nil))
829 "Face to prevent strings from language dependent highlighting. 828 "Face to prevent strings from language dependent highlighting.
830Do not change." 829Do not change."
831 :group 'antlr) 830 :group 'antlr)
832;; backward-compatibility alias
833(put 'antlr-font-lock-default-face 'face-alias 'antlr-default)
834(put 'antlr-font-lock-default-face 'obsolete-face "22.1")
835 831
836(defvar antlr-keyword-face 'antlr-keyword)
837(defface antlr-keyword 832(defface antlr-keyword
838 (cond-emacs-xemacs 833 (cond-emacs-xemacs
839 '((((class color) (background light)) 834 '((((class color) (background light))
@@ -841,11 +836,7 @@ Do not change."
841 (t :inherit font-lock-keyword-face))) 836 (t :inherit font-lock-keyword-face)))
842 "ANTLR keywords." 837 "ANTLR keywords."
843 :group 'antlr) 838 :group 'antlr)
844;; backward-compatibility alias
845(put 'antlr-font-lock-keyword-face 'face-alias 'antlr-keyword)
846(put 'antlr-font-lock-keyword-face 'obsolete-face "22.1")
847 839
848(defvar antlr-syntax-face 'antlr-keyword)
849(defface antlr-syntax 840(defface antlr-syntax
850 (cond-emacs-xemacs 841 (cond-emacs-xemacs
851 '((((class color) (background light)) 842 '((((class color) (background light))
@@ -853,11 +844,7 @@ Do not change."
853 (t :inherit font-lock-constant-face))) 844 (t :inherit font-lock-constant-face)))
854 "ANTLR syntax symbols like :, |, (, ), ...." 845 "ANTLR syntax symbols like :, |, (, ), ...."
855 :group 'antlr) 846 :group 'antlr)
856;; backward-compatibility alias
857(put 'antlr-font-lock-syntax-face 'face-alias 'antlr-syntax)
858(put 'antlr-font-lock-syntax-face 'obsolete-face "22.1")
859 847
860(defvar antlr-ruledef-face 'antlr-ruledef)
861(defface antlr-ruledef 848(defface antlr-ruledef
862 (cond-emacs-xemacs 849 (cond-emacs-xemacs
863 '((((class color) (background light)) 850 '((((class color) (background light))
@@ -865,11 +852,7 @@ Do not change."
865 (t :inherit font-lock-function-name-face))) 852 (t :inherit font-lock-function-name-face)))
866 "ANTLR rule references (definition)." 853 "ANTLR rule references (definition)."
867 :group 'antlr) 854 :group 'antlr)
868;; backward-compatibility alias
869(put 'antlr-font-lock-ruledef-face 'face-alias 'antlr-ruledef)
870(put 'antlr-font-lock-ruledef-face 'obsolete-face "22.1")
871 855
872(defvar antlr-tokendef-face 'antlr-tokendef)
873(defface antlr-tokendef 856(defface antlr-tokendef
874 (cond-emacs-xemacs 857 (cond-emacs-xemacs
875 '((((class color) (background light)) 858 '((((class color) (background light))
@@ -877,31 +860,19 @@ Do not change."
877 (t :inherit font-lock-function-name-face))) 860 (t :inherit font-lock-function-name-face)))
878 "ANTLR token references (definition)." 861 "ANTLR token references (definition)."
879 :group 'antlr) 862 :group 'antlr)
880;; backward-compatibility alias
881(put 'antlr-font-lock-tokendef-face 'face-alias 'antlr-tokendef)
882(put 'antlr-font-lock-tokendef-face 'obsolete-face "22.1")
883 863
884(defvar antlr-ruleref-face 'antlr-ruleref)
885(defface antlr-ruleref 864(defface antlr-ruleref
886 '((((class color) (background light)) (:foreground "blue4")) 865 '((((class color) (background light)) (:foreground "blue4"))
887 (t :inherit font-lock-type-face)) 866 (t :inherit font-lock-type-face))
888 "ANTLR rule references (usage)." 867 "ANTLR rule references (usage)."
889 :group 'antlr) 868 :group 'antlr)
890;; backward-compatibility alias
891(put 'antlr-font-lock-ruleref-face 'face-alias 'antlr-ruleref)
892(put 'antlr-font-lock-ruleref-face 'obsolete-face "22.1")
893 869
894(defvar antlr-tokenref-face 'antlr-tokenref)
895(defface antlr-tokenref 870(defface antlr-tokenref
896 '((((class color) (background light)) (:foreground "orange4")) 871 '((((class color) (background light)) (:foreground "orange4"))
897 (t :inherit font-lock-type-face)) 872 (t :inherit font-lock-type-face))
898 "ANTLR token references (usage)." 873 "ANTLR token references (usage)."
899 :group 'antlr) 874 :group 'antlr)
900;; backward-compatibility alias
901(put 'antlr-font-lock-tokenref-face 'face-alias 'antlr-tokenref)
902(put 'antlr-font-lock-tokenref-face 'obsolete-face "22.1")
903 875
904(defvar antlr-literal-face 'antlr-literal)
905(defface antlr-literal 876(defface antlr-literal
906 (cond-emacs-xemacs 877 (cond-emacs-xemacs
907 '((((class color) (background light)) 878 '((((class color) (background light))
@@ -911,9 +882,6 @@ Do not change."
911It is used to highlight strings matched by the first regexp group of 882It is used to highlight strings matched by the first regexp group of
912`antlr-font-lock-literal-regexp'." 883`antlr-font-lock-literal-regexp'."
913 :group 'antlr) 884 :group 'antlr)
914;; backward-compatibility alias
915(put 'antlr-font-lock-literal-face 'face-alias 'antlr-literal)
916(put 'antlr-font-lock-literal-face 'obsolete-face "22.1")
917 885
918(defcustom antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\"" 886(defcustom antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\""
919 "Regexp matching literals with special syntax highlighting, or nil. 887 "Regexp matching literals with special syntax highlighting, or nil.
@@ -932,56 +900,58 @@ group. The string matched by the first group is highlighted with
932 (cond-emacs-xemacs 900 (cond-emacs-xemacs
933 `((antlr-invalidate-context-cache) 901 `((antlr-invalidate-context-cache)
934 ("\\$setType[ \t]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))" 902 ("\\$setType[ \t]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))"
935 (1 antlr-tokendef-face)) 903 (1 'antlr-tokendef))
936 ("\\$\\sw+" (0 antlr-keyword-face)) 904 ("\\$\\sw+" (0 'antlr-keyword))
937 ;; the tokens are already fontified as string/docstrings: 905 ;; the tokens are already fontified as string/docstrings:
938 (,(lambda (limit) 906 (,(lambda (limit)
939 (if antlr-font-lock-literal-regexp 907 (if antlr-font-lock-literal-regexp
940 (antlr-re-search-forward antlr-font-lock-literal-regexp limit))) 908 (antlr-re-search-forward antlr-font-lock-literal-regexp limit)))
941 (1 antlr-literal-face t) 909 (1 'antlr-literal t)
942 :XEMACS (0 nil)) ; XEmacs bug workaround 910 :XEMACS (0 nil)) ; XEmacs bug workaround
943 (,(lambda (limit) 911 (,(lambda (limit)
944 (antlr-re-search-forward antlr-class-header-regexp limit)) 912 (antlr-re-search-forward antlr-class-header-regexp limit))
945 (1 antlr-keyword-face) 913 (1 'antlr-keyword)
946 (2 antlr-ruledef-face) 914 (2 'antlr-ruledef)
947 (3 antlr-keyword-face) 915 (3 'antlr-keyword)
948 (4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser")) 916 (4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser"))
949 antlr-keyword-face 917 'antlr-keyword
950 font-lock-type-face))) 918 'font-lock-type-face)))
951 (,(lambda (limit) 919 (,(lambda (limit)
952 (antlr-re-search-forward 920 (antlr-re-search-forward
953 "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>" 921 "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>"
954 limit)) 922 limit))
955 (1 antlr-keyword-face)) 923 (1 'antlr-keyword))
956 (,(lambda (limit) 924 (,(lambda (limit)
957 (antlr-re-search-forward 925 (antlr-re-search-forward
958 "^\\(private\\|public\\|protected\\)\\>[ \t]*\\(\\(\\sw+[ \t]*\\(:\\)?\\)\\)?" 926 "^\\(private\\|public\\|protected\\)\\>[ \t]*\\(\\(\\sw+[ \t]*\\(:\\)?\\)\\)?"
959 limit)) 927 limit))
960 (1 font-lock-type-face) ; not XEmacs's java level-3 fruit salad 928 (1 'font-lock-type-face) ; not XEmacs's java level-3 fruit salad
961 (3 (if (antlr-upcase-p (char-after (match-beginning 3))) 929 (3 (if (antlr-upcase-p (char-after (match-beginning 3)))
962 antlr-tokendef-face 930 'antlr-tokendef
963 antlr-ruledef-face) nil t) 931 'antlr-ruledef)
964 (4 antlr-syntax-face nil t)) 932 nil t)
933 (4 'antlr-syntax nil t))
965 (,(lambda (limit) 934 (,(lambda (limit)
966 (antlr-re-search-forward "^\\(\\sw+\\)[ \t]*\\(:\\)?" limit)) 935 (antlr-re-search-forward "^\\(\\sw+\\)[ \t]*\\(:\\)?" limit))
967 (1 (if (antlr-upcase-p (char-after (match-beginning 0))) 936 (1 (if (antlr-upcase-p (char-after (match-beginning 0)))
968 antlr-tokendef-face 937 'antlr-tokendef
969 antlr-ruledef-face) nil t) 938 'antlr-ruledef)
970 (2 antlr-syntax-face nil t)) 939 nil t)
940 (2 'antlr-syntax nil t))
971 (,(lambda (limit) 941 (,(lambda (limit)
972 ;; v:ruleref and v:"literal" is allowed... 942 ;; v:ruleref and v:"literal" is allowed...
973 (antlr-re-search-forward "\\(\\sw+\\)[ \t]*\\([=:]\\)?" limit)) 943 (antlr-re-search-forward "\\(\\sw+\\)[ \t]*\\([=:]\\)?" limit))
974 (1 (if (match-beginning 2) 944 (1 (if (match-beginning 2)
975 (if (eq (char-after (match-beginning 2)) ?=) 945 (if (eq (char-after (match-beginning 2)) ?=)
976 antlr-default-face 946 'antlr-default
977 font-lock-variable-name-face) 947 'font-lock-variable-name-face)
978 (if (antlr-upcase-p (char-after (match-beginning 1))) 948 (if (antlr-upcase-p (char-after (match-beginning 1)))
979 antlr-tokenref-face 949 'antlr-tokenref
980 antlr-ruleref-face))) 950 'antlr-ruleref)))
981 (2 antlr-default-face nil t)) 951 (2 'antlr-default nil t))
982 (,(lambda (limit) 952 (,(lambda (limit)
983 (antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?" limit)) 953 (antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?" limit))
984 (0 antlr-syntax-face)))) 954 (0 'antlr-syntax))))
985 "Font-lock keywords for ANTLR's normal grammar code. 955 "Font-lock keywords for ANTLR's normal grammar code.
986See `antlr-font-lock-keywords-alist' for the keywords of actions.") 956See `antlr-font-lock-keywords-alist' for the keywords of actions.")
987 957