changeset 106194:95389cbb5f73

* progmodes/subword.el (subword-mode-map): Fix subword-mode-map generation from word-movement command names.
author Tassilo Horn <tassilo@member.fsf.org>
date Sun, 22 Nov 2009 18:24:29 +0000
parents 234022ddfcd1
children c85d813ab76e
files lisp/ChangeLog lisp/progmodes/subword.el
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Nov 22 12:11:00 2009 +0000
+++ b/lisp/ChangeLog	Sun Nov 22 18:24:29 2009 +0000
@@ -1,3 +1,8 @@
+2009-11-22  Tassilo Horn  <tassilo@member.fsf.org>
+
+	* progmodes/subword.el (subword-mode-map): Fix subword-mode-map
+	generation from word-movement command names.
+
 2009-11-21  Chong Yidong  <cyd@stupidchicken.com>
 
 	* cedet/semantic/complete.el (semantic-complete-read-tag-engine)
--- a/lisp/progmodes/subword.el	Sun Nov 22 12:11:00 2009 +0000
+++ b/lisp/progmodes/subword.el	Sun Nov 22 18:24:29 2009 +0000
@@ -86,10 +86,8 @@
 				backward-kill-word transpose-words
                                 capitalize-word upcase-word downcase-word))
       (let ((othercmd (let ((name (symbol-name cmd)))
-                        (string-match "\\(.*-\\)\\(word.*\\)" name)
-                        (intern (concat (match-string 1 name)
-                                        "sub"
-                                        (match-string 2 name))))))
+                        (string-match "\\([[:alpha:]-]+\\)-word[s]?" name)
+                        (intern (concat "subword-" (match-string 1 name))))))
         (define-key map (vector 'remap cmd) othercmd)))
     map)
   "Keymap used in `subword-mode' minor mode.")