mirror of
https://github.com/python/cpython.git
synced 2024-11-28 12:31:14 +08:00
(py-electric-backspace): I'm not sure this function should be special
casing when py-honor-comment-indentation is nil, but this could be a religious issue with some. Seems to me we should still be dedenting such comment lines one level.
This commit is contained in:
parent
53db859408
commit
fa2def2a61
@ -1524,8 +1524,8 @@ zero).
|
|||||||
|
|
||||||
Otherwise the preceding character is deleted, converting a tab to
|
Otherwise the preceding character is deleted, converting a tab to
|
||||||
spaces if needed so that only a single column position is deleted.
|
spaces if needed so that only a single column position is deleted.
|
||||||
\\[universal-argument] specifies how many characters to delete
|
\\[universal-argument] specifies how many characters to delete;
|
||||||
(default is 1).
|
default is 1.
|
||||||
|
|
||||||
When used programmatically, argument ARG specifies the number of
|
When used programmatically, argument ARG specifies the number of
|
||||||
blocks to dedent, or the number of characters to delete, as indicated
|
blocks to dedent, or the number of characters to delete, as indicated
|
||||||
@ -1534,8 +1534,9 @@ above."
|
|||||||
(if (or (/= (current-indentation) (current-column))
|
(if (or (/= (current-indentation) (current-column))
|
||||||
(bolp)
|
(bolp)
|
||||||
(py-continuation-line-p)
|
(py-continuation-line-p)
|
||||||
(not py-honor-comment-indentation)
|
; (not py-honor-comment-indentation)
|
||||||
(looking-at "#[^ \t\n]")) ; non-indenting #
|
; (looking-at "#[^ \t\n]") ; non-indenting #
|
||||||
|
)
|
||||||
(funcall py-backspace-function arg)
|
(funcall py-backspace-function arg)
|
||||||
;; else indent the same as the colon line that opened the block
|
;; else indent the same as the colon line that opened the block
|
||||||
;; force non-blank so py-goto-block-up doesn't ignore it
|
;; force non-blank so py-goto-block-up doesn't ignore it
|
||||||
|
Loading…
Reference in New Issue
Block a user