Browse Source

Fix minor bug

Patch by Gregory J. Grubbs
Carsten Dominik 15 years ago
parent
commit
19aec9ed9a
2 changed files with 5 additions and 1 deletions
  1. 4 0
      lisp/ChangeLog
  2. 1 1
      lisp/org.el

+ 4 - 0
lisp/ChangeLog

@@ -1,3 +1,7 @@
+2010-05-10  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-replace-escapes): Make sure the cdr is not nil.
+
 2010-05-09  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-sparse-tree): Make `C-c / t' search for all TODO

+ 1 - 1
lisp/org.el

@@ -17700,7 +17700,7 @@ so values can contain further %-escapes if they are define later in TABLE."
         e re rpl)
     (while (setq e (pop tbl))
       (setq re (concat "%-?[0-9.]*" (substring (car e) 1)))
-      (when (string-match re (cdr e))
+      (when (and (cdr e) (string-match re (cdr e)))
         (let ((sref (substring (cdr e) (match-beginning 0) (match-end 0)))
               (safe "SREF"))
           (add-text-properties 0 3 (list 'sref sref) safe)