[Python-checkins] python/dist/src/Misc python-mode.el,NONE,4.41
montanaro at users.sourceforge.net
montanaro at users.sourceforge.net
Thu Dec 18 16:53:35 EST 2003
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv18097
Modified Files:
Tag: 4.41
python-mode.el
Log Message:
Sync with python-mode project. Adds two changes:
* in py-checker-run, fall back to read-string if read-shell-command
(XEmacs-specific) is not available.
* highlight variables would mask builtins as if they were keywords.
--- NEW FILE: python-mode.el ---
;;; python-mode.el --- Major mode for editing Python programs
;; Copyright (C) 1992,1993,1994 Tim Peters
;; Author: 1995-2002 Barry A. Warsaw
;; 1992-1994 Tim Peters
;; Maintainer: python-mode at python.org
;; Created: Feb 1992
;; Keywords: python languages oop
(defconst py-version "$Revision: 4.41 $"
"`python-mode' version number.")
;; This software is provided as-is, without express or implied
;; warranty. Permission to use, copy, modify, distribute or sell this
;; software, without fee, for any purpose and by any individual or
;; organization, is hereby granted, provided that the above copyright
;; notice and this paragraph appear in all copies.
[...3729 lines suppressed...]
(interactive "P")
(let* ((bod (py-point 'bod))
(pps (parse-partial-sexp bod (point))))
(cond
;; are we inside a comment or on a line with only whitespace before
;; the comment start?
((or (nth 4 pps)
(save-excursion (beginning-of-line) (looking-at "[ \t]*#")))
(py-fill-comment justify))
;; are we inside a string?
((nth 3 pps)
(py-fill-string (nth 8 pps)))
;; otherwise use the default
(t
(fill-paragraph justify)))))
(provide 'python-mode)
;;; python-mode.el ends here
More information about the Python-checkins
mailing list