[英]Saving a Python file with Emacs changed the indentations
我以前從未發生過這種情況,但是當在Ubuntu 14.04上使用Emacs23時,兩次嘗試保存文件時縮進都發生了更改-例如
if classRowDict[currClass] != rowCtr:
sys.exit("About to enter %s in row %d, instead of row %d" % (currClass, rowCtr, classRowDict[currClass]))
else:
data=re.findall("\d+\.?\d*",currLine)
變
if classRowDict[currClass] != rowCtr:
sys.exit("About to enter %s in row %d, instead of row %d" % (currClass, rowCtr, classRowDict[currClass]))
else:
data=re.findall("\d+\.?\d*",currLine)
對於較大的代碼塊,這是一個更大的問題。 我將使用Emacs24修復問題,但這是第二次發生這種情況。 有沒有人看到過這樣的內容,僅保存(ctrlX-S)會使Emacs更改Python(.py)文件的縮進? 如果是這樣,我應該如何避免這種情況,或者至少將來要解決?
一些調試技巧:
如前所述,很可能有些鈎子做到了。 如果沒有找到原因,請嘗試從emacs -Q嘗試,加載python-mode.el並在以下位置提交錯誤報告
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.