[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: axiom mode
From: |
Martin Rubey |
Subject: |
Re: axiom mode |
Date: |
11 Jun 2007 11:11:15 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
martin rudalics <rudalics@gmx.at> writes:
> You define `axiom-process' as a "global" variable, hence it may
> reference one and only one "axiom process" at any instant of time. If
> you want a couple of axiom processes to coexist simultaneously you have
> to make `axiom-process' buffer-local. Then you can try to maintain a
> one-to-one correspondence between axiom buffers and axiom processes.
>
> > What I would
> > like to have is the behaviour of shell mode: usually M-x axiom should
> switch to
> > the running axiom, but optionally, something like
> >
> > (add-hook 'shell-mode-hook (lambda () (rename-uniquely)))
> >
> > or renaming the current axiom buffer should give us a new axiom.
>
> I don't understand what "usually" and "optionally" refer to.
I meant, desired behaviour should be:
M-x axiom switches to the buffer *axiom*, if it exists and if it is an "axiom
buffer". (I guess that should be a buffer in axiom-mode, with a
running axiom process.)
If there is no such buffer, it creates a new buffer and a new axiom
process.
(add-hook 'axiom-mode-hook (lambda () (rename-uniquely))) should
rename the buffer. I do not know what else one could use
shell-mode-hook (and therefore axiom-mode-hook) for.
My trouble is, that
(define-derived-mode shell-mode comint-mode "Shell"
...
)
sets so many variables and
(defun shell (&optional buffer)
...
)
does not mention add-hook at all and
shell-mode-hook is only defined as
(defcustom shell-mode-hook '()
"*Hook for customising Shell mode."
:type 'hook
:group 'shell)
so I do not know when which function is called.
Should I make all variables local? I guess, variables introduced with defvar
are intended to be customizable by the user and are global to all buffers in
axiom mode? Other variables, global to each individual buffer are introduced
by make-local-variable?
I guess I should invest another hour or so...
Many thanks for your patience.
Martin
- axiom mode, Martin Rubey, 2007/06/09
- Re: axiom mode, Tom Tromey, 2007/06/09
- Re: axiom mode, Martin Rubey, 2007/06/10
- Re: axiom mode, martin rudalics, 2007/06/10
- Re: axiom mode, Martin Rubey, 2007/06/10
- Re: axiom mode, martin rudalics, 2007/06/11
- Re: axiom mode,
Martin Rubey <=