2010-05-02 13 views
6

在AucTeX,編輯逐項列表時:在AucTeX,在評價一個項目註釋結果後逐項列表新項目

\begin{itemize} 
\item My item % note to self 
\end{itemize} 

,當我經過「自我」做抄送CJ我得到:

\begin{itemize} 
\item My item % note to self 
% \item 
\end{itemize} 

時,我想:

\begin{itemize} 
\item My item % note to self 
\item 
\end{itemize} 

有沒有設置可以修改正確,使這項工作?

+0

有意思......所以上一行結尾處的註釋引起新行被註釋。 – mathmike 2010-05-02 16:56:24

+0

我認爲這是AucTeX的一個已知的錯誤。 – phimuemue 2011-02-03 16:44:15

回答

4
(setq LaTeX-insert-into-comments nil) 

似乎解決了這個問題,雖然它可能有其他影響,我不知道。要使用它,請將其放入.emacs自定義文件中;要測試它,請嘗試M-:,然後將上面的代碼粘貼到提示中。

變量LaTeX-insert-into-comments被定義爲

*Whether insertion commands stay in comments. 
This allows using the insertion commands even when 
the lines are outcommented, like in dtx files. 

編輯:

這裏是更好的東西:

(defadvice LaTeX-insert-item (around my-LaTeX-insert-item activate) 
    (let ((LaTeX-insert-into-comments nil)) ad-do-it)) 

這將防止設置LaTeX-insert-into-comments全球不良影響Ť通過只在插入物品時暫時更改,才能使用nil。再次,使用它,把它放在你的.emacs自定義文件中。

+0

這似乎工作!謝謝! – stevejb 2011-02-07 22:34:31

相關問題