FUEL: remove fuel-help-short and supporting code
The feature is not used anywhere (not bound to any key) and the normal fuel-help display works better than fuel-help-short anywaydb4
parent
d3935d2ef3
commit
385a8a0798
|
@ -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 ;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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) |
|
||||
|
|
|
@ -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 ()
|
||||
|
|
|
@ -114,10 +114,9 @@
|
|||
|
||||
(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
|
||||
|
@ -126,11 +125,10 @@
|
|||
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
|
||||
|
@ -189,7 +187,7 @@
|
|||
(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))
|
||||
|
@ -250,18 +248,13 @@
|
|||
|
||||
;;; 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."
|
||||
|
|
|
@ -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)
|
||||
--
|
||||
|
|
Loading…
Reference in New Issue