diff options
author | Ye Wenbin <wenbinye@gmail.com> | 2007-03-08 14:08:00 +0000 |
---|---|---|
committer | Ye Wenbin <wenbinye@gmail.com> | 2007-03-08 14:08:00 +0000 |
commit | a3a1a313469a1e4bf007fea48d866a4e985d7a45 (patch) | |
tree | 8555f97af031560791050ff7060f0402a4c58961 | |
parent | 2901997cb0343b6fd970402b8de5e52eadc712ff (diff) |
Obsolete emms-mark-unmark-regexp, use C-u M-x emms-mark-regexp instead
darcs-hash:20070308140837-94065-b6fdfb90c27a3f79de5f074d7c0d3096751e96f8.gz
-rw-r--r-- | emms-mark.el | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/emms-mark.el b/emms-mark.el index 802b1f6..da58d02 100644 --- a/emms-mark.el +++ b/emms-mark.el @@ -119,18 +119,21 @@ (interactive) (emms-mark-do-with-marked-track 'emms-mark-unmark-track)) -(defun emms-mark-regexp (regexp) - (interactive "sMark track match: ") - (save-excursion - (goto-char (point-min)) - (while (re-search-forward regexp nil t) - (emms-mark-track 1) - (forward-line 1)))) - -(defun emms-mark-unmark-regexp (regexp) - (interactive "sUnmark track match: ") - (let ((emms-mark-char ?\040)) - (emms-mark-regexp regexp))) +(defun emms-mark-regexp (regexp arg) + "Mark all tracks matching a regexp. A prefix argument means to +unmark them instead." + (interactive + (list + (read-from-minibuffer (if current-prefix-arg + "Mark track match: " + "Unmark track match: ")) + current-prefix-arg)) + (let ((emms-mark-char (if arg ?\040 ?*))) + (save-excursion + (goto-char (point-min)) + (while (re-search-forward regexp nil t) + (emms-mark-track 1) + (forward-line 1))))) (defun emms-mark-toggle () (interactive) @@ -227,7 +230,6 @@ collect the result of FUNC." (define-key map "U" 'emms-mark-unmark-all) (define-key map "t" 'emms-mark-toggle) (define-key map "%m" 'emms-mark-regexp) - (define-key map "%u" 'emms-mark-unmark-regexp) map)) (defun emms-mark-mode () |