Ver código fonte

Emacs 22 support - use org-string-match-p

* contrib/lisp/org-special-blocks.el (org-special-blocks-make-special-cookies):
Emacs 22 doesn't have string-match-p
* lisp/org-freemind.el (org-freemind-write-mm-buffer):
(org-freemind-get-node-style):
Emacs 22 doesn't have string-match-p
* lisp/org-html.el (org-html-make-link):
Use new org-string-match-p for compatibility
Bernt Hansen 14 anos atrás
pai
commit
dc602f3b2e
3 arquivos alterados com 4 adições e 4 exclusões
  1. 1 1
      contrib/lisp/org-special-blocks.el
  2. 2 2
      lisp/org-freemind.el
  3. 1 1
      lisp/org-html.el

+ 1 - 1
contrib/lisp/org-special-blocks.el

@@ -51,7 +51,7 @@ seen.  This is run after a few special cases are taken care of."
   (when (or htmlp latexp)
     (goto-char (point-min))
     (while (re-search-forward "^#\\+\\(begin\\|end\\)_\\(.*\\)$" nil t)
-      (unless (string-match-p org-special-blocks-ignore-regexp (match-string 2))
+      (unless (org-string-match-p org-special-blocks-ignore-regexp (match-string 2))
 	(replace-match
 	 (if (equal (downcase (match-string 1)) "begin")
 	     (concat "ORG-" (match-string 2) "-START")

+ 2 - 2
lisp/org-freemind.el

@@ -552,7 +552,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
@@ -725,7 +725,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 - 1
lisp/org-html.el

@@ -641,7 +641,7 @@ MAY-INLINE-P allows inlining it as an image."
 	    (let
 	       ((str (org-export-html-format-href thefile)))
 	      (if (and type (not (string= "file" type))
-		       (string-match "^//" str))
+		       (org-string-match-p "^//" str))
 		  (concat type ":" str)
 		  str)))