Mercurial > emacs
comparison lisp/progmodes/python.el @ 105372:bd2966850aac
Use `called-interactively-p' instead of `interactive-p'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 02 Oct 2009 03:48:36 +0000 |
parents | 468b7fa34d2c |
children | 0ad1fc06bfc8 |
comparison
equal
deleted
inserted
replaced
105371:0769a73f1d18 | 105372:bd2966850aac |
---|---|
1783 (setq view-return-to-alist | 1783 (setq view-return-to-alist |
1784 (list (cons (selected-window) help-return-method)))))) | 1784 (list (cons (selected-window) help-return-method)))))) |
1785 (with-output-to-temp-buffer (help-buffer) | 1785 (with-output-to-temp-buffer (help-buffer) |
1786 (with-current-buffer standard-output | 1786 (with-current-buffer standard-output |
1787 ;; Fixme: Is this actually useful? | 1787 ;; Fixme: Is this actually useful? |
1788 (help-setup-xref (list 'python-describe-symbol symbol) (interactive-p)) | 1788 (help-setup-xref (list 'python-describe-symbol symbol) |
1789 (called-interactively-p 'interactive)) | |
1789 (set (make-local-variable 'comint-redirect-subvert-readonly) t) | 1790 (set (make-local-variable 'comint-redirect-subvert-readonly) t) |
1790 (help-print-return-message)))) | 1791 (help-print-return-message)))) |
1791 (comint-redirect-send-command-to-process (format "emacs.ehelp(%S, %s)" | 1792 (comint-redirect-send-command-to-process (format "emacs.ehelp(%S, %s)" |
1792 symbol python-imports) | 1793 symbol python-imports) |
1793 "*Help*" (python-proc) nil nil)) | 1794 "*Help*" (python-proc) nil nil)) |
2795 ;; Set the default shell if not already set | 2796 ;; Set the default shell if not already set |
2796 (when (null python-which-shell) | 2797 (when (null python-which-shell) |
2797 (python-toggle-shells python-default-interpreter)) | 2798 (python-toggle-shells python-default-interpreter)) |
2798 (let ((args python-which-args)) | 2799 (let ((args python-which-args)) |
2799 (when (and argprompt | 2800 (when (and argprompt |
2800 (interactive-p) | 2801 (called-interactively-p 'interactive) |
2801 (fboundp 'split-string)) | 2802 (fboundp 'split-string)) |
2802 ;; TBD: Perhaps force "-i" in the final list? | 2803 ;; TBD: Perhaps force "-i" in the final list? |
2803 (setq args (split-string | 2804 (setq args (split-string |
2804 (read-string (concat python-which-bufname | 2805 (read-string (concat python-which-bufname |
2805 " arguments: ") | 2806 " arguments: ") |