Mercurial > emacs
diff lisp/progmodes/python.el @ 72578:a9874901ba07
(python-eldoc-function): Re-enable quit while waiting for process.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 30 Aug 2006 21:10:10 +0000 |
parents | b562a18db094 |
children | a15622a85c05 c358d0861b16 |
line wrap: on
line diff
--- a/lisp/progmodes/python.el Wed Aug 30 08:51:52 2006 +0000 +++ b/lisp/progmodes/python.el Wed Aug 30 21:10:10 2006 +0000 @@ -1599,24 +1599,26 @@ 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.