Subject: bug#18864: 24.4; F4 may be inserted into emacs macro when blink-matching-paren is enabled

From: Andreas Ehliar <[email-masked]>
Date: Mon, 27 Oct 2014 11:28:38 +0100

Starting from emacs -Q:
 *  Open an html file (e.g. /tmp/foo.html)
 * Type <b
 * Start a macro with F3
 * Quickly enter > followed by F4
 * M-x edit-last-kbd-macro now shows that F4 has been inserted into the
 macro.

 I believe that this bug is, in some way, caused by 
 blink-matching-paren.
 F4 only seems to be entered into the macro when the preceding "<" is
 highlighted.

 Also, I cannot reproduce the bug when setting blink-matching-paren to
 nil.

 I originally saw this problem in 24.3, but I have just compiled 24.4
 to confirm that the bug is still present there.

 In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
  of 2014-10-27 on yendor
 Windowing system distributor `Fedora Project', version 11.0.11404000
 Configured using:
  `configure --prefix=/home/ehliar --with-x-toolkit=gtk3'

 Important settings:
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

 Major mode: HTML

 Minor modes in effect:
   tooltip-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

 Recent input:
 C-a C-k C-x C-f C-a C-k / t m p / f o o . h t m l <return>
 C-k < b <f3> > <f4> <f4> C-_ C-_ C-SPC C-p C-f C-f
 C-w C-f C-f <return> <backspace> <backspace> <escape>
 : ( s e t q SPC b l i n k - m a t c h i n g - p a r
 e n SPC n i l ) <return> < b <f3> > <f4> <f4> C-_ C-_
 M-x r e p o r t - b u g <return>

 Recent messages:
 Defining kbd macro...
 Keyboard macro defined
 After 0 kbd macro iterations: jit-lock-after-change: Variable binding 
 depth exceeds max-specpdl-size
 Undo! [2 times]
 Mark set
 call-interactively: End of buffer
 nil
 Defining kbd macro...
 Keyboard macro defined
 Undo! [2 times]

 Load-path shadows:
 None found.

 Features:
 (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 
 mml
 easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
 mm-util help-fns mail-prsvr mail-utils kmacro sgml-mode time-date
 tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
 x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
 newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
 select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
 frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
 tai-viet lao korean japanese hebrew greek romanian slovak czech 
 european
 ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
 simple abbrev minibuffer nadvice loaddefs button faces cus-face 
 macroexp
 files text-properties overlay sha1 md5 base64 format env code-pages 
 mule
 custom widget hashtable-print-readable backquote make-network-process
 dbusbind gfilenotify dynamic-setting system-font-setting
 font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

 Memory information:
 ((conses 16 75309 7418)
  (symbols 48 17875 0)
  (miscs 40 44 163)
  (strings 32 10582 4360)
  (string-bytes 1 275454)
  (vectors 16 9233)
  (vector-slots 8 387590 15134)
  (floats 8 64 128)
  (intervals 56 192 0)
  (buffers 960 12)
  (heap 1024 40355 942))