FUEL: Nicer autodoc error messages.
parent
0e34a6d363
commit
a889b9d2d0
|
@ -241,7 +241,7 @@ code in the buffer."
|
||||||
(defun factor-mode-insert-and-indent (n)
|
(defun factor-mode-insert-and-indent (n)
|
||||||
(interactive "p")
|
(interactive "p")
|
||||||
(self-insert-command n)
|
(self-insert-command n)
|
||||||
(indent-for-tab-command))
|
(indent-according-to-mode))
|
||||||
|
|
||||||
(defvar factor-mode-map
|
(defvar factor-mode-map
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
|
|
|
@ -57,7 +57,10 @@
|
||||||
(defun fuel-autodoc--eldoc-function ()
|
(defun fuel-autodoc--eldoc-function ()
|
||||||
(or (and fuel-autodoc--fallback-function
|
(or (and fuel-autodoc--fallback-function
|
||||||
(funcall 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))))))
|
||||||
|
|
||||||
|
|
||||||
;;; Autodoc mode:
|
;;; Autodoc mode:
|
||||||
|
|
|
@ -232,11 +232,12 @@
|
||||||
|
|
||||||
;;; Message sending interface:
|
;;; Message sending interface:
|
||||||
|
|
||||||
|
(defconst fuel-con--error-message "FUEL connection not active")
|
||||||
|
|
||||||
(defun fuel-con--send-string (buffer/proc str cont &optional sender-buffer)
|
(defun fuel-con--send-string (buffer/proc str cont &optional sender-buffer)
|
||||||
(save-current-buffer
|
(save-current-buffer
|
||||||
(let ((con (fuel-con--get-connection buffer/proc)))
|
(let ((con (fuel-con--get-connection buffer/proc)))
|
||||||
(unless con
|
(unless con (error fuel-con--error-message))
|
||||||
(error "FUEL: no connection"))
|
|
||||||
(let ((req (fuel-con--make-request str cont sender-buffer)))
|
(let ((req (fuel-con--make-request str cont sender-buffer)))
|
||||||
(fuel-con--connection-queue-request con req)
|
(fuel-con--connection-queue-request con req)
|
||||||
(fuel-con--process-next con)
|
(fuel-con--process-next con)
|
||||||
|
@ -248,8 +249,7 @@
|
||||||
(defun fuel-con--send-string/wait (buffer/proc str cont &optional timeout sbuf)
|
(defun fuel-con--send-string/wait (buffer/proc str cont &optional timeout sbuf)
|
||||||
(save-current-buffer
|
(save-current-buffer
|
||||||
(let ((con (fuel-con--get-connection buffer/proc)))
|
(let ((con (fuel-con--get-connection buffer/proc)))
|
||||||
(unless con
|
(unless con (error fuel-con--error-message))
|
||||||
(error "FUEL: no connection"))
|
|
||||||
(let* ((req (fuel-con--send-string buffer/proc str cont sbuf))
|
(let* ((req (fuel-con--send-string buffer/proc str cont sbuf))
|
||||||
(id (and req (fuel-con--request-id req)))
|
(id (and req (fuel-con--request-id req)))
|
||||||
(time (or timeout fuel-connection-timeout))
|
(time (or timeout fuel-connection-timeout))
|
||||||
|
|
Loading…
Reference in New Issue