From a00e54f7a2493f9292fbf99e205ff91dea007903 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 25 Dec 2007 22:45:27 +0000 Subject: [PATCH] (idlwave-region-active-p): Use `use-region-p'. --- lisp/progmodes/idlwave.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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." -- 2.39.2