Browse Source

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.
Bastien Guerry 12 years ago
parent
commit
8393a76f78
3 changed files with 4 additions and 4 deletions
  1. 2 2
      lisp/ob.el
  2. 1 1
      lisp/org-odt.el
  3. 1 1
      lisp/org.el

+ 2 - 2
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"

+ 1 - 1
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

+ 1 - 1
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))))