|
From: | Michael Heerdegen |
Subject: | bug#45333: complex command history should not save optional nil parameters |
Date: | Tue, 05 Jul 2022 21:43:13 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes: > > everything depends on how you define "signature" and where get it from. > > Does adding an :around advice change the signature of a command? > > This isn't a language design issue. We're talking about making the > history prettier where it's 100% safe to do so, and nothing more than > that. My question is if 100% safe cases exist? For example: #+begin_src emacs-lisp (defun test (&optional x) (interactive) x) (advice-add 'test :around (defun test-ad (f &rest args) args)) #+end_src the signature of `test' is still `(test &optional X)` as reported by C-h f although the function is able to distinguish a specified nil from a not specified optional argument. What you suggest might still be doable by obtaining the effective signature differently... but I still don't like the idea. Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |