Commit edde35e6 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/progmodes/perl-mode.el: Fix electric indentation with RET

(perl-electric-noindent-p): The `eolp' check should not apply to RET.
Reported in
parent 056587c4
......@@ -678,7 +678,9 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'."
(define-obsolete-function-alias 'electric-perl-terminator
'perl-electric-terminator "22.1")
(defun perl-electric-noindent-p (_char)
(unless (eolp) 'no-indent))
;; To reproduce the old behavior, ;, {, }, and : are made electric, but
;; we only want them to be electric at EOL.
(unless (or (bolp) (eolp)) 'no-indent))
(defun perl-electric-terminator (arg)
"Insert character and maybe adjust indentation.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment