diff options
Diffstat (limited to 'lisp/progmodes/cc-defs.el')
-rw-r--r-- | lisp/progmodes/cc-defs.el | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 613e2b303d9..53d665477c1 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -81,7 +81,7 @@ (progn (require 'font-lock) (let (font-lock-keywords) - (font-lock-compile-keywords '("\\<\\>")) + (font-lock-compile-keywords '("a\\`")) ; doesn't match anything. font-lock-keywords)))) @@ -219,6 +219,7 @@ one of the following symbols: `bol' -- beginning of line `eol' -- end of line +`eoll' -- end of logical line (i.e. without escaped NL) `bod' -- beginning of defun `eod' -- end of defun `boi' -- beginning of indentation @@ -254,6 +255,16 @@ to it is returned. This function does not modify the point or the mark." (end-of-line) (point)))) + ((eq position 'eoll) + `(save-excursion + ,@(if point `((goto-char ,point))) + (while (progn + (end-of-line) + (prog1 (eq (logand 1 (skip-chars-backward "\\\\")) 1))) + (beginning-of-line 2)) + (end-of-line) + (point))) + ((eq position 'boi) `(save-excursion ,@(if point `((goto-char ,point))) @@ -453,6 +464,13 @@ to it is returned. This function does not modify the point or the mark." `(int-to-char ,integer) integer)) +(defmacro c-characterp (arg) + ;; Return t when ARG is a character (XEmacs) or integer (Emacs), otherwise + ;; return nil. + (if (integerp ?c) + `(integerp ,arg) + `(characterp ,arg))) + (defmacro c-last-command-char () ;; The last character just typed. Note that `last-command-event' exists in ;; both Emacs and XEmacs, but with confusingly different meanings. @@ -1775,10 +1793,10 @@ when it's needed. The default is the current language taken from (t re))) - ;; Produce a regexp that matches nothing. + ;; Produce a regexp that doesn't match anything. (if adorn - "\\(\\<\\>\\)" - "\\<\\>"))) + "\\(a\\`\\)" + "a\\`"))) (put 'c-make-keywords-re 'lisp-indent-function 1) |