グローバルに有効にしたいアドオンのモードがあります。手でオンにするには、入力する必要がありますM-x highlight-indentation-mode。だから、以下は私がまだ試したことのリストです: (highlight-indentation-mode t)
, (highlight-indentation-mode 1)
, (setq highlight-indentation-mode t)
. 何も機能しませんでした。次に、モードをグローバルに有効にする必要があるかもしれないと判断し、それについて Google を開始しました。私が次に試したこと:
(define-globalized-minor-mode global-highlight-indentation-mode highlight-indentation-mode
(lambda () (setq highlight-indentation-mode t)))
いいえ、これは私が探しているドロイドではありません。変数をオンにしますが、モードはまだ機能しません。
(define-globalized-minor-mode global-highlight-indentation-mode highlight-indentation-mode
(lambda () highlight-indentation-mode t))
(define-globalized-minor-mode global-highlight-indentation-mode highlight-indentation-mode
(highlight-indentation-mode t))
これら 2 つは私の Emacs を壊しました: config でこの 2 つのコマンドを使ってファイルを開こうとすると、Emacs はエラーを書き、ファイルを開くことを拒否しました。
UPD:私も試したコメントに基づいて
(defun enable-highlight-indentation-mode ()
(interactive)
(highlight-indentation-mode t))
(define-globalized-minor-mode global-highlight-indentation-mode highlight-indentation-mode
enable-highlight-indentation-mode)
(global-highlight-indentation-mode t)
なしでも同じ(interactive)
です。これでファイルを開こうとすると、Emacs は開くことを拒否し、エラーを書き込みます:
File mode specification error: (void-function nil)
c-font-lock-fontify-region: Symbol's function definition is void: nil