From ff6ff85966eb1f728f06ed9138a936d5505597a4 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 6 Nov 2009 07:22:14 +0100 Subject: [PATCH] Remove line/wrap-prefix properties only if org-indent-mode is on --- lisp/ChangeLog | 6 ++++++ lisp/org.el | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 843981053..efee2b0cc 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-11-06 Carsten Dominik + + * org.el (org-indent-mode): Define variable already in org.el. + (org-unfontify-region): Remove line-prefix and wrap-prefix + properties only if org-indent-mode is active. + 2009-11-05 Carsten Dominik * org-icalendar.el (org-print-icalendar-entries): Save match data diff --git a/lisp/org.el b/lisp/org.el index d07ce8329..e6c428e9d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -3304,6 +3304,11 @@ If yes, offer to stop it and to save the buffer with the changes." ;; Autoload org-indent.el +;; Define the variable already here, to make sure we have it. +(defvar org-indent-mode nil + "Non-nil if Org-Indent mode is enabled. +Use the command `org-indent-mode' to change this variable.") + (eval-and-compile (org-autoload "org-indent" @@ -4917,11 +4922,16 @@ If KWD is a number, get the corresponding match group." (inhibit-read-only t) (inhibit-point-motion-hooks t) (inhibit-modification-hooks t) deactivate-mark buffer-file-name buffer-file-truename) - (remove-text-properties beg end - '(mouse-face t keymap t org-linked-text t - invisible t intangible t - line-prefix t wrap-prefix t - org-no-flyspell t)))) + (remove-text-properties + beg end + (if org-indent-mode + '(mouse-face t keymap t org-linked-text t + invisible t intangible t + line-prefix t wrap-prefix t + org-no-flyspell t) + '(mouse-face t keymap t org-linked-text t + invisible t intangible t + org-no-flyspell t))))) ;;;; Visibility cycling, including org-goto and indirect buffer