[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/rich-minority 72183e5 02/20: Merge pull request #12 fro
From: |
Stefan Monnier |
Subject: |
[elpa] externals/rich-minority 72183e5 02/20: Merge pull request #12 from cpitclaudel/master |
Date: |
Mon, 15 Mar 2021 22:22:02 -0400 (EDT) |
branch: externals/rich-minority
commit 72183e510bd5ef94e49b9cd2c9fe8dbe1581d4ca
Merge: 311ac8e 0e81a65
Author: Artur Malabarba <Malabarba@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #12 from cpitclaudel/master
Add mode name to minor modes tooltip
---
rich-minority.el | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/rich-minority.el b/rich-minority.el
index 78a4166..01a8099 100644
--- a/rich-minority.el
+++ b/rich-minority.el
@@ -177,15 +177,27 @@ These properties take priority over those defined in
(defvar-local rm--help-echo nil
"Used to set the help-echo string dynamically.")
+(defun rm-format-mode-line-entry (entry)
+ "Format an ENTRY of `minor-mode-alist'.
+Return a cons of the mode line string and the mode name, or nil
+if the mode line string is empty."
+ (let ((mode-symbol (car entry))
+ (mode-string (format-mode-line entry)))
+ (unless (string= mode-string "")
+ (cons mode-string mode-symbol))))
+
;;;###autoload
(defun rm--mode-list-as-string-list ()
"Return `minor-mode-list' as a simple list of strings."
- (let ((full-list (delete "" (mapcar #'format-mode-line minor-mode-alist))))
+ (let ((full-list (delq nil (mapcar #'rm-format-mode-line-entry
+ minor-mode-alist))))
(setq rm--help-echo
- (format "Full list:\n %s\n\n%s"
- (mapconcat 'identity full-list "\n ")
+ (format "Full list:\n%s\n\n%s"
+ (mapconcat (lambda (pair)
+ (format " %s (%S)" (car pair) (cdr pair)))
+ full-list "\n")
rm--help-echo-bottom))
- (mapcar #'rm--propertize
+ (mapcar (lambda (pair) (rm--propertize (car pair)))
(rm--remove-hidden-modes full-list))))
(defcustom rm-base-text-properties
- [elpa] externals/rich-minority updated (311ac8e -> a03e693), Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 0e81a65 01/20: Add mode name to minor modes tooltip, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 72183e5 02/20: Merge pull request #12 from cpitclaudel/master,
Stefan Monnier <=
- [elpa] externals/rich-minority a18097b 05/20: Fix alignment of mode names in tooltip, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 93d44e4 09/20: Move license to GPL3+, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority c0960fd 03/20: Fix blacklist feature broken by the previous commit, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 478f0fb 06/20: Merge pull request #14 from cpitclaudel/master, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 5f01a29 07/20: Provide rm-blacklist configuration example (Source: issue 108), Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 3201f6e 12/20: Shorten readme a bit, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority f8541d9 04/20: Add some padding between mode-string and mode-name, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 8dbc001 08/20: Add "Blacklist all minor modes" example, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority 5839ee4 15/20: Move a lambda to a global function to reduce memory usage -- Fix #20, Stefan Monnier, 2021/03/15
- [elpa] externals/rich-minority d33d2e3 18/20: Version 1.0.3, Stefan Monnier, 2021/03/15