* lisp/progmodes/python.el: Use lexical-binding.
(python-nav-beginning-of-defun): Stop searching ASAP.
This commit is contained in:
parent
0cbab19e6e
commit
fbcc63a317
2 changed files with 14 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-12-26 Fabián Ezequiel Gallina <fgallina@gnu.org>
|
||||||
|
|
||||||
|
* progmodes/python.el: Use lexical-binding.
|
||||||
|
(python-nav-beginning-of-defun): Stop searching ASAP.
|
||||||
|
|
||||||
2013-12-25 Xue Fuqiao <xfq.free@gmail.com>
|
2013-12-25 Xue Fuqiao <xfq.free@gmail.com>
|
||||||
|
|
||||||
* vc/vc.el (vc-ignore): Use `vc-responsible-backend'.
|
* vc/vc.el (vc-ignore): Use `vc-responsible-backend'.
|
||||||
|
|
|
@ -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.
|
;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@
|
||||||
;; Imenu: There are two index building functions to be used as
|
;; Imenu: There are two index building functions to be used as
|
||||||
;; `imenu-create-index-function': `python-imenu-create-index' (the
|
;; `imenu-create-index-function': `python-imenu-create-index' (the
|
||||||
;; default one, builds the alist in form of a tree) and
|
;; 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-item-label-function',
|
||||||
;; `python-imenu-format-parent-item-label-function',
|
;; `python-imenu-format-parent-item-label-function',
|
||||||
;; `python-imenu-format-parent-item-jump-label-function' variables for
|
;; `python-imenu-format-parent-item-jump-label-function' variables for
|
||||||
|
@ -1183,13 +1183,13 @@ position. Return non-nil if point is moved to
|
||||||
`beginning-of-defun'."
|
`beginning-of-defun'."
|
||||||
(when (or (null arg) (= arg 0)) (setq arg 1))
|
(when (or (null arg) (= arg 0)) (setq arg 1))
|
||||||
(let ((found))
|
(let ((found))
|
||||||
(cond ((and (eq this-command 'mark-defun)
|
(while (and (not (= arg 0))
|
||||||
(python-info-looking-at-beginning-of-defun)))
|
(let ((keep-searching-p
|
||||||
(t
|
(python-nav--beginning-of-defun arg)))
|
||||||
(dotimes (i (if (> arg 0) arg (- arg)))
|
(when (and keep-searching-p (null found))
|
||||||
(when (and (python-nav--beginning-of-defun arg)
|
(setq found t))
|
||||||
(not found))
|
keep-searching-p))
|
||||||
(setq found t)))))
|
(setq arg (if (> arg 0) (1- arg) (1+ arg))))
|
||||||
found))
|
found))
|
||||||
|
|
||||||
(defun python-nav-end-of-defun ()
|
(defun python-nav-end-of-defun ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue