[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: superword-mode
From: |
Ted Zlatanov |
Subject: |
Re: superword-mode |
Date: |
Wed, 27 Mar 2013 09:06:53 -0400 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
On Wed, 27 Mar 2013 12:18:29 +0900 (JST) Masatake YAMATO <address@hidden>
wrote:
>>> +(defvar superword-mode-map
>>> + (let ((map (make-sparse-keymap)))
>>> + (dolist (cmd '(forward-word backward-word mark-word kill-word
>>> + backward-kill-word transpose-words
>>> + capitalize-word upcase-word downcase-word
>>> + left-word right-word))
>>> + (let ((othercmd (let ((name (symbol-name cmd)))
>>> + (string-match "\\([[:alpha:]-]+\\)-word[s]?" name)
>>> + (intern (concat "subword-" (match-string 1
>>> name))))))
>>> + (define-key map (vector 'remap cmd) othercmd)))
>>> + map)
>>
>> Why not (defvar superword-mode-map subword-mode-map)?
MY> How about using copy-keymap to handle the case an user wants to
MY> modify the keymaps separately?
Currently they are the same function internally so I didn't think it's
likely the user will need to modify just one of the two keymaps. If you
still disagree, I'll make the change. I don't know the subtleties of
keymaps well, so your advice is appreciated.
Ted
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., (continued)
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., Ted Zlatanov, 2013/03/22
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., Stefan Monnier, 2013/03/22
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., Ted Zlatanov, 2013/03/22
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., Stefan Monnier, 2013/03/23
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., Ted Zlatanov, 2013/03/26
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., Stefan Monnier, 2013/03/26
- superword-mode (was: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax.), Ted Zlatanov, 2013/03/26
- Re: superword-mode, Stefan Monnier, 2013/03/26
- Re: superword-mode, Masatake YAMATO, 2013/03/26
- Re: superword-mode, Andreas Schwab, 2013/03/27
- Re: superword-mode,
Ted Zlatanov <=
- Re: superword-mode, Stefan Monnier, 2013/03/27
- Re: superword-mode, Ted Zlatanov, 2013/03/27
- Re: superword-mode, Stefan Monnier, 2013/03/27
- Re: superword-mode, Ted Zlatanov, 2013/03/27
- Re: superword-mode, Davis Herring, 2013/03/27
- Re: superword-mode, Ted Zlatanov, 2013/03/27
- Re: superword-mode, Ted Zlatanov, 2013/03/27
- Re: superword-mode, Stefan Monnier, 2013/03/27
- Re: superword-mode, Ted Zlatanov, 2013/03/27
- Re: superword-mode, Stefan Monnier, 2013/03/27