auctex
[Top][All Lists]
Advanced

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

Re: LaTeX-math-list: Binding on key sequences?


From: Ikumi Keita
Subject: Re: LaTeX-math-list: Binding on key sequences?
Date: Fri, 09 Jul 2021 16:12:55 +0900

Hi Heiko,

>>>>> Heiko Schröder <heikos@online.de> writes:
>  I tried:


> (setq LaTeX-math-list

>      '((''g a''  ''alpha'' ''Greek Lowercase'' 945)))


> with no success, as I expected.  Why was it possible to bind
> ''varepsilon'' to a key sequence?

> Isn't it possible for normal users?  ;-)

The reason why this doesn't succeed is that the key <g> is already bound
to command to insert "\gamma" and isn't a prefix key.

Try this:

(eval-after-load "latex"
  '(progn
     ;; Remove default <g> binding.
     (setq LaTeX-math-default
           (delq (assq ?g LaTeX-math-default) LaTeX-math-default))
     ;; Clear and remake keymap.
     (setq LaTeX-math-keymap (make-sparse-keymap))
     (setq LaTeX-math-list
           '(("g a" "alpha" "Greek Lowercase" 945)))
     (LaTeX-math-initialize)
     ;; Bind new keymap.
     (define-key LaTeX-math-mode-map
           (LaTeX-math-abbrev-prefix) LaTeX-math-keymap)))

It works at least for me.

Regards,
Ikumi Keita



reply via email to

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