FUEL: Nicer autodoc error messages.
							parent
							
								
									0e34a6d363
								
							
						
					
					
						commit
						a889b9d2d0
					
				| 
						 | 
				
			
			@ -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)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,7 +57,10 @@
 | 
			
		|||
(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))))))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;; Autodoc mode:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -232,11 +232,12 @@
 | 
			
		|||
 | 
			
		||||
;;; 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)
 | 
			
		||||
| 
						 | 
				
			
			@ -248,8 +249,7 @@
 | 
			
		|||
(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))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue