]> git.eshelyaron.com Git - emacs.git/commitdiff
More checks for live buffers.
authorJuri Linkov <juri@linkov.net>
Mon, 28 Jan 2019 20:27:22 +0000 (22:27 +0200)
committerJuri Linkov <juri@linkov.net>
Mon, 28 Jan 2019 20:27:22 +0000 (22:27 +0200)
* lisp/dired-x.el (dired-jump): Check if archive/tar superior buffer
was killed by the user.

* lisp/progmodes/ruby-mode.el (ruby-flymake--helper): Check if source buffer
was killed by the user immediately after visiting and before process finishes.

lisp/dired-x.el
lisp/progmodes/ruby-mode.el

index 44e73759fa73cae09c9468129a7fd713acbd038c..defc541ddc9ee7e0c4e8f91025cf8b9fadae612c 100644 (file)
@@ -463,9 +463,11 @@ Interactively with prefix argument, read FILE-NAME."
    (list nil (and current-prefix-arg
                   (read-file-name "Jump to Dired file: "))))
   (cond
-   ((bound-and-true-p archive-subfile-mode)
+   ((and (bound-and-true-p archive-subfile-mode)
+         (buffer-live-p archive-superior-buffer))
     (switch-to-buffer archive-superior-buffer))
-   ((bound-and-true-p tar-subfile-mode)
+   ((and (bound-and-true-p tar-subfile-mode)
+         (buffer-live-p tar-superior-buffer))
     (switch-to-buffer tar-superior-buffer))
    (t
     ;; Expand file-name before `dired-goto-file' call:
index 8aa583eb319d16039b25148eb867946fdb8b4a60..e83778af946a1ef9e218dfc99a833a1074570716 100644 (file)
@@ -2288,7 +2288,7 @@ It will be properly highlighted even when the call omits parens.")
         :command command
         :sentinel
         (lambda (proc _event)
-          (when (eq 'exit (process-status proc))
+          (when (and (eq 'exit (process-status proc)) (buffer-live-p source))
             (unwind-protect
                 (if (with-current-buffer source (eq proc ruby--flymake-proc))
                     (with-current-buffer (process-buffer proc)