summaryrefslogtreecommitdiff
path: root/lisp/reposition.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-07-20 05:55:31 +0000
committerRichard M. Stallman <rms@gnu.org>1993-07-20 05:55:31 +0000
commitf5d7a8f2f81df6eb76c138f2d1dd4e6b59f75d67 (patch)
tree62b1effc3929e0e0173856296b2392e371e5f149 /lisp/reposition.el
parent00aa7e1cdf96048081730e2fd597123a1e639be0 (diff)
downloademacs-f5d7a8f2f81df6eb76c138f2d1dd4e6b59f75d67.tar.gz
(reposition-window): Don't forward-char if eobp.
Diffstat (limited to 'lisp/reposition.el')
-rw-r--r--lisp/reposition.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/reposition.el b/lisp/reposition.el
index d981eefec5e..0dda524f079 100644
--- a/lisp/reposition.el
+++ b/lisp/reposition.el
@@ -70,7 +70,8 @@ first comment line visible (if point is in a comment)."
(repos-count-screen-lines-signed
;; the beginning of the preceding comment
(save-excursion
- (forward-char 1) (end-of-defun -1)
+ (if (not (eobp)) (forward-char 1))
+ (end-of-defun -1)
;; Skip whitespace, newlines, and form feeds.
(re-search-forward "[^\\s \n\014]")
(backward-char 1)