Show
Ignore:
Timestamp:
2006年09月18日 20時48分14秒 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/progmodes/python.el

    r4161 r4166  
    6868  (require 'cl) 
    6969  (require 'compile) 
    70   (require 'comint)) 
     70  (require 'comint) 
     71  (require 'hippie-exp)) 
    7172 
    7273(autoload 'comint-mode "comint") 
     
    9697             "raise" "return" "try" "while" "yield" 
    9798             ;; Future keywords 
    98              "as" "None") 
     99             "as" "None" 
     100             ;; Not real keywords, but close enough to be fontified as such 
     101             "self" "True" "False") 
    99102         symbol-end) 
    100103    ;; Definitions 
     
    12871290                    (if (zerop (length res)) 
    12881291                        (not (bolp)) 
    1289                       (string-match res ".\\'")))) 
     1292                      (string-match ".\\'" res)))) 
    12901293           ;; The need for this seems to be system-dependent: 
    12911294           ;; What is this all about, exactly?  --Stef 
     
    14251428  (interactive "sPython command: ") 
    14261429  (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"))) 
    14321437 
    14331438(defun python-send-buffer ()