[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why alias man to woman doesn't work?
From: |
Xah Lee |
Subject: |
Re: why alias man to woman doesn't work? |
Date: |
Thu, 5 Apr 2012 00:02:32 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Apr 4, 6:28 pm, Stefan Monnier <monn...@iro.umontreal.ca> wrote:
> > 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
thanks. Good info.
Xah