GNU bug report logs - #60432
28.2; Doc of `defalias'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 30 Dec 2022 17:10:02 UTC

Severity: minor

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60432 in the body.
You can then email your comments to 60432 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60432; Package emacs. (Fri, 30 Dec 2022 17:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 30 Dec 2022 17:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 28.2; Doc of `defalias'
Date: Fri, 30 Dec 2022 17:09:29 +0000
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.


In GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
 of 2022-09-13 built on AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.19044
System Description: Microsoft Windows 10 Pro (v10.0.2009.19044.2364)

Configured using:
 'configure --with-modules --without-dbus --with-native-compilation
 --without-compress-install CFLAGS=-O2'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
XPM ZLIB

(NATIVE_COMP present but libgccjit not available)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60432; Package emacs. (Sat, 31 Dec 2022 08:46:02 GMT) Full text and rfc822 format available.

Message #8 received at 60432 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 60432 <at> debbugs.gnu.org
Subject: Re: bug#60432: 28.2; Doc of `defalias'
Date: Sat, 31 Dec 2022 10:45:48 +0200
> From: Drew Adams <drew.adams <at> oracle.com>
> Date: Fri, 30 Dec 2022 17:09:29 +0000
> 
> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60432; Package emacs. (Sat, 31 Dec 2022 14:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 60432 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 60432 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#60432: 28.2; Doc of `defalias'
Date: Sat, 31 Dec 2022 09:38:37 -0500
>> 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 sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 31 Dec 2022 15:04:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sat, 31 Dec 2022 15:04:03 GMT) Full text and rfc822 format available.

Message #16 received at 60432-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 60432-done <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#60432: 28.2; Doc of `defalias'
Date: Sat, 31 Dec 2022 17:03:14 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Drew Adams <drew.adams <at> oracle.com>,  60432 <at> debbugs.gnu.org
> Date: Sat, 31 Dec 2022 09:38:37 -0500
> 
> 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.

Thanks, I updated the manual with this information, and I'm closing
the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 Jan 2023 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.