On Wed, Mar 12 2014, Tassilo Horn <[email protected]> wrote:

> Tamas Papp <[email protected]> writes:
>
> Hi Tamas,
>
>> I have now managed to fix the indentation,
>
> Could you please share what you've done so that others can benefit from
> it?

This is my setup now, comes rather close to the functionality of
wxmaxima. The hook is for emaxima-mode, but that is a derivative of
latex-mode so I think it is relevant to this list.

--8<---------------cut here---------------start------------->8---
(defun customize-emaxima-buffer ()
  (interactive)
  (setq emaxima-use-emaxima-indent t)
  (local-set-key (kbd "<S-return>") 'emaxima-update-single-cell)
  (local-set-key (kbd "<C-return>") 'emaxima-tex-update-single-cell)
  (local-set-key (kbd "C-c C-u C-l") 'maxima-send-line)
  (setq comment-indent-function 'comment-indent-default
        maxima-indent-style 'perhaps-smart)
  (add-to-list 'preview-default-preamble "\\PreviewEnvironment{maxima}" t))

(add-hook 'emaxima-mode-hook 'customize-emaxima-buffer)
--8<---------------cut here---------------end--------------->8---

> I guess the reason is that the value is already needed when initializing
> font-lock.  And the setting of `font-lock-set-defaults' and calling
> `font-latex-set-syntactic-keywords' is also important.

Thanks, this works fine. Out of curiosity, is there a way to
re-initialize font-lock with a mode hook? I can of course copy-paste the
Local variables section to each file I work with, but a more automated
solution would be nice, too.

Best,

Tamas

_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to