From 6dd736ab357a7db69d82d27f5309acd0f4d8de74 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 4 Oct 2022 17:42:27 -0400 Subject: [PATCH] ol-eshell: Make recently ported change compatible with Emacs < 29 * lisp/ol-eshell.el (org-eshell-open): Inline action if display-comint-buffer-action isn't bound. This is a follow-up to the port of Emacs's 18b680cfd. --- lisp/ol-eshell.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ol-eshell.el b/lisp/ol-eshell.el index 0e6fe900a..3be63601d 100644 --- a/lisp/ol-eshell.el +++ b/lisp/ol-eshell.el @@ -49,7 +49,11 @@ followed by a colon." (eshell-buffer-name (car buffer-and-command)) (command (cadr buffer-and-command))) (if (get-buffer eshell-buffer-name) - (pop-to-buffer eshell-buffer-name display-comint-buffer-action) + (pop-to-buffer + eshell-buffer-name + (if (boundp 'display-comint-buffer-action) ; Emacs >= 29 + display-comint-buffer-action + '(display-buffer-same-window (inhibit-same-window)))) (eshell)) (goto-char (point-max)) (eshell-kill-input)