From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: why alias man to woman doesn't work? Date: Wed, 04 Apr 2012 21:28:53 -0400 Message-ID: References: <4fcd7e17-e3a4-4b35-80ca-ad71da1df9d5@pg2g2000pbb.googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1333589426 8183 80.91.229.3 (5 Apr 2012 01:30:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Apr 2012 01:30:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 05 03:30:26 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SFbWq-0006iX-QR for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2012 03:30:24 +0200 Original-Received: from localhost ([::1]:46639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFbWg-0002nt-8u for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Apr 2012 21:30:14 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe11.iad.POSTED!00000000!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) Cancel-Lock: sha1:1xVQ3o2bFn2U/pdeypIGB/U7bz0= Original-Lines: 20 Original-X-Complaints-To: abuse@UsenetServer.com Original-NNTP-Posting-Date: Thu, 05 Apr 2012 01:28:55 UTC X-Received-Bytes: 1199 Original-Xref: usenet.stanford.edu gnu.emacs.help:191917 comp.emacs:102381 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84332 Archived-At: > 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