all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: axiomize@yahoo.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: axiom mode
Date: Mon, 11 Jun 2007 14:45:15 +0200	[thread overview]
Message-ID: <466D43DB.6040905@gmx.at> (raw)
In-Reply-To: <466D0A33.8020903@gmx.at>

 > 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.

... and puts it in `axiom-mode'.  FWIW that's what your code does at the
moment.

 >           (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.

Why do you want to rename the buffer?

 > Should I make all variables local?

The only variable I can think of at the moment is `axiom-process'.

 > I guess, variables introduced with defvar
 > are intended to be customizable by the user

... `defcustom' serves that purpose ...

 > and are global to all buffers in
 > axiom mode?

A priori a symbol defined as a variable doesn't relate to buffers hence
it "is global".

 > Other variables, global to each individual buffer are introduced
 > by make-local-variable?

You should defvar them first and make them buffer-local either by using
`make-variable-buffer-local' or, better, `make-local-variable'.  A
typical idiom in this context is

(set (make-local-variable 'foo) value)

which makes foo buffer-local and assigns it value.

If you really need multiple axiom processes - so far you didn't tell me
_why_ you need them - you would make `axiom-process' local in the buffer
where you create the process and set it to the process object returned
by comint.  Otherwise, I see no need to change anything here.

  reply	other threads:[~2007-06-11 12:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11  8:39 axiom mode martin rudalics
2007-06-11 12:45 ` martin rudalics [this message]
     [not found] <mailman.1911.1181551178.32220.help-gnu-emacs@gnu.org>
2007-06-11  9:11 ` Martin Rubey
     [not found] <mailman.1862.1181477508.32220.help-gnu-emacs@gnu.org>
2007-06-10 14:24 ` Martin Rubey
  -- strict thread matches above, loose matches on Subject: below --
2007-06-10 12:11 martin rudalics
     [not found] <9qd505x9pf.fsf@aquin.mat.univie.ac.at>
2007-06-09 21:10 ` Martin Rubey
2007-06-09 18:29 Martin Rubey
2007-06-09 21:50 ` Tom Tromey
     [not found] ` <mailman.1841.1181428556.32220.help-gnu-emacs@gnu.org>
2007-06-10  6:41   ` Martin Rubey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=466D43DB.6040905@gmx.at \
    --to=rudalics@gmx.at \
    --cc=axiomize@yahoo.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.