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
a8959ac2
Commit
a8959ac2
authored
Feb 23, 2002
by
Kim F. Storm
Browse files
Modify description of command remapping which now uses a `remap'
prefix-key.
parent
ea136e8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
etc/NEWS
etc/NEWS
+9
-13
No files found.
etc/NEWS
View file @
a8959ac2
...
@@ -531,8 +531,8 @@ command remapping allows you to directly map kill-line into
...
@@ -531,8 +531,8 @@ command remapping allows you to directly map kill-line into
my-kill-line and kill-word into my-kill-word through the minor mode
my-kill-line and kill-word into my-kill-word through the minor mode
map using define-key:
map using define-key:
(define-key my-mode-map
'
kill-line 'my-kill-line)
(define-key my-mode-map
[remap
kill-line
]
'my-kill-line)
(define-key my-mode-map
'
kill-word 'my-kill-word)
(define-key my-mode-map
[remap
kill-word
]
'my-kill-word)
Now, when my-mode is enabled, and the user enters C-k or M-d,
Now, when my-mode is enabled, and the user enters C-k or M-d,
the commands my-kill-line and my-kill-word are run.
the commands my-kill-line and my-kill-word are run.
...
@@ -543,20 +543,16 @@ then C-k still runs my-kill-line.
...
@@ -543,20 +543,16 @@ then C-k still runs my-kill-line.
The following changes have been made to provide command remapping:
The following changes have been made to provide command remapping:
- define-key now accepts a command name as the KEY argument.
- Command remappings are defined using `define-key' with a prefix-key
This identifies the command to be remapped in the specified keymap.
`remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD
This is equivalent to specifying the command name as the only
to definition DEF in keymap MAP. The definition is not limited to
element of a vector, e.g [kill-line], except that when KEY is a
another command; it can be anything accepted for a normal binding.
symbol, the DEF argument must also be a symbol.
-
In calls from Lisp, global-set-key, global-unset-key, local-set-key,
-
The new function `remap-command' returns the binding for a remapped
and local-unset-key also accept a command name as the KEY argument
.
command in the current keymaps, or nil if it isn't remapped
.
- key-binding now remaps interactive commands unless the optional
- key-binding now remaps interactive commands unless the optional
third argument NO-REMAP is non-nil. It also accepts a command name
third argument NO-REMAP is non-nil.
as the KEY argument.
- lookup-key now accepts a command name as the KEY argument.
- where-is-internal now returns nil for a remapped command (e.g.
- where-is-internal now returns nil for a remapped command (e.g.
kill-line if my-mode is enabled), and the actual key binding for
kill-line if my-mode is enabled), and the actual key binding for
...
...
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