From: Miles Bader <miles.bader@necel.com>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs's Command Frequency and default keyboard shortcuts
Date: Wed, 18 Oct 2006 11:04:32 +0900 [thread overview]
Message-ID: <buopscq5qhb.fsf@dhapc248.dev.necel.com> (raw)
In-Reply-To: <jwvy7remll4.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue\, 17 Oct 2006 22\:00\:21 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> 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.
next prev parent reply other threads:[~2006-10-18 2:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1159914415.055557.32190@i3g2000cwc.googlegroups.com>
[not found] ` <1160574910.715784.64440@i42g2000cwa.googlegroups.com>
[not found] ` <1160744232.506208.265870@k70g2000cwa.googlegroups.com>
[not found] ` <87zmc0tj1r.fsf@post.rwth-aachen.de>
[not found] ` <1161009567.067785.208350@i42g2000cwa.googlegroups.com>
[not found] ` <874pu3tos2.fsf@localhorst.mine.nu>
[not found] ` <851wp7e638.fsf@lola.goethe.zz>
[not found] ` <877iyz719o.fsf@thalassa.informatimago.com>
2006-10-18 0:37 ` Emacs's Command Frequency and default keyboard shortcuts Miles Bader
2006-10-18 1:54 ` Miles Bader
2006-10-18 2:00 ` Stefan Monnier
2006-10-18 2:04 ` Miles Bader [this message]
2006-10-19 9:11 ` Kim F. Storm
2006-10-19 9:53 ` David Kastrup
2006-10-19 11:29 ` Kim F. Storm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=buopscq5qhb.fsf@dhapc248.dev.necel.com \
--to=miles.bader@necel.com \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.