emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ement 26be559103 2/2: Add: (ement-room-list-space-prefi


From: ELPA Syncer
Subject: [elpa] externals/ement 26be559103 2/2: Add: (ement-room-list-space-prefix)
Date: Sat, 7 Oct 2023 09:57:58 -0400 (EDT)

branch: externals/ement
commit 26be559103eb070ea4f31dfa7ac9425235c105a9
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Add: (ement-room-list-space-prefix)
---
 README.org         | 1 +
 ement-room-list.el | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 56a379b434..4b788fa906 100644
--- a/README.org
+++ b/README.org
@@ -298,6 +298,7 @@ Ement.el doesn't support encrypted rooms natively, but it 
can be used transparen
 *Additions*
 
 + Customization group ~ement-room-list~.
++ Option ~ement-room-list-space-prefix~ is applied to space names in the room 
list (e.g. set to empty string for cleaner appearance).
 
 ** 0.13
 
diff --git a/ement-room-list.el b/ement-room-list.el
index e321de502e..867c150198 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -111,6 +111,10 @@ Set automatically when `ement-room-list-mode' is 
activated.")
   "Show room avatars in the room list."
   :type 'boolean)
 
+(defcustom ement-room-list-space-prefix "Space: "
+  "Prefix applied to space names."
+  :type 'string)
+
 ;;;;; Faces
 
 (defface ement-room-list-direct
@@ -209,7 +213,7 @@ from recent to non-recent for rooms updated in the past 
hour.")
                          (space-name (if parent-room
                                          (ement-room-display-name parent-room)
                                        id)))
-                    (concat "Space: " space-name))))
+                    (concat ement-room-list-space-prefix space-name))))
       (when-let ((key (if id
                           ;; ID specified.
                           (cond ((or (member id parents)
@@ -219,7 +223,7 @@ from recent to non-recent for rooms updated in the past 
hour.")
                                 ((and (equal type "m.space")
                                       (equal id (ement-room-id room)))
                                  ;; Room is a specified space.
-                                 (or name (concat "Space: " 
(ement-room-display-name room)))))
+                                 (or name (concat ement-room-list-space-prefix 
(ement-room-display-name room)))))
                         ;; ID not specified.
                         (pcase (length parents)
                           (0 nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]