From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Chong Yidong" <cyd@stupidchicken.com>,
"Miles Bader" <miles@gnu.org>, Röhler <andreas.roehler@online.de>,
emacs-devel@gnu.org
Subject: Re: end-of-defun is fubsr.
Date: Sat, 14 Feb 2009 23:25:35 +0000 [thread overview]
Message-ID: <20090214232535.GA3623@muc.de> (raw)
In-Reply-To: <jwvhc2wzpvn.fsf-monnier+emacs@gnu.org>
Hi, Stefan,
On Sat, Feb 14, 2009 at 04:16:53PM -0500, Stefan Monnier wrote:
> >> I don't think the return result is ever used as of now. So I'd rather
> >> not document such a thing.
> > Emacs 22 and 21 end-of-defun return end-of-defun's result as
> > EOD-function's own return value, even if it wasn't documented.
It was documented, sort of, in that the `beginning-of-defun' documents
its own return value, and `end-of-defun' says "see function
`beginning-of-defun'".
The doc-string of `end-of-defun' (very nearly) explicitly states that it
is only for use in languages which have close parentheses at EODs.
> It wasn't documented and should stay that way.
> > We shouldn't change this, surely?
> We have changed this.
Should I put an entry into NEWS for it?
> > How about this, then:?
> I prefer the current text.
Was my patch really that bad?
Look, I'm as sick of all this as you must be. This whole area of
beginning/end-of-defuns is riven with vagueness of documentation and
inconsistencies between fine manuals and doc strings, between doc strings
and code, between beginning- and end-.
Defun movement commands are _important_ in major modes for programming
languages.
I have solid experience with writing and maintaining
beginning/end-of-defun functions, and the frustration over several years
of trying to link them smoothly into Emacs, something which should be
utterly trivial, has been intense in the extreme. Basically, I've pretty
much given up trying to hook in the CC Mode defun stuff. Not good.
I won't say it's unusable to a major mode maintainer, because it clearly
isn't. I will say that it's a wretched experience - you can't write
B/EOD-functions without reading the fine source code in its finest
detail, which for something which should be so easy, is lacking fun in
the extreme.
How about me collecting together the existing work, rendering it
consistent, logical, backward compatible (in so far as that is possible),
as usable as possible, sprucing up all the pertinent doc strings and
manual pages, and submitting a patch for it to emacs-devel?
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2009-02-14 23:25 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-02 8:13 end-of-defun acts weirdly in c-mode; also, mark-defun in c-mode Miles Bader
2009-02-02 20:27 ` Alan Mackenzie
2009-02-02 22:46 ` Stefan Monnier
2009-02-03 9:17 ` Miles Bader
2009-02-03 10:50 ` Alan Mackenzie
2009-02-03 11:23 ` Miles Bader
2009-02-03 11:35 ` Miles Bader
2009-02-03 12:29 ` Alan Mackenzie
2009-02-03 13:00 ` Alan Mackenzie
2009-02-03 16:09 ` end-of-defun is fubsr. [Was: end-of-defun acts weirdly in c-mode] Alan Mackenzie
2009-02-03 15:56 ` Juanma Barranquero
2009-02-03 16:34 ` end-of-defun is fubsr Chong Yidong
2009-02-03 17:18 ` Andreas Roehler
2009-02-04 11:33 ` Alan Mackenzie
2009-02-04 14:54 ` Andreas Roehler
2009-02-03 16:40 ` end-of-defun is fubsr. [Was: end-of-defun acts weirdly in c-mode] Alan Mackenzie
2009-02-03 17:13 ` end-of-defun is fubsr Stefan Monnier
2009-02-03 18:58 ` Alan Mackenzie
2009-02-03 20:50 ` Stefan Monnier
2009-02-04 0:14 ` Alan Mackenzie
2009-02-04 2:21 ` Stefan Monnier
2009-02-04 13:37 ` Alan Mackenzie
2009-02-04 14:29 ` Stefan Monnier
2009-02-04 15:44 ` Alan Mackenzie
2009-02-05 10:37 ` Andreas Roehler
2009-02-12 21:35 ` Stefan Monnier
2009-02-13 11:08 ` Alan Mackenzie
2009-02-13 14:31 ` Stefan Monnier
2009-02-13 16:42 ` Alan Mackenzie
2009-02-13 17:06 ` Stefan Monnier
2009-02-13 18:57 ` Alan Mackenzie
2009-02-14 4:22 ` Stefan Monnier
2009-02-14 18:00 ` Alan Mackenzie
2009-02-14 21:16 ` Stefan Monnier
2009-02-14 23:25 ` Alan Mackenzie [this message]
2009-02-15 0:57 ` Miles Bader
2009-02-15 19:26 ` Stefan Monnier
2009-02-15 22:00 ` Alan Mackenzie
2009-02-05 11:44 ` Problems C Mode has with src/regex.c [was: end-of-defun is fubsr.] Alan Mackenzie
2009-02-05 21:50 ` end-of-defun acts weirdly in c-mode Alan Mackenzie
2009-02-06 1:03 ` Glenn Morris
2009-02-06 12:23 ` Alan Mackenzie
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=20090214232535.GA3623@muc.de \
--to=acm@muc.de \
--cc=andreas.roehler@online.de \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.