(defun conformity-testing-copyline ()
(interactive)
(re-search-forward "
\\\([0-9]*\\\) | \\\| +>\\\)[\t ]*\\\( /[*][*]/\\)?")
(let ((nr (match-string 2))
(b (buffer-substring (point) (line-end-position))))
(dolist (r '((" " . "\n")
(" " . " ")
(">" . ">")))
(setq b (replace-regexp-in-string (car r) (cdr r) b)))
(next-line)
(other-window 1)
(insert (format "/*%d*/" (string-to-number nr))
" catch((read(Goal_0),Goal_0),error(Error,_),true),nl.\n")
(insert b)
(comint-send-input)
(other-window 1)
(recenter 1)))
(global-set-key [f12] 'conformity-testing-copyline)
|