1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-23 07:18:53 +00:00

Minor fixes to `org-indent-mode'.

This commit is contained in:
Carsten Dominik 2009-08-03 10:11:38 +02:00
parent f3345d280e
commit 65cb546662
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2009-08-03 Carsten Dominik <carsten.dominik@gmail.com>
* org-indent.el (org-hide-leading-stars-before-indent-mode): New
variable.
(org-indent-mode): Remember and restore value of
org-hide-leading-stars before `org-indent-mode'.
* org-table.el (org-table-export): Also work in file-less
buffers.

View File

@ -53,6 +53,8 @@ It will be set in `org-indent-initialize'.")
(defvar org-indent-stars nil
"Vector with all indentation star strings.
It will be set in `org-indent-initialize'.")
(defvar org-hide-leading-stars-before-indent-mode nil
"Used locally")
(defcustom org-indent-boundary-char ?\ ; comment to protect space char
"The end of the virtual indentation strings, a single-character string.
@ -134,6 +136,8 @@ FIXME: How to update when broken?"
(when org-indent-mode-turns-off-org-adapt-indentation
(org-set-local 'org-adapt-indentation nil))
(when org-indent-mode-turns-on-hiding-stars
(org-set-local 'org-hide-leading-stars-before-indent-mode
org-hide-leading-stars)
(org-set-local 'org-hide-leading-stars t))
(make-local-variable 'buffer-substring-filters)
(add-to-list 'buffer-substring-filters
@ -150,6 +154,9 @@ FIXME: How to update when broken?"
(save-restriction
(org-indent-remove-properties (point-min) (point-max))
(kill-local-variable 'org-adapt-indentation)
(when (boundp 'org-hide-leading-stars-before-indent-mode)
(org-set-local 'org-hide-leading-stars
org-hide-leading-stars-before-indent-mode))
(setq buffer-substring-filters
(delq 'org-indent-remove-properties-from-string
buffer-substring-filters))