Function: speedbar-check-read-only

speedbar-check-read-only is a byte-compiled function defined in speedbar.el.gz.

Signature

(speedbar-check-read-only)

Documentation

Scan all the files in a directory, and for each see if it is read only.

Source Code

;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-check-read-only ()
  "Scan all the files in a directory, and for each see if it is read only."
  ;; Check for to-do to be reset.  If reset but no RCS is available
  ;; then set to nil (do nothing) otherwise, start at the beginning
  (save-excursion
    (if speedbar-buffer (set-buffer speedbar-buffer))
    (if (eq speedbar-ro-to-do-point t)
	(setq speedbar-ro-to-do-point 0))
    (if (numberp speedbar-ro-to-do-point)
	(progn
	  (goto-char speedbar-ro-to-do-point)
	  (while (and (not (input-pending-p))
		      (re-search-forward "^\\([0-9]+\\):\\s-*[[<][+?-][]>] "
					 nil t))
	    (setq speedbar-ro-to-do-point (point))
	    (let ((f (speedbar-line-file)))
	      (if f
		  (if (not (file-writable-p f))
		      (speedbar-add-indicator
		       speedbar-object-read-only-indicator
		       (regexp-quote speedbar-object-read-only-indicator))
		    (speedbar-add-indicator
		     " " (regexp-quote
			  speedbar-object-read-only-indicator))))))
	  (if (input-pending-p)
	      ;; return that we are incomplete
	      nil
	    ;; we are done, set to-do to nil
	    (setq speedbar-ro-to-do-point nil)
	    ;; and return t
	    t))
      t)))