all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Koppelman <koppel@ece.lsu.edu>
To: rms@gnu.org
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: Changes to hi-lock before release.
Date: Wed, 25 Apr 2007 10:18:06 -0500	[thread overview]
Message-ID: <7wabwweb4h.fsf@ece.lsu.edu> (raw)
In-Reply-To: <E1HgiqM-0003I5-Rf@fencepost.gnu.org> (Richard Stallman's message of "Wed\, 25 Apr 2007 10\:51\:42 -0400")

Richard Stallman <rms@gnu.org> 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  <koppel@ece.lsu.edu>

	* 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  <koppel@ece.lsu.edu>

	* 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")

  reply	other threads:[~2007-04-25 15:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20 19:06 Changes to hi-lock before release David Koppelman
2007-04-20 19:29 ` Chong Yidong
2007-04-21  9:20   ` Eli Zaretskii
2007-04-21 10:12     ` Johan Bockgård
2007-04-21 18:25       ` Richard Stallman
2007-04-21 19:26         ` Chong Yidong
2007-04-22  3:13           ` Eli Zaretskii
     [not found] ` <E1HfGbN-0006PL-IH@fencepost.gnu.org>
2007-04-21 17:32   ` Chong Yidong
2007-04-22  0:46     ` Richard Stallman
2007-04-22  1:47       ` Glenn Morris
2007-04-23  3:48         ` Richard Stallman
2007-04-22  0:46     ` Richard Stallman
2007-04-22  2:45       ` Chong Yidong
2007-04-23  3:47         ` Richard Stallman
2007-04-23 14:39           ` Chong Yidong
2007-04-24 21:10 ` Alan Mackenzie
2007-04-24 21:34   ` David Koppelman
2007-04-25 11:53     ` Changes to hi-lock before release. PATCH Alan Mackenzie
2007-04-25 14:51     ` Changes to hi-lock before release Richard Stallman
2007-04-25 15:18       ` David Koppelman [this message]
2007-04-27  5:59         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7wabwweb4h.fsf@ece.lsu.edu \
    --to=koppel@ece.lsu.edu \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.