summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-04-01 21:13:51 (GMT)
committerBarry Warsaw <barry@python.org>1998-04-01 21:13:51 (GMT)
commit585f733b395df42d75d286f2f5911cef35bb835b (patch)
tree5caa8b9b3263d3b360ee6bd5446fe70e8ef9722e
parentb1062fc9d25a2720bfe5ac26151f69ab5f02ba94 (diff)
downloadcpython-585f733b395df42d75d286f2f5911cef35bb835b.zip
cpython-585f733b395df42d75d286f2f5911cef35bb835b.tar.gz
cpython-585f733b395df42d75d286f2f5911cef35bb835b.tar.bz2
Two patches for Emacs 20.2 compatibility:
(py-compute-indentation): int-to-char isn't defined in Emacs, but we don't really need it anyway, so just remove this conversion. XEmacs is happy either way. (py-parse-state): The Emacs branch (i.e. w/o buffer-syntactic-context) wasn't adjusting point correctly.
-rw-r--r--Misc/python-mode.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 211fd3c..6fadfa1 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -8,7 +8,7 @@
;; Created: Feb 1992
;; Keywords: python languages oop
-(defconst py-version "$Revision$"
+(defconst py-version "3.51"
"`python-mode' version number.")
;; This software is provided as-is, without express or implied
@@ -1633,8 +1633,7 @@ the new line indented."
;; if we landed inside a string, go to the beginning of that
;; string. this handles triple quoted, multi-line spanning
;; strings.
- (let* ((pps3 (nth 3 (parse-partial-sexp bod (point))))
- (delim (and pps3 (int-to-char pps3)))
+ (let* ((delim (nth 3 (parse-partial-sexp bod (point))))
(skip (and delim (make-string 1 delim))))
(when skip
(save-excursion
@@ -2551,8 +2550,8 @@ local bindings to py-newline-and-indent."))
;; no accurate way to determine this otherwise.
(if (not (fboundp 'buffer-syntactic-context))
;; Emacs
- (save-excursion
- (setq pps (parse-partial-sexp (point) here))
+ (progn
+ (save-excursion (setq pps (parse-partial-sexp (point) here)))
;; make sure we don't land inside a triple-quoted string
(setq done (or (not (nth 3 pps))
(bobp))))