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

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

bug#60432: 28.2; Doc of `defalias'


From: Stefan Monnier
Subject: bug#60432: 28.2; Doc of `defalias'
Date: Sat, 31 Dec 2022 09:38:37 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> The doc (doc string and Elisp manual) doesn't make clear that "function"
>> in this context applies also to Lisp macros.  Please make that clear.
> Which part of the documentation doesn't make that clear?  The
> references to "function" seem all to refer to SYMBOL's function cell,
> where SYMBOL is the first argument of defalias.  The doc string
> says nothing AFAICT about what DEFINITION could be, and your point is
> about DEFINITION.  The manual indeed said that DEFINITION could be any
> Lisp function, so I added "or macro" there.  However, I wonder whether
> function and macro are the only kinds of DEFINITION.  Stefan, what
> exactly can the DEFINITION be?

It can also be a "special form" (e.g. what you have in (symbol-function
'if)), or a keymap, or a symbol (alias) or a vector or string (kdb
macro).

Of course, it can also be any other kind of value, tho in that case
it'll only be useful if the symbol is treated in an ad-hoc manner
elsewhere, since "normal" use (such as evaluating something of the form
`(SYMBOL ...) or adding SYMBOL as the command to use in a keymap) would
then lead to an error.


        Stefan






reply via email to

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