From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: why alias man to woman doesn't work? Date: Fri, 6 Apr 2012 14:28:20 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3874d7c8-6f87-46bd-b1e0-e75154b9223c@lf20g2000pbb.googlegroups.com> References: <4fcd7e17-e3a4-4b35-80ca-ad71da1df9d5@pg2g2000pbb.googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1333747817 29890 80.91.229.3 (6 Apr 2012 21:30:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Apr 2012 21:30:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 06 23:30:16 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 1SGGjW-0002MZ-29 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Apr 2012 23:30:14 +0200 Original-Received: from localhost ([::1]:48969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGGjV-0000fh-Eq for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Apr 2012 17:30:13 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!lf20g2000pbb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 23 Original-NNTP-Posting-Host: 76.126.112.84 Original-X-Trace: posting.google.com 1333747700 17506 127.0.0.1 (6 Apr 2012 21:28:20 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 6 Apr 2012 21:28:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: lf20g2000pbb.googlegroups.com; posting-host=76.126.112.84; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:191951 comp.emacs:102387 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:84366 Archived-At: On Apr 4, 6:28=A0pm, Stefan Monnier 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. =A0The 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 > > =A0 =A0(defalias 'man 'woman) > =A0 =A0(eval-after-load 'woman '(defalias 'man 'woman)) > > to get what you want, > > =A0 =A0 =A0 =A0 Stefan btw, why's women (require 'man) that seems...incenstual. It's supposed to be independent. Xah