[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with keybindings
From: |
Tassilo Horn |
Subject: |
Re: Problem with keybindings |
Date: |
Fri, 14 Nov 2008 13:17:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
"Lorenzo Isella" <lorenzo.isella@gmail.com> writes:
Hi Lorenzo,
> (defun my-latex-bindings ()
> (define-key LaTeX-mode-map [_] 'latex-subscript)
> (define-key LaTeX-mode-map [^] 'latex-superscript)
I think the key syntax is wrong. It's best to always use the `kbd'
function. There you can enter the keys as they're printed by `C-h k'.
(define-key LaTeX-mode-map (kbd "_") 'latex-subscript)
(define-key LaTeX-mode-map (kbd "^") 'latex-superscript)
> (define-key LaTeX-mode-map [(control down)] 'latex-next-section)
> (define-key LaTeX-mode-map [(control up)] 'latex-previous-section)
Although that's the right syntax, I assume that
(define-key LaTeX-mode-map (kbd "<C-down>") 'latex-next-section)
(define-key LaTeX-mode-map (kbd "<C-up>") 'latex-previous-section)
is a bit easier to read and write.
Bye,
Tassilo
--
[Emacs] is written in Lisp, which is the only computer language that is
beautiful. -- Neal Stephenson, _In the Beginning was the Command Line_