Browse Source

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.
Carsten Dominik 16 years ago
parent
commit
a64bf8f599
2 changed files with 4 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-compat.el

+ 3 - 0
lisp/ChangeLog

@@ -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>

+ 1 - 1
lisp/org-compat.el

@@ -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)