FUEL: Fixes to fuel-update-usings.
parent
79128ecd5c
commit
37b8c20077
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
;;; Utility functions:
|
;;; Utility functions:
|
||||||
|
|
||||||
(defsubst fuel-debug--at-eou-p ()
|
|
||||||
(looking-at ".*\\_<;\\_>"))
|
|
||||||
|
|
||||||
(defun fuel-debug--file-lines (file)
|
(defun fuel-debug--file-lines (file)
|
||||||
(when (file-readable-p file)
|
(when (file-readable-p file)
|
||||||
(with-current-buffer (find-file-noselect file)
|
(with-current-buffer (find-file-noselect file)
|
||||||
|
@ -46,12 +43,10 @@
|
||||||
(let ((lines) (in-usings))
|
(let ((lines) (in-usings))
|
||||||
(while (not (eobp))
|
(while (not (eobp))
|
||||||
(when (looking-at "^USING: ") (setq in-usings t))
|
(when (looking-at "^USING: ") (setq in-usings t))
|
||||||
(unless in-usings
|
|
||||||
(let ((line (substring-no-properties (thing-at-point 'line) 0 -1)))
|
(let ((line (substring-no-properties (thing-at-point 'line) 0 -1)))
|
||||||
(unless (or (empty-string-p line)
|
(when in-usings (setq line (concat "! " line)))
|
||||||
(fuel--string-prefix-p "! " line))
|
(push line lines))
|
||||||
(push line lines))))
|
(when (and in-usings (looking-at ".*\\_<;\\_>")) (setq in-usings nil))
|
||||||
(when (and in-usings (fuel-debug--at-eou-p)) (setq in-usings nil))
|
|
||||||
(forward-line))
|
(forward-line))
|
||||||
(reverse lines))))))
|
(reverse lines))))))
|
||||||
|
|
||||||
|
|
|
@ -318,9 +318,7 @@
|
||||||
|
|
||||||
(defun fuel-syntax--find-usings ()
|
(defun fuel-syntax--find-usings ()
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((usings)
|
(let ((usings))
|
||||||
(in (fuel-syntax--current-vocab)))
|
|
||||||
(when in (setq usings (list in)))
|
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(while (re-search-backward fuel-syntax--using-lines-regex nil t)
|
(while (re-search-backward fuel-syntax--using-lines-regex nil t)
|
||||||
(dolist (u (split-string (match-string-no-properties 1) nil t))
|
(dolist (u (split-string (match-string-no-properties 1) nil t))
|
||||||
|
|
Loading…
Reference in New Issue