diff options
author | Bastien Guerry <bzg@altern.org> | 2014-02-07 10:19:50 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-02-07 10:19:50 +0100 |
commit | 6a388c135f1336315ce7c54cfb0992aa1bfd5096 (patch) | |
tree | 3b064067626eb0a35bc802ddd8fe67c79fc3180f | |
parent | 88731be9024aafd2311d5d0d47111e148cfee815 (diff) | |
download | org-mode-6a388c135f1336315ce7c54cfb0992aa1bfd5096.tar.gz |
ob-core.el: Some renaming.
* ob-core.el (org-babel-insert-result): Use `org-babel-examplify-region'.
(org-babel-capitalize-examplize-region-markers): Rename to
`org-babel-capitalize-example-region-markers'.
(org-babel-examplize-region): Mark obsolete and rename to
`org-babel-examplify-region'.
-rw-r--r-- | lisp/ob-core.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index d0c9efd..3d0b43b 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2219,7 +2219,7 @@ code ---- the results are extracted in the syntax of the source (funcall wrap ":RESULTS:" ":END:" 'no-escape)) ((and (not (funcall proper-list-p result)) (not (member "file" result-params))) - (org-babel-examplize-region beg end results-switches) + (org-babel-examplify-region beg end results-switches) (setq end (point))))) ;; possibly indent the results to match the #+results line (when (and (not inlinep) (numberp indent) indent (> indent 0) @@ -2284,16 +2284,20 @@ file's directory then expand relative links." result) (if description (concat "[" description "]") "")))) -(defvar org-babel-capitalize-examplize-region-markers nil +(defvar org-babel-capitalize-example-region-markers nil "Make true to capitalize begin/end example markers inserted by code blocks.") -(defun org-babel-examplize-region (beg end &optional results-switches) +(define-obsolete-function-alias + 'org-babel-examplize-region + 'org-babel-examplify-region "24.5") + +(defun org-babel-examplify-region (beg end &optional results-switches) "Comment out region using the inline '==' or ': ' org example quote." (interactive "*r") (let ((chars-between (lambda (b e) (not (string-match "^[\\s]*$" (buffer-substring b e))))) - (maybe-cap (lambda (str) (if org-babel-capitalize-examplize-region-markers + (maybe-cap (lambda (str) (if org-babel-capitalize-example-region-markers (upcase str) str))) (beg-bol (save-excursion (goto-char beg) (point-at-bol))) (end-bol (save-excursion (goto-char end) (point-at-bol))) |