Function: org-tempo-add-block
org-tempo-add-block is a byte-compiled function defined in
org-tempo.el.gz.
Signature
(org-tempo-add-block ENTRY)
Documentation
Add block entry from org-structure-template-alist.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-tempo.el.gz
(defun org-tempo-add-block (entry)
"Add block entry from `org-structure-template-alist'."
(let* ((key (format "<%s" (car entry)))
(name (cdr entry))
(special (member name '("src" "export")))
(upcase? (string= (car (split-string name))
(upcase (car (split-string name))))))
(tempo-define-template (format "org-%s" (replace-regexp-in-string " " "-" name))
`(,(format "#+%s_%s%s"
(if upcase? "BEGIN" "begin")
name
(if special " " ""))
,(when special 'p) '> n ,(unless special 'p) n
,(format "#+%s_%s"
(if upcase? "END" "end")
(car (split-string name " ")))
>)
key
(format "Insert a %s block" name)
'org-tempo-tags)))