diff options
author | Michael Olson <mwolson@gnu.org> | 2006-04-02 17:50:00 +0000 |
---|---|---|
committer | Michael Olson <mwolson@gnu.org> | 2006-04-02 17:50:00 +0000 |
commit | 29907737af89a046bd8f8e87ef83e7ccae8687ab (patch) | |
tree | 2bfa75da9b5c2365c92eff42af6b588a547c1ca9 | |
parent | 6c31e5abefd41045f9325827f6976d790f12fa82 (diff) |
Make sure that negated character classes in regexps include the newline character, so that there is no possibility of empty lines being matched.
darcs-hash:20060402175002-1bfb2-9f7ccf9489b3688d660b612a7243fe42e87e84e7.gz
-rw-r--r-- | emms-info-libtag.el | 2 | ||||
-rw-r--r-- | emms-info-mp3info.el | 2 | ||||
-rw-r--r-- | emms-player-mpd.el | 2 | ||||
-rw-r--r-- | emms-source-playlist.el | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/emms-info-libtag.el b/emms-info-libtag.el index 0e6e66e..f592539 100644 --- a/emms-info-libtag.el +++ b/emms-info-libtag.el @@ -59,7 +59,7 @@ nil t nil (emms-track-name track)))) (goto-char (point-min)) - (while (looking-at "^\\([^=]+\\)=\\(.*\\)$") + (while (looking-at "^\\([^=\n]+\\)=\\(.*\\)$") (let ((name (intern-soft (match-string 1))) (value (match-string 2))) (when (> (length value) diff --git a/emms-info-mp3info.el b/emms-info-mp3info.el index fade64e..870c0d9 100644 --- a/emms-info-mp3info.el +++ b/emms-info-mp3info.el @@ -84,7 +84,7 @@ This is a useful element for `emms-info-functions'." (emms-track-name track) emms-info-mp3find-arguments))) (goto-char (point-min)) - (while (looking-at "^\\([^=]+\\)=\\(.*\\)$") + (while (looking-at "^\\([^=\n]+\\)=\\(.*\\)$") (let ((name (intern (match-string 1))) (value (match-string 2))) (when (> (length value) diff --git a/emms-player-mpd.el b/emms-player-mpd.el index c59e715..15f02f5 100644 --- a/emms-player-mpd.el +++ b/emms-player-mpd.el @@ -311,7 +311,7 @@ Otherwise, it will be nil." (defun emms-player-mpd-parse-line (line) "Turn the given LINE from MusicPD into a cons cell. The format of the cell is (name . value)." - (when (string-match "\\`\\([^:]+\\):\\s-*\\(.+\\)" line) + (when (string-match "\\`\\([^:\n]+\\):\\s-*\\(.+\\)" line) (let ((name (match-string 1 line)) (value (match-string 2 line))) (if (and name value) diff --git a/emms-source-playlist.el b/emms-source-playlist.el index 1e4a6fb..37514a2 100644 --- a/emms-source-playlist.el +++ b/emms-source-playlist.el @@ -168,7 +168,7 @@ Empty lines and lines starting with '#' are ignored." (let ((files nil)) (save-excursion (goto-char (point-min)) - (while (re-search-forward "^[^# ].*$" nil t) + (while (re-search-forward "^[^# \n].*$" nil t) (setq files (cons (match-string 0) files)))) (nreverse files))) |