[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117644: * lisp/progmodes/python.el: Fix completions
From: |
Fabián Ezequiel Gallina |
Subject: |
[Emacs-diffs] trunk r117644: * lisp/progmodes/python.el: Fix completions inside (i)pdb. |
Date: |
Mon, 04 Aug 2014 21:35:34 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117644
revision-id: address@hidden
parent: address@hidden
committer: Fabián Ezequiel Gallina <address@hidden>
branch nick: trunk
timestamp: Mon 2014-08-04 18:35:17 -0300
message:
* lisp/progmodes/python.el: Fix completions inside (i)pdb.
(python-shell-completion-pdb-string-code): Make obsolete.
(python-shell-completion-get-completions): Use
python-shell-completion-string-code resending setup code
continuously for (i)pdb.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/python.el python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-08-04 06:27:14 +0000
+++ b/lisp/ChangeLog 2014-08-04 21:35:17 +0000
@@ -1,3 +1,11 @@
+2014-08-04 Fabián Ezequiel Gallina <address@hidden>
+
+ * progmodes/python.el: Fix completions inside (i)pdb.
+ (python-shell-completion-pdb-string-code): Make obsolete.
+ (python-shell-completion-get-completions): Use
+ python-shell-completion-string-code resending setup code
+ continuously for (i)pdb.
+
2014-08-04 Paul Eggert <address@hidden>
* rect.el (rectangle--default-line-number-format): Rename
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2014-08-02 22:52:55 +0000
+++ b/lisp/progmodes/python.el 2014-08-04 21:35:17 +0000
@@ -2866,11 +2866,11 @@
"24.4"
"Completion string code must also autocomplete modules.")
-(defcustom python-shell-completion-pdb-string-code
- "';'.join(globals().keys() + locals().keys())"
- "Python code used to get completions separated by semicolons for [i]pdb."
- :type 'string
- :group 'python)
+(define-obsolete-variable-alias
+ 'python-shell-completion-pdb-string-code
+ 'python-shell-completion-string-code
+ "24.5"
+ "Completion string code must work for (i)pdb.")
(defun python-shell-completion-get-completions (process import input)
"Do completion at point using PROCESS for IMPORT or INPUT.
@@ -2885,10 +2885,14 @@
;; Check whether a prompt matches a pdb string, an import
;; statement or just the standard prompt and use the
;; correct python-shell-completion-*-code string
- (cond ((and (> (length python-shell-completion-pdb-string-code) 0)
- (string-match
+ (cond ((and (string-match
(concat "^" python-shell-prompt-pdb-regexp) prompt))
- python-shell-completion-pdb-string-code)
+ ;; Since there are no guarantees the user will remain
+ ;; in the same context where completion code was sent
+ ;; (e.g. user steps into a function), safeguard
+ ;; resending completion setup continuously.
+ (concat python-shell-completion-setup-code
+ "\nprint (" python-shell-completion-string-code ")"))
((string-match
python-shell--prompt-calculated-input-regexp prompt)
python-shell-completion-string-code)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117644: * lisp/progmodes/python.el: Fix completions inside (i)pdb.,
Fabián Ezequiel Gallina <=