Fix bug in XEmacs compatibility code.

Calling `org-substring-no-properties' with a nil value for FROM would
cause XEmacs to throw an error.

Thanks to Thomas Fuchs for the fix.
This commit is contained in:
Carsten Dominik 2008-12-08 21:57:46 +01:00
parent 25064ee113
commit a64bf8f599
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2008-12-08 Carsten Dominik <carsten.dominik@gmail.com>
* org-compat.el (org-substring-no-properties): Fix for XEmacs, for
the case that FROM is nil.
* org.el (org-before-first-heading-p): New function.
2008-12-07 Carsten Dominik <carsten.dominik@gmail.com>

View File

@ -284,7 +284,7 @@ that can be added."
(defun org-substring-no-properties (string &optional from to)
(if (featurep 'xemacs)
(org-no-properties (substring string from to))
(org-no-properties (substring string (or from 0) to))
(substring-no-properties string from to)))
(provide 'org-compat)