diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2011-04-21 17:01:39 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2011-04-21 17:01:39 +0200 |
commit | 2985816e25f862aca014d980b4eeca8fb14b9466 (patch) | |
tree | 348c1dd23745462a02e504381c329098053f0ecf | |
parent | d9426915c0629966e67fd0dd35a56c0833db8ad1 (diff) | |
download | org-mode-2985816e25f862aca014d980b4eeca8fb14b9466.tar.gz |
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.
-rw-r--r-- | lisp/org.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index ca3744b..cb9f37c 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) |