From dfab1eed14d036b8d88b4014bee4bd43cc671809 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 10 Jul 2013 15:53:45 -0400 Subject: [PATCH] Better function to insert breakpoint in python mode, auto-indent and save the file. --- init-package/init-python.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init-package/init-python.el b/init-package/init-python.el index 87ee1ff51..a9247cce7 100644 --- a/init-package/init-python.el +++ b/init-package/init-python.el @@ -14,7 +14,9 @@ ;; from http://pedrokroger.net/2010/07/configuring-emacs-as-a-python-ide-2/ (defun python-add-breakpoint () - "Add a break point and highlight it." + "Add a break point, highlight it and save the buffer." (interactive) + (evil-end-of-line) (newline-and-indent) - (insert "import pdb; pdb.set_trace()")) + (insert "import pdb; pdb.set_trace()") + (save-buffer))