Stop abbrev-prefix-mark from adding extra newline (Bug#25767)
`abbrev--before-point' does not adjust `pos' to account for when it deletes the "-" left by abbrev-prefix-mark. Therefore, when `abbrev-before-point' goes to restore point, it moves point one character too far forward. * lisp/abbrev.el (abbrev--before-point): Adjust pos when deleting "-".
This commit is contained in:
parent
6a9ba271a9
commit
c733d9169c
1 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue