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 6dbdba75de6..b152b9c724d 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8884,7 +8884,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)