🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #1327

select-window-hook

#1327
From: Brian L. Kahn
Date: Sun, 07 Jun 1992 00:14
40 lines
1892 bytes
I've always wanted my screens to be renamed as I changed buffers, but
I've never been able to get this to work right.  Too much happens
behind the scenes.  Today I broke down and changed the C-code (much to
my shame, its just not the elisp way) to give a select-window-hook.
Maybe this could be put in the distribution?  Now it is easy to track
current buffer on screens (set this and set-window-buffer-hook to
'epoch::do-titles), and I've thought up many other nifty and exotic
uses for this hook.


The patch is really short, so here it is:


*** window.c.orig	Sat Jun  6 18:36:49 1992
--- window.c	Sat Jun  6 18:36:33 1992
***************
*** 1140,1145 ****
--- 1140,1157 ----
    windows_or_buffers_changed++;
    screen_changed++;
  
+     {
+     /* blk@mitre.org  Sat Jun  6 19:11:01 1992
+      * Call value of window-select-hook if it is bound and non-nil
+      * derived from epoch code for set-window-buffer-hook
+      */
+     register Lisp_Object tem;
+     tem = intern("window-select-hook");
+     tem = XSYMBOL (tem)->value;	/* convert to value */
+     if (! EQ (tem, Qunbound) && ! EQ (tem, Qnil))
+       tem = call1 (tem,window);
+     }
+ 
    return window;
  }
  

--
B<   Brian Kahn   blk@security.mitre.org   "may the farce be with you"
Technical Details
Message-ID: <BLK.92Jun6191426@vanity.mitre.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!linus!linus.mitre.org!news!mbunix!blk

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,63d3f72052adbfaf,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1992-06-06 11:30:08 PST
Newsgroups: gnu.epoch.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!linus!linus.mitre.org!news!mbunix!blk
From: blk@mitre.org (Brian L. Kahn)
Subject: select-window-hook
Message-ID: <BLK.92Jun6191426@vanity.mitre.org>
Sender: news@linus.mitre.org (News Service)
Nntp-Posting-Host: vanity.mitre.org
Organization: The MITRE Corp. Bedford, MA
Distribution: gnu
Date: Sun, 7 Jun 1992 00:14:26 GMT
Lines: 41