emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mark-defun bug


From: Andreas Röhler
Subject: Re: mark-defun bug
Date: Wed, 2 Apr 2008 10:19:00 +0200
User-agent: KMail/1.9.5

Am Dienstag, 1. April 2008 14:42 schrieb Andreas Röhler:
> 
> Hi all,
> 
> `mark-defun' misses the last char, if a definition is
> followed by a buffer-end.
> 
> As this bug seems caused by a line not needed, IMO it's
> fine to drop it.
> 
> Patch attached.
> 
> Thanks
> 
> Andreas Röhler
> 

Can't reproduce the bug this morning, sorry. So maybe
forget it.

What I remember is the result of `comment-dwim' after
`mark-defun' was called:

; (defun foo (&optional arg ispec) 
;   " "
;   (interactive "*P\np")
;   (when arg (message "arg: %s" arg))
;   (if ispec
;       (message "%s" "interactive call")
;     nil)
  )

The last parenthese wasn't catched, it was set onto a
newline.

That doesn't happen any more.

Remains to notice: extension of region after of
`mark-defun' is one char larger than (substring beg
end) of function at point.

That's due to 

(re-search-backward "^\n" (- (point) 1) t)

whose possible harms may outweigh possible benefits.

Thanks all

Andreas Röhler




reply via email to

[Prev in Thread] Current Thread [Next in Thread]