[OS X Emacs] hook for LaTeX mode

David Reitter david.reitter at gmail.com
Thu Mar 20 17:15:33 EDT 2014


First, try starting Aquamacs without customizations (via the Help menu).
Aquamacs should open files with `TeX-PDF-mode’ enabled.

I cannot find a `LaTeX/PS-mode’ in my Aquamacs (if you meant this as an actual mode).  There must be something else going on in your settings.

The code that you showed should work (not sure why you’re installing the toolbar though - this is always done for you anyway).  
(Tipp: Use regular named functions defined with “defun” for hooks.)


--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project!



On Mar 20, 2014, at 4:32 PM, Stephen Anderson <sra at yale.edu> wrote:

> My apologies for what is probably a silly question.  Years ago I spent a fair amount of time fiddling with elisp, and I have a rather elaborate .emacs file that I haven’t touched (or even looked at) in a long, long time.  But I discover that in the current version of Aquamacs, something has changed and I need to figure out how to restore that behavior I worked out long ago.
> 
> I mostly use Aquamacs to edit LaTeX files.  My .emacs file tries to set LaTeX-mode-hook as follows:
> 
> (add-hook 'LaTeX-mode-hook '(lambda ()
> 			      (turn-on-reftex)
> 			      (turn-on-bib-cite)
> 			      (TeX-fold-mode 1)
> 			      (setq ispell-parser 'tex)
> 			      (flyspell-mode)
> 			      (abbrev-mode)
> 			      (LaTeX-install-toolbar)))
> 
> But now I find that my LaTeX files are opened in LaTeX/PS-mode, which doesn’t invoke that hook.  In particular, (flyspell-mode) is no longer enabled, nor any of the others.
> 
> It’s fairly obvious that lots of the structure of AUC-TeX and its friends has changed since I last looked, and it’s dangerous for me to just jump in and dump a lot of old elisp into the new environment.  So I would appreciate it if someone could give me a nice, mindless way to restore the old behavior.
> 
> Thanks in Advance,
> 
> -- 
> 
> Steve Anderson
> 
> 
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4151 bytes
Desc: not available
URL: <https://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20140320/7167d755/attachment.p7s>


More information about the MacOSX-Emacs mailing list