bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45333: complex command history should not save optional nil paramete


From: Lars Ingebrigtsen
Subject: bug#45333: complex command history should not save optional nil parameters
Date: Thu, 07 Jul 2022 20:00:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> The "actual for sure arglist" is the one that sometimes comes with
> bogus names.

Yup.

> In my experience once you get to places where you need to care about
> "the actual for sure arglist" the real needs depend a lot on the
> specifics, so it's not even clear what would be a good answer that works
> across the board (e.g. in the presence of CL's &key arguments).
> The answer you get from `help-function-arglist` without the
> `preserve-names` arg should be good enough for most cases.

That's basically just a long-winded expansion of `func-arity'.

> I do think the current situation kinda sucks because stashing arglists
> inside docstrings is a PITA, but it does have its advantages and
> I haven't seen a good alternative yet.

Well, one easy thing we can do is (pseudo-)deprecate stuff like this:

(defun desktop-read (&optional dirname ask)
  "Read and process the desktop file in directory DIRNAME.
[...]
\n(fn DIRNAME)"

and use (declare (advertised-calling-convention ...)) for those -- then
we'd have both the real and the advertised calling convention for all
those functions.  We can do the same for "(fn [FOO BAR] ..."), but stash
it somewhere else than advertised-signature-table since we can't use it
the same way for warnings.

That fixes either 1) or 2); I forget which way I was counting.

The other issue was to make this stuff faster --
`advertised-calling-convention' puts stuff into a hash table, and that's
fine.  We can do the same with the real arglist, or we can put it in the
symbol plist.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]