[cp-org] indent closing element of cp-org-insert-src
This commit is contained in:
parent
78c6df891c
commit
bc7ceca83e
|
@ -119,11 +119,12 @@
|
||||||
(org-link-set-parameters "gemini" :export #'org-link-gemini-export-link))
|
(org-link-set-parameters "gemini" :export #'org-link-gemini-export-link))
|
||||||
|
|
||||||
(defun cp-org-insert-src (&optional lang)
|
(defun cp-org-insert-src (&optional lang)
|
||||||
(insert (format "#+BEGIN_SRC %s\n"
|
(let ((col (- (point) (point-at-bol))))
|
||||||
(if (stringp lang) lang "")))
|
(insert (format "#+BEGIN_SRC %s\n"
|
||||||
(let ((pos (point)))
|
(if (stringp lang) lang "")))
|
||||||
(insert "\n#+END_SRC")
|
(let ((pos (point)))
|
||||||
(goto-char pos)))
|
(insert (format "\n%s#+END_SRC" (make-string col ?\ )))
|
||||||
|
(goto-char pos))))
|
||||||
|
|
||||||
(defhydra cp-org-src (:color blue)
|
(defhydra cp-org-src (:color blue)
|
||||||
"Org source block"
|
"Org source block"
|
||||||
|
|
Loading…
Reference in New Issue