[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el, v [EMACS_22_B
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el, v [EMACS_22_BASE] |
Date: |
Tue, 19 Feb 2008 22:11:39 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Alan Mackenzie <acmacm> 08/02/19 22:11:39
Index: cc-langs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-langs.el,v
retrieving revision 1.47.2.7
retrieving revision 1.47.2.8
diff -u -b -r1.47.2.7 -r1.47.2.8
--- cc-langs.el 29 Jan 2008 20:47:03 -0000 1.47.2.7
+++ cc-langs.el 19 Feb 2008 22:11:38 -0000 1.47.2.8
@@ -414,6 +414,49 @@
classifies symbol constituents like '_' and '$' as word constituents,
so that all identifiers are recognized as words.")
+(c-lang-defconst c-get-state-before-change-function
+ "If non-nil, a function called from c-before-change-hook.
+Typically it will record enough state to allow
+`c-before-font-lock-function' to extend the region to fontify,
+and may do such things as removing text-properties which must be
+recalculated.
+
+It takes 2 parameters, the BEG and END supplied to every
+before-change function; on entry, the buffer will have been
+widened and match-data will have been saved; point is undefined
+on both entry and exit; the return value is ignored.
+
+When the mode is initialized, this function is called with
+parameters \(point-min) and \(point-max)."
+ t nil
+ (c c++ objc) 'c-extend-region-for-CPP
+ awk 'c-awk-record-region-clear-NL)
+(c-lang-defvar c-get-state-before-change-function
+ (c-lang-const c-get-state-before-change-function))
+
+(c-lang-defconst c-before-font-lock-function
+ "If non-nil, a function called just before font locking.
+Typically it will extend the region about to be fontified \(see
+below) and will set `syntax-table' text properties on the region.
+
+It takes 3 parameters, the BEG, END, and OLD-LEN supplied to
+every after-change function; point is undefined on both entry and
+exit; on entry, the buffer will have been widened and match-data
+will have been saved; the return value is ignored.
+
+The function may extend the region to be fontified by setting the
+buffer local variables c-old-BEG and c-old-LEN.
+
+The function is called even when font locking is disabled.
+
+When the mode is initialized, this function is called with
+parameters \(point-min), \(point-max) and <buffer size>."
+ t nil
+ (c c++ objc) 'c-neutralize-syntax-in-CPP
+ awk 'c-awk-extend-and-syntax-tablify-region)
+(c-lang-defvar c-before-font-lock-function
+ (c-lang-const c-before-font-lock-function))
+
;;; Lexer-level syntax (identifiers, tokens etc).
@@ -645,6 +688,13 @@
(java awk) nil)
(c-lang-defvar c-opt-cpp-prefix (c-lang-const c-opt-cpp-prefix))
+(c-lang-defconst c-anchored-cpp-prefix
+ "Regexp matching the prefix of a cpp directive anchored to BOL,
+in the languages that have a macro preprocessor."
+ t (if (c-lang-const c-opt-cpp-prefix)
+ (concat "^" (c-lang-const c-opt-cpp-prefix))))
+(c-lang-defvar c-anchored-cpp-prefix (c-lang-const c-anchored-cpp-prefix))
+
(c-lang-defconst c-opt-cpp-start
"Regexp matching the prefix of a cpp directive including the directive
name, or nil in languages without preprocessor support. The first
@@ -662,7 +712,7 @@
string message."
t (if (c-lang-const c-opt-cpp-prefix)
'("error"))
- pike '("error" "warning"))
+ (c c++ objc pike) '("error" "warning"))
(c-lang-defconst c-cpp-include-directives
"List of cpp directives (without the prefix) that are followed by a
@@ -700,7 +750,7 @@
(c-lang-const c-opt-cpp-macro-define-id))
(c-lang-defconst c-cpp-expr-directives
- "List if cpp directives (without the prefix) that are followed by an
+ "List of cpp directives (without the prefix) that are followed by an
expression."
t (if (c-lang-const c-opt-cpp-prefix)
'("if" "elif")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el, v [EMACS_22_BASE],
Alan Mackenzie <=