Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ansi-color-specifier? and ansi-color-specifier-list #679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 29, 2024

  1. Add ansi-color-specifier?

    So the user can check if an object is one of the symbols that specify
    ANSI colors. This can be useful when writing code that takes those as
    argument:
    
    ```
    (define-method ascii-draw ((s <shape>) color)
     ;; we should check if color is a valid color here
     ...
     )
    ```
    
    And... Since we're at it, why not add a method to obtain the full list
    also? :)
    
    ```
    (ansi-color-specifier-list)
      => (normal bold no-bold italic no-italic underline no-underline blink
          no-blink reverse no-reverse black bg-black red bg-red green
          bg-green yellow bg-yellow blue bg-blue magenta bg-magenta cyan
          bg-cyan white bg-white)
    ```
    
    In order to do this, we include the `set!`s of all lambdas that define
    procedures for ANSI color stuff under the lambda that defines the
    color alist.
    jpellegrini committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    c783dc1 View commit details
    Browse the repository at this point in the history