summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-03-13 18:53:15 (GMT)
committerBarry Warsaw <barry@python.org>1998-03-13 18:53:15 (GMT)
commit9e9968859e39526269777c40d9f8f2a7591067e9 (patch)
tree56fcdef1b72466d33a8ef001a9d1aa55fc463dcd /Misc
parent55f0aabe881a59df736aff3e423d90ff9ef36bff (diff)
downloadcpython-9e9968859e39526269777c40d9f8f2a7591067e9.zip
cpython-9e9968859e39526269777c40d9f8f2a7591067e9.tar.gz
cpython-9e9968859e39526269777c40d9f8f2a7591067e9.tar.bz2
(python-mode): Removed vi vi vi hack for setting the tab width from a
magic comment. Now Guido only has to worry about the northern Wisconsin Braces Freedom Fighter Militia.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el25
1 files changed, 0 insertions, 25 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index c09daa9..8bd2b1f 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -938,31 +938,6 @@ py-beep-if-tab-change\t\tring the bell if tab-width is changed"
;; Emacs 19 requires this
(if (boundp 'comment-multi-line)
(setq comment-multi-line nil))
- ;; hack to allow overriding the tabsize in the file (see tokenizer.c)
- ;;
- ;; not sure where the magic comment has to be; to save time
- ;; searching for a rarity, we give up if it's not found prior to the
- ;; first executable statement.
- ;;
- ;; BAW - on first glance, this seems like complete hackery. Why was
- ;; this necessary, and is it still necessary?
- (let ((case-fold-search nil)
- (start (point))
- new-tab-width)
- (if (re-search-forward
- "^[ \t]*#[ \t]*vi:set[ \t]+tabsize=\\([0-9]+\\):"
- (prog2 (py-next-statement 1) (point) (goto-char 1))
- t)
- (progn
- (setq new-tab-width
- (string-to-int
- (buffer-substring (match-beginning 1) (match-end 1))))
- (if (= tab-width new-tab-width)
- nil
- (setq tab-width new-tab-width)
- (message "Caution: tab-width changed to %d" new-tab-width)
- (if py-beep-if-tab-change (beep)))))
- (goto-char start))
;; Install Imenu, only works for Emacs.
(when (py-safe (require 'imenu))
(make-variable-buffer-local 'imenu-create-index-function)