From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: [PATCH] Emacs 22 support - use org-string-match-p Date: Thu, 3 Jun 2010 09:10:57 -0400 Message-ID: <1275570657-14876-1-git-send-email-bernt@norang.ca> References: <87d3w8mhaa.fsf@gollum.intra.norang.ca> Return-path: Received: from [140.186.70.92] (port=32774 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKACS-0000eA-7B for emacs-orgmode@gnu.org; Thu, 03 Jun 2010 09:11:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKACR-0007tG-04 for emacs-orgmode@gnu.org; Thu, 03 Jun 2010 09:11:08 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:65110) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKACQ-0007t4-Q4 for emacs-orgmode@gnu.org; Thu, 03 Jun 2010 09:11:06 -0400 Received: from cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com ([99.239.148.180] helo=mail.norang.ca) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1OKACP-0006gw-Um for emacs-orgmode@gnu.org; Thu, 03 Jun 2010 13:11:06 +0000 In-Reply-To: <87d3w8mhaa.fsf@gollum.intra.norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Bernt Hansen * 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 --- Updated patch using org-string-match-p This is available at git://git.norang.ca/org-mode.git emacs22 -Bernt contrib/lisp/org-special-blocks.el | 2 +- lisp/org-freemind.el | 4 ++-- lisp/org-html.el | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/org-special-blocks.el b/contrib/lisp/org-special-blocks.el index af50b30..d97cff3 100644 --- a/contrib/lisp/org-special-blocks.el +++ b/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") diff --git a/lisp/org-freemind.el b/lisp/org-freemind.el index 9aabbea..538b404 100644 --- a/lisp/org-freemind.el +++ b/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 diff --git a/lisp/org-html.el b/lisp/org-html.el index f7dd1b3..d18350d 100644 --- a/lisp/org-html.el +++ b/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))) -- 1.7.1.240.g225c