GNU bug report logs - #2603
defalias - doc string copied to definition

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Mon, 9 Mar 2009 02:45:03 UTC

Severity: normal

Done: Chong Yidong <cyd <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 2603 in the body.
You can then email your comments to 2603 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2603; Package emacs. (Mon, 09 Mar 2009 02:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Reitter <david.reitter <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 09 Mar 2009 02:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Reitter <david.reitter <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: defalias - doc string copied to definition 
Date: Sun, 8 Mar 2009 19:40:43 -0400
[Message part 1 (text/plain, inline)]
It seems that a `defalias' call such as (defalias foo bar) will, in  
certain circumstances, set the doc string of BAR to the one of FOO,  
even though it should only set the doc string of FOO.  It also  
contains "[Missing arglist.  Please make a bug report.]".

This happens in case where FOO is a Lisp function, BAR is a Lisp  
accessor to a function defined in C source, and the defalias occurs in  
a preloaded (?) file in lisp/term.

The concrete example is in ns-win.el, for `ns-popup-font-panel'.  With  
the defalias in place, the `ns-popup-font-panel' DOC string will be  
the one previously assigned to `generate-fontset-menu'.


Note that the DOC file appears to contain the right (original) DOC  
strings for all functions.

Setting the doc string directly using defalias will result in BAR  
having the defined doc string, but FOO's doc string will still be  
overwritten.



;; Set to use font panel instead
(declare-function ns-popup-font-panel "nsfns.m" (&optional frame))
(defalias 'generate-fontset-menu 'ns-popup-font-panel "Pop up the font  
panel.
This function has been overloaded in NS.")
(defalias 'mouse-set-font 'ns-popup-font-panel "Pop up the font panel.
This function has been overloaded in NS.")

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#2603; Package emacs. (Mon, 06 Feb 2012 13:48:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: David Reitter <david.reitter <at> gmail.com>
Cc: 2603 <at> debbugs.gnu.org
Subject: Re: bug#2603: defalias - doc string copied to definition
Date: Mon, 06 Feb 2012 21:46:24 +0800
David Reitter <david.reitter <at> gmail.com> writes:

> It seems that a `defalias' call such as (defalias foo bar) will, in
> certain circumstances, set the doc string of BAR to the one of FOO,
> even though it should only set the doc string of FOO.  It also
> contains "[Missing arglist.  Please make a bug report.]".
>
> This happens in case where FOO is a Lisp function, BAR is a Lisp
> accessor to a function defined in C source, and the defalias occurs in
> a preloaded (?) file in lisp/term.

I've committed a fix.  Thanks for the bug report.




bug closed, send any further explanations to 2603 <at> debbugs.gnu.org and David Reitter <david.reitter <at> gmail.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 06 Feb 2012 13:48:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 06 Mar 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 75 days ago.

Previous Next


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