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.

Full log


View this message in rfc822 format

From: David Reitter <david.reitter <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: bug#2603: 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)]

This bug report was last modified 13 years and 167 days ago.

Previous Next


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