]> code.delx.au - gnu-emacs/blobdiff - lisp/org/org-indent.el
Merge from emacs-23
[gnu-emacs] / lisp / org / org-indent.el
index e0de21d802c7989c84e0b429cfd58856979aef48..7fb4e421dcce3049766393a18d69271caa75572a 100644 (file)
@@ -1,27 +1,26 @@
 ;;; org-indent.el --- Dynamic indentation for  Org-mode
-;; Copyright (C) 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 ;;
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.29c
+;; Version: 6.35i
 ;;
 ;; This file is part of GNU Emacs.
 ;;
-;; This file is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-
+;;
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;;; Commentary:
@@ -39,7 +38,7 @@
 
 (defgroup org-indent nil
   "Options concerning dynamic virtual outline indentation."
-  :tag "Org Structure"
+  :tag "Org Indent"
   :group 'org)
 
 (defconst org-indent-max 40
@@ -68,13 +67,13 @@ it may be prettier to customize the org-indent face."
   :type 'character)
 
 (defcustom org-indent-mode-turns-off-org-adapt-indentation t
-  "Non-nil means, turning on org-indent-mode turns off indentation adaptation.
+  "Non-nil means turning on `org-indent-mode' turns off indentation adaptation.
 For details see the variable `org-adapt-indentation'."
   :group 'org-indent
   :type 'boolean)
 
 (defcustom org-indent-mode-turns-on-hiding-stars t
-  "Non-nil means, turning on org-indent-mode turns on `org-hide-leading-stars'."
+  "Non-nil means turning on `org-indent-mode' turns on `org-hide-leading-stars'."
   :group 'org-indent
   :type 'boolean)
 
@@ -107,8 +106,8 @@ this variable can be set to nil to get rid of the timer."
   ;; Initialize the indentation and star vectors
   (setq org-indent-strings (make-vector (1+ org-indent-max) nil))
   (setq org-indent-stars (make-vector (1+ org-indent-max) nil))
-  (aset org-indent-strings 0 "")
-  (aset org-indent-stars 0 "")
+  (aset org-indent-strings 0 nil)
+  (aset org-indent-stars 0 nil)
   (loop for i from 1 to org-indent-max do
        (aset org-indent-strings i
              (org-add-props
@@ -172,7 +171,7 @@ FIXME:  How to update when broken?"
   (org-compatible-face nil nil)
   "Face for outline indentation.
 The default is to make it look like whitespace.  But you may find it
-useful to make it evver so slightly different."
+useful to make it ever so slightly different."
   :group 'org-faces)
 
 (defun org-indent-indent-buffer ()
@@ -228,7 +227,7 @@ Assumes that BEG is at the beginning of a line."
              b  e (list 'line-prefix (aref org-indent-strings n)
                         'wrap-prefix (aref org-indent-strings n))))
           (setq b (1+ (point-at-eol))
-                n (* level org-indent-indentation-per-level))))))))
+                n (* (or level 0) org-indent-indentation-per-level))))))))
 
 (defun org-indent-refresh-section ()
   "Refresh indentation properties in the current outline section.
@@ -278,6 +277,5 @@ Point is assumed to be at the beginning of a headline."
 
 (provide 'org-indent)
 
+;; arch-tag: b76736bc-9f4a-43cd-977c-ecfd6689846a
 ;;; org-indent.el ends here
-
-