Sign in
Google apps
Main menu
Post a Comment On:
fisch im wasser
"defmacro insert-pair"
No comments yet. -
1 – 0 of 0
Would a function with a optional parameter be better? (defmacro insert-pair (name char1 char2) "Creates function name which is Like insert-parenthesis, but inserts char char2 instead of parenthesis " `(defun ,name (arg) (interactive "P") (if arg (setq arg (prefix-numeric-value arg)) (setq arg 0)) (cond ((> arg 0) (skip-chars-forward " \t")) ((< arg 0) (forward-sexp arg) (setq arg (- arg)))) (insert ,char1) (save-excursion (or (eq arg 0) (forward-word arg)) (insert ,char2)))) (insert-pair insert-brackets "[" "]") (global-set-key "\M-[" 'insert-brackets)
posted by Engelke at
14:23
on 7 Jul 2004
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
Comments on this blog are restricted to team members.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"defmacro insert-pair"
No comments yet. -