[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: gmdzi!lispm-1!slug@seismo.css.gov*Subject*: tool to put fonts in source code*From*: Juergen Christoffel <unido!gmdzi!lispm-1!JC@seismo.css.gov>*Date*: Thu, 23 Jul 87 19:11+0100*Cc*: gmdzi!lispm-1!jc@seismo.css.gov*Character-type-mappings*: (1 0 (NIL 0) (:FIX :ROMAN :NORMAL) "CPTFONT") (2 0 (NIL 0) (:FIX :ITALIC :NORMAL) "CPTFONTI") (3 0 (NIL 0) (:FIX :BOLD :NORMAL) "CPTFONTCB")*Fonts*: CPTFONT, CPTFONT, CPTFONTI, CPTFONTCB*Posted-date*: Thu, 23 Jul 87 19:11+0100*Resent-date*: Thu 23 Jul 87 21:37:37-CDT*Resent-from*: CMP.SLUG@r20.utexas.edu*Resent-message-id*: <12320796694.36.CMP.SLUG@R20.UTEXAS.EDU>*Resent-to*: SLUG:;

Moin again. No, this will be a constructive message from me :-) ------------------------------------------------------------------------ Does your sources look like this? 1;;; a (simple) primality checker (defun primep (int) "Calculates wether a number is a prime, returns multiple values: boolean and least non-trivial divisor" (declare (values primep divisor)) (cond ((< int 2) (values nil int)) ((evenp int) (values (eq int 2) 2)) (t (do ((divisor 3 (+ divisor 2)) (maxdivisor (floor (sqrt int)))) ((> divisor maxdivisor) (values t int)) (when (zerop (remainder int divisor)) (return (values nil divisor))))))) (defun primes (int) "determines the prime factors of its input, returns them as alist." (check-arg int fixp "an integer greater than zero") (cond ((< int 2) (list int)) ( t (do ((rest int (// rest prime-factor)) (prime-factors nil (cons prime-factor prime-factors)) ;; tricky initialization of PRIME-FACTOR: (prime-factor 1)) ((= rest 1) (reverse prime-factors)) (setq prime-factor (multiple-value-bind (ignore least-divisor) (primep rest) least-divisor))) ))) 0and you would like to have them look like that instead? 1;2;; a (simple) primality checker 1(defun 3primep1 (int) 2"Calculates wether a number is a prime, returns multiple values: boolean and least non-trivial divisor" 1 (declare (values primep divisor)) (cond ((< int 2) (values nil int)) ((evenp int) (values (eq int 2) 2)) (t (do ((divisor 3 (+ divisor 2)) (maxdivisor (floor (sqrt int)))) ((> divisor maxdivisor) (values t int)) (when (zerop (remainder int divisor)) (return (values nil divisor))))))) (defun 3primes1 (int) 2"determines the prime factors of its input, returns them as a list." 1 (check-arg int fixp "an integer greater than zero") (cond ((< int 2) (list int)) ( t (do ((rest int (// rest prime-factor)) (prime-factors nil (cons prime-factor prime-factors)) ;2; tricky initialization of PRIME-FACTOR: 1 (prime-factor 1)) ((= rest 1) (reverse prime-factors)) (setq prime-factor (multiple-value-bind (ignore least-divisor) (primep rest) least-divisor))) ))) 0But you don't like to put all those nice fonts in by hand? Now, here's the solution: Use Fontification! It's cheap, fast and reliable and even children may use it - just type c-sh-F and get the fonts you'll like. OK, so much for advertising :-) Actually I'll make my ZMACS tool available which does all these (and some more) nice things to your code. I've got quiet a number of requests for this in the past and finally managed to bring it beyond beta test state. If you'd like too use it, drop me a message. Based on the number of requests, I'll look up the appropriate way for distribution. (Due to transatlantic traffic costs I wouldn't like to send it out a dozen times from here) --jc

**Follow-Ups**:**tool to put fonts in source code***From:*Alan Ruttenberg <unido!Think.COM!alanr@seismo.css.gov>

- Prev by Date:
**Genera 7.0, Spelling of** - Next by Date:
**Genera 7.0, Spelling of** - Previous by thread:
**Spelling Checker extensions** - Next by thread:
**tool to put fonts in source code** - Index(es):