%%%==============================================================================
%% Copyright 2026-present by Alceu Frigeri
%%
%% This work may be distributed and/or modified under the conditions of
%%
%% * The [LaTeX Project Public License](http://www.latex-project.org/lppl.txt),
%%   version 1.3c (or later), and/or
%% * The [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html),
%%   version 3 (or later)
%%
%% This work has the LPPL maintenance status *maintained*.
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
%% This is version {1.0} {2026/11/27}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/codehighlight
%%
%%%==============================================================================
%%
%% Nota Bene:
%% Some languages 'got' an specific identifier
%%                  like ==> identifier = { pragma } { \# } { }
%%                    or ==> identifier = { texcs }  { \\ } { }
%%      this is a flexible way to declare keywords/pragmas instead
%%      of changing the catcode of some chars to letter
%%          main implication: some keyword/pragma's lists got split.
%%%==============================================================================

%%%%%%%
%%%  This save the current 'expl syntax' state
%%%%%%%
\hlExplFileTest
%%%%%%%
%%%
%%% Just an attempt at having my package's info in a regular way
%%%   \pkginfograb_set:nn {<pkg-name>} { props} sets package info
%%%
%%%   \pkginfograbProvidesExplPackage {<pkg-name>} { props} sets package info
%%%     and calls \ProvidesExplPackage
%%%
%%%%%%%
\RequirePackage{pkginfograb}
\pkginfograbProvidesExplFile {codehighlight-16}
  {
     name        = {codehighlight-16} ,
     prefix      = {codehl} ,
     date        = {2026/11/27} ,
     version     = {1.0} ,
     description = {codehighlight ~language ~definitions ~16}
  }
%%%%%%%
%%% End of cut-n-paste
%%%%%%%

\codehl_lang_def:nn { elisp }
  {
    %%%
    info / note  =
     {
       Emacs ~ Lisp ~(elisp) ~  base ~ Language. ~ Some ~ references~\\
       https://www.gnu.org/software/emacs/manual/html_node/elisp/~\\
       https://git.savannah.gnu.org/cgit/emacs.git~\\
       https://emacsdocs.org/~\\
       https://franz.com/support/documentation/ansicl/section/symbolsi.htm
     }  ,
    %%%

    comment ~ line           =      {1} { ; }         { } ,

    string                   =      {1} { "  } { \\ } { }  ,  
    
    alphanumeric             =      true  ,
    oletter                  =      { \_-\&\* }  ,
    
    %%% TODO
    %%% Heredocs: <<EOF / <<-EOF / <<~EOF (indented), with optional quoting (<<"EOF", <<'EOF', etc.)
  }

\codehl_keyset_def:nn { elisp }
  {
    %%%
    info / note  =
     {
       Emacs ~ Lisp ~(elisp) ~  base ~ Language. ~ Some ~ references~\\
       https://www.gnu.org/software/emacs/manual/html_node/elisp/~\\
       https://git.savannah.gnu.org/cgit/emacs.git~\\
       https://emacsdocs.org/~\\
       https://franz.com/support/documentation/ansicl/section/symbolsi.htm
     }  ,
    %%%

    keywd                    =      {1}
      { 
        block, catch, eval-when, flet, function, go, if, labels, 
        let, let*, load-time-value, locally, macrolet, multiple-value-call, 
        multiple-value-prog1, progn, progv, quote, return-from, 
        setq, symbol-macrolet, tagbody, the, throw, unwind-protect,
      }  ,
  }

%%
%% Aliases
%%

%%%%%%%
%%%  This restore the 'expl syntax' state saved (hopefully) at the beginning
%%%%%%%
\hlExplFileOut


