From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: kill ring menu Date: Thu, 9 May 2002 18:30:02 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200205100030.g4A0U2D06495@aztec.santafe.edu> References: <1020022891.27106.142.camel@space-ghost> <200204290505.g3T55t006146@aztec.santafe.edu> <1020059236.31789.358.camel@space-ghost> <200204300519.g3U5Js306727@aztec.santafe.edu> <1020320725.27616.54.camel@space-ghost> <200205031825.g43IPuD00768@aztec.santafe.edu> <1020502030.5286.25.camel@space-ghost> <200205051746.g45Hk5P01808@aztec.santafe.edu> <1020662101.5288.76.camel@space-ghost> <87helleq50.fsf@tc-1-100.kawasaki.gol.ne.jp> <1020725723.5138.127.camel@space-ghost> <1020743734.5288.153.camel@space-ghost> <200205072007.g47K7bv04781@aztec.santafe.edu> <1020803891.5288.198.camel@space-ghost> <200205090245.g492jBX05558@aztec.santafe.edu> <1020918483.1286.888.camel@space-ghost> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1020990839 15078 127.0.0.1 (10 May 2002 00:33:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 10 May 2002 00:33:59 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 175yMB-0003v5-00 for ; Fri, 10 May 2002 02:33:59 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 175yV1-0001dE-00 for ; Fri, 10 May 2002 02:43:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 175yLY-0007mq-00; Thu, 09 May 2002 20:33:20 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 175yIN-0007OP-00; Thu, 09 May 2002 20:30:03 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.9.3) with ESMTP id g4A0U2k11669; Thu, 9 May 2002 18:30:02 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g4A0U2D06495; Thu, 9 May 2002 18:30:02 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: walters@verbum.org In-Reply-To: <1020918483.1286.888.camel@space-ghost> (message from Colin Walters on 09 May 2002 00:28:03 -0400) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3792 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3792 An example of where this won't work is with an *Occur* buffer, if the user just wants to temporarily turn on/off fontification, but has killed the associated buffer(s). The occur command will fail in this case. A somewhat similar situation could happen with a *Kill Ring* buffer; if the user has done more killing before typing M-x font-lock-mode, then the entry they want to see unfontified could have been rotated off the kill ring. That is a good point. There needs to be a way for these modes to specify how to add and remove fonts in the buffer. But these should not have to use the whole font-lock-mode mechanism, even if they use M-x font-lock-mode as a control interface to enable and disable. It should be possible to specify other functions to do the job. The easiest way to implement these functions will often be to use a category property. Then these functions can simply change the properties of the category, and faces will appear or disappear all thru the buffer. In fact, it might make sense to have a buffer-local variable font-lock-category-alist whose elements look like (CATEGORY-SYMBOL . FACE-PROP). If that is non-nil, turning on font-lock-mode just does (dolist (elt font-lock-category-alist) (put (car elt) 'face (cdr elt))) and turning it off just does (dolist (elt font-lock-category-alist) (put (car elt) 'face nil))