From 9a5c4ee8bf0f5b0bbe390f934811ac3a90ede15b Mon Sep 17 00:00:00 2001 From: chiles <chiles> Date: Mon, 20 May 1991 15:54:33 +0000 Subject: [PATCH] Added "Track Buffer Point" command and RESET-WINDOW-DISPLAY-RECENTERING which is a "Window Buffer Hook". --- hemlock/command.lisp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hemlock/command.lisp b/hemlock/command.lisp index d4ac95611..8eb6924a4 100644 --- a/hemlock/command.lisp +++ b/hemlock/command.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/command.lisp,v 1.4 1991/02/08 16:33:18 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/command.lisp,v 1.5 1991/05/20 15:54:33 chiles Exp $") ;;; ;;; ********************************************************************** ;;; @@ -376,6 +376,23 @@ (t (editor-error "Not enough lines.")))) (unless p (redisplay-all))) + +(defcommand "Track Buffer Point" (p) + "Make the current window track the buffer's point. + This means that each time Hemlock redisplays, it will make sure the buffer's + point is visible in the window. This is useful for windows into buffer's + that receive output from streams coming from other processes." + "Make the current window track the buffer's point." + (declare (ignore p)) + (setf (window-display-recentering window) t)) +;;; +(defun reset-window-display-recentering (window &optional buffer) + (declare (ignore buffer)) + (setf (window-display-recentering window) nil)) +;;; +(add-hook window-buffer-hook #'reset-window-display-recentering) + + (defcommand "Extended Command" (p) "Prompts for and executes an extended command." "Prompts for and executes an extended command. The prefix argument is -- GitLab