diff --git a/extra/fuel/help/help.factor b/extra/fuel/help/help.factor index 2338772685..b540b0ef5d 100644 --- a/extra/fuel/help/help.factor +++ b/extra/fuel/help/help.factor @@ -1,20 +1,16 @@ ! Copyright (C) 2009 Jose Antonio Ortega Ruiz. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays assocs combinators help help.crossref +USING: accessors arrays assocs combinators fuel.eval help help.crossref help.markup help.topics io io.streams.string kernel make namespaces parser prettyprint sequences summary help.vocabs -vocabs vocabs.loader vocabs.hierarchy vocabs.metadata words see -listener ; +vocabs vocabs.loader vocabs.hierarchy vocabs.metadata vocabs.parser words see +listener sets ; FROM: vocabs.hierarchy => child-vocabs ; IN: fuel.help > ] dip = ] curry all-words swap filter - dup empty? not [ first ] [ drop f ] if ; - : fuel-value-str ( word -- str ) [ pprint-short ] with-string-writer ; inline @@ -92,12 +88,12 @@ SYMBOL: describe-words PRIVATE> : (fuel-word-help) ( name -- elem ) - fuel-find-word [ [ auto-use? on (fuel-word-element) ] with-scope ] [ f ] if* ; + search [ [ auto-use? on (fuel-word-element) ] with-scope ] [ f ] if* ; : (fuel-word-synopsis) ( word usings -- str/f ) [ [ lookup-vocab ] filter interactive-vocabs [ append ] change - fuel-find-word [ synopsis ] [ f ] if* + search [ synopsis ] [ f ] if* ] with-scope ; : (fuel-word-see) ( word -- elem ) @@ -105,7 +101,7 @@ PRIVATE> [ [ see ] with-string-writer \ $code swap 2array ] bi 3array ; inline : (fuel-word-def) ( name -- str ) - fuel-find-word [ [ def>> pprint ] with-string-writer ] [ f ] if* ; inline + search [ [ def>> pprint ] with-string-writer ] [ f ] if* ; inline : (fuel-vocab-summary) ( name -- str ) >vocab-link summary ; inline diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index d46253b920..ecee2dc14b 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -662,7 +662,7 @@ source/docs/tests file. When set to false, you'll be asked only once." ;;; USING/IN: -(defvar-local factor-current-vocab-function 'factor-find-in) +(defvar-local factor-current-vocab-function 'factor-find-vocab-name) (defsubst factor-current-vocab () (funcall factor-current-vocab-function)) @@ -672,6 +672,16 @@ source/docs/tests file. When set to false, you'll be asked only once." (when (re-search-backward factor-current-vocab-regex nil t) (match-string-no-properties 1)))) +(defun factor-in-private? () + "t if point is withing a PRIVATE-block, nil otherwise." + (save-excursion + (when (re-search-backward "\\_<?\\_>" nil t) + (string= (match-string-no-properties 0) "