all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Shiyuan <gshy2014@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re:Re:beginner's question: add-hook& AUCTeX
Date: Thu, 25 Aug 2011 14:46:35 -0500	[thread overview]
Message-ID: <CAOm4EMtkcrR3Ca_kWu5bAH97G4-5NPr4VQyAF8=NX1DG2U0Nwg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]

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.



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

[-- Attachment #2: Type: text/html, Size: 2200 bytes --]

             reply	other threads:[~2011-08-25 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 19:46 Shiyuan [this message]
2011-08-25 19:57 ` beginner's question: add-hook& AUCTeX Jambunathan K
2011-08-26 14:53 ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOm4EMtkcrR3Ca_kWu5bAH97G4-5NPr4VQyAF8=NX1DG2U0Nwg@mail.gmail.com' \
    --to=gshy2014@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.