summaryrefslogtreecommitdiff
path: root/lisp/erc/erc.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-10-16 17:36:20 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-10-16 17:36:26 +0200
commitd5cb3cb9a45dd9028789e10088a6ca491c370d10 (patch)
tree2261f29a7b2e4c8c1b55a411d790ab089cc9f701 /lisp/erc/erc.el
parent6a2f56db4e602372e33f35326a73cffa03586479 (diff)
downloademacs-d5cb3cb9a45dd9028789e10088a6ca491c370d10.tar.gz
emacs-d5cb3cb9a45dd9028789e10088a6ca491c370d10.tar.bz2
emacs-d5cb3cb9a45dd9028789e10088a6ca491c370d10.zip
Make erc expand the final abbrev
* lisp/erc/erc.el (erc-send-current-line): Expand abbrevs at the end of lines (bug#42854).
Diffstat (limited to 'lisp/erc/erc.el')
-rw-r--r--lisp/erc/erc.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 1d5506e2816..6481446ba5e 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -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")