unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to bind isearch-repeat-forward to F3 in a certain mode only?
@ 2015-07-23 22:01 Marcin Borkowski
  2015-07-24 12:53 ` Michael Heerdegen
  0 siblings, 1 reply; 25+ messages in thread
From: Marcin Borkowski @ 2015-07-23 22:01 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi everyone,

I have this:

(define-key my-mode-map "/" #'isearch-forward)

(my-mode is derived from special-mode, and - inspired by Firefox -
I wanted to make searching easy, requiring just one key ("/") instead of
two ("C-s").  Note that buffers in my-mode are read-only, so
self-insert-command doesn't make any sense anyway.)

However, inside isearch I still have to press C-s to go to the next
occurrence.

How to make F3 go to the next occurrence?  For obvious reasons, I don't
want to make such a change globally to isearch-mode-map.  Is it
possible?  I tried this (in a function which creates a buffer and sets
my-mode in it):

,----
| (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).

Any hints?

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 25+ messages in thread
[parent not found: <mailman.7323.1437688903.904.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2015-07-30 22:37 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-23 22:01 How to bind isearch-repeat-forward to F3 in a certain mode only? Marcin Borkowski
2015-07-24 12:53 ` Michael Heerdegen
2015-07-27 21:13   ` Marcin Borkowski
2015-07-27 21:43     ` Michael Heerdegen
2015-07-27 23:45     ` Emanuel Berg
2015-07-28  0:26       ` Ian Zimmerman
2015-07-28  1:07         ` Emanuel Berg
2015-07-28  8:30         ` Marcin Borkowski
2015-07-28 16:15           ` Yuri Khan
     [not found]         ` <mailman.7513.1438072243.904.help-gnu-emacs@gnu.org>
2015-07-28  8:42           ` Rusi
2015-07-28  8:50             ` Marcin Borkowski
2015-07-28 15:01             ` Ian Zimmerman
2015-07-28 15:28               ` Marcin Borkowski
     [not found]               ` <mailman.7552.1438097346.904.help-gnu-emacs@gnu.org>
2015-07-30  0:23                 ` Hikaru Ichijyo
2015-07-30  1:17                   ` Ian Zimmerman
2015-07-30  3:15                     ` Emanuel Berg
2015-07-30  5:10                       ` Ian Zimmerman
2015-07-30 22:36                         ` Emanuel Berg
     [not found]                   ` <mailman.7637.1438219082.904.help-gnu-emacs@gnu.org>
2015-07-30  1:48                     ` Hikaru Ichijyo
2015-07-30 12:56                     ` HASM
2015-07-30 22:37                       ` Emanuel Berg
     [not found]             ` <mailman.7551.1438095703.904.help-gnu-emacs@gnu.org>
2015-07-28 17:00               ` Rusi
2015-07-28  1:02       ` Marcin Borkowski
     [not found] <mailman.7323.1437688903.904.help-gnu-emacs@gnu.org>
2015-07-23 22:53 ` Javier
2015-07-23 23:09   ` Marcin Borkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).