]> git.eshelyaron.com Git - emacs.git/commitdiff
Use the function 'window-system' on the tab-bar/tab-line (bug#59620)
authorJuri Linkov <juri@linkov.net>
Sun, 4 Dec 2022 19:30:34 +0000 (21:30 +0200)
committerJuri Linkov <juri@linkov.net>
Sun, 4 Dec 2022 19:30:34 +0000 (21:30 +0200)
* lisp/tab-bar.el (tab-bar-separator)
(tab-bar-format-align-right, tab-bar-auto-width):
* lisp/tab-line.el (tab-line-format-template): Replace the variable
'window-system' with the function call '(window-system)'.

lisp/tab-bar.el
lisp/tab-line.el

index dcda67e9c5bb52a6daedc0fc4575ad5ec08e8107..162e63fe230d3986041c531c7bafe2d782c4c17e 100644 (file)
@@ -586,7 +586,7 @@ and `tab-bar-select-tab-modifiers'."
 
 (defun tab-bar-separator ()
   "Separator between tabs."
-  (or tab-bar-separator (if window-system " " "|")))
+  (or tab-bar-separator (if (window-system) " " "|")))
 
 \f
 (defcustom tab-bar-tab-name-function #'tab-bar-tab-name-current
@@ -939,7 +939,7 @@ when the tab is current.  Return the result as a keymap."
          (str (propertize " " 'display
                           ;; The `right' spec doesn't work on TTY frames
                           ;; when windows are split horizontally (bug#59620)
-                          (if window-system
+                          (if (window-system)
                               `(space :align-to (- right (,hpos)))
                             `(space :align-to (,(- (frame-inner-width) hpos)))))))
     `((align-right menu-item ,str ignore))))
@@ -1060,11 +1060,11 @@ tab bar might wrap to the second line when it shouldn't.")
                         (string-pixel-width non-tabs))
                      (length tabs)))
       (when tab-bar-auto-width-min
-        (setq width (max width (if window-system
+        (setq width (max width (if (window-system)
                                    (nth 0 tab-bar-auto-width-min)
                                  (nth 1 tab-bar-auto-width-min)))))
       (when tab-bar-auto-width-max
-        (setq width (min width (if window-system
+        (setq width (min width (if (window-system)
                                    (nth 0 tab-bar-auto-width-max)
                                  (nth 1 tab-bar-auto-width-max)))))
       (dolist (item tabs)
index 99a785ee3e372d0fd1967a6770e94348d06fd8da..c4e4a6887204bc0a948adee1371dd9e311b8065e 100644 (file)
@@ -504,7 +504,7 @@ which the tab will represent."
 (defun tab-line-format-template (tabs)
   "Template of the format for displaying tab line for selected window.
 This is used by `tab-line-format'."
-  (let* ((separator (or tab-line-separator (if window-system " " "|")))
+  (let* ((separator (or tab-line-separator (if (window-system) " " "|")))
          (hscroll (window-parameter nil 'tab-line-hscroll))
          (strings
           (mapcar