diff options
| author | Dmitry Antipov | 2013-08-13 16:13:04 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-13 16:13:04 +0400 |
| commit | 9e37ee3be620a64afe9d9760076f80c22c986b62 (patch) | |
| tree | 19e22877f995f4115ae684cbe3e0865cd92059d8 /src/window.h | |
| parent | 31593bf6331776d08c1b439675b70a58492d657e (diff) | |
| download | emacs-9e37ee3be620a64afe9d9760076f80c22c986b62.tar.gz emacs-9e37ee3be620a64afe9d9760076f80c22c986b62.zip | |
* window.h (struct window): Convert left_fringe_width
and right_fringe_width from Lisp_Objects to integers.
Adjust comment.
(WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
(WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
* window.c (wset_left_fringe_width, wset_right_fringe_width):
Remove.
(make_window): Initialize new integer fields to -1.
(Fsplit_window_internal): Use direct assignment.
(Fset_window_configuration, save_window_save): Convert
Lisp_Object to integer and back where appropriate.
(Fset_window_fringes): Adjust user. Return t if any fringe
was actually changed, and mention this in docstring.
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/window.h b/src/window.h index 260a672d93a..ea573fbf3e1 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -146,11 +146,6 @@ struct window | |||
| 146 | Lisp_Object left_margin_cols; | 146 | Lisp_Object left_margin_cols; |
| 147 | Lisp_Object right_margin_cols; | 147 | Lisp_Object right_margin_cols; |
| 148 | 148 | ||
| 149 | /* Width of left and right fringes. | ||
| 150 | A value of nil or t means use frame values. */ | ||
| 151 | Lisp_Object left_fringe_width; | ||
| 152 | Lisp_Object right_fringe_width; | ||
| 153 | |||
| 154 | /* Pixel width of scroll bars. | 149 | /* Pixel width of scroll bars. |
| 155 | A value of nil or t means use frame values. */ | 150 | A value of nil or t means use frame values. */ |
| 156 | Lisp_Object scroll_bar_width; | 151 | Lisp_Object scroll_bar_width; |
| @@ -269,6 +264,11 @@ struct window | |||
| 269 | /* This is handy for undrawing the cursor. */ | 264 | /* This is handy for undrawing the cursor. */ |
| 270 | int phys_cursor_ascent, phys_cursor_height; | 265 | int phys_cursor_ascent, phys_cursor_height; |
| 271 | 266 | ||
| 267 | /* Width of left and right fringes, in pixels. | ||
| 268 | A value of -1 means use frame values. */ | ||
| 269 | int left_fringe_width; | ||
| 270 | int right_fringe_width; | ||
| 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 | ||
| @@ -635,10 +635,10 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 635 | able to split windows horizontally nicely. */ | 635 | able to split windows horizontally nicely. */ |
| 636 | 636 | ||
| 637 | #define WINDOW_FRINGE_COLS(W) \ | 637 | #define WINDOW_FRINGE_COLS(W) \ |
| 638 | ((INTEGERP (W->left_fringe_width) \ | 638 | ((W->left_fringe_width >= 0 \ |
| 639 | || INTEGERP (W->right_fringe_width)) \ | 639 | && W->right_fringe_width >= 0) \ |
| 640 | ? ((WINDOW_LEFT_FRINGE_WIDTH (W) \ | 640 | ? ((W->left_fringe_width \ |
| 641 | + WINDOW_RIGHT_FRINGE_WIDTH (W) \ | 641 | + W->right_fringe_width \ |
| 642 | + WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \ | 642 | + WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \ |
| 643 | / WINDOW_FRAME_COLUMN_WIDTH (W)) \ | 643 | / WINDOW_FRAME_COLUMN_WIDTH (W)) \ |
| 644 | : FRAME_FRINGE_COLS (WINDOW_XFRAME (W))) | 644 | : FRAME_FRINGE_COLS (WINDOW_XFRAME (W))) |
| @@ -658,13 +658,11 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 658 | /* Pixel-width of the left and right fringe. */ | 658 | /* Pixel-width of the left and right fringe. */ |
| 659 | 659 | ||
| 660 | #define WINDOW_LEFT_FRINGE_WIDTH(W) \ | 660 | #define WINDOW_LEFT_FRINGE_WIDTH(W) \ |
| 661 | (INTEGERP (W->left_fringe_width) \ | 661 | (W->left_fringe_width >= 0 ? W->left_fringe_width \ |
| 662 | ? XFASTINT (W->left_fringe_width) \ | ||
| 663 | : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W))) | 662 | : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W))) |
| 664 | 663 | ||
| 665 | #define WINDOW_RIGHT_FRINGE_WIDTH(W) \ | 664 | #define WINDOW_RIGHT_FRINGE_WIDTH(W) \ |
| 666 | (INTEGERP (W->right_fringe_width) \ | 665 | (W->right_fringe_width >= 0 ? W->right_fringe_width \ |
| 667 | ? XFASTINT (W->right_fringe_width) \ | ||
| 668 | : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W))) | 666 | : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W))) |
| 669 | 667 | ||
| 670 | /* Total width of fringes in pixels. */ | 668 | /* Total width of fringes in pixels. */ |