Created
September 11, 2023 18:03
-
-
Save fipar/ee28c09afd1a1e7bc3db0dfc94979b5c to your computer and use it in GitHub Desktop.
selectively execute elisp code depending on which machine I'm on
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; allow customizations per machine | |
(setq hostname (car (split-string system-name "\\."))) | |
(defmacro execute-on-machine (machine-name &rest body) | |
"Execute BODY only if the machine name matches MACHINE-NAME." | |
`(let ((current-machine hostname)) | |
(when (string-equal current-machine ,machine-name) | |
,@body))) | |
(setq work-machine "mellotron") | |
(setq personal-machine "moog") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment