]> git.eshelyaron.com Git - emacs.git/commitdiff
frameset.el (frameset--jump-to-register): Check that buffer is live (bug#16749).
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 15 Feb 2014 04:16:46 +0000 (05:16 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 15 Feb 2014 04:16:46 +0000 (05:16 +0100)
lisp/ChangeLog
lisp/frameset.el

index 9f8b55771bbcc2f75cea0722ee3aa71d5e1b2539..307f84c411697a9e221e342cf9f35c588e99f50f 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-15  Juanma Barranquero  <lekktu@gmail.com>
+
+       * frameset.el (frameset--jump-to-register): Check that buffer is live
+       (bug#16749).
+
 2014-02-15  Glenn Morris  <rgm@gnu.org>
 
        * info.el (info-initialize): Revert 2014-01-10 change.
index aa8bb196fffea67ddf14e26cd5f4e39182007a69..7fd027e9a53db590fa82d1699b50737609299192 100644 (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)