[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Redefining select-c - summary of solutions
Thanks to all that replied to my question. Here is a summary:
Original request:
Is there a way to suppress the question
Change Select-C from Converse to Nanesse Network Configuration? (Yes or No) Yes
when I compile my system? This question stops the compilation until
someone says yes. I'd like to keep the other questions, however (I
don't want a global switch).
Replies:
1----------------------------------
Date: Wed, 2 Dec 1992 15:55+0200
From: s9274@srl1.LANL.GOV
To: "keunen@nrb.be"@BETA.LANL.GOV
Subject: re: redefining select-C
The following code fragment is from SYS:WINDOW;ACTIVITIES.LISP:
;;; -*- Mode: LISP; Syntax: Common-lisp; Package: COMMON-LISP-INTERNALS; Lowercase: Yes -*-
(defun set-select-key-activity (char activity-name &key clobber-p)
(setf char (char-upcase (make-char char)))
(when (or (eq clobber-p t)
(let ((old (gethash char *select-key-table*)))
(or (null old)
(string-equal old activity-name)
(and (stringp clobber-p) (string-equal old clobber-p))
sys:inhibit-fdefine-warnings
fs:this-is-a-patch-file
(yes-or-no-p "Change Select-~C from ~A to ~A? " char old activity-name))))
(setf (gethash char *select-key-table*) activity-name)
t))
You might try ADVISEing the function so that CLOBBER-P is T, or for your
special case, that it is bound to "Converse".
John Krieger (s9274@srl1.lanl.gov)
Westinghouse Savannah River Company
2----------------------------------
Date: Wed, 2 Dec 1992 17:38+0200
From: Douglas Dodds <Dodds@RIVERSIDE.SCRC.Symbolics.COM>
Subject: redefining select-c
To: keunen@nrb
cc: slug@ai.sri.com
In-Reply-To: <19921202104639.9.KEUNEN@nrbmi1.ia.nrb.be>
It's heavy-handed, but just put this form into your code before the
program-frame definition (or whatever else sets the select-key):
(remhash #\C cli::*select-key-table*)
It won't ask the question if there is no entry for the character being
defined as a select-key.
Douglas Dodds (dodds@symbolics.com)
Symbolics, Inc.
Concord, Mass., USA
3----------------------------------
Date: Wed, 2 Dec 1992 18:36+0200
From: Mike McMahon <MMcM@TITANIA.Oberon.COM>
Subject: redefining select-c
To: nrb!keunen
cc: slug@ai.sri.com
In-Reply-To: <19921202104639.9.KEUNEN@nrbmi1.ia.nrb.be>
You can take the :select-key form out of your define-program-framework
and separately do a set-select-key-activity, giving the :clobber-p argument.
Best style is to have this argument be the name of the old program which
think you are clobbering ("Converse"), although T works for unconditional.
4----------------------------------
Date: Wed, 2 Dec 1992 19:05+0200
To: slug@ai.sri.com
From: Ralf Moeller <moeller@informatik.uni-hamburg.de>
X-Sender: moeller@kogs26.informatik.uni-hamburg.de
Subject: Re: redefining select-c
>
>It's heavy-handed, but just put this form into your code before the
>program-frame definition (or whatever else sets the select-key):
>
> (remhash #\C cli::*select-key-table*)
This is available as an exported function:
(tv:setup-select-keys nil '(\#C))
Ralf Moeller
University of Hamburg
Bodenstedtstr. 16
2000 Hamburg 50
Germany
Phone: ++40 4123 6134
Fax ++40 4123 6530
Email: moeller@informatik.uni-hamburg.de
vk
--
Never trust a pretty header: use keunen@nrb.be to reply
--
Keunen Vincent Network Research Belgium
R&D, Software Engineer Parc Industriel des Hauts-Sarts
keunen@nrb.be 2e Avenue, 65
tel: +32 41 407282 B-4040 Herstal
fax: +32 41 481170 Belgium