[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/dabbrev.el
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/dabbrev.el |
Date: |
Tue, 16 Nov 2004 12:20:29 -0500 |
Index: emacs/lisp/dabbrev.el
diff -c emacs/lisp/dabbrev.el:1.73 emacs/lisp/dabbrev.el:1.74
*** emacs/lisp/dabbrev.el:1.73 Wed Apr 21 19:21:51 2004
--- emacs/lisp/dabbrev.el Tue Nov 16 17:08:39 2004
***************
*** 516,540 ****
;; The "abbrev" to expand is just the space.
(setq abbrev " ")
(save-excursion
! (if dabbrev--last-buffer
! (set-buffer dabbrev--last-buffer))
! ;; Find the end of the last "expansion" word.
! (if (or (eq dabbrev--last-direction 1)
! (and (eq dabbrev--last-direction 0)
! (< dabbrev--last-expansion-location (point))))
! (setq dabbrev--last-expansion-location
! (+ dabbrev--last-expansion-location
! (length dabbrev--last-expansion))))
! (goto-char dabbrev--last-expansion-location)
! ;; Take the following word, with intermediate separators,
! ;; as our expansion this time.
! (re-search-forward
! (concat "\\(?:" dabbrev--abbrev-char-regexp "\\)+"))
! (setq expansion (buffer-substring-no-properties
! dabbrev--last-expansion-location (point)))
! ;; Record the end of this expansion, in case we repeat this.
! (setq dabbrev--last-expansion-location (point)))
;; Indicate that dabbrev--last-expansion-location is
;; at the end of the expansion.
(setq dabbrev--last-direction -1))
--- 516,542 ----
;; The "abbrev" to expand is just the space.
(setq abbrev " ")
(save-excursion
! (save-restriction
! (widen)
! (if dabbrev--last-buffer
! (set-buffer dabbrev--last-buffer))
! ;; Find the end of the last "expansion" word.
! (if (or (eq dabbrev--last-direction 1)
! (and (eq dabbrev--last-direction 0)
! (< dabbrev--last-expansion-location (point))))
! (setq dabbrev--last-expansion-location
! (+ dabbrev--last-expansion-location
! (length dabbrev--last-expansion))))
! (goto-char dabbrev--last-expansion-location)
! ;; Take the following word, with intermediate separators,
! ;; as our expansion this time.
! (re-search-forward
! (concat "\\(?:" dabbrev--abbrev-char-regexp "\\)+"))
! (setq expansion (buffer-substring-no-properties
! dabbrev--last-expansion-location (point)))
! ;; Record the end of this expansion, in case we repeat this.
! (setq dabbrev--last-expansion-location (point))))
;; Indicate that dabbrev--last-expansion-location is
;; at the end of the expansion.
(setq dabbrev--last-direction -1))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/dabbrev.el,
Richard M . Stallman <=