[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/outline.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/outline.el,v |
Date: |
Fri, 13 Apr 2007 01:17:43 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 07/04/13 01:17:43
Index: outline.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/outline.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- outline.el 19 Feb 2007 18:48:58 -0000 1.29
+++ outline.el 13 Apr 2007 01:17:43 -0000 1.30
@@ -1000,7 +1000,8 @@
(error "No following same-level heading"))))))
(defun outline-get-next-sibling ()
- "Move to next heading of the same level, and return point or nil if none."
+ "Move to next heading of the same level, and return point.
+If there is no such heading, return nil."
(let ((level (funcall outline-level)))
(outline-next-visible-heading 1)
(while (and (not (eobp)) (> (funcall outline-level) level))
@@ -1026,15 +1027,18 @@
(error "No previous same-level heading"))))))
(defun outline-get-last-sibling ()
- "Move to previous heading of the same level, and return point or nil if
none."
- (let ((level (funcall outline-level)))
+ "Move to previous heading of the same level, and return point.
+If there is no such heading, return nil."
+ (let ((opoint (point))
+ (level (funcall outline-level)))
(outline-previous-visible-heading 1)
+ (when (and (/= (point) opoint) (outline-on-heading-p))
(while (and (> (funcall outline-level) level)
(not (bobp)))
(outline-previous-visible-heading 1))
(if (< (funcall outline-level) level)
nil
- (point))))
+ (point)))))
(defun outline-headers-as-kill (beg end)
"Save the visible outline headers in region at the start of the kill ring.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/outline.el,v,
Chong Yidong <=