From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sahitihi Subject: Re: Status of Submitted Patches Date: Thu, 24 May 2018 22:46:19 +0530 Message-ID: <3a887aae-93f5-7e70-c8af-9bf4b4d17cb4@swecha.net> References: <8ea5d026-fab9-7b12-198e-610ad7743cb2@swecha.net> <871sfxev9w.fsf@elephly.net> <7626275c-3eee-bb05-ab9d-4c88ec6f0329@swecha.net> <87r2nvjte6.fsf@elephly.net> <5ab51417-b635-9725-9f48-3bc3f9b61fdf@swecha.net> <87tvsko2wd.fsf@elephly.net> <7290013c-990d-3f7d-d8db-38e090ed766a@swecha.net> <87zi28kt82.fsf@elephly.net> <8573e97d-d107-cde6-cd17-35f4ef6d2de3@swecha.net> <87k1takumm.fsf@elephly.net> <87o9hycwl6.fsf@elephly.net> <87r2mhdeap.fsf@elephly.net> <618c131c-6ba6-e525-aefc-72acca1c910f@swecha.net> <87a7suwtp7.fsf@elephly.net> <149bfb8c-22b5-797d-e88a-ca4077b0a4cc@swecha.net> <87d0xmok8e.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6E0A5940BCDFAA96CA397F0E" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLtrT-0008Gz-BG for guix-devel@gnu.org; Thu, 24 May 2018 13:17:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLtrO-0001L2-Bj for guix-devel@gnu.org; Thu, 24 May 2018 13:17:11 -0400 In-Reply-To: <87d0xmok8e.fsf@elephly.net> Content-Language: en-US List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org This is a multi-part message in MIME format. --------------6E0A5940BCDFAA96CA397F0E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ricardo, > Another note about style: I think it would be better to use > =E2=80=9Calist->hash-table=E2=80=9D instead of =E2=80=9Cmake-hash-table= =E2=80=9D followed by repeated > modifications to the hash table with =E2=80=9Chashq-set!=E2=80=9D. We = prefer to avoid > mutation of values when possible. I have made all necessary modifications. Can please review it once. > Regarding copyright headers: please make sure to also add a copyright > line for yourself and a copyright line from the file of guile-colorize > to =E2=80=9C(guix ui)=E2=80=9D. > > When you=E2=80=99re done with these changes, please make a local commit= and send > the output of =E2=80=9Cgit format-patch -1=E2=80=9D. I will proceed further once it is reviewed. :) Thanks!! --- Sahithi --------------6E0A5940BCDFAA96CA397F0E Content-Type: text/x-scheme; name="term ansi-color.scm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="term ansi-color.scm" (define-module (term ansi-color) #:export (color colorize-string) #:use-module (srfi srfi-1) ; for 'remove' #:use-module (srfi srfi-13)) ; for 'string-join'=20 (define ansi-color-tables `((CLEAR . "0") (RESET . "0") (BOLD . "1") (DARK . "2") (UNDERLINE . "4") (UNDERSCORE . "4") (BLINK . "5") (REVERSE . "6") (CONCEALED . "8") (BLACK . "30") (RED . "31") (GREEN . "32") (YELLOW . "33") (BLUE . "34") (MAGENTA . "35") (CYAN . "36") (WHITE . "37") (ON-BLACK . "40") (ON-RED . "41") (ON-GREEN . "42") (ON-YELLOW . "43") (ON-BLUE . "44") (ON-MAGENTA . "45") (ON-CYAN . "46") (ON-WHITE . "47"))) (define (color . lst) (let ((color-list=20 (remove not=20 (map (lambda (color) (assq-ref ansi-color-tables color))= lst)))) (if (null? color-list) "" (string-append=20 (string #\esc #\[) (string-join color-list ";" 'infix) "m")))) =20 (define (colorize-string str . color-list) (string-append (apply color color-list) str (color 'RESET))) (display (colorize-string "Hello!\n" 'RED 'BOLD 'ON-BLUE)) (for-each display (list (color 'RED 'BOLD 'ON-BLUE) "Hello!" (color 'RESET))) --------------6E0A5940BCDFAA96CA397F0E--