From a464c18a15900c65959ec95599a10c8e0ad887f4 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 5 Aug 2015 11:22:28 -0700 Subject: [PATCH] imalison:prefix-alternative --- dotfiles/emacs.d/init.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index eb043091..4216c439 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -157,6 +157,11 @@ ;; functions ;; ============================================================================= +(defmacro imalison:prefix-alternative (name default alternative) + `(defun ,name (arg) (interactive "P") + (if arg (call-interactively (quote ,alternative)) + (call-interactively (quote ,default))))) + (defun imalison:uuid () (interactive) (s-replace "\n" "" (shell-command-to-string "uuid")))