* lisp/progmodes/perl-mode.el: Fix electric indentation with RET
(perl-electric-noindent-p): The `eolp' check should not apply to RET. Reported in https://emacs.stackexchange.com/questions/36337.
This commit is contained in:
parent
056587c45f
commit
edde35e6f8
1 changed files with 3 additions and 1 deletions
|
@ -678,7 +678,9 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'."
|
||||||
(define-obsolete-function-alias 'electric-perl-terminator
|
(define-obsolete-function-alias 'electric-perl-terminator
|
||||||
'perl-electric-terminator "22.1")
|
'perl-electric-terminator "22.1")
|
||||||
(defun perl-electric-noindent-p (_char)
|
(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)
|
(defun perl-electric-terminator (arg)
|
||||||
"Insert character and maybe adjust indentation.
|
"Insert character and maybe adjust indentation.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue