X.U.Run: Don't use elispFun in progn

This is already taken care of by execute and eval, so forcing it in
progn only hampers composability.
This commit is contained in:
Tony Zorman
2022-10-03 21:15:54 +02:00
parent 08071706ba
commit 2ffc5de6cf

View File

@@ -446,14 +446,14 @@ elispFun f = " '( " <> f <> " )' "
asString :: String -> String asString :: String -> String
asString s = " \"" <> s <> "\" " asString s = " \"" <> s <> "\" "
-- | Wrap the given commands in a @progn@ and also escape it by wrapping -- | Wrap the given commands in a @progn@. The given commands need not
-- it inside single quotes. The given commands need not be wrapped in -- be wrapped in parentheses (but can); this will be done by the
-- parentheses, this will be done by the function. For example: -- function. For example:
-- --
-- >>> progn [require "this-lib", "function-from-this-lib arg", "(other-function arg2)"] -- >>> progn [require "this-lib", "function-from-this-lib arg", "(other-function arg2)"]
-- " '( progn (require (quote this-lib)) (function-from-this-lib arg) (other-function arg2) )' " -- "(progn (require (quote this-lib)) (function-from-this-lib arg) (other-function arg2))"
progn :: [String] -> String progn :: [String] -> String
progn cmds = elispFun $ "progn " <> unwords (map inParens cmds) progn = inParens . ("progn " <>) . unwords . map inParens
-- | Require a package. -- | Require a package.
-- --