From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lawrence Mitchell Newsgroups: gmane.emacs.bugs Subject: bug#3628: Python-Mode Ignores Global Font Lock Date: Mon, 22 Jun 2009 10:10:30 +0100 Organization: me Message-ID: References: Reply-To: Lawrence Mitchell , 3628@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1245662266 24248 80.91.229.12 (22 Jun 2009 09:17:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2009 09:17:46 +0000 (UTC) Cc: 3628@emacsbugs.donarmstrong.com To: "Sean B. Palmer" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 22 11:17:43 2009 Return-path: Envelope-to: geb-bug-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 1MIfel-0006RS-W5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2009 11:17:40 +0200 Original-Received: from localhost ([127.0.0.1]:53374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIfel-0006oF-5O for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2009 05:17:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIfee-0006oA-80 for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 05:17:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIfeX-0006mB-QF for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 05:17:30 -0400 Original-Received: from [199.232.76.173] (port=53173 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIfeX-0006lp-DY for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 05:17:25 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39262) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIfeW-0003tQ-Js for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2009 05:17:24 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5M9HMCl016698; Mon, 22 Jun 2009 02:17:22 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5M9F4IG015984; Mon, 22 Jun 2009 02:15:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Lawrence Mitchell Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 22 Jun 2009 09:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3628 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3628-submit@emacsbugs.donarmstrong.com id=B3628.124566184415540 (code B ref 3628); Mon, 22 Jun 2009 09:15:04 +0000 Original-Received: (at 3628) by emacsbugs.donarmstrong.com; 22 Jun 2009 09:10:44 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from treacle.ucs.ed.ac.uk (treacle.ucs.ed.ac.uk [129.215.16.102]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5M9AYpx015379 for <3628@emacsbugs.donarmstrong.com>; Mon, 22 Jun 2009 02:10:36 -0700 Original-Received: from wrath.ph.ed.ac.uk (wrath.ph.ed.ac.uk [129.215.73.7]) by treacle.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id n5M9AWrD001261; Mon, 22 Jun 2009 10:10:32 +0100 (BST) Original-Received: from lamacq.ph.ed.ac.uk (lamacq.ph.ed.ac.uk [129.215.72.156]) by wrath.ph.ed.ac.uk (8.13.8/8.12.10) with ESMTP id n5M9AVB1022140; Mon, 22 Jun 2009 10:10:32 +0100 Original-Received: from lamacq.ph.ed.ac.uk (localhost.localdomain [127.0.0.1]) by lamacq.ph.ed.ac.uk (8.13.8/8.12.10) with ESMTP id n5M9AVob017768; Mon, 22 Jun 2009 10:10:31 +0100 Original-Received: (from s0198183@localhost) by lamacq.ph.ed.ac.uk (8.13.8/8.13.8/Submit) id n5M9AUKB017764; Mon, 22 Jun 2009 10:10:30 +0100 X-Authentication-Warning: lamacq.ph.ed.ac.uk: s0198183 set sender to lawrence.mitchell@ed.ac.uk using -f In-Reply-To: (Sean B. Palmer's message of "Sat, 20 Jun 2009 16:46:58 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) X-Edinburgh-Scanned: at treacle.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus X-Scanned-By: MIMEDefang 2.60 on 129.215.16.102 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 22 Jun 2009 05:17:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28898 Archived-At: Sean B. Palmer wrote: > In my .emacs file I turn off global font lock: > (global-font-lock-mode 0) [...] > In emacs 23.0.95.1 (build details below), this no longer works for > Python files. That is to say, various *.py files that I've tested have > syntax highlighting ON when I edit them in emacs with a normal > command: > $ emacs example.py > $ emacs api.py > Perl and C files have syntax highlighting OFF, on the other hand. When > editing one of the Python files, syntax highlighting can be turned OFF > by using the following procedure: > M-x eval-expression > (global-font-lock-mode 0) > In other words, by evaluating the expression from my .emacs file > manually. On repeating the expression, syntax highlighting remains > OFF, so it is apparently not acting as a toggle. (global-font-lock-mode 0) only turns /off/ font lock | With prefix arg, turn Global-Font-Lock mode on if and only if | arg is positive. I.e., it's not acting as a toggle, but this is intended. [...] The overriding of user preference regarding font lock appears to be a deliberate change. A commit on Feb 21 2008 merges changes from Dave Love's python.el. | Author: Chong Yidong | Date: Thu Feb 21 17:03:47 2008 +0000 | Merge from Dave Love's 2008-01-20 version. These include: | (python-mode): Add python-pea-hook to pre-abbrev-expand-hook. Use | symbol-completion-try-complete for hippie expansion. Turn on font | lock unconditionally. Font-lock is used unconditionally in python buffers, I think, so that text properties marking strings and comments can be maintained with greater ease than otherwise. It appears to be a design decision. Cheers, Lawrence -- Lawrence Mitchell