mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-29 07:58:21 +00:00
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.
This commit is contained in:
parent
97538eb9ec
commit
813f8028dd
@ -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 <p> 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<i>\\3</i>\\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
|
||||
|
Loading…
Reference in New Issue
Block a user