unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* C-x right
@ 2007-12-25 12:27 Nikola Skoric
  2007-12-25 13:20 ` Lennart Borgman (gmail)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nikola Skoric @ 2007-12-25 12:27 UTC (permalink / raw)
  To: help-gnu-emacs

I'd like to bind C-x right to bury-buffer. I just can't find manual
section which describes who to do that. I've tried:
(global-set-key [\C-x right] 'bury-buffer)
(global-set-key [C-x right] 'bury-buffer)
(global-set-key "\C-x<right>" 'bury-buffer)
but nothing works. I figured out how to bind normal keys, but I just
can't figure out arrows...

-- 
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

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

* Re: C-x right
  2007-12-25 12:27 C-x right Nikola Skoric
@ 2007-12-25 13:20 ` Lennart Borgman (gmail)
  2007-12-25 13:26 ` Daniel Pittman
       [not found] ` <mailman.5380.1198588863.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-25 13:20 UTC (permalink / raw)
  To: Nikola Skoric; +Cc: help-gnu-emacs

Nikola Skoric wrote:
> I'd like to bind C-x right to bury-buffer. I just can't find manual
> section which describes who to do that. I've tried:
> (global-set-key [\C-x right] 'bury-buffer)
> (global-set-key [C-x right] 'bury-buffer)
> (global-set-key "\C-x<right>" 'bury-buffer)
> but nothing works. I figured out how to bind normal keys, but I just
> can't figure out arrows...

Vector format:

(global-set-key [?\C-x right] (lambda () (interactive) (lwarn t :warning 
"hi")))

(global-set-key [(control ?x) right] (lambda () (interactive) (lwarn t 
:warning "hi2")))

Personally I find the second form easier to read.

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

* Re: C-x right
  2007-12-25 12:27 C-x right Nikola Skoric
  2007-12-25 13:20 ` Lennart Borgman (gmail)
@ 2007-12-25 13:26 ` Daniel Pittman
       [not found] ` <mailman.5380.1198588863.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Pittman @ 2007-12-25 13:26 UTC (permalink / raw)
  To: help-gnu-emacs

Nikola Skoric <nick-news@net4u.hr> writes:

> I'd like to bind C-x right to bury-buffer. I just can't find manual
> section which describes who to do that. I've tried:
> (global-set-key [\C-x right] 'bury-buffer)
> (global-set-key [C-x right] 'bury-buffer)
> (global-set-key "\C-x<right>" 'bury-buffer)
> but nothing works. I figured out how to bind normal keys, but I just
> can't figure out arrows...

  (global-set-key [(control x)(right)] #'bury-buffer)
  (define-key ctl-x-map [(right)] #'bury-buffer)

Regards,
        Daniel
-- 
Daniel Pittman <daniel@cybersource.com.au>           Phone: 03 9428 6922
1/130-132 Stawell St, Richmond              Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company

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

* Re: C-x right
       [not found] ` <mailman.5380.1198588863.18990.help-gnu-emacs@gnu.org>
@ 2007-12-25 14:06   ` Nikola Skoric
  0 siblings, 0 replies; 4+ messages in thread
From: Nikola Skoric @ 2007-12-25 14:06 UTC (permalink / raw)
  To: help-gnu-emacs

Dana Tue, 25 Dec 2007 14:20:54 +0100, 
Lennart Borgman (gmail) <lennart.borgman@gmail.com> kaze:
> (global-set-key [?\C-x right] (lambda () (interactive) (lwarn t :warning 
> "hi")))

Great, thanks!

-- 
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

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

end of thread, other threads:[~2007-12-25 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-25 12:27 C-x right Nikola Skoric
2007-12-25 13:20 ` Lennart Borgman (gmail)
2007-12-25 13:26 ` Daniel Pittman
     [not found] ` <mailman.5380.1198588863.18990.help-gnu-emacs@gnu.org>
2007-12-25 14:06   ` Nikola Skoric

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