Advertisement
Dyrcona

After save hook for a mode

Nov 16th, 2020
1,634
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.31 KB | None | 0 0
  1. ;; Add a hook for conf-mode[Space] to make sed scripts whenever I edit
  2. ;; and save /etc/hosts.
  3. (add-hook 'conf-space-mode-hook
  4.           (lambda ()
  5.             (if (and (buffer-file-name) (string-match *hosts-file* (buffer-file-name)))
  6.                 (add-hook 'after-save-hook 'make-hosts-sedscripts nil t))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement