2016-05-14 20 views
0

Verilogモードで末尾の空白を削除しようとしています。 Verilogモードをメニューでカスタマイズしました。 "Verilog - > Verilogモードのカスタマイズ..."Verilogモードで末尾の空白を削除する方法Emacs

Verilogファイルを編集または保存するときに後続の空白が削除されません。私はsommeコマンド 'フックを追加'を試みたが、まだ成功していない。 私は何が欠けていますか?

私の.emacs(Emacsの24.3.1)です:

;; Before save 
;; (add-hook 'before-save-hook 'delete-trailing-whitespace) 
(add-hook 'before-save-hook 'whitespace-cleanup) 

あなたが有効に試すことができます:私は、以下のセーブ前にクリーンアップを使用、一般的にだけでなく、Verilogのための

`(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. 
'(cua-mode t nil (cua-base)) 
'(global-whitespace-mode t) 
'(indent-tabs-mode nil) 
'(show-paren-mode t) 
'(verilog-align-ifelse t) 
'(verilog-auto-delete-trailing-whitespace t) 
'(verilog-auto-endcomments nil) 
'(verilog-auto-hook (quote (delete-trailing-whitespace))) 
'(verilog-auto-indent-on-newline t) 
'(verilog-auto-lineup (quote declarations)) 
'(verilog-auto-newline nil) 
'(verilog-indent-level 2) 
'(verilog-indent-level-behavioral 2) 
'(verilog-indent-level-declaration 2) 
'(verilog-indent-level-directive 2) 
'(verilog-indent-level-module 2) 
'(verilog-indent-lists nil) 
'(verilog-tab-always-indent t)) 
(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. 
)` 

答えて

0

'delete-trailing-whitespaceのみ、'whitespace-cleanupが多すぎる場合。

+0

これは最終的に働いた。私はこのEmacsを閉じて、このフックを動作させるために再び開く必要がありました。 – Respoc

関連する問題