# HG changeset patch # User michaels # Date 1059813731 0 # Node ID 442db3c3c43b98d8fa5ade6011df3d3ebeb2a964 # Parent 98419bcfe892f9724b1ff9091bf86ca97d66caae [xemacs-hg @ 2003-08-02 08:42:10 by michaels] 2003-07-31 Mike Sperber * isearch-mode.el (isearch-mode-help): (isearch-update): (isearch-done): (isearch-edit-string): Change the way window configurations are handled: Formerly, the code would do `set-window-configuration' off `pre-command-hook' which isn't really allowed. (The old window-configuration code would quietly ignore this restriction.) Instead, save the window configuration only when someone asks for help, and restore afterwards, and otherwise leave it alone. diff -r 98419bcfe892 -r 442db3c3c43b lisp/ChangeLog --- a/lisp/ChangeLog Fri Aug 01 21:52:21 2003 +0000 +++ b/lisp/ChangeLog Sat Aug 02 08:42:11 2003 +0000 @@ -1,3 +1,15 @@ +2003-07-31 Mike Sperber + + * isearch-mode.el (isearch-mode-help): + (isearch-update): + (isearch-done): + (isearch-edit-string): Change the way window configurations are + handled: Formerly, the code would do `set-window-configuration' + off `pre-command-hook' which isn't really allowed. (The old + window-configuration code would quietly ignore this restriction.) + Instead, save the window configuration only when someone asks for + help, and restore afterwards, and otherwise leave it alone. + 2003-07-24 Mike Sperber * post-gc.el (simple-finalizer-ephemerons): diff -r 98419bcfe892 -r 442db3c3c43b lisp/isearch-mode.el --- a/lisp/isearch-mode.el Fri Aug 01 21:52:21 2003 +0000 +++ b/lisp/isearch-mode.el Sat Aug 02 08:42:11 2003 +0000 @@ -490,10 +490,12 @@ ;; it, though. -hniksic (defun isearch-mode-help () (interactive "_") - (let ((w (selected-window))) - (describe-function 'isearch-forward) - (select-window w)) - (isearch-update)) + (let ((config (current-window-configuration))) + (let ((w (selected-window))) + (describe-function 'isearch-forward) + (select-window w)) + (isearch-update) + (setq isearch-window-configuration config))) ;;;================================================================== @@ -539,7 +541,6 @@ search-ring-yank-pointer nil regexp-search-ring-yank-pointer nil isearch-unhidden-extents nil - isearch-window-configuration (current-window-configuration) ;; #### What we really need is a buffer-local ;; overriding-local-map. See isearch-pre-command-hook for @@ -584,6 +585,10 @@ (defun isearch-update () ;; Called after each command to update the display. + (if isearch-window-configuration + (progn + (set-window-configuration isearch-window-configuration) + (setq isearch-window-configuration nil))) (if (null unread-command-events) (progn (if (not (input-pending-p)) @@ -622,6 +627,7 @@ (defun isearch-done (&optional nopush edit) ;; Called by all commands that terminate isearch-mode. + (setq isearch-window-configuration nil) (let ((inhibit-quit t)) ; danger danger! (if (and isearch-buffer (buffer-live-p isearch-buffer)) ;; Some loser process filter might have switched the window's @@ -648,8 +654,6 @@ (let ((found-start (window-start (selected-window))) (found-point (point))) (cond ((eq (selected-frame) isearch-selected-frame) - (set-window-configuration isearch-window-configuration) - (if isearch-small-window (goto-char found-point) ;; Exiting the save-window-excursion clobbers @@ -768,7 +772,6 @@ (isearch-slow-terminal-mode isearch-slow-terminal-mode) (isearch-small-window isearch-small-window) (isearch-recursive-edit isearch-recursive-edit) - (isearch-window-configuration (current-window-configuration)) (isearch-selected-frame (selected-frame)) ) ;; Actually terminate isearching until editing is done.