[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Call to eldoc-get-fnsym-args-string with 1 argument
From: |
Glenn Morris |
Subject: |
Re: Call to eldoc-get-fnsym-args-string with 1 argument |
Date: |
Thu, 02 Aug 2007 21:01:03 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
"Juanma Barranquero" wrote:
> After
>
> 2007-07-12 Paul Pogonyshev <address@hidden>
>
> * 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Call to eldoc-get-fnsym-args-string with 1 argument,
Glenn Morris <=