Mercurial > emacs
comparison src/marker.c @ 44328:ed296e71aa64
(buf_charpos_to_bytepos, buf_bytepos_to_charpos): Use BEG and BEG_BYTE.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 01 Apr 2002 23:07:40 +0000 |
parents | 23d7de34a596 |
children | 0fddc27db9ae |
comparison
equal
deleted
inserted
replaced
44327:1e166973cd8b | 44328:ed296e71aa64 |
---|---|
147 each character must be one byte. | 147 each character must be one byte. |
148 This takes care of the case where enable-multibyte-characters is nil. */ | 148 This takes care of the case where enable-multibyte-characters is nil. */ |
149 if (best_above == best_above_byte) | 149 if (best_above == best_above_byte) |
150 return charpos; | 150 return charpos; |
151 | 151 |
152 best_below = 1; | 152 best_below = BEG; |
153 best_below_byte = 1; | 153 best_below_byte = BEG_BYTE; |
154 | 154 |
155 /* We find in best_above and best_above_byte | 155 /* We find in best_above and best_above_byte |
156 the closest known point above CHARPOS, | 156 the closest known point above CHARPOS, |
157 and in best_below and best_below_byte | 157 and in best_below and best_below_byte |
158 the closest known point below CHARPOS, | 158 the closest known point below CHARPOS, |
324 each character must be one byte. | 324 each character must be one byte. |
325 This takes care of the case where enable-multibyte-characters is nil. */ | 325 This takes care of the case where enable-multibyte-characters is nil. */ |
326 if (best_above == best_above_byte) | 326 if (best_above == best_above_byte) |
327 return bytepos; | 327 return bytepos; |
328 | 328 |
329 best_below = 1; | 329 best_below = BEG; |
330 best_below_byte = 1; | 330 best_below_byte = BEG_BYTE; |
331 | 331 |
332 CONSIDER (BUF_PT_BYTE (b), BUF_PT (b)); | 332 CONSIDER (BUF_PT_BYTE (b), BUF_PT (b)); |
333 CONSIDER (BUF_GPT_BYTE (b), BUF_GPT (b)); | 333 CONSIDER (BUF_GPT_BYTE (b), BUF_GPT (b)); |
334 CONSIDER (BUF_BEGV_BYTE (b), BUF_BEGV (b)); | 334 CONSIDER (BUF_BEGV_BYTE (b), BUF_BEGV (b)); |
335 CONSIDER (BUF_ZV_BYTE (b), BUF_ZV (b)); | 335 CONSIDER (BUF_ZV_BYTE (b), BUF_ZV (b)); |