diff options
Diffstat (limited to 'emacs.d/wpc/string-functions.el')
-rw-r--r-- | emacs.d/wpc/string-functions.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs.d/wpc/string-functions.el b/emacs.d/wpc/string-functions.el index 91b46b5b409e..a7c4a39c6343 100644 --- a/emacs.d/wpc/string-functions.el +++ b/emacs.d/wpc/string-functions.el @@ -14,6 +14,16 @@ "Append \"-hook\" to X." (s-append "-hook" x)) +(defun symbol->string (symbol) + "Alias for `symbol-name' with SYMBOL, since I can never remember that +function's name." + (symbol-name symbol)) + +(defun string->symbol (string) + "Alias for `intern' for STRING since I can never remember that function's + name." + (intern string)) + (defun string/ensure-hookified (x) "Ensure that X has \"-hook\" appended to it." (if (s-ends-with? "-hook" x) |