diff options
Diffstat (limited to 'lisp/progmodes/cc-fonts.el')
-rw-r--r-- | lisp/progmodes/cc-fonts.el | 114 |
1 files changed, 10 insertions, 104 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 75d631ac39..9c05150688 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -348,15 +348,15 @@ highlights)))) nil))) - (eval-after-load "edebug" - '(progn - (def-edebug-spec c-fontify-types-and-refs let*) - (def-edebug-spec c-make-syntactic-matcher t) - ;; If there are literal quoted or backquoted highlight specs in - ;; the call to `c-make-font-lock-search-function' then let's - ;; instrument the forms in them. - (def-edebug-spec c-make-font-lock-search-function - (form &rest &or ("quote" (&rest form)) ("`" (&rest form)) form))))) +; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. +; '(progn + (def-edebug-spec c-fontify-types-and-refs let*) + (def-edebug-spec c-make-syntactic-matcher t) + ;; If there are literal quoted or backquoted highlight specs in + ;; the call to `c-make-font-lock-search-function' then let's + ;; instrument the forms in them. + (def-edebug-spec c-make-font-lock-search-function + (form &rest &or ("quote" (&rest form)) ("`" (&rest form)) form)));)) (defun c-fontify-recorded-types-and-refs () ;; Convert the ranges recorded on `c-record-type-identifiers' and @@ -2268,101 +2268,7 @@ need for `pike-font-lock-extra-types'.") autodoc-font-lock-doc-comments))))) -;; AWK. - -;; Awk regexps written with help from Peter Galbraith -;; <[email protected]>. -;; Take GNU Emacs's 'words out of the following regexp-opts. They dont work -;; in Xemacs 21.4.4. acm 2002/9/19. -(eval-after-load "cc-awk" ; Evaluate while loading cc-fonts - `(defconst awk-font-lock-keywords ; Evaluate after loading cc-awk - ',(eval-when-compile ; Evaluate while compiling cc-fonts - (list - ;; Function names. - '("^\\s *\\(func\\(tion\\)?\\)\\>\\s *\\(\\sw+\\)?" - (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) - ;; - ;; Variable names. - (cons - (concat "\\<" - (regexp-opt - '("ARGC" "ARGIND" "ARGV" "BINMODE" "CONVFMT" "ENVIRON" - "ERRNO" "FIELDWIDTHS" "FILENAME" "FNR" "FS" "IGNORECASE" - "LINT" "NF" "NR" "OFMT" "OFS" "ORS" "PROCINFO" "RLENGTH" - "RS" "RSTART" "RT" "SUBSEP" "TEXTDOMAIN") t) "\\>") - 'font-lock-variable-name-face) - - ;; Special file names. (acm, 2002/7/22) - ;; The following regexp was created by first evaluating this in GNU Emacs 21.1: - ;; (regexp-opt '("/dev/stdin" "/dev/stdout" "/dev/stderr" "/dev/fd/n" "/dev/pid" - ;; "/dev/ppid" "/dev/pgrpid" "/dev/user") 'words) - ;; , removing the "?:" from each "\\(?:" (for backward compatibility with older Emacsen) - ;; , replacing the "n" in "dev/fd/n" with "[0-9]+" - ;; , removing the unwanted \\< at the beginning, and finally filling out the - ;; regexp so that a " must come before, and either a " or heuristic stuff after. - ;; The surrounding quotes are fontified along with the filename, since, semantically, - ;; they are an indivisible unit. - '("\\(\"/dev/\\(fd/[0-9]+\\|p\\(\\(\\(gr\\)?p\\)?id\\)\\|\ -std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\ -\\(\\(\"\\)\\|\\([^\"/\n\r][^\"\n\r]*\\)?$\\)" - (1 font-lock-variable-name-face t) - (8 font-lock-variable-name-face t t)) - ;; Do the same (almost) with - ;; (regexp-opt '("/inet/tcp/lport/rhost/rport" "/inet/udp/lport/rhost/rport" - ;; "/inet/raw/lport/rhost/rport") 'words) - ;; This cannot be combined with the above pattern, because the match number - ;; for the (optional) closing \" would then exceed 9. - '("\\(\"/inet/\\(\\(raw\\|\\(tc\\|ud\\)p\\)/lport/rhost/rport\\)\\)\\>\ -\\(\\(\"\\)\\|\\([^\"/\n\r][^\"\n\r]*\\)?$\\)" - (1 font-lock-variable-name-face t) - (6 font-lock-variable-name-face t t)) - - ;; Keywords. - (concat "\\<" - (regexp-opt - '("BEGIN" "END" "break" "continue" "delete" "do" "else" - "exit" "for" "getline" "if" "in" "next" "nextfile" - "return" "while") - t) "\\>") - - ;; Builtins. - `(eval . (list - ,(concat - "\\<" - (regexp-opt - '("adump" "and" "asort" "atan2" "bindtextdomain" "close" - "compl" "cos" "dcgettext" "exp" "extension" "fflush" - "gensub" "gsub" "index" "int" "length" "log" "lshift" - "match" "mktime" "or" "print" "printf" "rand" "rshift" - "sin" "split" "sprintf" "sqrt" "srand" "stopme" - "strftime" "strtonum" "sub" "substr" "system" - "systime" "tolower" "toupper" "xor") t) - "\\>") - 0 c-preprocessor-face-name)) - - ;; gawk debugging keywords. (acm, 2002/7/21) - ;; (Removed, 2003/6/6. These functions are now fontified as built-ins) -;; (list (concat "\\<" (regexp-opt '("adump" "stopme") t) "\\>") -;; 0 'font-lock-warning-face) - - ;; User defined functions with an apparent spurious space before the - ;; opening parenthesis. acm, 2002/5/30. - `(,(concat "\\(\\w\\|_\\)" c-awk-escaped-nls* "\\s " - c-awk-escaped-nls*-with-space* "(") - (0 'font-lock-warning-face)) - - ;; Space after \ in what looks like an escaped newline. 2002/5/31 - '("\\\\\\s +$" 0 font-lock-warning-face t) - - ;; Unbalanced string (") or regexp (/) delimiters. 2002/02/16. - '("\\s|" 0 font-lock-warning-face t nil) - ;; gawk 3.1 localizable strings ( _"translate me!"). 2002/5/21 - '("\\(_\\)\\s|" 1 font-lock-warning-face) - '("\\(_\\)\\s\"" 1 font-lock-string-face) ; FIXME! not for XEmacs. 2002/10/6 - )) - "Default expressions to highlight in AWK mode.")) - - +;; 2006-07-10: awk-font-lock-keywords has been moved back to cc-awk.el. (cc-provide 'cc-fonts) ;;; arch-tag: 2f65f405-735f-4da5-8d4b-b957844c5203 |