summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-09-21 07:00:53 -0600
committerEric Schulte <schulte.eric@gmail.com>2010-09-21 07:03:12 -0600
commit26b9263926b9bbf3b6ab1a31ead096793b12cab1 (patch)
tree55975e2ea7c5a613dc4c6f1b6e91a6925cf8094f
parent00eceedf0ffbeae727f3204cde29d4bc4d4b1a32 (diff)
downloadorg-mode-26b9263926b9bbf3b6ab1a31ead096793b12cab1.tar.gz
fixing compiler warnings in org-babel-demarcate-block
Thanks to Achim Gratz for pointing these out * lisp/ob.el (org-babel-demarcate-block): fix compiler warnings
-rw-r--r--lisp/ob.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index e702612..a087092 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -57,6 +57,7 @@
(declare-function org-at-table-p "org" (&optional table-type))
(declare-function org-cycle "org" (&optional arg))
(declare-function org-uniquify "org" (list))
+(declare-function org-current-level "org" ())
(declare-function org-table-import "org-table" (file arg))
(declare-function org-add-hook "org-compat" (hook function &optional append local))
(declare-function org-table-align "org-table" ())
@@ -1154,12 +1155,13 @@ region is not active then the point is demarcated."
indent "#+end_src\n"
(if arg stars indent) "\n"
indent "#+begin_src " lang
- (if (looking-at "[\n\r]") "" "\n")))
- (when arg (previous-line) (move-end-of-line 1)))))
+ (if (looking-at "[\n\r]") "" "\n")))))
+ (move-end-of-line 2))
(sort (if (region-active-p) (list (mark) (point)) (list (point))) #'>))
(let ((start (point))
(body (delete-and-extract-region
- (if (region-active-p) (mark) (point)) (point))))
+ (if (region-active-p) (mark) (point)) (point)))
+ (stars (concat (make-string (org-current-level) ?*) " ")))
(insert (concat (if (looking-at "^") "" "\n")
(if arg (concat stars "\n") "")
"#+begin_src " (read-from-minibuffer "Lang: ") "\n"