diff options
| author | Richard M. Stallman | 2007-05-10 14:46:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-05-10 14:46:52 +0000 |
| commit | e2e7506851231cb87c2e025dc8ba06ad95053de9 (patch) | |
| tree | 78d641f9a6e5f67b2e901fa86f963011ec34203e | |
| parent | b52efb9fafe39ea3370a4a30d046915666e9ad2c (diff) | |
| download | emacs-e2e7506851231cb87c2e025dc8ba06ad95053de9.tar.gz emacs-e2e7506851231cb87c2e025dc8ba06ad95053de9.zip | |
(dabbrev-eliminate-newlines): Renamed from
dabbrev--eliminate-newlines. All uses changed.
| -rw-r--r-- | lisp/dabbrev.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index ae16b52ee7d..1cfad105a95 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el | |||
| @@ -128,7 +128,7 @@ Set this to nil if no characters should be skipped." | |||
| 128 | (const :tag "off" nil)) | 128 | (const :tag "off" nil)) |
| 129 | :group 'dabbrev) | 129 | :group 'dabbrev) |
| 130 | 130 | ||
| 131 | (defcustom dabbrev--eliminate-newlines t | 131 | (defcustom dabbrev-eliminate-newlines t |
| 132 | "*Non-nil means dabbrev should not insert newlines. | 132 | "*Non-nil means dabbrev should not insert newlines. |
| 133 | Instead it converts them to spaces." | 133 | Instead it converts them to spaces." |
| 134 | :type 'boolean | 134 | :type 'boolean |
| @@ -913,10 +913,12 @@ to record whether we upcased the expansion, downcased it, or did neither." | |||
| 913 | ((equal abbrev (downcase abbrev)) 'downcase))))) | 913 | ((equal abbrev (downcase abbrev)) 'downcase))))) |
| 914 | 914 | ||
| 915 | ;; Convert whitespace to single spaces. | 915 | ;; Convert whitespace to single spaces. |
| 916 | (if dabbrev--eliminate-newlines | 916 | (if dabbrev-eliminate-newlines |
| 917 | ;; Start searching at end of ABBREV so that any whitespace | 917 | (let ((pos |
| 918 | ;; carried over from the existing text is not changed. | 918 | (if (equal abbrev " ") 0 (length abbrev)))) |
| 919 | (let ((pos (length abbrev))) | 919 | ;; If ABBREV is real, search after the end of it. |
| 920 | ;; If ABBREV is space and we are copying successive words, | ||
| 921 | ;; search starting at the front. | ||
| 920 | (while (string-match "[\n \t]+" expansion pos) | 922 | (while (string-match "[\n \t]+" expansion pos) |
| 921 | (setq pos (1+ (match-beginning 0))) | 923 | (setq pos (1+ (match-beginning 0))) |
| 922 | (setq expansion (replace-match " " nil nil expansion))))) | 924 | (setq expansion (replace-match " " nil nil expansion))))) |