aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/progmodes/cc-subword.el45
2 files changed, 16 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dea1f0b9efe..b599fb370d2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12006-04-26 Stefan Monnier <monnier@iro.umontreal.ca> 12006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * progmodes/cc-subword.el (c-subword-mode-map): Use command remapping.
4
3 * add-log.el (add-log-iso8601-time-zone): Make parameter optional. 5 * add-log.el (add-log-iso8601-time-zone): Make parameter optional.
4 (add-log-iso8601-time-string): Fix call to format-time-string. 6 (add-log-iso8601-time-string): Fix call to format-time-string.
5 7
diff --git a/lisp/progmodes/cc-subword.el b/lisp/progmodes/cc-subword.el
index 6ba76708ebf..b7ba04ad590 100644
--- a/lisp/progmodes/cc-subword.el
+++ b/lisp/progmodes/cc-subword.el
@@ -107,36 +107,19 @@ telling us which (X)Emacs version you're using."
107 107
108 (defvar c-subword-mode-map 108 (defvar c-subword-mode-map
109 (let ((map (make-sparse-keymap))) 109 (let ((map (make-sparse-keymap)))
110 (substitute-key-definition 'forward-word 110 (dolist (cmd '(forward-word backward-word mark-word
111 'c-forward-subword 111 kill-word backward-kill-word
112 map global-map) 112 transpose-words
113 (substitute-key-definition 'backward-word 113 capitalize-word upcase-word downcase-word))
114 'c-backward-subword 114 (let ((othercmd (let ((name (symbol-name cmd)))
115 map global-map) 115 (string-match "\\(.*-\\)\\(word.*\\)" name)
116 (substitute-key-definition 'mark-word 116 (intern (concat "c-"
117 'c-mark-subword 117 (match-string 1 name)
118 map global-map) 118 "sub"
119 119 (match-string 2 name))))))
120 (substitute-key-definition 'kill-word 120 (if (fboundp 'command-remapping)
121 'c-kill-subword 121 (define-key map (vector 'remap cmd) othercmd)
122 map global-map) 122 (substitute-key-definition cmd othercmd map global-map))))
123 (substitute-key-definition 'backward-kill-word
124 'c-backward-kill-subword
125 map global-map)
126
127 (substitute-key-definition 'transpose-words
128 'c-transpose-subwords
129 map global-map)
130
131 (substitute-key-definition 'capitalize-word
132 'c-capitalize-subword
133 map global-map)
134 (substitute-key-definition 'upcase-word
135 'c-upcase-subword
136 map global-map)
137 (substitute-key-definition 'downcase-word
138 'c-downcase-subword
139 map global-map)
140 map) 123 map)
141 "Keymap used in command `c-subword-mode' minor mode.") 124 "Keymap used in command `c-subword-mode' minor mode.")
142 125
@@ -308,5 +291,5 @@ Optional argument ARG is the same as for `upcase-word'."
308 291
309(cc-provide 'cc-subword) 292(cc-provide 'cc-subword)
310 293
311;;; arch-tag: 2be9d294-7f30-4626-95e6-9964bb93c7a3 294;; arch-tag: 2be9d294-7f30-4626-95e6-9964bb93c7a3
312;;; cc-subword.el ends here 295;;; cc-subword.el ends here