emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r118030: * lisp/progmodes/python.el: Avoid building


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r118030: * lisp/progmodes/python.el: Avoid building unneeded markers.
Date: Sat, 04 Oct 2014 02:35:35 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118030
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2014-10-03 22:35:28 -0400
message:
  * lisp/progmodes/python.el: Avoid building unneeded markers.
  (python-font-lock-keywords, python-indent-dedent-line)
  (python-fill-paren, python-shell-completion-complete-or-indent):
  Prefer point over point-marker.
  (inferior-python-mode): Remove redundant completion settings.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/python.el       python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-10-03 16:07:31 +0000
+++ b/lisp/ChangeLog    2014-10-04 02:35:28 +0000
@@ -1,3 +1,11 @@
+2014-10-04  Stefan Monnier  <address@hidden>
+
+       * progmodes/python.el: Avoid building unneeded markers.
+       (python-font-lock-keywords, python-indent-dedent-line)
+       (python-fill-paren, python-shell-completion-complete-or-indent):
+       Prefer point over point-marker.
+       (inferior-python-mode): Remove redundant completion settings.
+
 2014-10-03  Dmitry Gutov  <address@hidden>
 
        * vc/vc-svn.el (vc-svn-ignore-completion-table): Implement.

=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el  2014-10-02 15:13:05 +0000
+++ b/lisp/progmodes/python.el  2014-10-04 02:35:28 +0000
@@ -545,7 +545,7 @@
               (res nil))
           (while (and (setq res (re-search-forward re limit t))
                       (or (python-syntax-context 'paren)
-                          (equal (char-after (point-marker)) ?=))))
+                          (equal (char-after (point)) ?=))))
           res))
      (1 font-lock-variable-name-face nil nil))
     ;; support for a, b, c = (1, 2, 3)
@@ -1042,9 +1042,9 @@
   "De-indent current line."
   (interactive "*")
   (when (and (not (python-syntax-comment-or-string-p))
-             (<= (point-marker) (save-excursion
+             (<= (point) (save-excursion
                                   (back-to-indentation)
-                                  (point-marker)))
+                           (point)))
              (> (current-column) 0))
     (python-indent-line t)
     t))
@@ -2399,12 +2399,8 @@
          python-comint-postoutput-scroll-to-bottom))
   (set (make-local-variable 'compilation-error-regexp-alist)
        python-shell-compilation-regexp-alist)
-  (define-key inferior-python-mode-map [remap complete-symbol]
-    'completion-at-point)
   (add-hook 'completion-at-point-functions
-            'python-shell-completion-at-point nil 'local)
-  (add-to-list (make-local-variable 'comint-dynamic-complete-functions)
-               'python-shell-completion-at-point)
+            #'python-shell-completion-at-point nil 'local)
   (define-key inferior-python-mode-map "\t"
     'python-shell-completion-complete-or-indent)
   (make-local-variable 'python-pdbtrack-buffers-to-kill)
@@ -2960,7 +2956,7 @@
   (interactive)
   (if (string-match "^[[:space:]]*$"
                     (buffer-substring (comint-line-beginning-position)
-                                      (point-marker)))
+                                      (point)))
       (indent-for-tab-command)
     (completion-at-point)))
 
@@ -3291,8 +3287,7 @@
   (save-restriction
     (narrow-to-region (progn
                         (while (python-syntax-context 'paren)
-                          (goto-char (1- (point-marker))))
-                        (point-marker)
+                          (goto-char (1- (point))))
                         (line-beginning-position))
                       (progn
                         (when (not (python-syntax-context 'paren))
@@ -3301,8 +3296,8 @@
                             (skip-syntax-backward "^)")))
                         (while (and (python-syntax-context 'paren)
                                     (not (eobp)))
-                          (goto-char (1+ (point-marker))))
-                        (point-marker)))
+                          (goto-char (1+ (point))))
+                        (point)))
     (let ((paragraph-start "\f\\|[ \t]*$")
           (paragraph-separate ",")
           (fill-paragraph-function))
@@ -4323,7 +4318,8 @@
   (add-to-list 'hs-special-modes-alist
                `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
                              ,(lambda (_arg)
-                                (python-nav-end-of-defun)) nil))
+                                (python-nav-end-of-defun))
+                             nil))
 
   (set (make-local-variable 'outline-regexp)
        (python-rx (* space) block-start))


reply via email to

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