changeset 87398:5aca203bab2c

(reftex-region-active-p): Use `use-region-p'.
author Richard M. Stallman <rms@gnu.org>
date Tue, 25 Dec 2007 22:44:57 +0000
parents 6bf362c56364
children 16b2c36a354d
files lisp/textmodes/reftex.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/reftex.el	Tue Dec 25 22:44:28 2007 +0000
+++ b/lisp/textmodes/reftex.el	Tue Dec 25 22:44:57 2007 +0000
@@ -1805,11 +1805,11 @@
     (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.