diff options
Diffstat (limited to 'src/buffer.h')
| -rw-r--r-- | src/buffer.h | 22 |
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); | |||
| 1088 | extern void restore_buffer (Lisp_Object); | 1088 | extern void restore_buffer (Lisp_Object); |
| 1089 | extern void set_buffer_if_live (Lisp_Object); | 1089 | extern void set_buffer_if_live (Lisp_Object); |
| 1090 | 1090 | ||
| 1091 | /* Return B as a struct buffer pointer, defaulting to the current buffer. */ | ||
| 1092 | |||
| 1093 | INLINE struct buffer * | ||
| 1094 | decode_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 | ||