[Top][All Lists]

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

Re: Customization maxima mode

From: Rupert Swarbrick
Subject: Re: Customization maxima mode
Date: Thu, 19 Jun 2008 20:59:13 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

"Lorenzo Isella" <address@hidden> writes:

> An example from my .emacs file:
>   (defun insert-round () "custom redefined insert-round" (interactive)
>      (insert "()")       ; typing "(" automatically insert "()"
>      (backward-char 1)) ;and go between them: no more matching problems!
> (local-set-key "(" 'insert-round)
> (add-hook 'Maxima-mode-hook
>          (lambda () (local-set-key "(" 'insert-round)))
> (setq auto-mode-alist (cons '("\\.max" . maxima-mode) auto-mode-alist))
> ;(setq load-path (cons "/usr/share/maxima/5.9.0/emacs" load-path ))
> (autoload 'maxima "maxima" "Running Maxima interactively" t)
> (autoload 'maxima-mode "maxima" "Maxima editing mode" t)
> So, how comes that when editing e.g. file calculations.max, typing (
> does not autocomplete to () and cursor in between the brackets?
> I suppose I must be making a trivial mistake; a similar procedure
> gives no trouble with a .py file for instance.

Yep :) It's capitalization: you want maxima-mode-hook.

Note that 

   C-h a "Maxima.*mode-hook"

(without the quotes) comes up with it uncapitalized.

Also, (quick + dirty check) something that I do to check what's bound to
a hook is put a space after the quote temporarily:

(add-hook ' Maxima-mode-hook

and C-x C-e after the variable name. With maxima-mode-hook, you should
see nil or possibly maxima-font-setup. With the capital, you get an


reply via email to

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