Here's my definitions:
(defvar *rolling-counter* 0) (defun rolling-increment-number-at-point () (interactive) (incf *rolling-counter*) (skip-chars-backward "0123456789") (or (looking-at "[0123456789]+") (error "No number at point")) (replace-match (number-to-string (+ *rolling-counter* (string-to-number (match-string 0)))))) (defun clear-rolling-history () (interactive) (setf *rolling-counter* 0))
Here's my definitions: