aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-10-13 23:56:17 +0300
committerJuri Linkov2019-10-13 23:56:17 +0300
commit097a03d2a372c1285696779c7051d5b044d437f5 (patch)
tree9459b1614ab3e2856d4b794eca8fb84a30414972
parent21f2922b8436f67a8519339593cde69083d215c1 (diff)
downloademacs-097a03d2a372c1285696779c7051d5b044d437f5.tar.gz
emacs-097a03d2a372c1285696779c7051d5b044d437f5.zip
Enable tab-bar-mode from X resources
* lisp/startup.el (x-apply-session-resources): Enable tab-bar-mode when X resource "tabBar" class "TabBar" is "on", "yes" or "1". * doc/man/emacs.1.in: * doc/emacs/xresources.texi (Table of Resources): Document X resource "tabBar" (class "TabBar").
-rw-r--r--doc/emacs/cmdargs.texi6
-rw-r--r--doc/emacs/xresources.texi5
-rw-r--r--doc/lispref/internals.texi4
-rw-r--r--doc/man/emacs.1.in5
-rw-r--r--etc/NEWS19
-rw-r--r--lisp/startup.el12
6 files changed, 33 insertions, 18 deletions
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 2b403b4a33e..fa28c3eabcb 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -1237,9 +1237,9 @@ Disable the blinking cursor on graphical displays.
1237@opindex -D 1237@opindex -D
1238@itemx --basic-display 1238@itemx --basic-display
1239@opindex --basic-display 1239@opindex --basic-display
1240Disable the menu-bar, the tool-bar, the scroll-bars, and tool tips, 1240Disable the menu-bar, the tool-bar, the scroll-bars, tool tips, and
1241and turn off the blinking cursor. This can be useful for making a 1241font-lock-mode, and turn off the blinking cursor. This can be useful
1242test case that simplifies debugging of display problems. 1242for making a test case that simplifies debugging of display problems.
1243@end table 1243@end table
1244 1244
1245 The @samp{--xrm} option (@pxref{Resources}) specifies additional 1245 The @samp{--xrm} option (@pxref{Resources}) specifies additional
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index d8b70ef9009..e349d40333f 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -319,6 +319,11 @@ Name to display in the title bar of the initial Emacs frame.
319If the value of this resource is @samp{off} or @samp{false} or 319If the value of this resource is @samp{off} or @samp{false} or
320@samp{0}, Emacs disables Tool Bar mode at startup (@pxref{Tool Bars}). 320@samp{0}, Emacs disables Tool Bar mode at startup (@pxref{Tool Bars}).
321 321
322@item @code{tabBar} (class @code{TabBar})
323@cindex tab bar
324If the value of this resource is @samp{on} or @samp{yes} or
325@samp{1}, Emacs enables Tab Bar mode at startup (@pxref{Tab Bars}).
326
322@item @code{useXIM} (class @code{UseXIM}) 327@item @code{useXIM} (class @code{UseXIM})
323@cindex XIM 328@cindex XIM
324@cindex X input methods 329@cindex X input methods
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index ab385168af2..e9fcbf48cb4 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -2324,8 +2324,8 @@ minibuffer or the echo area.
2324Non-zero if this window is a @dfn{pseudo window}. A pseudo window is 2324Non-zero if this window is a @dfn{pseudo window}. A pseudo window is
2325either a window used to display the menu bar or the tool bar (when 2325either a window used to display the menu bar or the tool bar (when
2326Emacs uses toolkits that don't display their own menu bar and tool 2326Emacs uses toolkits that don't display their own menu bar and tool
2327bar) or a window showing a tooltip on a tooltip frame. Pseudo windows 2327bar) or the tab bar or a window showing a tooltip on a tooltip frame.
2328are in general not accessible from Lisp code. 2328Pseudo windows are in general not accessible from Lisp code.
2329 2329
2330@item parent 2330@item parent
2331Internally, Emacs arranges windows in a tree; each group of siblings 2331Internally, Emacs arranges windows in a tree; each group of siblings
diff --git a/doc/man/emacs.1.in b/doc/man/emacs.1.in
index 25c32e018a0..5fe12aed95d 100644
--- a/doc/man/emacs.1.in
+++ b/doc/man/emacs.1.in
@@ -284,7 +284,7 @@ frames is a width of 80 and a height between 35 and 40, depending on
284the OS and the window manager. 284the OS and the window manager.
285See the Emacs manual, section "Options for Window Size and Position", 285See the Emacs manual, section "Options for Window Size and Position",
286for information on how window sizes interact 286for information on how window sizes interact
287with selecting or deselecting the tool bar and menu bar. 287with selecting or deselecting the tool bar, tab bar and menu bar.
288.TP 288.TP
289.BI \-lsp " pixels\fR,\fP " \-\-line\-spacing= "pixels" 289.BI \-lsp " pixels\fR,\fP " \-\-line\-spacing= "pixels"
290Additional space to put between lines. 290Additional space to put between lines.
@@ -517,6 +517,9 @@ window.
517.BR toolBar " (class " ToolBar ) 517.BR toolBar " (class " ToolBar )
518Number of lines to reserve for the tool bar. 518Number of lines to reserve for the tool bar.
519.TP 519.TP
520.BR tabBar " (class " TabBar )
521Number of lines to reserve for the tab bar.
522.TP
520.BR useXIM " (class " UseXIM ) 523.BR useXIM " (class " UseXIM )
521Turns off use of X input methods (XIM) if 524Turns off use of X input methods (XIM) if
522.I false 525.I false
diff --git a/etc/NEWS b/etc/NEWS
index 5b3dabe22ac..ada7af37469 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2089,8 +2089,8 @@ file-local variable, you may need to update the value.
2089** Tab Bars 2089** Tab Bars
2090 2090
2091+++ 2091+++
2092*** Tab-Bar mode 2092*** Tab Bar mode
2093The new command 'tab-bar-mode' enables the tab-bar at the top of each 2093The new command 'tab-bar-mode' enables the tab bar at the top of each
2094frame, where you can use tabs to switch between named persistent 2094frame, where you can use tabs to switch between named persistent
2095window configurations. 2095window configurations.
2096 2096
@@ -2101,20 +2101,23 @@ edit file in another tab; and 'C-TAB' and 'S-C-TAB' switch to the next
2101or previous tab. You can also switch between tabs and create/delete 2101or previous tab. You can also switch between tabs and create/delete
2102tabs with a mouse. 2102tabs with a mouse.
2103 2103
2104Tab-related commands are available even when the Tab-Bar mode is 2104Tab-related commands are available even when the tab-bar-mode is
2105disabled: by default, they enable Tab-Bar mode in that case. 2105disabled: by default, they enable tab-bar-mode in that case.
2106
2107The X resource "tabBar", class "TabBar" enables the tab bar
2108when its value is "on", "yes" or "1".
2106 2109
2107Read the new Info node "(emacs) Tab Bars" for full description 2110Read the new Info node "(emacs) Tab Bars" for full description
2108of all related features. 2111of all related features.
2109 2112
2110*** Tab-Line mode 2113*** Tab Line mode
2111The new command 'global-tab-line-mode' enables the tab-line above each 2114The new command 'global-tab-line-mode' enables the tab line above each
2112window, which you can use to switch buffers in the window. Selecting 2115window, which you can use to switch buffers in the window. Selecting
2113the previous window-local tab is the same as typing 'C-x <LEFT>' 2116the previous window-local tab is the same as typing 'C-x <LEFT>'
2114(previous-buffer), selecting the next tab is the same as 'C-x <RIGHT>' 2117(previous-buffer), selecting the next tab is the same as 'C-x <RIGHT>'
2115(next-buffer). Clicking on the plus icon adds a new buffer to the 2118(next-buffer). Clicking on the plus icon adds a new buffer to the
2116window-local tab-line of buffers. Using the mouse wheel on the 2119window-local tab line of buffers. Using the mouse wheel on the
2117tab-line scrolls tabs that display the window buffers. 2120tab line scrolls tabs that display the window buffers.
2118 2121
2119** fileloop.el lets one setup multifile operations like search&replace. 2122** fileloop.el lets one setup multifile operations like search&replace.
2120 2123
diff --git a/lisp/startup.el b/lisp/startup.el
index 48b483415a3..30f1a253ee6 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1512,18 +1512,22 @@ as `x-initialize-window-system' for X, either at startup (prior
1512to reading the init file), or afterwards when the user first 1512to reading the init file), or afterwards when the user first
1513opens a graphical frame. 1513opens a graphical frame.
1514 1514
1515This can set the values of `menu-bar-mode', `tool-bar-mode', and 1515This can set the values of `menu-bar-mode', `tool-bar-mode',
1516`no-blinking-cursor', as well as the `cursor' face. Changed 1516`tab-bar-mode', and `no-blinking-cursor', as well as the `cursor' face.
1517settings will be marked as \"CHANGED outside of Customize\"." 1517Changed settings will be marked as \"CHANGED outside of Customize\"."
1518 (let ((no-vals '("no" "off" "false" "0")) 1518 (let ((no-vals '("no" "off" "false" "0"))
1519 (settings '(("menuBar" "MenuBar" menu-bar-mode nil) 1519 (settings '(("menuBar" "MenuBar" menu-bar-mode nil)
1520 ("tabBar" "TabBar" tab-bar-mode nil)
1521 ("toolBar" "ToolBar" tool-bar-mode nil) 1520 ("toolBar" "ToolBar" tool-bar-mode nil)
1522 ("scrollBar" "ScrollBar" scroll-bar-mode nil) 1521 ("scrollBar" "ScrollBar" scroll-bar-mode nil)
1523 ("cursorBlink" "CursorBlink" no-blinking-cursor t)))) 1522 ("cursorBlink" "CursorBlink" no-blinking-cursor t))))
1524 (dolist (x settings) 1523 (dolist (x settings)
1525 (if (member (x-get-resource (nth 0 x) (nth 1 x)) no-vals) 1524 (if (member (x-get-resource (nth 0 x) (nth 1 x)) no-vals)
1526 (set (nth 2 x) (nth 3 x))))) 1525 (set (nth 2 x) (nth 3 x)))))
1526 (let ((yes-vals '("yes" "on" "true" "1"))
1527 (settings '(("tabBar" "TabBar" tab-bar-mode 1))))
1528 (dolist (x settings)
1529 (if (member (x-get-resource (nth 0 x) (nth 1 x)) yes-vals)
1530 (funcall (nth 2 x) (nth 3 x)))))
1527 (let ((color (x-get-resource "cursorColor" "Foreground"))) 1531 (let ((color (x-get-resource "cursorColor" "Foreground")))
1528 (when color 1532 (when color
1529 (put 'cursor 'theme-face 1533 (put 'cursor 'theme-face