unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Alternative to left arrow key in Winner mode
@ 2015-07-11 16:35 Shakthi Kannan
  2015-07-11 17:08 ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Shakthi Kannan @ 2015-07-11 16:35 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I use no-easy-keys.el, and hence the arrow keys are disabled.

By default, in winner mode, to switch to the previous configuration
the command is "C-c <left-arrow>".

Is there a way to change winner-mode to use a different key rather
than the <left-arrow> key?

Please let me know,

Thanks!

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com



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

* RE: Alternative to left arrow key in Winner mode
  2015-07-11 16:35 Alternative to left arrow key in Winner mode Shakthi Kannan
@ 2015-07-11 17:08 ` Drew Adams
  2015-07-11 18:30   ` Michael Heerdegen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2015-07-11 17:08 UTC (permalink / raw)
  To: Shakthi Kannan, help-gnu-emacs

> I use no-easy-keys.el, and hence the arrow keys are disabled.
> By default, in winner mode, to switch to the previous configuration
> the command is "C-c <left-arrow>".
> Is there a way to change winner-mode to use a different key rather
> than the <left-arrow> key?

I don't use winner.el, but this should get you started:

(define-key winner-mode-map (kbd "<f5>") 'winner-undo)

Substitute whatever key sequence you want for "<f5>".

See the Emacs manual, node `Init Rebinding'.
http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-Rebinding.html



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

* Re: Alternative to left arrow key in Winner mode
  2015-07-11 17:08 ` Drew Adams
@ 2015-07-11 18:30   ` Michael Heerdegen
  2015-07-14  4:46     ` Shakthi Kannan
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2015-07-11 18:30 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams <drew.adams@oracle.com> writes:

> I don't use winner.el, but this should get you started:
>
> (define-key winner-mode-map (kbd "<f5>") 'winner-undo)

Exactly (but bear in mind that you cannot do this before loading
winner.el, so you might want to wrap it inside `with-eval-after-load').

If you want to avoid the default bindings being established,

  (setq winner-dont-bind-my-keys t)

in addition.

If you don't care too much (I don't),

  (global-set-key (kbd "<f5>") 'winner-undo)

is absolutely fine if you have turned on winner-mode all the time
anyway.  You don't need `with-eval-after-load' in this case.


Michael.





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

* Re: Alternative to left arrow key in Winner mode
  2015-07-11 18:30   ` Michael Heerdegen
@ 2015-07-14  4:46     ` Shakthi Kannan
  0 siblings, 0 replies; 4+ messages in thread
From: Shakthi Kannan @ 2015-07-14  4:46 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

Hi,

--- On Sun, Jul 12, 2015 at 12:00 AM, Michael Heerdegen
<michael_heerdegen@web.de> wrote:
| If you don't care too much (I don't),
|
|   (global-set-key (kbd "<f5>") 'winner-undo)
|
| is absolutely fine if you have turned on winner-mode all the time
| anyway.
\--

This works. Thanks!

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com



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

end of thread, other threads:[~2015-07-14  4:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-11 16:35 Alternative to left arrow key in Winner mode Shakthi Kannan
2015-07-11 17:08 ` Drew Adams
2015-07-11 18:30   ` Michael Heerdegen
2015-07-14  4:46     ` Shakthi Kannan

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