aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2006-08-30 21:10:10 +0000
committerStefan Monnier <[email protected]>2006-08-30 21:10:10 +0000
commit132579d3e8faeb95087aa972bfbbdf2ab9a35e03 (patch)
tree4aa1e75c0fe9c8b695c8734c2c53e556519bcc2b /lisp/progmodes/python.el
parent762ce89d584fcb8597f6497b0078f4a84f19803e (diff)
(python-eldoc-function): Re-enable quit while waiting for process.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el38
1 files changed, 20 insertions, 18 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index ca22e36cb4..66d8cd4714 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.