# shellcheck shell=dash

___x_cmd log init emacs

xrc:mod:lib     emacs       __runcmd    elpaca/_index   setup/_index

___x_cmd_emacs___main(){
    [ "$#" -gt 0 ]  ||      set -- --runmain
    local op="$1";  shift
    case "$op" in
        -h|--help)          ___x_cmd help -m emacs                  "$@" ;;
        client)             ___x_cmd_emacs___runcmd emacsclient     "$@" ;;

        elpaca)             ___x_cmd_emacs_elpaca                   "$@" ;;

        --setup|setup)      ___x_cmd_emacs_setup                    "$@" ;;

        --|--runmain)       ___x_cmd_emacs___runmain                "$@" ;;
        *)                  ___x_cmd_emacs___runmain "$op"          "$@" ;;
    esac
}
