From: Richard Copley <rcopley@gmail.com>
To: 29024@debbugs.gnu.org
Subject: bug#29024: CC-mode infinite loop on typing < in template spec
Date: Fri, 27 Oct 2017 08:28:18 +0100 [thread overview]
Message-ID: <CAPM58oiYFQ_zrVSCXAVm2b6SC6WK5GEH31+WkPwsK-2KH8nFOw@mail.gmail.com> (raw)
In an empty CC-mode buffer, after typing "template <", Emacs enters an
infinite loop.
This was asked about here:
<https://emacs.stackexchange.com/questions/36423/emacs-hangs-on-c-mode-when-writting-the-character>
and reported on the emacs-devel list here:
<http://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00809.html>.
Recipe:
1. Visit an empty or non-existent .cpp file
2. Type "template <". Emacs hangs.
To trigger the bug again,
3. M-x erase-buffer RET
4. M-x normal-mode RET
5. Go to step 2.
The Emacs-lisp backtrace on quit is:
Debugger entered--Lisp error: (quit)
c-forward-<>-arglist-recur(nil)
c-forward-<>-arglist(nil)
c-restore-<>-properties(10 11 0)
#f(compiled-function (fn) #<bytecode 0x22e5bad>)(c-restore-<>-properties)
mapc(#f(compiled-function (fn) #<bytecode 0x22e5bad>)
(c-depropertize-new-text c-parse-quotes-after-change
c-extend-font-lock-region-for-macros
c-after-change-re-mark-raw-strings c-neutralize-syntax-in-and-mark-CPP
c-restore-<>-properties c-change-expand-fl-region))
c-after-change(10 11 0)
self-insert-command(1)
c-electric-lt-gt(nil)
funcall-interactively(c-electric-lt-gt nil)
call-interactively(c-electric-lt-gt nil nil)
command-execute(c-electric-lt-gt)
In GNU Emacs 26.0.90 (build 1, x86_64-w64-mingw32)
of 2017-10-13 built on MACHINE
Repository revision: d79fbb1818dc442ce71e7b55a8f1a4995d6fcd9e
Windowing system distributor 'Microsoft Corp.', version 10.0.15063
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Debug on Quit enabled globally
Entering debugger...
Configured using:
'configure --config-cache --with-modules --without-pop 'CFLAGS=-O3
-ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES LCMS2
Important settings:
value of $EMACSLOADPATH: c:\emacs-lisp;
value of $LANG: en_GB.UTF-8
locale-coding-system: cp1252
Major mode: Debugger
Minor modes in effect:
tooltip-mode: t
global-eldoc-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
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq dired
dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived
epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode
cl-print byte-opt gv bytecomp byte-compile cconv debug cus-start
cus-load cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded 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 w32notify w32 lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 125933 9286)
(symbols 56 23532 1)
(miscs 48 69 106)
(strings 32 37375 1623)
(string-bytes 1 1065619)
(vectors 16 17502)
(vector-slots 8 519143 6247)
(floats 8 58 316)
(intervals 56 311 17)
(buffers 992 13))
next reply other threads:[~2017-10-27 7:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 7:28 Richard Copley [this message]
2017-10-27 7:40 ` bug#29024: CC-mode infinite loop on typing < in template spec Richard Copley
2017-10-27 8:28 ` Eli Zaretskii
2017-10-27 8:33 ` Eli Zaretskii
2017-10-27 12:01 ` Richard Copley
2017-10-27 12:06 ` Richard Copley
2017-10-27 12:21 ` Noam Postavsky
2017-10-27 13:40 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPM58oiYFQ_zrVSCXAVm2b6SC6WK5GEH31+WkPwsK-2KH8nFOw@mail.gmail.com \
--to=rcopley@gmail.com \
--cc=29024@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).