[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/dabbrev.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/dabbrev.el,v |
Date: |
Thu, 10 May 2007 14:46:52 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 07/05/10 14:46:52
Index: dabbrev.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/dabbrev.el,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- dabbrev.el 21 Jan 2007 03:53:12 -0000 1.83
+++ dabbrev.el 10 May 2007 14:46:52 -0000 1.84
@@ -128,7 +128,7 @@
(const :tag "off" nil))
:group 'dabbrev)
-(defcustom dabbrev--eliminate-newlines t
+(defcustom dabbrev-eliminate-newlines t
"*Non-nil means dabbrev should not insert newlines.
Instead it converts them to spaces."
:type 'boolean
@@ -913,10 +913,12 @@
((equal abbrev (downcase abbrev)) 'downcase)))))
;; 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)))
+ (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)))))
- [Emacs-diffs] Changes to emacs/lisp/dabbrev.el,v,
Richard M. Stallman <=