From ec74afdd23a335d0360b0b73eb2e12c141f88615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Wed, 14 Aug 2013 13:21:19 +0200 Subject: [PATCH] FUEL: Error message is now shown if word can't be found. --- misc/fuel/fuel-help.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/misc/fuel/fuel-help.el b/misc/fuel/fuel-help.el index 30534b706e..a5d0419b00 100644 --- a/misc/fuel/fuel-help.el +++ b/misc/fuel/fuel-help.el @@ -126,17 +126,17 @@ t) def))) -(defun fuel-help--word-help (&optional see word display-only) +(defun fuel-help--word-help (&optional see word display-only print-message) (let ((def (or word (fuel-help--read-word see)))) (when def (let ((cmd `(:fuel* (,def ,(if see 'fuel-word-see 'fuel-word-help)) "fuel" t))) - (when (called-interactively-p 'any) + (when print-message (message "Looking up '%s' ..." def)) (let* ((ret (fuel-eval--send/wait cmd)) (res (fuel-eval--retort-result ret))) (if (not res) - (when (called-interactively-p 'any) + (when print-message (message "No help for '%s'" def)) (fuel-help--insert-contents (list def def 'word) res display-only))))))) @@ -253,11 +253,11 @@ (interactive) (fuel-help--word-help t)) -(defun fuel-help () +(defun fuel-help (&optional print-message) "Show extended help about the symbol at point, using a help buffer." - (interactive) - (fuel-help--word-help)) + (interactive "p") + (fuel-help--word-help nil nil nil print-message)) (defun fuel-help-vocab (vocab) "Ask for a vocabulary name and show its help page."