[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117914: * lisp/mpc.el (mpc-data-directory): Use loc
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r117914: * lisp/mpc.el (mpc-data-directory): Use locate-user-emacs-file. |
Date: |
Mon, 22 Sep 2014 13:43:03 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117914
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2014-09-22 09:42:57 -0400
message:
* lisp/mpc.el (mpc-data-directory): Use locate-user-emacs-file.
(mpc-volume-refresh): Make sure the corresponding header-line is updated.
(mpc-songs-jump-to, mpc-play): Use user-error.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/mpc.el mpc.el-20091201190351-ubdosyf8lle4bzd3-10
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-09-21 22:09:40 +0000
+++ b/lisp/ChangeLog 2014-09-22 13:42:57 +0000
@@ -1,3 +1,8 @@
+2014-09-22 Stefan Monnier <address@hidden>
+
+ * mpc.el (mpc-data-directory): Use locate-user-emacs-file.
+ (mpc-volume-refresh): Make sure the corresponding header-line is
updated.
+
2014-09-17 Tom Willemse <address@hidden> (tiny change)
* simple.el (clone-indirect-buffer): Mention the return value
=== modified file 'lisp/mpc.el'
--- a/lisp/mpc.el 2014-08-12 16:16:00 +0000
+++ b/lisp/mpc.el 2014-09-22 13:42:57 +0000
@@ -1,4 +1,4 @@
-;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8;
lexical-binding: t -*-
+;;; mpc.el --- A client for the Music Player Daemon -*- lexical-binding: t
-*-
;; Copyright (C) 2006-2014 Free Software Foundation, Inc.
@@ -891,9 +891,7 @@
:type '(choice (const nil) directory))
(defcustom mpc-data-directory
- (if (and (not (file-directory-p "~/.mpc"))
- (file-directory-p "~/.emacs.d"))
- "~/.emacs.d/mpc" "~/.mpc")
+ (locate-user-emacs-file "mpc" ".mpc")
"Directory where MPC.el stores auxiliary data."
:type 'directory)
@@ -1807,7 +1805,9 @@
;; Maintain the volume.
(setq mpc-volume
(mpc-volume-widget
- (string-to-number (cdr (assq 'volume mpc-status))))))
+ (string-to-number (cdr (assq 'volume mpc-status)))))
+ (let ((status-buf (mpc-proc-buffer (mpc-proc) 'status)))
+ (when status-buf (with-current-buffer status-buf
(force-mode-line-update)))))
(defvar mpc-volume-step 5)
@@ -2036,7 +2036,7 @@
(match-string 1)))))
(cond
((null re) (posn-set-point posn))
- ((null sn) (error "This song is not in the playlist"))
+ ((null sn) (user-error "This song is not in the playlist"))
((null (with-current-buffer plbuf (re-search-forward re nil t)))
;; song-file only appears once in the playlist: no ambiguity,
;; we're good to go!
@@ -2346,7 +2346,7 @@
(if (mpc-playlist-add)
(if (member (cdr (assq 'state (mpc-cmd-status))) '("stop"))
(mpc-cmd-play))
- (error "Don't know what to play"))))
+ (user-error "Don't know what to play"))))
(defun mpc-next ()
"Jump to the next song in the queue."
@@ -2610,7 +2610,8 @@
(mpc-cmd-move (let ((poss '()))
(dotimes (i (length songs))
(push (+ i (length pl)) poss))
- (nreverse poss)) dest-pos mpc-songs-playlist)
+ (nreverse poss))
+ dest-pos mpc-songs-playlist)
(message "Added %d songs" (length songs)))))
(mpc-songs-refresh))
(t
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117914: * lisp/mpc.el (mpc-data-directory): Use locate-user-emacs-file.,
Stefan Monnier <=