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

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

[elpa] externals/emms f79343b 2/4: * emms-mode-line-icon.el: hiding icon


From: Yoni Rabkin
Subject: [elpa] externals/emms f79343b 2/4: * emms-mode-line-icon.el: hiding icon made easy
Date: Wed, 14 Apr 2021 10:02:34 -0400 (EDT)

branch: externals/emms
commit f79343bf03f6ece09638ec27eeb831c0abe59667
Author: Yoni Rabkin <yoni@rabkins.net>
Commit: Yoni Rabkin <yoni@rabkins.net>

    * emms-mode-line-icon.el: hiding icon made easy
    
    It is now possible to easily hide the mode-line icon. The manual as been
    updated with this information as well.
---
 doc/emms.texinfo       |  9 +++++++++
 emms-mode-line-icon.el | 18 ++++++++++++------
 emms.info              | 47 +++++++++++++++++++++++++++--------------------
 3 files changed, 48 insertions(+), 26 deletions(-)

diff --git a/doc/emms.texinfo b/doc/emms.texinfo
index 2638b3a..77c27b2 100644
--- a/doc/emms.texinfo
+++ b/doc/emms.texinfo
@@ -2355,6 +2355,15 @@ To use this feature invoke:
 (emms-playing-time 1)
 @end lisp
 
+A graphical icon can be displayed in the modeline when Emms is
+playing. This feature is provided by @file{emms-mode-line-icon.el}. To
+enable invoke the following and make sure that
+@var{emms-mode-line-icon-enabled-p} is set to a non-nil value:
+
+@lisp
+(require emms-mode-line-icon)
+@end lisp
+
 Note: `(emms-playing-time -1)' will disable emms-playing-time module
 completely, and is not recommended. (since some other emms modules may
 rely on it)
diff --git a/emms-mode-line-icon.el b/emms-mode-line-icon.el
index 7d54d7e..46bc4e7 100644
--- a/emms-mode-line-icon.el
+++ b/emms-mode-line-icon.el
@@ -33,6 +33,10 @@
 
 (require 'emms-mode-line)
 
+
+(defvar emms-mode-line-icon-enabled-p t
+  "Disable icon display when NIL.")
+
 (defvar emms-mode-line-icon-color "black"
   "Color of the little icon displayed in the mode-line.")
 
@@ -64,12 +68,14 @@ static char *note[] = {
 \"#######..#\"};")))
 
 (defun emms-mode-line-icon-function ()
-  (concat " "
-          emms-mode-line-icon-before-format
-          (emms-propertize "NP:" 'display
-                          (emms-mode-line-icon-generate
-                           emms-mode-line-icon-color))
-          (emms-mode-line-playlist-current)))
+  (if emms-mode-line-icon-enabled-p
+      (concat " "
+              emms-mode-line-icon-before-format
+              (emms-propertize "NP:" 'display
+                              (emms-mode-line-icon-generate
+                               emms-mode-line-icon-color))
+              (emms-mode-line-playlist-current))
+    (emms-mode-line-playlist-current)))
 
 (setq emms-mode-line-mode-line-function 'emms-mode-line-icon-function)
 
diff --git a/emms.info b/emms.info
index 32238b4..06fffd2 100644
--- a/emms.info
+++ b/emms.info
@@ -1957,6 +1957,13 @@ which is provided by the file 'emms-playing-time.el'.
      (require 'emms-playing-time)
      (emms-playing-time 1)
 
+   A graphical icon can be displayed in the modeline when Emms is
+playing.  This feature is provided by 'emms-mode-line-icon.el'.  To
+enable invoke the following and make sure that
+EMMS-MODE-LINE-ICON-ENABLED-P is set to a non-nil value:
+
+     (require emms-mode-line-icon)
+
    Note: '(emms-playing-time -1)' will disable emms-playing-time module
 completely, and is not recommended.  (since some other emms modules may
 rely on it)
@@ -3775,8 +3782,8 @@ Function Index
 * emms-player-start:                     Core Functions.      (line  58)
 * emms-player-stop:                      Core Functions.      (line  60)
 * emms-player-stopped:                   Core Functions.      (line  62)
-* emms-playing-time-disable-display:     Emms Mode Line.      (line  35)
-* emms-playing-time-enable-display:      Emms Mode Line.      (line  32)
+* emms-playing-time-disable-display:     Emms Mode Line.      (line  42)
+* emms-playing-time-enable-display:      Emms Mode Line.      (line  39)
 * emms-playlist-current-selected-track:  Core Functions.      (line  53)
 * emms-playlist-limit-to-all:            Limiting.            (line  61)
 * emms-playlist-limit-to-description:    Limiting.            (line  31)
@@ -4029,23 +4036,23 @@ Node: Sorting Playlists63407
 Node: Persistent Playlists64876
 Node: Editing Tracks66035
 Node: Emms Mode Line69709
-Node: Limiting70877
-Node: Music Player Daemon73216
-Node: Lyrics76729
-Node: Volume78777
-Node: Streaming Audio80565
-Ref: Streaming Audio-Footnote-181157
-Node: APE / FLAC Commands81508
-Node: Bookmarks82215
-Node: Managing Playlists82926
-Node: GNU FM83949
-Node: Uploading Track Information85303
-Node: GNU FM Streaming86185
-Node: Copying86685
-Node: The GNU FDL124202
-Node: Concept Index146590
-Node: Function Index151448
-Node: Variable Index167140
-Node: Keybinding Index169609
+Node: Limiting71152
+Node: Music Player Daemon73491
+Node: Lyrics77004
+Node: Volume79052
+Node: Streaming Audio80840
+Ref: Streaming Audio-Footnote-181432
+Node: APE / FLAC Commands81783
+Node: Bookmarks82490
+Node: Managing Playlists83201
+Node: GNU FM84224
+Node: Uploading Track Information85578
+Node: GNU FM Streaming86460
+Node: Copying86960
+Node: The GNU FDL124477
+Node: Concept Index146865
+Node: Function Index151723
+Node: Variable Index167415
+Node: Keybinding Index169884
 
 End Tag Table



reply via email to

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