diff options
| author | Karoly Lorentey | 2004-05-18 19:12:15 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-05-18 19:12:15 +0000 |
| commit | c23670f81e059ebe645c88575f4ddfa67f26bf6b (patch) | |
| tree | 71667a6ceaa877ccf3953abedfa7b0fd5f0f5369 /lisp/progmodes/python.el | |
| parent | d9858e4f1889a61b216ae1f99053846362067ccc (diff) | |
| parent | a7f7f2540f02834ad128d0c9357a4dbd8222dff4 (diff) | |
| download | emacs-c23670f81e059ebe645c88575f4ddfa67f26bf6b.tar.gz emacs-c23670f81e059ebe645c88575f4ddfa67f26bf6b.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-301
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-302
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-303
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-304
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-305
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-306
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-307
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-308
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-309
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-310
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-311
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-312
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-313
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-314
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-315
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-316
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-317
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-318
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-319
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-320
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-321
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-322
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-323
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-324
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-163
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 214b6f0e24c..cee59a6e3e1 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -297,10 +297,9 @@ comments and strings, or that the bracket/paren nesting depth is nonzero." | |||
| 297 | (syntax-ppss (line-beginning-position))))))) | 297 | (syntax-ppss (line-beginning-position))))))) |
| 298 | 298 | ||
| 299 | (defun python-comment-line-p () | 299 | (defun python-comment-line-p () |
| 300 | "Return non-nil if current line has only a comment or is blank." | 300 | "Return non-nil iff current line has only a comment." |
| 301 | (save-excursion | 301 | (save-excursion |
| 302 | (end-of-line) | 302 | (end-of-line) |
| 303 | ;; FIXME: This looks wrong because it returns nil for empty lines. --Stef | ||
| 304 | (when (eq 'comment (syntax-ppss-context (syntax-ppss))) | 303 | (when (eq 'comment (syntax-ppss-context (syntax-ppss))) |
| 305 | (back-to-indentation) | 304 | (back-to-indentation) |
| 306 | (looking-at (rx (or (syntax comment-start) line-end)))))) | 305 | (looking-at (rx (or (syntax comment-start) line-end)))))) |
| @@ -1025,7 +1024,6 @@ et al.") | |||
| 1025 | (let ((map (make-sparse-keymap))) | 1024 | (let ((map (make-sparse-keymap))) |
| 1026 | ;; This will inherit from comint-mode-map. | 1025 | ;; This will inherit from comint-mode-map. |
| 1027 | (define-key map "\C-c\C-l" 'python-load-file) | 1026 | (define-key map "\C-c\C-l" 'python-load-file) |
| 1028 | (define-key map "\C-c\C-z" 'python-switch-to-python) ;What for? --Stef | ||
| 1029 | (define-key map "\C-c\C-v" 'python-check) | 1027 | (define-key map "\C-c\C-v" 'python-check) |
| 1030 | ;; Note that we _can_ still use these commands which send to the | 1028 | ;; Note that we _can_ still use these commands which send to the |
| 1031 | ;; Python process even at the prompt iff we have a normal prompt, | 1029 | ;; Python process even at the prompt iff we have a normal prompt, |
| @@ -1140,10 +1138,12 @@ to this as appropriate. Runs the hook `inferior-python-mode-hook' | |||
| 1140 | ;; (not a name) in Python buffers from which `run-python' &c is | 1138 | ;; (not a name) in Python buffers from which `run-python' &c is |
| 1141 | ;; invoked. Would support multiple processes better. | 1139 | ;; invoked. Would support multiple processes better. |
| 1142 | (unless (comint-check-proc python-buffer) | 1140 | (unless (comint-check-proc python-buffer) |
| 1143 | (let ((cmdlist (append (python-args-to-list cmd) '("-i"))) | 1141 | (let* ((cmdlist (append (python-args-to-list cmd) '("-i"))) |
| 1144 | (process-environment ; to import emacs.py | 1142 | (path (getenv "PYTHONPATH")) |
| 1145 | (push (concat "PYTHONPATH=" data-directory) | 1143 | (process-environment ; to import emacs.py |
| 1146 | process-environment))) | 1144 | (push (concat "PYTHONPATH=" data-directory |
| 1145 | (if path (concat ":" path))) | ||
| 1146 | process-environment))) | ||
| 1147 | (set-buffer (apply 'make-comint "Python" (car cmdlist) nil | 1147 | (set-buffer (apply 'make-comint "Python" (car cmdlist) nil |
| 1148 | (cdr cmdlist))) | 1148 | (cdr cmdlist))) |
| 1149 | (setq python-buffer "*Python*")) | 1149 | (setq python-buffer "*Python*")) |
| @@ -1278,7 +1278,6 @@ module-qualified names." | |||
| 1278 | ;; Fixme: I'm not convinced by this logic from python-mode.el. | 1278 | ;; Fixme: I'm not convinced by this logic from python-mode.el. |
| 1279 | (python-send-command | 1279 | (python-send-command |
| 1280 | (if (string-match "\\.py\\'" file-name) | 1280 | (if (string-match "\\.py\\'" file-name) |
| 1281 | ;; Fixme: make sure the directory is in the path list | ||
| 1282 | (let ((module (file-name-sans-extension | 1281 | (let ((module (file-name-sans-extension |
| 1283 | (file-name-nondirectory file-name)))) | 1282 | (file-name-nondirectory file-name)))) |
| 1284 | (format "emacs.eimport(%S,%S)" | 1283 | (format "emacs.eimport(%S,%S)" |
| @@ -1309,6 +1308,7 @@ See variable `python-buffer'. Starts a new process if necessary." | |||
| 1309 | Otherwise inherits from `python-mode-syntax-table'.") | 1308 | Otherwise inherits from `python-mode-syntax-table'.") |
| 1310 | 1309 | ||
| 1311 | (defvar view-return-to-alist) | 1310 | (defvar view-return-to-alist) |
| 1311 | (eval-when-compile (autoload 'help-buffer "help-fns")) | ||
| 1312 | 1312 | ||
| 1313 | ;; Fixme: Should this actually be used instead of info-look, i.e. be | 1313 | ;; Fixme: Should this actually be used instead of info-look, i.e. be |
| 1314 | ;; bound to C-h S? Can we use other pydoc stuff before python 2.2? | 1314 | ;; bound to C-h S? Can we use other pydoc stuff before python 2.2? |
| @@ -1394,7 +1394,8 @@ Used with `eval-after-load'." | |||
| 1394 | ;; Don't use `info' because it would pop-up a *info* buffer. | 1394 | ;; Don't use `info' because it would pop-up a *info* buffer. |
| 1395 | (with-no-warnings | 1395 | (with-no-warnings |
| 1396 | (Info-goto-node (format "(python%s-lib)Miscellaneous Index" | 1396 | (Info-goto-node (format "(python%s-lib)Miscellaneous Index" |
| 1397 | version))) | 1397 | version)) |
| 1398 | t) | ||
| 1398 | (error nil))))) | 1399 | (error nil))))) |
| 1399 | (info-lookup-maybe-add-help | 1400 | (info-lookup-maybe-add-help |
| 1400 | :mode 'python-mode | 1401 | :mode 'python-mode |