From: Richard M. Stallman Date: Tue, 25 Dec 2007 22:44:57 +0000 (+0000) Subject: (reftex-region-active-p): Use `use-region-p'. X-Git-Tag: emacs-pretest-23.0.90~8841 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f93df073e6f2b997697766f63b381c65640170b1;p=emacs.git (reftex-region-active-p): Use `use-region-p'. --- diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index d6ec29434d1..d7557a57d49 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -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.