docs/api: add letenv! demo

This commit is contained in:
Henrik Lissner 2019-12-15 22:54:47 -05:00
parent da25027dc3
commit 58df554090
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -20,6 +20,7 @@ It is integrated into Helpful, in Doom.
- [[#file-exists-p][file-exists-p!]]
- [[#lambda][lambda!]]
- [[#lambda-1][lambda!!]]
- [[#letenv][letenv!]]
- [[#load][load!]]
- [[#map][map!]]
- [[#package][package!]]
@ -268,6 +269,15 @@ Or to create aliases for functions that behave differently:
;; its startup visibility settings.
(fset 'org-reset-global-visibility (lambda!! #'org-global-cycle '(4))
#+END_SRC
*** letenv!
#+BEGIN_SRC elisp
(letenv! (("SHELL" "/bin/sh"))
(shell-command-to-string "echo $SHELL"))
#+END_SRC
#+RESULTS:
: "/bin/sh\n"
*** load!
#+BEGIN_SRC elisp :eval no
;;; Lets say we're in ~/.doom.d/config.el