summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cperl-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/cperl-mode.el')
-rw-r--r--lisp/progmodes/cperl-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 18a72324c65..7d0884389eb 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8786,7 +8786,7 @@ do extra unwind via `cperl-unwind-to-safe'."
(goto-char new-beg)))
(setq beg (point))
(goto-char end)
- (while (and end
+ (while (and end (< end (point-max))
(progn
(or (bolp) (condition-case nil
(forward-line 1)