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: Wed, 26 Apr 2006 05:26:41 +0000

Index: emacs/lisp/progmodes/python.el
diff -u emacs/lisp/progmodes/python.el:1.38 emacs/lisp/progmodes/python.el:1.39
--- emacs/lisp/progmodes/python.el:1.38 Wed Apr 19 06:37:31 2006
+++ emacs/lisp/progmodes/python.el      Wed Apr 26 05:26:39 2006
@@ -292,9 +292,9 @@
 comments and strings, or that the bracket/paren nesting depth is nonzero."
   (or (and (eq ?\\ (char-before (line-end-position 0)))
           (not (syntax-ppss-context (syntax-ppss))))
-      (/= 0 (syntax-ppss-depth
-            (save-excursion      ; syntax-ppss with arg changes point
-              (syntax-ppss (line-beginning-position)))))))
+      (< 0 (syntax-ppss-depth
+            (save-excursion      ; syntax-ppss with arg changes point
+              (syntax-ppss (line-beginning-position)))))))
 
 (defun python-comment-line-p ()
   "Return non-nil iff current line has only a comment."
@@ -719,7 +719,10 @@
        (python-beginning-of-string)
        ;; Skip forward out of nested brackets.
        (condition-case ()              ; beware invalid syntax
-           (progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t)
+           (let ((depth (syntax-ppss-depth (syntax-ppss))))
+              ;; Beware negative depths.
+              (if (> depth 0) (backward-up-list depth))
+              t)
          (error (throw 'foo nil))))))
   (back-to-indentation))
 
@@ -1755,7 +1758,6 @@
   (if (featurep 'hippie-exp)
       (set (make-local-variable 'hippie-expand-try-functions-list)
           (cons 'python-try-complete hippie-expand-try-functions-list)))
-  (unless font-lock-mode (font-lock-mode 1))
   (when python-guess-indent (python-guess-indent))
   (set (make-local-variable 'python-command) python-python-command)
   (unless (boundp 'python-mode-running)        ; kill the recursion from 
jython-mode




reply via email to

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