[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: caps-mode.el (delta)

From: Stefan Monnier
Subject: Re: caps-mode.el (delta)
Date: Tue, 05 Oct 2004 20:53:15 GMT
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

>     (mapc (lambda (char)
>             (define-key
>               map
>               (char-to-string char)
>               'caps-mode-self-insert-command))
>           (let ((lowercase-letters '()))
>             (map-char-table (lambda (key value)
>                               (if (and (char-valid-p key)
>                                        (equal (char-syntax key) ?w)
>                                        (not (equal (upcase key) key)))
>                                   (setq lowercase-letters (cons key 
> lowercase-letters))))
>                             text-mode-syntax-table)
>             (nreverse lowercase-letters)))
>     map))

why not (substitute-key-definition 'self-insert-command
                                   map global-map) ?

Or with Emacs-CVS:

   (define-key map [remap self-insert-command] 'caps-mode-self-insert-command)

-- Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]