summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/buffer.h b/src/buffer.h
index de117eb9c61..284cfa7b4a8 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -694,10 +694,12 @@ struct buffer
othersize draw them between margin areas and text. */
Lisp_Object INTERNAL_FIELD (fringes_outside_margins);
- /* Width and type of scroll bar areas for windows displaying
+ /* Width, height and types of scroll bar areas for windows displaying
this buffer. */
Lisp_Object INTERNAL_FIELD (scroll_bar_width);
+ Lisp_Object INTERNAL_FIELD (scroll_bar_height);
Lisp_Object INTERNAL_FIELD (vertical_scroll_bar_type);
+ Lisp_Object INTERNAL_FIELD (horizontal_scroll_bar_type);
/* Non-nil means indicate lines not displaying text (in a style
like vi). */
@@ -1079,13 +1081,21 @@ extern ptrdiff_t overlay_strings (ptrdiff_t, struct window *, unsigned char **);
extern void validate_region (Lisp_Object *, Lisp_Object *);
extern void set_buffer_internal_1 (struct buffer *);
extern void set_buffer_temp (struct buffer *);
-extern Lisp_Object buffer_local_value_1 (Lisp_Object, Lisp_Object);
+extern Lisp_Object buffer_local_value (Lisp_Object, Lisp_Object);
extern void record_buffer (Lisp_Object);
extern void fix_overlays_before (struct buffer *, ptrdiff_t, ptrdiff_t);
extern void mmap_set_vars (bool);
extern void restore_buffer (Lisp_Object);
extern void set_buffer_if_live (Lisp_Object);
+/* Return B as a struct buffer pointer, defaulting to the current buffer. */
+
+INLINE struct buffer *
+decode_buffer (Lisp_Object b)
+{
+ return NILP (b) ? current_buffer : (CHECK_BUFFER (b), XBUFFER (b));
+}
+
/* Set the current buffer to B.
We previously set windows_or_buffers_changed here to invalidate
@@ -1118,15 +1128,15 @@ record_unwind_current_buffer (void)
#define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq) \
do { \
ptrdiff_t maxlen = 40; \
- overlays = alloca (maxlen * sizeof *overlays); \
- noverlays = overlays_at (posn, false, &overlays, &maxlen, \
- nextp, NULL, chrq); \
- if (noverlays > maxlen) \
+ SAFE_NALLOCA (overlays, 1, maxlen); \
+ (noverlays) = overlays_at (posn, false, &(overlays), &maxlen, \
+ nextp, NULL, chrq); \
+ if ((noverlays) > maxlen) \
{ \
maxlen = noverlays; \
- overlays = alloca (maxlen * sizeof *overlays); \
- noverlays = overlays_at (posn, false, &overlays, &maxlen, \
- nextp, NULL, chrq); \
+ SAFE_NALLOCA (overlays, 1, maxlen); \
+ (noverlays) = overlays_at (posn, false, &(overlays), &maxlen, \
+ nextp, NULL, chrq); \
} \
} while (false)
@@ -1135,6 +1145,8 @@ extern Lisp_Object Qbefore_change_functions;
extern Lisp_Object Qafter_change_functions;
extern Lisp_Object Qfirst_change_hook;
extern Lisp_Object Qpriority, Qbefore_string, Qafter_string;
+extern Lisp_Object Qchoice, Qrange, Qleft, Qright;
+extern Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar;
/* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is
a `for' loop which iterates over the buffers from Vbuffer_alist. */