bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2603: defalias - doc string copied to definition


From: David Reitter
Subject: bug#2603: defalias - doc string copied to definition
Date: Sun, 8 Mar 2009 19:40:43 -0400

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: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]