[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117728: Make ">>" act as double template ender in C
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] trunk r117728: Make ">>" act as double template ender in C++ Mode. |
Date: |
Sun, 24 Aug 2014 20:45:50 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117728
revision-id: address@hidden
parent: address@hidden
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sun 2014-08-24 20:38:11 +0000
message:
Make ">>" act as double template ender in C++ Mode.
cc-langs.el (c->-op-cont-tokens): New lang-const split off from
c->-op-cont-re.
(c->-op-cont-tokens): Change to use the above.
(c->-op-without->-cont-regexp): New lang-const.
cc-engine.el (c-forward-<>-arglist-recur): Use
c->-op-without->-cont-regexp in place of c->-op-cont-tokens.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/cc-engine.el
ccengine.el-20091113204419-o5vbwnq5f7feedwu-1227
lisp/progmodes/cc-langs.el cclangs.el-20091113204419-o5vbwnq5f7feedwu-1228
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-08-23 11:02:20 +0000
+++ b/lisp/ChangeLog 2014-08-24 20:38:11 +0000
@@ -1,3 +1,14 @@
+2014-08-24 Alan Mackenzie <address@hidden>
+
+ Make ">>" act as double template ender in C++ Mode.
+ * progmodes/cc-langs.el (c->-op-cont-tokens): New lang-const split
+ off from c->-op-cont-re.
+ (c->-op-cont-tokens): Change to use the above.
+ (c->-op-without->-cont-regexp): New lang-const.
+ * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Use
+ c->-op-without->-cont-regexp in place of c->-op-cont-tokens.
+
+
2014-08-23 Alan Mackenzie <address@hidden>
* progmodes/cc-fonts.el (c-font-lock-declarators): Fix infinite
=== modified file 'lisp/progmodes/cc-engine.el'
--- a/lisp/progmodes/cc-engine.el 2014-08-02 18:52:48 +0000
+++ b/lisp/progmodes/cc-engine.el 2014-08-24 20:38:11 +0000
@@ -5944,7 +5944,7 @@
;; Either an operator starting with '>' or the end of
;; the angle bracket arglist.
- (if (looking-at c->-op-cont-regexp)
+ (if (looking-at c->-op-without->-cont-regexp)
(progn
(goto-char (match-end 0))
t) ; Continue the loop.
=== modified file 'lisp/progmodes/cc-langs.el'
--- a/lisp/progmodes/cc-langs.el 2014-07-14 23:58:52 +0000
+++ b/lisp/progmodes/cc-langs.el 2014-08-24 20:38:11 +0000
@@ -1217,22 +1217,41 @@
(c-lang-defvar c-<-op-cont-regexp (c-lang-const c-<-op-cont-regexp))
+(c-lang-defconst c->-op-cont-tokens
+ ;; A list of second and subsequent characters of all multicharacter tokens
+ ;; that begin with ">".
+ t (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
+ t
+ "\\`>."
+ (lambda (op) (substring op 1)))
+ java (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
+ t
+ "\\`>[^>]\\|\\`>>[^>]"
+ (lambda (op) (substring op 1))))
+
(c-lang-defconst c->-op-cont-regexp
;; Regexp matching the second and subsequent characters of all
;; multicharacter tokens that begin with ">".
- t (c-make-keywords-re nil
- (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
- t
- "\\`>."
- (lambda (op) (substring op 1))))
- java (c-make-keywords-re nil
- (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
- t
- "\\`>[^>]\\|\\`>>[^>]"
- (lambda (op) (substring op 1)))))
+ t (c-make-keywords-re nil (c-lang-const c->-op-cont-tokens)))
(c-lang-defvar c->-op-cont-regexp (c-lang-const c->-op-cont-regexp))
+(c-lang-defconst c->-op-without->-cont-regexp
+ ;; Regexp matching the second and subsequent characters of all
+ ;; multicharacter tokens that begin with ">" except for those beginning with
+ ;; ">>".
+ t (c-make-keywords-re nil
+ (set-difference
+ (c-lang-const c->-op-cont-tokens)
+ (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
+ t
+ "\\`>>"
+ (lambda (op) (substring op 1)))
+ :test 'string-equal)))
+
+(c-lang-defvar c->-op-without->-cont-regexp
+ (c-lang-const c->-op-without->-cont-regexp))
+
(c-lang-defconst c-stmt-delim-chars
;; The characters that should be considered to bound statements. To
;; optimize `c-crosses-statement-barrier-p' somewhat, it's assumed to
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117728: Make ">>" act as double template ender in C++ Mode.,
Alan Mackenzie <=