aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mpc.el
diff options
context:
space:
mode:
authorStefan Monnier2011-03-01 00:03:24 -0500
committerStefan Monnier2011-03-01 00:03:24 -0500
commitd032d5e7dfabfae60f3304da02c97cd1e189b9a2 (patch)
tree64219849ec4b697e19a1da1c2a5786b61a2c3387 /lisp/mpc.el
parent39605a343b566a1a72e0afb61f96d085c2ef8054 (diff)
downloademacs-d032d5e7dfabfae60f3304da02c97cd1e189b9a2.tar.gz
emacs-d032d5e7dfabfae60f3304da02c97cd1e189b9a2.zip
* doc/lispref/variables.texi (Scope): Mention the availability of lexbind.
(Lexical Binding): New node. * doc/lispref/eval.texi (Eval): Add `eval's new `lexical' arg. * lisp/emacs-lisp/cconv.el (cconv-liftwhen): Increase threshold. (cconv-closure-convert-rec): Convert interactive spec in empty lexenv. (cconv-analyse-use): Improve unused vars warnings. (cconv-analyse-form): Analyze interactive spec in empty lexenv. * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Always byte-compile the interactive spec in lexical-binding mode. (byte-compile-refresh-preloaded): Don't reload byte-compiler files. * lisp/custom.el (custom-initialize-default): Use defvar. (custom-declare-variable): Set the special-variable-p flag. * lisp/help-fns.el (help-make-usage): Drop leading underscores. * lisp/dired.el (dired-revert, dired-make-relative): Mark unused args. (dired-unmark-all-files): Remove unused var `query'. (dired-overwrite-confirmed): Declare. (dired-restore-desktop-buffer): Don't use dynamically scoped arg names. * lisp/mpc.el: Mark unused args. (mpc--faster-toggle): Remove unused var `songnb'. * lisp/server.el (server-kill-buffer-running): Move before first use. * lisp/minibuffer.el: Mark unused args. * src/callint.c (quotify_arg): Simplify the logic. (Fcall_interactively): Use lexical binding when evaluating the interactive spec of a lexically bound function.
Diffstat (limited to 'lisp/mpc.el')
-rw-r--r--lisp/mpc.el21
1 files changed, 9 insertions, 12 deletions
diff --git a/lisp/mpc.el b/lisp/mpc.el
index 548fd17d038..10e8c9d7688 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -357,14 +357,14 @@ which will be concatenated with proper quoting before passing them to MPD."
357 (mapconcat 'mpc--proc-quote-string cmd " ")) 357 (mapconcat 'mpc--proc-quote-string cmd " "))
358 "\n"))) 358 "\n")))
359 (if callback 359 (if callback
360 (let ((buf (current-buffer))) 360 ;; (let ((buf (current-buffer)))
361 (process-put proc 'callback 361 (process-put proc 'callback
362 callback 362 callback
363 ;; (lambda () 363 ;; (lambda ()
364 ;; (funcall callback 364 ;; (funcall callback
365 ;; (prog1 (current-buffer) 365 ;; (prog1 (current-buffer)
366 ;; (set-buffer buf)))) 366 ;; (set-buffer buf)))))
367 )) 367 )
368 ;; If `callback' is nil, we're executing synchronously. 368 ;; If `callback' is nil, we're executing synchronously.
369 (process-put proc 'callback 'ignore) 369 (process-put proc 'callback 'ignore)
370 ;; This returns the process's buffer. 370 ;; This returns the process's buffer.
@@ -600,7 +600,7 @@ The songs are returned as alists."
600 (cond 600 (cond
601 ((eq tag 'Playlist) 601 ((eq tag 'Playlist)
602 ;; Special case for pseudo-tag playlist. 602 ;; Special case for pseudo-tag playlist.
603 (let ((l (condition-case err 603 (let ((l (condition-case nil
604 (mpc-proc-buf-to-alists 604 (mpc-proc-buf-to-alists
605 (mpc-proc-cmd (list "listplaylistinfo" value))) 605 (mpc-proc-cmd (list "listplaylistinfo" value)))
606 (mpc-proc-error 606 (mpc-proc-error
@@ -633,7 +633,7 @@ The songs are returned as alists."
633 (mpc-union (mpc-cmd-find tag1 value) 633 (mpc-union (mpc-cmd-find tag1 value)
634 (mpc-cmd-find tag2 value)))) 634 (mpc-cmd-find tag2 value))))
635 (t 635 (t
636 (condition-case err 636 (condition-case nil
637 (mpc-proc-buf-to-alists 637 (mpc-proc-buf-to-alists
638 (mpc-proc-cmd (list "find" (symbol-name tag) value))) 638 (mpc-proc-cmd (list "find" (symbol-name tag) value)))
639 (mpc-proc-error 639 (mpc-proc-error
@@ -935,7 +935,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
935 935
936(defun mpc-tempfiles-clean () 936(defun mpc-tempfiles-clean ()
937 (let ((live ())) 937 (let ((live ()))
938 (maphash (lambda (k v) (push v live)) mpc-tempfiles-reftable) 938 (maphash (lambda (_k v) (push v live)) mpc-tempfiles-reftable)
939 (dolist (f mpc-tempfiles) 939 (dolist (f mpc-tempfiles)
940 (unless (member f live) (ignore-errors (delete-file f)))) 940 (unless (member f live) (ignore-errors (delete-file f))))
941 (setq mpc-tempfiles live))) 941 (setq mpc-tempfiles live)))
@@ -1159,7 +1159,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
1159 (mpc-status-mode)) 1159 (mpc-status-mode))
1160 (mpc-proc-buffer (mpc-proc) 'status buf)) 1160 (mpc-proc-buffer (mpc-proc) 'status buf))
1161 (if (null songs-win) (pop-to-buffer buf) 1161 (if (null songs-win) (pop-to-buffer buf)
1162 (let ((win (split-window songs-win 20 t))) 1162 (let ((_win (split-window songs-win 20 t)))
1163 (set-window-dedicated-p songs-win nil) 1163 (set-window-dedicated-p songs-win nil)
1164 (set-window-buffer songs-win buf) 1164 (set-window-buffer songs-win buf)
1165 (set-window-dedicated-p songs-win 'soft))))) 1165 (set-window-dedicated-p songs-win 'soft)))))
@@ -2385,15 +2385,13 @@ This is used so that they can be compared with `eq', which is needed for
2385 (mpc--faster-stop) 2385 (mpc--faster-stop)
2386 (mpc-status-refresh) (mpc-proc-sync) 2386 (mpc-status-refresh) (mpc-proc-sync)
2387 (let* (songid ;The ID of the currently ffwd/rewinding song. 2387 (let* (songid ;The ID of the currently ffwd/rewinding song.
2388 songnb ;The position of that song in the playlist.
2389 songduration ;The duration of that song. 2388 songduration ;The duration of that song.
2390 songtime ;The time of the song last time we ran. 2389 songtime ;The time of the song last time we ran.
2391 oldtime ;The timeoftheday last time we ran. 2390 oldtime ;The timeoftheday last time we ran.
2392 prevsongid) ;The song we're in the process leaving. 2391 prevsongid) ;The song we're in the process leaving.
2393 (let ((fun 2392 (let ((fun
2394 (lambda () 2393 (lambda ()
2395 (let ((newsongid (cdr (assq 'songid mpc-status))) 2394 (let ((newsongid (cdr (assq 'songid mpc-status))))
2396 (newsongnb (cdr (assq 'song mpc-status))))
2397 2395
2398 (if (and (equal prevsongid newsongid) 2396 (if (and (equal prevsongid newsongid)
2399 (not (equal prevsongid songid))) 2397 (not (equal prevsongid songid)))
@@ -2444,8 +2442,7 @@ This is used so that they can be compared with `eq', which is needed for
2444 (mpc-proc-cmd 2442 (mpc-proc-cmd
2445 (list "seekid" songid songtime) 2443 (list "seekid" songid songtime)
2446 'mpc-status-refresh) 2444 'mpc-status-refresh)
2447 (mpc-proc-error (mpc-status-refresh))))))) 2445 (mpc-proc-error (mpc-status-refresh)))))))))))
2448 (setq songnb newsongnb)))))
2449 (setq mpc--faster-toggle-forward (> step 0)) 2446 (setq mpc--faster-toggle-forward (> step 0))
2450 (funcall fun) ;Initialize values. 2447 (funcall fun) ;Initialize values.
2451 (setq mpc--faster-toggle-timer 2448 (setq mpc--faster-toggle-timer