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

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

Re: Unicode characters for transcribing to pdf


From: Stefan Monnier
Subject: Re: Unicode characters for transcribing to pdf
Date: Sat, 03 Sep 2022 14:24:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I installed it using package.el. Then for some reason I had problems
> configuring keybindings in LaTeX-mode-map: somehow the variable seemed
> to not be defined. I manually searched for it in the package (M-x
> grep-find iirc), then required the relevant files.

`LaTeX-mode-map`, like most package variables, is only defined once
its package is actually loaded, which is done lazily in response to the
use of the package (e.g. opening a LaTeX file).

So it's normal that `LaTeX-mode-map` is not defined when your init file
is loaded.  This is on purpose to try and speed up Emacs's startup.

You can use things like:

    (with-eval-after-load 'latex
      (define-key LaTeX-mode-map (kbd "C-c a") #'my-bar)
      (define-key LaTeX-mode-map (kbd "C-c b") #'my-foo))

or

    (defun my-latex-setup ()
      (define-key LaTeX-mode-map (kbd "C-c a") #'my-bar)
      (define-key LaTeX-mode-map (kbd "C-c b") #'my-foo))
    (add-hook 'LaTeX-mode-hook #'my-latex-setup)

in order to delay the customization to after the variable is defined.


        Stefan
    




reply via email to

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