每次嘗試創建或訪問擴展名爲「.txt」的文件時,都會得到類似如下:錯誤:以「.txt」擴展名打開文件時出現「錯誤的參數數量爲0」
Debugger entered--Lisp error: (wrong-number-of-arguments quote 0)
quote()
set-auto-mode-0(quote nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer file.txt> "~/path/to/file.txt" nil nil "~/path/to/file.txt" (24122033 2049))
find-file-noselect("/home/me/path/to/file.txt" nil nil)
ido-file-internal(raise-frame)
ido-find-file()
call-interactively(ido-find-file nil nil)
然而,在基本模式下,緩衝區「file.txt」是打開的。無論我使用ido_find-file
還是M-x find file
,都會發生這種情況。
我試圖通過添加以下行中我文件來解決這個問題:
(add-to-list 'auto-mode-alist '("\\.txt$" . text-mode))
...我已經改變了txt
到[tT][xX][tT]
,切換出一個\\'
爲$
,和嘗試fundamental-mode
而不是text-mode
;但沒有任何變化的組合似乎會使錯誤消失。
我正在xubuntu linux上使用GNU Emacs 24.3.1(i686-pc-linux-gnu,GTK +版本3.4.2)。
我假設錯誤以set-auto-mode()
開頭,但我不知道這是肯定的,而且我不知道爲什麼那裏的parens會是空的。有沒有其他人有這個問題,或知道我在這裏做錯了嗎?