mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-19 19:07:43 +00:00
org-babel-exp: adding org-babel-lob-mode for fontification of lob lines
This commit is contained in:
parent
70a5963563
commit
6851f07f92
@ -117,7 +117,8 @@ options are taken from `org-babel-default-header-args'."
|
||||
(if (string-match "\n$" body) "" "\n")))
|
||||
('lob (save-excursion
|
||||
(re-search-backward org-babel-lob-one-liner-regexp)
|
||||
(format "#+BEGIN_SRC babel\n%s\n#+END_SRC" (first (org-babel-lob-get-info)))))))
|
||||
(format "#+BEGIN_SRC org-babel-lob\n%s\n#+END_SRC"
|
||||
(first (org-babel-lob-get-info)))))))
|
||||
|
||||
(defun org-babel-exp-results (body lang params type)
|
||||
(let ((params
|
||||
|
@ -93,5 +93,10 @@ the word 'call'."
|
||||
(concat ":var results=" (mapconcat #'identity info " ")))))))
|
||||
(org-babel-execute-src-block nil (list "emacs-lisp" "results" params))))
|
||||
|
||||
(define-generic-mode org-babel-lob-mode
|
||||
'("#") '("exports" "results" "tangle" "cmdline" "file" "session")
|
||||
nil nil nil
|
||||
"Major mode for fontification of library of babel lines on export")
|
||||
|
||||
(provide 'org-babel-lob)
|
||||
;;; org-babel-lob.el ends here
|
||||
|
@ -65,8 +65,5 @@
|
||||
(defun org-babel-load-library-of-babel ()
|
||||
(org-babel-lob-ingest (expand-file-name "library-of-babel.org" org-babel-lob-dir))))
|
||||
|
||||
(unless (assoc "babel" org-src-lang-modes)
|
||||
(add-to-list 'org-src-lang-modes (cons "babel" 'python)))
|
||||
|
||||
(provide 'org-babel-init)
|
||||
;;; org-babel-init.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user