]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/ada-mode/ada-skel.el
publish ada-mode 5.1.6, wisi 1.0.6, new package ada-ref-man
[gnu-emacs-elpa] / packages / ada-mode / ada-skel.el
index a6216c174252e89df640191948eb30d2ec8c3ec6..48e6b3205b3bc56ddb91e3ea8d2bafb82037a00e 100644 (file)
@@ -145,7 +145,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 ";")
 
@@ -429,6 +429,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 +450,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)