[Top][All Lists]

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

Re: Why "symbol's value" error about a list?

From: Alan Mackenzie
Subject: Re: Why "symbol's value" error about a list?
Date: Mon, 5 Feb 2018 20:35:44 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Richard.

On Sun, Feb 04, 2018 at 20:06:39 -0500, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]

>   > For example, suppose you have a Lisp program that produces the
>   > following error message when compiled/executed:

>   >   Symbol's value as variable is void: 'аbbrevs-changed

> Does that error message really happen?  If so, how can I reproduce it?

In Emacs-25.3 -Q, do

    M-: (message "(setq foo 'bar)") RET

, followed by getting the output from *Messages* into the kill ring with
M-w, followed by

    M-: C-y RET

.  You might think you are executing (setq foo 'bar).  You're not.
You're executing (setq foo ’bar), where the ’ is a Unicode curly quote.

The error message given out is:

    Symbol's value as variable is void: ’bar

.  If you're like me, you will read that as the symbol "bar" is void,
rather than the symbol "’bar" is void.

This is a result of the change in `message', silently to convert ' to a
curly quote, by default.  Some of us were unhappy at this change and
protested against it.

> I understand that the character 'а' is not ASCII a.  That explains why
> 'аbbrevs-changed' is not known as a variable.  But I'm talking about
> a different issue, which has nothing to do with character coding.

> Suppose it were 'foobaz', all ASCII, and we got an error such as

>   >   Symbol's value as variable is void: 'foobaz

> That still seems wrong.

Again "’foobaz", not "foobaz" is the symbol, here.

> If the error was that foobaz was void, the error message should not
> include a quote.  It should say

>   >   Symbol's value as variable is void: foobaz


> Or if the error was that 'foobaz is used instead of a symbol, the error
> message should say

>   >   Wrong type argument: symbolp, (quote foobaz)

In the recent pretest, Emacs-26.0.91, when a curly quote appears at the
start of a symbol, the reader rejects it, giving the error message:

    read--expression: Invalid read syntax: "strange quote", "'"

.  This is somewhat controversional, and is what the recent discussion
has been about.

> -- 
> Dr Richard Stallman
> President, Free Software Foundation (https://gnu.org, https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
> Skype: No way! See https://stallman.org/skype.html.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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