diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-07-25 12:43:38 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-08-18 15:45:02 +0200 |
commit | d40643f9496ceb2724799af25e39239d65051287 (patch) | |
tree | a94144d78a68daba02e6d0a88d53334f0889d89e | |
parent | 4d780baa11c8ae2f7748f52e52bf0e50b66ac1bf (diff) | |
download | org-mode-d40643f9496ceb2724799af25e39239d65051287.tar.gz |
org-indent: `org-indent-indent-buffer' acts on accessible part of buffer.
* lisp/org-indent.el (org-indent-indent-buffer): take into account narrowing.
-rw-r--r-- | lisp/org-indent.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/org-indent.el b/lisp/org-indent.el index a5754c3..48d2433 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -201,14 +201,13 @@ useful to make it ever so slightly different." :group 'org-faces) (defun org-indent-indent-buffer () - "Add indentation properties for the whole buffer." + "Add indentation properties to the accessible part of the buffer." (interactive) (if (not (org-mode-p)) - (error "Buffer major mode must be Org") + (error "Not in Org mode") (message "Setting buffer indentation. It may take a few seconds...") - (org-with-wide-buffer - (org-indent-remove-properties (point-min) (point-max)) - (org-indent-add-properties (point-min) (point-max))) + (org-indent-remove-properties (point-min) (point-max)) + (org-indent-add-properties (point-min) (point-max)) (message "Indentation of buffer set."))) (defsubst org-indent-remove-properties (beg end) |