emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/allout.el,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/lisp/allout.el,v
Date: Sat, 16 Sep 2006 10:24:25 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    06/09/16 10:24:24

Index: allout.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/allout.el,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- allout.el   14 Sep 2006 17:52:07 -0000      1.82
+++ allout.el   16 Sep 2006 10:24:24 -0000      1.83
@@ -2442,7 +2442,8 @@
   (when (re-search-forward allout-line-boundary-regexp nil 0)
     (allout-prefix-data)
     (and (<= allout-recent-depth allout-doublecheck-at-and-shallower)
-         ;; register non-aberrant or disqualifying offspring as allout-recent-*
+         ;; this will set allout-recent-* on the first non-aberrant topic,
+         ;; whether it's the current one or one that disqualifies it:
          (allout-aberrant-container-p))
     (goto-char allout-recent-prefix-beginning)))
 ;;;_   > allout-this-or-next-heading
@@ -2452,7 +2453,7 @@
   ;; and usable by allout-mode.
   (if (not (allout-goto-prefix-doublechecked)) (allout-next-heading)))
 ;;;_   > allout-previous-heading ()
-(defsubst allout-previous-heading ()
+(defun allout-previous-heading ()
   "Move to the prior \(possibly invisible) heading line.
 
 Return the location of the beginning of the heading, or nil if not found.
@@ -2470,10 +2471,11 @@
         (if (and (<= allout-recent-depth allout-doublecheck-at-and-shallower)
                  (allout-aberrant-container-p))
             (or (allout-previous-heading)
-                (goto-char start-point)
+                (and (goto-char start-point)
                 ;; recalibrate allout-recent-*:
-                (allout-depth)))
-        (point)))))
+                     (allout-depth)
+                     nil))
+          (point))))))
 ;;;_   > allout-get-invisibility-overlay ()
 (defun allout-get-invisibility-overlay ()
   "Return the overlay at point that dictates allout invisibility."
@@ -2752,8 +2754,8 @@
 
 Returns that character position."
 
-  (if (re-search-forward allout-line-boundary-regexp nil 'move)
-      (goto-char (1- (allout-prefix-data)))))
+  (if (allout-next-heading)
+      (goto-char (1- allout-recent-prefix-beginning))))
 ;;;_   > allout-end-of-subtree (&optional current include-trailing-blank)
 (defun allout-end-of-subtree (&optional current include-trailing-blank)
   "Put point at the end of the last leaf in the containing topic.
@@ -2887,11 +2889,13 @@
 (defun allout-up-current-level (arg)
   "Move out ARG levels from current visible topic."
   (interactive "p")
+  (let ((start-point (point)))
   (allout-back-to-current-heading)
   (if (not (allout-ascend))
-      (error "Can't ascend past outermost level")
+        (progn (goto-char start-point)
+               (error "Can't ascend past outermost level"))
     (if (interactive-p) (allout-end-of-prefix))
-    allout-recent-prefix-beginning))
+      allout-recent-prefix-beginning)))
 
 ;;;_  - Linear
 ;;;_   > allout-next-sibling (&optional depth backward)
@@ -6531,8 +6535,8 @@
   "Return a list of all atoms in list."
   ;; classic.
   (cond ((null list) nil)
-        ((atom (car list)) (cons (car list) (flatten (cdr list))))
-        (t (append (flatten (car list)) (flatten (cdr list))))))
+        ((atom (car list)) (cons (car list) (allout-flatten (cdr list))))
+        (t (append (allout-flatten (car list)) (allout-flatten (cdr list))))))
 ;;;_  : Compatability:
 ;;;_   > allout-mark-marker to accommodate divergent emacsen:
 (defun allout-mark-marker (&optional force buffer)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]