diff options
author | Juri Linkov <juri@linkov.net> | 2019-10-13 23:56:17 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-10-13 23:56:17 +0300 |
commit | 097a03d2a372c1285696779c7051d5b044d437f5 (patch) | |
tree | 9459b1614ab3e2856d4b794eca8fb84a30414972 | |
parent | 21f2922b8436f67a8519339593cde69083d215c1 (diff) | |
download | emacs-097a03d2a372c1285696779c7051d5b044d437f5.tar.gz |
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.texi | 6 | ||||
-rw-r--r-- | doc/emacs/xresources.texi | 5 | ||||
-rw-r--r-- | doc/lispref/internals.texi | 4 | ||||
-rw-r--r-- | doc/man/emacs.1.in | 5 | ||||
-rw-r--r-- | etc/NEWS | 19 | ||||
-rw-r--r-- | lisp/startup.el | 12 |
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. @opindex -D @itemx --basic-display @opindex --basic-display -Disable the menu-bar, the tool-bar, the scroll-bars, and tool tips, -and turn off the blinking cursor. This can be useful for making a -test case that simplifies debugging of display problems. +Disable the menu-bar, the tool-bar, the scroll-bars, tool tips, and +font-lock-mode, and turn off the blinking cursor. This can be useful +for making a test case that simplifies debugging of display problems. @end table 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. If the value of this resource is @samp{off} or @samp{false} or @samp{0}, Emacs disables Tool Bar mode at startup (@pxref{Tool Bars}). +@item @code{tabBar} (class @code{TabBar}) +@cindex tab bar +If the value of this resource is @samp{on} or @samp{yes} or +@samp{1}, Emacs enables Tab Bar mode at startup (@pxref{Tab Bars}). + @item @code{useXIM} (class @code{UseXIM}) @cindex XIM @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. Non-zero if this window is a @dfn{pseudo window}. A pseudo window is either a window used to display the menu bar or the tool bar (when Emacs uses toolkits that don't display their own menu bar and tool -bar) or a window showing a tooltip on a tooltip frame. Pseudo windows -are in general not accessible from Lisp code. +bar) or the tab bar or a window showing a tooltip on a tooltip frame. +Pseudo windows are in general not accessible from Lisp code. @item parent Internally, 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 the OS and the window manager. See the Emacs manual, section "Options for Window Size and Position", for information on how window sizes interact -with selecting or deselecting the tool bar and menu bar. +with selecting or deselecting the tool bar, tab bar and menu bar. .TP .BI \-lsp " pixels\fR,\fP " \-\-line\-spacing= "pixels" Additional space to put between lines. @@ -517,6 +517,9 @@ window. .BR toolBar " (class " ToolBar ) Number of lines to reserve for the tool bar. .TP +.BR tabBar " (class " TabBar ) +Number of lines to reserve for the tab bar. +.TP .BR useXIM " (class " UseXIM ) Turns off use of X input methods (XIM) if .I false @@ -2089,8 +2089,8 @@ file-local variable, you may need to update the value. ** Tab Bars +++ -*** Tab-Bar mode -The new command 'tab-bar-mode' enables the tab-bar at the top of each +*** Tab Bar mode +The new command 'tab-bar-mode' enables the tab bar at the top of each frame, where you can use tabs to switch between named persistent window configurations. @@ -2101,20 +2101,23 @@ edit file in another tab; and 'C-TAB' and 'S-C-TAB' switch to the next or previous tab. You can also switch between tabs and create/delete tabs with a mouse. -Tab-related commands are available even when the Tab-Bar mode is -disabled: by default, they enable Tab-Bar mode in that case. +Tab-related commands are available even when the tab-bar-mode is +disabled: by default, they enable tab-bar-mode in that case. + +The X resource "tabBar", class "TabBar" enables the tab bar +when its value is "on", "yes" or "1". Read the new Info node "(emacs) Tab Bars" for full description of all related features. -*** Tab-Line mode -The new command 'global-tab-line-mode' enables the tab-line above each +*** Tab Line mode +The new command 'global-tab-line-mode' enables the tab line above each window, which you can use to switch buffers in the window. Selecting the previous window-local tab is the same as typing 'C-x <LEFT>' (previous-buffer), selecting the next tab is the same as 'C-x <RIGHT>' (next-buffer). Clicking on the plus icon adds a new buffer to the -window-local tab-line of buffers. Using the mouse wheel on the -tab-line scrolls tabs that display the window buffers. +window-local tab line of buffers. Using the mouse wheel on the +tab line scrolls tabs that display the window buffers. ** fileloop.el lets one setup multifile operations like search&replace. 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 to reading the init file), or afterwards when the user first opens a graphical frame. -This can set the values of `menu-bar-mode', `tool-bar-mode', and -`no-blinking-cursor', as well as the `cursor' face. Changed -settings will be marked as \"CHANGED outside of Customize\"." +This can set the values of `menu-bar-mode', `tool-bar-mode', +`tab-bar-mode', and `no-blinking-cursor', as well as the `cursor' face. +Changed settings will be marked as \"CHANGED outside of Customize\"." (let ((no-vals '("no" "off" "false" "0")) (settings '(("menuBar" "MenuBar" menu-bar-mode nil) - ("tabBar" "TabBar" tab-bar-mode nil) ("toolBar" "ToolBar" tool-bar-mode nil) ("scrollBar" "ScrollBar" scroll-bar-mode nil) ("cursorBlink" "CursorBlink" no-blinking-cursor t)))) (dolist (x settings) (if (member (x-get-resource (nth 0 x) (nth 1 x)) no-vals) (set (nth 2 x) (nth 3 x))))) + (let ((yes-vals '("yes" "on" "true" "1")) + (settings '(("tabBar" "TabBar" tab-bar-mode 1)))) + (dolist (x settings) + (if (member (x-get-resource (nth 0 x) (nth 1 x)) yes-vals) + (funcall (nth 2 x) (nth 3 x))))) (let ((color (x-get-resource "cursorColor" "Foreground"))) (when color (put 'cursor 'theme-face |