[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115758: * lisp/progmodes/python.el: Use lexical-bin
From: |
Fabián Ezequiel Gallina |
Subject: |
[Emacs-diffs] trunk r115758: * lisp/progmodes/python.el: Use lexical-binding. |
Date: |
Thu, 26 Dec 2013 16:45:54 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115758
revision-id: address@hidden
parent: address@hidden
committer: Fabián Ezequiel Gallina <address@hidden>
branch nick: trunk
timestamp: Thu 2013-12-26 13:45:19 -0300
message:
* lisp/progmodes/python.el: Use lexical-binding.
(python-nav-beginning-of-defun): Stop searching ASAP.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/python.el python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-12-25 22:52:15 +0000
+++ b/lisp/ChangeLog 2013-12-26 16:45:19 +0000
@@ -1,3 +1,8 @@
+2013-12-26 Fabián Ezequiel Gallina <address@hidden>
+
+ * progmodes/python.el: Use lexical-binding.
+ (python-nav-beginning-of-defun): Stop searching ASAP.
+
2013-12-25 Xue Fuqiao <address@hidden>
* vc/vc.el (vc-ignore): Use `vc-responsible-backend'.
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2013-12-25 18:07:31 +0000
+++ b/lisp/progmodes/python.el 2013-12-26 16:45:19 +0000
@@ -1,4 +1,4 @@
-;;; python.el --- Python's flying circus support for Emacs
+;;; python.el --- Python's flying circus support for Emacs -*-
lexical-binding: t -*-
;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
@@ -180,7 +180,7 @@
;; Imenu: There are two index building functions to be used as
;; `imenu-create-index-function': `python-imenu-create-index' (the
;; default one, builds the alist in form of a tree) and
-;; `python-imenu-create-flat-index'. See also
+;; `python-imenu-create-flat-index'. See also
;; `python-imenu-format-item-label-function',
;; `python-imenu-format-parent-item-label-function',
;; `python-imenu-format-parent-item-jump-label-function' variables for
@@ -1183,13 +1183,13 @@
`beginning-of-defun'."
(when (or (null arg) (= arg 0)) (setq arg 1))
(let ((found))
- (cond ((and (eq this-command 'mark-defun)
- (python-info-looking-at-beginning-of-defun)))
- (t
- (dotimes (i (if (> arg 0) arg (- arg)))
- (when (and (python-nav--beginning-of-defun arg)
- (not found))
- (setq found t)))))
+ (while (and (not (= arg 0))
+ (let ((keep-searching-p
+ (python-nav--beginning-of-defun arg)))
+ (when (and keep-searching-p (null found))
+ (setq found t))
+ keep-searching-p))
+ (setq arg (if (> arg 0) (1- arg) (1+ arg))))
found))
(defun python-nav-end-of-defun ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115758: * lisp/progmodes/python.el: Use lexical-binding.,
Fabián Ezequiel Gallina <=