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: Mon, 15 Sep 2008 00:54:46 +0200 Message-ID: References: <18fb6c75-7414-4372-8626-3b6e46f3580b@e39g2000hsf.googlegroups.com> <5934d5fa-e5dc-42b4-9e60-dfe7a3927a79@i20g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1221432933 30814 80.91.229.12 (14 Sep 2008 22:55:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Sep 2008 22:55:33 +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 Mon Sep 15 00:56:28 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 1Kf0W2-0003Sv-08 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Sep 2008 00:56:26 +0200 Original-Received: from localhost ([127.0.0.1]:41472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kf0V1-0002Sz-4C for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2008 18:55:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kf0Uj-0002SX-Vu for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 18:55:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kf0Uh-0002SB-TQ for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 18:55:05 -0400 Original-Received: from [199.232.76.173] (port=48900 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kf0Uh-0002S7-RI for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 18:55:03 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:45441) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kf0Uh-0004EB-Mi for help-gnu-emacs@gnu.org; Sun, 14 Sep 2008 18:55:03 -0400 Original-Received: from thursday (BAH549e.bah.pppool.de [77.135.84.158]) by dd18200.kasserver.com (Postfix) with ESMTP id A63781801D3E4; Mon, 15 Sep 2008 00:55:01 +0200 (CEST) In-Reply-To: (Davin Pearson's message of "Fri\, 12 Sep 2008 19\:57\:40 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/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:57596 Archived-At: Davin Pearson wrote: > I managed to get the following code to work: > >> (defadvice fundamental-mode (after my-remove-strings >> activate) >> =C2=A0 (if (eq major-mode 'fundamental- >> mode) >> =C2=A0 =C2=A0 =C2=A0 (set (make-variable-buffer-local 'font-lock-string-= face) nil))) Sorry that I missed that there's no `fundamental-mode-hook'. You can use `after-change-major-mode-hook' instead. You'll still need to test the major-mode variable the way you did. Also the right function is `make-local-variable', not `make-variable-buffer-local'. Sorry, I always mix those up. > I don't see the problem about using advice. I use advice all of the > time in Emacs. Advice can certainly do the job. But they are a very powerful tool that can break a lot of stuff, unless you're careful. Hooks are made for this very purpose, however. Some discussion about this is here: http://www.emacswiki.org/cgi-bin/wiki/AdviceVsHooks regards, Nikolaj Schumacher