1. dabbrev--eliminate-newlines is a defcustom--should it really have a
double-dash name?
2. It doesn't work correctly for SPC M-/.
Assume that the buffer contains this text (and
dabbrev--eliminate-newlines is t (the default)):
aaa
bbb
Then the sequence `a M-/ SPC M-/' produces this text:
aaa
bbb
(In Emacs 21 the result was "aaa bbb".)
In this case ABBREV is " ", i.e. POS = 1, in the code below
[dabbrev--substitute-expansion]. This has the effect that any
whitespace characters are converted, except the first one:
;; Convert whitespace to single spaces.
(if dabbrev--eliminate-newlines
;; Start searching at end of ABBREV so that any whitespace
;; carried over from the existing text is not changed.
(let ((pos (length abbrev)))
(while (string-match "[\n \t]+" expansion pos)
(setq pos (1+ (match-beginning 0)))
(setq expansion (replace-match " " nil nil expansion)))))
2003-01-05 Richard M. Stallman <[EMAIL PROTECTED]>
* dabbrev.el (dabbrev--substitute-expansion):
Convert all whitespace to single spaces,
except when it's carried over from the existing text.
--
Johan Bockgård
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug