와 파일에 내장 스타일을 적용 : 나는 "리눅스"형식에 따라 파일에 모든 브래킷을 변경하려면나는 이렇게 작성된 C 파일했습니다 이맥스
int main(void){
}
합니다.
int main(void)
{
}
어떻게하면 이멕스에서이 작업을 수행 할 수 있습니까?
편집 1 :
이 내 이맥스 파일입니다
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(custom-enabled-themes (quote (tango-dark)))
'(inhibit-startup-screen t)
'(package-archives
(quote
(("melpa" . "https://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(setq make-backup-files nil) ; stop creating backup~ files
(setq auto-save-default nil) ; stop creating #autosave# files
(setq c-default-style "linux"
c-basic-offset 4)
편집 2 : GNU 들여 쓰기를 호출하는 이맥스 매크로를 작성하여 해결
.
[가능한 모든 이맥스 C 스타일을 적용하여 모든 소스 파일을 다시 포맷 할 수 있습니까?] (http://stackoverflow.com/questions/717177/how-can-i-apply- a-new-emacs-c-style-to-reformat-all-my-source-files) –