Skip to content

Commit cd155d9

Browse files
committed
Fix compatibility with polymode after pm--visible-buffer-name removal
Replace pm--visible-buffer-name with pm--buffer-name to maintain compatibility with polymode commit 32d0d6d which removed the pm--visible-buffer-name function and replaced it with pm--buffer-name. The pm--buffer-name function takes an optional 'hidden parameter: - pm--buffer-name() returns the visible buffer name (equivalent to old pm--visible-buffer-name) - pm--buffer-name('hidden) returns the hidden buffer name (equivalent to old pm--hidden-buffer-name) This change fixes the issue where ein would fail to load due to the undefined pm--visible-buffer-name function. Fixes compatibility with polymode >= commit 32d0d6d.
1 parent 2711366 commit cd155d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lisp/poly-ein.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ TYPE can be \\='body, nil."
351351
(apply-partially #'poly-ein--narrow-to-inner #'identity))))
352352

353353
(defun poly-ein--record-window-buffer ()
354-
"(pm--visible-buffer-name) needs to get onto window's prev-buffers.
354+
"(pm--buffer-name) needs to get onto window's prev-buffers.
355355
But `C-x b` seems to consult `buffer-list' and not the C (window)->prev_buffers."
356356
(when (buffer-base-buffer)
357357
(let* ((buffer-list (frame-parameter nil 'buffer-list))
358358
(pos-visible (seq-position
359359
buffer-list
360-
(pm--visible-buffer-name)
360+
(pm--buffer-name)
361361
(lambda (x visible*)
362362
(string-prefix-p (buffer-name x) visible*)))))
363363
;; no way to know if i've switched in or out of indirect buf.
@@ -382,7 +382,7 @@ But `C-x b` seems to consult `buffer-list' and not the C (window)->prev_buffers.
382382
(add-hook 'ido-make-buffer-list-hook
383383
(lambda ()
384384
(defvar ido-temp-list)
385-
(when-let ((visible (pm--visible-buffer-name)))
385+
(when-let ((visible (pm--buffer-name)))
386386
(ido-to-end (delq nil
387387
(mapcar (lambda (x)
388388
(when (string-prefix-p x visible) x))

0 commit comments

Comments
 (0)