From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: why alias man to woman doesn't work?
Date: Wed, 04 Apr 2012 21:28:53 -0400 [thread overview]
Message-ID: <jwvty0zklzb.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 4fcd7e17-e3a4-4b35-80ca-ad71da1df9d5@pg2g2000pbb.googlegroups.com
> why doesn't alias man to woman work?
> i have this alias:
> (defalias 'man 'woman)
> but it still calls man when M-x on man.
Good question. The technical reason is that woman.el begins with
(require 'man), so when you do M-x man, it autoloads `woman', which
loads `man', which redefines `man' thus overwriting your defalias.
So you have to do
(defalias 'man 'woman)
(eval-after-load 'woman '(defalias 'man 'woman))
to get what you want,
Stefan
next prev parent reply other threads:[~2012-04-05 1:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 23:50 why alias man to woman doesn't work? Xah Lee
2012-04-05 1:28 ` Stefan Monnier [this message]
2012-04-05 7:02 ` Xah Lee
2012-04-05 7:38 ` Sebastien Vauban
2012-04-05 10:52 ` Tassilo Horn
2012-04-05 13:02 ` Doug Lewan
2012-04-05 14:19 ` Stefan Monnier
2012-04-05 14:38 ` Sebastien Vauban
2012-04-06 21:28 ` Xah Lee
2012-04-10 2:39 ` Stefan Monnier
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=jwvty0zklzb.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@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.