aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-10-09 23:34:11 +0000
committerChong Yidong2006-10-09 23:34:11 +0000
commit80f66ef4dfcb71320eab903660d6039118f6e1ef (patch)
tree5da6f1d633761d693cb02cd2599e43dabfa40fa7
parent4169c186297669d029b3e4aa5a16a7e01d1a990a (diff)
downloademacs-80f66ef4dfcb71320eab903660d6039118f6e1ef.tar.gz
emacs-80f66ef4dfcb71320eab903660d6039118f6e1ef.zip
* allout.el (allout-back-to-current-heading): Base on lower-level
routines to get proper disqualification of aberrant topics.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/allout.el28
2 files changed, 18 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 13a6270b27f..a165ba11cbf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12006-10-09 Ken Manheimer <ken.manheimer@gmail.com>
2
3 * allout.el (allout-back-to-current-heading): Base on lower-level
4 routines to get proper disqualification of aberrant topics.
5
12006-10-09 Richard Stallman <rms@gnu.org> 62006-10-09 Richard Stallman <rms@gnu.org>
2 7
3 * textmodes/two-column.el (2C-two-columns): Doc fix. 8 * textmodes/two-column.el (2C-two-columns): Doc fix.
diff --git a/lisp/allout.el b/lisp/allout.el
index 5f59e5e0103..b38d38d9e87 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -2736,24 +2736,22 @@ otherwise skip white space between bullet and ensuing text."
2736 (1- allout-recent-prefix-end))) 2736 (1- allout-recent-prefix-end)))
2737;;;_ > allout-back-to-current-heading () 2737;;;_ > allout-back-to-current-heading ()
2738(defun allout-back-to-current-heading () 2738(defun allout-back-to-current-heading ()
2739 "Move to heading line of current topic, or beginning if already on the line. 2739 "Move to heading line of current topic, or beginning if not in a topic.
2740 2740
2741Return value of point, unless we started outside of (before any) topics, 2741If interactive, we position at the end of the prefix.
2742in which case we return nil." 2742
2743Return value of resulting point, unless we started outside
2744of (before any) topics, in which case we return nil."
2743 2745
2744 (allout-beginning-of-current-line) 2746 (allout-beginning-of-current-line)
2745 (if (or (allout-on-current-heading-p) 2747 (let ((bol-point (point)))
2746 (and (re-search-backward (concat "^\\(" allout-regexp "\\)") 2748 (allout-goto-prefix-doublechecked)
2747 nil 'move) 2749 (if (<= (point) bol-point)
2748 (progn (while (allout-hidden-p) 2750 (if (interactive-p)
2749 (allout-beginning-of-current-line) 2751 (allout-end-of-prefix)
2750 (if (not (looking-at allout-regexp)) 2752 (point))
2751 (re-search-backward allout-regexp 2753 (goto-char (point-min))
2752 nil 'move))) 2754 nil)))
2753 (allout-prefix-data))))
2754 (if (interactive-p)
2755 (allout-end-of-prefix)
2756 (point))))
2757;;;_ > allout-back-to-heading () 2755;;;_ > allout-back-to-heading ()
2758(defalias 'allout-back-to-heading 'allout-back-to-current-heading) 2756(defalias 'allout-back-to-heading 'allout-back-to-current-heading)
2759;;;_ > allout-pre-next-prefix () 2757;;;_ > allout-pre-next-prefix ()