[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0f94d42: More checks for live buffers.
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] master 0f94d42: More checks for live buffers. |
Date: |
Mon, 28 Jan 2019 15:27:34 -0500 (EST) |
branch: master
commit 0f94d422f16cc989f49ea5c7fc87c947c5f42ced
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
More checks for live buffers.
* 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 | 6 ++++--
lisp/progmodes/ruby-mode.el | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 44e7375..defc541 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -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:
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 8aa583e..e83778a 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 0f94d42: More checks for live buffers.,
Juri Linkov <=