[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dabbrev--eliminate-newlines
From: |
Richard Stallman |
Subject: |
Re: dabbrev--eliminate-newlines |
Date: |
Tue, 24 Apr 2007 17:35:40 -0400 |
Does this patch fix it?
*** dabbrev.el 21 Jan 2007 01:36:07 -0500 1.83
--- dabbrev.el 24 Apr 2007 16:33:08 -0400
***************
*** 914,922 ****
;; 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)))))
--- 914,924 ----
;; Convert whitespace to single spaces.
(if dabbrev--eliminate-newlines
! (let ((pos
! (if (equal abbrev " ") 0 (length abbrev))))
! ;; If ABBREV is real, search after the end of it.
! ;; If ABBREV is space and we are copying successive words,
! ;; search starting at the front.
(while (string-match "[\n \t]+" expansion pos)
(setq pos (1+ (match-beginning 0)))
(setq expansion (replace-match " " nil nil expansion)))))