From 2985816e25f862aca014d980b4eeca8fb14b9466 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 21 Apr 2011 17:01:39 +0200 Subject: [PATCH] Postfix to the previous patch, changing after-change-functions for demotion * lisp/org.el (org-promote): (org-demote): Soften the previous change, by only removing the flyspell function from after-change functions, because that was the one causing the slowdown - at least much of it. --- lisp/org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ca3744b05..cb9f37c42 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7145,7 +7145,8 @@ If the region is active in `transient-mark-mode', promote all headings in the region." (org-back-to-heading t) (let* ((level (save-match-data (funcall outline-level))) - (after-change-functions) + (after-change-functions (remove 'flyspell-after-change-function + after-change-functions)) (up-head (concat (make-string (org-get-valid-level level -1) ?*) " ")) (diff (abs (- level (length up-head) -1)))) (if (= level 1) (error "Cannot promote to level 0. UNDO to recover if necessary")) @@ -7161,7 +7162,8 @@ If the region is active in `transient-mark-mode', demote all headings in the region." (org-back-to-heading t) (let* ((level (save-match-data (funcall outline-level))) - (after-change-functions) + (after-change-functions (remove 'flyspell-after-change-function + after-change-functions)) (down-head (concat (make-string (org-get-valid-level level 1) ?*) " ")) (diff (abs (- level (length down-head) -1)))) (replace-match down-head nil t)