[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `insert' deactivates active region
Yamaoka-san, could you try this code?
(let ((buffer (get-buffer-create "*testing*")))
(pop-to-buffer buffer)
(erase-buffer)
(insert "Hello World\n")
(goto-char (point-min))
(set (make-local-variable 'transient-mark-mode) t)
(add-hook 'post-command-hook
(lambda nil
(with-temp-buffer
(insert "foo")
(setq deactivate-mark nil)
))
nil t))
or
(let ((buffer (get-buffer-create "*testing*")))
(pop-to-buffer buffer)
(erase-buffer)
(insert "Hello World\n")
(goto-char (point-min))
(set (make-local-variable 'transient-mark-mode) t)
(add-hook 'post-command-hook
(lambda nil
(with-temp-buffer
(let (deactivate-mark)
(insert "foo"))
))
nil t))
If you think this work-around is not enough, talk to emacs-devel.
I'll write a report my investigation about this bug.
Masatake YAMATO