]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: remove fuel-help-short and supporting code
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 16 Apr 2014 23:20:11 +0000 (01:20 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 18 Apr 2014 15:43:11 +0000 (08:43 -0700)
The feature is not used anywhere (not bound to any key) and the normal
fuel-help display works better than fuel-help-short anyway

extra/fuel/fuel.factor
extra/fuel/help/help.factor
misc/fuel/README.md
misc/fuel/fuel-autohelp.el
misc/fuel/fuel-help.el
misc/fuel/fuel-mode.el

index 9155be0562d263e397787abf23bee1f2e62a7a02..61f85d8c8d21c72c04305496c29e983eb3df757c 100644 (file)
@@ -114,8 +114,6 @@ PRIVATE>
 
 : fuel-word-help ( name -- ) (fuel-word-help) fuel-eval-set-result ;
 
-: fuel-word-see ( name -- ) (fuel-word-see) fuel-eval-set-result ;
-
 : fuel-word-def ( name -- ) (fuel-word-def) fuel-eval-set-result ;
 
 : fuel-vocab-help ( name -- ) (fuel-vocab-help) fuel-eval-set-result ;
index b540b0ef5d8c7e5868b19e406026f4100ffcf998..c461a39b6222cf75e6a1d8a8e99ff9cf94bc61f2 100644 (file)
@@ -96,10 +96,6 @@ PRIVATE>
         search [ synopsis ] [ f ] if*
     ] with-scope ;
 
-: (fuel-word-see) ( word -- elem )
-    [ name>> \ article swap ]
-    [ [ see ] with-string-writer \ $code swap 2array ] bi 3array ; inline
-
 : (fuel-word-def) ( name -- str )
     search [ [ def>> pprint ] with-string-writer ] [ f ] if* ; inline
 
index 2d5627f7e8c1c7f17f5882318f50906de602db2d..cfcd8fe86ac17987270375d11e8a15d8c3f6de3a 100644 (file)
@@ -127,7 +127,6 @@ M-x <command>, not necessarily in a factor buffer.
     |--------------------+------------------------------------------------------------|
     | C-c C-d a          | toggle autodoc mode (fuel-autodoc-mode)                    |
     | C-c C-d d          | help for word at point (fuel-help)                         |
-    | C-c C-d s          | short help word at point (fuel-help-short)                 |
     | C-c C-d e          | show stack effect of current sexp (with prefix, region)    |
     | C-c C-d p          | find words containing given substring (fuel-apropos)       |
     | C-c C-d v          | show words in current file (with prefix, ask for vocab)    |
index e7dbd843b404ce0202b9f809697103a24641aa44..bacea61c4a733249490c9aa158f124d191498c55 100644 (file)
@@ -49,7 +49,7 @@ user.")
         (let ((word (factor-symbol-at-point))
               (fuel-log--inhibit-p t))
           (when word
-            (fuel-help--word-help nil word t))))
+            (fuel-help--word-help word t))))
     (error (message "FUEL Autohelp error: %s" err))))
 
 (defun fuel-autohelp-schedule-timer ()
index 5374a4352644e1447b973fea83300cd6be3ec34c..e3c7699f9b8fbcceb3ca630097bb0e03a7c5ff91 100644 (file)
 
 (defvar-local fuel-help--buffer-link nil)
 
-(defun fuel-help--read-word (see)
+(defun fuel-help--read-word ()
   (let* ((def (factor-symbol-at-point))
-         (prompt (format "See%s help on%s: " (if see " short" "")
-                         (if def (format " (%s)" def) "")))
+         (prompt (format "See help on%s: " (if def (format " (%s)" def) "")))
          (ask (or (not def) fuel-help-always-ask)))
     (if ask
         (fuel-completion--read-word prompt
                                         t)
       def)))
 
-(defun fuel-help--word-help (&optional see word display-only print-message)
-  (let ((def (or word (fuel-help--read-word see))))
+(defun fuel-help--word-help (&optional word display-only print-message)
+  (let ((def (or word (fuel-help--read-word))))
     (when def
-      (let ((cmd `(:fuel* (,def
-                           ,(if see 'fuel-word-see 'fuel-word-help))
+      (let ((cmd `(:fuel* (,def ,'fuel-word-help)
                           ,(factor-current-vocab)
                           ,(factor-usings))))
         (when print-message
          (cached (and (not no-cache) (fuel-help--cache-get llink))))
     (if (not cached)
         (let ((fuel-help-always-ask nil))
-          (cond ((eq type 'word) (fuel-help--word-help nil link))
+          (cond ((eq type 'word) (fuel-help--word-help link))
                 ((eq type 'article) (fuel-help--get-article link label))
                 ((eq type 'vocab) (fuel-help--get-vocab link))
                 ((eq type 'author) (fuel-help--get-vocab/author label))
 \f
 ;;; Interactive help commands:
 
-(defun fuel-help-short ()
-  "See help summary of symbol at point."
-  (interactive)
-  (fuel-help--word-help t))
-
 (defun fuel-help (&optional print-message)
   "Show extended help about the word or vocabulary at point, using a
 help buffer."
   (interactive "p")
   (if (factor-in-using)
       (fuel-help-vocab (factor-symbol-at-point))
-    (fuel-help--word-help nil nil nil print-message)))
+    (fuel-help--word-help nil nil print-message)))
 
 (defun fuel-help-vocab (vocab)
   "Ask for a vocabulary name and show its help page."
index 4e0ffb7c40d67fa055326c0e51e20ee5da311532..ea6ff889a7a21e29f3354b85bc774dcaf948817b 100644 (file)
@@ -193,7 +193,6 @@ interacting with a factor listener is at your disposal.
   ("Jump back" "\M-," fuel-edit-pop-edit-word-stack)
   --
   ("Help on word" ("\C-c\C-d\C-d" "\C-c\C-dd") fuel-help)
-  ("Short help on word" ("\C-c\C-d\C-s" "\C-c\C-ds") fuel-help)
   ("Apropos..." ("\C-c\C-d\C-p" "\C-c\C-dp") fuel-apropos)
   ("Show stack effect" ("\C-c\C-d\C-e" "\C-c\C-de") fuel-stack-effect-sexp)
   --