[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changes to hi-lock before release.
From: |
David Koppelman |
Subject: |
Re: Changes to hi-lock before release. |
Date: |
Wed, 25 Apr 2007 10:18:06 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux) |
Richard Stallman <address@hidden> 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 <address@hidden>
* 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 <address@hidden>
* 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")
Re: Changes to hi-lock before release., Alan Mackenzie, 2007/04/24