]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-frame-name): New function.
authorEli Zaretskii <eliz@gnu.org>
Thu, 20 Nov 1997 15:55:31 +0000 (15:55 +0000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 20 Nov 1997 15:55:31 +0000 (15:55 +0000)
lisp/frame.el

index 96d103e1229d44de86ea1da2c85b06be1ad862e6..e4531a3d15a135e15d1de7b983f8ede6c4f313e0 100644 (file)
@@ -675,6 +675,14 @@ that is beyond the control of Emacs and this command has no effect on it."
                -1 1)))
   (modify-frame-parameters (selected-frame)
                           (list (cons 'auto-lower (> arg 0)))))
+(defun set-frame-name (name)
+  "Set the name of the selected frame to NAME.
+When called interactively, prompt for the name of the frame.
+The frame name is displayed on the modeline if the terminal displays only
+one frame, otherwise the name is displayed on the frame's caption bar."
+  (interactive "sFrame name: ")
+  (modify-frame-parameters (selected-frame)
+                          (list (cons 'name name))))
 \f
 ;;;; Aliases for backward compatibility with Emacs 18.
 (defalias 'screen-height 'frame-height)