Make erc expand the final abbrev

* lisp/erc/erc.el (erc-send-current-line): Expand abbrevs at the
end of lines (bug#42854).
This commit is contained in:
Lars Ingebrigtsen 2020-10-16 17:36:20 +02:00
parent 6a2f56db4e
commit d5cb3cb9a4

View file

@ -5472,6 +5472,10 @@ submitted line to be intentional."
(time-less-p erc-accidental-paste-threshold-seconds
(time-subtract now erc-last-input-time)))
(save-restriction
;; If there's an abbrev at the end of the line, expand it.
(when (and abbrev-mode
(eolp))
(expand-abbrev))
(widen)
(if (< (point) (erc-beg-of-input-line))
(erc-error "Point is not in the input area")