• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:font +defs:lock +defs:comment +defs:face

49 ;;    all rules which use the current rule.  With font-lock update.
68 ;; Problems: code size, this mode would depend on font-lock internals.
81 ;; I strongly recommend to use font-lock with a support mode like fast-lock,
82 ;; lazy-lock or better jit-lock (Emacs-21.1+) / lazy-shot (XEmacs).
164 (defmacro save-buffer-state-x (&rest body) ; similar to EMACS/lazy-lock.el
181 (ignore-errors (require 'font-lock))
271 (defcustom antlr-indent-comment 'tab
273 If nil, no continuation line of a block comment is changed. If t, they
705 (define-key map "\C-c\C-c" 'comment-region)
756 ["Comment Out Region" comment-region
759 (comment-region (region-beginning) (region-end) '(4))
773 ;;; font-lock
776 (defcustom antlr-font-lock-maximum-decoration 'inherit
779 according to `antlr-font-lock-additional-keywords'. Value `inherit'
780 means, use value of `font-lock-maximum-decoration'. Any other value is
781 interpreted as in `font-lock-maximum-decoration' with no level-0
782 fontification, see `antlr-font-lock-keywords-alist'.
808 ;; `font-lock-choose-keywords'), but a non-symbol, i.e., (list), at `car'
810 "Empty font-lock keywords for actions.
813 (defvar antlr-font-lock-keywords-alist
816 java-font-lock-keywords-1 java-font-lock-keywords-2
817 java-font-lock-keywords-3)
820 c++-font-lock-keywords-1 c++-font-lock-keywords-2
821 c++-font-lock-keywords-3))
822 "List of font-lock keywords for actions in the grammar.
827 font-lock keywords according to `font-lock-defaults' used for the code
829 `antlr-font-lock-maximum-decoration'.")
831 (defvar antlr-default-face 'antlr-default)
837 (put 'antlr-font-lock-default-face 'face-alias 'antlr-default)
839 (defvar antlr-keyword-face 'antlr-keyword)
847 (put 'antlr-font-lock-keyword-face 'face-alias 'antlr-keyword)
849 (defvar antlr-syntax-face 'antlr-keyword)
857 (put 'antlr-font-lock-syntax-face 'face-alias 'antlr-syntax)
859 (defvar antlr-ruledef-face 'antlr-ruledef)
867 (put 'antlr-font-lock-ruledef-face 'face-alias 'antlr-ruledef)
869 (defvar antlr-tokendef-face 'antlr-tokendef)
877 (put 'antlr-font-lock-tokendef-face 'face-alias 'antlr-tokendef)
879 (defvar antlr-ruleref-face 'antlr-ruleref)
885 (put 'antlr-font-lock-ruleref-face 'face-alias 'antlr-ruleref)
887 (defvar antlr-tokenref-face 'antlr-tokenref)
893 (put 'antlr-font-lock-tokenref-face 'face-alias 'antlr-tokenref)
895 (defvar antlr-literal-face 'antlr-literal)
902 `antlr-font-lock-literal-regexp'."
905 (put 'antlr-font-lock-literal-face 'face-alias 'antlr-literal)
907 (defcustom antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\""
912 `antlr-font-lock-literal-face'."
920 (defvar antlr-font-lock-additional-keywords
924 (1 antlr-tokendef-face))
925 ("\\$\\sw+" (0 keyword-face))
928 (if antlr-font-lock-literal-regexp
929 (antlr-re-search-forward antlr-font-lock-literal-regexp limit)))
930 (1 antlr-literal-face t)
934 (1 antlr-keyword-face)
935 (2 antlr-ruledef-face)
936 (3 antlr-keyword-face)
938 antlr-keyword-face
939 type-face)))
944 (1 antlr-keyword-face))
949 (1 font-lock-type-face) ; not XEmacs' java level-3 fruit salad
951 antlr-tokendef-face
952 antlr-ruledef-face) nil t)
953 (4 antlr-syntax-face nil t))
957 antlr-tokendef-face
958 antlr-ruledef-face) nil t)
959 (2 antlr-syntax-face nil t))
965 antlr-default-face
966 font-lock-variable-name-face)
968 antlr-tokenref-face
969 antlr-ruleref-face)))
970 (2 antlr-default-face nil t))
973 (0 antlr-syntax-face))))
974 "Font-lock keywords for ANTLR's normal grammar code.
975 See `antlr-font-lock-keywords-alist' for the keywords of actions.")
977 (defvar antlr-font-lock-defaults
978 '(antlr-font-lock-keywords
980 "Font-lock defaults used for ANTLR syntax highlighting.
1000 `antlr-font-lock-defaults'. This table should be selected if you use
1009 ;; Emacs' font-lock changes buffer's tick counter, therefore this value should
1010 ;; be a parameter of a font-lock function, but not any other variable of
1085 Return `string' if point is within a string, `block-comment' or
1086 `comment' is point is within a comment or the depth within all
1093 ;; Arg, Emacs' (buffer-modified-tick) changes with font-lock. Use
1094 ;; hack that `loudly' is bound during font-locking => cache use will
1095 ;; increase from 7% to 99.99% during font-locking.
1121 ((nth 4 state) 'comment) ; block-comment? -- we don't care
1161 ;;; ((nth 4 state) 'comment) ; block-comment? -- we don't care
1168 ;;; ((nth 4 state) 'comment) ; block-comment? -- we don't care
1229 ;;; font-lock
1232 (defun antlr-font-lock-keywords ()
1233 "Return font-lock keywords for current buffer.
1234 See `antlr-font-lock-additional-keywords', `antlr-language' and
1235 `antlr-font-lock-maximum-decoration'."
1236 (if (eq antlr-font-lock-maximum-decoration 'none)
1237 antlr-font-lock-additional-keywords
1238 (append antlr-font-lock-additional-keywords
1240 (font-lock-choose-keywords
1242 antlr-font-lock-keywords-alist))
1243 (if (eq antlr-font-lock-maximum-decoration 'inherit)
1244 font-lock-maximum-decoration
1245 antlr-font-lock-maximum-decoration)))))))
1300 (defun antlr-skip-exception-part (skip-comment)
1303 header. If SKIP-COMMENT is non-nil, also skip the comment after that
1322 (or skip-comment (goto-char pos))))
1324 (defun antlr-skip-file-prelude (skip-comment)
1326 If SKIP-COMMENT is non-nil, also skip the comment after that part.
1330 position before the comment after the header."
1334 (if skip-comment (setq pos0 (point)))
1337 (if (eq skip-comment 'header-only) ; a hack...
1341 (or skip-comment (goto-char pos))
1344 (defun antlr-next-rule (arg skip-comment)
1359 (antlr-skip-exception-part skip-comment))
1360 (antlr-skip-file-prelude skip-comment))
1370 (setq pos (antlr-skip-file-prelude skip-comment))
1379 (antlr-skip-exception-part skip-comment)))
1386 (antlr-skip-exception-part skip-comment)))))
1745 (antlr-skip-file-prelude t) ; ws/comment after: OK
1787 '(comment block-comment)))))
1788 ;; point in options area and not in comment
1802 Move to POS and from there on to the beginning of the string or comment
1814 ((memq context '(comment block-comment))
1877 ;; Move outside string/comment if point is inside option spec
1961 ;; just comment after point => skip (+ lines w/ same col comment)
2056 of `antlr-language', keeping the value of variable `font-lock-mode'.
2063 (let ((font-lock (and (boundp 'font-lock-mode) font-lock-mode)))
2064 (if font-lock (font-lock-mode 0))
2066 (and font-lock (null font-lock-mode) (font-lock-mode 1)))))))
2384 `antlr-indent-comment'.
2455 (if (eq syntax 'string) nil (eq antlr-indent-comment t)))
2483 (let ((antlr-indent-comment (and antlr-indent-comment t))) ; dynamic
2525 c-comment-start-regexp c-C++-comment-start-regexp
2535 c-comment-start-regexp c-Java-comment-start-regexp
2588 (let ((slist (nth 3 antlr-font-lock-defaults)))
2627 (setq comment-start "// "
2628 comment-end ""
2629 comment-start-skip "/\\*+ *\\|// *")
2631 (make-local-variable 'font-lock-defaults)
2632 (setq font-lock-defaults antlr-font-lock-defaults)