Configuring emacs for latex void-variable LaTeX-mode-hook

Following this pdf, I added the following to my file ~/.emacs:

(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-PDF-mode t) ;; .pdf statt .dvi per default:
;;Zeilenumbruch
;;(add-hook ’LaTeX-mode-hook ’turn-on-auto-fill)
;;Syntax Higlight
(add-hook ’LaTeX-mode-hook ’turn-on-font-lock)
;; Mathe Modus
(add-hook ’LaTeX-mode-hook ’LaTeX-math-mode)
;; Reftex einflechten und laden
(setq reftex-plug-into-AUCTeX t)
(add-hook ’LaTeX-mode-hook ’turn-on-reftex)
;; Satzende ". " statt ". ". " fuer M-k: loeschen bis Satzende usw.
;;(setq sentence-end "[.?!][]\"’)}]*\\($\\| \\| \\)[
;;]*") ;; Da ist ein "Newline in der Zeile!"
;;(setq sentence-end-double-space nil)
;;direkte Rechtschreib Korrektur:
;;(add-hook ’LaTeX-mode-hook ’flyspell-mode)
;; Nur benutzen falls Auctex > 11.81 mit preview-latex:
(load "preview-latex.el" nil t t)
;; aspell ist besser als ispell.
;; Zeile kommentieren, falls nicht installiert:
(setq-default ispell-program-name "aspell")
;; Deutsche Rechtschreibung falls \usepackage{ngerman}
;; oder german benutzt wird
(add-hook ’TeX-language-de-hook
(function (lambda () (ispell-change-dictionary "german8"))))

Unfortunately emacs does not start now, instead it gives an error

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

Symbol 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.

When started with, --debug-initit gives the following information

Debugger entered--Lisp error: (void-variable ’LaTeX-mode-hook)
  (add-hook ’LaTeX-mode-hook ’turn-on-font-lock)
  eval-buffer(#<buffer  *load*> nil "/home/../.emacs" nil t)  ; Reading at buffer position 812
  load-with-code-conversion("/home/../.emacs" "/home/../.emacs" t t)
  load("~/.emacs" t t)
...

I tried using latex-mode-hookinstead. I was looking for a solution, but I seem to be the only one that has this problem.

I am using Ubuntu 12.04 with the latest Emacs and Auctex. If necessary, I will publish version information, but I rather think that something needs to be added to the configuration, or some package should be installed instead.

How can I get emacs to work with this configuration?

+5
source share
2

? - , .

'LaTeX-mode-hook

’LaTeX-mode-hook

( ).

+9

, - , , . , , " void", , NPE ( ) . , :

, , C-h v ( M-x describe-variable [ ]). TAB , , . , - , .

, LaTeX, auctex.el, latex-mode-hook . , auctex.el latex-mode. , , Emacs, load-path, (require 'mode-name) , Emacs ( Emacs ) autoload, : Emacs: .emacs?.

, [something]-mode-hook, , , , [something] . [something] , 99,99%, ( ). , - , .

+2

All Articles