summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2025-01-26 04:20:00 +0000
committerAugusto Stoffel <arstoffel@gmail.com>2025-10-12 10:15:18 +0200
commitf37cac8ebefdb0f517cbb344fe62c1e5287b2255 (patch)
treed8d2b442787a293623013fdd29140de281f81930
parent60bfb6cec031d8ba05dbb8418008fe0f0be62745 (diff)
Fix compatibility with Emacs 31externals/drepl
Emacs 31 removed the deprecated variable display-comint-buffer-action. Copyright-paperwork-exempt: yes
-rw-r--r--drepl.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/drepl.el b/drepl.el
index 4ba545a..05d9b4e 100644
--- a/drepl.el
+++ b/drepl.el
@@ -76,6 +76,11 @@ buffers, this is a dREPL buffer or nil.")
(defvar drepl--log-buffer nil
"Name of the event log buffer, or nil to disable logging.")
+(defvar drepl--display-buffer-action
+ (if (boundp 'display-comint-buffer-action) ; Emacs >= 29, <= 30
+ display-comint-buffer-action
+ (append display-buffer--same-window-action '((category . comint)))))
+
;;; Basic definitions
(cl-defstruct (drepl-base
@@ -122,7 +127,7 @@ addition to those of `drepl-base'."
(format "Start the %s interpreter." display-name))
(interactive)
(pop-to-buffer (drepl--get-buffer-create ',name t)
- display-comint-buffer-action))
+ drepl--display-buffer-action))
(cl-defstruct (,name
(:include drepl-base (history-variable ',hist-var))
(:copier nil)
@@ -324,7 +329,7 @@ interactively."
(if ask
(drepl--read-buffer "Pop to REPL: ")
(drepl--buffer (drepl--get-repl nil t)))
- display-comint-buffer-action))
+ drepl--display-buffer-action))
;;; Complete operation