unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2603: defalias - doc string copied to definition
@ 2009-03-08 23:40 David Reitter
  2012-02-06 13:46 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: David Reitter @ 2009-03-08 23:40 UTC (permalink / raw)
  To: emacs-pretest-bug

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

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.")


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-06 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-08 23:40 bug#2603: defalias - doc string copied to definition David Reitter
2012-02-06 13:46 ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).