[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/man.el,v [EMACS_22_BASE]
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/man.el,v [EMACS_22_BASE] |
Date: |
Wed, 08 Aug 2007 19:44:56 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Stefan Monnier <monnier> 07/08/08 19:44:56
Index: man.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/man.el,v
retrieving revision 1.167.2.2
retrieving revision 1.167.2.3
diff -u -b -r1.167.2.2 -r1.167.2.3
--- man.el 25 Jul 2007 04:47:13 -0000 1.167.2.2
+++ man.el 8 Aug 2007 19:44:55 -0000 1.167.2.3
@@ -1291,14 +1291,18 @@
(defun Man-next-section (n)
"Move point to Nth next section (default 1)."
(interactive "p")
- (let ((case-fold-search nil))
+ (let ((case-fold-search nil)
+ (start (point)))
(if (looking-at Man-heading-regexp)
(forward-line 1))
(if (re-search-forward Man-heading-regexp (point-max) t n)
(beginning-of-line)
(goto-char (point-max))
;; The last line doesn't belong to any section.
- (forward-line -1))))
+ (forward-line -1))
+ ;; But don't move back from the starting point (can happen if `start'
+ ;; is somewhere on the last line).
+ (if (< (point) start) (goto-char start))))
(defun Man-previous-section (n)
"Move point to Nth previous section (default 1)."
- [Emacs-diffs] Changes to emacs/lisp/man.el,v [EMACS_22_BASE],
Stefan Monnier <=