diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/jao-lyrics.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/jao-lyrics.el b/net/jao-lyrics.el index 1967b3f..6f11381 100644 --- a/net/jao-lyrics.el +++ b/net/jao-lyrics.el @@ -115,10 +115,14 @@ (prog1 (jao-lyrics--get-cached artist title) (message nil)))) (defvar jao-lyrics-info-function) +(defvar-local jao-lyrics--info-function nil) +;;;###autoload (defun jao-show-lyrics (&optional force info-function) (interactive "P") - (let* ((a/t (funcall (or info-function jao-lyrics-info-function))) + (let* ((a/t (funcall (or info-function + jao-lyrics--info-function + jao-lyrics-info-function))) (artist (car a/t)) (title (cdr a/t)) (artist (if force (read-string "Artist: " artist) artist)) @@ -131,6 +135,8 @@ (jao-lyrics--download "" title artist))) (inhibit-read-only t)) (with-current-buffer buffer + (when info-function + (setq-local jao-lyrics--info-function info-function)) (delete-region (point-min) (point-max)) (insert (format "♪ %s - %s\n\n" (propertize artist 'face 'jao-lyrics-font-lock-artist) |