Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MEDIA-LAB.MEDIA.MIT.EDU!holtzman From: holtzman@MEDIA-LAB.MEDIA.MIT.EDU (Henry N. Holtzman) Newsgroups: gnu.emacs.bug Subject: Setting the X11 window name. Message-ID: <8907310728.AA15455@media-lab> Date: 31 Jul 89 07:28:56 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 59 I wrote an x-set-title primitive because I wanted one. Perhaps it could be merged into the distribution? The attached diff is for 18.54's x11fns.c. -Henry *** x11fns.c Fri Feb 24 06:36:01 1989 --- x11fns.c.new Mon Jul 31 03:11:39 1989 *************** *** 441,446 return (Qnil); } DEFUN ("x-set-font", Fx_set_font, Sx_set_font, 1, 1, "sFont Name: ", "Sets the font to be used for the X window.") (arg) --- 441,463 ----- return (Qnil); } + DEFUN ("x-set-title", Fx_set_title, Sx_set_title, 1, 1, "sWindow Name: ", + "Sets this window's name as used by the X window system.") + (arg) + Lisp_Object arg; + { + register char *newtitle; + + CHECK_STRING (arg, 1); + check_xterm (); + + newtitle = (char *) xmalloc (XSTRING (arg)->size + 1); + bcopy (XSTRING (arg)->data, newtitle, XSTRING (arg)->size + 1); + XStoreName(XXdisplay, XXwindow, newtitle); + free(newtitle); + } + + DEFUN ("x-set-font", Fx_set_font, Sx_set_font, 1, 1, "sFont Name: ", "Sets the font to be used for the X window.") (arg) *************** *** 847,852 defsubr (&Sx_set_bell); defsubr (&Sx_flip_color); defsubr (&Sx_set_font); #ifdef notdef defsubr (&Sx_set_icon); --- 864,870 ----- defsubr (&Sx_set_bell); defsubr (&Sx_flip_color); + defsubr (&Sx_set_title); defsubr (&Sx_set_font); #ifdef notdef defsubr (&Sx_set_icon);