all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: bug#2603: defalias - doc string copied to definition
Date: Sun, 8 Mar 2009 19:40:43 -0400	[thread overview]
Message-ID: <F8C82817-ADBD-41F8-A67A-28394CAC93DE@gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2009-03-08 23:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08 23:40 David Reitter [this message]
2012-02-06 13:46 ` bug#2603: defalias - doc string copied to definition Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F8C82817-ADBD-41F8-A67A-28394CAC93DE@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=2603@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.