summaryrefslogtreecommitdiff
path: root/lisp/abbrev.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/abbrev.el')
-rw-r--r--lisp/abbrev.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index cbc604c23d6..01ad3d478fc 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -720,9 +720,10 @@ then ABBREV is looked up in that table only."
(setq start abbrev-start-location)
(setq abbrev-start-location nil)
;; Remove the hyphen inserted by `abbrev-prefix-mark'.
- (if (and (< start (point-max))
- (eq (char-after start) ?-))
- (delete-region start (1+ start)))
+ (when (and (< start (point-max))
+ (eq (char-after start) ?-))
+ (delete-region start (1+ start))
+ (setq pos (1- pos)))
(skip-syntax-backward " ")
(setq end (point))
(when (> end start)