From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Koppelman Newsgroups: gmane.emacs.devel Subject: Re: Changes to hi-lock before release. Date: Wed, 25 Apr 2007 10:18:06 -0500 Message-ID: <7wabwweb4h.fsf@ece.lsu.edu> References: <7wejmekgrd.fsf@ece.lsu.edu> <20070424223047.GA9455@muc.de> <7wfy6pfodu.fsf@ece.lsu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1177514308 8750 80.91.229.12 (25 Apr 2007 15:18:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2007 15:18:28 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 25 17:18:21 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HgjG9-00050x-7q for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2007 17:18:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgjLm-0004v1-7I for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2007 11:24:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HgjLj-0004um-1n for emacs-devel@gnu.org; Wed, 25 Apr 2007 11:24:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HgjLg-0004ua-HK for emacs-devel@gnu.org; Wed, 25 Apr 2007 11:24:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgjLg-0004uX-CV for emacs-devel@gnu.org; Wed, 25 Apr 2007 11:24:04 -0400 Original-Received: from ecelsrv1.ece.lsu.edu ([130.39.223.98]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HgjG1-0005EC-Lf; Wed, 25 Apr 2007 11:18:13 -0400 Original-Received: from localhost (unknown [127.0.0.1]) by ecelsrv1.ece.lsu.edu (Postfix) with ESMTP id 12A0E281C2; Wed, 25 Apr 2007 15:18:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at ece.lsu.edu Original-Received: from ecelsrv1.ece.lsu.edu ([127.0.0.1]) by localhost (ecelsrv1.ece.lsu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ExDShlk3vyub; Wed, 25 Apr 2007 10:18:12 -0500 (CDT) Original-Received: from nested.ece.lsu.edu (nested.ece.lsu.edu [130.39.222.143]) by ecelsrv1.ece.lsu.edu (Postfix) with ESMTP id 2D4A528160; Wed, 25 Apr 2007 10:18:12 -0500 (CDT) Original-Received: from nested.ece.lsu.edu (localhost.localdomain [127.0.0.1]) by nested.ece.lsu.edu (8.13.1/8.13.1) with ESMTP id l3PFI68h030393; Wed, 25 Apr 2007 10:18:06 -0500 Original-Received: (from koppel@localhost) by nested.ece.lsu.edu (8.13.1/8.13.1/Submit) id l3PFI6kj030392; Wed, 25 Apr 2007 10:18:06 -0500 In-Reply-To: (Richard Stallman's message of "Wed\, 25 Apr 2007 10\:51\:42 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70110 Archived-At: Richard Stallman writes: > Unsophisticated users don't usually put local variable bindings in > their files. And if they put in local variable bindings for Hi Lock mode, > I think that proves they are sophisticated. So I think we should > make the default `ask' for now. I was thinking of users so unsophisticated they could not even use custom to set hi-lock-file-patterns-policy to 'never. Here are two patches. Both make the default 'ask, the first one, which I prefer, also adds "(no is safe)" to the prompt. 2007-04-25 David Koppelman * hi-lock.el: (hi-lock-file-patterns-policy): Change default from 'never to 'ask; mention safety in custom text for function type. (hi-lock-find-patterns): Add "(no is safe)" to prompt. Index: hi-lock.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/hi-lock.el,v retrieving revision 1.44 diff -u -p -r1.44 hi-lock.el --- hi-lock.el 22 Apr 2007 16:52:29 -0000 1.44 +++ hi-lock.el 25 Apr 2007 15:08:19 -0000 @@ -124,7 +124,7 @@ calls." :type '(repeat symbol) :group 'hi-lock) -(defcustom hi-lock-file-patterns-policy 'never +(defcustom hi-lock-file-patterns-policy 'ask "Specify when hi-lock should use patterns found in file. If `ask', prompt when patterns found in buffer; if bound to a function, use patterns when function returns t (function is called with patterns @@ -132,7 +132,7 @@ as first argument); if nil or `never' or patterns." :type '(choice (const :tag "Do not use file patterns" never) (const :tag "Ask about file patterns" ask) - (function :tag "Function to check file patterns")) + (function :tag "Function to check safety of file patterns")) :group 'hi-lock :version "22.1") @@ -625,7 +625,8 @@ not suitable." ((functionp hi-lock-file-patterns-policy) (funcall hi-lock-file-patterns-policy all-patterns)) ((eq hi-lock-file-patterns-policy 'ask) - (y-or-n-p "Add patterns from this buffer to hi-lock? ")) + (y-or-n-p + "Add patterns from this buffer to hi-lock (no is safe)? ")) (t nil))) (hi-lock-set-file-patterns all-patterns) (if (interactive-p) *** Patch below same as one above except is does not add "(no is safe)" to prompt. 2007-04-25 David Koppelman * hi-lock.el: (hi-lock-file-patterns-policy): Change default from 'never to 'ask; mention safety in custom text for function type. Index: hi-lock.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/hi-lock.el,v retrieving revision 1.44 diff -u -p -r1.44 hi-lock.el --- hi-lock.el 22 Apr 2007 16:52:29 -0000 1.44 +++ hi-lock.el 25 Apr 2007 15:03:51 -0000 @@ -124,7 +124,7 @@ calls." :type '(repeat symbol) :group 'hi-lock) -(defcustom hi-lock-file-patterns-policy 'never +(defcustom hi-lock-file-patterns-policy 'ask "Specify when hi-lock should use patterns found in file. If `ask', prompt when patterns found in buffer; if bound to a function, use patterns when function returns t (function is called with patterns @@ -132,7 +132,7 @@ as first argument); if nil or `never' or patterns." :type '(choice (const :tag "Do not use file patterns" never) (const :tag "Ask about file patterns" ask) - (function :tag "Function to check file patterns")) + (function :tag "Function to check safety of file patterns")) :group 'hi-lock :version "22.1")