diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2014-01-16 01:18:30 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-01-16 01:18:30 +0100 |
commit | d4b653656ec3ace694c8a25996c30b75d583206e (patch) | |
tree | 905b6436c4ac30d4ed06a5165f1810e603c0eb46 | |
parent | a4a2935c3f41bd4ff2ec739b60d930d3647dae5c (diff) | |
download | org-mode-d4b653656ec3ace694c8a25996c30b75d583206e.tar.gz |
org.el (org-mode-restart): Fix turning off `org-indent-mode' when necessary
* org.el (org-mode-restart): Fix turning off `org-indent-mode'
when necessary.
-rw-r--r-- | lisp/org.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el index 7a7fd4d..ba3f92a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20365,11 +20365,12 @@ This command does many different things, depending on context: "C-c C-c can do nothing useful at this location"))))))))) (defun org-mode-restart () - "Restart Org-mode, to scan again for special lines. -Also updates the keyword regular expressions and file variables." (interactive) - (funcall major-mode) - (hack-local-variables) + (let ((indent-status (org-bound-and-true-p org-indent-mode))) + (funcall major-mode) + (hack-local-variables) + (when (and indent-status (not (org-bound-and-true-p org-indent-mode))) + (org-indent-mode -1))) (message "%s restarted" major-mode)) (defun org-kill-note-or-show-branches () |