From: storm@cua.dk (Kim F. Storm)
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Emacs's Command Frequency and default keyboard shortcuts
Date: Thu, 19 Oct 2006 11:11:11 +0200 [thread overview]
Message-ID: <m3y7rck6vk.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <buopscq5qhb.fsf@dhapc248.dev.necel.com> (Miles Bader's message of "Wed\, 18 Oct 2006 11\:04\:32 +0900")
Miles Bader <miles.bader@necel.com> writes:
> 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:
Brilliant!
>
> (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")
I think "CAPS" is better (and shorter :-)
>
> (defun self-insert-upcased (arg)
> (interactive "p")
> (setq last-command-char (upcase last-command-char))
> (self-insert-command arg))
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2006-10-19 9:11 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
2006-10-19 9:11 ` Kim F. Storm [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3y7rck6vk.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).