FUEL: don't jump to USING: section after updating
parent
c14e571429
commit
82893dceee
|
@ -308,20 +308,21 @@ the debugger."
|
||||||
|
|
||||||
(defun fuel-debug--replace-usings (file uses)
|
(defun fuel-debug--replace-usings (file uses)
|
||||||
(pop-to-buffer (find-file-noselect file))
|
(pop-to-buffer (find-file-noselect file))
|
||||||
(goto-char (point-min))
|
(save-excursion
|
||||||
(if (re-search-forward "^USING: " nil t)
|
(goto-char (point-min))
|
||||||
(let ((begin (point))
|
(if (re-search-forward "^USING: " nil t)
|
||||||
(end (or (and (re-search-forward ";\\( \\|$\\)") (point))
|
(let ((begin (point))
|
||||||
(point))))
|
(end (or (and (re-search-forward ";\\( \\|$\\)") (point))
|
||||||
(kill-region begin end))
|
(point))))
|
||||||
(re-search-forward "^IN: " nil t)
|
(kill-region begin end))
|
||||||
(beginning-of-line)
|
(re-search-forward "^IN: " nil t)
|
||||||
(open-line 2)
|
(beginning-of-line)
|
||||||
(insert "USING: "))
|
(open-line 2)
|
||||||
(let ((start (point))
|
(insert "USING: "))
|
||||||
(tokens (append uses '(";"))))
|
(let ((start (point))
|
||||||
(insert (mapconcat 'substring-no-properties tokens " "))
|
(tokens (append uses '(";"))))
|
||||||
(fill-region start (point) nil)))
|
(insert (mapconcat 'substring-no-properties tokens " "))
|
||||||
|
(fill-region start (point) nil))))
|
||||||
|
|
||||||
(defun fuel-debug-update-usings ()
|
(defun fuel-debug-update-usings ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Reference in New Issue