|
From: | Richard Stallman |
Subject: | Re: wdired.el 1.7 --- Rename files editing their names in dired buffers |
Date: | Wed, 7 Nov 2001 22:00:25 -0700 (MST) |
(defun replace-match-non-writable-p() "Check that the chars of the last match do not have read-only properties." (or buffer-read-only (let ((pos-beg (- (match-beginning 0) 1)) (pos-end (- (match-end 0) 1))) (setq pos-beg (max pos-beg 1)) (while (and (< pos-beg pos-end) (not (get-text-property pos-beg 'read-only))) (setq pos-beg (1+ pos-beg))) (get-text-property pos-beg 'read-only)))) That loop by characters is slow. Instead, use text-property-not-all to see if any character has a non-nil `read-only' property.
[Prev in Thread] | Current Thread | [Next in Thread] |