From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Invalid face reference: quote Date: Mon, 20 Jun 2016 19:50:24 -0400 Organization: A noiseless patient Spider Message-ID: References: <0df9de35-c113-4a32-b05b-e5d1ec5a73a7@googlegroups.com> <1566ab5b-b35d-4e0e-be2c-0dffa0d3e1ee@googlegroups.com> <86ziqgwjxs.fsf@student.uu.se> <046c9b6d-8417-46b6-b446-892fd453d557@googlegroups.com> <86ziqftsmz.fsf@student.uu.se> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1466466946 17964 80.91.229.3 (20 Jun 2016 23:55:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 23:55:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 21 01:55:37 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bF92T-0000iU-Q4 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jun 2016 01:55:33 +0200 Original-Received: from localhost ([::1]:47152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF92N-00024w-Sc for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 19:55:27 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder.erje.net!2.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="3045"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Trf7TlOYRLGeFR4BS+0Ku" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:YZc2orJixhptOKcAScn4ujHVso4= Original-Xref: usenet.stanford.edu gnu.emacs.help:218235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110544 Archived-At: In article <86ziqftsmz.fsf@student.uu.se>, Emanuel Berg wrote: > Davin Pearson 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 ***