From: Chong Yidong <cyd@stupidchicken.com>
To: Alan Mackenzie <acm@muc.de>
Cc: Andreas Schwab <schwab@suse.de>, emacs-devel@gnu.org
Subject: Re: CC Mode 5.31.4 (C/l); c-end-of-defun broken
Date: Wed, 18 Apr 2007 14:10:05 -0400 [thread overview]
Message-ID: <87zm55sgea.fsf@stupidchicken.com> (raw)
In-Reply-To: <je3b2xvh07.fsf@sykes.suse.de> (Andreas Schwab's message of "Wed\, 18 Apr 2007 17\:28\:40 +0200")
Andreas Schwab <schwab@suse.de> writes:
> c-end-of-defun no longer always goes to the end of the function. This
> breaks add-log-current-defun, for example. It doesn't always happen, but
> you can reproduce it with
> <http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/src/gdb/symtab.c?rev=1.157&content-type=text/plain&cvsroot=src>.
> Just load the file and type M-C-e. You end up in the middle of
> lookup_partial_symtab instead of at the end of lookup_symtab.
The trouble is the following code in c-end-of-defun (cc-cmds.el:1645):
;; Move forward to the } of a function
(if (> arg 0)
(setq arg (c-forward-to-nth-EOF-} arg where))))
;; Do we need to move forward from the brace to the semicolon?
(when (eq arg 0)
(if (c-in-function-trailer-p) ; after "}" of struct/enum, etc.
(c-syntactic-re-search-forward ";"))
The function c-in-function-trailer-p thinks we are between the closing
brace and the semicolon of struct construct, because this function
returns a struct *:
struct symtab *
lookup_symtab (const char *name)
{
Alan, can you come up with a quick fix?
next prev parent reply other threads:[~2007-04-18 18:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-18 15:28 CC Mode 5.31.4 (C/l); c-end-of-defun broken Andreas Schwab
2007-04-18 17:32 ` Glenn Morris
2007-04-18 20:20 ` Alan Mackenzie
2007-04-18 18:10 ` Chong Yidong [this message]
2007-04-18 19:15 ` Alan Mackenzie
2007-04-18 20:11 ` Alan Mackenzie
2007-04-18 20:43 ` Chong Yidong
2007-04-18 21:27 ` Alan Mackenzie
2007-04-19 17:38 ` Alan Mackenzie
2007-04-19 18:17 ` Chong Yidong
2007-04-20 14:52 ` Richard Stallman
2007-04-20 15:08 ` Chong Yidong
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=87zm55sgea.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=schwab@suse.de \
/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.