[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] (interactive) in a macro

From: Kelly McDonald
Subject: [h-e-w] (interactive) in a macro
Date: Wed, 18 Mar 2009 17:58:00 -0400


I am probably just doing something stupid:

I want to set up a bunch of interactive commands that are somewhat alike

here is a contrived example:

(defmacro deftext (functionname texttoinsert)
  `(defun ,(make-symbol (concatenate 'string "text-" functionname)) ()
     (insert-string ,texttoinsert)))

(deftext "swallow" "What is the flight speed velocity of a laden swallow?")

I would expect this to create an interactive function that I could
call text-swallow that inserts the bigger string.

if I macroexpand the macro, paste the results and evaluate that in the
buffer, I get exactly the function I want (for my contrived example),
but if I just evaluate the macro above, the function doesn't appear to
be interactive.

Kelly McDonald

reply via email to

[Prev in Thread] Current Thread [Next in Thread]