From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Some problems in `add-log-current-defun'
Date: Wed, 27 Dec 2006 11:45:15 +0100 [thread overview]
Message-ID: <86lkktsjlw.fsf@lola.quinscape.zz> (raw)
In-Reply-To: <BAY112-F34477621BF3C6EE6E473DBDAC00@phx.gbl> (Herbert Euler's message of "Wed\, 27 Dec 2006 18\:32\:58 +0800")
"Herbert Euler" <herberteuler@hotmail.com> writes:
> I encountered a problem in add-log.el, and solved it somehow (see
> http://lists.gnu.org/archive/html/emacs-devel/2006-09/msg00869.html).
> However, after re-reading the implementation of
> `add-log-current-defun', I found there are still many problems (bugs)
> in `add-log-current-defun' for the C like languages.
[...]
> IV. On the C++ names
>
> And what I tried to fix is not general too. My fix is
>
> (while (not (looking-back "\\(^\\|[ \t]\\)"))
> (forward-sexp -1))
>
> This is not general too: C++ permits the nested name to be put in many
> lines. For example, the following name is valid:
>
> void
> class_1
> ::
> sub_class_2
> ::
> method_3 ()
> {
> /* ... */
> }
>
> The current implementation cannot handle this name correctly.
Please note that we are talking about implementing editor support, not
a C++ parser. It is not our task to handle all C++ constructs
perfectly. Instead, it is our task to handle reasonably formatted C++
code. Code like the above may _intentionally_ be formatted in this
manner in order to persuade the editor to interpret things
differently.
--
David Kastrup
next prev parent reply other threads:[~2006-12-27 10:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-27 10:32 Some problems in `add-log-current-defun' Herbert Euler
2006-12-27 10:45 ` David Kastrup [this message]
2006-12-27 11:48 ` Masatake YAMATO
2006-12-27 12:22 ` David Kastrup
2006-12-27 11:55 ` Masatake YAMATO
2006-12-27 13:46 ` Masatake YAMATO
2006-12-27 21:17 ` Richard Stallman
2006-12-28 12:41 ` Masatake YAMATO
2006-12-29 15:44 ` Richard Stallman
2006-12-30 4:55 ` Masatake YAMATO
2006-12-30 18:24 ` Richard Stallman
2006-12-28 12:47 ` Herbert Euler
2006-12-29 15:44 ` Richard Stallman
2006-12-29 3:10 ` Herbert Euler
-- strict thread matches above, loose matches on Subject: below --
2006-12-31 8:28 Herbert Euler
2006-12-31 22:13 ` Richard Stallman
2007-01-01 1:27 ` Herbert Euler
2007-01-02 23:35 ` Stefan Monnier
2007-01-03 21:11 ` Richard Stallman
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=86lkktsjlw.fsf@lola.quinscape.zz \
--to=dak@gnu.org \
--cc=emacs-devel@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 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.