[Top][All Lists]

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

eval trouble

From: Lennart Borgman (gmail)
Subject: eval trouble
Date: Mon, 25 Aug 2008 18:56:53 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

I expected the code below to give me a function named
mumamo-repl4-my-own9-mode. It does not. Can someone please explain what
I am doing wrong?

Interestingly if I do describe-variable on xx and then use the shown value t

  (setq xx THE-SHOWN-VALUE


   (eval xx)

does what I want.

Here is the code that does NOT work:

(defun mumamo-define-no-mode (mode-sym)
  (let ((mumamo-repl4 (make-symbol (format "mumamo-repl4-%s" mode-sym)))
        (lighter (format "No %s" mode-sym))
          "MuMaMo replacement for the mode %s which was not found."
    (setq xx
      `(define-derived-mode ,mumamo-repl4 fundamental-mode ,lighter ,doc))
    (message "xx=%s" (pp-to-string xx))
    (eval xx)

(mumamo-define-no-mode 'my-own9-mode)

reply via email to

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