From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: Richard Stallman <rms@gnu.org>, emacs-devel@gnu.org
Subject: Re: [cvs] bug when using pc-selection-mode/transient-mark-mode
Date: Sun, 22 Sep 2002 18:48:20 -0400 [thread overview]
Message-ID: <200209222248.g8MMmKZ26653@rum.cs.yale.edu> (raw)
In-Reply-To: Pine.LNX.4.44.0209201051170.24069-100000@hkn.eecs.berkeley.edu
> HOWEVER, this is an ugly hack and I've noticed a lot of similar "save
> deactivate_mark; do crap; restore deactivate_mark" code in Emacs. It just
> smells of bad design when global variables have to be pushed and popped
> all the time and someone calling a function needs to know which variables
> to push/pop, especially when this is not documented. Some ideas for a
> more elegant (i.e. a lot more troublesome to implement) solution:
>
> - per-buffer `deactivate-mark' variable.
> - maybe prepare_to_modify_buffer doesn't need to set deactivate-mark
> (probably does need to).
> - a "temporary buffer" status for buffers that are such. Could be either
> passed to get-buffer-create or set as a buffer-local variable.
> - notice whether the buffer being modified by in prepare_to_MB is the
> "active" one (current buffer? or any visible buffer) that the user has
> a selection in (and if not assume it's a temporary buffer)
>
> In the meantime there should be a documented warning to emacs developers
> that whenever they create and manipulate temporary buffers that they have
> to save the deactivate-mark variable.
`mark-active' is buffer-local and I think `deactivate-mark' should
be buffer-local as well. But that begs the question "when do we check
whether deactivate-mark was set and reset mark-active accordingly" ?
Are we going to loop through all buffers, looking for ones with
a non-nil deactivate-mark ?
So maybe we should not make it buffer-local but instead make it hold
a list of buffers whose mark should be deactivated.
Currently we only use t or nil where t means "current-buffer".
Stefan
next prev parent reply other threads:[~2002-09-22 22:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 5:55 [cvs] bug when using pc-selection-mode/transient-mark-mode Karl Chen
2002-09-16 19:27 ` Richard Stallman
2002-09-18 0:07 ` Karl Chen
2002-09-18 17:26 ` Richard Stallman
2002-09-19 7:11 ` Karl Chen
2002-09-19 8:00 ` Karl Chen
2002-09-19 8:48 ` Karl Chen
2002-09-20 3:45 ` Richard Stallman
2002-09-21 2:38 ` Karl Chen
2002-09-21 19:39 ` Richard Stallman
2002-09-22 22:48 ` Stefan Monnier [this message]
2002-09-23 1:05 ` Karl Chen
2002-09-23 1:18 ` Miles Bader
2002-09-23 1:25 ` Miles Bader
2002-09-23 18:31 ` Stefan Monnier
2002-09-23 20:34 ` Kim F. Storm
2002-09-24 3:24 ` Richard Stallman
2002-09-23 16:00 ` Richard Stallman
2002-09-23 20:38 ` Kim F. Storm
2002-09-19 19:52 ` Karl Chen
2002-09-20 18:42 ` Richard Stallman
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=200209222248.g8MMmKZ26653@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--cc=emacs-devel@gnu.org \
--cc=rms@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.