comparison lisp/progmodes/ada-mode.el @ 87401:5c852af4e53c

(ada-region-selected): Use `use-region-p'.
author Richard M. Stallman <rms@gnu.org>
date Tue, 25 Dec 2007 22:47:03 +0000
parents e52cb6ef60ec
children 0c4a74c24677 56a72e2bd635
comparison
equal deleted inserted replaced
87400:f5538ebc9577 87401:5c852af4e53c
1394 (let ((aa-end (point))) 1394 (let ((aa-end (point)))
1395 (ada-adjust-case-region 1395 (ada-adjust-case-region
1396 (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point)) 1396 (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point))
1397 (goto-char aa-end))))) 1397 (goto-char aa-end)))))
1398 1398
1399 ;; transient-mark-mode and mark-active are not defined in XEmacs
1400 (defun ada-region-selected () 1399 (defun ada-region-selected ()
1401 "Return t if a region has been selected by the user and is still active." 1400 "Should we operate on an active region?"
1402 (if (featurep 'xemacs) 1401 (if (fboundp 'use-region-p)
1403 (region-active-p) 1402 (use-region-p)
1404 (and transient-mark-mode mark-active))) 1403 (region-active-p)))
1405
1406 1404
1407 ;;----------------------------------------------------------------- 1405 ;;-----------------------------------------------------------------
1408 ;; auto-casing 1406 ;; auto-casing
1409 ;; Since Ada is case-insensitive, the Ada mode provides an extensive set of 1407 ;; Since Ada is case-insensitive, the Ada mode provides an extensive set of
1410 ;; functions to auto-case identifiers, keywords, ... 1408 ;; functions to auto-case identifiers, keywords, ...