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.
This commit is contained in:
Kyle Meyer 2022-10-04 17:42:27 -04:00
parent abc34b458f
commit 6dd736ab35
1 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,11 @@ followed by a colon."
(eshell-buffer-name (car buffer-and-command)) (eshell-buffer-name (car buffer-and-command))
(command (cadr buffer-and-command))) (command (cadr buffer-and-command)))
(if (get-buffer eshell-buffer-name) (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)) (eshell))
(goto-char (point-max)) (goto-char (point-max))
(eshell-kill-input) (eshell-kill-input)