[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find-file-noselect needs save-match-data
From: |
Juri Linkov |
Subject: |
Re: find-file-noselect needs save-match-data |
Date: |
Sun, 17 Jun 2007 22:54:14 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> and in `Info-fontify-node'
>
> (cond ((save-match-data (looking-back "\\<see"))
> "")
> ((save-match-data (looking-back "\\<in"))
> "")
> ((memq (char-before) '(nil ?\. ?! ??))
> "See ")
> ((save-match-data
> (save-excursion
> (search-forward "\n\n" start t)))
> "See ")
> (t "see "))))
>
> both deeply nested in loops. Did I mention that Info's fontification
> can be a pain?
Funny, but neither of the proposed new functions (`string-match-p' and
`looking-at-p') will help improving the code in info.el above (which uses
`looking-back' and `search-forward').
It seems that instead of adding a prefix/suffix to names of all functions
that change the match-data, it's better to add a new variable and/or a macro
like `save-match-data' with different internals (that will set a global
variable telling match functions not to set the match data).
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: find-file-noselect needs save-match-data, (continued)
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/14
- Re: find-file-noselect needs save-match-data, Herbert Euler, 2007/06/14
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/14
- Re: find-file-noselect needs save-match-data, Herbert Euler, 2007/06/14
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/15
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/15
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/14
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/15
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/15
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/15
- Re: find-file-noselect needs save-match-data,
Juri Linkov <=
- Re: find-file-noselect needs save-match-data, Lennart Borgman (gmail), 2007/06/17
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/14
- Re: find-file-noselect needs save-match-data, David Kastrup, 2007/06/14
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/15
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/15
- Re: find-file-noselect needs save-match-data, Miles Bader, 2007/06/13
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/13
- Re: find-file-noselect needs save-match-data, martin rudalics, 2007/06/14
- Re: find-file-noselect needs save-match-data, Richard Stallman, 2007/06/14
- Re: find-file-noselect needs save-match-data, Stefan Monnier, 2007/06/14