[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106086: * lisp/mpc.el (mpc-songs-jum
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106086: * lisp/mpc.el (mpc-songs-jump-to): Don't burp if the user clicks in an |
Date: |
Fri, 14 Oct 2011 14:37:53 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106086
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2011-10-14 14:37:53 -0400
message:
* lisp/mpc.el (mpc-songs-jump-to): Don't burp if the user clicks in an
empty buffer.
modified:
lisp/ChangeLog
lisp/mpc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-14 18:36:33 +0000
+++ b/lisp/ChangeLog 2011-10-14 18:37:53 +0000
@@ -1,5 +1,8 @@
2011-10-14 Stefan Monnier <address@hidden>
+ * mpc.el (mpc-songs-jump-to): Don't burp if the user clicks in an
+ empty buffer.
+
* mouse.el (mouse-drag-mode-line-1): Modify the end-event we pushed on
unread-command-events rather than pushing yet-another event.
=== modified file 'lisp/mpc.el'
--- a/lisp/mpc.el 2011-10-05 00:56:26 +0000
+++ b/lisp/mpc.el 2011-10-14 18:37:53 +0000
@@ -1996,12 +1996,14 @@
(list (get-text-property (point) 'mpc-file)
posn))))
(let* ((plbuf (mpc-proc-cmd "playlist"))
- (re (concat "^\\([0-9]+\\):" (regexp-quote song-file) "$"))
+ (re (if song-file
+ (concat "^\\([0-9]+\\):" (regexp-quote song-file) "$")))
(sn (with-current-buffer plbuf
(goto-char (point-min))
- (when (re-search-forward re nil t)
+ (when (and re (re-search-forward re nil t))
(match-string 1)))))
(cond
+ ((null re) (posn-set-point posn))
((null sn) (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,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106086: * lisp/mpc.el (mpc-songs-jump-to): Don't burp if the user clicks in an,
Stefan Monnier <=