From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Subject: Re: [PATCH] Emacs 22 support Date: Wed, 02 Jun 2010 01:43:46 +0200 Message-ID: <87hblmfhe5.fsf@gmail.com> References: <1275433846-10077-1-git-send-email-bernt@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=48018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJb82-0000Q2-5e for emacs-orgmode@gnu.org; Tue, 01 Jun 2010 19:44:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJb80-0005mm-K7 for emacs-orgmode@gnu.org; Tue, 01 Jun 2010 19:44:14 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:9408) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJb80-0005md-Fu for emacs-orgmode@gnu.org; Tue, 01 Jun 2010 19:44:12 -0400 Received: by fg-out-1718.google.com with SMTP id 16so1689100fgg.12 for ; Tue, 01 Jun 2010 16:44:10 -0700 (PDT) In-Reply-To: <1275433846-10077-1-git-send-email-bernt@norang.ca> (Bernt Hansen's message of "Tue, 1 Jun 2010 19:10:46 -0400") 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: Bernt Hansen Cc: emacs-orgmode@gnu.org Bernt Hansen writes: > * contrib/lisp/org-special-blocks.el: Emacs 22 doesn't have string-match-p > --- > This patch is available at git://git.norang.ca/org-mode.git emacs22 > > contrib/lisp/org-special-blocks.el | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/contrib/lisp/org-special-blocks.el > b/contrib/lisp/org-special-blocks.el > index af50b30..4a2bc3c 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 c= are > 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 (string-match org-special-blocks-ignore-regexp (match-string 2)) > (replace-match > (if (equal (downcase (match-string 1)) "begin") > (concat "ORG-" (match-string 2) "-START") I didn't look at the code, but I doubt this is correct. The whole point of using `string-match-p' is to not affect the match data, so I would expect this change to possibly break the immediately following (match-string 1) etc. (depending on the exact regexp of course -- as I say I didn't actually check it, but in any case this is not a safe change AFAIK). You could try wrapping the `string-match' form inside `save-match-data' to prevent that. =C5=A0t=C4=9Bp=C3=A1n