help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: beginner's question: add-hook& AUCTeX


From: Jambunathan K
Subject: Re: beginner's question: add-hook& AUCTeX
Date: Fri, 26 Aug 2011 01:27:17 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

Shiyuan <gshy2014@gmail.com> writes:

> Thanks, Tassilo.
> It turns out that the problem is caused by another line of my .emacs
> file,
> which I want to append the load-path,
> (setq load-path (append (list nil "~/lisp") load-path))
> if the "nil" is deleted, it works fine. But I don't understand why
> adding the current directory to load-path messes up the loading of
> AUCTeX. I don't have any lisp package s in my current directory.

Just making a guess here: 'current directory' is really a
shifting-sand. It is the directory whichever happens to be current when
the Emacs searches the load-path. Now you really have no control over
that do you.

You can have some insight in to load-path related issues by doing a 

M-x locate-library RET whatever-library RET

I haven't seen the parent thread so what I say maynot be of much
help. Atleast you will have another tool in your armour.


>
>     >>Hi Shiyuan,
>    
>     >>     I want to swap the C-j and C-m key. According to the
>     documentation,
>     >> AUCTeX will evaluate the LaTeX-mode-hook so I add the
>     following to my
>     >> .emacs,
>     >>
>     >> (add-hook 'LaTeX-mode-hook (lambda()
>     >>                  (local-set-key (kbd "C-m")
>     >> 'reindent-then-newline-and-
>     >>indent)))
>     >> (add-hook 'LaTeX-mode-hook (lambda()
>     >>                  (local-set-key (kbd "C-j") 'newline)))
>    
>     >Looks good, I'd say.
>    
>     >> However, it has no effect. It seems it's not evaluated at all.
>    
>     >Are you sure that AUCTeX is really loaded?  If it is, then the
>     output of
>     >C-h f latex-mode RET is:
>    
>     >,----[ C-h f latex-mode RET ]
>     >| latex-mode is an alias for `TeX-latex-mode' in `tex-site.el'.
>     >|
>     >| (latex-mode)
>     >|
>     >| Major mode in AUCTeX for editing LaTeX files.
>     >| See info under AUCTeX for full documentation.
>     >|
>     >| [...]
>     >`----
>    
>     >If AUCTeX is not loaded, then the standard emacs latex-mode
>     (that
>     >doesn't define/use LaTeX-mode-hook) is used producing this
>     output:
>     >
>     >,----[ C-h f latex-mode RET (in emacs -Q)]
>     >| latex-mode is an interactive compiled Lisp function in
>     `tex-mode.el'.
>     >|
>     >| (latex-mode)
>     >|
>     >| Parent mode: `tex-mode'.
>     >`----
>     >
>     >Bye,
>     >Tassilo
>
>
>

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]