1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

frameset.el (frameset--jump-to-register): Check that buffer is live (bug#16749).

This commit is contained in:
Juanma Barranquero 2014-02-15 05:16:46 +01:00
parent 5d645ea4ee
commit 285f1858c3
2 changed files with 11 additions and 7 deletions

View file

@ -1213,15 +1213,14 @@ Called from `jump-to-register'. Internal use only."
:filters frameset-session-filter-alist
:reuse-frames (if delete t :keep))
(mapc #'iconify-frame iconify-list)
(let ((frame (frameset-frame-with-id (aref data 1))))
(let ((frame (frameset-frame-with-id (aref data 1)))
buffer window)
(when frame
(select-frame-set-input-focus frame)
(let* ((position (aref data 2))
(buffer (marker-buffer position))
(window (get-buffer-window buffer frame)))
(when (and window (window-live-p window))
(set-frame-selected-window frame window)
(with-current-buffer buffer (goto-char position))))))))
(when (and (buffer-live-p (setq buffer (marker-buffer (aref data 2))))
(window-live-p (setq window (get-buffer-window buffer frame))))
(set-frame-selected-window frame window)
(with-current-buffer buffer (goto-char (aref data 2))))))))
;;;###autoload
(defun frameset-to-register (register)