unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Emanuel Berg <incal@dataswamp.org>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: cond construct for situation when a variable is t
Date: Wed, 23 Aug 2023 19:49:45 +0000	[thread overview]
Message-ID: <SJ0PR10MB548805B020C9858E63691555F31CA@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <874jkq98m0.fsf@dataswamp.org>

> >> 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'



  reply	other threads:[~2023-08-23 19:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 14:00 cond construct for situation when a variable is t Heime
2023-08-19 22:04 ` Emanuel Berg
2023-08-22 12:18   ` Heime
2023-08-22 16:10     ` [External] : " Drew Adams
2023-08-22 19:31       ` Emanuel Berg
2023-08-23 19:49         ` Drew Adams [this message]
2023-08-22 19:29     ` Emanuel Berg
2023-08-22 12:32   ` Heime
2023-08-22 16:17     ` [External] : " Drew Adams
2023-08-22 20:21       ` Heime
2023-08-22 21:07         ` Drew Adams
2023-08-19 22:43 ` Rudolf Adamkovič

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB548805B020C9858E63691555F31CA@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=incal@dataswamp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).