unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Add log bug
@ 2006-12-26  1:29 Herbert Euler
  2006-12-26  2:06 ` Masatake YAMATO
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Euler @ 2006-12-26  1:29 UTC (permalink / raw)


There is a bug in add-log.el, in the function
`add-log-current-defun'.  There was a fix; but it is not complete.
The old description of the bug can be found at

    http://lists.gnu.org/archive/html/emacs-devel/2006-09/msg00857.html

The problem exists yet now.  If you put point in the body of the C++
function below:

void
web_slim::slim_dirent::clear ()
{
  for (slim_dirent_seq::iterator i = sub.begin (); i != sub.end (); ++i)
    i->clear ();
  sub.clear ();
}

`add-change-log-entry-other-window' would try to add a log entry for
function `slim_dirent::clear', rather than the desired
`web_slim::slim_dirent::clear'.

The old fix changed `forward-word' into `forward-sexp', but the latter
one only moves one sexp.  So the point is put before `slim_dirent' in
the above example.  A complete fix could be:

*** add-log.el.~1.146.2.22.~    Mon Nov 13 10:58:16 2006
--- add-log.el  Wed Dec 20 10:13:47 2006
*************** (defun add-log-current-defun ()
*** 916,922 ****
                              ;; Include certain keywords if they
                              ;; precede the name.
                              (setq middle (point))
!                              (forward-sexp -1)
                              ;; Is this C++ method?
                              (when (and (< 2 middle)
                                         (string= (buffer-substring (- 
middle 2)
--- 916,923 ----
                              ;; Include certain keywords if they
                              ;; precede the name.
                              (setq middle (point))
!                              (while (not (looking-back "\\(^\\| 
\\|\t\\)"))
!                                (forward-sexp -1))
                              ;; Is this C++ method?
                              (when (and (< 2 middle)
                                         (string= (buffer-substring (- 
middle 2)

This is not a big problem; but it is still a bug.  Since it will take
long between two releases, I think it could be good of fixing it
before this release.

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Add log bug
  2006-12-26  1:29 Add log bug Herbert Euler
@ 2006-12-26  2:06 ` Masatake YAMATO
  2006-12-26  2:37   ` Herbert Euler
  0 siblings, 1 reply; 4+ messages in thread
From: Masatake YAMATO @ 2006-12-26  2:06 UTC (permalink / raw)
  Cc: emacs-devel

> There is a bug in add-log.el, in the function
> `add-log-current-defun'.  There was a fix; but it is not complete.
> The old description of the bug can be found at
> 
>     http://lists.gnu.org/archive/html/emacs-devel/2006-09/msg00857.html
> 
> The problem exists yet now.  If you put point in the body of the C++
> function below:
> 
> void
> web_slim::slim_dirent::clear ()
> {
>   for (slim_dirent_seq::iterator i = sub.begin (); i != sub.end (); ++i)
>     i->clear ();
>   sub.clear ();
> }
> 
> `add-change-log-entry-other-window' would try to add a log entry for
> function `slim_dirent::clear', rather than the desired
> `web_slim::slim_dirent::clear'.
> 
> The old fix changed `forward-word' into `forward-sexp', but the latter
> one only moves one sexp.  So the point is put before `slim_dirent' in
> the above example.  A complete fix could be:

You are/were right. My patch was wrong.
Do you have a write-access to the CVS repository?

Masatake YAMATO

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Add log bug
  2006-12-26  2:06 ` Masatake YAMATO
@ 2006-12-26  2:37   ` Herbert Euler
  2006-12-26  3:56     ` Masatake YAMATO
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Euler @ 2006-12-26  2:37 UTC (permalink / raw)
  Cc: emacs-devel

>You are/were right. My patch was wrong.
>Do you have a write-access to the CVS repository?

I didn't mean who's wrong.  I just encountered this problem
again several days before, and wanted to fix it.  I'm sorry if
this annoys you.

And I don't have the write-access to the CVS repository.

Thank you very much.

Sincerely yours,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Add log bug
  2006-12-26  2:37   ` Herbert Euler
@ 2006-12-26  3:56     ` Masatake YAMATO
  0 siblings, 0 replies; 4+ messages in thread
From: Masatake YAMATO @ 2006-12-26  3:56 UTC (permalink / raw)
  Cc: emacs-devel

> >You are/were right. My patch was wrong.
> >Do you have a write-access to the CVS repository?
> 
> I didn't mean who's wrong.  I just encountered this problem
> again several days before, and wanted to fix it.  I'm sorry if
> this annoys you.
> 
> And I don't have the write-access to the CVS repository.
> 
> Thank you very much.

Thank you for reporting.
I installed your patch.

Masatake

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-26  3:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-26  1:29 Add log bug Herbert Euler
2006-12-26  2:06 ` Masatake YAMATO
2006-12-26  2:37   ` Herbert Euler
2006-12-26  3:56     ` Masatake YAMATO

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).