Skip to content
Permalink
Browse files

FUEL: don't jump to USING: section after updating

  • Loading branch information...
timor authored and mrjbq7 committed May 6, 2019
1 parent c14e571 commit 82893dceeef53643e96b73d58d4800273b05da97
Showing with 15 additions and 14 deletions.
  1. +15 −14 misc/fuel/fuel-debug.el
@@ -308,20 +308,21 @@ the debugger."

(defun fuel-debug--replace-usings (file uses)
(pop-to-buffer (find-file-noselect file))
(goto-char (point-min))
(if (re-search-forward "^USING: " nil t)
(let ((begin (point))
(end (or (and (re-search-forward ";\\( \\|$\\)") (point))
(point))))
(kill-region begin end))
(re-search-forward "^IN: " nil t)
(beginning-of-line)
(open-line 2)
(insert "USING: "))
(let ((start (point))
(tokens (append uses '(";"))))
(insert (mapconcat 'substring-no-properties tokens " "))
(fill-region start (point) nil)))
(save-excursion
(goto-char (point-min))
(if (re-search-forward "^USING: " nil t)
(let ((begin (point))
(end (or (and (re-search-forward ";\\( \\|$\\)") (point))
(point))))
(kill-region begin end))
(re-search-forward "^IN: " nil t)
(beginning-of-line)
(open-line 2)
(insert "USING: "))
(let ((start (point))
(tokens (append uses '(";"))))
(insert (mapconcat 'substring-no-properties tokens " "))
(fill-region start (point) nil))))

(defun fuel-debug-update-usings ()
(interactive)

0 comments on commit 82893dc

Please sign in to comment.
You can’t perform that action at this time.