* bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation
@ 2013-11-05 15:21 Friedrich Delgado
2013-11-06 7:16 ` Andreas Röhler
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Friedrich Delgado @ 2013-11-05 15:21 UTC (permalink / raw)
To: 15812
[-- Attachment #1: Type: text/plain, Size: 22693 bytes --]
emacs -Q
M-x python-mode
M-x erase-buffer<RET>y<RET>y
def foo():
"return stuff"
<TAB>
Expected behaviour: The cursor is placed under the first quotation
mark (4 spaces indent)
Actual behaviour: The cursor is placed at the beginning of the line.
In GNU Emacs 24.3.50.1 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4)
of 2013-07-09 on rosita
Windowing system distributor `The X.Org Foundation', version
11.0.11203000
System Description: openSUSE 12.2 (x86_64)
Configured using:
`configure --prefix=/home/friedel/local/stow/emacs
--without-gif'
Important settings:
value of $LC_ALL: de_DE.utf8
value of $LANG: de_DE.utf8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Python
Minor modes in effect:
xterm-mouse-mode: t
diff-auto-refine-mode: t
elpy-mode: t
yas-minor-mode: t
highlight-indentation-mode: t
flymake-mode: t
auto-complete-mode: t
global-git-gutter-mode: t
shell-dirtrack-mode: t
desktop-save-mode: t
winpoint-mode: t
display-time-mode: t
eldoc-mode: t
strokes-mode: t
show-paren-mode: t
minibuffer-electric-default-mode: t
ido-everywhere: t
auto-image-file-mode: t
override-global-mode: t
image-diredx-async-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<up> <up> <up> <down> C-SPC <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> C-w <down> <down> <tab> <tab>
<tab> C-_ C-_ C-_ C-x C-s C-_ C-_ C-_ C-_ C-_ C-_ C-_
C-x C-s C-c <C-left> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> C-a C-SPC <C-end> C-w C-c
<C-right> <down> <down> <down> <down> <down> <down>
<down> <down> <down> C-c <C-left> d e f SPC s o u r
c e s ( s e l f ) : <return> <tab> r e t <backspace>
<backspace> <backspace> " r e t u r n SPC a SPC c o
l l e c t i o n SPC o f SPC s o u r c e s SPC w e SPC
a g g r e g a t e SPC o v e r " <return> <tab> <tab>
<up> C-e <C-left> <C-left> <C-left> <C-left> <down>
<tab> <C-home> C-SPC <C-end> C-w C-x k <return> y C-x
C-f <M-backspace> <M-backspace> <M-backspace> <M-backspace>
<M-backspace> b l a . p y <return> <C-return> <M-backspace>
<M-backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <return> C-j <return> d e f SPC s o u r
c e s ( s e l f ) : <return> <tab> " b l a " <return>
<tab> <up> <right> C-k r e t u r n SPC a SPC c o l
l e c t i o n " <return> <tab> C-k C-k <up> C-e <C-left>
<C-left> <left> M-d M-d <down> <tab> r e t u r n <tab>
SPC <tab> f o <tab> <tab> C-a <tab> <tab> C-k <up>
<up> <C-right> <right> M-d f o o <down> <up> <up> <up>
<up> <up> <up> <down> <down> <tab> <right> M-d <down>
<tab> <down> <tab> M-x r e b <backspace> p o <tab>
r <tab> <return>
Recent messages:
Mark set [3 times]
Buffer foo.py modified; kill anyway? (y or n) y
Searching for `bla.py'....
Searching for `bla.python-guess-indent'....
(New file)
Here is not Git work tree
Can't guess python-indent-offset, using defaults: 4
Here is not Git work tree
Auto-saving...done
Making completion list...
Load-path shadows:
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/loaddefs hides
~/lib/emacs/loaddefs
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/calendar/timeclock
hides ~/lib/emacs/timeclock
/home/friedel/.emacs.d/elpa/mmm-mako-20121019.2351/mmm-mako hides
~/lib/emacs/mmm-mako
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/align hides
~/lib/emacs/align
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/timezone hides
/home/friedel/lib/emacs/apel-10.7/timezone
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/env hides
/home/friedel/lib/emacs/apel-10.7/env
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/json hides
/home/friedel/lib/emacs/g-client/json
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/gnus/.dir-locals
hides /home/friedel/lib/emacs/magit/.dir-locals
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/gnus/.dir-locals
hides /home/friedel/lib/emacs/org-mode/.dir-locals
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/textmodes/remember
hides /home/friedel/lib/emacs/remember/remember
/home/friedel/lib/emacs/doxymacs-1.8.0/lisp/xml-parse hides
/home/friedel/lib/emacs/doxymacs-1.8.0/no-autoconf/xml-parse
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/mail/rfc2368
hides /home/friedel/lib/emacs/emacs-w3m/attic/rfc2368
/home/friedel/.emacs.d/elpa/popup-20130324.1305/popup hides
/home/friedel/lib/emacs/ensime_2.8.1-0.4.1/elisp/popup
/home/friedel/.emacs.d/elpa/fuzzy-20120323.1044/fuzzy hides
/home/friedel/lib/emacs/ensime_2.8.1-0.4.1/elisp/fuzzy
/home/friedel/.emacs.d/elpa/auto-complete-20130503.2013/auto-complete
hides /home/friedel/lib/emacs/ensime_2.8.1-0.4.1/elisp/auto-complete
~/lib/emacs/php-mode hides
/home/friedel/lib/emacs/nxhtml/related/php-mode
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/emacs-lisp/ert
hides /home/friedel/lib/emacs/nxhtml/tests/ert
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-odt
hides /home/friedel/lib/emacs/nxhtml/util/org-odt
~/lib/emacs/fold-dwim hides
/home/friedel/lib/emacs/nxhtml/util/fold-dwim
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-timer
hides /home/friedel/lib/emacs/org-mode/lisp/org-timer
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-rmail
hides /home/friedel/lib/emacs/org-mode/lisp/org-rmail
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-loaddefs
hides /home/friedel/lib/emacs/org-mode/lisp/org-loaddefs
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-version
hides /home/friedel/lib/emacs/org-mode/lisp/org-version
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-mac-message
hides /home/friedel/lib/emacs/org-mode/lisp/org-mac-message
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-mhe
hides /home/friedel/lib/emacs/org-mode/lisp/org-mhe
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-mouse
hides /home/friedel/lib/emacs/org-mode/lisp/org-mouse
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-irc
hides /home/friedel/lib/emacs/org-mode/lisp/org-irc
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org hides
/home/friedel/lib/emacs/org-mode/lisp/org
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-plot
hides /home/friedel/lib/emacs/org-mode/lisp/org-plot
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-info
hides /home/friedel/lib/emacs/org-mode/lisp/org-info
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-pcomplete
hides /home/friedel/lib/emacs/org-mode/lisp/org-pcomplete
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-table
hides /home/friedel/lib/emacs/org-mode/lisp/org-table
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-src
hides /home/friedel/lib/emacs/org-mode/lisp/org-src
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-macs
hides /home/friedel/lib/emacs/org-mode/lisp/org-macs
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-habit
hides /home/friedel/lib/emacs/org-mode/lisp/org-habit
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-protocol
hides /home/friedel/lib/emacs/org-mode/lisp/org-protocol
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-install
hides /home/friedel/lib/emacs/org-mode/lisp/org-install
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-feed
hides /home/friedel/lib/emacs/org-mode/lisp/org-feed
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-inlinetask
hides /home/friedel/lib/emacs/org-mode/lisp/org-inlinetask
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-indent
hides /home/friedel/lib/emacs/org-mode/lisp/org-indent
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-id
hides /home/friedel/lib/emacs/org-mode/lisp/org-id
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-eshell
hides /home/friedel/lib/emacs/org-mode/lisp/org-eshell
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-gnus
hides /home/friedel/lib/emacs/org-mode/lisp/org-gnus
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-footnote
hides /home/friedel/lib/emacs/org-mode/lisp/org-footnote
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-mobile
hides /home/friedel/lib/emacs/org-mode/lisp/org-mobile
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-entities
hides /home/friedel/lib/emacs/org-mode/lisp/org-entities
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-list
hides /home/friedel/lib/emacs/org-mode/lisp/org-list
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-ctags
hides /home/friedel/lib/emacs/org-mode/lisp/org-ctags
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-crypt
hides /home/friedel/lib/emacs/org-mode/lisp/org-crypt
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-docview
hides /home/friedel/lib/emacs/org-mode/lisp/org-docview
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-datetree
hides /home/friedel/lib/emacs/org-mode/lisp/org-datetree
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-faces
hides /home/friedel/lib/emacs/org-mode/lisp/org-faces
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-element
hides /home/friedel/lib/emacs/org-mode/lisp/org-element
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-compat
hides /home/friedel/lib/emacs/org-mode/lisp/org-compat
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-colview
hides /home/friedel/lib/emacs/org-mode/lisp/org-colview
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-clock
hides /home/friedel/lib/emacs/org-mode/lisp/org-clock
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-capture
hides /home/friedel/lib/emacs/org-mode/lisp/org-capture
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-bbdb
hides /home/friedel/lib/emacs/org-mode/lisp/org-bbdb
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-attach
hides /home/friedel/lib/emacs/org-mode/lisp/org-attach
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-bibtex
hides /home/friedel/lib/emacs/org-mode/lisp/org-bibtex
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-archive
hides /home/friedel/lib/emacs/org-mode/lisp/org-archive
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-agenda
hides /home/friedel/lib/emacs/org-mode/lisp/org-agenda
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob hides
/home/friedel/lib/emacs/org-mode/lisp/ob
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-tangle
hides /home/friedel/lib/emacs/org-mode/lisp/ob-tangle
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-table
hides /home/friedel/lib/emacs/org-mode/lisp/ob-table
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-sqlite
hides /home/friedel/lib/emacs/org-mode/lisp/ob-sqlite
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-sql
hides /home/friedel/lib/emacs/org-mode/lisp/ob-sql
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-shen
hides /home/friedel/lib/emacs/org-mode/lisp/ob-shen
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-sh
hides /home/friedel/lib/emacs/org-mode/lisp/ob-sh
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-screen
hides /home/friedel/lib/emacs/org-mode/lisp/ob-screen
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-scheme
hides /home/friedel/lib/emacs/org-mode/lisp/ob-scheme
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-scala
hides /home/friedel/lib/emacs/org-mode/lisp/ob-scala
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-sass
hides /home/friedel/lib/emacs/org-mode/lisp/ob-sass
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-ruby
hides /home/friedel/lib/emacs/org-mode/lisp/ob-ruby
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-ref
hides /home/friedel/lib/emacs/org-mode/lisp/ob-ref
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-python
hides /home/friedel/lib/emacs/org-mode/lisp/ob-python
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-plantuml
hides /home/friedel/lib/emacs/org-mode/lisp/ob-plantuml
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-picolisp
hides /home/friedel/lib/emacs/org-mode/lisp/ob-picolisp
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-perl
hides /home/friedel/lib/emacs/org-mode/lisp/ob-perl
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-org
hides /home/friedel/lib/emacs/org-mode/lisp/ob-org
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-octave
hides /home/friedel/lib/emacs/org-mode/lisp/ob-octave
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-ocaml
hides /home/friedel/lib/emacs/org-mode/lisp/ob-ocaml
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-mscgen
hides /home/friedel/lib/emacs/org-mode/lisp/ob-mscgen
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-maxima
hides /home/friedel/lib/emacs/org-mode/lisp/ob-maxima
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-matlab
hides /home/friedel/lib/emacs/org-mode/lisp/ob-matlab
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-lob
hides /home/friedel/lib/emacs/org-mode/lisp/ob-lob
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-lisp
hides /home/friedel/lib/emacs/org-mode/lisp/ob-lisp
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-lilypond
hides /home/friedel/lib/emacs/org-mode/lisp/ob-lilypond
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-ledger
hides /home/friedel/lib/emacs/org-mode/lisp/ob-ledger
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-latex
hides /home/friedel/lib/emacs/org-mode/lisp/ob-latex
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-keys
hides /home/friedel/lib/emacs/org-mode/lisp/ob-keys
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-js
hides /home/friedel/lib/emacs/org-mode/lisp/ob-js
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-java
hides /home/friedel/lib/emacs/org-mode/lisp/ob-java
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-io
hides /home/friedel/lib/emacs/org-mode/lisp/ob-io
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-haskell
hides /home/friedel/lib/emacs/org-mode/lisp/ob-haskell
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-gnuplot
hides /home/friedel/lib/emacs/org-mode/lisp/ob-gnuplot
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-fortran
hides /home/friedel/lib/emacs/org-mode/lisp/ob-fortran
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-exp
hides /home/friedel/lib/emacs/org-mode/lisp/ob-exp
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-eval
hides /home/friedel/lib/emacs/org-mode/lisp/ob-eval
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-emacs-lisp
hides /home/friedel/lib/emacs/org-mode/lisp/ob-emacs-lisp
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-dot
hides /home/friedel/lib/emacs/org-mode/lisp/ob-dot
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-ditaa
hides /home/friedel/lib/emacs/org-mode/lisp/ob-ditaa
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-css
hides /home/friedel/lib/emacs/org-mode/lisp/ob-css
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-comint
hides /home/friedel/lib/emacs/org-mode/lisp/ob-comint
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-clojure
hides /home/friedel/lib/emacs/org-mode/lisp/ob-clojure
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-calc
hides /home/friedel/lib/emacs/org-mode/lisp/ob-calc
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-awk
hides /home/friedel/lib/emacs/org-mode/lisp/ob-awk
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-asymptote
hides /home/friedel/lib/emacs/org-mode/lisp/ob-asymptote
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-R hides
/home/friedel/lib/emacs/org-mode/lisp/ob-R
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/ob-C hides
/home/friedel/lib/emacs/org-mode/lisp/ob-C
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/calendar/timeclock
hides /home/friedel/lib/emacs/planner/contrib/timeclock
/home/friedel/lib/emacs/muse/examples/johnw/muse-init hides
/home/friedel/lib/emacs/muse/examples/mwolson/muse-init
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-w3m
hides /home/friedel/lib/emacs/org-mode/contrib/lisp/org-w3m
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-wl
hides /home/friedel/lib/emacs/org-mode/contrib/lisp/org-wl
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-vm
hides /home/friedel/lib/emacs/org-mode/contrib/lisp/org-vm
/home/friedel/local/stow/emacs/share/emacs/24.3.50/lisp/org/org-mew
hides /home/friedel/lib/emacs/org-mode/contrib/lisp/org-mew
/home/friedel/lib/emacs/nxhtml/util/org-panel hides
/home/friedel/lib/emacs/org-mode/contrib/lisp/org-panel
Features:
(shadow emacsbug message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader sendmail mail-utils debug
slime-sbcl-exts slime-tramp slime-asdf slime-fancy slime-fontifying-fu
slime-package-fu slime-references slime-scratch slime-presentations
slime-fuzzy slime-fancy-inspector slime-c-p-c slime-editing-commands
slime-autodoc slime-parse slime-repl elp slime hyperspec org-capture
org-mks tramp-cache tramp-sh org-archive org-colview browse-url post
xt-mouse xterm hippie-exp mule-util cal-iso url-http tls url url-proxy
url-privacy url-expand url-history mailcap url-auth mail-parse rfc2231
rfc2047 rfc2045 ietf-drums url-cookie url-domsuf url-gw url-methods
windmove smerge-mode magit-svn url-handlers misearch multi-isearch
time-stamp tabify org-element ffap highlight-parentheses quack
cmuscheme scheme sh-script smie executable cperl-mode nxml-uchnm
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match
rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap
nxml-util nxml-glyph nxml-enc xmltok vc-hg conf-mode disp-table
org-checklist org-magit magit-bisect magit-key-mode magit iswitchb
view diff-mode log-edit pcvs-util add-log org-location-google-maps
google-maps google-maps-static url-util url-parse url-vars
google-maps-geocode google-maps-base org-notmuch org-clock org-timer
org-toc org-man org-mairix org-elisp-symbol org-bookmark bookmark pp
org-annotate-file org-w3m org-wl org-vm org-rmail org-protocol org-mhe
org-mew org-irc org-habit org-jsinfo org-infojs org-html org-exp
ob-exp org-exp-blocks org-agenda org-info org-id org-bibtex bibtex
org-bbdb elpy yasnippet virtualenv thingatpt python rx nose json
idomenu imenu highlight-indentation flymake compile
find-file-in-project etags elpy-refactor auto-complete-config
auto-complete popup git-gutter tramp tramp-compat auth-source eieio
eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs
trampver shell coffee-mode browse-vcs-url vc vc-dispatcher server
my-bindings desktop session cedet-config epa-file epa epg epg-config
ediff monky bindat org-config notify cal-china lunar solar cal-dst
cal-islam cal-hebrew holidays hol-loaddefs vc-git generic dtrt-indent
appt diary-lib diary-loaddefs org ob-tangle ob-ref ob-lob ob-table
org-footnote org-src ob-comint ob-keys org-pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp ob
org-compat org-macs ob-eval org-loaddefs winpoint c-eldoc cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs lisp-stuff paredit edmacro kmacro help-mode dired+
dired-x ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util dired-aux mutt-alias outline-or-allout-config
uniquify myfuncs tls-config auto-mode-config generic-x autoload-config
cal-menu calendar cal-loaddefs site-customisation customisations-cert
time timeclock saveplace pcomplete comint ansi-color ring esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups
eshell esh-module esh-mode esh-util jka-compr type-break strokes paren
minibuf-eldef ido delsel image-file initsplit byte-opt cus-edit
cus-start cus-load wid-edit find-func use-package cl bytecomp
byte-compile cconv bind-key easy-mmode site-conditionals warnings
dired+-autoloads dired-single-autoloads elpy-autoloads
find-file-in-project-autoloads fuzzy-autoloads gnuplot-autoloads
gnuplot-mode-autoloads highlight-indentation-autoloads
idomenu-autoloads iedit-autoloads image-dired+-autoloads image-dired+
nadvice image-dired format-spec dired advice help-fns
ipython-autoloads jedi-autoloads auto-complete-autoloads epc-autoloads
ctable-autoloads concurrent-autoloads deferred-autoloads
mmm-mako-autoloads mmm-mode-autoloads info easymenu nose-autoloads
popup-autoloads virtualenv-autoloads yaml-mode-autoloads
yasnippet-autoloads package derived cl-macs gv cl-loaddefs cl-lib
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)
Kind regards
Friedel
--
Friedrich Delgado <friedel@nomaden.org>
TauPan on Ircnet and Freenode ;)
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation
2013-11-05 15:21 bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation Friedrich Delgado
@ 2013-11-06 7:16 ` Andreas Röhler
2013-11-06 11:51 ` Nathan Trapuzzano
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Andreas Röhler @ 2013-11-06 7:16 UTC (permalink / raw)
To: 15812
Am 05.11.2013 16:21, schrieb Friedrich Delgado:
> def foo():
> "return stuff"
May confirme this
GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2013-07-06
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation
2013-11-05 15:21 bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation Friedrich Delgado
2013-11-06 7:16 ` Andreas Röhler
@ 2013-11-06 11:51 ` Nathan Trapuzzano
2013-11-06 14:23 ` Nathan Trapuzzano
2013-12-12 3:51 ` bug#15812: Fabián Ezequiel Gallina
3 siblings, 0 replies; 7+ messages in thread
From: Nathan Trapuzzano @ 2013-11-06 11:51 UTC (permalink / raw)
To: Friedrich Delgado; +Cc: 15812
Friedrich Delgado <friedel@nomaden.org> writes:
> emacs -Q
> M-x python-mode
> M-x erase-buffer<RET>y<RET>y
> def foo():
> "return stuff"
> <TAB>
>
> Expected behaviour: The cursor is placed under the first quotation
> mark (4 spaces indent)
>
> Actual behaviour: The cursor is placed at the beginning of the line.
Ditto for "break", "continue", "pass", "raise", and "return". These are
the words that make up `python-indent-block-enders'.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation
2013-11-05 15:21 bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation Friedrich Delgado
2013-11-06 7:16 ` Andreas Röhler
2013-11-06 11:51 ` Nathan Trapuzzano
@ 2013-11-06 14:23 ` Nathan Trapuzzano
2013-11-07 8:36 ` Friedrich Delgado
2013-12-12 3:51 ` bug#15812: Fabián Ezequiel Gallina
3 siblings, 1 reply; 7+ messages in thread
From: Nathan Trapuzzano @ 2013-11-06 14:23 UTC (permalink / raw)
To: Friedrich Delgado; +Cc: 15812
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
Friedrich Delgado <friedel@nomaden.org> writes:
> emacs -Q
> M-x python-mode
> M-x erase-buffer<RET>y<RET>y
> def foo():
> "return stuff"
> <TAB>
>
> Expected behaviour: The cursor is placed under the first quotation
> mark (4 spaces indent)
>
> Actual behaviour: The cursor is placed at the beginning of the line.
Patch attached with regression test. `python-nav-begining-of-statement'
puts point on the first non-whitespace character of the statement, so
it's safe to use `looking-at' here.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: python-mode.el.patch --]
[-- Type: text/x-diff, Size: 3791 bytes --]
From 49df44bf51b0a3b2a8c90180764aa37d5f3e95de Mon Sep 17 00:00:00 2001
From: Nathan Trapuzzano <nbtrap@nbtrap.com>
Date: Wed, 6 Nov 2013 08:11:43 -0500
Subject: [PATCH] Fix python-mode indentation bug #15812, and add regression
test.
* progmodes/python.el (python-indent-calculate-indentation): When
determining indentation, don't treat "return", "pass", etc., as
operators when they are just string constituents. (Bug#15812)
* automated/python-test.el (python-indent-block-enders)
(python-indent-block-enders-1, python-indent-block-enders-2):
Rename one test, add another.
---
lisp/ChangeLog | 6 ++++++
lisp/progmodes/python.el | 2 +-
test/ChangeLog | 6 ++++++
test/automated/python-tests.el | 23 ++++++++++++++++++++++-
4 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d69ea7c..847a335 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-06 Nathan Trapuzzano <nbtrap@nbtrap.com>
+
+ * progmodes/python.el (python-indent-calculate-indentation): When
+ determining indentation, don't treat "return", "pass", etc., as
+ operators when they are just string constituents. (Bug#15812)
+
2013-11-06 Eli Zaretskii <eliz@gnu.org>
* menu-bar.el (popup-menu, menu-bar-open): When displaying TTY
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 7a90f0b..4d4c504 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -775,7 +775,7 @@ START is the buffer position where the sexp starts."
(save-excursion
(python-util-forward-comment -1)
(python-nav-beginning-of-statement)
- (member (current-word) python-indent-block-enders)))
+ (looking-at (regexp-opt python-indent-block-enders))))
python-indent-offset
0)))
;; When inside of a string, do nothing. just use the current
diff --git a/test/ChangeLog b/test/ChangeLog
index e032af4..a0ad888 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-06 Nathan Trapuzzano <nbtrap@nbtrap.com>
+
+ * automated/python-test.el (python-indent-block-enders)
+ (python-indent-block-enders-1, python-indent-block-enders-2):
+ Rename one test, add another.
+
2013-11-06 Michael Albinus <michael.albinus@gmx.de>
* automated/tramp-tests.el (tramp-test07-file-exists-p):
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index ef1c015..798e21f 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -447,7 +447,7 @@ objects = Thing.objects.all() \\\\
(should (eq (car (python-indent-context)) 'after-line))
(should (= (python-indent-calculate-indentation) 0))))
-(ert-deftest python-indent-block-enders ()
+(ert-deftest python-indent-block-enders-1 ()
"Test `python-indent-block-enders' value honoring."
(python-tests-with-temp-buffer
"
@@ -469,6 +469,27 @@ Class foo(object):
(forward-line 1)
(should (= (python-indent-calculate-indentation) 8))))
+(ert-deftest python-indent-block-enders-2 ()
+ "Test `python-indent-block-enders' value honoring."
+ (python-tests-with-temp-buffer
+ "
+Class foo(object):
+ '''raise lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+
+ eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ '''
+ def bar(self):
+ \"return (1, 2, 3).\"
+ if self.baz:
+ return (1,
+ 2,
+ 3)
+"
+ (python-tests-look-at "def")
+ (should (= (python-indent-calculate-indentation) 4))
+ (python-tests-look-at "if")
+ (should (= (python-indent-calculate-indentation) 8))))
+
\f
;;; Navigation
--
1.8.4.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation
2013-11-06 14:23 ` Nathan Trapuzzano
@ 2013-11-07 8:36 ` Friedrich Delgado
0 siblings, 0 replies; 7+ messages in thread
From: Friedrich Delgado @ 2013-11-07 8:36 UTC (permalink / raw)
To: Nathan Trapuzzano; +Cc: 15812
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
Hi!
In case user feedback is welcome:
Your patch fixes the problem for me.
Thanks
Friedel
--
Friedrich Delgado <friedel@nomaden.org>
TauPan on Ircnet and Freenode ;)
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15812:
2013-11-05 15:21 bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation Friedrich Delgado
` (2 preceding siblings ...)
2013-11-06 14:23 ` Nathan Trapuzzano
@ 2013-12-12 3:51 ` Fabián Ezequiel Gallina
2013-12-12 4:21 ` bug#15812: Glenn Morris
3 siblings, 1 reply; 7+ messages in thread
From: Fabián Ezequiel Gallina @ 2013-12-12 3:51 UTC (permalink / raw)
To: 15812-done
Fixed in revno 115477.
Thanks Nathan Trapuzzano for the patch.
Regards,
Fabián.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15812:
2013-12-12 3:51 ` bug#15812: Fabián Ezequiel Gallina
@ 2013-12-12 4:21 ` Glenn Morris
0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2013-12-12 4:21 UTC (permalink / raw)
To: nbtrap; +Cc: 15812
Fabián Ezequiel Gallina wrote:
> Thanks Nathan Trapuzzano for the patch.
We have several changes from you in Emacs now.
Would you be willing to complete a copyright assignment?
I don't think we can accept any more changes without one.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-12-12 4:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05 15:21 bug#15812: 24.3.50; docstring starting with "return" confuses python-mode indentation Friedrich Delgado
2013-11-06 7:16 ` Andreas Röhler
2013-11-06 11:51 ` Nathan Trapuzzano
2013-11-06 14:23 ` Nathan Trapuzzano
2013-11-07 8:36 ` Friedrich Delgado
2013-12-12 3:51 ` bug#15812: Fabián Ezequiel Gallina
2013-12-12 4:21 ` bug#15812: Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).