mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
Tolerate editing an export block without type
* lisp/org-src.el (org-edit-export-block): Tolerate editing an export block without type.
This commit is contained in:
parent
91a76063d8
commit
d50170b208
@ -920,7 +920,10 @@ Throw an error when not at an export block."
|
||||
(unless (and (eq (org-element-type element) 'export-block)
|
||||
(org-src--on-datum-p element))
|
||||
(user-error "Not in an export block"))
|
||||
(let* ((type (downcase (org-element-property :type element)))
|
||||
(let* ((type (downcase (or (org-element-property :type element)
|
||||
;; Missing export-block type. Fallback
|
||||
;; to default mode.
|
||||
"fundamental")))
|
||||
(mode (org-src--get-lang-mode type)))
|
||||
(unless (functionp mode) (error "No such language mode: %s" mode))
|
||||
(org-src--edit-element
|
||||
|
Loading…
Reference in New Issue
Block a user