From 9ee12eeee6bb8eb2f3d60f2f0d269158d012927e Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Sun, 22 Nov 2009 18:24:29 +0000 Subject: [PATCH] * progmodes/subword.el (subword-mode-map): Fix subword-mode-map generation from word-movement command names. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/subword.el | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f24fb9d370c..896af36f060 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-11-22 Tassilo Horn + + * progmodes/subword.el (subword-mode-map): Fix subword-mode-map + generation from word-movement command names. + 2009-11-21 Chong Yidong * cedet/semantic/complete.el (semantic-complete-read-tag-engine) diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el index 655d08f9884..855a3df2ae3 100644 --- a/lisp/progmodes/subword.el +++ b/lisp/progmodes/subword.el @@ -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.") -- 2.39.5