X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/c828ee6d19b57256e1fa2321dc830fe5a6cf8af1..23a624ca1d40fa9cefd7229ac6152b79278a6517:/packages/ada-mode/ada-skel.el diff --git a/packages/ada-mode/ada-skel.el b/packages/ada-mode/ada-skel.el old mode 100755 new mode 100644 index a6216c174..95442226e --- a/packages/ada-mode/ada-skel.el +++ b/packages/ada-mode/ada-skel.el @@ -109,6 +109,10 @@ This could end in a token recognized by `ada-skel-expand'." ) +;; override ada-mode 4.01 autoloaded functions +(define-obsolete-function-alias 'ada-header 'ada-skel-header "24.4" + "Insert a descriptive header at the top of the file.") + ;;;;; Ada skeletons (alphabetical) (define-skeleton ada-skel-accept @@ -145,7 +149,7 @@ This could end in a token recognized by `ada-skel-expand'." (define-skeleton ada-skel-for "Insert a for loop statement with an optional name (from `str')." () - str & ":\n" + str & " :\n" "for " _ " loop\n" "end loop " str | -1 ";") @@ -419,7 +423,7 @@ it is a name, and use the word before that as the token." (progn (ada-skel-expand) t) - ('error + (error ;; undo hook action if any (unless (or (eq 't pending-undo-list) (= undo-len (length pending-undo-list))) @@ -429,6 +433,15 @@ it is a name, and use the word before that as the token." (goto-char pos) nil))))) +(defun ada-skel-next-placeholder () + "Move point to after next placeholder." + (skip-syntax-forward "^!") + (skip-syntax-forward "w!")) + +(defun ada-skel-prev-placeholder () + "Move point to after previous placeholder." + (skip-syntax-backward "^!")) + (defun ada-skel-setup () "Setup a buffer for ada-skel." (add-hook 'skeleton-end-hook 'ada-indent-statement nil t) @@ -441,6 +454,8 @@ it is a name, and use the word before that as the token." (provide 'ada-skel) (setq ada-expand 'ada-skel-expand) +(setq ada-next-placeholder 'ada-skel-next-placeholder) +(setq ada-prev-placeholder 'ada-skel-prev-placeholder) (add-hook 'ada-mode-hook 'ada-skel-setup)