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

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

Re: Defining functions on the fly


From: Andreas Röhler
Subject: Re: Defining functions on the fly
Date: Mon, 15 Jun 2015 12:20:03 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 15.06.2015 um 11:47 schrieb Alexis:

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

Now every mode should get its own prefix. Can't write

(defun (concat "current-prefix-" foo) ())

as defun expects a symbol.

i'm probably misunderstanding you, but does:

   (defun (intern (concat "current-prefix-" foo) ...

do what you need?


Alexis.


Seems (intern... is not evaluated at this point:

(defvar pfxd "pfxd-")

(defun (intern (concat pfxd "-foo")) ())

-->

Debugger entered--Lisp error: (wrong-type-argument symbolp (intern (concat pfxd "-foo")))
  defalias((intern (concat pfxd "-foo")) (lambda nil nil))
eval((defalias (quote (intern (concat pfxd "-foo"))) (function (lambda nil nil))) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)




reply via email to

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