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

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

Re: why alias man to woman doesn't work?


From: Stefan Monnier
Subject: Re: why alias man to woman doesn't work?
Date: Wed, 04 Apr 2012 21:28:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

> 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


reply via email to

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