* eldoc hint for dolist is confusing
@ 2009-01-23 8:50 Liang Wang
2009-01-24 0:52 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Liang Wang @ 2009-01-23 8:50 UTC (permalink / raw)
To: emacs-devel
Eldoc hint for dolist in GNU Emacs 23.0.60 is
dolist: VAR LIST RESULT BODY...
It's confusing for me.
I like the one in Emacs 22. It looks like:
dolist: ((VAR LIST [RESULT]) BODY...)
Is this change intentionally? Or a bug?
Thanks,
Liang.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: eldoc hint for dolist is confusing
2009-01-23 8:50 eldoc hint for dolist is confusing Liang Wang
@ 2009-01-24 0:52 ` Glenn Morris
2009-01-24 1:36 ` Juanma Barranquero
0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2009-01-24 0:52 UTC (permalink / raw)
To: Liang Wang; +Cc: Juanma Barranquero, emacs-devel
Liang Wang wrote:
> Eldoc hint for dolist in GNU Emacs 23.0.60 is
>
> dolist: VAR LIST RESULT BODY...
>
> It's confusing for me.
>
> I like the one in Emacs 22. It looks like:
>
> dolist: ((VAR LIST [RESULT]) BODY...)
>
> Is this change intentionally? Or a bug?
It seems to be due to this?
2007-09-26 Juanma Barranquero <lekktu@gmail.com>
* emacs-lisp/eldoc.el (eldoc-function-argstring-format):
Deal with the case that special &keywords are at the
beginning or end of the argument list. Also add some (incomplete)
support for non-standard arglists.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: eldoc hint for dolist is confusing
2009-01-24 0:52 ` Glenn Morris
@ 2009-01-24 1:36 ` Juanma Barranquero
0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2009-01-24 1:36 UTC (permalink / raw)
To: Glenn Morris; +Cc: Liang Wang, emacs-devel
On Sat, Jan 24, 2009 at 01:52, Glenn Morris <rgm@gnu.org> wrote:
> It seems to be due to this?
Yes, sorry.
The problem I was fixing is that, without the patch, having a function
(defun test (&optional sometimes)
...)
eldoc thinks that test has two arguments, `&optional' and `sometimes'.
Please try the attached fix.
Juanma
Index: lisp/emacs-lisp/eldoc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/eldoc.el,v
retrieving revision 1.56
diff -u -2 -r1.56 eldoc.el
--- lisp/emacs-lisp/eldoc.el 17 Jan 2009 20:01:17 -0000 1.56
+++ lisp/emacs-lisp/eldoc.el 24 Jan 2009 01:34:05 -0000
@@ -492,8 +492,8 @@
The words \"&rest\", \"&optional\" are returned unchanged."
(mapconcat (lambda (s)
- (if (member s '("&optional" "&rest"))
+ (if (string-match-p "\\`(?&\\(?:optional\\|rest\\))?\\'" s)
s
(funcall eldoc-argument-case s)))
- (split-string argstring "[][ ()]+" t) " "))
+ (split-string argstring) " "))
\f
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-24 1:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 8:50 eldoc hint for dolist is confusing Liang Wang
2009-01-24 0:52 ` Glenn Morris
2009-01-24 1:36 ` Juanma Barranquero
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).