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: gebser
Subject: Re: "variable [in .emacs] is void"
Date: Sun, 21 Dec 2003 14:28:52 -0500 (EST)

At 18:18 (UTC+0100) on Sun, 21 Dec 2003 Karl Pflästerer said:

= An unnamed person wrote:
= 
= > At 17:24 (UTC+0100) on Sat, 20 Dec 2003 Karl Pflästerer said:
= 
= > = Try to wrap your code in an 
= > = 
= > = (eval-after-load "sendmail"
= > =   '(substitute-key-definition ...
= > =     ))
= > = 
= 
= > Did this, but I'm still getting an error in *Messages*, albeit a
= > different one:
= 
= > Error in init file: Symbol's value as variable is void: mail-mode-map
= 
= Post the code you wrote in your .emacs (c&p).

(eval-after-load "sendmail"
  (add-hook 'mail-setup-hook
            '(substitute-key-definition 
              '(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)))))


= 
= > You're correct, though. sendmail.el is the place where it's defined:
= 
= > (defvar mail-mode-map nil)
= 
= 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).


tnx some more,
ken






reply via email to

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