[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs's Command Frequency and default keyboard shortcuts
From: |
Miles Bader |
Subject: |
Re: Emacs's Command Frequency and default keyboard shortcuts |
Date: |
Wed, 18 Oct 2006 11:04:32 +0900 |
Stefan Monnier <address@hidden> writes:
> You mean
>
> (defvar caps-lock-mode-map
> (define-minor-mode caps-lock-mode
Ah yes indeed!
So now the complete goodness:
(defvar caps-lock-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [remap self-insert-command] 'self-insert-upcased)
map))
(define-minor-mode caps-lock-mode
"When enabled, convert all self-inserting characters to uppercase."
:lighter " CapsLock")
(defun self-insert-upcased (arg)
(interactive "p")
(setq last-command-char (upcase last-command-char))
(self-insert-command arg))
-Miles
--
.Numeric stability is probably not all that important when you're guessing.