Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d97cc374
Kaydet (Commit)
d97cc374
authored
Mar 15, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
barry's 2.13 -- minor reworking of code (added py-outdent-p)
üst
d865bc59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
python-mode-old.el
Misc/python-mode-old.el
+19
-16
No files found.
Misc/python-mode-old.el
Dosyayı görüntüle @
d97cc374
...
...
@@ -6,8 +6,8 @@
;; 1992-1994 Tim Peters <tim@ksr.com>
;; Maintainer: bwarsaw@cnri.reston.va.us
;; Created: Feb 1992
;; Version: 2.1
2
;; Last Modified: 1995/03/14 2
0:53:08
;; Version: 2.1
3
;; Last Modified: 1995/03/14 2
2:05:53
;; Keywords: python editing language major-mode
;; This software is provided as-is, without express or implied
...
...
@@ -68,7 +68,7 @@
;; LCD Archive Entry:
;; python-mode|Barry A. Warsaw|bwarsaw@cnri.reston.va.us
;; |Major mode for editing Python programs
;; |1995/03/14 2
0:53:08|2.12
|
;; |1995/03/14 2
2:05:53|2.13
|
;;; Code:
...
...
@@ -403,6 +403,19 @@ py-beep-if-tab-change\tring the bell if tab-width is changed"
;; electric characters
(
defun
py-outdent-p
()
;; returns non-nil if the current line should outdent one level
(
save-excursion
(
and
(
progn
(
back-to-indentation
)
(
looking-at
py-outdent-re
))
(
progn
(
backward-to-indentation
1
)
(
while
(
or
(
looking-at
py-blank-or-comment-re
)
(
bobp
))
(
backward-to-indentation
1
))
(
not
(
looking-at
py-no-outdent-re
)))
)))
(
defun
py-electric-colon
(
arg
)
"Insert a colon.
In certain cases the line is outdented appropriately. If a numeric
...
...
@@ -414,13 +427,7 @@ argument is provided, that many colons are inserted non-electrically."
(
outdent
0
)
(
indent
(
py-compute-indentation
)))
(
if
(
and
(
not
arg
)
(
progn
(
back-to-indentation
)
(
looking-at
py-outdent-re
))
(
prog2
(
backward-to-indentation
1
)
(
not
(
looking-at
py-no-outdent-re
))
(
goto-char
here
))
(
py-outdent-p
)
(
=
indent
(
progn
(
forward-line
-1
)
(
py-compute-indentation
)))
...
...
@@ -650,11 +657,7 @@ needed so that only a single column position is deleted."
(
move-to-indentation-p
(
<=
(
current-column
)
ci
))
(
need
(
py-compute-indentation
)))
;; see if we need to outdent
(
if
(
save-excursion
(
and
(
progn
(
back-to-indentation
)
(
looking-at
py-outdent-re
))
(
progn
(
backward-to-indentation
1
)
(
not
(
looking-at
py-no-outdent-re
)))))
(
if
(
py-outdent-p
)
(
setq
need
(
-
need
py-indent-offset
)))
(
if
(
/=
ci
need
)
(
save-excursion
...
...
@@ -1860,7 +1863,7 @@ local bindings to py-newline-and-indent."))
(
setq
zmacs-region-stays
t
)))
(
defconst
py-version
"2.1
2
"
(
defconst
py-version
"2.1
3
"
"`python-mode' version number."
)
(
defconst
py-help-address
"bwarsaw@cnri.reston.va.us"
"Address accepting submission of bug reports."
)
...
...
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