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

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

Re: How to bind isearch-repeat-forward to F3 in a certain mode only?


From: Javier
Subject: Re: How to bind isearch-repeat-forward to F3 in a certain mode only?
Date: Thu, 23 Jul 2015 22:53:00 +0000 (UTC)
User-agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.18.6-1-ARCH (x86_64))

> ,----
> | (my-mode)
> | (make-local-variable 'isearch-mode-map)
> | (define-key isearch-mode-map (kbd "<F3>") #'isearch-repeat-forward)
> `----
> 
> but to no avail.  Inspecting `isearch-mode-map' implies that it was in
> fact changed globally.  Pressing F3 while in isearch, though, starts
> recording a keyboard macro anyway (both in my-mode and outside it).


(defun my-mode-keys ()
  "Keybindings for my-mode.  To be used as a hook."
  (local-set-key (kbd "<F3>") 'isearch-repeat-forward)
  )
(add-hook 'my-mode-hook 'my-mode-keys)

Would this work?  Is 'my-mode-hook defined in your case?



reply via email to

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