Mercurial > emacs
changeset 62213:39b445ca202b
(ada-adjust-case-skeleton): Moved from ada-stmt.el.
(ada-mode): Add ada-adjust-case-skeleton to skeleton-end-hook.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 10 May 2005 09:12:40 +0000 |
parents | ad6e77659287 |
children | e451c7eb2d24 |
files | lisp/progmodes/ada-mode.el |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/ada-mode.el Tue May 10 09:11:43 2005 +0000 +++ b/lisp/progmodes/ada-mode.el Tue May 10 09:12:40 2005 +0000 @@ -1364,6 +1364,11 @@ (add-hook 'local-write-file-hooks (lambda () (untabify (point-min) (point-max)))))) + (set (make-local-variable 'skeleton-further-elements) + '((< '(backward-delete-char-untabify + (min ada-indent (current-column)))))) + (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t) + (run-hooks 'ada-mode-hook) ;; To be run after the hook, in case the user modified @@ -1393,6 +1398,13 @@ (if ada-auto-case (ada-activate-keys-for-case))) +(defun ada-adjust-case-skeleton () + "Adjust the case of the text inserted by a skeleton." + (save-excursion + (let ((aa-end (point))) + (ada-adjust-case-region + (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 ()