aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-06 17:31:50 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-06 17:31:50 +0000
commitb46d6c1c95e560bf21bd30758de80cc08b1992dd (patch)
tree5433da3edb3f6ff68596a29aaa71b22fc5b5da6d
parent9776eb58e079d5e6970e41e008ff4c2bf2bc1067 (diff)
Rearrange for scoping
-rw-r--r--lib/holes.el44
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/holes.el b/lib/holes.el
index f664a20d..3a2ca044 100644
--- a/lib/holes.el
+++ b/lib/holes.el
@@ -630,28 +630,6 @@ created. Return the number of holes created."
;;;###autoload
-(defun holes-abbrev-complete ()
- "Complete abbrev by putting holes and indenting.
-Moves point at beginning of expanded text. Put this function as
-call-back for your abbrevs, and just expanded \"#\" and \"@{..}\" will
-become holes."
- (if holes-mode
- (holes-replace-string-by-holes-backward-jump last-abbrev-location)))
-
-
-;;;###autoload
-(defun holes-insert-and-expand (s)
- "Insert S, expand it and replace #s and @{]s by holes."
- ;; insert the expansion of abbrev s, and replace #s by holes. It was
- ;; possible to implement it with a simple ((insert s) (expand-abbrev))
- ;; but undo would show the 2 steps, which is bad.
- (let ((pos (point))
- (ins (abbrev-expansion s)))
- (insert (or ins s))
- (setq last-abbrev-location pos)
- (holes-abbrev-complete)))
-
-;;;###autoload
(define-minor-mode holes-mode
"Toggle Holes minor mode.
With arg, turn Outline minor mode on if arg is positive, off otherwise.
@@ -746,6 +724,28 @@ undoing on holes cannot make holes re-appear."
(remove-hook 'skeleton-end-hook 'holes-skeleton-end-hook t)
(holes-clear-all-buffer-holes)))
+;;;###autoload
+(defun holes-abbrev-complete ()
+ "Complete abbrev by putting holes and indenting.
+Moves point at beginning of expanded text. Put this function as
+call-back for your abbrevs, and just expanded \"#\" and \"@{..}\" will
+become holes."
+ (if holes-mode
+ (holes-replace-string-by-holes-backward-jump last-abbrev-location)))
+
+
+;;;###autoload
+(defun holes-insert-and-expand (s)
+ "Insert S, expand it and replace #s and @{]s by holes."
+ ;; insert the expansion of abbrev s, and replace #s by holes. It was
+ ;; possible to implement it with a simple ((insert s) (expand-abbrev))
+ ;; but undo would show the 2 steps, which is bad.
+ (let ((pos (point))
+ (ins (abbrev-expansion s)))
+ (insert (or ins s))
+ (setq last-abbrev-location pos)
+ (holes-abbrev-complete)))
+
(provide 'holes)
;;; holes.el ends here