;; quasi-transformer.el -- attempt to transform old style quasiquote syntax to new style. ;; 1998 Karl M. Hegbloom ;; GNU ;; Let's have a name-this-function contest and add this to `backquote.el'. ;; Should `fixup-whitespace' remove the space in ",@ var"? (defun quasi-transformer () (interactive) (undo-boundary) (save-excursion (beginning-of-defun) (save-restriction (narrow-to-defun) (condition-case err (while t (while (not (looking-at "(\\(?:,@\\|[`,]\\)")) (forward-char 1)) (save-excursion (forward-sexp 1) (delete-backward-char 1)) (delete-char 1) (forward-char) (cond ((looking-at "@") (forward-char) ;; (fixup-whitespace) doesn't tighten ",@ var" (while (looking-at "[ \t]") (delete-char 1))) ((looking-at "$") (delete-char 1) (fixup-whitespace)) (t (fixup-whitespace)))) (end-of-buffer nil)))) (undo-boundary))