diff options
author | Alan Mackenzie <acm@muc.de> | 2010-04-12 15:15:07 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2010-04-12 15:15:07 +0000 |
commit | 7af4bf3aea19289d47e46d9007e786ac1956bcb7 (patch) | |
tree | c9420c3fded77359f838757c4940390fc4e1cace /lisp/progmodes/cc-defs.el | |
parent | e2387bdba28af0022a4d63d024a8f16546001612 (diff) | |
download | emacs-7af4bf3aea19289d47e46d9007e786ac1956bcb7.tar.gz emacs-7af4bf3aea19289d47e46d9007e786ac1956bcb7.tar.bz2 emacs-7af4bf3aea19289d47e46d9007e786ac1956bcb7.zip |
Reverse change 2010-02-04T21:15:37Z!acm@muc.de: "Change strategy for marking < and > as template
delimiters: mark them strictly in matching pairs."
Diffstat (limited to 'lisp/progmodes/cc-defs.el')
-rw-r--r-- | lisp/progmodes/cc-defs.el | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 7eb0016ff43..bb91dee6ce8 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1029,44 +1029,6 @@ MODE is either a mode symbol or a list of mode symbols." ;; Emacs. `(remove-text-properties ,from ,to '(,property nil)))) -(defmacro c-search-forward-char-property (property value &optional limit) - "Search forward for a text-property PROPERTY having value VALUE. -LIMIT bounds the search. The comparison is done with `equal'. - -Leave point just after the character, and set the match data on -this character, and return point. If VALUE isn't found, Return -nil; point is then left undefined." - `(let ((place (point))) - (while - (and - (< place ,(or limit '(point-max))) - (not (equal (get-text-property place ,property) ,value))) - (setq place (next-single-property-change - place ,property nil ,(or limit '(point-max))))) - (when (< place ,(or limit '(point-max))) - (goto-char place) - (search-forward-regexp ".") ; to set the match-data. - (point)))) - -(defmacro c-search-backward-char-property (property value &optional limit) - "Search backward for a text-property PROPERTY having value VALUE. -LIMIT bounds the search. The comparison is done with `equal'. - -Leave point just before the character, set the match data on this -character, and return point. If VALUE isn't found, Return nil; -point is then left undefined." - `(let ((place (point))) - (while - (and - (> place ,(or limit '(point-min))) - (not (equal (get-text-property (1- place) ,property) ,value))) - (setq place (previous-single-property-change - place ,property nil ,(or limit '(point-min))))) - (when (> place ,(or limit '(point-max))) - (goto-char place) - (search-backward-regexp ".") ; to set the match-data. - (point)))) - (defun c-clear-char-property-with-value-function (from to property value) "Remove all text-properties PROPERTY from the region (FROM, TO) which have the value VALUE, as tested by `equal'. These |