unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	laszlomail@protonmail.com, Eli Zaretskii <eliz@gnu.org>,
	45333@debbugs.gnu.org
Subject: bug#45333: complex command history should not save optional nil parameters
Date: Thu, 07 Jul 2022 20:00:02 +0200	[thread overview]
Message-ID: <8735fcg5wd.fsf@gnus.org> (raw)
In-Reply-To: <jwvy1x5c5ge.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 07 Jul 2022 11:30:56 -0400")

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	other threads:[~2022-07-07 18:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20  9:01 bug#45333: complex command history should not save optional nil parameters novim via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07 11:57 ` Lars Ingebrigtsen
2022-06-07 13:15   ` Eli Zaretskii
2022-06-07 13:20     ` Eli Zaretskii
2022-06-08 11:43     ` Lars Ingebrigtsen
2022-06-08 13:57       ` Eli Zaretskii
2022-06-09 10:22         ` Lars Ingebrigtsen
2022-06-09 10:33           ` Eli Zaretskii
2022-06-10  8:52             ` Lars Ingebrigtsen
2022-07-05 14:16       ` Michael Heerdegen
2022-07-05 14:53         ` Drew Adams
2022-07-05 16:41         ` Lars Ingebrigtsen
2022-07-05 18:45           ` Michael Heerdegen
2022-07-05 18:48             ` Lars Ingebrigtsen
2022-07-05 19:06               ` Michael Heerdegen
2022-07-05 19:09                 ` Lars Ingebrigtsen
2022-07-05 19:43                   ` Michael Heerdegen
2022-07-05 19:50                     ` Lars Ingebrigtsen
2022-07-05 20:00                       ` Drew Adams
2022-07-05 20:49                       ` Lars Ingebrigtsen
2022-07-05 22:37                         ` Drew Adams
2022-07-06 18:41                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07  7:29                           ` Lars Ingebrigtsen
2022-07-07  9:45                             ` Lars Ingebrigtsen
2022-07-07 10:00                             ` Stefan Kangas
2022-07-07 10:06                               ` Lars Ingebrigtsen
2022-07-07 13:54                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 14:10                               ` Lars Ingebrigtsen
2022-07-07 14:49                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 14:52                                   ` Lars Ingebrigtsen
2022-07-07 15:05                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 15:21                                       ` Lars Ingebrigtsen
2022-07-07 15:30                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 18:00                                           ` Lars Ingebrigtsen [this message]
2022-07-07 13:58                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-05 20:15               ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8735fcg5wd.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45333@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=laszlomail@protonmail.com \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /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 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).