help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: eval trouble


From: Lennart Borgman (gmail)
Subject: Re: eval trouble
Date: Mon, 25 Aug 2008 19:08:45 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Lennart Borgman (gmail) wrote:
> 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
> 
> then
> 
>    (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)))

It works if I replace make-symbol with intern. But why does eval care
about that?

>         (lighter (format "No %s" mode-sym))
>         (doc
>          (format
>         "MuMaMo replacement for the mode %s which was not found."
>           mode-sym)))
>     (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]