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 /lisp/startup.el | |
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").
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 12 |
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 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 |