1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

Inhibit quit in ElDoc timer functions (bug#45117)

The point of un-inhibiting it was to make ElDoc backends interruptible
with any input (as in while-no-input), since that should in principle
invalidate the need of the current ElDoc processing.  But that
strategy is dangerous for backends that perform complex
synchronization with external processes.  Better let each backend
decide for itself it needs this eager interruptive behavior, like is
presumably the case with the Octave backend.

This reverts a part of

    commit 12e922156c
    Author: Stefan Monnier <monnier@iro.umontreal.ca>
    Date:   Tue Dec 4 18:15:44 2018 -0500

* lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info):

* lisp/progmodes/octave.el (octave-eldoc-function-signatures): Use
while-no-input.
This commit is contained in:
João Távora 2020-12-13 23:08:42 +00:00
parent 51698f77dd
commit 755a9f2a8b
2 changed files with 4 additions and 7 deletions

View File

@ -867,11 +867,7 @@ the docstrings eventually produced, using
eldoc--last-request-state))
(let ((non-essential t))
(setq eldoc--last-request-state token)
;; Only keep looking for the info as long as the user hasn't
;; requested our attention. This also locally disables
;; inhibit-quit.
(while-no-input
(eldoc--invoke-strategy nil)))))))
(eldoc--invoke-strategy nil))))))
;; This section only affects ElDoc output to the echo area, as in

View File

@ -1605,8 +1605,9 @@ code line."
(defun octave-eldoc-function-signatures (fn)
(unless (equal fn (car octave-eldoc-cache))
(inferior-octave-send-list-and-digest
(list (format "print_usage ('%s');\n" fn)))
(while-no-input
(inferior-octave-send-list-and-digest
(list (format "print_usage ('%s');\n" fn))))
(let (result)
(dolist (line inferior-octave-output-list)
;; The help output has changed a few times in GNU Octave.