all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: Invalid face reference: quote
Date: Mon, 20 Jun 2016 19:50:24 -0400	[thread overview]
Message-ID: <barmar-C468E1.19502420062016@88-209-239-213.giganet.hu> (raw)
In-Reply-To: 86ziqftsmz.fsf@student.uu.se

In article <86ziqftsmz.fsf@student.uu.se>,
 Emanuel Berg <embe8573@student.uu.se> wrote:

> Davin Pearson <davin.pearson@gmail.com> 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 
default).

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


  reply	other threads:[~2016-06-20 23:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19  0:19 Invalid face reference: quote Davin Pearson
2016-06-19 14:10 ` Emanuel Berg
2016-06-19 17:11 ` Pascal J. Bourguignon
2016-06-20  4:20   ` Davin Pearson
2016-06-20  4:41     ` Davin Pearson
2016-06-20  3:27 ` Stefan Monnier
     [not found] ` <mailman.1844.1466393286.1216.help-gnu-emacs@gnu.org>
2016-06-20  4:17   ` Davin Pearson
2016-06-20  4:41     ` Emanuel Berg
2016-06-20 21:51       ` Davin Pearson
2016-06-20 22:14         ` Emanuel Berg
2016-06-20 23:50           ` Barry Margolin [this message]
     [not found] ` <mailman.1799.1466345449.1216.help-gnu-emacs@gnu.org>
2016-06-20  4:30   ` Davin Pearson
2016-06-20  4:47     ` Emanuel Berg
2016-06-20  4:58       ` Davin Pearson
2016-06-20  5:07         ` Davin Pearson
2016-06-20  9:51           ` Emanuel Berg
2016-06-20 13:28             ` Loris Bennett
2016-06-20 14:24               ` Emanuel Berg
2016-06-20 14:53                 ` Loris Bennett
2016-06-20 21:24                   ` my experience with eye problems (was: Re: Invalid face reference: quote) Emanuel Berg
2016-06-20 21:39                     ` Emanuel Berg
2016-06-20 14:01           ` Invalid face reference: quote Dan Espen
2016-06-20 10:10         ` Emanuel Berg
  -- strict thread matches above, loose matches on Subject: below --
2016-06-06 23:46 Davin Pearson
2016-06-06 23:48 ` Barry Margolin
2016-06-07  8:01   ` Davin Pearson

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

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

  git send-email \
    --in-reply-to=barmar-C468E1.19502420062016@88-209-239-213.giganet.hu \
    --to=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.