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

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

Re: [External] : Why I cannot use this variable in macro call from funct


From: Jean Louis
Subject: Re: [External] : Why I cannot use this variable in macro call from function?
Date: Tue, 8 Jun 2021 20:14:08 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

Major problem is that this does not behave how I expect it to behave:

(defvar (intern "my-function-123") nil)

(type-of 'my-function-123) ⇒ symbol

NOT WORKING:
(defvar 'my-function-123 nil)


(defvar (intern "my-function-123") nil):

Debugger entered--Lisp error: (wrong-type-argument symbolp (intern 
"my-function-123"))
  boundp((intern "my-function-123"))
  elisp--eval-defun-1((defvar (intern "my-function-123") nil))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Though it says that after `defvar' should come SYMBOL

defvar is a special form in ‘src/eval.c’.

(defvar SYMBOL &optional INITVALUE DOCSTRING)

  Probably introduced at or before Emacs version 1.5.

Define SYMBOL as a variable, and return SYMBOL.



-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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