ยป On Wed, Sep 07, 2005 at 11:47AM -0600, Kevin Rodgers wrote: > If you have many such functions, you'd want to abstract the common parts > with a function-defining macro: > > (defmacro define-my-insert (name char) > "Define the `my-NAME' command, to insert CHAR." > `(defun ,(intern (format "my-%s" name)) (&optional arg) > ,(format "Insert \"%c\" at point. > With a prefix ARG, insert that many characters." > char) > (interactive "p") > (insert-char ,char (or arg 1)))) > > (define-my-insert four ?4) > (define-my-insert dollar ?$)
That's great! Thanks a lot! Cheers, Francisco. _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs