From 6b5ccddf1c9e78417aacaf375a7e96e64a60f6d3 Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Sun, 26 Jun 2011 12:47:39 -0400 Subject: [PATCH] * allout-widgets.el (allout-widgets-post-command-business): Stop decorating intermediate isearch matches. They're not being undecorated when an isearch is continued past, and isearch automatically collapses them. This leads to "widget leaks", where decorated items accumulate in collapsed areas. Lines with lots of hidden widgets can slow down cursor travel, substantially. Too much complicated machinery would be needed to ensure undecoration, so we're doing without this nicety. (allout-widgets-tally-string): Don't try to do a hash-table-count of allout-widgets-tally when it's nil. This eliminates spurious "Error during redisplay: (wrong-type-argument hash-table-p nil)" warnings in *Messages* when allout-widgets-maintain-tally is t. --- lisp/ChangeLog | 23 ++++++++++++++++++++--- lisp/allout-widgets.el | 35 ++++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c726864ebcc..38675a6efb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,10 +1,26 @@ +2011-06-26 Ken Manheimer + + * allout-widgets.el (allout-widgets-post-command-business): Stop + decorating intermediate isearch matches. They're not being + undecorated when an isearch is continued past, and isearch + automatically collapses them. This leads to "widget leaks", where + decorated items accumulate in collapsed areas. Lines with lots of + hidden widgets can slow down cursor travel, substantially. Too + much complicated machinery would be needed to ensure undecoration, + so we're doing without this nicety. + + (allout-widgets-tally-string): Don't try to do a hash-table-count + of allout-widgets-tally when it's nil. This eliminates spurious "Error + during redisplay: (wrong-type-argument hash-table-p nil)" warnings in + *Messages* when allout-widgets-maintain-tally is t. + 2011-06-26 Martin Rudalics * window.el (display-buffer-normalize-argument): Rename to display-buffer-normalize-arguments. Handle special meaning of - LABEL argument. Respect special-display-function when popping - up a new frame. Fix code searching for a window showing the - buffer on another frame. + LABEL argument. Respect special-display-function when popping up + a new frame. Fix code searching for a window showing the buffer + on another frame. (display-buffer-normalize-specifiers): Call display-buffer-normalize-arguments. (display-buffer-in-window): Don't undedicate the window if its @@ -981,6 +997,7 @@ * iswitchb.el (iswitchb-window-buffer-p): Use `member' instead of `memq' (Bug#8799). +>>>>>>> MERGE-SOURCE 2011-06-02 Stefan Monnier * subr.el (make-progress-reporter): Add "..." by default (bug#8785). diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 647b609288d..0f1fe850123 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -258,7 +258,9 @@ widgets are locally inhibited. The number varies according to the evanescence of objects on a hash table with weak keys, so tracking of widget erasures is often delayed." - (when (and allout-widgets-maintain-tally (not allout-widgets-mode-inhibit)) + (when (and allout-widgets-maintain-tally + (not allout-widgets-mode-inhibit) + allout-widgets-tally) (format ":%s" (hash-table-count allout-widgets-tally)))) ;;;_ = allout-widgets-track-decoration nil (defcustom allout-widgets-track-decoration nil @@ -748,20 +750,23 @@ Optional RECURSING is for internal use, to limit recursion." (message replaced-message) (message ""))))) - ;; Detect undecorated items, eg during isearch into previously - ;; unexposed topics, and decorate "economically". Some - ;; undecorated stuff is often exposed, to reduce lag, but the - ;; item containing the cursor is decorated. We constrain - ;; recursion to avoid being trapped by unexpectedly undecoratable - ;; items. - (when (and (not recursing) - (not (allout-current-decorated-p)) - (or (not (equal (allout-depth) 0)) - (not allout-container-item-widget))) - (let ((buffer-undo-list t)) - (allout-widgets-exposure-change-recorder - allout-recent-prefix-beginning allout-recent-prefix-end nil) - (allout-widgets-post-command-business 'recursing))) + ;; alas, decorated intermediate matches are not easily undecorated + ;; when they're automatically rehidden by isearch, so we're + ;; dropping this nicety. + ;; ;; Detect undecorated items, eg during isearch into previously + ;; ;; unexposed topics, and decorate "economically". Some + ;; ;; undecorated stuff is often exposed, to reduce lag, but the + ;; ;; item containing the cursor is decorated. We constrain + ;; ;; recursion to avoid being trapped by unexpectedly undecoratable + ;; ;; items. + ;; (when (and (not recursing) + ;; (not (allout-current-decorated-p)) + ;; (or (not (equal (allout-depth) 0)) + ;; (not allout-container-item-widget))) + ;; (let ((buffer-undo-list t)) + ;; (allout-widgets-exposure-change-recorder + ;; allout-recent-prefix-beginning allout-recent-prefix-end nil) + ;; (allout-widgets-post-command-business 'recursing))) ;; Detect and rectify fouled outline structure - decorated item ;; not at beginning of line. -- 2.39.2