From 9eeb2cd8dc2d4ac873c0f8634fc2a27a3f127d4c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 14 Aug 1989 09:30:57 +0000 Subject: [PATCH] Sort list of key bindings before printing it. --- v7/src/edwin/hlpcom.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/v7/src/edwin/hlpcom.scm b/v7/src/edwin/hlpcom.scm index b62f6c3d6..6f2eb6711 100644 --- a/v7/src/edwin/hlpcom.scm +++ b/v7/src/edwin/hlpcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/hlpcom.scm,v 1.91 1989/08/14 09:22:33 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/hlpcom.scm,v 1.92 1989/08/14 09:30:57 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989 Massachusetts Institute of Technology ;;; @@ -300,11 +300,13 @@ If you want VALUE to be a string, you must surround it with doublequotes." (newline))))) (define (char-list-string xchars) - (if (null? (cdr xchars)) - (xchar->name (car xchars)) - (string-append (xchar->name (car xchars)) - ", " - (char-list-string (cdr xchars))))) + (let loop ((xchars (sort xchars xcharname (car xchars)) + (string-append (xchar->name (car xchars)) + ", " + (loop (cdr xchars)))))) + (define (print-variable-binding variable) (write-string " which is bound to: ") (write (variable-value variable)) -- 2.25.1