add elisp solution

Add a macro-based solution in Emacs Lisp.