[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: [PATCH] Emacs 22 support
From: |
Štěpán Němec |
Subject: |
[Orgmode] Re: [PATCH] Emacs 22 support |
Date: |
Wed, 02 Jun 2010 01:43:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Bernt Hansen <address@hidden> 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 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 (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.
Štěpán
- [Orgmode] [PATCH] Emacs 22 support, Bernt Hansen, 2010/06/01
- [Orgmode] Re: [PATCH] Emacs 22 support,
Štěpán Němec <=
- [Orgmode] Re: [PATCH] Emacs 22 support, Bernt Hansen, 2010/06/01
- [Orgmode] [PATCH] Emacs 22 support, Bernt Hansen, 2010/06/02
- Re: [Orgmode] [PATCH] Emacs 22 support, Carsten Dominik, 2010/06/03
- Re: [Orgmode] [PATCH] Emacs 22 support, Bernt Hansen, 2010/06/03
- [Orgmode] [PATCH] Emacs 22 support - use org-string-match-p, Bernt Hansen, 2010/06/03
- [Orgmode] Re: [PATCH] Emacs 22 support - use org-string-match-p, Štěpán Němec, 2010/06/03
- [Orgmode] Re: [PATCH] Emacs 22 support - use org-string-match-p, Bernt Hansen, 2010/06/03
- [Orgmode] Re: [PATCH] Emacs 22 support - use org-string-match-p, Štěpán Němec, 2010/06/03
- Re: [Orgmode] Re: [PATCH] Emacs 22 support - use org-string-match-p, Carsten Dominik, 2010/06/04
- Re: [Orgmode] [PATCH] Emacs 22 support - use org-string-match-p, Carsten Dominik, 2010/06/04