[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remove dabbrev--scanning-message?
From: |
Thien-Thi Nguyen |
Subject: |
Re: remove dabbrev--scanning-message? |
Date: |
Wed, 22 Aug 2007 03:35:47 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
() "Sean O'Rourke" <address@hidden>
() Mon, 23 Jul 2007 17:40:29 -0700
2007-07-22 Sean O'Rourke <address@hidden>
* dabbrev.el (dabbrev--scanning-message): removed.
(dabbrev--find-expansion): use a progress reporter
instead of dabbrev--scanning-message.
(dabbrev--progress-reporter): new variable.
i would like to install this. rms, is this (see below) suitable
for immediate ("tiny change") installation or should we ask for
copyright assignment?
thi
____________________________________________________________
--- dabbrev.el 16 May 2007 13:13:20 -0000 1.85
+++ dabbrev.el 24 Jul 2007 00:40:05 -0000
@@ -332,6 +332,9 @@
;; The regexp for recognizing a character in an abbreviation.
(defvar dabbrev--abbrev-char-regexp nil)
+;; The progress reporter for buffer-scanning progress.
+(defvar dabbrev--progress-reporter nil)
+
;;----------------------------------------------------------------
;; Macros
;;----------------------------------------------------------------
@@ -711,10 +714,6 @@
(setq all-expansions (cons expansion all-expansions))))
all-expansions))
-(defun dabbrev--scanning-message ()
- (unless (window-minibuffer-p (selected-window))
- (message "Scanning `%s'" (buffer-name (current-buffer)))))
-
(defun dabbrev--ignore-buffer-p (buffer)
"Return non-nil if BUFFER should be ignored by dabbrev."
(let ((bn (buffer-name buffer)))
@@ -740,8 +739,7 @@
;; If we were scanning something other than the current buffer,
;; continue scanning there.
(when dabbrev--last-buffer
- (set-buffer dabbrev--last-buffer)
- (dabbrev--scanning-message))
+ (set-buffer dabbrev--last-buffer))
(or
;; ------------------------------------------
;; Look backward in current buffer.
@@ -773,15 +771,20 @@
;; If we have just now begun to search other buffers,
;; determine which other buffers we should check.
;; Put that list in dabbrev--friend-buffer-list.
- (or dabbrev--friend-buffer-list
- (setq dabbrev--friend-buffer-list
- (dabbrev--make-friend-buffer-list))))
+ (unless dabbrev--friend-buffer-list
+ (setq dabbrev--friend-buffer-list
+ (dabbrev--make-friend-buffer-list))
+ (setq dabbrev--progress-reporter
+ (make-progress-reporter
+ "Scanning for dabbrevs..."
+ (- (length dabbrev--friend-buffer-list)) 0 0 1 1.5))))
;; Walk through the buffers till we find a match.
(let (expansion)
(while (and (not expansion) dabbrev--friend-buffer-list)
(setq dabbrev--last-buffer (pop dabbrev--friend-buffer-list))
(set-buffer dabbrev--last-buffer)
- (dabbrev--scanning-message)
+ (progress-reporter-update dabbrev--progress-reporter
+ (- (length dabbrev--friend-buffer-list)))
(setq dabbrev--last-expansion-location (point-min))
(setq expansion (dabbrev--try-find abbrev nil 1 ignore-case)))
expansion)))))
- Re: remove dabbrev--scanning-message?,
Thien-Thi Nguyen <=