Reported by: David Reitter <david.reitter <at> gmail.com>
Date: Thu, 11 Feb 2010 03:02:01 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5560 in the body.
You can then email your comments to 5560 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:bug#5560
; Package emacs
.
(Thu, 11 Feb 2010 03:02:01 GMT) Full text and rfc822 format available.David Reitter <david.reitter <at> gmail.com>
:bug-gnu-emacs <at> gnu.org
.
(Thu, 11 Feb 2010 03:02:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: David Reitter <david.reitter <at> gmail.com> To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org> Subject: 23.1.92; parens matching in c-mode broken Date: Wed, 10 Feb 2010 22:01:05 -0500
[Message part 1 (text/plain, inline)]
Parens matching in C mode is sometimes surprising. In the example below, double-clicking on either of the first two opening parentheses will mark the text until the " hyper_modifier : 0)", but that is correct only for the second paren, while the first one is unmatched due to a space following the backslash. #define EV_MODIFIERS(e) \ ((([e modifierFlags] & NSHelpKeyMask) ? \ hyper_modifier : 0) \ ... It would be more useful if an "unmatched parentheses" was shown, or if the region up to the end of the scan process (i.e. the space+newline) was marked. In GNU Emacs 23.1.92.86 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25) of 2010-02-08 on scarlett.local - Aquamacs Distribution 2.0dev Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--with-ns' 'CFLAGS=-O0 -g'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: ObjC/l Minor modes in effect: diff-auto-refine-mode: t which-function-mode: t savehist-mode: t smart-frame-positioning-mode: t aquamacs-autoface-mode: t recentf-mode: t osx-key-mode: t tabbar-mwheel-mode: t tabbar-mode: t show-paren-mode: t delete-selection-mode: t pc-selection-mode: t cua-mode: t tooltip-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-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: <double-wheel-down> <triple-wheel-down> <wheel-down> <wheel-down> <double-wheel-down> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> <kp-delete> <down> <down> <down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-left> <S-left> <S-left> <S-left> <kp-delete> <kp-delete> <kp-delete> <kp-delete> <kp-delete> <down> <down> <A-left> <S-down> <S-down> <S-down> <S-down> <S-down> <kp-delete> <return> <up> <up> <up> <up> <up> <up> <backspace> <down> <down> <down> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <right> | <down> <down> <down> <down> <down> <left> | <down> <down> <down> <down> <right> <down> | <kp-delete> <up> <up> <up> <up> <up> <up> <kp-delete> <up> <up> <up> <up> <up> <kp-delete> <up> <right> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> <S-up> <S-up> ⌘X <down> <down> <down> <down> <down> <down> <down> <down> <down> ⌘V <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <tab> <down> <tab> <down> <tab> <down> <tab> <down> <down> <up> <backspace> SPC \ <right> <tab> <down> <tab> <down> <tab> <down> <tab> <A-right> SPC \ <down> <A-backspace> <A-backspace> <tab> <down> <tab> <down> <tab> <down> <tab> <A-right> ) <backspace> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> <mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> ) <backspace> <wheel-up> <double-wheel-up> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> ⌘S <escape> X C - M O D E <return> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-1> <escape> X <up> O B <return> ⌘S <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> ⌘C <menu-bar> <help-menu> <bug-diagnosis> <send-emacs-bug-report> Recent messages: Auto-saving... Mark set [4 times] Auto-saving...done Auto-saving...done Mark set Auto-saving...done Auto-saving...done Saving file /Users/dr/ae.git/src/nsterm.m... Wrote /Users/dr/ae.git/src/nsterm.m (No changes need to be saved) Load-path shadows: /Users/dr/Library/Preferences/Aquamacs Emacs/Recent Files hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/Recent Files /Users/dr/Library/Preferences/Aquamacs Emacs/Preferences hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/Preferences /Users/dr/Library/Preferences/Aquamacs Emacs/places hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/places /Users/dr/Library/Preferences/Aquamacs Emacs/minibuffer-history hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/minibuffer-history /Users/dr/Library/Preferences/Aquamacs Emacs/frame-positions hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/frame-positions /Users/dr/Library/Preferences/Aquamacs Emacs/customizations hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/customizations /Library/Application Support/Aquamacs Emacs/JDEE/site-start hides /Library/Application Support/Aquamacs Emacs/SLIME/site-start /Library/Application Support/Aquamacs Emacs/JDEE/cedet/speedbar/speedbar hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/speedbar /Library/Application Support/Aquamacs Emacs/JDEE/cedet/speedbar/sb-image hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/sb-image /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/ezimage hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/ezimage /Library/Application Support/Aquamacs Emacs/JDEE/cedet/speedbar/dframe hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/dframe /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-speedbar hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-speedbar /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-opt hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-opt /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-custom hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-custom /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-comp hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-comp /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-base hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-base /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/chart hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/chart /Library/Application Support/Aquamacs Emacs/JDEE/cedet/semantic/semantic hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/semantic /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/mode-local hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/mode-local /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/inversion hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/inversion /Library/Application Support/Aquamacs Emacs/JDEE/cedet/ede/ede hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/ede /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/cedet hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/cedet /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/cedet-files hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/cedet-files /Library/Application Support/Aquamacs Emacs/JDEE/site-start hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/aquamacs/site-start Features: (shadow sort mail-extr message ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailabbrev nnheader gnus-util netrc gmm-utils mailheader canlock sha1 hex-util hashcash emacsbug cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs log-edit ring pcvs-util add-log diff-mode vc vc-dispatcher cl-specs edebug multi-isearch jka-compr find-func vc-git url-http tls url-auth mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums url-gw url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars mm-util mail-prsvr mailcap mail-utils which-func imenu slime-autoloads load-emacs-plugins aquamacs-mode-defaults auctex-config server tex-site smart-dnd aquamacs-aux savehist mouse-sel one-buffer-one-frame smart-frame-positioning drews_init color-theme-autoloads saveplace visual-line aquamacs-bug aquamacs-autoface-mode aquamacs-editing sendmail recentf tree-widget cus-edit osxkeys emulate-mac-keyboard-mode frame-cmds strings misc-fns thingatpt+ thingatpt frame-fns avoid aquamacs-mac-fontsets fit-frame aquamacs-frame-setup aquamacs-tabbar tabbar-window cl cl-19 tabbar easy-mmode cus-start cus-load load-emacs-pre-plugins aquamacs-site-start cocoa-compatibility filladapt aquamacs-redo check-for-updates aquamacs-menu osx_defaults aquamacs-tool-bar aquamacs mac-extra-functions aquamacs-tools aquamacs-macros parse-time timezone time-date paren delsel pc-select cua-base wid-edit regexp-opt advice advice-preload byte-opt bytecomp byte-compile debug help-fns help-mode view image-file disp-table tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs)
[PGP.sig (application/pgp-signature, inline)]
Glenn Morris <rgm <at> gnu.org>
to control <at> debbugs.gnu.org
.
(Thu, 11 Feb 2010 19:30:03 GMT) Full text and rfc822 format available.bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Wed, 17 Feb 2016 03:57:01 GMT) Full text and rfc822 format available.Message #10 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: Andrew Hyatt <ahyatt <at> gmail.com> To: David Reitter <david.reitter <at> gmail.com> Cc: 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Tue, 16 Feb 2016 22:56:34 -0500
I can confirm this still doesn't work right in Emacs 25. However, I get a slightly different experience, with clicking on all 3 left parens highlighting until the first right paren only. Similarly, that right paren seems to be the matching paren for all 3 left parens. David Reitter <david.reitter <at> gmail.com> writes: > Parens matching in C mode is sometimes surprising. In the example > below, double-clicking on either of the first two opening parentheses > will mark the text until the " hyper_modifier : 0)", but that is correct > only for the second paren, while the first one is unmatched due to a space > following the backslash. > > #define EV_MODIFIERS(e) \ > ((([e modifierFlags] & NSHelpKeyMask) ? \ > hyper_modifier : 0) \ > ... > > > It would be more useful if an "unmatched parentheses" was shown, or if the region up to the end of the scan process (i.e. the space+newline) was marked. > > > > > In GNU Emacs 23.1.92.86 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25) > of 2010-02-08 on scarlett.local - Aquamacs Distribution 2.0dev > Windowing system distributor `Apple', version 10.3.1038 > configured using `configure '--with-ns' 'CFLAGS=-O0 -g'' > > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: en_US.UTF-8 > value of $XMODIFIERS: nil > locale-coding-system: utf-8-unix > default enable-multibyte-characters: t > > Major mode: ObjC/l > > Minor modes in effect: > diff-auto-refine-mode: t > which-function-mode: t > savehist-mode: t > smart-frame-positioning-mode: t > aquamacs-autoface-mode: t > recentf-mode: t > osx-key-mode: t > tabbar-mwheel-mode: t > tabbar-mode: t > show-paren-mode: t > delete-selection-mode: t > pc-selection-mode: t > cua-mode: t > tooltip-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-encryption-mode: t > auto-compression-mode: t > column-number-mode: t > line-number-mode: t > transient-mark-mode: t > abbrev-mode: t > > Recent input: > <double-wheel-down> <triple-wheel-down> <wheel-down> > <wheel-down> <double-wheel-down> <down-mouse-1> <mouse-1> > <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> > <kp-delete> <down> <down> <down> <S-down> <S-down> > <S-down> <S-down> <S-down> <S-left> <S-left> <S-left> > <S-left> <kp-delete> <kp-delete> <kp-delete> <kp-delete> > <kp-delete> <down> <down> <A-left> <S-down> <S-down> > <S-down> <S-down> <S-down> <kp-delete> <return> <up> > <up> <up> <up> <up> <up> <backspace> <down> <down> > <down> <up> <up> <up> <up> <up> <up> <up> <up> <up> > <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> > <up> <up> <up> <right> | <down> <down> <down> <down> > <down> <left> | <down> <down> <down> <down> <right> > <down> | <kp-delete> <up> <up> <up> <up> <up> <up> > <kp-delete> <up> <up> <up> <up> <up> <kp-delete> <up> > <right> <S-down> <S-down> <S-down> <S-down> <S-down> > <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> > <S-down> <S-down> <S-down> <S-down> <S-down> <S-down> > <S-up> <S-up> ⌘X <down> <down> <down> <down> <down> > <down> <down> <down> <down> ⌘V <up> <up> <up> <up> > <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> > <tab> <down> <tab> <down> <tab> <down> <tab> <down> > <down> <up> <backspace> SPC \ <right> <tab> <down> > <tab> <down> <tab> <down> <tab> <A-right> SPC \ <down> > <A-backspace> <A-backspace> <tab> <down> <tab> <down> > <tab> <down> <tab> <A-right> ) <backspace> <down-mouse-1> > <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> > <mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> > <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> > <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> > <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> > <mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> > <mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> > <mouse-1> <down-mouse-1> <mouse-1> ) <backspace> <wheel-up> > <double-wheel-up> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> ⌘S <escape> > X C - M O D E <return> <down-mouse-1> <mouse-1> <double-down-mouse-1> > <double-mouse-1> <down-mouse-1> <mouse-1> <escape> > X <up> O B <return> ⌘S <down-mouse-1> <mouse-movement> > <mouse-movement> <drag-mouse-1> ⌘C <menu-bar> <help-menu> > <bug-diagnosis> <send-emacs-bug-report> > > Recent messages: > Auto-saving... > Mark set [4 times] > Auto-saving...done > Auto-saving...done > Mark set > Auto-saving...done > Auto-saving...done > Saving file /Users/dr/ae.git/src/nsterm.m... > Wrote /Users/dr/ae.git/src/nsterm.m > (No changes need to be saved) > > Load-path shadows: > /Users/dr/Library/Preferences/Aquamacs Emacs/Recent Files hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/Recent Files > /Users/dr/Library/Preferences/Aquamacs Emacs/Preferences hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/Preferences > /Users/dr/Library/Preferences/Aquamacs Emacs/places hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/places > /Users/dr/Library/Preferences/Aquamacs Emacs/minibuffer-history hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/minibuffer-history > /Users/dr/Library/Preferences/Aquamacs Emacs/frame-positions hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/frame-positions > /Users/dr/Library/Preferences/Aquamacs Emacs/customizations hides /Users/dr/Library/Preferences/Aquamacs Emacs/Aquamacs Emacs2/customizations > /Library/Application Support/Aquamacs Emacs/JDEE/site-start hides /Library/Application Support/Aquamacs Emacs/SLIME/site-start > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/speedbar/speedbar hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/speedbar > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/speedbar/sb-image hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/sb-image > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/ezimage hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/ezimage > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/speedbar/dframe hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/dframe > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-speedbar hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-speedbar > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-opt hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-opt > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-custom hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-custom > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-comp hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-comp > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/eieio-base hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/eieio-base > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/eieio/chart hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/emacs-lisp/chart > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/semantic/semantic hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/semantic > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/mode-local hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/mode-local > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/inversion hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/inversion > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/ede/ede hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/ede > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/cedet hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/cedet > /Library/Application Support/Aquamacs Emacs/JDEE/cedet/common/cedet-files hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/cedet/cedet-files > /Library/Application Support/Aquamacs Emacs/JDEE/site-start hides /Users/dr/ae.git/nextstep/Aquamacs.app/Contents/Resources/lisp/aquamacs/site-start > > Features: > (shadow sort mail-extr message ecomplete rfc822 mml mml-sec > password-cache mm-decode mm-bodies mm-encode mailabbrev nnheader > gnus-util netrc gmm-utils mailheader canlock sha1 hex-util hashcash > emacsbug cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine > cc-vars cc-defs log-edit ring pcvs-util add-log diff-mode vc > vc-dispatcher cl-specs edebug multi-isearch jka-compr find-func vc-git > url-http tls url-auth mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums > url-gw url-cache url url-proxy url-privacy url-expand url-methods > url-history url-cookie url-util url-parse url-vars mm-util mail-prsvr > mailcap mail-utils which-func imenu slime-autoloads load-emacs-plugins > aquamacs-mode-defaults auctex-config server tex-site smart-dnd > aquamacs-aux savehist mouse-sel one-buffer-one-frame > smart-frame-positioning drews_init color-theme-autoloads saveplace > visual-line aquamacs-bug aquamacs-autoface-mode aquamacs-editing > sendmail recentf tree-widget cus-edit osxkeys emulate-mac-keyboard-mode > frame-cmds strings misc-fns thingatpt+ thingatpt frame-fns avoid > aquamacs-mac-fontsets fit-frame aquamacs-frame-setup aquamacs-tabbar > tabbar-window cl cl-19 tabbar easy-mmode cus-start cus-load > load-emacs-pre-plugins aquamacs-site-start cocoa-compatibility filladapt > aquamacs-redo check-for-updates aquamacs-menu osx_defaults > aquamacs-tool-bar aquamacs mac-extra-functions aquamacs-tools > aquamacs-macros parse-time timezone time-date paren delsel pc-select > cua-base wid-edit regexp-opt advice advice-preload byte-opt bytecomp > byte-compile debug help-fns help-mode view image-file disp-table tooltip > ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd > fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer > select scroll-bar mldrag 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 loaddefs button minibuffer faces > cus-face files text-properties overlay md5 base64 format env code-pages > mule custom widget hashtable-print-readable backquote > make-network-process ns multi-tty emacs)
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Sat, 20 Feb 2016 22:55:02 GMT) Full text and rfc822 format available.Message #13 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Andrew Hyatt <ahyatt <at> gmail.com> Cc: David Reitter <david.reitter <at> gmail.com>, 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Sat, 20 Feb 2016 22:57:23 +0000
Hello, David and Andrew. On Tue, Feb 16, 2016 at 10:56:34PM -0500, Andrew Hyatt wrote: > I can confirm this still doesn't work right in Emacs 25. However, I get > a slightly different experience, with clicking on all 3 left parens > highlighting until the first right paren only. Similarly, that right > paren seems to be the matching paren for all 3 left parens. What is (now) happening is this: the C Preprocessor construct ends at the end of the second line (due to the space after the \ there). The first two open parentheses on that line are unmatched. In such circumstances, CC Mode splats the syntax of such characters by setting syntax-table text properties on them. This is to prevent them spuriously matching parens outside the CPP construct. When you double click on one of the non-matching parens, the critical piece of code reached is in `mouse-start-end'. Instead of checking the syntax of the character in its context (i.e. respecting syntax-table text properties), it simply checks the syntax of the bare character '(', and finds it's an open paren. It then does (forward-sexp) to try and find the matching ')'. This ignores the two "dummy" parens and then scans over the real paren pair remaining. One solution would be to replace the (obsolete) form in mouse.el: (char-syntax (char-after start)) with the modern (and correct) form (syntax-after start) . A small problem with this is that `syntax-after' returns a cons of raw numbers rather than the more picturesque character descriptors like ?\(. A bigger problem is that there are still approximately 164 uses of `char-syntax' in our sources, all (or most) of which need superseding by `syntax-after'. If this were to be done, double clicking on one of these unmatched parens would attempt to match the "word it is in". I don't know exactly what would happen. Probably not very much. In fact, I'm going to try it. (A bit later): Double clicking on a "dummy paren" would mark the sequence of three parens. I think this is better than marking up to the single close paren, but not by much. > David Reitter <david.reitter <at> gmail.com> writes: > > Parens matching in C mode is sometimes surprising. In the example > > below, double-clicking on either of the first two opening parentheses > > will mark the text until the " hyper_modifier : 0)", but that is correct > > only for the second paren, while the first one is unmatched due to a space > > following the backslash. > > #define EV_MODIFIERS(e) \ > > ((([e modifierFlags] & NSHelpKeyMask) ? \ > > hyper_modifier : 0) \ > > ... > > It would be more useful if an "unmatched parentheses" was shown, or > > if the region up to the end of the scan process (i.e. the > > space+newline) was marked. Giving a decent error message here would be difficult. We're down in the depths of the mouse code, but the strategem of giving syntax-table text properties to parentheses is a pure CC Mode one. Signaling an error if a paren has other than paren syntax is liable to have unforseen side effects somewhere, somehow, some time. Do you (plural) think it is worth while fixing the mouse code, as detailed above, or do you have any other ideas for a fix? > > In GNU Emacs 23.1.92.86 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25) > > of 2010-02-08 on scarlett.local - Aquamacs Distribution 2.0dev > > Windowing system distributor `Apple', version 10.3.1038 > > configured using `configure '--with-ns' 'CFLAGS=-O0 -g'' > > Major mode: ObjC/l -- Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Sun, 21 Feb 2016 12:34:01 GMT) Full text and rfc822 format available.Message #16 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Andrew Hyatt <ahyatt <at> gmail.com> Cc: David Reitter <david.reitter <at> gmail.com>, 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Sun, 21 Feb 2016 12:35:39 +0000
Hello again, David and Andrew. On Sat, Feb 20, 2016 at 10:57:23PM +0000, Alan Mackenzie wrote: > On Tue, Feb 16, 2016 at 10:56:34PM -0500, Andrew Hyatt wrote: > > I can confirm this still doesn't work right in Emacs 25. However, I get > > a slightly different experience, with clicking on all 3 left parens > > highlighting until the first right paren only. Similarly, that right > > paren seems to be the matching paren for all 3 left parens. > > David Reitter <david.reitter <at> gmail.com> writes: > > > Parens matching in C mode is sometimes surprising. In the example > > > below, double-clicking on either of the first two opening parentheses > > > will mark the text until the " hyper_modifier : 0)", but that is correct > > > only for the second paren, while the first one is unmatched due to a space > > > following the backslash. > > > #define EV_MODIFIERS(e) \ > > > ((([e modifierFlags] & NSHelpKeyMask) ? \ > > > hyper_modifier : 0) \ > > > ... > > > It would be more useful if an "unmatched parentheses" was shown, or > > > if the region up to the end of the scan process (i.e. the > > > space+newline) was marked. > Giving a decent error message here would be difficult. We're down in the > depths of the mouse code, but the strategem of giving syntax-table text > properties to parentheses is a pure CC Mode one. Signaling an error if > a paren has other than paren syntax is liable to have unforseen side > effects somewhere, somehow, some time. After a night's sleep, I've changed my mind about the advisability of such a fix. So, here is a fix. It works as indicated last night: if a character whose normal syntax is open/close-paren has a different syntax due to syntax-table text properties, a 'scan-error error is signaled: either "Containing expression ends prematurely" for an open paren, or "Unbalanced parentheses" for a close paren. Here's the patch. Please try it out and let me know if there's anything amiss about it. Otherwise, I'll commit it. diff --git a/lisp/mouse.el b/lisp/mouse.el index 85ffc43..22c5b48 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -931,20 +931,29 @@ mouse-start-end (= start end) (char-after start) (= (char-syntax (char-after start)) ?\()) - (list start - (save-excursion - (goto-char start) - (forward-sexp 1) - (point)))) + (if (/= (car (syntax-after start)) 4) + ;; This happens in CC Mode when unbalanced parens in CPP + ;; constructs are given punctuation syntax with + ;; syntax-table text properties. (2016-02-21). + (signal 'scan-error (list "Containing expression ends prematurely" + start start)) + (list start + (save-excursion + (goto-char start) + (forward-sexp 1) + (point))))) ((and (= mode 1) (= start end) (char-after start) (= (char-syntax (char-after start)) ?\))) - (list (save-excursion - (goto-char (1+ start)) - (backward-sexp 1) - (point)) - (1+ start))) + (if (/= (car (syntax-after start)) 5) + ;; See above comment about CC Mode. + (signal 'scan-error (list "Unbalanced parentheses" start start)) + (list (save-excursion + (goto-char (1+ start)) + (backward-sexp 1) + (point)) + (1+ start)))) ((and (= mode 1) (= start end) (char-after start) -- Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Sun, 21 Feb 2016 21:41:01 GMT) Full text and rfc822 format available.Message #19 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: David Reitter <david.reitter <at> gmail.com> To: Alan Mackenzie <acm <at> muc.de> Cc: Andrew Hyatt <ahyatt <at> gmail.com>, 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Sun, 21 Feb 2016 16:40:09 -0500
Alan, Your patch works as advertised for my test case. It’s certainly better to error out than to do the wrong thing. I think you are catching the right situations, but my confidence is low because of the readability of the code (what is 4, 5?). I think the question is whether that fix is appropriate for the 25.1 release. If you want to apply it there, I would probably test a whole lot of cases in modes that are derivates of c-mode. - David > On Feb 21, 2016, at 7:35 AM, Alan Mackenzie <acm <at> muc.de> wrote: > > Hello again, David and Andrew. > > On Sat, Feb 20, 2016 at 10:57:23PM +0000, Alan Mackenzie wrote: >> On Tue, Feb 16, 2016 at 10:56:34PM -0500, Andrew Hyatt wrote: > >>> I can confirm this still doesn't work right in Emacs 25. However, I get >>> a slightly different experience, with clicking on all 3 left parens >>> highlighting until the first right paren only. Similarly, that right >>> paren seems to be the matching paren for all 3 left parens. > >>> David Reitter <david.reitter <at> gmail.com> writes: > >>>> Parens matching in C mode is sometimes surprising. In the example >>>> below, double-clicking on either of the first two opening parentheses >>>> will mark the text until the " hyper_modifier : 0)", but that is correct >>>> only for the second paren, while the first one is unmatched due to a space >>>> following the backslash. > >>>> #define EV_MODIFIERS(e) \ >>>> ((([e modifierFlags] & NSHelpKeyMask) ? \ >>>> hyper_modifier : 0) \ >>>> ... > > >>>> It would be more useful if an "unmatched parentheses" was shown, or >>>> if the region up to the end of the scan process (i.e. the >>>> space+newline) was marked. > >> Giving a decent error message here would be difficult. We're down in the >> depths of the mouse code, but the strategem of giving syntax-table text >> properties to parentheses is a pure CC Mode one. Signaling an error if >> a paren has other than paren syntax is liable to have unforseen side >> effects somewhere, somehow, some time. > > After a night's sleep, I've changed my mind about the advisability of > such a fix. So, here is a fix. It works as indicated last night: if a > character whose normal syntax is open/close-paren has a different syntax > due to syntax-table text properties, a 'scan-error error is signaled: > either "Containing expression ends prematurely" for an open paren, or > "Unbalanced parentheses" for a close paren. > > Here's the patch. Please try it out and let me know if there's anything > amiss about it. Otherwise, I'll commit it. > > > > diff --git a/lisp/mouse.el b/lisp/mouse.el > index 85ffc43..22c5b48 100644 > --- a/lisp/mouse.el > +++ b/lisp/mouse.el > @@ -931,20 +931,29 @@ mouse-start-end > (= start end) > (char-after start) > (= (char-syntax (char-after start)) ?\()) > - (list start > - (save-excursion > - (goto-char start) > - (forward-sexp 1) > - (point)))) > + (if (/= (car (syntax-after start)) 4) > + ;; This happens in CC Mode when unbalanced parens in CPP > + ;; constructs are given punctuation syntax with > + ;; syntax-table text properties. (2016-02-21). > + (signal 'scan-error (list "Containing expression ends prematurely" > + start start)) > + (list start > + (save-excursion > + (goto-char start) > + (forward-sexp 1) > + (point))))) > ((and (= mode 1) > (= start end) > (char-after start) > (= (char-syntax (char-after start)) ?\))) > - (list (save-excursion > - (goto-char (1+ start)) > - (backward-sexp 1) > - (point)) > - (1+ start))) > + (if (/= (car (syntax-after start)) 5) > + ;; See above comment about CC Mode. > + (signal 'scan-error (list "Unbalanced parentheses" start start)) > + (list (save-excursion > + (goto-char (1+ start)) > + (backward-sexp 1) > + (point)) > + (1+ start)))) > ((and (= mode 1) > (= start end) > (char-after start) > > > > -- > Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Sun, 21 Feb 2016 23:23:01 GMT) Full text and rfc822 format available.Message #22 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: John Wiegley <jwiegley <at> gmail.com> To: David Reitter <david.reitter <at> gmail.com> Cc: Alan Mackenzie <acm <at> muc.de>, Andrew Hyatt <ahyatt <at> gmail.com>, 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Sun, 21 Feb 2016 15:21:52 -0800
>>>>> David Reitter <david.reitter <at> gmail.com> writes: > I think the question is whether that fix is appropriate for the 25.1 > release. If you want to apply it there, I would probably test a whole lot of > cases in modes that are derivates of c-mode. Does this change past behavior? We still have room for fixes in 25.1, but if it changes past behavior it will need sufficient testing. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Mon, 22 Feb 2016 10:34:02 GMT) Full text and rfc822 format available.Message #25 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: David Reitter <david.reitter <at> gmail.com> Cc: Andrew Hyatt <ahyatt <at> gmail.com>, 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Mon, 22 Feb 2016 10:35:55 +0000
Hello, David. On Sun, Feb 21, 2016 at 04:40:09PM -0500, David Reitter wrote: > Alan, > Your patch works as advertised for my test case. It’s certainly > better to error out than to do the wrong thing. > I think you are catching the right situations, but my confidence is > low because of the readability of the code (what is 4, 5?). 4 and 5 are the low level codes for "open paren" and "close paren" syntax. I don't like them much either, but `syntax-after' is the only interface available which returns the syntax of a character in a buffer, taking account of syntax-table text properties. 4 and 5 (or, more precisely, (4 . ?\)), (5 . ?\()) are what we have to work with. One way would be to create two constants with fancy names with values 4 and 5, but I don't think that helps much - anybody debugging and suspicious of the values still has to find the page in the elisp manual to check, but has an extra irritating indirection to cope with. How would you feel about explanatory comments on the two lines - something like: + (if (/= (car (syntax-after start)) 4) ; low-level code for ?\( ? What we really need is a better interface. Perhaps `char-syntax-after', which would actually return ?\( and ?\). In fact, I think I'll raise a bug report for this. > I think the question is whether that fix is appropriate for the 25.1 > release. If you want to apply it there, I would probably test a whole > lot of cases in modes that are derivates of c-mode. I think the fix should go into 25.1. I'm confident enough about the mechanism of the bug that I'm not sure extensive testing is warranted. > - David -- Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Mon, 22 Feb 2016 10:49:02 GMT) Full text and rfc822 format available.Message #28 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: John Wiegley <johnw <at> gnu.org> Cc: David Reitter <david.reitter <at> gmail.com>, Andrew Hyatt <ahyatt <at> gmail.com>, 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Mon, 22 Feb 2016 10:51:04 +0000
Hello, John. On Sun, Feb 21, 2016 at 03:21:52PM -0800, John Wiegley wrote: > >>>>> David Reitter <david.reitter <at> gmail.com> writes: > > I think the question is whether that fix is appropriate for the 25.1 > > release. If you want to apply it there, I would probably test a whole lot of > > cases in modes that are derivates of c-mode. > Does this change past behavior? We still have room for fixes in 25.1, but if > it changes past behavior it will need sufficient testing. The fix doesn't change past behaviour, beyond fixing the actual bug. What is amazing is that on doing a triple click with mouse-1 on such an unmatched paren, an error is signaled after the second click, but Emacs then goes on to mark the line correctly after the third click. > -- > John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F > http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 -- Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#5560
; Package emacs,cc-mode
.
(Mon, 22 Feb 2016 12:10:02 GMT) Full text and rfc822 format available.Message #31 received at 5560 <at> debbugs.gnu.org (full text, mbox):
From: David Reitter <david.reitter <at> gmail.com> To: Alan Mackenzie <acm <at> muc.de> Cc: Andrew Hyatt <ahyatt <at> gmail.com>, 5560 <at> debbugs.gnu.org Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Mon, 22 Feb 2016 07:09:00 -0500
On Feb 22, 2016, at 5:35 AM, Alan Mackenzie <acm <at> muc.de> wrote: > How would you feel about explanatory comments on the two lines - > something like That would help. I didn’t mean to criticize your patch in this sense, as this is a more general interface problem as you point out. What you are explaining though makes more sense to me. So yes, perhaps this needs to be in 25.1.
Alan Mackenzie <acm <at> muc.de>
:David Reitter <david.reitter <at> gmail.com>
:Message #36 received at 5560-done <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: David Reitter <david.reitter <at> gmail.com>, 5560-done <at> debbugs.gnu.org Cc: Andrew Hyatt <ahyatt <at> gmail.com>, John Wiegley <johnw <at> gnu.org> Subject: Re: bug#5560: 23.1.92; parens matching in c-mode broken Date: Thu, 25 Feb 2016 09:54:51 +0000
Hello, David. On Mon, Feb 22, 2016 at 07:09:00AM -0500, David Reitter wrote: > On Feb 22, 2016, at 5:35 AM, Alan Mackenzie <acm <at> muc.de> wrote: > > How would you feel about explanatory comments on the two lines - > > something like > That would help. I didn’t mean to criticize your patch in this sense, > as this is a more general interface problem as you point out. OK. I've added these comments. > What you are explaining though makes more sense to me. So yes, > perhaps this needs to be in 25.1. I've committed the fix to the emacs-25 branch, and am closing the bug. Sorry it took so long to fix. -- Alan Mackenzie (Nuremberg, Germany).
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 24 Mar 2016 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.