summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ada-mode.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2007-12-25 22:47:03 +0000
committerRichard M. Stallman <rms@gnu.org>2007-12-25 22:47:03 +0000
commitb63dc21e4fcf23a27d02379c7db9bef724eaa2d5 (patch)
tree06a9515a3ebf28ecf10bb9c8b11fa7e6810d5cd6 /lisp/progmodes/ada-mode.el
parent072aab30c924ffcc6ca3ee2d44d3235d9324d734 (diff)
downloademacs-b63dc21e4fcf23a27d02379c7db9bef724eaa2d5.tar.gz
(ada-region-selected): Use `use-region-p'.
Diffstat (limited to 'lisp/progmodes/ada-mode.el')
-rw-r--r--lisp/progmodes/ada-mode.el10
1 files 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