From: Richard M. Stallman Date: Tue, 25 Dec 2007 22:47:03 +0000 (+0000) Subject: (ada-region-selected): Use `use-region-p'. X-Git-Tag: emacs-pretest-23.0.90~8838 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b63dc21e4fcf23a27d02379c7db9bef724eaa2d5;p=emacs.git (ada-region-selected): Use `use-region-p'. --- 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