From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: "variable [in .emacs] is void" Date: Mon, 22 Dec 2003 12:27:52 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3FE745B8.6030309@yahoo.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1072121387 2467 80.91.224.253 (22 Dec 2003 19:29:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2003 19:29:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 22 20:29:45 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AYVkI-0007EZ-00 for ; Mon, 22 Dec 2003 20:29:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AYWhe-0007eq-H2 for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Dec 2003 15:30:58 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: news.uni-berlin.de 1072121276 11183749 170.207.51.80 ([82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:119577 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:15517 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15517 gebser@speakeasy.net wrote: > At 18:18 (UTC+0100) on Sun, 21 Dec 2003 Karl Pfl=E4sterer said: > =3D Post the code you wrote in your .emacs (c&p). >=20 > (eval-after-load "sendmail" > (add-hook 'mail-setup-hook > '(substitute-key-definition=09 The above line is wrong. Get rid of it and its terminating close parenth= esis. > '(lambda () > (substitute-key-definition > 'next-line 'mail-abbrev-next-line > mail-mode-map global-map) > (substitute-key-definition > 'end-of-buffer 'mail-abbrev-end-of-buffer > mail-mode-map global-map))))) >=20 I still don't understand why that hook function can't be added until afte= r sendmail.el is loaded, though. The hook variable is quoted, as is the fu= nction (twice actually: once by lambda, and once unnecessarily by the quote char= acter). > =3D You can find that yourself; just do: `C-h v mail-mode-map RET' (or = any > =3D other variable you're interested in). >=20 > Sometimes that works with this variable, other times it doesn't. My > almost educated guess is that it depends on whether or not I've first > opened a mail session (M-x mail). The variable is defined in sendmail.el, which is not dumped into the emacs executable. Nor is the variable marked with an autoload cookie, which would have gotten it included in loaddefs.el and dumped into the executable. So it is not defined until sendmail.el is loaded, which happens when one of its autoloaded functions is called, e.g. the mail command. --=20 Kevin Rodgers