Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
fbcc63a3
Commit
fbcc63a3
authored
Dec 26, 2013
by
Fabián Ezequiel Gallina
Browse files
* lisp/progmodes/python.el: Use lexical-binding.
(python-nav-beginning-of-defun): Stop searching ASAP.
parent
0cbab19e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/progmodes/python.el
lisp/progmodes/python.el
+9
-9
No files found.
lisp/ChangeLog
View file @
fbcc63a3
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>
* vc/vc.el (vc-ignore): Use `vc-responsible-backend'.
...
...
lisp/progmodes/python.el
View file @
fbcc63a3
;;; 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 @@ position. Return non-nil if point is moved to
`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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment