emacs-31 429336b409e: Fix perl-calculate-indent

Harald Jörg <[email protected]> Sun, 19 Jul 2026 18:00:19 -0400 (EDT)
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit 429336b409eb2f6e0350b572426302697e50fec6
Author: Petteri Hintsanen <[email protected]>
Commit: Harald Jörg <[email protected]>

    Fix perl-calculate-indent
    
    * lisp/progmodes/perl-mode.el (perl-calculate-indent): Ensure that
    the value from (nth 3 state) is a character before passing it to
    char-equal.
---
 lisp/progmodes/perl-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 61988d85027..26dfc9e97c8 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1021,7 +1021,7 @@ Returns (parse-state) if line starts inside a string."
 	   (containing-sexp (nth 1 state))
 	   ;; Don't auto-indent in a quoted string or a here-document.
            (unindentable (or (nth 3 state) (eq 2 (nth 7 state))))
-           (format (and (nth 3 state)
+           (format (and (characterp (nth 3 state))
                         (char-equal (nth 3 state) ?\n))))
       (when (and (eq t (nth 3 state))
                  (save-excursion