From b63dc21e4fcf23a27d02379c7db9bef724eaa2d5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 25 Dec 2007 22:47:03 +0000 Subject: [PATCH] (ada-region-selected): Use `use-region-p'. --- lisp/progmodes/ada-mode.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 07d38dbdaa2..5910ebf3f28 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1396,13 +1396,11 @@ If you use ada-xref.el: (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point)) (goto-char aa-end))))) -;; transient-mark-mode and mark-active are not defined in XEmacs (defun ada-region-selected () - "Return t if a region has been selected by the user and is still active." - (if (featurep 'xemacs) - (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))) ;;----------------------------------------------------------------- ;; auto-casing -- 2.39.2