~rgrjr/rgr-hacks

2fa6dea321ff24081149478f7b3e12f5e7281ef7 — Bob Rogers 6 months ago 500c921
* rgr-backup-hacks.el:  (rgr-update-backup-stars):  Removed.
1 files changed, 0 insertions(+), 30 deletions(-)

M rgr-backup-hacks.el
M rgr-backup-hacks.el => rgr-backup-hacks.el +0 -30
@@ 48,34 48,4 @@ checksums together to check that (e.g.) a file copy worked."
	  (message "Found %d mismatches, check *Messages* for singletons."
		   n-errors)))))

(defvar rgr-backup-star-line
  (let ((digit "[0-9]"))
    (concat "^ \\([ *]\\) *" digit "+ \\([^ .]+\\)-l\\(" digit "\\)"))
  "Match the first part of a line of show-backups.pl output.")

;;;###AUTOLOAD
(defun rgr-update-backup-stars ()
  ;; [this isn't used much any more.  -- rgr, 6-Sep-17.]
  "Update the '*' prefixes in show-backups.pl output.
Starts from point and ends when we run out of backup description lines."
  (interactive)
  (save-excursion
    (beginning-of-line)
    (let ((current-level 10)
	  (current-backup ""))
      (while (looking-at rgr-backup-star-line)
	(let* ((star-p (equal (match-string 1) "*"))
	       (backup-name (match-string 2))
	       (level (string-to-number (match-string 3)))
	       (current-p
		 (or (equal current-backup backup-name)
		     (< level current-level))))
	  (if (not (eq current-p star-p))
	      (replace-match (if current-p "*" " ") t t nil 1))
	  (if current-p
	      (setq current-level level
		    current-backup backup-name))
	  ;; (message "current-p %S" current-p) (sit-for 1)
	  (forward-line))))))

(provide 'rgr-backup-hacks)