Changeset 4166 for trunk/lisp/progmodes/python.el
- Timestamp:
- 2006年09月18日 20時48分14秒 (2 years ago)
- Files:
-
- trunk/lisp/progmodes/python.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/progmodes/python.el
r4161 r4166 68 68 (require 'cl) 69 69 (require 'compile) 70 (require 'comint)) 70 (require 'comint) 71 (require 'hippie-exp)) 71 72 72 73 (autoload 'comint-mode "comint") … … 96 97 "raise" "return" "try" "while" "yield" 97 98 ;; Future keywords 98 "as" "None") 99 "as" "None" 100 ;; Not real keywords, but close enough to be fontified as such 101 "self" "True" "False") 99 102 symbol-end) 100 103 ;; Definitions … … 1287 1290 (if (zerop (length res)) 1288 1291 (not (bolp)) 1289 (string-match res ".\\'"))))1292 (string-match ".\\'" res)))) 1290 1293 ;; The need for this seems to be system-dependent: 1291 1294 ;; What is this all about, exactly? --Stef … … 1425 1428 (interactive "sPython command: ") 1426 1429 (comint-send-string (python-proc) string) 1427 (comint-send-string (python-proc) 1428 ;; If the string is single-line or if it ends with \n, 1429 ;; only add a single \n, otherwise add 2, so as to 1430 ;; make sure we terminate the multiline instruction. 1431 (if (string-match "\n.+\\'" string) "\n\n" "\n"))) 1430 (unless (string-match "\n\\'" string) 1431 ;; Make sure the text is properly LF-terminated. 1432 (comint-send-string (python-proc) "\n")) 1433 (when (string-match "\n[ \t].*\n?\\'" string) 1434 ;; If the string contains a final indented line, add a second newline so 1435 ;; as to make sure we terminate the multiline instruction. 1436 (comint-send-string (python-proc) "\n"))) 1432 1437 1433 1438 (defun python-send-buffer ()
