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

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

Re: disable, replace binding in method-map


From: Stefan Monnier
Subject: Re: disable, replace binding in method-map
Date: Tue, 19 May 2020 11:22:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>  can't i do the same with greek-babel?

Not in the same way, but yes, you can.

Here's for example the chunk of code I use to massage the TeX input
method to my liking:

    (defvar my-quail-activate-hook-done nil)
    (defun my-quail-activate-hook ()
      (unless (member (quail-name) my-quail-activate-hook-done)
        (push (quail-name) my-quail-activate-hook-done)
        (when (member (quail-name) '("TeX"))
          ;; Copy the "_..." bindings to "\_...".
          (setf (alist-get ?_ (cdr (alist-get ?\\ (quail-map))))
                (alist-get ?_ (quail-map)))
          ;; Remove the "_..." bindings.
          (setf (alist-get ?_ (quail-map)) nil)
          (quail-defrule "\\hline" ["------------------------"])
          )))
    (add-hook 'quail-activate-hook #'my-quail-activate-hook)


-- Stefan




reply via email to

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