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

index 590f9d6c356f6612ecc412a78ba6c208421846f1..b893a72679d5a6f5c1881b2afe8e40a60fd6fcee 100644 (file)
@@ -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."