mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Make the button navigation commands available via a minor mode
* lisp/button.el (button-mode): New minor mode. * doc/lispref/display.texi (Button Buffer Commands): Mention it.
This commit is contained in:
parent
7bd6dd065b
commit
1ee76735a2
3 changed files with 14 additions and 0 deletions
|
|
@ -6926,6 +6926,9 @@ such as @code{forward-button} and @code{backward-button} are
|
||||||
additionally available in the keymap stored in
|
additionally available in the keymap stored in
|
||||||
@code{button-buffer-map}; a mode which uses buttons may want to use
|
@code{button-buffer-map}; a mode which uses buttons may want to use
|
||||||
@code{button-buffer-map} as a parent keymap for its keymap.
|
@code{button-buffer-map} as a parent keymap for its keymap.
|
||||||
|
Alternatively, the @code{button-mode} can be switched on for much the
|
||||||
|
same effect: It's a minor mode that does nothing else than install
|
||||||
|
@code{button-buffer-map} as a minor mode keymap.
|
||||||
|
|
||||||
If the button has a non-@code{nil} @code{follow-link} property, and
|
If the button has a non-@code{nil} @code{follow-link} property, and
|
||||||
@code{mouse-1-click-follows-link} is set, a quick @key{mouse-1} click
|
@code{mouse-1-click-follows-link} is set, a quick @key{mouse-1} click
|
||||||
|
|
|
||||||
7
etc/NEWS
7
etc/NEWS
|
|
@ -958,6 +958,13 @@ window after starting). This variable defaults to nil.
|
||||||
|
|
||||||
** Miscellaneous
|
** Miscellaneous
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** New minor mode 'button-mode'.
|
||||||
|
This minor mode does nothing else than install 'button-buffer-map' as
|
||||||
|
a minor mode map (which binds the TAB/S-TAB key bindings to navigate
|
||||||
|
to buttons), and can be used in any view-mode-like buffer that has
|
||||||
|
buttons in it.
|
||||||
|
|
||||||
---
|
---
|
||||||
*** 'icomplete-show-matches-on-no-input' behavior change.
|
*** 'icomplete-show-matches-on-no-input' behavior change.
|
||||||
Previously, choosing a different completion with commands like 'C-.'
|
Previously, choosing a different completion with commands like 'C-.'
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,10 @@
|
||||||
"Keymap useful for buffers containing buttons.
|
"Keymap useful for buffers containing buttons.
|
||||||
Mode-specific keymaps may want to use this as their parent keymap.")
|
Mode-specific keymaps may want to use this as their parent keymap.")
|
||||||
|
|
||||||
|
(define-minor-mode button-mode
|
||||||
|
"A minor mode for navigating to buttons with the TAB key."
|
||||||
|
:keymap button-buffer-map)
|
||||||
|
|
||||||
;; Default properties for buttons.
|
;; Default properties for buttons.
|
||||||
(put 'default-button 'face 'button)
|
(put 'default-button 'face 'button)
|
||||||
(put 'default-button 'mouse-face 'highlight)
|
(put 'default-button 'mouse-face 'highlight)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue