[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
narrowing considered harmful (was: putting double quotes efficiently)
From: |
Stefan Monnier |
Subject: |
narrowing considered harmful (was: putting double quotes efficiently) |
Date: |
Thu, 13 Jun 2013 10:40:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
BTW,
I tend to consider narrow-to-region in Elisp as a problem,so I encourage
you to write your code without it.
In your example, you don't need to narrow: the only thing you need is
to keep the "end" updated when the buffer is modified, which is easy to
do by changing the "end" form an integer to a marker.
Or alternatively, you can simply work your way backward, in which case
you don't need to worry about using a marker since the "start" position
to which you're going won't be affected by the buffer modifications.
Stefan
- putting double quotes efficiently, C K Kashyap, 2013/06/03
- Re: putting double quotes efficiently, Andreas Röhler, 2013/06/03
- Re: putting double quotes efficiently, Andreas Röhler, 2013/06/03
- Message not available
- narrowing considered harmful (was: putting double quotes efficiently),
Stefan Monnier <=
- Re: narrowing considered harmful, Leo Liu, 2013/06/13
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/14
- Re: narrowing considered harmful, Leo Liu, 2013/06/14
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/14
- Re: narrowing considered harmful, Leo Liu, 2013/06/16
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/17
- RE: narrowing considered harmful, Drew Adams, 2013/06/17
- Re: narrowing considered harmful, Stefan Monnier, 2013/06/17