unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Masatake YAMATO <yamato@redhat.com>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: superword-mode
Date: Wed, 27 Mar 2013 10:31:04 +0100	[thread overview]
Message-ID: <mvmvc8ddw9z.fsf@hawking.suse.de> (raw)
In-Reply-To: <20130327.121829.127604568006728084.yamato@redhat.com> (Masatake YAMATO's message of "Wed, 27 Mar 2013 12:18:29 +0900 (JST)")

Masatake YAMATO <yamato@redhat.com> writes:

>>> +(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?

Maybe inherit one from the other.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



  reply	other threads:[~2013-03-27  9:31 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                                 ` Andreas Schwab [this message]
2013-03-27 13:06                                 ` superword-mode Ted Zlatanov
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=mvmvc8ddw9z.fsf@hawking.suse.de \
    --to=schwab@linux-m68k.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yamato@redhat.com \
    /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).