(const :tag "Text-image-horiz" :value text-image-horiz)
(const :tag "System default" :value nil)) "24.1")
(tool-bar-max-label-size frames integer "24.1")
- (tab-bar-position tab-bar boolean "27.1"
- :set (lambda (sym val)
- (set-default sym val)
- ;; Redraw the bars:
- (tab-bar-mode -1)
- (tab-bar-mode 1)))
+ (tab-bar-position
+ tab-bar (choice
+ (const :tag "Tab bar above tool bar" nil)
+ (const :tag "Tab bar below tool bar" t))
+ "27.1"
+ :set (lambda (sym val)
+ (set-default sym val)
+ ;; Redraw the bars:
+ (tab-bar-mode -1)
+ (tab-bar-mode 1)))
(auto-hscroll-mode scrolling
(choice
(const :tag "Don't scroll automatically"
When called interactively, prompt for the name of the frame.
On text terminals, the frame name is displayed on the mode line.
On graphical displays, it is displayed on the frame's title bar."
- (interactive "sFrame name: ")
+ (interactive
+ (list (read-string "Frame name: " nil nil
+ (cdr (assq 'name (frame-parameters))))))
(modify-frame-parameters (selected-frame)
(list (cons 'name name))))
(funcall tab-bar-tabs-function)))))
(tab-bar-select-tab (1+ (tab-bar--tab-index-by-name name))))
+(defalias 'tab-bar-select-tab-by-name 'tab-bar-switch-to-tab)
+
\f
(defcustom tab-bar-new-tab-to 'right
"Defines where to create a new tab.
(force-mode-line-update)
(message "Deleted all other tabs")))))
+\f
(defun tab-bar-rename-tab (name &optional arg)
"Rename the tab specified by its absolute position ARG.
If no ARG is specified, then rename the current tab.
ARG counts from 1.
If NAME is the empty string, then use the automatic name
function `tab-bar-tab-name-function'."
- (interactive "sNew name for tab (leave blank for automatic naming): \nP")
+ (interactive
+ (let* ((tabs (funcall tab-bar-tabs-function))
+ (tab-index (or current-prefix-arg (1+ (tab-bar--current-tab-index tabs))))
+ (tab-name (cdr (assq 'name (nth (1- tab-index) tabs)))))
+ (list (read-string "New name for tab (leave blank for automatic naming): "
+ nil nil tab-name)
+ current-prefix-arg)))
(let* ((tabs (funcall tab-bar-tabs-function))
(tab-index (if arg
(1- (max 0 (min arg (length tabs))))
(funcall tab-bar-tab-name-function))))
(setf (cdr (assq 'name tab-to-rename)) tab-new-name
(cdr (assq 'explicit-name tab-to-rename)) tab-explicit-name)
- (if (tab-bar-mode)
+ (if tab-bar-mode
(force-mode-line-update)
(message "Renamed tab to '%s'" tab-new-name))))
"Rename the tab named TAB-NAME.
If NEW-NAME is the empty string, then use the automatic name
function `tab-bar-tab-name-function'."
- (interactive (list (completing-read "Rename tab by name: "
- (mapcar (lambda (tab)
- (cdr (assq 'name tab)))
- (funcall tab-bar-tabs-function)))
- (read-from-minibuffer "New name for tab (leave blank for automatic naming): ")))
- (tab-bar-rename-tab new-name (tab-bar--tab-index-by-name tab-name)))
+ (interactive
+ (let ((tab-name (completing-read "Rename tab by name: "
+ (mapcar (lambda (tab)
+ (cdr (assq 'name tab)))
+ (funcall tab-bar-tabs-function)))))
+ (list tab-name
+ (read-string "New name for tab (leave blank for automatic naming): "
+ nil nil tab-name))))
+ (tab-bar-rename-tab new-name (1+ (tab-bar--tab-index-by-name tab-name))))
\f
;;; Short aliases