unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@online.de>
To: emacs-devel@gnu.org
Subject: Re: mark-defun bug
Date: Wed, 2 Apr 2008 10:19:00 +0200	[thread overview]
Message-ID: <200804021019.00906.andreas.roehler@online.de> (raw)
In-Reply-To: <200804011442.15821.andreas.roehler@online.de>

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	other threads:[~2008-04-02  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01 12:42 mark-defun bug Andreas Röhler
2008-04-02  8:19 ` Andreas Röhler [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200804021019.00906.andreas.roehler@online.de \
    --to=andreas.roehler@online.de \
    --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 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).