help-gnu-emacs
[Top][All Lists]
Advanced

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

Selected region not visible


From: Johan Andersson
Subject: Selected region not visible
Date: Sat, 13 Mar 2010 20:06:50 +0000

Hey,

I'm trying to select a region using set-mark and goto-char. It works, except that I do not see the region. This simple test function for example will select the region, but not highlight it.

(defun test ()
  (interactive)
  (let ((region (buffer-substring-no-properties (point) (mark))))
    (delete-region (point) (mark))
    (forward-char 1)
    (insert region)
    (set-mark 2)
    (goto-char 20)))

Any idea why that might be?

Thanks!

reply via email to

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