Commit 3f041a02 authored by Helmut Eller's avatar Helmut Eller Committed by João Távora
Browse files

Fix bug in sly-complete-restore-window-configuration.

* sly.el (sly-complete-restore-window-configuration): Don't
use a timer.  That was only needed for XEmacs and it was
accidentally started multiple times.

(cherry picked from SLIME commit 4fff7fa1)

Conflicts:
	ChangeLog
	sly.el
parent b50e0b9f
Showing with 6 additions and 12 deletions
+6 -12
......@@ -3345,6 +3345,7 @@ Retuns the note overlay if such a position is found, otherwise nil."
(defvar sly-completions-buffer-name "*Completions*")
;; FIXME: can probably use quit-window instead
(make-variable-buffer-local
(defvar sly-complete-saved-window-configuration nil
"Window configuration before we show the *Completions* buffer.
......@@ -3382,18 +3383,11 @@ Return true if the configuration was saved."
'sly-complete-maybe-restore-window-configuration)
(when (and sly-complete-saved-window-configuration
(sly-completion-window-active-p))
;; XEmacs does not allow us to restore a window configuration from
;; pre-command-hook, so we do it asynchronously.
;;
;; FIXME: For possible refactoring, now that XEmacs is gone --js
(sly-run-when-idle
(lambda ()
(save-excursion
(set-window-configuration
sly-complete-saved-window-configuration))
(setq sly-complete-saved-window-configuration nil)
(when (buffer-live-p sly-completions-buffer-name)
(kill-buffer sly-completions-buffer-name))))))
(save-excursion (set-window-configuration
sly-complete-saved-window-configuration))
(setq sly-complete-saved-window-configuration nil)
(when (buffer-live-p sly-completions-buffer-name)
(kill-buffer sly-completions-buffer-name))))
(defun sly-complete-maybe-restore-window-configuration ()
"Restore the window configuration, if the following command
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment