diff options
| author | Dmitry Antipov | 2013-08-14 08:07:14 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-14 08:07:14 +0400 |
| commit | 38a2c91021a5d5405438ba291b60f7ccdaa99862 (patch) | |
| tree | 3d5a8faf87763e8ccc3389881284a23c85da7cbd /src/window.h | |
| parent | af79c3cb0b5ac53484ffc8a39894d475527a2e8a (diff) | |
| download | emacs-38a2c91021a5d5405438ba291b60f7ccdaa99862.tar.gz emacs-38a2c91021a5d5405438ba291b60f7ccdaa99862.zip | |
* window.h (struct window): Convert scroll_bar_width
from Lisp_Object to integer. Adjust comment.
(WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
Adjust users.
* window.c (wset_scroll_bar_width): Remove.
(make_window): Initialize scroll_bar_width.
(Fsplit_window_internal): Use direct assignment.
(Fset_window_configuration, save_window_save):
Convert Lisp_Object to integer and back where appropriate.
(Fset_window_scroll_bars): Adjust user. Return t if any scroll
bar was actually changed, and mention this in docstring.
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/window.h b/src/window.h index 9d41a14cd23..823fe678c43 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -141,10 +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 | /* Pixel width of scroll bars. | ||
| 145 | A value of nil or t means use frame values. */ | ||
| 146 | Lisp_Object scroll_bar_width; | ||
| 147 | |||
| 148 | /* Type of vertical scroll bar. A value of nil means | 144 | /* Type of vertical scroll bar. A value of nil means |
| 149 | no scroll bar. A value of t means use frame value. */ | 145 | no scroll bar. A value of t means use frame value. */ |
| 150 | Lisp_Object vertical_scroll_bar_type; | 146 | Lisp_Object vertical_scroll_bar_type; |
| @@ -269,6 +265,10 @@ struct window | |||
| 269 | int left_margin_cols; | 265 | int left_margin_cols; |
| 270 | int right_margin_cols; | 266 | int right_margin_cols; |
| 271 | 267 | ||
| 268 | /* Pixel width of scroll bars. | ||
| 269 | A value of -1 means use frame values. */ | ||
| 270 | int scroll_bar_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 | ||
| @@ -695,8 +695,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 695 | nonzero. */ | 695 | nonzero. */ |
| 696 | 696 | ||
| 697 | #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w) \ | 697 | #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w) \ |
| 698 | (INTEGERP (w->scroll_bar_width) \ | 698 | (w->scroll_bar_width >= 0 ? w->scroll_bar_width \ |
| 699 | ? XFASTINT (w->scroll_bar_width) \ | ||
| 700 | : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w))) | 699 | : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w))) |
| 701 | 700 | ||
| 702 | /* Width that a scroll bar in window W should have, if there is one. | 701 | /* Width that a scroll bar in window W should have, if there is one. |
| @@ -704,8 +703,8 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 704 | this is still nonzero. */ | 703 | this is still nonzero. */ |
| 705 | 704 | ||
| 706 | #define WINDOW_CONFIG_SCROLL_BAR_COLS(w) \ | 705 | #define WINDOW_CONFIG_SCROLL_BAR_COLS(w) \ |
| 707 | (INTEGERP (w->scroll_bar_width) \ | 706 | (w->scroll_bar_width >= 0 \ |
| 708 | ? ((XFASTINT (w->scroll_bar_width) \ | 707 | ? ((w->scroll_bar_width \ |
| 709 | + WINDOW_FRAME_COLUMN_WIDTH (w) - 1) \ | 708 | + WINDOW_FRAME_COLUMN_WIDTH (w) - 1) \ |
| 710 | / WINDOW_FRAME_COLUMN_WIDTH (w)) \ | 709 | / WINDOW_FRAME_COLUMN_WIDTH (w)) \ |
| 711 | : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w))) | 710 | : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w))) |