summaryrefslogtreecommitdiff
path: root/src/syntax.h
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2008-02-07 12:47:00 +0000
committerJan Djärv <jan.h.d@swipnet.se>2008-02-07 12:47:00 +0000
commit92413ef3a119c29af24901e66b393d3c69cc83b5 (patch)
tree597e3de17cbc3588975e040fdc239331b439d066 /src/syntax.h
parent03fa5713cc5eb2226a5ca3fb1ce59a9e9f46ffae (diff)
downloademacs-92413ef3a119c29af24901e66b393d3c69cc83b5.tar.gz
Use "do...while (0)", not "if (1)..else" in macro definitions.
Diffstat (limited to 'src/syntax.h')
-rw-r--r--src/syntax.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/syntax.h b/src/syntax.h
index 5a5a8a96da3..1138dca9887 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -256,7 +256,7 @@ extern char syntax_code_spec[16];
*/
#define SETUP_SYNTAX_TABLE(FROM, COUNT) \
-if (1) \
+do \
{ \
gl_state.b_property = BEGV; \
gl_state.e_property = ZV + 1; \
@@ -269,7 +269,7 @@ if (1) \
update_syntax_table ((COUNT) > 0 ? (FROM) : (FROM) - 1, (COUNT),\
1, Qnil); \
} \
-else
+while (0)
/* Same as above, but in OBJECT. If OBJECT is nil, use current buffer.
If it is t, ignore properties altogether.
@@ -279,7 +279,7 @@ else
So if it is a buffer, we set the offset field to BEGV. */
#define SETUP_SYNTAX_TABLE_FOR_OBJECT(OBJECT, FROM, COUNT) \
-if (1) \
+do \
{ \
gl_state.object = (OBJECT); \
if (BUFFERP (gl_state.object)) \
@@ -314,7 +314,7 @@ if (1) \
+ (COUNT > 0 ? 0 : -1)), \
COUNT, 1, gl_state.object); \
} \
-else
+while (0)
struct gl_state_s
{