[Top][All Lists]

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

Re: Invalid face reference: quote

From: Barry Margolin
Subject: Re: Invalid face reference: quote
Date: Mon, 20 Jun 2016 19:50:24 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <address@hidden>,
 Emanuel Berg <address@hidden> wrote:

> Davin Pearson <address@hidden> writes:
> >> Bingo. You see the face turns up as one of
> >> the properties of that piece of text.
> >
> > Thank you for your help with debugging my
> > code. I tried executing (thing-at-point
> > 'word) many times until I found the bug.
> Cool, no problem :)
> > (put-text-property (point-at-bol)
> > (point-at-eol) 'face' 'default)
> >
> > which should read as this:
> >
> > (put-text-property (point-at-bol)
> > (point-at-eol) 'face 'default)
> Wow, that bug was sure difficult to spot! I had
> to stare at the code for some 30 seconds before
> I saw it!

If you frequently switch between Lisp and other languages, you probably 
have to strain to get out of the mode of seeing single quotes as 
surrounding delimiters rather than just a prefix.

The Lisp parser sees that as

(put-text-property (point-at-bol)
  (point-at-eol) 'face ''default)

which explains the original error. ''default is short for '(quote 

Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

reply via email to

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