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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
50620051
Commit
50620051
authored
Jan 10, 2013
by
Fabián Ezequiel Gallina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* progmodes/python.el (python-nav-end-of-statement): Fix
cornercase when handling multiline strings.
parent
c4dd9efc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/progmodes/python.el
lisp/progmodes/python.el
+11
-2
No files found.
lisp/ChangeLog
View file @
50620051
2013-01-10 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-nav-end-of-statement): Fix
cornercase when handling multiline strings.
2013-01-10 Glenn Morris <rgm@gnu.org>
* emacs-lisp/authors.el (authors-ignored-files)
...
...
lisp/progmodes/python.el
View file @
50620051
...
...
@@ -1188,7 +1188,16 @@ of the statement."
(
not
(
eobp
))
(
cond
((
setq
string-start
(
python-syntax-context
'string
))
(
goto-char
string-start
)
(
python-nav-end-of-statement
t
))
(
if
(
python-syntax-context
'paren
)
;; Ended up inside a paren, roll again.
(
python-nav-end-of-statement
t
)
;; This is not inside a paren, move to the
;; end of this string.
(
goto-char
(
+
(
point
)
(
python-syntax-count-quotes
(
char-after
(
point
))
(
point
))))
(
or
(
re-search-forward
(
rx
(
syntax
string-delimiter
))
nil
t
)
(
goto-char
(
point-max
)))))
((
python-syntax-context
'paren
)
;; The statement won't end before we've escaped
;; at least one level of parenthesis.
...
...
@@ -1302,7 +1311,7 @@ backward to previous block."
"Safe version of standard `forward-sexp'.
When ARG > 0 move forward, else if ARG is < 0."
(
or
arg
(
setq
arg
1
))
(
let
((
forward-sexp-function
nil
)
(
let
((
forward-sexp-function
)
(
paren-regexp
(
if
(
>
arg
0
)
(
python-rx
close-paren
)
(
python-rx
open-paren
)))
(
search-fn
...
...
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