Merge branch 'master' of orgmode.org:org-mode
This commit is contained in:
commit
3ee229dcd1
25
lisp/org.el
25
lisp/org.el
|
@ -8766,13 +8766,7 @@ should be checked in for a command to execute outside of tables."
|
||||||
(setq nname (format "%s-%d" name (setq i (1+ i)))))
|
(setq nname (format "%s-%d" name (setq i (1+ i)))))
|
||||||
(setq name (intern nname)))
|
(setq name (intern nname)))
|
||||||
(eval
|
(eval
|
||||||
`(defun ,name (arg)
|
(let ((bindings '((org-heading-regexp
|
||||||
,(concat "In Structure, run `" (symbol-name fun) "'.\n"
|
|
||||||
"Outside of structure, run the binding of `"
|
|
||||||
(key-description key) "'.")
|
|
||||||
(interactive "p")
|
|
||||||
(unless
|
|
||||||
(let* ((org-heading-regexp
|
|
||||||
(concat "^"
|
(concat "^"
|
||||||
orgstruct-heading-prefix-regexp
|
orgstruct-heading-prefix-regexp
|
||||||
"\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ ]*$"))
|
"\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ ]*$"))
|
||||||
|
@ -8783,19 +8777,30 @@ should be checked in for a command to execute outside of tables."
|
||||||
(outline-regexp org-outline-regexp)
|
(outline-regexp org-outline-regexp)
|
||||||
(outline-heading-end-regexp "\n")
|
(outline-heading-end-regexp "\n")
|
||||||
(outline-level 'outline-level)
|
(outline-level 'outline-level)
|
||||||
(outline-heading-alist))
|
(outline-heading-alist))))
|
||||||
|
`(defun ,name (arg)
|
||||||
|
,(concat "In Structure, run `" (symbol-name fun) "'.\n"
|
||||||
|
"Outside of structure, run the binding of `"
|
||||||
|
(key-description key) "'.")
|
||||||
|
(interactive "p")
|
||||||
|
(unless
|
||||||
|
(let* ,bindings
|
||||||
(when (org-context-p 'headline 'item
|
(when (org-context-p 'headline 'item
|
||||||
,(when (memq fun '(org-insert-heading))
|
,(when (memq fun '(org-insert-heading))
|
||||||
'(when orgstruct-is-++
|
'(when orgstruct-is-++
|
||||||
'item-body)))
|
'item-body)))
|
||||||
(org-run-like-in-org-mode ',fun)
|
(org-run-like-in-org-mode
|
||||||
|
(lambda ()
|
||||||
|
(interactive)
|
||||||
|
(let* ,bindings
|
||||||
|
(call-interactively ',fun))))
|
||||||
t))
|
t))
|
||||||
(let* ((orgstruct-mode)
|
(let* ((orgstruct-mode)
|
||||||
(binding (key-binding ,key)))
|
(binding (key-binding ,key)))
|
||||||
(if (keymapp binding)
|
(if (keymapp binding)
|
||||||
(set-temporary-overlay-map binding)
|
(set-temporary-overlay-map binding)
|
||||||
(call-interactively
|
(call-interactively
|
||||||
(or binding 'orgstruct-error)))))))
|
(or binding 'orgstruct-error))))))))
|
||||||
name))
|
name))
|
||||||
|
|
||||||
(defun org-contextualize-keys (alist contexts)
|
(defun org-contextualize-keys (alist contexts)
|
||||||
|
|
Loading…
Reference in New Issue