From a64bf8f599f0068c5863090d923baef1608807a1 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 8 Dec 2008 21:57:46 +0100 Subject: [PATCH] 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. --- lisp/ChangeLog | 3 +++ lisp/org-compat.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 92c880ba5..d66c98d58 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-12-08 Carsten Dominik + * 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 diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 08f66fcb0..9e53749e2 100644 --- a/lisp/org-compat.el +++ b/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)