diff options
author | forcer <forcer> | 2006-06-07 20:23:00 +0000 |
---|---|---|
committer | forcer <mwolson@gnu.org> | 2006-06-07 20:23:00 +0000 |
commit | f9212a8941c84f9b1fe0056f0901b7e847367564 (patch) | |
tree | abf583dcedb50674fa0ef4fe044fa4fa895c4f17 | |
parent | 96a3ac588fbbd593558a305d95039abe8474a63c (diff) |
emms.el, simplified emms-property-region considerably.
darcs-hash:20060607202310-2189f-16435d8796c61ef090f2215117e8042a482fde2b.gz
-rw-r--r-- | emms.el | 23 |
1 files changed, 4 insertions, 19 deletions
@@ -1026,25 +1026,10 @@ ignore this." ;;; Helper functions (defun emms-property-region (pos prop) "Return a pair of the beginning and end of the property PROP at POS." - (let ((beg nil) - (end nil)) - (save-excursion - (goto-char pos) - (while (and (not (bobp)) - (get-text-property (point) - prop)) - (backward-char)) - (when (not (get-text-property (point) - prop)) - (forward-char)) - (setq beg (point)) - (goto-char pos) - (while (and (not (eobp)) - (get-text-property (point) - prop)) - (forward-char)) - (setq end (point))) - (cons beg end))) + (let ((begin (next-single-property-change pos prop)) + (end (previous-single-property-change pos prop))) + (cons (or begin (point-min)) + (or end (point-max))))) (defun emms-shuffle-vector (vector) "Shuffle VECTOR." |