Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; the indention-thing needs refining
- (defun pm-if ()
- "generates if stub"
- (interactive)
- (insert "if () {")
- (indent-according-to-mode)
- (newline)
- (indent-according-to-mode)
- (newline)
- (indent-according-to-mode)
- (insert "} /* endif */")
- (indent-according-to-mode)
- (newline)
- (indent-according-to-mode)
- (previous-line 3)
- (end-of-line)
- (goto-char (- (point) 3))
- )
- ;; bind it to CTRL-c i
- (define-key Ctl-C-keymap "i" 'pm-if)
Add Comment
Please, Sign In to add comment