]> git.eshelyaron.com Git - emacs.git/commitdiff
(reftex-region-active-p): Use `use-region-p'.
authorRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2007 22:44:57 +0000 (22:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2007 22:44:57 +0000 (22:44 +0000)
lisp/textmodes/reftex.el

index d6ec29434d1a050ea67f09a286eaf9e7d8a9cf74..d7557a57d497063adeac808a67052eb5b1a69aba 100644 (file)
@@ -1805,11 +1805,11 @@ When DIE is non-nil, throw an error if file not found."
     (buffer-substring-no-properties (match-beginning n) (match-end n))))
 
 (defun reftex-region-active-p ()
-  "Is transient-mark-mode on and the region active?
-Works on both Emacs and XEmacs."
-  (if (featurep 'xemacs)
-      (and zmacs-regions (region-active-p))
-    (and transient-mark-mode mark-active)))
+  "Should we operate on an active region?"
+  (if (fboundp 'use-region-p)
+      (use-region-p)
+    ;; For XEmacs.
+    (region-active-p)))
 
 (defun reftex-kill-buffer (buffer)
   ;; Kill buffer if it exists.