Emacs: Fix cc-fmt (workaround)
Uncrustify is supposed to load ~/.uncrustify.cfg by default. Since 0.64 at least it does not seem to work, so we specify it manually.master
parent
babe5876d6
commit
50e3815b2d
|
@ -60,9 +60,9 @@ restored."
|
|||
(let ((status)
|
||||
(formatbuf (get-buffer-create "*C format buffer*")))
|
||||
(setq status
|
||||
(call-process-region (point) (mark) "uncrustify" nil formatbuf nil "-lc" "-q"))
|
||||
(call-process-region (point) (mark) "uncrustify" nil formatbuf nil "-lc" "-q" "-c" (concat (getenv "HOME") "/.uncrustify.cfg")))
|
||||
(if (/= status 0)
|
||||
(error "Bad formatted C file")
|
||||
(error "error running uncrustify")
|
||||
(delete-region (point) (mark))
|
||||
(insert-buffer formatbuf)
|
||||
(kill-buffer formatbuf))))
|
||||
|
|
Loading…
Reference in New Issue