Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
be12bc57
Commit
be12bc57
authored
Apr 26, 2006
by
Stefan Monnier
Browse files
(c-subword-mode-map): Use command remapping.
parent
8ac3a455
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
31 deletions
+16
-31
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/progmodes/cc-subword.el
lisp/progmodes/cc-subword.el
+14
-31
No files found.
lisp/ChangeLog
View file @
be12bc57
2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/cc-subword.el (c-subword-mode-map): Use command remapping.
* add-log.el (add-log-iso8601-time-zone): Make parameter optional.
(add-log-iso8601-time-string): Fix call to format-time-string.
...
...
lisp/progmodes/cc-subword.el
View file @
be12bc57
...
...
@@ -107,36 +107,19 @@ telling us which (X)Emacs version you're using."
(
defvar
c-subword-mode-map
(
let
((
map
(
make-sparse-keymap
)))
(
substitute-key-definition
'forward-word
'c-forward-subword
map
global-map
)
(
substitute-key-definition
'backward-word
'c-backward-subword
map
global-map
)
(
substitute-key-definition
'mark-word
'c-mark-subword
map
global-map
)
(
substitute-key-definition
'kill-word
'c-kill-subword
map
global-map
)
(
substitute-key-definition
'backward-kill-word
'c-backward-kill-subword
map
global-map
)
(
substitute-key-definition
'transpose-words
'c-transpose-subwords
map
global-map
)
(
substitute-key-definition
'capitalize-word
'c-capitalize-subword
map
global-map
)
(
substitute-key-definition
'upcase-word
'c-upcase-subword
map
global-map
)
(
substitute-key-definition
'downcase-word
'c-downcase-subword
map
global-map
)
(
dolist
(
cmd
'
(
forward-word
backward-word
mark-word
kill-word
backward-kill-word
transpose-words
capitalize-word
upcase-word
downcase-word
))
(
let
((
othercmd
(
let
((
name
(
symbol-name
cmd
)))
(
string-match
"\\(.*-\\)\\(word.*\\)"
name
)
(
intern
(
concat
"c-"
(
match-string
1
name
)
"sub"
(
match-string
2
name
))))))
(
if
(
fboundp
'command-remapping
)
(
define-key
map
(
vector
'remap
cmd
)
othercmd
)
(
substitute-key-definition
cmd
othercmd
map
global-map
))))
map
)
"Keymap used in command `c-subword-mode' minor mode."
)
...
...
@@ -308,5 +291,5 @@ Optional argument ARG is the same as for `upcase-word'."
(
cc-provide
'cc-subword
)
;;
;
arch-tag: 2be9d294-7f30-4626-95e6-9964bb93c7a3
;; arch-tag: 2be9d294-7f30-4626-95e6-9964bb93c7a3
;;; cc-subword.el ends here
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment