diff options
| author | Juanma Barranquero | 2014-03-12 19:36:26 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2014-03-12 19:36:26 +0100 |
| commit | d27a1a7b394fbcb28aef87e1aa865407237d5939 (patch) | |
| tree | 03b2de9cbb36bacf4ec1eeabc568a8e43277aab0 | |
| parent | 08dfa0b75eb772ba5857c98f6efe52d8aafc6262 (diff) | |
| download | emacs-d27a1a7b394fbcb28aef87e1aa865407237d5939.tar.gz emacs-d27a1a7b394fbcb28aef87e1aa865407237d5939.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/frameset.el | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5198f1f55ba..23da480f6b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-12 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * frameset.el (frameset-restore): When checking for a visible frame, | ||
| 4 | use the action map instead of calling visible-frame-list. | ||
| 5 | |||
| 1 | 2014-03-12 Jonas Bernoulli <jonas@bernoul.li> | 6 | 2014-03-12 Jonas Bernoulli <jonas@bernoul.li> |
| 2 | 7 | ||
| 3 | * emacs-lisp/eieio.el (with-slots): Use cl-symbol-macrolet (bug#16998). | 8 | * emacs-lisp/eieio.el (with-slots): Use cl-symbol-macrolet (bug#16998). |
diff --git a/lisp/frameset.el b/lisp/frameset.el index 6470833d825..05fae1b4fa2 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el | |||
| @@ -1230,7 +1230,12 @@ All keyword parameters default to nil." | |||
| 1230 | (delay-warning 'frameset (error-message-string err) :warning)))))) | 1230 | (delay-warning 'frameset (error-message-string err) :warning)))))) |
| 1231 | 1231 | ||
| 1232 | ;; Make sure there's at least one visible frame. | 1232 | ;; Make sure there's at least one visible frame. |
| 1233 | (unless (or (daemonp) (visible-frame-list)) | 1233 | (unless (or (daemonp) |
| 1234 | (catch 'visible | ||
| 1235 | (maphash (lambda (frame _) | ||
| 1236 | (and (frame-live-p frame) (frame-visible-p frame) | ||
| 1237 | (throw 'visible t))) | ||
| 1238 | frameset--action-map))) | ||
| 1234 | (make-frame-visible (selected-frame))))) | 1239 | (make-frame-visible (selected-frame))))) |
| 1235 | 1240 | ||
| 1236 | 1241 | ||