]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: Nicer autodoc error messages.
authorJose A. Ortega Ruiz <jao@gnu.org>
Fri, 9 Jan 2009 02:45:04 +0000 (03:45 +0100)
committerJose A. Ortega Ruiz <jao@gnu.org>
Fri, 9 Jan 2009 02:45:04 +0000 (03:45 +0100)
misc/fuel/factor-mode.el
misc/fuel/fuel-autodoc.el
misc/fuel/fuel-connection.el

index 394f6c41f9acd84ebcfdd13f07d1f628fa721e15..d3a633910c817fb5b31d11b07b5d1c9020fec86b 100644 (file)
@@ -241,7 +241,7 @@ code in the buffer."
 (defun factor-mode-insert-and-indent (n)
   (interactive "p")
   (self-insert-command n)
-  (indent-for-tab-command))
+  (indent-according-to-mode))
 
 (defvar factor-mode-map
   (let ((map (make-sparse-keymap)))
index 53b522896537cdcd291b828fa5973a55a6ad6711..76919702bb93386ed35a26cb2c64c346878144b5 100644 (file)
 (defun fuel-autodoc--eldoc-function ()
   (or (and fuel-autodoc--fallback-function
            (funcall fuel-autodoc--fallback-function))
-      (fuel-autodoc--word-synopsis)))
+      (condition-case e
+          (fuel-autodoc--word-synopsis)
+        (error (format "Autodoc not available (%s)"
+                       (error-message-string e))))))
 
 \f
 ;;; Autodoc mode:
index 11b135d0f76c085fd32924e4929b1c8d9aebe48b..f9cc1fb0f3db48a8c436bc5f37986ea63d586b54 100644 (file)
 \f
 ;;; Message sending interface:
 
+(defconst fuel-con--error-message "FUEL connection not active")
+
 (defun fuel-con--send-string (buffer/proc str cont &optional sender-buffer)
   (save-current-buffer
     (let ((con (fuel-con--get-connection buffer/proc)))
-      (unless con
-        (error "FUEL: no connection"))
+      (unless con (error fuel-con--error-message))
       (let ((req (fuel-con--make-request str cont sender-buffer)))
         (fuel-con--connection-queue-request con req)
         (fuel-con--process-next con)
 (defun fuel-con--send-string/wait (buffer/proc str cont &optional timeout sbuf)
   (save-current-buffer
     (let ((con (fuel-con--get-connection buffer/proc)))
-      (unless con
-        (error "FUEL: no connection"))
+      (unless con (error fuel-con--error-message))
       (let* ((req (fuel-con--send-string buffer/proc str cont sbuf))
              (id (and req (fuel-con--request-id req)))
              (time (or timeout fuel-connection-timeout))