From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Emacs's Command Frequency and default keyboard shortcuts Date: Wed, 18 Oct 2006 11:04:32 +0900 Message-ID: References: <1159914415.055557.32190@i3g2000cwc.googlegroups.com> <1160574910.715784.64440@i42g2000cwa.googlegroups.com> <1160744232.506208.265870@k70g2000cwa.googlegroups.com> <87zmc0tj1r.fsf@post.rwth-aachen.de> <1161009567.067785.208350@i42g2000cwa.googlegroups.com> <874pu3tos2.fsf@localhorst.mine.nu> <851wp7e638.fsf@lola.goethe.zz> <877iyz719o.fsf@thalassa.informatimago.com> <8764eisbm3.fsf@catnip.gol.com> Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161137332 18794 80.91.229.2 (18 Oct 2006 02:08:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Oct 2006 02:08:52 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 18 04:08:48 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ga0rK-0008CO-Bp for ged-emacs-devel@m.gmane.org; Wed, 18 Oct 2006 04:08:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ga0rJ-0002dC-Je for ged-emacs-devel@m.gmane.org; Tue, 17 Oct 2006 22:08:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ga0r1-0002Wz-VM for emacs-devel@gnu.org; Tue, 17 Oct 2006 22:08:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ga0qw-0002Dl-HR for emacs-devel@gnu.org; Tue, 17 Oct 2006 22:08:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ga0qw-0002DX-D1 for emacs-devel@gnu.org; Tue, 17 Oct 2006 22:08:18 -0400 Original-Received: from [203.180.232.83] (helo=mgate03.necel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Ga0qu-0002Xr-MU; Tue, 17 Oct 2006 22:08:17 -0400 Original-Received: from relay21.aps.necel.com (relay21 [10.29.19.50]) by mgate03.necel.com (8.13.8/8.13.1) with ESMTP id k9I0DQna000179; Wed, 18 Oct 2006 11:08:15 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.16] [10.29.19.16]) by relay21.aps.necel.com with ESMTP; Wed, 18 Oct 2006 11:08:15 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.97.235] [10.114.97.235]) by relay11.aps.necel.com with ESMTP; Wed, 18 Oct 2006 11:08:15 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 3DFF1476; Wed, 18 Oct 2006 11:04:32 +0900 (JST) Original-To: Stefan Monnier System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Stefan Monnier's message of "Tue\, 17 Oct 2006 22\:00\:21 -0400") Original-Lines: 27 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60853 Archived-At: Stefan Monnier 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.