all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Le Wang <l26wang@gmail.com>
To: GNU Emacs List <help-gnu-emacs@gnu.org>
Subject: buffer-local variables and state information
Date: Mon, 12 Sep 2011 00:25:26 +0800	[thread overview]
Message-ID: <CAM=K+io32Gs_OA8c5nLqyvYN+LqB29Q5uvamoCM5eMd-_=hWAw@mail.gmail.com> (raw)

Is it considered generally acceptable to store state information, for
example, from a minor-mode in a buffer-local variable?  This seemed
like a clean way of doing it, because when the buffer gets killed, the
variables go away, and the GC will clean up at some later stage.

However, recently, I discovered that changing major-modes would
actually kill all buffer-local variables, which would leave my
minor-mode in an invalid state.  So I've been doing it wrong?

-- 
Le



             reply	other threads:[~2011-09-11 16:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-11 16:25 Le Wang [this message]
2011-09-11 20:05 ` buffer-local variables and state information Štěpán Němec

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='CAM=K+io32Gs_OA8c5nLqyvYN+LqB29Q5uvamoCM5eMd-_=hWAw@mail.gmail.com' \
    --to=l26wang@gmail.com \
    --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.