mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Add scouts honor escape hatch for source embedding
This commit is contained in:
parent
c91b3c5006
commit
b4269930f7
547 changed files with 1516 additions and 944 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue