diff options
| author | Stefan Monnier | 2006-08-30 21:10:10 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-08-30 21:10:10 +0000 |
| commit | 132579d3e8faeb95087aa972bfbbdf2ab9a35e03 (patch) | |
| tree | 4aa1e75c0fe9c8b695c8734c2c53e556519bcc2b /lisp/progmodes/python.el | |
| parent | 762ce89d584fcb8597f6497b0078f4a84f19803e (diff) | |
| download | emacs-132579d3e8faeb95087aa972bfbbdf2ab9a35e03.tar.gz emacs-132579d3e8faeb95087aa972bfbbdf2ab9a35e03.zip | |
(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 | |||
| 1599 | instance. Assumes an inferior Python is running." | 1599 | instance. Assumes an inferior Python is running." |
| 1600 | (let ((symbol (with-syntax-table python-dotty-syntax-table | 1600 | (let ((symbol (with-syntax-table python-dotty-syntax-table |
| 1601 | (current-word)))) | 1601 | (current-word)))) |
| 1602 | ;; First try the symbol we're on. | 1602 | ;; This is run from timers, so inhibit-quit tends to be set. |
| 1603 | (or (and symbol | 1603 | (with-local-quit |
| 1604 | (python-send-receive (format "emacs.eargs(%S, %s)" | 1604 | ;; First try the symbol we're on. |
| 1605 | symbol python-imports))) | 1605 | (or (and symbol |
| 1606 | ;; Try moving to symbol before enclosing parens. | 1606 | (python-send-receive (format "emacs.eargs(%S, %s)" |
| 1607 | (let ((s (syntax-ppss))) | 1607 | symbol python-imports))) |
| 1608 | (unless (zerop (car s)) | 1608 | ;; Try moving to symbol before enclosing parens. |
| 1609 | (when (eq ?\( (char-after (nth 1 s))) | 1609 | (let ((s (syntax-ppss))) |
| 1610 | (save-excursion | 1610 | (unless (zerop (car s)) |
| 1611 | (goto-char (nth 1 s)) | 1611 | (when (eq ?\( (char-after (nth 1 s))) |
| 1612 | (skip-syntax-backward "-") | 1612 | (save-excursion |
| 1613 | (let ((point (point))) | 1613 | (goto-char (nth 1 s)) |
| 1614 | (skip-chars-backward "a-zA-Z._") | 1614 | (skip-syntax-backward "-") |
| 1615 | (if (< (point) point) | 1615 | (let ((point (point))) |
| 1616 | (python-send-receive | 1616 | (skip-chars-backward "a-zA-Z._") |
| 1617 | (format "emacs.eargs(%S, %s)" | 1617 | (if (< (point) point) |
| 1618 | (buffer-substring-no-properties (point) point) | 1618 | (python-send-receive |
| 1619 | python-imports))))))))))) | 1619 | (format "emacs.eargs(%S, %s)" |
| 1620 | (buffer-substring-no-properties (point) point) | ||
| 1621 | python-imports)))))))))))) | ||
| 1620 | 1622 | ||
| 1621 | ;;;; Info-look functionality. | 1623 | ;;;; Info-look functionality. |
| 1622 | 1624 | ||