1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-27 07:37:25 +00:00

enable speed commands for Babel commands on code blocks

* lisp/org.el (org-speed-command-hook): added org-speed-command-hook
  (org-babel-speed-command-hook): hook for Babel's speed commands
This commit is contained in:
Jambunathan K 2010-09-23 17:00:32 -06:00 committed by Eric Schulte
parent 1aa89de494
commit e7bf631fdc

View File

@ -16507,7 +16507,13 @@ If not, return to the original position and throw an error."
(cdr (assoc keys (append org-speed-commands-user
org-speed-commands-default)))))
(defcustom org-speed-command-hook 'org-speed-command-default-hook
(defun org-babel-speed-command-hook (keys)
"Hook for activating single-letter code block commands."
(when (and (bolp) (looking-at org-babel-src-block-regexp))
(cdr (assoc keys org-babel-key-bindings))))
(defcustom org-speed-command-hook
'(org-speed-command-default-hook org-babel-speed-command-hook)
"Hook for activating speed commands at strategic locations.
Hook functions are called in sequence until a valid handler is
found.