emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Display problems with overlays (on w32 only?)


From: Lennart Borgman (gmail)
Subject: Re: Display problems with overlays (on w32 only?)
Date: Mon, 23 Apr 2007 16:12:50 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666

Glenn Morris wrote:
"Lennart Borgman (gmail)" wrote:

In the attached images I have one overlay one character long that has a red underline.
[...]
In the second picture I have added another overlay, with a slightly blue background. This overlay is 10 characters long and includes a new line. The first overlay with the red underline is still just one character long, but the red underline now displays in the whole range of the second overlay. (The two oeverlays starts at the same character.)

Yes, but what shade of blue?

emacs -q --no-site-file

Press [RET] on "i" in "This buffer is for..."

At end of buffer, evaluate this:

(setq o1 (make-overlay 1 2))
(overlay-put o1 'face '(:underline t :foreground "red"))
(setq o2 (make-overlay 1 10))
(overlay-put o2 'face '(:background "green"))

Works as it should for me. This is on GNU/Linux.

Thanks, but I should have sent some code in addition to my explanation. The above works for me to, but can you please test the code below. That code gives the error. The important thing is the newline characters.

(defvar o1 nil)
(defvar o2 nil)
(defun test-me()
  (interactive)
  (let ((buf (get-buffer-create "*OVERLAY Error*")))
    (switch-to-buffer-other-window buf)
    (with-current-buffer buf
      (erase-buffer)
      (insert "123\n\n  890")
      (if o1
          (move-overlay o1 3 5)
        (setq o1 (make-overlay 3 5)))
      (overlay-put o1 'face '(:underline "red"))
      (if o2
          (move-overlay o2 3 9)
        (setq o2 (make-overlay 4 9)))
      (overlay-put o2 'face '(:background "#ffff77"))
      (other-window -1)
      )))

(test-me)
;;(delete-overlay o2)




reply via email to

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