From 8c8b11644662d5c96c3ff71998e4a0dab53b87d9 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Tue, 9 May 2006 04:07:25 +0000 Subject: [PATCH] (cpp-font-lock-keywords-source-directives): Addded "warning" and "import". (cpp-font-lock-keywords): Added "warning". --- lisp/ChangeLog | 6 ++++++ lisp/font-lock.el | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4179428136..22b93e2e079 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-09 Masatake YAMATO + + * font-lock.el (cpp-font-lock-keywords-source-directives): Addded + "warning" and "import". + (cpp-font-lock-keywords): Added "warning". + 2006-05-08 Dan Nicolaescu * term/xterm.el (terminal-init-xterm): Add more key bindings. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d3017e3b3f3..207d3b88f86 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1974,17 +1974,17 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." ;; ;; (regexp-opt ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" -;; "ifndef" "include" "line" "pragma" "undef")) +;; "ifndef" "import" "include" "line" "pragma" "undef" "warning")) ;; (defconst cpp-font-lock-keywords-source-directives - "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|nclude\\)\\|line\\|pragma\\|undef" + "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning" "Regular expressoin used in `cpp-font-lock-keywords'.") ;; `cpp-font-lock-keywords-source-depth' is calculated from: ;; ;; (regexp-opt-depth (regexp-opt ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" -;; "ifndef" "include" "line" "pragma" "undef"))) +;; "ifndef" "import" "include" "line" "pragma" "undef" "warning"))) ;; (defconst cpp-font-lock-keywords-source-depth 0 "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'. @@ -1996,7 +1996,7 @@ Used in `cpp-font-lock-keywords'.") (list ;; ;; Fontify error directives. - '("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) + '("^#[ \t]*\\(?:error\\|warning\\)[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) ;; ;; Fontify filenames in #include <...> preprocessor directives as strings. '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)" -- 2.39.5