Skip to content
Snippets Groups Projects
Commit 7678b8fa authored by chiles's avatar chiles
Browse files

There's a new "Buffer Modified Hook" function that raises the "Echo Area"
window when it becomes modified.  You can control this with the Hemlock
variable: "Raise Echo Area When Modified".  It isn't good enough to set "Set
Window Autoraise" to :echo-only because output appears in the echo area at
times when the echo area is not set as the current window.  The only
malfunction of setting this new variable is sometimes Hemlock clears the echo
area, which modifies it, and then does not output any text; in this situation,
Hemlock would raise the echo area, but it doesn't need to do so.  This cannot
be eliminated due to the nature of the "Buffer Modified Hook".
parent 7165f19d
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/echo.lisp,v 1.3 1991/02/08 16:34:05 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/echo.lisp,v 1.4 1991/10/23 11:00:02 chiles Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -158,7 +158,8 @@ ...@@ -158,7 +158,8 @@
;;; LOUD-MESSAGE -- Public. ;;; LOUD-MESSAGE -- Public.
;;; Like message, only more provocative. ;;;
;;; Like message, only more provocative.
;;; ;;;
(defun loud-message (&rest args) (defun loud-message (&rest args)
"This is the same as MESSAGE, but it beeps and clears the echo area before "This is the same as MESSAGE, but it beeps and clears the echo area before
...@@ -168,6 +169,24 @@ ...@@ -168,6 +169,24 @@
(apply #'message args)) (apply #'message args))
(defhvar "Raise Echo Area When Modified"
"When set, Hemlock raises the echo area window when output appears there."
:value nil)
;;;
(defun raise-echo-area-when-modified (buffer modified)
(when (and (value ed::raise-echo-area-when-modified)
(eq buffer *echo-area-buffer*)
modified)
(let* ((hunk (window-hunk *echo-area-window*))
(win (window-group-xparent (bitmap-hunk-window-group hunk))))
(xlib:map-window win)
(setf (xlib:window-priority win) :above)
(xlib:display-force-output
(bitmap-device-display (device-hunk-device hunk))))))
;;;
(add-hook buffer-modified-hook 'raise-echo-area-when-modified)
;;;; DISPLAY-PROMPT-NICELY and PARSE-FOR-SOMETHING. ;;;; DISPLAY-PROMPT-NICELY and PARSE-FOR-SOMETHING.
...@@ -343,7 +362,7 @@ ...@@ -343,7 +362,7 @@
by the current buffer, and by any modes for the current buffer." by the current buffer, and by any modes for the current buffer."
(do ((tables (list (buffer-variables *current-buffer*) (do ((tables (list (buffer-variables *current-buffer*)
*global-variable-names*) *global-variable-names*)
(cons (hi::mode-object-variables (car mode)) tables)) (cons (mode-object-variables (car mode)) tables))
(mode (buffer-mode-objects *current-buffer*) (cdr mode))) (mode (buffer-mode-objects *current-buffer*) (cdr mode)))
((null mode) tables))) ((null mode) tables)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment