summaryrefslogtreecommitdiff
path: root/src/charset.h
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-02-16 03:01:16 +0000
committerRichard M. Stallman <rms@gnu.org>1998-02-16 03:01:16 +0000
commit29d28836ce7ee3b4414a5e39bd4ef7995cd352dd (patch)
tree4a51d90c523b75315a308cdb56a67b488ec04257 /src/charset.h
parentbd4544e85e6da657f5ed533f9d0b5235ba880822 (diff)
downloademacs-29d28836ce7ee3b4414a5e39bd4ef7995cd352dd.tar.gz
(INC_BOTH, DEC_BOTH): In unibyte mode, simply increment bytepos.
Diffstat (limited to 'src/charset.h')
-rw-r--r--src/charset.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/charset.h b/src/charset.h
index 0e91ca57445..290ee11ca83 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -648,22 +648,28 @@ else
/* Increment both CHARPOS and BYTEPOS, each in the appropriate way. */
-#define INC_BOTH(charpos, bytepos) \
-do \
- { \
- (charpos)++; \
- INC_POS ((bytepos)); \
- } \
+#define INC_BOTH(charpos, bytepos) \
+do \
+ { \
+ (charpos)++; \
+ if (NILP (current_buffer->enable_multibyte_characters)) \
+ (bytepos)++; \
+ else \
+ INC_POS ((bytepos)); \
+ } \
while (0)
/* Decrement both CHARPOS and BYTEPOS, each in the appropriate way. */
-#define DEC_BOTH(charpos, bytepos) \
-do \
- { \
- (charpos)--; \
- DEC_POS ((bytepos)); \
- } \
+#define DEC_BOTH(charpos, bytepos) \
+do \
+ { \
+ (charpos)--; \
+ if (NILP (current_buffer->enable_multibyte_characters)) \
+ (bytepos)--; \
+ else \
+ DEC_POS ((bytepos)); \
+ } \
while (0)
/* Increase the buffer point POS of the current buffer to the next