From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: superword-mode
Date: Wed, 27 Mar 2013 09:06:53 -0400 [thread overview]
Message-ID: <87ip4dt2j6.fsf@lifelogs.com> (raw)
In-Reply-To: 20130327.121829.127604568006728084.yamato@redhat.com
On Wed, 27 Mar 2013 12:18:29 +0900 (JST) Masatake YAMATO <yamato@redhat.com> 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
next prev parent reply other threads:[~2013-03-27 13:06 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1UIiBH-0005sm-Vy@vcs.savannah.gnu.org>
2013-03-21 23:44 ` [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax Stefan Monnier
2013-03-21 23:49 ` Ted Zlatanov
2013-03-22 1:32 ` Stefan Monnier
2013-03-22 13:03 ` Ted Zlatanov
2013-03-22 13:14 ` Tom Tromey
2013-03-22 13:38 ` Ted Zlatanov
2013-03-22 14:18 ` Stefan Monnier
2013-03-22 14:46 ` Ted Zlatanov
2013-03-22 17:30 ` Stefan Monnier
2013-03-22 19:13 ` Ted Zlatanov
2013-03-23 16:01 ` Stefan Monnier
2013-03-26 9:17 ` Ted Zlatanov
2013-03-26 17:06 ` Stefan Monnier
2013-03-26 19:04 ` superword-mode (was: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax.) Ted Zlatanov
2013-03-27 1:23 ` superword-mode Stefan Monnier
2013-03-27 3:18 ` superword-mode Masatake YAMATO
2013-03-27 9:31 ` superword-mode Andreas Schwab
2013-03-27 13:06 ` Ted Zlatanov [this message]
2013-03-27 13:14 ` superword-mode Stefan Monnier
2013-03-27 13:04 ` superword-mode Ted Zlatanov
2013-03-27 13:50 ` superword-mode Stefan Monnier
2013-03-27 14:06 ` superword-mode Ted Zlatanov
2013-03-27 15:03 ` superword-mode Davis Herring
2013-03-27 15:19 ` superword-mode Ted Zlatanov
2013-03-27 15:33 ` superword-mode Ted Zlatanov
2013-03-27 16:33 ` superword-mode Stefan Monnier
2013-03-27 19:31 ` superword-mode Ted Zlatanov
2013-03-27 22:23 ` superword-mode Stefan Monnier
2013-03-28 23:00 ` superword-mode Ted Zlatanov
2013-03-29 13:26 ` superword-mode Ted Zlatanov
2013-03-29 16:23 ` superword-mode Andreas Röhler
2013-03-29 16:43 ` superword-mode Ted Zlatanov
2013-03-29 17:49 ` superword-mode Andreas Röhler
2013-03-29 18:10 ` superword-mode Ted Zlatanov
2013-03-29 18:50 ` superword-mode Andreas Röhler
2013-03-29 19:04 ` superword-mode Ted Zlatanov
2013-03-29 20:16 ` superword-mode Davis Herring
2013-03-29 21:18 ` superword-mode Stefan Monnier
2013-03-30 1:34 ` superword-mode Ted Zlatanov
2013-03-30 1:36 ` superword-mode Ted Zlatanov
2013-03-30 6:28 ` superword-mode Andreas Röhler
2013-03-22 14:13 ` [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax Stefan Monnier
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=87ip4dt2j6.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=emacs-devel@gnu.org \
/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).