Add scouts honor escape hatch for source embedding

This commit is contained in:
Justine Tunney 2020-06-15 19:01:28 -07:00
parent c91b3c5006
commit b4269930f7
547 changed files with 1516 additions and 944 deletions

View file

@ -114,18 +114,15 @@
(write-region nil nil tmp)
(let ((buf (get-buffer-create "*clang-format*"))
(exe (cosmo--find-clang-format-bin)))
;; (with-current-buffer buf
;; (set-process-sentinel
;; (call-process exe tmp t nil arg)
;; (lambda (_ _)
;; (display-buffer buf))))
(with-current-buffer buf
(call-process exe tmp t nil arg))
(replace-buffer-contents buf)
(kill-buffer buf)
(delete-file tmp nil))))))))
(add-hook 'before-save-hook 'cosmo-format)
;; Emacs 26.3+ needed for replace-buffer-contents; so worth it!!
(unless (version-list-< (version-to-list emacs-version) '(26 3))
(add-hook 'before-save-hook 'cosmo-format))
(provide 'cosmo-format)