Commit 4247ef65 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(renumber-lyskom-send-simple-expect): New function.

parent f2825c56
;;;###autoload
(defun renumber-lyskom-send-simple-expect ()
(interactive)
(goto-char (point-min))
(let ((ref-nr 999)
(case-fold-search nil))
(while (re-search-forward "^send \"\\([0-9]+\\) " nil t)
(setq ref-nr (+ 1 ref-nr))
(replace-match (format "%d" ref-nr) t t nil 1)
(let ((pos (point))
(limit (re-search-forward "^\\(send\\)\\|\\(talk_to\\)" nil t)))
(goto-char pos)
(while (re-search-forward "^simple_expect \"[%=]\\([0-9]+\\)" limit t)
(replace-match (format "%d" ref-nr) t t nil 1))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment