all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* override a few keymappings in the emacs input-mode "greek-babel;"
@ 2020-05-15 23:20 Peter Hodgson
  2020-05-16  7:04 ` override a few keymappings in the emacs input-mode "greek-babel; " Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Hodgson @ 2020-05-15 23:20 UTC (permalink / raw)
  To: help-gnu-emacs

  i have these add-hook lines, among others, in my .emacs;
 ;;;it's a matter of overriding default mappings, no?

(add-hook 'org-mode-hook
          (lambda ()
            (define-key org-mode-map "\eh" nil)))

(add-hook 'org-mode-hook
          (lambda ()
            (define-key org-mode-map "\ea" nil)))
 ------------------------------------------

 ;;here's a model from one of the tutorials-

(add-hook 'texinfo-mode-hook
               (lambda ()
                 (define-key texinfo-mode-map "\C-cp"
                             'backward-paragraph)
                 (define-key texinfo-mode-map "\C-cn"
                             'forward-paragraph)))

 ;;here's part of my proposed hook for greek-babel

(add hook 'input-method-hook
               (lambda ()
                 (define-key input-method-greek-babel-map "q"
                             'θ)
                 (define-key input-method-greek-babel-map "Q"
                             'Θ)))
 -------------------------

 ;;these are 2 lines of 8 i have in mind, for upper/lower case of 4
characters; in the case of theta, the upper and lower seem very similar;

 ;;what i am least confident about is `input-mode-greek-babel-map`
 ;;;partly because i am not sure that `method` can stand in for `mode,`
 ;;;since i don't have the term "method" in my .emacs file;

https://www.gnu.org/software/emacs/manual/html_node/elisp/Input-Methods.html
  ;;this item, 33.11, suggests methods act like modes

https://www.gnu.org/software/emacs/manual/html_node/emacs/Input-Methods.html#Input-Methods
  ;;this item, 22.3, says-
"The simplest kind of input method works by mapping ASCII letters into
another alphabet; this allows you to use one other alphabet instead of
ASCII. The Greek and Russian input methods work this way."

 ;;these are the only mentions of "method" on a list of 424 hooks
http://ergoemacs.org/emacs/emacs_hooks_list.html
225. input-method-activate-hook
226. input-method-after-insert-chunk-hook
227. input-method-deactivate-hook
228. input-method-inactivate-hook
 ;;is #225 the one i should start with?
 ;;;eg.:

(add hook 'input-method-activate-hook
               (lambda ()
                 (define-key greek-babel-map "q"
                             'θ)
                 (define-key greek-babel-map "Q"
                             'Θ)))
 -------------------------

-- 
imputerate@puteracy.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: override a few keymappings in the emacs input-mode "greek-babel; "
  2020-05-15 23:20 override a few keymappings in the emacs input-mode "greek-babel;" Peter Hodgson
@ 2020-05-16  7:04 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2020-05-16  7:04 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Peter Hodgson <imputerate@gmail.com>
> Date: Fri, 15 May 2020 18:20:08 -0500
> 
>  ;;here's part of my proposed hook for greek-babel
> 
> (add hook 'input-method-hook
>                (lambda ()
>                  (define-key input-method-greek-babel-map "q"
>                              'θ)
>                  (define-key input-method-greek-babel-map "Q"
>                              'Θ)))

I think you need to use quail-defrule instead.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-16  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-15 23:20 override a few keymappings in the emacs input-mode "greek-babel;" Peter Hodgson
2020-05-16  7:04 ` override a few keymappings in the emacs input-mode "greek-babel; " Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.