aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorLeo Liu2012-04-24 22:58:29 +0800
committerLeo Liu2012-04-24 22:58:29 +0800
commit257440aa1c368048203a111db15f5a791a07f53f (patch)
tree3b902198398700634ebc0c5c4ebb74c4dba88434 /lisp/progmodes/python.el
parentb1bac16eadc78ea3c72626f651d53f17065dcd0a (diff)
downloademacs-257440aa1c368048203a111db15f5a791a07f53f.tar.gz
emacs-257440aa1c368048203a111db15f5a791a07f53f.zip
* lisp/progmodes/python.el: Move hideshow setup to the end.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 2922330e6f9..f88d77d214d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2468,15 +2468,6 @@ with skeleton expansions for compound statement templates.
2468 nil t) 2468 nil t)
2469 (add-hook 'completion-at-point-functions 2469 (add-hook 'completion-at-point-functions
2470 'python-completion-at-point nil 'local) 2470 'python-completion-at-point nil 'local)
2471 ;; Fixme: should be in hideshow. This seems to be of limited use
2472 ;; since it isn't (can't be) indentation-based. Also hide-level
2473 ;; doesn't seem to work properly.
2474 (add-to-list 'hs-special-modes-alist
2475 `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
2476 ,(lambda (_arg)
2477 (python-end-of-defun)
2478 (skip-chars-backward " \t\n"))
2479 nil))
2480 (set (make-local-variable 'skeleton-further-elements) 2471 (set (make-local-variable 'skeleton-further-elements)
2481 '((< '(backward-delete-char-untabify (min python-indent 2472 '((< '(backward-delete-char-untabify (min python-indent
2482 (current-column)))) 2473 (current-column))))
@@ -2717,6 +2708,17 @@ comint believe the user typed this string so that
2717 ;; continue standard unloading 2708 ;; continue standard unloading
2718 nil) 2709 nil)
2719 2710
2711;;;; Finish up
2712;; Fixme: should be in hideshow. This seems to be of limited use
2713;; since it isn't (can't be) indentation-based. Also hide-level
2714;; doesn't seem to work properly.
2715(add-to-list 'hs-special-modes-alist
2716 `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
2717 ,(lambda (_arg)
2718 (python-end-of-defun)
2719 (skip-chars-backward " \t\n"))
2720 nil))
2721
2720(provide 'python) 2722(provide 'python)
2721(provide 'python-21) 2723(provide 'python-21)
2722 2724