commit/cc-mode: acm: Make blink-parens work with a closing template delimiter.

[email protected] Sat, 01 Nov 2014 15:46:33 -0000
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
1 new commit in cc-mode:

https://bitbucket.org/xemacs/cc-mode/commits/9a8816cab6aa/
Changeset:   9a8816cab6aa
User:        acm
Date:        2014-11-01 15:36:12+00:00
Summary:     Make blink-parens work with a closing template delimiter.
cc-cmds.el (c-electric-lt-gt): Cause a redisplay before calling
blink-paren-function, so as to apply syntax-table properties to the ">".
Affected #:  1 file

diff -r 7afc2ba9a07d8ddab67fd6de7cccd5a1bfdb79fb -r 9a8816cab6aa2266a66da2f6976df1d6d53ee72c cc-cmds.el
--- a/cc-cmds.el
+++ b/cc-cmds.el
@@ -1163,11 +1163,12 @@
       (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.

Repository URL: https://bitbucket.org/xemacs/cc-mode/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.