aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/cus-start.el6
-rw-r--r--src/dispnew.c17
3 files changed, 21 insertions, 4 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d06f0a59528..d6a7231474e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2134,6 +2134,8 @@ disabled: by default, they enable tab-bar-mode in that case.
2134The X resource "tabBar", class "TabBar" enables the tab bar 2134The X resource "tabBar", class "TabBar" enables the tab bar
2135when its value is "on", "yes" or "1". 2135when its value is "on", "yes" or "1".
2136 2136
2137The variable 'tab-bar-position' specifies where to show the tab bar.
2138
2137Read the new Info node "(emacs) Tab Bars" for full description 2139Read the new Info node "(emacs) Tab Bars" for full description
2138of all related features. 2140of all related features.
2139 2141
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 89a96a9f51c..d1278192ef7 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -591,6 +591,12 @@ since it could result in memory overflow and make Emacs crash."
591 (const :tag "Text-image-horiz" :value text-image-horiz) 591 (const :tag "Text-image-horiz" :value text-image-horiz)
592 (const :tag "System default" :value nil)) "24.1") 592 (const :tag "System default" :value nil)) "24.1")
593 (tool-bar-max-label-size frames integer "24.1") 593 (tool-bar-max-label-size frames integer "24.1")
594 (tab-bar-position tab-bar boolean "27.1"
595 :set (lambda (sym val)
596 (set-default sym val)
597 ;; Redraw the bars:
598 (tab-bar-mode -1)
599 (tab-bar-mode 1)))
594 (auto-hscroll-mode scrolling 600 (auto-hscroll-mode scrolling
595 (choice 601 (choice
596 (const :tag "Don't scroll automatically" 602 (const :tag "Don't scroll automatically"
diff --git a/src/dispnew.c b/src/dispnew.c
index 4dd5ee2a1e0..4cdc76f5bcf 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2166,8 +2166,10 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2166 2166
2167 w->pixel_left = 0; 2167 w->pixel_left = 0;
2168 w->left_col = 0; 2168 w->left_col = 0;
2169 w->pixel_top = FRAME_MENU_BAR_HEIGHT (f); 2169 w->pixel_top = FRAME_MENU_BAR_HEIGHT (f)
2170 w->top_line = FRAME_MENU_BAR_LINES (f); 2170 + (!NILP (Vtab_bar_position) ? FRAME_TOOL_BAR_HEIGHT (f) : 0);
2171 w->top_line = FRAME_MENU_BAR_LINES (f)
2172 + (!NILP (Vtab_bar_position) ? FRAME_TOOL_BAR_LINES (f) : 0);
2171 w->total_cols = FRAME_TOTAL_COLS (f); 2173 w->total_cols = FRAME_TOTAL_COLS (f);
2172 w->pixel_width = (FRAME_PIXEL_WIDTH (f) 2174 w->pixel_width = (FRAME_PIXEL_WIDTH (f)
2173 - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); 2175 - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
@@ -2196,8 +2198,10 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2196 2198
2197 w->pixel_left = 0; 2199 w->pixel_left = 0;
2198 w->left_col = 0; 2200 w->left_col = 0;
2199 w->pixel_top = FRAME_MENU_BAR_HEIGHT (f) + FRAME_TAB_BAR_HEIGHT (f); 2201 w->pixel_top = FRAME_MENU_BAR_HEIGHT (f)
2200 w->top_line = FRAME_MENU_BAR_LINES (f) + FRAME_TAB_BAR_LINES (f); 2202 + (NILP (Vtab_bar_position) ? FRAME_TAB_BAR_HEIGHT (f) : 0);
2203 w->top_line = FRAME_MENU_BAR_LINES (f)
2204 + (NILP (Vtab_bar_position) ? FRAME_TAB_BAR_LINES (f) : 0);
2201 w->total_cols = FRAME_TOTAL_COLS (f); 2205 w->total_cols = FRAME_TOTAL_COLS (f);
2202 w->pixel_width = (FRAME_PIXEL_WIDTH (f) 2206 w->pixel_width = (FRAME_PIXEL_WIDTH (f)
2203 - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); 2207 - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
@@ -6569,6 +6573,11 @@ See `buffer-display-table' for more information. */);
6569 beginning of the next redisplay). */ 6573 beginning of the next redisplay). */
6570 redisplay_dont_pause = true; 6574 redisplay_dont_pause = true;
6571 6575
6576 DEFVAR_LISP ("tab-bar-position", Vtab_bar_position,
6577 doc: /* Specify on which side from the tool bar the tab bar shall be.
6578Possible values are `t' (below the tool bar), `nil' (above the tool bar).
6579This option affects only builds where the tool bar is not external. */);
6580
6572 pdumper_do_now_and_after_load (syms_of_display_for_pdumper); 6581 pdumper_do_now_and_after_load (syms_of_display_for_pdumper);
6573} 6582}
6574 6583