aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/mpc.el9
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0de3533c6c4..4f5d0734aec 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12014-05-12 Stefan Monnier <monnier@iro.umontreal.ca> 12014-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * mpc.el (mpc-format): Trim Date to the year.
4 (mpc-songs-hashcons): Shorten the Date field.
5
3 * emacs-lisp/nadvice.el (advice--interactive-form): Don't get fooled 6 * emacs-lisp/nadvice.el (advice--interactive-form): Don't get fooled
4 into autoloading just because of a silly indirection. 7 into autoloading just because of a silly indirection.
5 8
diff --git a/lisp/mpc.el b/lisp/mpc.el
index d569610a615..d03edf86bba 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1024,7 +1024,12 @@ If PLAYLIST is t or nil or missing, use the main playlist."
1024 (when (and (null val) (eq tag 'Title)) 1024 (when (and (null val) (eq tag 'Title))
1025 (setq val (cdr (assq 'file info)))) 1025 (setq val (cdr (assq 'file info))))
1026 (push `(equal ',val (cdr (assq ',tag info))) pred) 1026 (push `(equal ',val (cdr (assq ',tag info))) pred)
1027 val))))) 1027 (cond
1028 ((not (and (eq tag 'Date) (stringp val))) val)
1029 ;; For "date", only keep the year!
1030 ((string-match "[0-9]\\{4\\}" val)
1031 (match-string 0 val))
1032 (t val)))))))
1028 (space (when size 1033 (space (when size
1029 (setq size (string-to-number size)) 1034 (setq size (string-to-number size))
1030 (propertize " " 'display 1035 (propertize " " 'display
@@ -1866,7 +1871,7 @@ This is used so that they can be compared with `eq', which is needed for
1866`text-property-any'.") 1871`text-property-any'.")
1867(defun mpc-songs-hashcons (name) 1872(defun mpc-songs-hashcons (name)
1868 (or (gethash name mpc-songs-hashcons) (puthash name name mpc-songs-hashcons))) 1873 (or (gethash name mpc-songs-hashcons) (puthash name name mpc-songs-hashcons)))
1869(defcustom mpc-songs-format "%2{Disc--}%3{Track} %-5{Time} %25{Title} %20{Album} %20{Artist} %10{Date}" 1874(defcustom mpc-songs-format "%2{Disc--}%3{Track} %-5{Time} %25{Title} %20{Album} %20{Artist} %5{Date}"
1870 "Format used to display each song in the list of songs." 1875 "Format used to display each song in the list of songs."
1871 :type 'string) 1876 :type 'string)
1872 1877