summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-08-06 12:51:56 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-08-06 12:51:56 +0200
commitb7b6a72869c8dcdf0627ee2470e5678a5ffeade6 (patch)
tree2a59fbfdaf8862af9f9dc7f1d960b617228534f0
parent2b1d745c09616c5e449b1f9c8d8f205127fa7da9 (diff)
downloadorg-mode-b7b6a72869c8dcdf0627ee2470e5678a5ffeade6.tar.gz
Do not call modification hooks when triggering indentation
* lisp/org-indent.el (org-indent-remove-properties): (org-indent-add-properties): Make sure changing these properties does not trigger modification hooks
-rw-r--r--lisp/org-indent.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index 45865d1..83eaac5 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -203,8 +203,9 @@ useful to make it ever so slightly different."
(defun org-indent-remove-properties (beg end)
"Remove indentations between BEG and END."
- (org-unmodified
- (remove-text-properties beg end '(line-prefix nil wrap-prefix nil))))
+ (let ((inhibit-modification-hooks t))
+ (org-unmodified
+ (remove-text-properties beg end '(line-prefix nil wrap-prefix nil)))))
(defun org-indent-remove-properties-from-string (string)
"Remove indentations between BEG and END."
@@ -219,7 +220,8 @@ useful to make it ever so slightly different."
"Add indentation properties between BEG and END.
Assumes that BEG is at the beginning of a line."
(when (or t org-indent-mode)
- (let (ov b e n level exit nstars)
+ (let ((inhibit-modification-hooks t)
+ ov b e n level exit nstars)
(org-unmodified
(save-excursion
(goto-char beg)