Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a521c1b

Browse files
committed
Barry's 2.18 -- don't indent, only outdent
1 parent 2ed5354 commit a521c1b

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

Misc/python-mode-old.el

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
;; 1992-1994 Tim Peters <[email protected]>
77
;; Maintainer: [email protected]
88
;; Created: Feb 1992
9-
;; Version: 2.16
10-
;; Last Modified: 1995/03/15 16:23:59
9+
;; Version: 2.18
10+
;; Last Modified: 1995/03/15 18:23:16
1111
;; Keywords: python editing language major-mode
1212

1313
;; This software is provided as-is, without express or implied
@@ -69,7 +69,7 @@
6969
;; LCD Archive Entry:
7070
;; python-mode|Barry A. Warsaw|[email protected]
7171
;; |Major mode for editing Python programs
72-
;; |1995/03/15 16:23:59|2.16|
72+
;; |1995/03/15 18:23:16|2.18|
7373

7474
;;; Code:
7575

@@ -436,10 +436,12 @@ argument is provided, that many colons are inserted non-electrically."
436436
(py-compute-indentation)))
437437
)
438438
(setq outdent py-indent-offset))
439-
;; electric colon won't re-indent lines that start in column
440-
;; zero. you'd have to use TAB for that. TBD: Is there a
441-
;; better way to determine this???
442-
(if (zerop (current-indentation)) nil
439+
;; Don't indent, only outdent. This assumes that any lines that
440+
;; are already outdented relative to py-compute-indentation were
441+
;; put there on purpose. Its highly annoying to have `:' indent
442+
;; for you. Use TAB, C-c C-l or C-c C-r to adjust. TBD: Is
443+
;; there a better way to determine this???
444+
(if (< (current-indentation) indent) nil
443445
(goto-char here)
444446
(beginning-of-line)
445447
(delete-horizontal-space)
@@ -1908,7 +1910,7 @@ local bindings to py-newline-and-indent."))
19081910
(setq zmacs-region-stays t)))
19091911

19101912

1911-
(defconst py-version "2.16"
1913+
(defconst py-version "2.18"
19121914
"`python-mode' version number.")
19131915
(defconst py-help-address "[email protected]"
19141916
"Address accepting submission of bug reports.")

0 commit comments

Comments
 (0)