AUCTexのインストール

AUCTexのインストール

Ubuntu 13.10 で次のコードを使用して、AUCTex 付きの Emacs をインストールしました。

 sudo apt-get install texlive-base emacs23 auctex preview-latex

私はついていきますこれら指示に従っていますが、ファイルにコピーされるはずのコードで~/.emacsエラーが発生します。

Warning (initialization): An error occurred while loading `/home/dbelal/.emacs':

Symbol's value as variable is void: ’LaTeX-mode-hook

To ensure normal operation, you should investigate and remove the cause of the error in 
your initialization file.  Start Emacs with the `--debug-init' option to view a
complete error backtrace.

ファイル~/.emacsには次の内容が含まれます。

;;For Auctex < 11.82 exchange ";;" in the following 2 lines
;;(require ’tex-site)
(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-PDF-mode t) ;; .pdf instead of .dvi per default:
2;;Zeilenumbruch
(add-hook ’LaTeX-mode-hook ’turn-on-auto-fill)
;;Syntax Higlighting
(add-hook ’LaTeX-mode-hook ’turn-on-font-lock)
;; Math Mode
(add-hook ’LaTeX-mode-hook ’LaTeX-math-mode)
;; loading Reftex 
(setq reftex-plug-into-AUCTeX t)
(add-hook ’LaTeX-mode-hook ’turn-on-reftex)
;; Satzende ". " statt ". ". " f¨ur M-k: l¨oschen bis Satzende usw.
(setq sentence-end "[.?!][]\"’)}]*\\($\\| \\| \\)[
;;]*") ;; Da ist ein "Newline in der Zeile!"
(setq sentence-end-double-space nil)
;;german spell correction
;;(add-hook ’LaTeX-mode-hook ’flyspell-mode)
;; Use only with Auctex > 11.81 with preview-latex:
(load "preview-latex.el" nil t t)
;; aspell is better than ispell.
;; Comment line if not installed
(setq-default ispell-program-name "aspell")
;; German Spell Correction falls \usepackage{ngerman}
;; oder german benutzt wird
(add-hook ’TeX-language-de-hook
(function (lambda () (ispell-change-dictionary "german8"))))

私は Emacs 初心者です。Lisp は話せません (ただし C は話せます ;-) )。Emacs と AUCTex を起動して実行するにはどうすればよいですか?

答え1

ファイル.emacsに構文エラーがあります。評価するすべての行で (10 進数値 39) 文字add-hookが使用されず'、非 ASCII 文字が使用されています。(PDF の説明からコピー アンド ペーストしたためだという @zeroth の推測に同意します)。

すべてをに置き換えると'、この問題は修正されるはずです。

(これが重要な理由は、Elispプログラミング言語(Emacsの設定に使用されているもの)が'プログラミング言語の関数として定義しているためです。他の文字には関数や値が関連付けられていません。評価される関数は関数ですquote。引用符は実際にはここでは関係ないと思うトピックであり、小さなトピックではありません。興味のある方は、Elisp マニュアルの引用に関するセクション(またはLispファミリーの他の言語での引用についての議論)

関連情報