aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-05-10 09:12:40 +0000
committerRichard M. Stallman2005-05-10 09:12:40 +0000
commit4d9db685ef795001d85c5550bd36d993e0c9dde5 (patch)
tree3abce254994581c99814825777771bd6fb442861
parent7f2b9f61c577d8277966a9fc208a4600912c3635 (diff)
downloademacs-4d9db685ef795001d85c5550bd36d993e0c9dde5.tar.gz
emacs-4d9db685ef795001d85c5550bd36d993e0c9dde5.zip
(ada-adjust-case-skeleton): Moved from ada-stmt.el.
(ada-mode): Add ada-adjust-case-skeleton to skeleton-end-hook.
-rw-r--r--lisp/progmodes/ada-mode.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 818e58dd891..d31978b5ec9 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -1364,6 +1364,11 @@ If you use ada-xref.el:
1364 (add-hook 'local-write-file-hooks 1364 (add-hook 'local-write-file-hooks
1365 (lambda () (untabify (point-min) (point-max)))))) 1365 (lambda () (untabify (point-min) (point-max))))))
1366 1366
1367 (set (make-local-variable 'skeleton-further-elements)
1368 '((< '(backward-delete-char-untabify
1369 (min ada-indent (current-column))))))
1370 (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t)
1371
1367 (run-hooks 'ada-mode-hook) 1372 (run-hooks 'ada-mode-hook)
1368 1373
1369 ;; To be run after the hook, in case the user modified 1374 ;; To be run after the hook, in case the user modified
@@ -1393,6 +1398,13 @@ If you use ada-xref.el:
1393 (if ada-auto-case 1398 (if ada-auto-case
1394 (ada-activate-keys-for-case))) 1399 (ada-activate-keys-for-case)))
1395 1400
1401(defun ada-adjust-case-skeleton ()
1402 "Adjust the case of the text inserted by a skeleton."
1403 (save-excursion
1404 (let ((aa-end (point)))
1405 (ada-adjust-case-region
1406 (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point))
1407 (goto-char aa-end)))))
1396 1408
1397;; transient-mark-mode and mark-active are not defined in XEmacs 1409;; transient-mark-mode and mark-active are not defined in XEmacs
1398(defun ada-region-selected () 1410(defun ada-region-selected ()