emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/python.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/python.el
Date: Fri, 25 Mar 2005 09:36:09 -0500

Index: emacs/lisp/progmodes/python.el
diff -c emacs/lisp/progmodes/python.el:1.24 emacs/lisp/progmodes/python.el:1.25
*** emacs/lisp/progmodes/python.el:1.24 Wed Feb  9 15:50:36 2005
--- emacs/lisp/progmodes/python.el      Fri Mar 25 14:36:08 2005
***************
*** 1,6 ****
  ;;; python.el --- silly walks for Python
  
! ;; Copyright (C) 2003, 2004  Free Software Foundation, Inc.
  
  ;; Author: Dave Love <address@hidden>
  ;; Maintainer: FSF
--- 1,6 ----
  ;;; python.el --- silly walks for Python
  
! ;; Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
  
  ;; Author: Dave Love <address@hidden>
  ;; Maintainer: FSF
***************
*** 336,349 ****
      (unless bos (python-beginning-of-statement))
      (back-to-indentation)
      (looking-at (rx (and (or "return" "raise" "break" "continue" "pass")
!                        word-end)))))
  
  (defun python-outdent-p ()
    "Return non-nil if current line should outdent a level."
    (save-excursion
      (back-to-indentation)
!     (and (looking-at (rx (and (or (and (or "else" "finally") word-end)
!                                 (and (or "except" "elif") word-end
                                       (1+ (not (any ?:)))))
                              (optional space) ":" (optional space)
                              (or (syntax comment-start) line-end))))
--- 336,349 ----
      (unless bos (python-beginning-of-statement))
      (back-to-indentation)
      (looking-at (rx (and (or "return" "raise" "break" "continue" "pass")
!                        symbol-end)))))
  
  (defun python-outdent-p ()
    "Return non-nil if current line should outdent a level."
    (save-excursion
      (back-to-indentation)
!     (and (looking-at (rx (and (or (and (or "else" "finally") symbol-end)
!                                 (and (or "except" "elif") symbol-end
                                       (1+ (not (any ?:)))))
                              (optional space) ":" (optional space)
                              (or (syntax comment-start) line-end))))
***************
*** 355,362 ****
         ;; Fixme: check this
         (not (looking-at (rx (and (or (and (or "if" "elif" "except"
                                                "for" "while")
!                                           word-end (1+ (not (any ?:))))
!                                      (and "try" word-end))
                                   (optional space) ":" (optional space)
                                   (or (syntax comment-start) line-end)))))
         (progn (end-of-line)
--- 355,362 ----
         ;; Fixme: check this
         (not (looking-at (rx (and (or (and (or "if" "elif" "except"
                                                "for" "while")
!                                           symbol-end (1+ (not (any ?:))))
!                                      (and "try" symbol-end))
                                   (optional space) ":" (optional space)
                                   (or (syntax comment-start) line-end)))))
         (progn (end-of-line)
***************
*** 1562,1568 ****
        (beginning-of-defun)
        (if (looking-at (rx (and (0+ space) (or "def" "class") (1+ space)
                                 (group (1+ (or word (syntax symbol))))
!                                word-end)))
            (push (match-string 1) accum)))
        (if accum (mapconcat 'identity accum ".")))))
  
--- 1562,1569 ----
        (beginning-of-defun)
        (if (looking-at (rx (and (0+ space) (or "def" "class") (1+ space)
                                 (group (1+ (or word (syntax symbol))))
!                                ;; Greediness makes this unnecessary?  --Stef
!                                symbol-end)))
            (push (match-string 1) accum)))
        (if accum (mapconcat 'identity accum ".")))))
  
***************
*** 1702,1710 ****
         '(python-font-lock-keywords nil nil ((?_ . "w")) nil
                                   (font-lock-syntactic-keywords
                                    . python-font-lock-syntactic-keywords)
! ;;; This probably isn't worth it.
! ;;;                              (font-lock-syntactic-face-function
! ;;;                               . python-font-lock-syntactic-face-function)
                                   ))
    (set (make-local-variable 'parse-sexp-lookup-properties) t)
    (set (make-local-variable 'comment-start) "# ")
--- 1703,1711 ----
         '(python-font-lock-keywords nil nil ((?_ . "w")) nil
                                   (font-lock-syntactic-keywords
                                    . python-font-lock-syntactic-keywords)
!                                  ;; This probably isn't worth it.
!                                  ;; (font-lock-syntactic-face-function
!                                  ;;  . 
python-font-lock-syntactic-face-function)
                                   ))
    (set (make-local-variable 'parse-sexp-lookup-properties) t)
    (set (make-local-variable 'comment-start) "# ")




reply via email to

[Prev in Thread] Current Thread [Next in Thread]