diff options
-rw-r--r-- | emms-lyrics.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/emms-lyrics.el b/emms-lyrics.el index 507b052..db38335 100644 --- a/emms-lyrics.el +++ b/emms-lyrics.el @@ -249,19 +249,20 @@ To find FILE, will look up in current directory and `emms-lyrics-dir'." (add-hook 'emms-player-finished-hook 'emms-lyrics-stop) (add-hook 'emms-player-paused-hook 'emms-lyrics-pause) (add-hook 'emms-player-seeked-functions 'emms-lyrics-seek) - (message "Displaying emms lyrics enabled.")) + (message "emms lyrics enabled.")) (defun emms-lyrics-disable () "Disable displaying emms lyrics." (interactive) - (setq emms-lyrics-display-p nil) (emms-lyrics-stop) + (setq emms-lyrics-display-p nil) + (emms-lyrics-restore-mode-line) (remove-hook 'emms-player-started-hook 'emms-lyrics-start) (remove-hook 'emms-player-stopped-hook 'emms-lyrics-stop) (remove-hook 'emms-player-finished-hook 'emms-lyrics-stop) (remove-hook 'emms-player-paused-hook 'emms-lyrics-pause) (remove-hook 'emms-player-seeked-functions 'emms-lyrics-seek) - (message "Displaying emms lyrics disabled.")) + (message "emms lyrics disabled.")) (defun emms-lyrics-toggle () "Toggle displaying emms lyrics." @@ -294,6 +295,12 @@ To find FILE, will look up in current directory and `emms-lyrics-dir'." (append global-mode-string '(emms-lyrics-mode-line-string))))) +(defun emms-lyrics-restore-mode-line () + "Restore the mode line." + (setq global-mode-string + (remove 'emms-lyrics-mode-line-string global-mode-string)) + (force-mode-line-update)) + (defun emms-lyrics-display (lyric) "Display lyric. |