diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-08-30 21:10:10 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-08-30 21:10:10 +0000 |
commit | 132579d3e8faeb95087aa972bfbbdf2ab9a35e03 (patch) | |
tree | 4aa1e75c0fe9c8b695c8734c2c53e556519bcc2b /lisp/progmodes/python.el | |
parent | 762ce89d584fcb8597f6497b0078f4a84f19803e (diff) | |
download | emacs-132579d3e8faeb95087aa972bfbbdf2ab9a35e03.tar.gz |
(python-eldoc-function): Re-enable quit while waiting for process.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r-- | lisp/progmodes/python.el | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ca22e36cb40..66d8cd4714f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1599,24 +1599,26 @@ Only works when point is in a function name, not its arg list, for instance. Assumes an inferior Python is running." (let ((symbol (with-syntax-table python-dotty-syntax-table (current-word)))) - ;; First try the symbol we're on. - (or (and symbol - (python-send-receive (format "emacs.eargs(%S, %s)" - symbol python-imports))) - ;; Try moving to symbol before enclosing parens. - (let ((s (syntax-ppss))) - (unless (zerop (car s)) - (when (eq ?\( (char-after (nth 1 s))) - (save-excursion - (goto-char (nth 1 s)) - (skip-syntax-backward "-") - (let ((point (point))) - (skip-chars-backward "a-zA-Z._") - (if (< (point) point) - (python-send-receive - (format "emacs.eargs(%S, %s)" - (buffer-substring-no-properties (point) point) - python-imports))))))))))) + ;; This is run from timers, so inhibit-quit tends to be set. + (with-local-quit + ;; First try the symbol we're on. + (or (and symbol + (python-send-receive (format "emacs.eargs(%S, %s)" + symbol python-imports))) + ;; Try moving to symbol before enclosing parens. + (let ((s (syntax-ppss))) + (unless (zerop (car s)) + (when (eq ?\( (char-after (nth 1 s))) + (save-excursion + (goto-char (nth 1 s)) + (skip-syntax-backward "-") + (let ((point (point))) + (skip-chars-backward "a-zA-Z._") + (if (< (point) point) + (python-send-receive + (format "emacs.eargs(%S, %s)" + (buffer-substring-no-properties (point) point) + python-imports)))))))))))) ;;;; Info-look functionality. |