diff options
| author | Juri Linkov | 2019-10-13 23:56:17 +0300 |
|---|---|---|
| committer | Juri Linkov | 2019-10-13 23:56:17 +0300 |
| commit | 097a03d2a372c1285696779c7051d5b044d437f5 (patch) | |
| tree | 9459b1614ab3e2856d4b794eca8fb84a30414972 | |
| parent | 21f2922b8436f67a8519339593cde69083d215c1 (diff) | |
| download | emacs-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.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. | |||
| 1237 | @opindex -D | 1237 | @opindex -D |
| 1238 | @itemx --basic-display | 1238 | @itemx --basic-display |
| 1239 | @opindex --basic-display | 1239 | @opindex --basic-display |
| 1240 | Disable the menu-bar, the tool-bar, the scroll-bars, and tool tips, | 1240 | Disable the menu-bar, the tool-bar, the scroll-bars, tool tips, and |
| 1241 | and turn off the blinking cursor. This can be useful for making a | 1241 | font-lock-mode, and turn off the blinking cursor. This can be useful |
| 1242 | test case that simplifies debugging of display problems. | 1242 | for 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. | |||
| 319 | If the value of this resource is @samp{off} or @samp{false} or | 319 | If 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 | ||
| 324 | If 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. | |||
| 2324 | Non-zero if this window is a @dfn{pseudo window}. A pseudo window is | 2324 | Non-zero if this window is a @dfn{pseudo window}. A pseudo window is |
| 2325 | either a window used to display the menu bar or the tool bar (when | 2325 | either a window used to display the menu bar or the tool bar (when |
| 2326 | Emacs uses toolkits that don't display their own menu bar and tool | 2326 | Emacs uses toolkits that don't display their own menu bar and tool |
| 2327 | bar) or a window showing a tooltip on a tooltip frame. Pseudo windows | 2327 | bar) or the tab bar or a window showing a tooltip on a tooltip frame. |
| 2328 | are in general not accessible from Lisp code. | 2328 | Pseudo windows are in general not accessible from Lisp code. |
| 2329 | 2329 | ||
| 2330 | @item parent | 2330 | @item parent |
| 2331 | Internally, Emacs arranges windows in a tree; each group of siblings | 2331 | 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 | |||
| 284 | the OS and the window manager. | 284 | the OS and the window manager. |
| 285 | See the Emacs manual, section "Options for Window Size and Position", | 285 | See the Emacs manual, section "Options for Window Size and Position", |
| 286 | for information on how window sizes interact | 286 | for information on how window sizes interact |
| 287 | with selecting or deselecting the tool bar and menu bar. | 287 | with 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" |
| 290 | Additional space to put between lines. | 290 | Additional space to put between lines. |
| @@ -517,6 +517,9 @@ window. | |||
| 517 | .BR toolBar " (class " ToolBar ) | 517 | .BR toolBar " (class " ToolBar ) |
| 518 | Number of lines to reserve for the tool bar. | 518 | Number of lines to reserve for the tool bar. |
| 519 | .TP | 519 | .TP |
| 520 | .BR tabBar " (class " TabBar ) | ||
| 521 | Number of lines to reserve for the tab bar. | ||
| 522 | .TP | ||
| 520 | .BR useXIM " (class " UseXIM ) | 523 | .BR useXIM " (class " UseXIM ) |
| 521 | Turns off use of X input methods (XIM) if | 524 | Turns off use of X input methods (XIM) if |
| 522 | .I false | 525 | .I false |
| @@ -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 |
| 2093 | The new command 'tab-bar-mode' enables the tab-bar at the top of each | 2093 | The new command 'tab-bar-mode' enables the tab bar at the top of each |
| 2094 | frame, where you can use tabs to switch between named persistent | 2094 | frame, where you can use tabs to switch between named persistent |
| 2095 | window configurations. | 2095 | window configurations. |
| 2096 | 2096 | ||
| @@ -2101,20 +2101,23 @@ edit file in another tab; and 'C-TAB' and 'S-C-TAB' switch to the next | |||
| 2101 | or previous tab. You can also switch between tabs and create/delete | 2101 | or previous tab. You can also switch between tabs and create/delete |
| 2102 | tabs with a mouse. | 2102 | tabs with a mouse. |
| 2103 | 2103 | ||
| 2104 | Tab-related commands are available even when the Tab-Bar mode is | 2104 | Tab-related commands are available even when the tab-bar-mode is |
| 2105 | disabled: by default, they enable Tab-Bar mode in that case. | 2105 | disabled: by default, they enable tab-bar-mode in that case. |
| 2106 | |||
| 2107 | The X resource "tabBar", class "TabBar" enables the tab bar | ||
| 2108 | when its value is "on", "yes" or "1". | ||
| 2106 | 2109 | ||
| 2107 | Read the new Info node "(emacs) Tab Bars" for full description | 2110 | Read the new Info node "(emacs) Tab Bars" for full description |
| 2108 | of all related features. | 2111 | of all related features. |
| 2109 | 2112 | ||
| 2110 | *** Tab-Line mode | 2113 | *** Tab Line mode |
| 2111 | The new command 'global-tab-line-mode' enables the tab-line above each | 2114 | The new command 'global-tab-line-mode' enables the tab line above each |
| 2112 | window, which you can use to switch buffers in the window. Selecting | 2115 | window, which you can use to switch buffers in the window. Selecting |
| 2113 | the previous window-local tab is the same as typing 'C-x <LEFT>' | 2116 | the 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 |
| 2116 | window-local tab-line of buffers. Using the mouse wheel on the | 2119 | window-local tab line of buffers. Using the mouse wheel on the |
| 2117 | tab-line scrolls tabs that display the window buffers. | 2120 | tab 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 | |||
| 1512 | to reading the init file), or afterwards when the user first | 1512 | to reading the init file), or afterwards when the user first |
| 1513 | opens a graphical frame. | 1513 | opens a graphical frame. |
| 1514 | 1514 | ||
| 1515 | This can set the values of `menu-bar-mode', `tool-bar-mode', and | 1515 | This 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. |
| 1517 | settings will be marked as \"CHANGED outside of Customize\"." | 1517 | Changed 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 |