Add more functions to the init short documentation group
This commit is contained in:
parent
b0918996a1
commit
d706bf7b29
25
README.org
25
README.org
@ -601,7 +601,11 @@ defined in this Org file.
|
||||
(org-eval-emacs-lisp-setup-blocks :no-manual t)
|
||||
(org-eval-python-setup-blocks :no-manual t)
|
||||
(org-eval-infixed-blocks :no-manual t)
|
||||
(org-syntax-convert-keyword-case-to-lower :no-manual t))))
|
||||
(org-syntax-convert-keyword-case-to-lower :no-manual t)
|
||||
"Wizard"
|
||||
(enable-this-command :no-manual t)
|
||||
(narrow-or-widen-dwim :no-manual t)
|
||||
(org-narrow-to-table :no-manual t))))
|
||||
#+end_src
|
||||
|
||||
** [[info:info#Top][Info (info)]]
|
||||
@ -659,7 +663,7 @@ users from shooting themselves in the feet. Listing
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'emacs
|
||||
(setq disabled-command-function
|
||||
(defun my-enable-this-command (&rest _args)
|
||||
(defun enable-this-command (&rest _args)
|
||||
"Called when a disabled command is executed.
|
||||
Enable it and re-execute it."
|
||||
(put this-command 'disabled nil)
|
||||
@ -3197,20 +3201,23 @@ on tables by means of =org-narrow-to-table=.
|
||||
#+caption: Configure =narrow-or-widen-dwim=.
|
||||
#+name: lst:configure-narrow-or-widen-dwim
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'emacs
|
||||
(autoload 'org-at-table "org-table")
|
||||
|
||||
(defun org-narrow-to-table ()
|
||||
"Narrow buffer to current table."
|
||||
(interactive)
|
||||
(if (org-table-p)
|
||||
(if (org-at-table-p)
|
||||
(narrow-to-region (org-table-begin) (org-table-end))
|
||||
(user-error "Not in a table")))
|
||||
|
||||
(defun narrow-or-widen-dwim (p)
|
||||
"Widen if buffer is narrowed, narrow-dwim otherwise.
|
||||
Dwim means: region, org-src-block, org-subtree, or defun,
|
||||
whichever applies first. Narrowing to org-src-block actually
|
||||
calls `org-edit-src-code'.
|
||||
With prefix P, don't widen, just narrow even if buffer is
|
||||
already narrowed."
|
||||
Dwim means: region, org-src-block, org-table, org-subtree, LaTeX
|
||||
environment, TeX group, or defun, whichever applies first.
|
||||
Narrowing to org-src-block actually calls `org-edit-src-code'.
|
||||
With prefix P, don't widen, just narrow even if buffer is already
|
||||
narrowed."
|
||||
(interactive "P")
|
||||
(declare (interactive-only))
|
||||
(cond ((and (buffer-narrowed-p) (not p)) (widen))
|
||||
@ -3230,7 +3237,7 @@ on tables by means of =org-narrow-to-table=.
|
||||
(t (narrow-to-defun))))
|
||||
|
||||
(define-key ctl-x-map (kbd "n t") #'org-narrow-to-table)
|
||||
(define-key ctl-x-map (kbd "C-n") #'narrow-or-widen-dwim)
|
||||
(define-key ctl-x-map (kbd "C-n") #'narrow-or-widen-dwim))
|
||||
#+end_src
|
||||
|
||||
** [[info:emacs#Faces][Text faces or styles (info)]]
|
||||
|
Loading…
Reference in New Issue
Block a user