Make doom-real-buffer-p work for indirect buffers

This commit is contained in:
Henrik Lissner 2020-03-01 01:33:40 -05:00
parent e806ccf0f0
commit bbd1561a3c
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395
2 changed files with 4 additions and 2 deletions

View File

@ -139,6 +139,8 @@ If BUFFER-OR-NAME is omitted or nil, the current buffer is tested."
(stringp buffer-or-name)
(signal 'wrong-type-argument (list '(bufferp stringp) buffer-or-name)))
(when-let (buf (get-buffer buffer-or-name))
(when-let (basebuf (buffer-base-buffer buf))
(setq buf basebuf))
(and (buffer-live-p buf)
(not (doom-temp-buffer-p buf))
(or (buffer-local-value 'doom-real-buffer-p buf)

View File

@ -1,11 +1,11 @@
;;; tools/ein/config.el -*- lexical-binding: t; -*-
;;
;; Packages
;;; Packages
(after! ein
(defun +ein-buffer-p (buf)
(or (memq (or (buffer-base-buffer buf) (current-buffer)) (ein:notebook-opened-buffers))
(or (memq buf (ein:notebook-opened-buffers))
(memq buf (mapcar #'ein:notebooklist-get-buffer (ein:notebooklist-keys)))))
(add-to-list 'doom-real-buffer-functions #'+ein-buffer-p nil #'eq)
(map! :map ein:notebook-mode-map