aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2014-11-01 15:56:16 +0000
committerAlan Mackenzie2014-11-01 15:56:16 +0000
commitf3f7acc5927b825870db93447efb2efb2ac4c6d5 (patch)
treed55f627ca40e750d326a3db62cb0d4b4a5de3bbf
parent614beeecf29d16c08f66a4f82b6085be90df8a74 (diff)
downloademacs-f3f7acc5927b825870db93447efb2efb2ac4c6d5.tar.gz
emacs-f3f7acc5927b825870db93447efb2efb2ac4c6d5.zip
Make blink-parens work with a closing template delimiter.
progmodes/cc-cmds.el (c-electric-lt-gt): Cause a redisplay before calling blink-paren-function, so as to apply syntax-table properties to the ">".
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/cc-cmds.el11
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 11c789a9625..22972401cb1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12014-11-01 Alan Mackenzie <acm@muc.de>
2
3 Make blink-parens work with a closing template delimiter.
4 * progmodes/cc-cmds.el (c-electric-lt-gt): Cause a redisplay
5 before calling blink-paren-function, so as to apply syntax-table
6 properties to the ">".
7
12014-11-01 Jan Djärv <jan.h.d@swipnet.se> 82014-11-01 Jan Djärv <jan.h.d@swipnet.se>
2 9
3 * select.el (gui-get-selection): Comment: data-type ignored on NS. 10 * select.el (gui-get-selection): Comment: data-type ignored on NS.
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index afbd577b10d..5fa3b25401e 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1155,11 +1155,12 @@ numeric argument is supplied, or the point is inside a literal."
1155 (when (and (eq (char-before) ?>) 1155 (when (and (eq (char-before) ?>)
1156 (not executing-kbd-macro) 1156 (not executing-kbd-macro)
1157 blink-paren-function) 1157 blink-paren-function)
1158 ;; Note: Most paren blink functions, such as the standard 1158 ;; Currently (2014-10-19), the syntax-table text properties on < and >
1159 ;; `blink-matching-open', currently doesn't handle paren chars 1159 ;; are only applied in code called during Emacs redisplay. We thus
1160 ;; marked with text properties very well. Maybe we should avoid 1160 ;; explicitly cause a redisplay so that these properties have been
1161 ;; this call for the time being? 1161 ;; applied when `blink-paren-function' gets called.
1162 (funcall blink-paren-function))))) 1162 (sit-for 0)
1163 (funcall blink-paren-function)))))
1163 1164
1164(defun c-electric-paren (arg) 1165(defun c-electric-paren (arg)
1165 "Insert a parenthesis. 1166 "Insert a parenthesis.