GNU bug report logs -
#25767
25.1.91; abbrev-prefix-mark expansion inserts newline
Previous Next
Reported by: Allen Li <vianchielfaura <at> gmail.com>
Date: Fri, 17 Feb 2017 00:50:01 UTC
Severity: normal
Tags: fixed
Found in version 25.1.91
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #14 received at 25767 <at> debbugs.gnu.org (full text, mbox):
Here's the quick fix. I will opt out of doing more invasive refactoring.
I tried running abbrev-tests.el, but they don't seem to pass, even
without my change. I am running these tests by: (eval-buffer)
followed by (ert).
I am getting undefined variable errors that I can fix with (require
'obarray). Am I running these tests incorrectly or should I add a
(require 'obarray) to abbrev-tests.el?
I am also getting a type error for abbrev-table-p-test unrelated to my change.
There appear to be no tests for the actual abbrev expansion.
---
lisp/abbrev.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index cbc604c23d..01ad3d478f 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)
--
2.11.1
This bug report was last modified 8 years and 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.