aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReiner Steib2006-05-16 10:01:32 +0000
committerReiner Steib2006-05-16 10:01:32 +0000
commit64686e6da6819719db0094619e0b3d7b52dfc4c4 (patch)
treec90f7e4f5acb1f3ffe7fc105514a2bc47d581818
parent2e8457a0046f0a3e044e54a8d947257136cb7b04 (diff)
downloademacs-64686e6da6819719db0094619e0b3d7b52dfc4c4.tar.gz
emacs-64686e6da6819719db0094619e0b3d7b52dfc4c4.zip
2006-05-16 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el (allout-show-bodies, allout-old-style-prefixes) (allout-stylish-prefixes, allout-numbered-bullet) (allout-file-xref-bullet, allout-use-hanging-indents): Use simple predicates to qualify `safe-local-variable' property, when available, else use equivalent lambda. (allout-current-topic-collapsed-p): Do the right thing regarding trailing blank lines.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/allout.el48
2 files changed, 36 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4e9968c0d35..4150e1d3adb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12006-05-16 Ken Manheimer <ken.manheimer@gmail.com>
2
3 * allout.el (allout-show-bodies, allout-old-style-prefixes)
4 (allout-stylish-prefixes, allout-numbered-bullet)
5 (allout-file-xref-bullet, allout-use-hanging-indents): Use simple
6 predicates to qualify `safe-local-variable' property, when
7 available, else use equivalent lambda.
8 (allout-current-topic-collapsed-p): Do the right thing regarding
9 trailing blank lines.
10
12006-05-16 Stefan Monnier <monnier@iro.umontreal.ca> 112006-05-16 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * server.el (server-start): Only create a directory if needed. 13 * server.el (server-start): Only create a directory if needed.
diff --git a/lisp/allout.el b/lisp/allout.el
index 9166ef33078..d6955c52cdf 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -199,7 +199,7 @@ just the header."
199(make-variable-buffer-local 'allout-show-bodies) 199(make-variable-buffer-local 'allout-show-bodies)
200;;;###autoload 200;;;###autoload
201(put 'allout-show-bodies 'safe-local-variable 201(put 'allout-show-bodies 'safe-local-variable
202 '(lambda (x) (member x '(t nil)))) 202 (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil)))))
203 203
204;;;_ = allout-header-prefix 204;;;_ = allout-header-prefix
205(defcustom allout-header-prefix "." 205(defcustom allout-header-prefix "."
@@ -345,7 +345,7 @@ are always respected by the topic maneuvering functions."
345(make-variable-buffer-local 'allout-old-style-prefixes) 345(make-variable-buffer-local 'allout-old-style-prefixes)
346;;;###autoload 346;;;###autoload
347(put 'allout-old-style-prefixes 'safe-local-variable 347(put 'allout-old-style-prefixes 'safe-local-variable
348 '(lambda (x) (member x '(t nil)))) 348 (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil)))))
349;;;_ = allout-stylish-prefixes - alternating bullets 349;;;_ = allout-stylish-prefixes - alternating bullets
350(defcustom allout-stylish-prefixes t 350(defcustom allout-stylish-prefixes t
351 "*Do fancy stuff with topic prefix bullets according to level, etc. 351 "*Do fancy stuff with topic prefix bullets according to level, etc.
@@ -394,7 +394,7 @@ is non-nil."
394(make-variable-buffer-local 'allout-stylish-prefixes) 394(make-variable-buffer-local 'allout-stylish-prefixes)
395;;;###autoload 395;;;###autoload
396(put 'allout-stylish-prefixes 'safe-local-variable 396(put 'allout-stylish-prefixes 'safe-local-variable
397 '(lambda (x) (member x '(t nil)))) 397 (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil)))))
398 398
399;;;_ = allout-numbered-bullet 399;;;_ = allout-numbered-bullet
400(defcustom allout-numbered-bullet "#" 400(defcustom allout-numbered-bullet "#"
@@ -408,7 +408,10 @@ disables numbering maintenance."
408 :group 'allout) 408 :group 'allout)
409(make-variable-buffer-local 'allout-numbered-bullet) 409(make-variable-buffer-local 'allout-numbered-bullet)
410;;;###autoload 410;;;###autoload
411(put 'allout-numbered-bullet 'safe-local-variable 'string-or-null-p) 411(put 'allout-numbered-bullet 'safe-local-variable
412 (if (fboundp 'string-or-null-p)
413 'string-or-null-p
414 '(lambda (x) (or (stringp x) (null x)))))
412;;;_ = allout-file-xref-bullet 415;;;_ = allout-file-xref-bullet
413(defcustom allout-file-xref-bullet "@" 416(defcustom allout-file-xref-bullet "@"
414 "*Bullet signifying file cross-references, for `allout-resolve-xref'. 417 "*Bullet signifying file cross-references, for `allout-resolve-xref'.
@@ -417,7 +420,10 @@ Set this var to the bullet you want to use for file cross-references."
417 :type '(choice (const nil) string) 420 :type '(choice (const nil) string)
418 :group 'allout) 421 :group 'allout)
419;;;###autoload 422;;;###autoload
420(put 'allout-file-xref-bullet 'safe-local-variable 'string-or-null-p) 423(put 'allout-file-xref-bullet 'safe-local-variable
424 (if (fboundp 'string-or-null-p)
425 'string-or-null-p
426 '(lambda (x) (or (stringp x) (null x)))))
421;;;_ = allout-presentation-padding 427;;;_ = allout-presentation-padding
422(defcustom allout-presentation-padding 2 428(defcustom allout-presentation-padding 2
423 "*Presentation-format white-space padding factor, for greater indent." 429 "*Presentation-format white-space padding factor, for greater indent."
@@ -620,7 +626,7 @@ where auto-fill occurs."
620(make-variable-buffer-local 'allout-use-hanging-indents) 626(make-variable-buffer-local 'allout-use-hanging-indents)
621;;;###autoload 627;;;###autoload
622(put 'allout-use-hanging-indents 'safe-local-variable 628(put 'allout-use-hanging-indents 'safe-local-variable
623 '(lambda (x) (member x '(t nil)))) 629 (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil)))))
624 630
625;;;_ = allout-reindent-bodies 631;;;_ = allout-reindent-bodies
626(defcustom allout-reindent-bodies (if allout-use-hanging-indents 632(defcustom allout-reindent-bodies (if allout-use-hanging-indents
@@ -1067,14 +1073,14 @@ from the list."
1067 "*\(Deprecated\) Hook that's run after allout outline exposure changes. 1073 "*\(Deprecated\) Hook that's run after allout outline exposure changes.
1068 1074
1069Switch to using `allout-exposure-change-hook' instead. Both 1075Switch to using `allout-exposure-change-hook' instead. Both
1070variables are currently used if populated, but this one will be 1076variables are currently respected, but this one will be ignored
1071ignored in a subsequent allout version.") 1077in a subsequent allout version.")
1072;;;_ = allout-exposure-change-hook 1078;;;_ = allout-exposure-change-hook
1073(defvar allout-exposure-change-hook nil 1079(defvar allout-exposure-change-hook nil
1074 "*Hook that's run after allout outline exposure changes. 1080 "*Hook that's run after allout outline exposure changes.
1075 1081
1076This variable will replace `allout-view-change-hook' in a subsequent allout 1082This variable will replace `allout-view-change-hook' in a subsequent allout
1077version, though both are currently checked and used, if populated.") 1083version, though both are currently respected.")
1078 1084
1079;;;_ = allout-outside-normal-auto-fill-function 1085;;;_ = allout-outside-normal-auto-fill-function
1080(defvar allout-outside-normal-auto-fill-function nil 1086(defvar allout-outside-normal-auto-fill-function nil
@@ -1761,8 +1767,6 @@ internal functions use this feature cohesively bunch changes."
1761 (let ((start (point)) 1767 (let ((start (point))
1762 (ol-start (overlay-start ol)) 1768 (ol-start (overlay-start ol))
1763 (ol-end (overlay-end ol)) 1769 (ol-end (overlay-end ol))
1764 (msg "Change within concealed text disallowed.")
1765 opened
1766 first) 1770 first)
1767 (goto-char beg) 1771 (goto-char beg)
1768 (while (< (point) end) 1772 (while (< (point) end)
@@ -1772,7 +1776,6 @@ internal functions use this feature cohesively bunch changes."
1772 (save-excursion (forward-char 1) 1776 (save-excursion (forward-char 1)
1773 (allout-show-to-offshoot))) 1777 (allout-show-to-offshoot)))
1774 (when (not first) 1778 (when (not first)
1775 (setq opened t)
1776 (setq first (point)))) 1779 (setq first (point))))
1777 (goto-char (if (featurep 'xemacs) 1780 (goto-char (if (featurep 'xemacs)
1778 (next-property-change (1+ (point)) nil end) 1781 (next-property-change (1+ (point)) nil end)
@@ -4008,17 +4011,18 @@ expose this topic and its siblings."
4008(defun allout-current-topic-collapsed-p (&optional include-single-liners) 4011(defun allout-current-topic-collapsed-p (&optional include-single-liners)
4009 "True if the currently visible containing topic is already collapsed. 4012 "True if the currently visible containing topic is already collapsed.
4010 4013
4011If optional INCLUDE-SINGLE-LINERS is true, then include single-line 4014Single line topics intrinsically can be considered as being both
4012topics \(which intrinsically can be considered both collapsed and 4015collapsed and uncollapsed. If optional INCLUDE-SINGLE-LINERS is
4013not\), as collapsed. Otherwise they are considered uncollapsed." 4016true, then single-line topics are considered to be collapsed. By
4017default, they are treated as being uncollapsed."
4014 (save-excursion 4018 (save-excursion
4015 (and 4019 (and
4016 (= (progn (allout-back-to-current-heading) 4020 (= (progn (allout-back-to-current-heading)
4017 (move-end-of-line 1) 4021 (move-end-of-line 1)
4018 (point)) 4022 (point))
4019 (allout-end-of-current-subtree)) 4023 (allout-end-of-current-subtree (not (looking-at "\n\n"))))
4020 (or include-single-liners 4024 (or include-single-liners
4021 (progn (backward-char 1) (allout-hidden-p)))))) 4025 (progn (backward-char 1) (allout-hidden-p))))))
4022;;;_ > allout-hide-current-subtree (&optional just-close) 4026;;;_ > allout-hide-current-subtree (&optional just-close)
4023(defun allout-hide-current-subtree (&optional just-close) 4027(defun allout-hide-current-subtree (&optional just-close)
4024 "Close the current topic, or containing topic if this one is already closed. 4028 "Close the current topic, or containing topic if this one is already closed.