emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r118247: Make blink-parens work with a closing templ


From: Alan Mackenzie
Subject: [Emacs-diffs] trunk r118247: Make blink-parens work with a closing template delimiter.
Date: Sat, 01 Nov 2014 15:57:58 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118247
revision-id: address@hidden
parent: address@hidden
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sat 2014-11-01 15:56:16 +0000
message:
  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 ">".
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/cc-cmds.el      cccmds.el-20091113204419-o5vbwnq5f7feedwu-1224
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-01 11:37:14 +0000
+++ b/lisp/ChangeLog    2014-11-01 15:56:16 +0000
@@ -1,3 +1,10 @@
+2014-11-01  Alan Mackenzie  <address@hidden>
+
+       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  <address@hidden>
 
        * select.el (gui-get-selection): Comment: data-type ignored on NS.

=== modified file 'lisp/progmodes/cc-cmds.el'
--- a/lisp/progmodes/cc-cmds.el 2014-10-04 04:03:49 +0000
+++ b/lisp/progmodes/cc-cmds.el 2014-11-01 15:56:16 +0000
@@ -1155,11 +1155,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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]