;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\307\310\311\312\313\301%\210\314\315\316\317\320DD\321\322\323%\210\314\324\316\317\325DD\326\322\323%\210\314\327\316\317\330DD\331\322\323%\210\314\332\316\317\333DD\334\322\335%\210\314\336\316\317\337DD\340\322\335%\210\314\341\316\317\342DD\343\322\344%\210\314\345\316\317\346DD\347\322\350%\210\314\351\316\317\352DD\353\322\354%\210\314\355\316\317\356DD\357\322\323%\210\314\360\316\317\361DD\362\322\363%\207" [require emms emms-player-simple emms-source-file time-date emms-url emms-compat custom-declare-group emms-lyrics nil "Lyrics module for EMMS." :group custom-declare-variable emms-lyrics-display-on-modeline funcall function #[0 "\300\207" [t] 1] "If non-nil, display lyrics on mode line." :type boolean emms-lyrics-display-on-minibuffer #[0 "\300\207" [nil] 1] "If non-nil, display lyrics on minibuffer." emms-lyrics-display-buffer #[0 "\300\207" [nil] 1] "Non-nil will create deciated `emms-lyrics-buffer' to display lyrics." emms-lyrics-dir #[0 "\300\207" [#1="~/music/lyrics"] 1 #1#] "Local lyrics repository.\n`emms-lyrics-find-lyric' will look for lyrics in current directory(i.e.,\nsame as the music file) and this directory." string emms-lyrics-display-format #[0 "\300\207" [#2=" %s "] 1 #2#] "Format for displaying lyrics." emms-lyrics-coding-system #[0 "\300\207" [nil] 1] "Coding system for reading lyrics files.\n\nIf all your lyrics use the same coding system, you can set this\nvariable to that value; else you'd better leave it to nil, and\nrely on `prefer-coding-system', `file-coding-system-alist' or\n(info \"(emacs)File Variables\"), sorted by priority\nincreasingly." coding-system emms-lyrics-mode-hook #[0 "\300\207" [nil] 1] "Normal hook run after entering Emms Lyric mode." hook emms-lyrics-find-lyric-function #[0 "\300\207" [emms-lyrics-find-lyric] 1] "Function for finding lyric files." symbol emms-lyrics-scroll-p #[0 "\300\207" [t] 1] "Non-nil value will enable lyrics scrolling on mode line.\n\nNote: Even if this is set to t, it also depends on\n`emms-lyrics-display-on-modeline' to be t." emms-lyrics-scroll-timer-interval #[0 "\300\207" [0.4] 1] "Interval between scroller timers. The shorter, the faster." number] 6) #@33 If non-nil, will diplay lyrics. (defvar emms-lyrics-display-p t (#$ . 2349)) #@16 Current lyric. (defvar emms-lyrics-mode-line-string "" (#$ . 2432)) #@24 Buffer to show lyrics. (defvar emms-lyrics-buffer nil (#$ . 2506)) #@93 URL used to find Chinese lyrics. Should contain one %s which is replaced with the filename. (defvar emms-lyrics-chinese-url "http://mp3.baidu.com/m?f=ms&rn=10&tn=baidump3lyric&ct=150994944&word=%s&lm=-1" (#$ . 2579)) #@133 URL used to find Latin lyrics. Should contain two %s-expressions. The first is replaced with the artist and second with the title. (defvar emms-lyrics-latin-url "http://lyrics.wikia.com/%s%s" (#$ . 2803)) #@32 Enable displaying emms lyrics. (defalias 'emms-lyrics-enable #[0 "\300\301!\210\302\303!\207" [emms-lyrics 1 message "emms lyrics enabled."] 2 (#$ . 3015) nil]) #@33 Disable displaying emms lyrics. (defalias 'emms-lyrics-disable #[0 "\300\301!\210\302\303!\207" [emms-lyrics -1 message "EMMS lyrics disabled"] 2 (#$ . 3182) nil]) #@32 Toggle displaying emms lyrics. (defalias 'emms-lyrics-toggle #[0 "\203\301 \207\302 \207" [emms-lyrics-display-p emms-lyrics-disable emms-lyrics-enable] 1 (#$ . 3352) nil]) #@38 Toggle display lyrics on minibbufer. (defalias 'emms-lyrics-toggle-display-on-minibuffer #[0 "\203\n\301\302\303!\207\304\302\305!\207" [emms-lyrics-display-on-minibuffer nil message "Disable lyrics on minibufer" t "Enable lyrics on minibufer"] 2 (#$ . 3534) nil]) #@37 Toggle display lyrics on mode line. (defalias 'emms-lyrics-toggle-display-on-modeline #[0 "\203\f\302\303\304\305!\207\306\304\307!\207" [emms-lyrics-display-on-modeline emms-lyrics-mode-line-string nil "" message "Disable lyrics on mode line" t "Enable lyrics on mode line"] 2 (#$ . 3809) nil]) #@45 Toggle showing/hiding `emms-lyrics-buffer'. (defalias 'emms-lyrics-toggle-display-buffer #[0 "\301!\211\203 \302!\207\303 r\304\305\"\216\306!\210\307\310\"*\207" [emms-lyrics-buffer get-buffer-window delete-window internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] pop-to-buffer set-window-dedicated-p t] 5 (#$ . 4116) nil]) #@74 Turn on emms lyrics display if ARG is positive, off otherwise. (fn ARG) (defalias 'emms-lyrics #[257 "\211\203*\211\301V\203*\302\303\304\305\"\210\303\306\307\"\210\303\310\307\"\210\303\311\312\"\210\303\313\314\"\210\303\315\316\"\207\307 \210\317\320 \210\321\304\305\"\210\321\306\307\"\210\321\310\307\"\210\321\311\312\"\210\321\313\314\"\210\321\315\316\"\207" [emms-lyrics-display-p 0 t add-hook emms-player-started-hook emms-lyrics-start emms-player-stopped-hook emms-lyrics-stop emms-player-finished-hook emms-player-paused-hook emms-lyrics-pause emms-player-seeked-functions emms-lyrics-seek emms-player-time-set-functions emms-lyrics-sync nil emms-lyrics-restore-mode-line remove-hook] 4 (#$ . 4519) "p"]) #@102 Visit playing track's lyric file. If we can't find it from local disk, then search it from internet. (defalias 'emms-lyrics-visit-lyric #[0 "\303 \304\305\"\306\307\310!\311Q\312\313!#!\211\203(\314!\203(\211\315\230\204(\316!\207\317\320!\210\304\321\"\2068\322\313!!\304\321\"\205C\304\323\"\324\325\"\203W\326 \327\330\331\"!\"\202j\326\n\203e\332!\333P\202f\315\332!#\334\335!\203\221\336\335!\210\334\337!\205\200\340\341\337\"\210\337\335!\210\211\203\215\342\341\"\210\210\202\225\343!\210\317\320!\207" [emms-lyrics-find-lyric-function emms-lyrics-chinese-url emms-lyrics-latin-url emms-playlist-current-selected-track emms-track-get name emms-replace-regexp-in-string "\\." file-name-extension "\\'" ".lrc" file-name-nondirectory file-exists-p "" find-file message "Lyric file does not exist on file-system. Searching online..." info-title file-name-sans-extension info-artist string-match "\\cc" format emms-url-quote-plus encode-coding-string gb2312 emms-url-quote-underscore ":" fboundp eww require eww-readable add-hook eww-after-render-hook remove-hook browse-url] 11 (#$ . 5250) nil]) #@101 a list of the form: '((time0 . lyric0) (time1 . lyric1)...)). In short, at time-i, display lyric-i. (defvar emms-lyrics-alist nil (#$ . 6390)) #@30 timers for displaying lyric. (defvar emms-lyrics-timers nil (#$ . 6539)) #@24 emms lyric start time. (defvar emms-lyrics-start-time nil (#$ . 6618)) #@24 emms lyric pause time. (defvar emms-lyrics-pause-time nil (#$ . 6695)) #@38 How long time has emms lyric played. (defvar emms-lyrics-elapsed-time 0 (#$ . 6772)) #@25 Lyrics scroller timers. (defvar emms-lyrics-scroll-timers nil (#$ . 6863)) #@378 Read a lyric file(LRC format). Optional CATCHUP is for recognizing `emms-lyrics-catchup'. FILE should end up with ".lrc", its content looks like one of the following: [1:39]I love you, Emacs! [00:39]I love you, Emacs! [00:39.67]I love you, Emacs! FILE should be under the same directory as the music file, or under `emms-lyrics-dir'. (fn FILE &optional CATCHUP) (defalias 'emms-lyrics-read-file #[513 "\211\204 !\262\205\202\304!\205\202\305\306\307\"r\211q\210\310\311\"\216 \312!\210\313\314\315\307#\203y\316\317!\317\320\321\322\320#\262\323\324\"\203t\316\317\"\323\325\"\326\327O!\330_\326TGSO!\\\262G\315O\262\331 BC\"\317\262\266\202:\266\202&\332 \333\"+\307\262\207" [emms-lyrics-find-lyric-function emms-lyrics-coding-system coding-system-for-read emms-lyrics-alist file-exists-p generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] emms-insert-file-contents search-forward-regexp "\\[[0-9:.]+\\].*" nil match-string 0 "" emms-replace-regexp-in-string ".*\\]" string-match "\\[[0-9:.]+\\]" ":" string-to-number 1 60 append sort #[514 "@@W\207" [] 4 "\n\n(fn A B)"]] 13 (#$ . 6945)]) #@51 Create `emms-lyrics-buffer' dedicated to lyrics.  (defalias 'emms-lyrics-create-buffer #[0 "\304\305!\211q\210\306\211\307 \210\310\311 \"\210eb\210\312 \210\313\211\207" [emms-lyrics-buffer buffer-read-only cursor-type emms-lyrics-alist get-buffer-create " *EMMS Lyrics*" nil erase-buffer mapc #[257 "\211A\300\261\207" ["\n"] 3 "\n\n(fn TIME-LYRIC)"] emms-activate-highlighting-mode t] 4 (#$ . 8158)]) #@26 Start displaying lryics. (defalias 'emms-lyrics-start #[0 "\304 \305\306\307\310 \311\"\312\313\314\315!\316Q\317\320!#!\262\205( \203&\321 \210\322 \207" [emms-lyrics-start-time emms-lyrics-pause-time emms-lyrics-elapsed-time emms-lyrics-display-buffer current-time nil 0 emms-track-get emms-playlist-current-selected-track name emms-lyrics-read-file emms-replace-regexp-in-string "\\." file-name-extension "\\'" ".lrc" file-name-nondirectory emms-lyrics-create-buffer emms-lyrics-set-timer] 7 (#$ . 8573)]) #@208 Catchup with later downloaded LRC file(full path). If you write some lyrics crawler, which is running asynchronically, then this function would be useful to call when the crawler finishes its job. (fn LRC) (defalias 'emms-lyrics-catchup #[257 "\303 \304\305\306\307\"\210\310 \210\311\312\313!!!\207" [emms-lyrics-start-time emms-lyrics-pause-time emms-lyrics-elapsed-time current-time nil 0 emms-lyrics-read-file t emms-lyrics-set-timer emms-lyrics-seek float-time time-since] 6 (#$ . 9097)]) #@25 Stop displaying lyrics. (defalias 'emms-lyrics-stop #[0 "\205\305\306 \"\210\n\203 \205\307\211\310\211\207" [emms-lyrics-alist emms-lyrics-timers emms-player-paused-p emms-player-stopped-p emms-lyrics-mode-line-string mapc emms-cancel-timer nil ""] 4 (#$ . 9604) nil]) #@26 Pause displaying lyrics. (defalias 'emms-lyrics-pause #[0 "\203\n\305 \202 \203\306\307 \n\"! \\\305 \f\205'\203%\310 \207\311 \207" [emms-player-paused-p emms-lyrics-pause-time emms-lyrics-start-time emms-lyrics-elapsed-time emms-lyrics-alist current-time float-time time-subtract emms-lyrics-stop emms-lyrics-set-timer] 4 (#$ . 9890)]) #@56 Seek forward or backward SEC seconds lyrics. (fn SEC) (defalias 'emms-lyrics-seek #[257 "\304\305 !!\\\\\211\306W\203\306\307 \n\205\" \310\311 \210\312 \207" [emms-lyrics-elapsed-time emms-lyrics-start-time emms-lyrics-alist emms-player-paused-p float-time time-since 0 current-time t emms-lyrics-stop emms-lyrics-set-timer] 6 (#$ . 10246)]) #@57 Synchronize the lyric display at SEC seconds. (fn SEC) (defalias 'emms-lyrics-sync #[257 "\302 \303\304!\207" [emms-lyrics-start-time emms-lyrics-elapsed-time current-time 0 emms-lyrics-seek] 3 (#$ . 10606)]) #@35 Set timers for displaying lyrics. (defalias 'emms-lyrics-set-timer #[0 "\303 \304\205V@@\nZ@AA\205A@@\nZA\205$A@AT\262\304V\203M\305\306\307\310\"\303\311\f\n\205H\n Z&C\"A\262\266\202\207" [emms-lyrics-timers emms-lyrics-alist emms-lyrics-elapsed-time nil 0 append run-at-time format "%d sec" emms-lyrics-display-handler] 17 (#$ . 10825)]) #@29 Add lyric to the mode line. (defalias 'emms-lyrics-mode-line #[0 "\204\301\302>?\205\303\304\"\211\207" [global-mode-string ("") emms-lyrics-mode-line-string append (emms-lyrics-mode-line-string)] 3 (#$ . 11207)]) #@24 Restore the mode line. (defalias 'emms-lyrics-restore-mode-line #[0 "\301\302\"\303 \207" [global-mode-string remove emms-lyrics-mode-line-string force-mode-line-update] 3 (#$ . 11436)]) #@170 DIFF is the timestamp differences between current LYRIC and NEXT-LYRIC; LINE corresponds line number for LYRIC in `emms-lyrics-buffer'. (fn LYRIC NEXT-LYRIC LINE DIFF) (defalias 'emms-lyrics-display-handler #[1028 "\303\304\"\"\210 \205\n\205\305#\207" [emms-lyrics-display-format emms-lyrics-display-on-modeline emms-lyrics-scroll-p emms-lyrics-display format emms-lyrics-scroll] 8 (#$ . 11632)]) #@150 Display LYRIC now. See `emms-lyrics-display-on-modeline' and `emms-lyrics-display-on-minibuffer' on how to config where to display. (fn LYRIC LINE) (defalias 'emms-lyrics-display #[514 "\2055 \203\306 \210\307 \210 \203\310\311 !\204\312!\210\f\2055r q\210\211\2054eb\210\211Sy\210\313 )\207" [emms-lyrics-alist emms-lyrics-display-on-modeline emms-lyrics-mode-line-string emms-lyrics-display-on-minibuffer emms-lyrics-display-buffer emms-lyrics-buffer emms-lyrics-mode-line force-mode-line-update minibuffer-window-active-p selected-window message emms-line-highlight] 4 (#$ . 12049)]) #@221 Return full path of found lrc FILE, or nil if not found. Use `emms-source-file-directory-tree-function' to find lrc FILE under current directory and `emms-lyrics-dir'. e.g., (emms-lyrics-find-lyric "abc.lrc") (fn FILE) (defalias 'emms-lyrics-find-lyric #[257 "\302 \303\304\305\"!P\306!\307=\203\310!\203\211\206! \"@\207" [emms-source-file-directory-tree-function emms-lyrics-dir emms-playlist-current-selected-track file-name-directory emms-track-get name emms-track-type file file-exists-p] 6 (#$ . 12657)]) #@148 Scroll LYRIC to left smoothly in DIFF seconds. DIFF is the timestamp differences between current LYRIC and NEXT-LYRIC. (fn LYRIC NEXT-LYRIC DIFF) (defalias 'emms-lyrics-scroll #[771 "\302!\262\303\304Q\305\211\3062EW\205D\307\310\303\311 GY\203/\303O\2023\312\306\313\"\303%C\" \\\262\211T\262\2020\207" [emms-lyrics-scroll-timers emms-lyrics-scroll-timer-interval floor nil " " 0 return append run-at-time emms-lyrics-display throw t] 15 (#$ . 13187)]) #@32 Keymap for `emms-lyrics-mode'. (defvar emms-lyrics-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\207" [make-sparse-keymap define-key "p" emms-lyrics-previous-line "n" emms-lyrics-next-line "i" emms-lyrics-insert-time] 5) (#$ . 13674)) #@69 The remainder of X divided by Y, with the same sign as X. (fn X Y) (defalias 'emms-lyrics-rem* #[514 "\300\"_Z\211\301U\203\301\207\301Y\301Y=\203\207\211Z\207" [floor 0] 7 (#$ . 13950)]) #@82 Insert lyric time in the form: [01:23.21], then goto the beginning of next line. (defalias 'emms-lyrics-insert-time #[0 "\302\303\304 \"! \\\305\306\245!\307_\307\245\305\310\306\"\307_!\311\245\312\313\314\315\316##c\266\317 \207" [emms-lyrics-start-time emms-lyrics-elapsed-time float-time time-subtract current-time floor 60 100 emms-lyrics-rem* 100.0 emms-replace-regexp-in-string " " "0" format "[%2d:%2d]" emms-lyrics-next-line] 10 (#$ . 14157) nil]) #@34 Goto the beginning of next line. (defalias 'emms-lyrics-next-line #[0 "\300y\207" [1] 1 (#$ . 14628) nil]) #@38 Goto the beginning of previous line. (defalias 'emms-lyrics-previous-line #[0 "\300y\207" [-1] 1 (#$ . 14741) nil]) (defvar emms-lyrics-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [emms-lyrics-mode-hook variable-documentation put "Hook run after entering Emms Lyric mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp emms-lyrics-mode-map definition-name emms-lyrics-mode] 4) (defvar emms-lyrics-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\317#\207" [emms-lyrics-mode-abbrev-table emms-lyrics-mode-map variable-documentation put purecopy "Keymap for `emms-lyrics-mode'." boundp emms-lyrics-mode-syntax-table definition-name emms-lyrics-mode (lambda (#1=#:def-tmp-var) (defvar emms-lyrics-mode-syntax-table #1#)) make-syntax-table "Syntax table for `emms-lyrics-mode'." (lambda (#1#) (defvar emms-lyrics-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `emms-lyrics-mode'." derived-mode-parent] 5) #@168 Major mode for creating lyric files. \{emms-lyrics-mode-map} This mode runs the hook `emms-lyrics-mode-hook', as the final or penultimate step during initialization. (defalias 'emms-lyrics-mode #[0 "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 \315\316!\210)\317\316!\207" [delay-mode-hooks major-mode mode-name emms-lyrics-mode-map emms-lyrics-mode-syntax-table emms-lyrics-mode-abbrev-table make-local-variable t kill-all-local-variables emms-lyrics-mode "Emms Lyric" use-local-map set-syntax-table run-hooks emms-lyrics-mode-hook run-mode-hooks local-abbrev-table] 2 (#$ . 16066) nil]) (provide 'emms-lyrics)