forked from mirrors/org-mode
* lisp/ob-lilypond.el: Satisfy checkdoc
(org-babel-lilypond-compile-post-tangle): (org-babel-lilypond-display-pdf-post-tangle): (org-babel-lilypond-play-midi-post-tangle): (org-babel-execute:lilypond): (org-babel-lilypond-tangle): (org-babel-lilypond-process-basic): (org-babel-lilypond-parse-line-num): (org-babel-lilypond-set-header-args): Fix docstring
This commit is contained in:
parent
fcca762741
commit
538ddecb30
|
@ -58,23 +58,13 @@ and stored in `org-babel-default-header-args:lilypond'
|
|||
See `org-babel-lilypond-set-header-args'.")
|
||||
|
||||
(defvar org-babel-lilypond-compile-post-tangle t
|
||||
"Following the org-babel-tangle (C-c C-v t) command,
|
||||
org-babel-lilypond-compile-post-tangle determines whether ob-lilypond should
|
||||
automatically attempt to compile the resultant tangled file.
|
||||
If the value is nil, no automated compilation takes place.
|
||||
Default value is t.")
|
||||
"When non-nil, compile tangled file after `org-babel-tangle'.")
|
||||
|
||||
(defvar org-babel-lilypond-display-pdf-post-tangle t
|
||||
"Following a successful LilyPond compilation
|
||||
org-babel-lilypond-display-pdf-post-tangle determines whether to automate the
|
||||
drawing / redrawing of the resultant pdf. If the value is nil,
|
||||
the pdf is not automatically redrawn. Default value is t.")
|
||||
"When non-nil, display pdf after successful LilyPond compilation.")
|
||||
|
||||
(defvar org-babel-lilypond-play-midi-post-tangle t
|
||||
"Following a successful LilyPond compilation
|
||||
org-babel-lilypond-play-midi-post-tangle determines whether to automate the
|
||||
playing of the resultant midi file. If the value is nil,
|
||||
the midi file is not automatically played. Default value is t")
|
||||
"When non-nil, play midi file after successful LilyPond compilation.")
|
||||
|
||||
(defvar org-babel-lilypond-ly-command ""
|
||||
"Command to execute lilypond on your system.
|
||||
|
@ -155,20 +145,17 @@ blocks.")
|
|||
body))
|
||||
|
||||
(defun org-babel-execute:lilypond (body params)
|
||||
"This function is called by `org-babel-execute-src-block'.
|
||||
Depending on whether we are in arrange mode either:
|
||||
1. Attempt to execute lilypond block according to header settings
|
||||
(This is the default basic mode)
|
||||
2. Tangle all lilypond blocks and process the result (arrange mode)"
|
||||
"Execute lilypond src blcok according to arragne mode.
|
||||
See `org-babel-execute-src-block' for BODY and PARAMS.
|
||||
When in arrange mode, tangle all blocks and process the result.
|
||||
Otherwise, execute block according to header settings."
|
||||
(org-babel-lilypond-set-header-args org-babel-lilypond-arrange-mode)
|
||||
(if org-babel-lilypond-arrange-mode
|
||||
(org-babel-lilypond-tangle)
|
||||
(org-babel-lilypond-process-basic body params)))
|
||||
|
||||
(defun org-babel-lilypond-tangle ()
|
||||
"ob-lilypond specific tangle, attempts to invoke
|
||||
=ly-execute-tangled-ly= if tangle is successful. Also passes
|
||||
specific arguments to =org-babel-tangle=."
|
||||
"Tangle lilypond blocks, then `org-babel-liypond-execute-tangled-ly'."
|
||||
(interactive)
|
||||
(if (org-babel-tangle nil "yes" "lilypond")
|
||||
(org-babel-lilypond-execute-tangled-ly) nil))
|
||||
|
@ -190,7 +177,8 @@ specific arguments to =org-babel-tangle=."
|
|||
They are needed for mixing music and text in basic-mode.")
|
||||
|
||||
(defun org-babel-lilypond-process-basic (body params)
|
||||
"Execute a lilypond block in basic mode."
|
||||
"Execute a lilypond block in basic mode.
|
||||
See `org-babel-execute-src-block' for BODY and PARAMS."
|
||||
(let* ((out-file (cdr (assq :file params)))
|
||||
(file-type (file-name-extension out-file))
|
||||
(cmdline (or (cdr (assq :cmdline params))
|
||||
|
@ -308,7 +296,7 @@ LINE is the erroneous line."
|
|||
(goto-char temp))))
|
||||
|
||||
(defun org-babel-lilypond-parse-line-num (&optional buffer)
|
||||
"Extract error line number."
|
||||
"Extract error line number in BUFFER or `current-buffer'."
|
||||
(when buffer (set-buffer buffer))
|
||||
(let ((start
|
||||
(and (search-backward ":" nil t)
|
||||
|
@ -441,8 +429,7 @@ These depend upon whether we are in Arrange mode i.e. MODE is t."
|
|||
ob-lilypond-header-args)))
|
||||
|
||||
(defun org-babel-lilypond-set-header-args (mode)
|
||||
"Set org-babel-default-header-args:lilypond
|
||||
dependent on ORG-BABEL-LILYPOND-ARRANGE-MODE."
|
||||
"Set lilypond babel header according to MODE."
|
||||
(setq org-babel-default-header-args:lilypond
|
||||
(org-babel-lilypond-get-header-args mode)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue