org-confirm-babel-evaluate)))
(code-block (if ,info (format " %s " ,lang) " "))
(block-name (if ,name (format " (%s) " ,name) " ")))
+ ;; Silence byte-compiler is `body' doesn't use those vars.
+ (ignore noeval query)
,@body)))
(defsubst org-babel-check-evaluate (info)
through use of the :var header argument) this marker points to
the outer-most code block.")
+(defvar *this*)
+
;;;###autoload
(defun org-babel-execute-src-block (&optional arg info params)
"Execute the current source code block.
(end-of-line 1) (forward-char 1)
(let ((result (org-babel-read-result)))
(message (replace-regexp-in-string
- "%" "%%" (format "%S" result))) result)))
+ "%" "%%" (format "%S" result)))
+ result)))
((org-babel-confirm-evaluate
(let ((i info)) (setf (nth 2 i) merged-params) i))
(let* ((lang (nth 0 info))
"\n")))
;;;###autoload
-(defun org-babel-expand-src-block (&optional arg info params)
+(defun org-babel-expand-src-block (&optional _arg info params)
"Expand the current source code block.
Expand according to the source code block's header
arguments and pop open the results in a preview buffer."
(let ((results (copy-sequence original)))
(dolist (new-list others)
(dolist (arg-pair new-list)
- (let ((header (car arg-pair))
- (args (cdr arg-pair)))
+ (let ((header (car arg-pair)))
(setq results
(cons arg-pair (org-remove-if
(lambda (pair) (equal header (car pair)))
(add-hook 'org-tab-first-hook 'org-babel-header-arg-expand)
;;;###autoload
-(defun org-babel-load-in-session (&optional arg info)
+(defun org-babel-load-in-session (&optional _arg info)
"Load the body of the current source-code block.
Evaluate the header arguments for the source block before
entering the session. After loading the body this pops open the
(defvar org-src-window-setup)
;;;###autoload
-(defun org-babel-switch-to-session-with-code (&optional arg info)
+(defun org-babel-switch-to-session-with-code (&optional arg _info)
"Switch to code buffer and display session."
(interactive "P")
(let ((swap-windows
(body (match-string 5))
(beg-body (match-beginning 5))
(end-body (match-end 5)))
- ,@body
+ ;; Silence byte-compiler in case `body' doesn't use all
+ ;; those variables.
+ (ignore full-block beg-block end-block lang
+ beg-lang end-lang switches beg-switches
+ end-switches header-args beg-header-args
+ end-header-args body beg-body end-body)
+ ,@body
(goto-char end-block)))))
(unless visited-p (kill-buffer to-be-removed))
(goto-char point))))
(rownames (funcall (lambda ()
(let ((tp table))
(mapcar
- (lambda (row)
+ (lambda (_row)
(prog1
(pop (car tp))
(setq tp (cdr tp))))
org-babel-named-src-block-regexp."
(save-excursion
(let ((case-fold-search t)
- (regexp (org-babel-named-src-block-regexp-for-name name)) msg)
+ (regexp (org-babel-named-src-block-regexp-for-name name)))
(goto-char (point-min))
(when (or (re-search-forward regexp nil t)
(re-search-backward regexp nil t))
(catch 'is-a-code-block
(when (re-search-forward
(concat org-babel-result-regexp
- "[ \t]" (regexp-quote name) "[ \t]*[\n\f\v\r]") nil t)
+ "[ \t]" (regexp-quote name) "[ \t]*[\n\f\v\r]")
+ nil t)
(when (and (string= "name" (downcase (match-string 1)))
(or (beginning-of-line 1)
(looking-at org-babel-src-block-regexp)
`org-edit-src-save'")
(defvar org-edit-src-code-timer nil)
+(defvar org-inhibit-startup)
+
(defun org-edit-src-code (&optional context code edit-buffer-name)
"Edit the source CODE block at point.
The code is copied to a separate buffer and the appropriate mode
;; just one empty line, i.e. beg == end.
(end (copy-marker (make-marker) t))
(allow-write-back-p (null code))
- block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
+ block-nindent total-nindent ovl lang lang-f single buffer msg
begline markline markcol line col transmitted-variables)
(setq beg (move-marker beg (nth 0 info))
end (move-marker end (nth 1 info))
(org-mode-p (derived-mode-p 'org-mode))
(beg (make-marker))
(end (make-marker))
- (preserve-indentation org-src-preserve-indentation)
block-nindent ovl beg1 end1 code begline buffer)
(beginning-of-line 1)
(if (looking-at "[ \t]*[^:\n \t]")
'(font-lock-fontified t fontified t font-lock-multiline t))
(set-buffer-modified-p modified)))))
+(defvar org-src-fontify-natively)
+
(defun org-src-fontify-block ()
"Fontify code block at point."
(interactive)