FUEL: Fixes to fuel-update-usings.

db4
Jose A. Ortega Ruiz 2008-12-24 02:44:49 +01:00
parent 79128ecd5c
commit 37b8c20077
2 changed files with 5 additions and 12 deletions

View File

@ -35,9 +35,6 @@
;;; Utility functions:
(defsubst fuel-debug--at-eou-p ()
(looking-at ".*\\_<;\\_>"))
(defun fuel-debug--file-lines (file)
(when (file-readable-p file)
(with-current-buffer (find-file-noselect file)
@ -46,12 +43,10 @@
(let ((lines) (in-usings))
(while (not (eobp))
(when (looking-at "^USING: ") (setq in-usings t))
(unless in-usings
(let ((line (substring-no-properties (thing-at-point 'line) 0 -1)))
(unless (or (empty-string-p line)
(fuel--string-prefix-p "! " line))
(push line lines))))
(when (and in-usings (fuel-debug--at-eou-p)) (setq in-usings nil))
(when in-usings (setq line (concat "! " line)))
(push line lines))
(when (and in-usings (looking-at ".*\\_<;\\_>")) (setq in-usings nil))
(forward-line))
(reverse lines))))))

View File

@ -318,9 +318,7 @@
(defun fuel-syntax--find-usings ()
(save-excursion
(let ((usings)
(in (fuel-syntax--current-vocab)))
(when in (setq usings (list in)))
(let ((usings))
(goto-char (point-max))
(while (re-search-backward fuel-syntax--using-lines-regex nil t)
(dolist (u (split-string (match-string-no-properties 1) nil t))