Function: set-frame-name
set-frame-name is an interactive and byte-compiled function defined in
frame.el.gz.
Signature
(set-frame-name NAME)
Documentation
Set the name of the selected frame to NAME.
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.
Probably introduced at or before Emacs version 20.3.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun set-frame-name (name)
"Set the name of the selected frame to NAME.
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
(let ((default (cdr (assq 'name (frame-parameters)))))
(list (read-string (format-prompt "Frame name" default) nil nil
default))))
(modify-frame-parameters (selected-frame)
(list (cons 'name name))))