[Top][All Lists]

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

elisp macros problem

From: Lowell Kirsh
Subject: elisp macros problem
Date: Sat, 24 Jul 2004 11:39:36 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707

I am defining an emacs lisp macro to do:

(my-add-hook 'lisp

which should give:

(add-hook 'lisp-mode-hook
  (lambda () ...))

I have:

(defmacro my-add-hook (hook &rest body)
  (let ((tempvar (make-symbol "cat")))
    `(flet ((,tempvar (sym str)
                      (make-symbol (concat (symbol-name sym) str))))
       (add-hook (cat ,hook "-mode-hook") (lambda () ,@body)))))

Does anyone know what's wrong with this and why it doesn't work?


reply via email to

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