emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `insert' inside `with-current-buffer' deactivating the mark?


From: Michael Heerdegen
Subject: Re: `insert' inside `with-current-buffer' deactivating the mark?
Date: Mon, 04 Mar 2013 15:59:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Christopher Schmidt <address@hidden> writes:

> Michael Heerdegen <address@hidden> writes:
> > if I eval the following in emacs -Q:
> > (defun insert-in-some-other-buffer ()
> >   (with-current-buffer (get-buffer-create "*Test*")
> >     (insert ".")))
> >
> > (add-hook 'post-command-hook 'insert-in-some-other-buffer)
> >
> > the mark in any buffer is deactivated immediately after each command.
> > Looks like a bug to me - the use of `with-current-buffer' should
> > prevent influencing any other buffer than *Test*.  What am I missing?
>
>     deactivate-mark

Thanks.  Yes, I know `deactivate-mark' - but why is it necessary here?
Why does changing another buffer deactivate the mark in the current
buffer?

Even if you activate the mark in one buffer, manually switch to another
buffer, edit it, and come back to the first buffer, the mark is still
active there.


Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]