Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
400e8286
Commit
400e8286
authored
May 12, 2014
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/mpc.el (mpc-format): Trim Date to the year.
(mpc-songs-hashcons): Shorten the Date field.
parent
9ce28d80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/mpc.el
lisp/mpc.el
+7
-2
No files found.
lisp/ChangeLog
View file @
400e8286
2014-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
* mpc.el (mpc-format): Trim Date to the year.
(mpc-songs-hashcons): Shorten the Date field.
* emacs-lisp/nadvice.el (advice--interactive-form): Don't get fooled
into autoloading just because of a silly indirection.
...
...
lisp/mpc.el
View file @
400e8286
...
...
@@ -1024,7 +1024,12 @@ If PLAYLIST is t or nil or missing, use the main playlist."
(when (and (null val) (eq tag 'Title))
(setq val (cdr (assq 'file info))))
(push `(equal ',val (cdr (assq ',tag info))) pred)
val)))))
(cond
((not (and (eq tag 'Date) (stringp val))) val)
;; For "
date
", only keep the year!
((string-match "
[0-9]\\{4\\}
" val)
(match-string 0 val))
(t val)))))))
(space (when size
(setq size (string-to-number size))
(propertize "
" 'display
...
...
@@ -1866,7 +1871,7 @@ This is used so that they can be compared with `eq', which is needed for
`
text-property-any
'.
")
(defun mpc-songs-hashcons (name)
(or (gethash name mpc-songs-hashcons) (puthash name name mpc-songs-hashcons)))
(defcustom mpc-songs-format "
%2{Disc--}%3{Track}
%-5{Time}
%25{Title}
%20{Album}
%20{Artist}
%
10
{Date}
"
(defcustom mpc-songs-format "
%2{Disc--}%3{Track}
%-5{Time}
%25{Title}
%20{Album}
%20{Artist}
%
5
{Date}
"
"
Format
used
to
display
each
song
in
the
list
of
songs.
"
:type 'string)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment