Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. (defun electric-+-suppress (n)
  2. (interactive "p")
  3. (cond
  4. ((< 1 n)
  5. (self-insert-command n))
  6. ((looking-back "#\\+" (- (point) 2))
  7. (delete-backward-char 1)
  8. (insert "-(and)"))
  9. ((self-insert-command n))))
  10.  
  11. (add-hook 'lisp-mode (lambda () (local-set-key (kbd "+") 'electric-+-suppress)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement