From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 42319@debbugs.gnu.org
Subject: bug#42319: 28.0.50; c-mode issue with electric-pair-mode
Date: Sat, 11 Jul 2020 10:30:13 +0200 [thread overview]
Message-ID: <20200711083013.t2p6cocfgctcgsev@ergus> (raw)
In-Reply-To: 20200711083013.t2p6cocfgctcgsev.ref@ergus
--text follows this line--
In c-mode there is an issue of adding some extra spaces in
electric-pair-mode after class definitions.
For example
emacs -Q main.cxx
M-x electric-pair-mode
M-x c-toggle-auto-newline
and then insert:
class A {
you should get: (# means the cursor)
class A
{
#
}
now insert } and then you get
class A
{
}
#
instead of:
class A
{
}
#
The problem is actually worst if defun-close-semi is in c-cleanup-list
because it doesn't work. I need to remove the extra spaces first to make
it work.
In GNU Emacs 28.0.50 (build 12, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
of 2020-07-10 built on ergus
Repository revision: 7caf570662e41dd7cb90efaf8a335918cf1ac0da
Repository branch: master
System Description: Debian GNU/Linux 10 (buster)
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
main.cxx has auto save data; consider M-x recover-this-file
Electric-Pair mode enabled
You can run the command ‘c-toggle-auto-newline’ with C-c C-a
Undo [2 times]
Mark set
Making completion list...
Configured using:
'configure --prefix=/home/ergus/.local/ --with-mailutils'
Configured features:
XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
LUCID X11 XDBE XIM MODULES THREADS PDUMPER
Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: C++//la
Minor modes in effect:
electric-pair-mode: t
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
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date subr-x seq mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
cus-start cus-load elec-pair 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
term/tmux term/xterm xterm byte-opt gv bytecomp byte-compile cconv
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer 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
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 threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 78618 7004)
(symbols 48 9526 1)
(strings 32 23498 1860)
(string-bytes 1 844562)
(vectors 16 10057)
(vector-slots 8 107261 7421)
(floats 8 26 435)
(intervals 56 287 3)
(buffers 992 12))
next parent reply other threads:[~2020-07-11 8:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200711083013.t2p6cocfgctcgsev.ref@ergus>
2020-07-11 8:30 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
[not found] ` <mailman.82.1594456263.2306.bug-gnu-emacs@gnu.org>
2020-07-11 10:26 ` bug#42319: 28.0.50; c-mode issue with electric-pair-mode Alan Mackenzie
2020-07-11 13:15 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-12 10:54 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200711083013.t2p6cocfgctcgsev@ergus \
--to=bug-gnu-emacs@gnu.org \
--cc=42319@debbugs.gnu.org \
--cc=spacibba@aol.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.