X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ffont-lock.el;h=edc59641a97b02aab5b4a0794b9b799156481154;hb=acb24fd9281356e95bea31f1661e34dceef1fc59;hp=ee880bbcb1bdd72c0af94c781b167a171b9b8a10;hpb=59eec5f21669e81977b5b1fe9bf717cab49cf7fb;p=chise%2Fxemacs-chise.git diff --git a/lisp/font-lock.el b/lisp/font-lock.el index ee880bb..edc5964 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -390,7 +390,7 @@ megabyte for buffers in `rmail-mode', and size is irrelevant otherwise." For example, an element of the first form highlights (if not already highlighted): - \"\\\\\" Discrete occurrences of \"foo\" in the value + \"\\\\\\=\" Discrete occurrences of \"foo\" in the value of the variable `font-lock-keyword-face'. (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of @@ -409,7 +409,7 @@ For example, an element of the first form highlights (if not already highlighted `fubar-match' finds and matches in the value of `fubar-face'. - (\"\\\\\" (0 anchor-face) (\"\\\\\" nil nil (0 item-face))) + (\"\\\\\\=\" (0 anchor-face) (\"\\\\\\=\" nil nil (0 item-face))) -------------- --------------- ------------ --- --- ------------- | | | | | | MATCHER | ANCHOR-MATCHER | +------+ MATCH-HIGHLIGHT @@ -909,11 +909,13 @@ See the variable `font-lock-keywords' for customization." ;;;###autoload (defun turn-on-font-lock () "Unconditionally turn on Font Lock mode." + (interactive) (font-lock-mode 1)) ;;;###autoload (defun turn-off-font-lock () "Unconditionally turn off Font Lock mode." + (interactive) (font-lock-mode 0)) ;;; FSF has here: @@ -2097,22 +2099,38 @@ START should be at the beginning of a line." (c++-keywords ; ("break" "continue" "do" "else" "for" "if" "return" "switch" "while" ; "asm" "catch" "delete" "new" "operator" "sizeof" "this" "throw" "try" -; "protected" "private" "public") - (concat "asm\\|break\\|c\\(atch\\|ontinue\\)\\|d\\(elete\\|o\\)\\|" - "else\\|for\\|if\\|new\\|" - "p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|return\\|" - "s\\(izeof\\|witch\\)\\|t\\(h\\(is\\|row\\)\\|ry\\)\\|while")) +; "protected" "private" "public" "const_cast" "dynamic_cast" "reinterpret_cast" +; "static_cast" "and" "bitor" "or" "xor" "compl" "bitand" "and_eq" +; "or_eq" "xor_eq" "not" "not_eq" "typeid" "false" "true") + (concat "a\\(nd\\(\\|_eq\\)\\|sm\\)\\|" + "b\\(it\\(or\\|and\\)\\|reak\\)\\|" + "c\\(atch\\|o\\(mpl\\|n\\(tinue\\|st_cast\\)\\)\\)\\|" + "d\\(elete\\|o\\|ynamic_cast\\)\\|" + "else\\|" + "f\\(alse\\|or\\)\\|if\\|" + "n\\(ew\\|ot\\(\\|_eq\\)\\)\\|" + "p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|" + "or\\(\\|_eq\\)\\|" + "re\\(interpret_cast\\|turn\\)\\|" + "s\\(izeof\\|tatic_cast\\|witch\\)\\|" + "t\\(h\\(is\\|row\\)\\|r\\(ue\\|y\\)\\|ypeid\\)\\|" + "xor\\(\\|_eq\\)\\|while")) (c++-type-types ; ("auto" "extern" "register" "static" "typedef" "struct" "union" "enum" ; "signed" "unsigned" "short" "long" "int" "char" "float" "double" ; "void" "volatile" "const" "class" "inline" "friend" "bool" -; "virtual" "complex" "template") +; "virtual" "complex" "template" "explicit" "mutable" "export" "namespace" +; "using" "typename" "wchar_t") (concat "auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|" - "double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|" - "in\\(line\\|t\\)\\|long\\|register\\|" + "double\\|" + "e\\(num\\|x\\(p\\(licit\\|ort\\)\\|tern\\)\\)\\|" + "f\\(loat\\|riend\\)\\|" + "in\\(line\\|t\\)\\|long\\|mutable\\|namespace\\|register\\|" "s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|" - "t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|" - "v\\(irtual\\|o\\(id\\|latile\\)\\)")) ; 11 ()s deep. + "t\\(emplate\\|ype\\(def\\|name\\)\\)\\|" + "u\\(\\(n\\(ion\\|signed\\)\\|sing\\)\\)\\|" + "v\\(irtual\\|o\\(id\\|latile\\)\\)\\|" + "wchar_t")) ; 11 ()s deep. (ctoken "\\(\\sw\\|\\s_\\|[:~*&]\\)+") ) (setq c-font-lock-keywords-1 @@ -2643,22 +2661,22 @@ The name is assumed to begin with a capital letter.") 3 (if (match-beginning 2) 'bold 'italic) keep)) "Default expressions to highlight in TeX modes.") -(defconst ksh-font-lock-keywords (purecopy +(defconst ksh-font-lock-keywords (list '("\\(^\\|[^\$\\\]\\)#.*" . font-lock-comment-face) '("\\<\\(if\\|then\\|else\\|elif\\|fi\\|case\\|esac\\|for\\|do\\|done\\|foreach\\|in\\|end\\|select\\|while\\|repeat\\|time\\|function\\|until\\|exec\\|command\\|coproc\\|noglob\\|nohup\\|nocorrect\\|source\\|autoload\\|alias\\|unalias\\|export\\|set\\|echo\\|eval\\|cd\\|log\\|compctl\\)\\>" . font-lock-keyword-face) '("\\<\\[\\[.*\\]\\]\\>" . font-lock-type-face) '("\$\(.*\)" . font-lock-type-face) - )) + ) "Additional expressions to highlight in ksh-mode.") -(defconst sh-font-lock-keywords (purecopy +(defconst sh-font-lock-keywords (list '("\\(^\\|[^\$\\\]\\)#.*" . font-lock-comment-face) '("\\<\\(if\\|then\\|else\\|elif\\|fi\\|case\\|esac\\|for\\|do\\|done\\|in\\|while\\|exec\\|export\\|set\\|echo\\|eval\\|cd\\)\\>" . font-lock-keyword-face) '("\\[.*\\]" . font-lock-type-face) '("`.*`" . font-lock-type-face) - )) + ) "Additional expressions to highlight in sh-mode.")