bug#2603: defalias - doc string copied to definition

David Reitter <[email protected]>
Newsgroups gmane.emacs.bugs,gmane.emacs.pretest.bugs
Message-ID <[email protected]>
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, 2.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.