From 8393a76f783a041dd4ccad2bbc9fcd7169214c68 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Mon, 20 Aug 2012 05:45:25 +0200 Subject: [PATCH] Always use the compatibility function `org-region-active-p' * org.el (org-create-math-formula): Use the compatibility function `org-region-active-p'. * org-odt.el (org-export-as-odf): Ditto. * ob.el (org-babel-demarcate-block): Ditto. --- lisp/ob.el | 4 ++-- lisp/org-odt.el | 2 +- lisp/org.el | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/ob.el b/lisp/ob.el index 751829324..521134518 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -1685,13 +1685,13 @@ region is not active then the point is demarcated." "" (concat "\n" (make-string (current-column) ? ))))))) (move-end-of-line 2)) - (sort (if (region-active-p) (list (mark) (point)) (list (point))) #'>)) + (sort (if (org-region-active-p) (list (mark) (point)) (list (point))) #'>)) (let ((start (point)) (lang (org-icompleting-read "Lang: " (mapcar (lambda (el) (symbol-name (car el))) org-babel-load-languages))) (body (delete-and-extract-region - (if (region-active-p) (mark) (point)) (point)))) + (if (org-region-active-p) (mark) (point)) (point)))) (insert (concat (if (looking-at "^") "" "\n") (if arg (concat stars "\n") "") "#+begin_src " lang "\n" diff --git a/lisp/org-odt.el b/lisp/org-odt.el index 17c2331b0..bc5bf73ba 100644 --- a/lisp/org-odt.el +++ b/lisp/org-odt.el @@ -2796,7 +2796,7 @@ MathML source to kill ring, if `org-export-copy-to-kill-ring' is non-nil." (interactive `(,(let (frag) - (setq frag (and (setq frag (and (region-active-p) + (setq frag (and (setq frag (and (org-region-active-p) (buffer-substring (region-beginning) (region-end)))) (loop for e in org-latex-regexps diff --git a/lisp/org.el b/lisp/org.el index 36e843fee..e01d741d4 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17394,7 +17394,7 @@ write the results in to that file. When invoked as an interactive command, prompt for LATEX-FRAG, with initial value set to the current active region and echo the results for user inspection." - (interactive (list (let ((frag (when (region-active-p) + (interactive (list (let ((frag (when (org-region-active-p) (buffer-substring-no-properties (region-beginning) (region-end))))) (read-string "LaTeX Fragment: " frag nil frag)))) -- 2.11.4.GIT