all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: Liang Wang <netcasper@gmail.com>, emacs-devel@gnu.org
Subject: Re: eldoc hint for dolist is confusing
Date: Sat, 24 Jan 2009 02:36:21 +0100	[thread overview]
Message-ID: <f7ccd24b0901231736yd3897c5mcfaa7ba059ac357a@mail.gmail.com> (raw)
In-Reply-To: <icbptxcypw.fsf@fencepost.gnu.org>

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




      reply	other threads:[~2009-01-24  1:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [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

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

  git send-email \
    --in-reply-to=f7ccd24b0901231736yd3897c5mcfaa7ba059ac357a@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=netcasper@gmail.com \
    --cc=rgm@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 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.