Commit 70354b85 authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

Do not try to handle missing markers in routines to set foreground and

background. Set end-marker before calling lp--format-insert-entry and
correct it afterwards.
parent 0aabb82c
2004-10-28 Pontus Freyhult <pont@soua.net>
* mship-edit.el (lp--entry-set-foreground): Do not try to handle
missing start-marker or end-marker.
(lp--entry-set-background): Dito.
(lp--print-entry): Add end-marker before calling
lp--format-insert-entry and correct it afterwards.
2004-10-27 Pontus Freyhult <pont@soua.net>
* mship-edit.el (lp--erase-entry): Point old markers to nil before
......
......@@ -174,10 +174,10 @@ This function does not tell the server about the change."
(face (or (lyskom-find-face facename) (lyskom-make-face facename t))))
(unless extent
(lyskom-xemacs-or-gnu
(setq extent (make-extent (or (lp--entry->start-marker entry) 0)
(or (lp--entry->end-marker entry) 0)))
(setq extent (make-overlay (or (lp--entry->start-marker entry) 0)
(or (lp--entry->end-marker entry) 0)
(setq extent (make-extent (lp--entry->start-marker entry)
(lp--entry->end-marker entry)))
(setq extent (make-overlay (lp--entry->start-marker entry)
(lp--entry->end-marker entry)
nil t)))
(set-lp--entry->extents entry (cons (cons 'color extent)
(lp--entry->extents entry))))
......@@ -207,10 +207,10 @@ This function does not tell the server about the change."
(face (or (lyskom-find-face facename) (lyskom-make-face facename t))))
(unless extent
(lyskom-xemacs-or-gnu
(setq extent (make-extent (or (lp--entry->start-marker entry) 0)
(or (lp--entry->end-marker entry) 0)))
(setq extent (make-overlay (or (lp--entry->start-marker entry) 0)
(or (lp--entry->end-marker entry) 0)
(setq extent (make-extent (lp--entry->start-marker entry)
(lp--entry->end-marker entry)))
(setq extent (make-overlay (lp--entry->start-marker entry)
(lp--entry->end-marker entry)
nil t)))
(set-lp--entry->extents entry (cons (cons 'fcolor extent)
(lp--entry->extents entry))))
......@@ -404,14 +404,19 @@ The start and end markers of the entry are adjusted"
(if (lp--entry-set-visible entry (lp--entry-compute-visible entry))
(let ((buffer-read-only nil))
(insert-before-markers "\n")
(if (lp--entry->end-marker entry)
(set-marker (lp--entry->end-marker entry) nil))
(set-lp--entry->end-marker entry (point-marker))
(forward-char -1)
(if (lp--entry->start-marker entry)
(set-marker (lp--entry->start-marker entry) nil))
(set-lp--entry->start-marker entry (point-marker))
(lp--format-insert-entry entry)
(if (lp--entry->end-marker entry)
(set-marker (lp--entry->end-marker entry) nil))
(set-lp--entry->end-marker entry (point-marker))
; End marker should be before \n.
(set-marker (lp--entry->end-marker entry)
(1- (lp--entry->end-marker entry)))
(lp--entry-update-extents entry)
(forward-char 1))
(lp--erase-entry entry)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment