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

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

Re: "variable [in .emacs] is void"


From: Kevin Rodgers
Subject: Re: "variable [in .emacs] is void"
Date: Mon, 22 Dec 2003 12:27:52 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

gebser@speakeasy.net wrote:

At 18:18 (UTC+0100) on Sun, 21 Dec 2003 Karl Pflästerer said:
= Post the code you wrote in your .emacs (c&p).

(eval-after-load "sendmail"
  (add-hook 'mail-setup-hook
            '(substitute-key-definition 


The above line is wrong.  Get rid of it and its terminating close parenthesis.


              '(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)))))



I still don't understand why that hook function can't be added until after
sendmail.el is loaded, though.  The hook variable is quoted, as is the function
(twice actually: once by lambda, and once unnecessarily by the quote character).


= You can find that yourself; just do: `C-h v mail-mode-map RET' (or any
= other variable you're interested in).

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.

--
Kevin Rodgers



reply via email to

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