Browse Source

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.
Kyle Meyer 1 year ago
parent
commit
6dd736ab35
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lisp/ol-eshell.el

+ 5 - 1
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)