diff lisp/progmodes/ada-mode.el @ 83304:6fef25c75847

Merged from miles@gnu.org--gnu-2005 (patch 296-306) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-296 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-297 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-298 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-299 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-300 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-301 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-302 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-303 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-304 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-305 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-306 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-344
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 13 May 2005 22:59:23 +0000
parents 025da3ba778e 39b445ca202b
children 63b7247f4be6
line wrap: on
line diff
--- a/lisp/progmodes/ada-mode.el	Mon May 09 16:17:25 2005 +0000
+++ b/lisp/progmodes/ada-mode.el	Fri May 13 22:59:23 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 ()