0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 09:32:51 +00:00

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.
This commit is contained in:
Carsten Dominik 2011-04-21 17:01:39 +02:00
parent d9426915c0
commit 2985816e25

View file

@ -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)