Changeset 37110 in project


Ignore:
Timestamp:
01/21/19 03:16:10 (3 months ago)
Author:
kon
Message:

fix kwd print

Location:
release/5/apropos/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/apropos/trunk/apropos-api.scm

    r37095 r37110  
    6868
    6969;;
     70
     71(define *tab-width* 2)
    7072
    7173;for our purposes
     
    604606
    605607; => 'procedure | (procedure . <symbol>) | (procedure . <list>) | (procedure . <string>)
     608;
    606609(define (procedure-details proc raw?)
    607610  (let ((info (procedure-information proc)))
     
    616619
    617620; => 'macro | 'keyword | 'variable | <procedure-details>
     621;
    618622(define (identifier-type-details sym #!optional macenv raw?)
    619623  (cond
     
    713717      ails ) ) )
    714718
    715 (define (symbol-pad-length sym maxsymlen)
     719(define (symbol-pad-length sym maxsymlen #!optional (bias 0))
    716720  (let* (
    717721    (len (symbol-printname-length sym) )
    718722    (maxlen (fxmin maxsymlen len) ) )
    719     ;
    720     (fx- maxsymlen maxlen) ) )
     723    (fx+ bias (fx- maxsymlen maxlen)) ) )
    721724
    722725;FIXME need to know if ANY mods, then no mod pad needed (has +2)
     
    733736      ;<sym><tab>
    734737      (let* (
     738        (dets (information-details info))
     739        (kwd? (eq? 'keyword dets))
    735740        (sym (information-name info) )
    736         (sym-padlen (symbol-pad-length sym maxsymlen) ) )
    737         ;
    738         (display sym)
    739         (display (make-string+ (fx+ 2 sym-padlen))) )
     741        (sym-padlen (symbol-pad-length sym maxsymlen (if kwd? -1 0)) ) )
     742        (display (if kwd? (symbol->keyword sym) sym))
     743        (display (make-string+ (fx+ *tab-width* sym-padlen))) )
    740744      ;<mod><tab>
    741745      (let* (
     
    744748        ;
    745749        (if (eq? *toplevel-module-symbol* mod)
    746           (display (make-string+ (fx+ 2 mod-padlen)))
     750          (display (make-string+ (fx+ *tab-width* mod-padlen)))
    747751          (begin
    748752            (display mod)
    749             (display (make-string+ (fx+ 2 mod-padlen))) ) ) )
     753            (display (make-string+ (fx+ *tab-width* mod-padlen))) ) ) )
    750754      ;<details>
    751755      (let ((dets (information-details info)))
  • release/5/apropos/trunk/apropos.egg

    r37095 r37110  
    55
    66((synopsis "CHICKEN apropos")
    7  (version "3.3.0")
     7 (version "3.3.1")
    88 (category misc)
    99 (author "[[kon lovett]]")
Note: See TracChangeset for help on using the changeset viewer.