Reorganize to keep all key binding related sections together
This commit is contained in:
parent
539f3bb2bc
commit
52f7edb656
51
README.org
51
README.org
@ -962,6 +962,31 @@ Listing [[lst:setup-shortdoc]] binds {{{kbd(C-h y)}}} to =shortdoc-display-group
|
||||
(keymap-set help-map "y" #'shortdoc-display-group))
|
||||
#+end_src
|
||||
|
||||
** [[info:emacs#Disabling][Disabling Commands (info)]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:enable-disabled-commands
|
||||
:END:
|
||||
|
||||
Execute src_emacs-lisp[:results none]{(find-library "novice")} to see how Emacs
|
||||
prevents new users from shooting themselves in the feet. Listing
|
||||
[[lst:configure-disabled-command-function]] enables [[https://www.emacswiki.org/emacs/DisabledCommands][disabled commands on the fly]].
|
||||
|
||||
#+caption[Configure the =disabled-command-function=]:
|
||||
#+caption: Configure the =disabled-command-function=.
|
||||
#+name: lst:configure-disabled-command-function
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(with-eval-after-load 'emacs
|
||||
(setq disabled-command-function
|
||||
(defun enable-this-command (&rest _args)
|
||||
"Called when executing a disabled command.
|
||||
Enable it and re-execute it."
|
||||
(put this-command 'disabled nil)
|
||||
(message "You typed %s. Emacs enabled %s."
|
||||
(key-description (this-command-keys)) this-command)
|
||||
(sit-for 0)
|
||||
(call-interactively this-command))))
|
||||
#+end_src
|
||||
|
||||
** [[info:info#Top][Info (info)]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:info
|
||||
@ -1011,31 +1036,7 @@ looks for files.
|
||||
| backward-sentence | global-map | {{{kbd(M-a)}}} |
|
||||
| forward-sentence | global-map | {{{kbd(M-e)}}} |
|
||||
|--------------------+------------+------------------------|
|
||||
|
||||
** [[info:emacs#Disabling][Disabling Commands (info)]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:enable-disabled-commands
|
||||
:END:
|
||||
|
||||
Execute src_emacs-lisp[:results none]{(find-library "novice")} to see how Emacs
|
||||
prevents new users from shooting themselves in the feet. Listing
|
||||
[[lst:configure-disabled-command-function]] enables [[https://www.emacswiki.org/emacs/DisabledCommands][disabled commands on the fly]].
|
||||
|
||||
#+caption[Configure the =disabled-command-function=]:
|
||||
#+caption: Configure the =disabled-command-function=.
|
||||
#+name: lst:configure-disabled-command-function
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(with-eval-after-load 'emacs
|
||||
(setq disabled-command-function
|
||||
(defun enable-this-command (&rest _args)
|
||||
"Called when executing a disabled command.
|
||||
Enable it and re-execute it."
|
||||
(put this-command 'disabled nil)
|
||||
(message "You typed %s. Emacs enabled %s."
|
||||
(key-description (this-command-keys)) this-command)
|
||||
(sit-for 0)
|
||||
(call-interactively this-command))))
|
||||
#+end_src
|
||||
|----------------------+------------+------------------------|
|
||||
|
||||
** [[https://github.com/michael-heerdegen/interaction-log.el#readme][Interaction-log]]
|
||||
:PROPERTIES:
|
||||
|
Loading…
Reference in New Issue
Block a user