Hi, I'm learnig to program using SICP, and MIT/GNU Scheme. I have made a
small change to hlpcom.scm to make it show the keybinding of a command.
Specifically to the procedure help-describe-command. I don't know if you
would be ineterested in seeing it. Buy I have uploaded the patch
anyways. Thanks for your time.
--- hlpcom.scm 2014-08-07 21:13:35.000000000 -0430
+++ hlpcom.scm-new 2014-08-07 21:13:35.000000000 -0430
@@ -127,11 +127,22 @@
(lambda (name)
(help-describe-command (name->command name))))
+(define (key-binding-command command)
+ (let ((bindings (comtab-key-bindings (current-comtabs) command)))
+ (if (pair? bindings)
+ (begin
+ (write-string "Is bound to: ")
+ (display (xkey->name (car bindings)))
+ (write-string "\n\n"))
+ (write-string "Is not bound."))))
+
+
(define (help-describe-command command)
(with-output-to-help-display
(lambda ()
(write-string (command-name-string command))
- (write-string ":\n")
+ (write-string ":\n\n")
+ (key-binding-command command)
(write-description (command-description command)))))
(define-command where-is
@@ -435,5 +446,5 @@
(define (finish start)
(list (substring string start end)))
-
+
(apply string-append (find-escape 0 (buffer-comtabs buffer)))))
\ No newline at end of file
_______________________________________________
MIT-Scheme-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/mit-scheme-devel