(beginning-of-line)
(re-search-forward factor-constructor-regex (line-end-position) t)))
-(defun factor-in-using ()
- (let ((p (point)))
- (save-excursion
- (and (re-search-backward "^USING:[ \n]" nil t)
- (re-search-forward " ;" nil t)
- (< p (match-end 0))))))
+(defun factor-on-vocab ()
+ "t if point is on a vocab name. We just piggyback on
+ font-lock's pretty accurate information."
+ (eq (get-char-property (point) 'face) 'factor-font-lock-vocabulary-name))
(defsubst factor-end-of-defun-pos ()
(save-excursion
(fuel-log--inhibit-p t))
(when word
(let* ((usings (if fuel-autodoc-eval-using-form-p :usings t))
- (cmd (if (factor-in-using)
+ (cmd (if (factor-on-vocab)
`(:fuel* (,word fuel-vocab-summary) :in t)
`(:fuel* ((,word :usings fuel-word-synopsis)) t ,usings)))
(ret (fuel-eval--send/wait cmd fuel-autodoc--timeout))
(let* ((end (point))
(beg (save-excursion (factor-beginning-of-symbol) (point)))
(prefix (buffer-substring-no-properties beg end))
- (result (fuel-completion--complete prefix (factor-in-using)))
+ (result (fuel-completion--complete prefix (factor-on-vocab)))
(completions (car result))
(partial (cdr result)))
(cond ((null completions)
"Show extended help about the word or vocabulary at point, using a
help buffer."
(interactive "p")
- (if (factor-in-using)
+ (if (factor-on-vocab)
(fuel-help-vocab (factor-symbol-at-point))
(fuel-help--word-help nil nil print-message)))