On 5/11/06, Richard Stallman <[EMAIL PROTECTED]> wrote:
> But there are also expressions in `allout.el' where no predefined
> predicate exists (AFAICS):
>
> allout-use-mode-specific-leader
> allout-reindent-bodies
> allout-layout
is it necessary to have a predefined predicate in all cases, or will
quoting the lambda be sufficient?
Quoting the lambda is sufficient.
i've attached a patch (allout-patch.txt), ChangeLog
(allout-ChangeLog.txt), and revised NEWS fragment (allout-NEWS.txt)
for allout that addresses the stuff we've been discussing, and a few
other things.
in the patch, any autoloaded safe-local-variables lambdas are quoted.
the patch also incorporates some of the other refinements that were
suggested in this discussion, though i am leaving the
safe-local-variable property assignments as active code (rather than
containing them in the autoload comment) and continuing to use a
lambda rather than booleanp. both of these measures will make it
easier to use allout in older emacs, without adding significant
complexity.
the patch also includes a few small fixes, including the start on
deprecating a poorly named hook variable. that last is the reason
thatm i'm including a new version of the fragment for the NEWS file,
which describes the deprecation and fixes a typo or two in the old
NEWS fragment.
the complete set of changes from the currently checked-in allout
version is described in the attached ChangeLog.
--
ken
[EMAIL PROTECTED]
http://myriadicity.net
2006-05-11 Ken Manheimer <[EMAIL PROTECTED]>
* allout.el: (allout-view-change-hook): Marked as being deprecated,
to be replaced by `allout-exposure-change-hook'.
(allout-exposure-change-hook): New, replacing
`allout-view-change-hook'.
(allout-flag-region): Run new hook `allout-exposure-change-hook',
in addition to `allout-view-change-hook'.
(allout-show-bodies, allout-old-style-prefixes)
(allout-stylish-prefixes, allout-use-hanging-indents): Quote the
lambda forms to prevent their showing up in variable help
presentations as inscrutable byte-compiled code.
(allout-numbered-bullet, allout-file-xref-bullet, allout-layout):
Use string-or-null-p to qualify safe-local-variable values.
(allout-reindent-bodies): Use memq to qualify matches against
valid safe-local-variable values. Also, quote the lambda as above.
(allout-use-mode-specific-leader): Add missing candidate-value
symbols, use memq, and quote the lambda.
(allout-overlay-interior-modification-handler): Remove unused
variables `msg' and 'opened'.
(allout-hidden-p): Constrain invisibility consideration to allout's
invisibility spec, disregarding invisibility for other reasons.
** Changes in Allout
*** Topic cryptography added, enabling easy gpg topic encryption and
decryption. Per-topic basis enables interspersing encrypted-text and
clear-text within a single file to your heart's content, using symmetric
and/or public key modes. Time-limited key caching, user-provided
symmetric key hinting and consistency verification, auto-encryption of
pending topics on save, and more, make it easy to use encryption in
powerful ways.
*** `allout-view-change-hook' marked as being deprecated - use
`allout-exposure-change-hook' instead. Both are currently being used, but
`allout-view-change-hook' will be ignored in a subsequent allout version.
*** Default command prefix changed to "\C-c " (control-c space), to avoid
intruding on user's keybinding space. Customize the
`allout-command-prefix' variable to your preference.
*** Allout now uses text overlay's `invisible' property (and others) for
concealed text, instead of selective-display. This simplifies the code, in
particular avoiding the need for kludges for isearch dynamic-display,
discretionary handling of edits of concealed text, undo concerns, etc.
*** Many substantial fixes and refinements, including:
- repaired inhibition of inadvertent edits to concealed text
- repaired retention of topic body hanging indent upon topic depth shifts
- refuse to create "containment discontinuities", where a
topic is shifted deeper than the offspring-depth of its' container
- bulleting variation is simpler and more accommodating, both in the
default behavior and in ability to vary when creating new topics
- many internal fixes and refinements
- many module and function docstring clarifications
- version number incremented to 2.2
Index: allout.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/allout.el,v
retrieving revision 1.74
diff -u -u -r1.74 allout.el
--- allout.el 28 Apr 2006 05:09:13 -0000 1.74
+++ allout.el 12 May 2006 14:46:26 -0000
@@ -199,7 +199,7 @@
(make-variable-buffer-local 'allout-show-bodies)
;;;###autoload
(put 'allout-show-bodies 'safe-local-variable
- (lambda (x) (member x '(t nil))))
+ '(lambda (x) (member x '(t nil))))
;;;_ = allout-header-prefix
(defcustom allout-header-prefix "."
@@ -316,7 +316,8 @@
:group 'allout)
;;;###autoload
(put 'allout-use-mode-specific-leader 'safe-local-variable
- (lambda (x) (or (member x '(t nil)) (stringp x))))
+ '(lambda (x) (or (memq x '(t nil allout-mode-leaders comment-start))
+ (stringp x))))
;;;_ = allout-mode-leaders
(defvar allout-mode-leaders '()
"Specific allout-prefix leading strings per major modes.
@@ -344,7 +345,7 @@
(make-variable-buffer-local 'allout-old-style-prefixes)
;;;###autoload
(put 'allout-old-style-prefixes 'safe-local-variable
- (lambda (x) (member x '(t nil))))
+ '(lambda (x) (member x '(t nil))))
;;;_ = allout-stylish-prefixes - alternating bullets
(defcustom allout-stylish-prefixes t
"*Do fancy stuff with topic prefix bullets according to level, etc.
@@ -393,7 +394,7 @@
(make-variable-buffer-local 'allout-stylish-prefixes)
;;;###autoload
(put 'allout-stylish-prefixes 'safe-local-variable
- (lambda (x) (member x '(t nil))))
+ '(lambda (x) (member x '(t nil))))
;;;_ = allout-numbered-bullet
(defcustom allout-numbered-bullet "#"
@@ -407,8 +408,7 @@
:group 'allout)
(make-variable-buffer-local 'allout-numbered-bullet)
;;;###autoload
-(put 'allout-numbered-bullet 'safe-local-variable
- (lambda (x) (or (not x) (stringp x))))
+(put 'allout-numbered-bullet 'safe-local-variable 'string-or-null-p)
;;;_ = allout-file-xref-bullet
(defcustom allout-file-xref-bullet "@"
"*Bullet signifying file cross-references, for `allout-resolve-xref'.
@@ -417,8 +417,7 @@
:type '(choice (const nil) string)
:group 'allout)
;;;###autoload
-(put 'allout-file-xref-bullet 'safe-local-variable
- (lambda (x) (or (not x) (stringp x))))
+(put 'allout-file-xref-bullet 'safe-local-variable 'string-or-null-p)
;;;_ = allout-presentation-padding
(defcustom allout-presentation-padding 2
"*Presentation-format white-space padding factor, for greater indent."
@@ -621,7 +620,7 @@
(make-variable-buffer-local 'allout-use-hanging-indents)
;;;###autoload
(put 'allout-use-hanging-indents 'safe-local-variable
- (lambda (x) (member x '(t nil))))
+ '(lambda (x) (member x '(t nil))))
;;;_ = allout-reindent-bodies
(defcustom allout-reindent-bodies (if allout-use-hanging-indents
@@ -641,7 +640,7 @@
(make-variable-buffer-local 'allout-reindent-bodies)
;;;###autoload
(put 'allout-reindent-bodies 'safe-local-variable
- (lambda (x) (member x '(nil t text force))))
+ '(lambda (x) (memq x '(nil t text force))))
;;;_ = allout-enable-file-variable-adjustment
(defcustom allout-enable-file-variable-adjustment t
@@ -708,8 +707,7 @@
(make-variable-buffer-local 'allout-layout)
;;;###autoload
(put 'allout-layout 'safe-local-variable
- (lambda (x) (or (numberp x) (listp x) (integerp x)
- (member x '(: * + -)))))
+ '(lambda (x) (or (numberp x) (listp x) (memq x '(: * + -)))))
;;;_ : Topic header format
;;;_ = allout-regexp
@@ -1064,9 +1062,19 @@
;;;_ = allout-overlay-category
(defvar allout-overlay-category nil
"Symbol for use in allout invisible-text overlays as the category.")
-;;;_ = allout-view-change-hook
+;;;_ x allout-view-change-hook
(defvar allout-view-change-hook nil
- "*Hook that's run after allout outline visibility changes.")
+ "*\(Deprecated\) Hook that's run after allout outline exposure changes.
+
+Switch to using `allout-exposure-change-hook' instead. Both
+variables are currently used if populated, but this one will be
+ignored in a subsequent allout version.")
+;;;_ = allout-exposure-change-hook
+(defvar allout-exposure-change-hook nil
+ "*Hook that's run after allout outline exposure changes.
+
+This variable will replace `allout-view-change-hook' in a subsequent allout
+version, though both are currently checked and used, if populated.")
;;;_ = allout-outside-normal-auto-fill-function
(defvar allout-outside-normal-auto-fill-function nil
@@ -1727,7 +1735,7 @@
;;;_ > allout-hidden-p (&optional pos)
(defsubst allout-hidden-p (&optional pos)
"Non-nil if the character after point is invisible."
- (get-char-property (or pos (point)) 'invisible))
+ (eq (get-char-property (or pos (point)) 'invisible) 'allout))
;;;_ > allout-overlay-insert-in-front-handler (ol after beg end
;;; &optional prelen)
@@ -3831,7 +3839,8 @@
(let ((props (symbol-plist 'allout-overlay-category)))
(while props
(overlay-put o (pop props) (pop props)))))))
- (run-hooks 'allout-view-change-hook))
+ (run-hooks 'allout-view-change-hook)
+ (run-hooks 'allout-exposure-change-hook))
;;;_ > allout-flag-current-subtree (flag)
(defun allout-flag-current-subtree (flag)
"Conceal currently-visible topic's subtree if FLAG non-nil, else reveal it."
@@ -5888,7 +5897,6 @@
(or (memq prop buffer-invisibility-spec)
(assq prop buffer-invisibility-spec))))))
-
;;;_ #10 Unfinished
;;;_ > allout-bullet-isearch (&optional bullet)
(defun allout-bullet-isearch (&optional bullet)
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug