From: Richard M. Stallman Date: Tue, 25 Dec 2007 22:45:27 +0000 (+0000) Subject: (idlwave-region-active-p): Use `use-region-p'. X-Git-Tag: emacs-pretest-23.0.90~8840 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a00e54f7a2493f9292fbf99e205ff91dea007903;p=emacs.git (idlwave-region-active-p): Use `use-region-p'. --- diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 590f9d6c356..b893a72679d 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -2112,15 +2112,11 @@ Returns point if comment found and nil otherwise." (backward-char 1) (point))))) -(defvar transient-mark-mode) -(defvar zmacs-regions) -(defvar mark-active) (defun idlwave-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) + (region-active-p))) (defun idlwave-show-matching-quote () "Insert quote and show matching quote if this is end of a string."