From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Trying to disable the fontification of strings in fundamental-mode Date: Fri, 12 Sep 2008 10:57:10 +0200 Message-ID: References: <18fb6c75-7414-4372-8626-3b6e46f3580b@e39g2000hsf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221209882 17899 80.91.229.12 (12 Sep 2008 08:58:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Sep 2008 08:58:02 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Davin Pearson Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 12 10:58:57 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ke4UT-0006Jc-CX for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Sep 2008 10:58:57 +0200 Original-Received: from localhost ([127.0.0.1]:35766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ke4TT-0007F1-7c for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Sep 2008 04:57:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ke4Sr-00076b-S1 for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 04:57:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ke4Sq-00075Z-Go for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 04:57:17 -0400 Original-Received: from [199.232.76.173] (port=50299 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ke4Sq-00075G-BH for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 04:57:16 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:40388) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ke4Sq-0006s7-6a for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 04:57:16 -0400 Original-Received: from thursday (BAH41aa.bah.pppool.de [77.135.65.170]) by dd18200.kasserver.com (Postfix) with ESMTP id D4E3418079980; Fri, 12 Sep 2008 10:57:13 +0200 (CEST) In-Reply-To: <18fb6c75-7414-4372-8626-3b6e46f3580b@e39g2000hsf.googlegroups.com> (Davin Pearson's message of "Thu\, 11 Sep 2008 21\:30\:55 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57469 Archived-At: Davin Pearson wrote: > What do I need to do to restrict the suppressing of the fontification > of strings to just fundamental mode? First of all, don't use advice for this! Use hooks, which are cleaner and safer. Second of all, setq changes the variable globally, so naturally it is disabled everywhere. You need to make the variable buffer-local. (defun my-fundamental-mode-hook () (set (make-variable-buffer-local 'font-lock-string-face) nil)) (add-hook 'fundamental-mode-hook 'my-fundamental-mode-hook) regards, Nikolaj Schumacher