From 755a9f2a8b1118e2493af4c16126da8241aae397 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sun, 13 Dec 2020 23:08:42 +0000 Subject: [PATCH] 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 12e922156c86a26fa4bb2cb9e7d2b3fd639e4707 Author: Stefan Monnier 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. --- lisp/emacs-lisp/eldoc.el | 6 +----- lisp/progmodes/octave.el | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 6a976841038..c9d5521e502 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -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 diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index c313ad11792..bda4e60c55c 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -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. -- 2.39.2