aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorJoakim Verona2014-12-23 17:03:28 +0100
committerJoakim Verona2014-12-23 17:03:28 +0100
commit5f46725992bf26f887483c14c63c03f5b5794f34 (patch)
tree2896a2b98a65851eaddba81d0138fe5647005b08 /src/buffer.h
parent1d8b8a2d8f75d1e3ec9eb109e98720bd9a197bec (diff)
parente3040f2aee768655198dd6f979a1ff3a72d17d16 (diff)
downloademacs-5f46725992bf26f887483c14c63c03f5b5794f34.tar.gz
emacs-5f46725992bf26f887483c14c63c03f5b5794f34.zip
Merge branch 'master' into xwidget
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/buffer.h b/src/buffer.h
index fd989925976..284cfa7b4a8 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1088,6 +1088,14 @@ extern void mmap_set_vars (bool);
1088extern void restore_buffer (Lisp_Object); 1088extern void restore_buffer (Lisp_Object);
1089extern void set_buffer_if_live (Lisp_Object); 1089extern void set_buffer_if_live (Lisp_Object);
1090 1090
1091/* Return B as a struct buffer pointer, defaulting to the current buffer. */
1092
1093INLINE struct buffer *
1094decode_buffer (Lisp_Object b)
1095{
1096 return NILP (b) ? current_buffer : (CHECK_BUFFER (b), XBUFFER (b));
1097}
1098
1091/* Set the current buffer to B. 1099/* Set the current buffer to B.
1092 1100
1093 We previously set windows_or_buffers_changed here to invalidate 1101 We previously set windows_or_buffers_changed here to invalidate
@@ -1120,15 +1128,15 @@ record_unwind_current_buffer (void)
1120#define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq) \ 1128#define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq) \
1121 do { \ 1129 do { \
1122 ptrdiff_t maxlen = 40; \ 1130 ptrdiff_t maxlen = 40; \
1123 overlays = alloca (maxlen * sizeof *overlays); \ 1131 SAFE_NALLOCA (overlays, 1, maxlen); \
1124 noverlays = overlays_at (posn, false, &overlays, &maxlen, \ 1132 (noverlays) = overlays_at (posn, false, &(overlays), &maxlen, \
1125 nextp, NULL, chrq); \ 1133 nextp, NULL, chrq); \
1126 if (noverlays > maxlen) \ 1134 if ((noverlays) > maxlen) \
1127 { \ 1135 { \
1128 maxlen = noverlays; \ 1136 maxlen = noverlays; \
1129 overlays = alloca (maxlen * sizeof *overlays); \ 1137 SAFE_NALLOCA (overlays, 1, maxlen); \
1130 noverlays = overlays_at (posn, false, &overlays, &maxlen, \ 1138 (noverlays) = overlays_at (posn, false, &(overlays), &maxlen, \
1131 nextp, NULL, chrq); \ 1139 nextp, NULL, chrq); \
1132 } \ 1140 } \
1133 } while (false) 1141 } while (false)
1134 1142