comparison 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
comparison
equal deleted inserted replaced
83303:108e45fdcdbd 83304:6fef25c75847
1362 (add-hook 'local-write-file-hooks 'delete-trailing-whitespace) 1362 (add-hook 'local-write-file-hooks 'delete-trailing-whitespace)
1363 ;; convert all tabs to the correct number of spaces. 1363 ;; convert all tabs to the correct number of spaces.
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
1370 ;; ada-fill-comment-prefix 1375 ;; ada-fill-comment-prefix
1371 (make-local-variable 'comment-start) 1376 (make-local-variable 'comment-start)
1391 (setq ada-keywords ada-95-keywords))) 1396 (setq ada-keywords ada-95-keywords)))
1392 1397
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 ()
1399 "t if a region has been selected by the user and is still active." 1411 "t if a region has been selected by the user and is still active."
1400 (or (and (featurep 'xemacs) (funcall (symbol-function 'region-active-p))) 1412 (or (and (featurep 'xemacs) (funcall (symbol-function 'region-active-p)))