[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with emacs lisp function
From: |
Jim McCloskey |
Subject: |
Re: problems with emacs lisp function |
Date: |
Sat, 09 Jun 2001 20:26:52 -0700 |
|> (define-key tex-mode-map "\C-dg" 'parentesigraffe)
|>
|> The problem is that when I run emacs, I get the following error message:
|>
|> "symbol's value as variable void: tex-mode-map"
I think you have to put the key binding inside an add-hook statement.
One way to do this is to include something like the following in your
main customization file (.emacs or whatever):
(add-hook 'tex-mode-hook
(function
(lambda ()
(require 'my-tex)
(abbrev-mode 1)
(font-lock-mode 1)
(set-variable 'tex-directory "/tmp")
)))
and then to put all your TeX-specific stuff (including especially
key-bindings) in the file my-tex.el. Of course the elisp above does
three other things as well, but the `require 'my-tex' line is the
crucial one.
But I'm a real amateur. Someone please correct me if this is bad
advice.
The grand ultimate solution to all TeX-related problems in emacs is to
use AucTeX,
Jim