all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: "Juanma Barranquero" <lekktu@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>, pogonyshev@gmx.net
Subject: Re: Call to eldoc-get-fnsym-args-string with 1 argument
Date: Thu, 02 Aug 2007 21:01:03 -0400	[thread overview]
Message-ID: <vtodhptos0.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <f7ccd24b0707170312x67ab482evf6f60600b06a8b65@mail.gmail.com> (Juanma Barranquero's message of "Tue, 17 Jul 2007 12:12:06 +0200")

"Juanma Barranquero" wrote:

> After
>
> 2007-07-12  Paul Pogonyshev  <pogonyshev@gmx.net>
>
>        * emacs-lisp/eldoc.el [...]
>        (eldoc-get-fnsym-args-string): Add `args' argument.  Use new
>        `eldoc-highlight-function-argument'.
>
> compiling eshell/esh-cmd.el produces this message:
>
> In eshell-exec-lisp:
> esh-cmd.el:1340:31:Warning: eldoc-get-fnsym-args-string called with 1
>    argument, but requires 2

Indeed, the following is now broken:

emacs -Q
M-x eshell
(eshell-funcall '= 1 2 3) RET


Furthermore, what about eldoc-print-current-symbol-info, which
contains things like:

(apply 'eldoc-get-fnsym-args-string current-fnsym)

again with only one argument?

Should the new ARGUMENT-INDEX argument not therefore be optional?

Also, the change in eldoc-get-fnsym-args-string from

(setq doc (aref eldoc-last-data 1)))

to

(setq args (aref eldoc-last-data 1)))

that was made at the same time seems bogus (consecutive identical
calls now don't work the second time).


*** eldoc.el	26 Jul 2007 05:26:46 -0000	1.44
--- eldoc.el	3 Aug 2007 00:51:09 -0000
***************
*** 267,279 ****
  ;; Return a string containing the function parameter list, or 1-line
  ;; docstring if function is a subr and no arglist is obtainable from the
  ;; docstring or elsewhere.
! (defun eldoc-get-fnsym-args-string (sym argument-index)
    (let ((args nil)
          (doc nil))
      (cond ((not (and sym (symbolp sym) (fboundp sym))))
            ((and (eq sym (aref eldoc-last-data 0))
                  (eq 'function (aref eldoc-last-data 2)))
!            (setq args (aref eldoc-last-data 1)))
  	  ((setq doc (help-split-fundoc (documentation sym t) sym))
  	   (setq args (car doc))
  	   (string-match "\\`[^ )]* ?" args)
--- 267,279 ----
  ;; Return a string containing the function parameter list, or 1-line
  ;; docstring if function is a subr and no arglist is obtainable from the
  ;; docstring or elsewhere.
! (defun eldoc-get-fnsym-args-string (sym &optional argument-index)
    (let ((args nil)
          (doc nil))
      (cond ((not (and sym (symbolp sym) (fboundp sym))))
            ((and (eq sym (aref eldoc-last-data 0))
                  (eq 'function (aref eldoc-last-data 2)))
!            (setq doc (aref eldoc-last-data 1)))
  	  ((setq doc (help-split-fundoc (documentation sym t) sym))
  	   (setq args (car doc))
  	   (string-match "\\`[^ )]* ?" args)
***************
*** 281,287 ****
  	   (eldoc-last-data-store sym args 'function))
            (t
             (setq args (eldoc-function-argstring sym))))
!     (when args
        (setq doc (eldoc-highlight-function-argument sym args argument-index)))
      doc))
  
--- 281,288 ----
  	   (eldoc-last-data-store sym args 'function))
            (t
             (setq args (eldoc-function-argstring sym))))
!     (and args
!          argument-index
           (setq doc (eldoc-highlight-function-argument sym args argument-index)))
      doc))

      reply	other threads:[~2007-08-03  1:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17 10:12 Call to eldoc-get-fnsym-args-string with 1 argument Juanma Barranquero
2007-08-03  1:01 ` Glenn Morris [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=vtodhptos0.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=pogonyshev@gmx.net \
    /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.