|
From: | Masatake YAMATO |
Subject: | Re: superword-mode |
Date: | Wed, 27 Mar 2013 12:18:29 +0900 (JST) |
>> +(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)? How about using copy-keymap to handle the case an user wants to modify the keymaps separately? Masatake YAMATO
[Prev in Thread] | Current Thread | [Next in Thread] |