[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116914: * lisp/mpc.el (mpc--status-timer-run): D
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 r116914: * lisp/mpc.el (mpc--status-timer-run): Disable timer if not displayed. |
Date: |
Sun, 06 Apr 2014 13:08:05 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116914
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-04-06 09:08:00 -0400
message:
* lisp/mpc.el (mpc--status-timer-run): Disable timer if not displayed.
(mpc--status-idle-timer-run): Use mpc--status-timer-run.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/mpc.el mpc.el-20091201190351-ubdosyf8lle4bzd3-10
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-04-05 18:33:55 +0000
+++ b/lisp/ChangeLog 2014-04-06 13:08:00 +0000
@@ -1,3 +1,8 @@
+2014-04-06 Stefan Monnier <address@hidden>
+
+ * mpc.el (mpc--status-timer-run): Disable timer if not displayed.
+ (mpc--status-idle-timer-run): Use mpc--status-timer-run.
+
2014-04-05 Glenn Morris <address@hidden>
* help.el (view-lossage): Doc tweak.
@@ -13,15 +18,14 @@
face-spec-choose. (Bug#16378)
(make-face-x-resource-internal): Do nothing when
inhibit-x-resources is non-nil. Don't touch the default face if
- reversed video is given--as was done in previous versions of
- Emacs.
+ reversed video is given--as was done in previous versions of Emacs.
(face-set-after-frame-default): Don't call
make-face-x-resource-internal here. (Bug#16434)
2014-04-04 Tassilo Horn <address@hidden>
- * doc-view.el (doc-view-bookmark-jump): Use
- `bookmark-after-jump-hook' to jump to the right page after the
+ * doc-view.el (doc-view-bookmark-jump):
+ Use `bookmark-after-jump-hook' to jump to the right page after the
buffer is shown in a window. (bug#16090)
2014-04-04 Eli Zaretskii <address@hidden>
=== modified file 'lisp/mpc.el'
--- a/lisp/mpc.el 2014-01-01 07:43:34 +0000
+++ b/lisp/mpc.el 2014-04-06 13:08:00 +0000
@@ -491,9 +491,13 @@
(cancel-timer mpc--status-timer)
(setq mpc--status-timer nil)))
(defun mpc--status-timer-run ()
- (with-demoted-errors "MPC: %s"
+ (with-demoted-errors "MPC: %S"
(when (process-get (mpc-proc) 'ready)
- (with-local-quit (mpc-status-refresh)))))
+ (let* ((buf (mpc-proc-buffer (mpc-proc) 'status))
+ (win (get-buffer-window buf t)))
+ (if (not win)
+ (mpc--status-timer-stop)
+ (with-local-quit (mpc-status-refresh)))))))
(defvar mpc--status-idle-timer nil)
(defun mpc--status-idle-timer-start ()
@@ -518,10 +522,8 @@
;; client starts playback, we may get a chance to notice it.
(run-with-idle-timer 10 t 'mpc--status-idle-timer-run))))
(defun mpc--status-idle-timer-run ()
- (when (process-get (mpc-proc) 'ready)
- (with-demoted-errors "MPC: %s"
- (with-local-quit (mpc-status-refresh))))
- (mpc--status-timer-start))
+ (mpc--status-timer-start)
+ (mpc--status-timer-run))
(defun mpc--status-timers-refresh ()
"Start/stop the timers according to whether a song is playing."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116914: * lisp/mpc.el (mpc--status-timer-run): Disable timer if not displayed.,
Stefan Monnier <=