summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2011-06-25 19:42:18 +0200
committerJuanma Barranquero <lekktu@gmail.com>2011-06-25 19:42:18 +0200
commit519d22cc0e55fcc5ef7ab7e550af78150f1d1e66 (patch)
treec809ff2f57f9d65fb800aa43ac1d1c2522a87b5d /lisp/progmodes/python.el
parentc206f5b0f712f347c37cca49236365e54ff17f63 (diff)
downloademacs-519d22cc0e55fcc5ef7ab7e550af78150f1d1e66.tar.gz
* loadhist.el (unload--set-major-mode): New function.
(unload-feature): Use it. * progmodes/python.el (python-after-info-look): Add autoload cookie. (python-unload-function): New function. Fixes: debbugs:8781 debbugs:8730
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 3d243f14f07..4d2f15c69d8 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1868,6 +1868,7 @@ instance. Assumes an inferior Python is running."
(declare-function info-lookup-maybe-add-help "info-look" (&rest arg))
+;;;###autoload
(defun python-after-info-look ()
"Set up info-look for Python.
Used with `eval-after-load'."
@@ -2731,6 +2732,16 @@ comint believe the user typed this string so that
(defun python-sentinel (_proc _msg)
(setq overlay-arrow-position nil))
+(defun python-unload-function ()
+ "Unload the Python library."
+ (remove-hook 'comint-output-filter-functions 'python-pdbtrack-track-stack-file)
+ (setq minor-mode-alist (assq-delete-all 'python-pdbtrack-is-tracking-p
+ minor-mode-alist))
+ (dolist (error '("^No symbol" "^Can't shift all lines enough"))
+ (setq debug-ignored-errors (delete error debug-ignored-errors)))
+ ;; continue standard unloading
+ nil)
+
(provide 'python)
(provide 'python-21)