[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached fe4003c870 2/3: Add integration with nano-mode
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached fe4003c870 2/3: Add integration with nano-modeline |
Date: |
Thu, 6 Oct 2022 10:57:30 -0400 (EDT) |
branch: externals/detached
commit fe4003c870b93a8f1a2a2503d09e56427a30739c
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Add integration with nano-modeline
---
detached-init.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/detached-init.el b/detached-init.el
index d6f3596a23..8acd3fd1cd 100644
--- a/detached-init.el
+++ b/detached-init.el
@@ -60,6 +60,7 @@
(defvar embark-general-map)
(defvar embark-keymap-alist)
+(defvar nano-modeline-mode-formats)
;;;; Variables
@@ -69,7 +70,7 @@
:type 'list)
(defcustom detached-init-allow-list
- '(compile dired dired-rsync embark eshell org projectile shell vterm)
+ '(compile dired dired-rsync embark eshell nano-modeline org projectile shell
vterm)
"A list of allowed packages."
:group 'detached
:type 'list)
@@ -96,6 +97,7 @@
(dired-rsync .
detached-init--dired-rsync)
(embark . detached-init--embark)
(eshell . detached-init--eshell)
+ (nano-modeline .
detached-init--nano-modeline)
(org . detached-init--org)
(projectile .
detached-init--projectile)
(shell . detached-init--shell)
@@ -166,6 +168,14 @@
(defvar embark-detached-map (make-composed-keymap detached-action-map
embark-general-map))
(add-to-list 'embark-keymap-alist '(detached . embark-detached-map))))
+(defun detached-init--nano-modeline ()
+ "Initialize integration with `nano-modeline'."
+ (with-eval-after-load 'nano-modeline
+ (push `(detached-list-mode
+ :mode-p (lambda () (derived-mode-p 'detached-list-mode))
+ :format (lambda () (nano-modeline-render ""
(detached-list--mode-line-indicator) "" "")))
+ nano-modeline-mode-formats)))
+
(defun detached-init--detached-list ()
"Initialize `detached-list'."
;; Trigger initialization of sessions upon load of `detached-list'