aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/idlwave.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2007-12-25 22:45:27 +0000
committerRichard M. Stallman <[email protected]>2007-12-25 22:45:27 +0000
commita00e54f7a2493f9292fbf99e205ff91dea007903 (patch)
treee99624ce870ff61831ac9799e24c1e3a271cf750 /lisp/progmodes/idlwave.el
parentf93df073e6f2b997697766f63b381c65640170b1 (diff)
(idlwave-region-active-p): Use `use-region-p'.
Diffstat (limited to 'lisp/progmodes/idlwave.el')
-rw-r--r--lisp/progmodes/idlwave.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 590f9d6c35..b893a72679 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."