Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
94e5e202
Commit
94e5e202
authored
Feb 19, 2014
by
Juanma Barranquero
Browse files
lisp/frameset.el (frameset-restore): Remove duplicate ids only when needed.
parent
c0733b63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/frameset.el
lisp/frameset.el
+12
-11
No files found.
lisp/ChangeLog
View file @
94e5e202
2014-02-19 Juanma Barranquero <lekktu@gmail.com>
* frameset.el (frameset-restore): Delay removing an old frame's
duplicate id until the new frame has been correctly created.
2014-02-19 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-handle-make-symbolic-link): New defun.
...
...
lisp/frameset.el
View file @
94e5e202
...
...
@@ -1116,7 +1116,7 @@ All keyword parameters default to nil."
(
force-display
(
if
(
functionp
force-display
)
(
funcall
force-display
frame-cfg
window-cfg
)
force-display
))
frame
to-tty
)
frame
to-tty
duplicate
)
;; Only set target if forcing displays and the target display is different.
(
cond
((
frameset-keep-original-display-p
force-display
)
(
setq
frameset--target-display
nil
))
...
...
@@ -1134,16 +1134,14 @@ All keyword parameters default to nil."
(
or
(
eq
force-display
:delete
)
(
and
to-tty
(
eq
(
cdr
(
assq
'minibuffer
frame-cfg
))
'only
))))
;; If keeping non-reusable frames, and the frameset--id of one of them
;; matches the id of a frame being restored (because, for example, the
;; frameset has already been read in the same session), remove the
;; frameset--id from the non-reusable frame, which is not useful anymore.
(
when
(
and
other-frames
(
or
(
eq
reuse-frames
:keep
)
(
consp
reuse-frames
)))
(
let
((
dup
(
frameset-frame-with-id
(
frameset-cfg-id
frame-cfg
)
other-frames
)))
(
when
dup
(
set-frame-parameter
dup
'frameset--id
nil
))))
;; To avoid duplicating frame ids after restoration, we note any
;; existing frame whose id matches a frame configuration in the
;; frameset. Once the frame config is properly restored, we can
;; reset the old frame's id to nil.
(
setq
duplicate
(
and
other-frames
(
or
(
eq
reuse-frames
:keep
)
(
consp
reuse-frames
))
(
frameset-frame-with-id
(
frameset-cfg-id
frame-cfg
)
other-frames
)))
;; Restore minibuffers. Some of this stuff could be done in a filter
;; function, but it would be messy because restoring minibuffers affects
;; global state; it's best to do it here than add a bunch of global
...
...
@@ -1177,6 +1175,9 @@ All keyword parameters default to nil."
(
setq
frame
(
frameset--restore-frame
frame-cfg
window-cfg
(
or
filters
frameset-filter-alist
)
force-onscreen
))
;; Now reset any duplicate frameset--id
(
when
(
and
duplicate
(
not
(
eq
frame
duplicate
)))
(
set-frame-parameter
duplicate
'frameset--id
nil
))
;; Set default-minibuffer if required.
(
when
default
(
setq
default-minibuffer-frame
frame
))))
(
error
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment