all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Cc: Karl Chen <quarl@hkn.eecs.berkeley.edu>,
	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 21:18:42 -0400	[thread overview]
Message-ID: <20020923011842.GA29226@gnu.org> (raw)
In-Reply-To: <200209222248.g8MMmKZ26653@rum.cs.yale.edu>

On Sun, Sep 22, 2002 at 06:48:20PM -0400, Stefan Monnier wrote:
> `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 ?

How about something like:

  (1) `mark-active' gets set to a (global) integer counter value instead of t.

  (2) In the current place where `deactivate-mark' is checked, it just
      handles the current buffer, but also increments the global counter.

  (3) `switch-to-buffer' checks to see if `mark-active' is less than the
      global counter value, and if so, checks the local value of
      `deactivate-mark' and perhaps sets mark-active to nil.

IOW, it lazily does the deactivation based on the local value of
deactivate-mark.

Is this too expensive a thing to take place in switch-to-buffer?

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

Doesn't that require all the places where deactivate-mark is set to be
changed (in a non-trivial way)?  Sounds very annoying for programmers...
[and a maintainance headache]

-Miles

-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.

  parent reply	other threads:[~2002-09-23  1:18 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
2002-09-23  1:05               ` Karl Chen
2002-09-23  1:18               ` Miles Bader [this message]
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=20020923011842.GA29226@gnu.org \
    --to=miles@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=quarl@hkn.eecs.berkeley.edu \
    --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.