[cl-org-mode-devel] [PATCH] * src/utils.lisp: do not discriminate between lowercase char and uppercase char.

Ryo TAKAISHI ryo.takaishi.0 at gmail.com
Wed Dec 28 13:27:24 UTC 2011


This will be able to make out lower-case character similarly upper-case character.
For example, "#+begin_src" similarly "#+BEGIN_SRC", "#+begin_example" similarly "#+BEGIN_EXAMPLE".
---
Hello,

I want to parse "#+begin_src" line, so I write this patch.

Thanks,

Ryo TAKAISHI
 src/utils.lisp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/utils.lisp b/src/utils.lisp
index 536ea4a..57a29f8 100644
--- a/src/utils.lisp
+++ b/src/utils.lisp
@@ -12,7 +12,8 @@ If maybe-starts-with is a string. reverse it before testing against stack")
     (let ((does-it? (when (>= (length stack)(length list))
 		      (loop :for cons on stack 
 			 :for pair on list
-			 :always (eql (car cons) (first pair))))))
+            :always (eql (char-downcase (car cons))
+                         (char-downcase (first pair)))))))
 		      
       (when does-it? 
 	(values list (nthcdr (length list) stack)))))
-- 
1.7.8.rc1





More information about the cl-org-mode-devel mailing list