This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am 0branch on github. | |
* I am marcs (https://keybase.io/marcs) on keybase. | |
* I have a public key whose fingerprint is 0839 E1C9 FF90 1E41 FB1A 0EF7 7F47 6083 7774 14BC | |
To claim this, I am signing this object: |
This file contains 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
(defun interpolate- (interpolate-str interpolate-pl interpolate-f) | |
(if (string-match interpolate-capture interpolate-str 0) | |
(let* ((interpolate-key (match-string 1 interpolate-str)) | |
(interpolate-new-str (replace-match "%" t nil interpolate-str)) | |
(interpolate-new-key (funcall interpolate-f interpolate-key))) | |
(interpolate- interpolate-new-str | |
(cons interpolate-new-key interpolate-pl) interpolate-f)) | |
(cons interpolate-str (reverse interpolate-pl)))) | |
(defun interpolate (interpolate-str) |
This file contains 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
(defvar interpolate-capture "%{\\([^}]+\\)}") | |
(defun interpolate-wrap-key (str sym) | |
(get sym (intern (concat ":" str)))) | |
(defun interpolate- (str pl f) | |
(if (string-match interpolate-capture str 0) | |
(let* ((key (match-string 1 str)) | |
(new-str (replace-match "%" t nil str)) | |
(new-key (funcall f key))) |
This file contains 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
(let ((cheers 3) (interpolation "String Interpolation")) | |
(format "Let's have %d cheers for %s!" | |
cheers interpolation)) |
This file contains 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
(let ((cheers 3) (interpolation "String Interpolation")) | |
(interpolate | |
"Let's have %{cheers}d cheers for %{interpolation}s!")) |
This file contains 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
(defvar interpolate-capture "%{\\([^}]+\\)}") | |
(defun interpolate- (str pl) | |
(if (string-match interpolate-capture str 0) | |
(let* ((key (match-string 1 str)) | |
(new-str (replace-match "%" t nil str)) | |
(new-key (eval (intern key)))) | |
(interpolate- new-str (cons new-key pl))) | |
(cons str (reverse pl)))) |
This file contains 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
(setplist 'x '()) | |
(put 'x :interpolation "String Interpolation") | |
(put 'x :cheers 3) | |
(interpolate-plist | |
"Let's have %{cheers}d cheers for %{interpolation}s!" 'x) |
This file contains 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
(setplist 'x '()) | |
(put 'x :interpolation "String Interpolation") | |
(put 'x :cheers 3) | |
(format "Let's have %d cheers for %s!" | |
(get 'x :cheers) (get 'x :interpolation)) |
This file contains 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
(defvar interpolate-capture "%{\\([^}]+\\)}") | |
(defun interpolate-wrap-key (str sym) | |
(get sym (intern (concat ":" str)))) | |
(defun interpolate- (str pl sym) | |
(if (string-match interpolate-capture str 0) | |
(let* ((key (match-string 1 str)) | |
(new-str (replace-match "%" t nil str)) | |
(new-key (interpolate-wrap-key key sym))) |
This file contains 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
diff --git a/src/Makefile b/src/Makefile | |
index e4a3cd6..9a29e1e 100644 | |
--- a/src/Makefile | |
+++ b/src/Makefile | |
@@ -8,7 +8,7 @@ | |
PLAT= none | |
CC= gcc | |
-CFLAGS= -O2 -Wall $(MYCFLAGS) | |
+CFLAGS= -O2 -Wall $(MYCFLAGS) -DMT_PATCH |
NewerOlder