unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `insert' inside `with-current-buffer' deactivating the mark?
@ 2013-03-04 14:19 Michael Heerdegen
  2013-03-04 14:48 ` Christopher Schmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2013-03-04 14:19 UTC (permalink / raw)
  To: emacs-devel

Hi,

if I eval the following in emacs -Q:

--8<---------------cut here---------------start------------->8---
(defun insert-in-some-other-buffer ()
  (with-current-buffer (get-buffer-create "*Test*")
    (insert ".")))

(add-hook 'post-command-hook 'insert-in-some-other-buffer)
--8<---------------cut here---------------end--------------->8---

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?


Thanks,

Michael.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-04 18:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 14:19 `insert' inside `with-current-buffer' deactivating the mark? Michael Heerdegen
2013-03-04 14:48 ` Christopher Schmidt
2013-03-04 14:59   ` Michael Heerdegen
2013-03-04 18:21     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).