aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.h
diff options
context:
space:
mode:
authorDmitry Antipov2013-08-13 18:45:58 +0400
committerDmitry Antipov2013-08-13 18:45:58 +0400
commiteeaf9bf3377b6d4b9083159726da8bb67b36cb56 (patch)
tree1fe61fad7218d96666305a07a681a7c33c296c49 /src/window.h
parentf73f4ce69f4b2e8f6c422aca8f8cc36ef72fa725 (diff)
downloademacs-eeaf9bf3377b6d4b9083159726da8bb67b36cb56.tar.gz
emacs-eeaf9bf3377b6d4b9083159726da8bb67b36cb56.zip
* window.h (struct window): Convert left_margin_cols and
right_margin_cols from Lisp_Objects to integers. Adjust comment. (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS) (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH): Adjust users. * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int. Adjust comment. (showing_window_margins_p, update_window_line, update_frame_1): * fringe.c (draw_fringe_bitmap_1): * xdisp.c (window_box_width): Adjust users. * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove. (adjust_window_margins, set_window_buffer, Fsplit_window_internal): Use direct assignment. (Fset_window_configuration, save_window_save, Fwindow_margins): Convert Lisp_Object to integer and back where appropriate. (Fset_window_margins): Adjust user. Return t if any margin was actually changed, and mention this in docstring.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h34
1 files changed, 11 insertions, 23 deletions
diff --git a/src/window.h b/src/window.h
index ea573fbf3e1..a9afbc7f4a3 100644
--- a/src/window.h
+++ b/src/window.h
@@ -141,11 +141,6 @@ struct window
141 it yet, or if the frame doesn't have any scroll bars, this is nil. */ 141 it yet, or if the frame doesn't have any scroll bars, this is nil. */
142 Lisp_Object vertical_scroll_bar; 142 Lisp_Object vertical_scroll_bar;
143 143
144 /* Width of left and right marginal areas. A value of nil means
145 no margin. */
146 Lisp_Object left_margin_cols;
147 Lisp_Object right_margin_cols;
148
149 /* Pixel width of scroll bars. 144 /* Pixel width of scroll bars.
150 A value of nil or t means use frame values. */ 145 A value of nil or t means use frame values. */
151 Lisp_Object scroll_bar_width; 146 Lisp_Object scroll_bar_width;
@@ -269,6 +264,11 @@ struct window
269 int left_fringe_width; 264 int left_fringe_width;
270 int right_fringe_width; 265 int right_fringe_width;
271 266
267 /* Width of left and right marginal areas in columns.
268 A value of 0 means no margin. */
269 int left_margin_cols;
270 int right_margin_cols;
271
272 /* Non-zero if this window is a minibuffer window. */ 272 /* Non-zero if this window is a minibuffer window. */
273 unsigned mini : 1; 273 unsigned mini : 1;
274 274
@@ -600,33 +600,21 @@ wset_next_buffers (struct window *w, Lisp_Object val)
600 600
601/* Width of left margin area in columns. */ 601/* Width of left margin area in columns. */
602 602
603#define WINDOW_LEFT_MARGIN_COLS(W) \ 603#define WINDOW_LEFT_MARGIN_COLS(W) (W->left_margin_cols)
604 (NILP (W->left_margin_cols) \
605 ? 0 \
606 : XINT (W->left_margin_cols))
607 604
608/* Width of right marginal area in columns. */ 605/* Width of right marginal area in columns. */
609 606
610#define WINDOW_RIGHT_MARGIN_COLS(W) \ 607#define WINDOW_RIGHT_MARGIN_COLS(W) (W->right_margin_cols)
611 (NILP (W->right_margin_cols) \
612 ? 0 \
613 : XINT (W->right_margin_cols))
614 608
615/* Width of left margin area in pixels. */ 609/* Width of left margin area in pixels. */
616 610
617#define WINDOW_LEFT_MARGIN_WIDTH(W) \ 611#define WINDOW_LEFT_MARGIN_WIDTH(W) \
618 (NILP (W->left_margin_cols) \ 612 (W->left_margin_cols * WINDOW_FRAME_COLUMN_WIDTH (W))
619 ? 0 \
620 : (XINT (W->left_margin_cols) \
621 * WINDOW_FRAME_COLUMN_WIDTH (W)))
622 613
623/* Width of right marginal area in pixels. */ 614/* Width of right marginal area in pixels. */
624 615
625#define WINDOW_RIGHT_MARGIN_WIDTH(W) \ 616#define WINDOW_RIGHT_MARGIN_WIDTH(W) \
626 (NILP (W->right_margin_cols) \ 617 (W->right_margin_cols * WINDOW_FRAME_COLUMN_WIDTH (W))
627 ? 0 \
628 : (XINT (W->right_margin_cols) \
629 * WINDOW_FRAME_COLUMN_WIDTH (W)))
630 618
631/* Total width of fringes reserved for drawing truncation bitmaps, 619/* Total width of fringes reserved for drawing truncation bitmaps,
632 continuation bitmaps and alike. The width is in canonical char 620 continuation bitmaps and alike. The width is in canonical char