]> code.delx.au - gnu-emacs/commitdiff
Make blink-parens work with a closing template delimiter.
authorAlan Mackenzie <acm@muc.de>
Sat, 1 Nov 2014 15:56:16 +0000 (15:56 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 1 Nov 2014 15:56:16 +0000 (15:56 +0000)
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 ">".

lisp/ChangeLog
lisp/progmodes/cc-cmds.el

index 11c789a962501f6932d08ff183a4bbcf8dd750da..22972401cb1cd5da1b99d0ff1a87aadf13f1c985 100644 (file)
@@ -1,3 +1,10 @@
+2014-11-01  Alan Mackenzie  <acm@muc.de>
+
+       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 ">".
+
 2014-11-01  Jan Djärv  <jan.h.d@swipnet.se>
 
        * select.el (gui-get-selection): Comment: data-type ignored on NS.
index afbd577b10dc71fb503c9891ba7760343bd70d7d..5fa3b25401e733c4a965e160d865da659f7b9280 100644 (file)
@@ -1155,11 +1155,12 @@ numeric argument is supplied, or the point is inside a literal."
       (when (and (eq (char-before) ?>)
                 (not executing-kbd-macro)
                 blink-paren-function)
-           ;; Note: Most paren blink functions, such as the standard
-           ;; `blink-matching-open', currently doesn't handle paren chars
-           ;; marked with text properties very well.  Maybe we should avoid
-           ;; this call for the time being?
-           (funcall blink-paren-function)))))
+       ;; Currently (2014-10-19), the syntax-table text properties on < and >
+       ;; are only applied in code called during Emacs redisplay.  We thus
+       ;; explicitly cause a redisplay so that these properties have been
+       ;; applied when `blink-paren-function' gets called.
+       (sit-for 0)
+       (funcall blink-paren-function)))))
 
 (defun c-electric-paren (arg)
   "Insert a parenthesis.