lisp/frameset.el: Optimize check for visible frame.

(frameset-restore): When checking for a visible frame,
use the action map instead of calling visible-frame-list.
This commit is contained in:
Juanma Barranquero 2014-03-12 19:36:26 +01:00
commit d27a1a7b39
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2014-03-12 Juanma Barranquero <lekktu@gmail.com>
* frameset.el (frameset-restore): When checking for a visible frame,
use the action map instead of calling visible-frame-list.
2014-03-12 Jonas Bernoulli <jonas@bernoul.li>
* emacs-lisp/eieio.el (with-slots): Use cl-symbol-macrolet (bug#16998).

View file

@ -1230,7 +1230,12 @@ All keyword parameters default to nil."
(delay-warning 'frameset (error-message-string err) :warning))))))
;; Make sure there's at least one visible frame.
(unless (or (daemonp) (visible-frame-list))
(unless (or (daemonp)
(catch 'visible
(maphash (lambda (frame _)
(and (frame-live-p frame) (frame-visible-p frame)
(throw 'visible t)))
frameset--action-map)))
(make-frame-visible (selected-frame)))))