From 257440aa1c368048203a111db15f5a791a07f53f Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 24 Apr 2012 22:58:29 +0800 Subject: [PATCH] * lisp/progmodes/python.el: Move hideshow setup to the end. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/python.el | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b5c9d75e9e..b1f1ad99b23 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-04-24 Leo Liu + + * progmodes/python.el: Move hideshow setup to the end. + 2012-04-24 Martin Rudalics * window.el (handle-select-window): Clear echo area since this is 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. nil t) (add-hook 'completion-at-point-functions 'python-completion-at-point nil 'local) - ;; Fixme: should be in hideshow. This seems to be of limited use - ;; since it isn't (can't be) indentation-based. Also hide-level - ;; doesn't seem to work properly. - (add-to-list 'hs-special-modes-alist - `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" - ,(lambda (_arg) - (python-end-of-defun) - (skip-chars-backward " \t\n")) - nil)) (set (make-local-variable 'skeleton-further-elements) '((< '(backward-delete-char-untabify (min python-indent (current-column)))) @@ -2717,6 +2708,17 @@ comint believe the user typed this string so that ;; continue standard unloading nil) +;;;; Finish up +;; Fixme: should be in hideshow. This seems to be of limited use +;; since it isn't (can't be) indentation-based. Also hide-level +;; doesn't seem to work properly. +(add-to-list 'hs-special-modes-alist + `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" + ,(lambda (_arg) + (python-end-of-defun) + (skip-chars-backward " \t\n")) + nil)) + (provide 'python) (provide 'python-21) -- 2.39.2