SMIE: Reliably distinguish openers/closers in smie-prec2-levels
[bpt/emacs.git] / lisp / progmodes / subword.el
index 655d08f..7df42c8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; subword.el --- Handling capitalized subwords in a nomenclature
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Masatake YAMATO
 
@@ -76,7 +76,7 @@
 ;; the old `c-forward-into-nomenclature' originally contributed by
 ;; Terry_Glanfield dot Southern at rxuk dot xerox dot com.
 
-;; TODO: ispell-word and subword oriented C-w in isearch.
+;; TODO: ispell-word.
 
 ;;; Code:
 
                                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.")
@@ -279,4 +277,5 @@ Optional argument ARG is the same as for `capitalize-word'."
 \f
 (provide 'subword)
 
+;; arch-tag: b8a01202-8a52-4a71-ae0a-d753fafd67ef
 ;;; subword.el ends here