aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2019-10-13 23:56:17 +0300
committerJuri Linkov2019-10-13 23:56:17 +0300
commit097a03d2a372c1285696779c7051d5b044d437f5 (patch)
tree9459b1614ab3e2856d4b794eca8fb84a30414972 /lisp
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").
Diffstat (limited to 'lisp')
-rw-r--r--lisp/startup.el12
1 files changed, 8 insertions, 4 deletions
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