[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: cond construct for situation when a variable is t
From: |
Drew Adams |
Subject: |
RE: [External] : Re: cond construct for situation when a variable is t |
Date: |
Wed, 23 Aug 2023 19:49:45 +0000 |
> >> Right, because one can set the letter t to something which
> >> would then screw up the idea that t means
> >> a truth condition.
> >
> > (setq t 42)
> >
> > Debugger entered--Lisp error: (setting-constant t)
> > signal(setting-constant (t))
> > (progn (signal 'setting-constant (list 't)))
> > (progn (progn (signal 'setting-constant (list 't))))
> > elisp--eval-last-sexp(nil)
> > eval-last-sexp(nil)
> > funcall-interactively(eval-last-sexp nil)
> > command-execute(eval-last-sexp)
> >
> > And `t' is not a "letter" here; it's a _symbol_ whose name
> > is "t".
>
> Okay, so they don't allow that anymore. Good, I guess.
Anymore? It's true at least as far back as Emacs 20:
Signaling: (setting-constant t)
(setq t 42)
eval((setq t 42))
eval-last-sexp((4))
call-interactively(eval-last-sexp)
You can't even try to get around it by first
unsetting `t':
(makunbound 't)
Debugger entered--Lisp error: (setting-constant t)
makunbound(t)
(progn (makunbound 't))
elisp--eval-last-sexp((4))
eval-last-sexp((4))
funcall-interactively(eval-last-sexp (4))
command-execute(eval-last-sexp)
> Or maybe I did it in another way than using `setq', I say this
> because I remember it very well that suddenly nothing worked.
`M-x report-emacs-bug'