[macemacsjp-english 732] Re: Configuring Auctex and flyspell

Back to archive index

Peter Dyballa Peter_Dybal****@Web*****
Sun Nov 5 20:11:00 JST 2006


Am 04.11.2006 um 22:16 schrieb Brian J. Lopes:

> Hello Everyone,
> (add-hook 'LaTeX-mode-hook
>    (function (lambda ()
>                 (require 'reftex)

This statement does not belong into a hook. Require makes Emacs  
remember to load something in case it's needed. Since Emacs does not  
forget as easily as humans do it's OK to write this statement once  
and outside of a hook.

>                 (turn-on-reftex)
>                 (setq reftex-plug-into-AUCTeX t)
>                 (outline-minor-mode)
>                 (turn-on-auto-fill)
>                 (setq ispell-parser 'tex)
>                 (flyspell-mode)
>                 (setq TeX-auto-save t)
>                 (setq TeX-parse-self t)
>                 (setq-default TeX-master nil)
>                  )))

Have you read the documentation about AUCTeX and flyspell? Could be  
they provide better clues.

>
> (if window-system
>     (progn
> ;    (pc-selection-mode) ;M$ Windows-like keybindings (blocks  
> transient-mark-mode for some reason)
> ;    (set-default-font "-*-*-medium-r-*-*-16-*-*-*-*-*- 
> iso8859-1") ;Set default font
>     (set-foreground-color "#aec2e3") ;;if X window set foreground  
> color to carolina blue
>     (set-background-color "#10224a")) ;;if X window set background  
> to dark blue
>     (progn
> ;    (fix-stupid-backspace-key-issue) ;Call command automatically  
> see below (Not necessary on OS X)
>     (set-foreground-color "white");if using -nw then foreground white
>     (set-background-color "black"))) ;;if using -nw then background  
> black

There is no progn needed for the else part. It's treated as kind of a  
default, so it's interpreted in sequence. The if part is assumed to  
be an exception – would you otherwise (for no exception) use an if  
clause?

> ;;;;;;;;;;;EMACS LISP PACKAGES;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;You can use C-h p (for finder-by-keyword) for list of available  
> packages on system
>
> (setq load-path (append load-path (list nil "/Applications/myapps/ 
> Emacs.app/Contents/Resources/lisp") load-path)) ; Look in Carbon  
> Emacs lisp folder next (for Mac emacs)
> (setq load-path (append load-path (list nil "/Applications/myapps/ 
> Emacs.app/Contents/Resources/site-lisp") load-path)) ; Look in  
> Carbon Emacs lisp folder next (for Mac emacs)

I think these are not needed. You can check in emacs with these lines  
commented. Another way to extend load-path:

       (setq load-path
           (mapcar 'expand-file-name
	    (append '(
	    "/Library/Application Support/Emacs"
	    "/Library/Application Support/Emacs/reftex"
	    "/Library/Application Support/Emacs/auctex"
	    "/Library/Application Support/Emacs/auctex/images"
	    "/Library/Application Support/Emacs/preview")
	    load-path)))

       (add-to-list 'load-path (concat "/Library/Application Support/ 
Emacs/calendar"
       	      (number-to-string emacs-major-version)))


>
> ;; To load ispell for spell-checking
> (require 'ispell)

I think this is not needed. You should bare in mind that "ispell" now  
stands for "aspell."

> ;; Set Mac Print dialog
> (when (fboundp 'mac-print-mode)
>   (mac-print-mode 1)

This also should be set by default.


It's a good thing to first check whether some object is already in a  
desirable state before you copy from somewhere.

--
Greetings

   Pete

If all else fails read the instructions.
                                          - Donald Knuth





More information about the macemacsjp-english mailing list
Back to archive index