From f88f16c47c3bd23ab6139992259a941b82a52451 Mon Sep 17 00:00:00 2001 From: David Maus Date: Sat, 2 Jul 2011 16:30:00 +0200 Subject: [PATCH 3/3] Use org-string-match-p for backward compatibility with Emacs22 * org-freemind.el (org-freemind-convert-links-helper) (org-freemind-convert-text-p, org-freemind-write-mm-buffer) (org-freemind-get-node-style): Use org-string-match-p for backward compatibility with Emacs22. --- lisp/org-freemind.el | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org-freemind.el b/lisp/org-freemind.el index 5ea941d..e418659 100644 --- a/lisp/org-freemind.el +++ b/lisp/org-freemind.el @@ -308,7 +308,7 @@ MATCHED is the link just matched." (let* ((link (match-string 1 matched)) (text (match-string 2 matched)) (ext (file-name-extension link)) - (col-pos (string-match-p ":" link)) + (col-pos (org-string-match-p ":" link)) (is-img (and (image-type-from-file-name link) (let ((url-type (substring link 0 col-pos))) (member url-type '("file" "http" "https"))))) @@ -414,7 +414,7 @@ MATCHED is the link just matched." (defun org-freemind-convert-text-p (text) "Convert TEXT to html with

paragraphs." ;; (string-match-p "[^ ]" " a") - (setq org-freemind-bol-helper-base-indent (string-match-p "[^ ]" text)) + (setq org-freemind-bol-helper-base-indent (org-string-match-p "[^ ]" text)) (setq text (org-freemind-escape-str-from-org text)) (setq text (replace-regexp-in-string "\\([[:space:]]\\)\\(/\\)\\([^/]+\\)\\(/\\)\\([[:space:]]\\)" "\\1\\3\\5" text)) @@ -658,7 +658,7 @@ Otherwise give an error say the file exists." (defun org-freemind-write-mm-buffer (org-buffer mm-buffer node-at-line) (with-current-buffer org-buffer (dolist (node-style org-freemind-node-styles) - (when (string-match-p (car node-style) buffer-file-name) + (when (org-string-match-p (car node-style) buffer-file-name) (setq org-freemind-node-style (cadr node-style)))) ;;(message "org-freemind-node-style =%s" org-freemind-node-style) (save-match-data @@ -835,7 +835,7 @@ Otherwise give an error say the file exists." (dolist (style-list org-freemind-node-style) (let ((node-regexp (car style-list))) (message "node-regexp=%s node-name=%s" node-regexp node-name) - (when (string-match-p node-regexp node-name) + (when (org-string-match-p node-regexp node-name) ;;(setq node-style (org-freemind-do-apply-node-style style-list)) (setq node-style (cadr style-list)) (when node-style -- 1.7.2.5