mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 19:31:02 -08:00
Fixed indentation of multi-line function call's closing parenthesis
This commit is contained in:
parent
24b68537c3
commit
17d13b8526
1 changed files with 26 additions and 18 deletions
|
|
@ -599,24 +599,32 @@ START is the buffer position where the sexp starts."
|
|||
(current-indentation)))))
|
||||
indentation))
|
||||
('inside-paren
|
||||
(-
|
||||
(save-excursion
|
||||
(goto-char context-start)
|
||||
(forward-char)
|
||||
(save-restriction
|
||||
(narrow-to-region
|
||||
(line-beginning-position)
|
||||
(line-end-position))
|
||||
(forward-comment 1))
|
||||
(if (looking-at "$")
|
||||
(+ (current-indentation) python-indent-offset)
|
||||
(forward-comment 1)
|
||||
(current-column)))
|
||||
(if (progn
|
||||
(back-to-indentation)
|
||||
(looking-at (regexp-opt '(")" "]" "}"))))
|
||||
python-indent-offset
|
||||
0))))))))
|
||||
(or (save-excursion
|
||||
(forward-comment 1)
|
||||
(looking-at (regexp-opt '(")" "]" "}")))
|
||||
(forward-char 1)
|
||||
(when (not (nth 1 (syntax-ppss)))
|
||||
(goto-char context-start)
|
||||
(back-to-indentation)
|
||||
(current-column)))
|
||||
(-
|
||||
(save-excursion
|
||||
(goto-char context-start)
|
||||
(forward-char)
|
||||
(save-restriction
|
||||
(narrow-to-region
|
||||
(line-beginning-position)
|
||||
(line-end-position))
|
||||
(forward-comment 1))
|
||||
(if (looking-at "$")
|
||||
(+ (current-indentation) python-indent-offset)
|
||||
(forward-comment 1)
|
||||
(current-column)))
|
||||
(if (progn
|
||||
(back-to-indentation)
|
||||
(looking-at (regexp-opt '(")" "]" "}"))))
|
||||
python-indent-offset
|
||||
0)))))))))
|
||||
|
||||
(defun python-indent-calculate-levels ()
|
||||
"Calculate `python-indent-levels' and reset `python-indent-current-level'."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue