Commit 6ed50559 authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

Made sure some markers are unchained after use, should help with

performance somewhat for sessions with very large buffers (although
probably "possibly noticeable" rather than "miraculous").
parent e3e0d587
2005-03-15 Pontus Freyhult <>
* perf.el (fields-new): Dispose of marker when done.
* help.el (lyskom-help-format-p): Dito.
* lyskom-rest.el (lyskom-do-special-inserts): Dito.
(lyskom-insert-before-prompt): Dito.
(lyskom-render-html-region): Dito.
* commands2.el (lyskom-list-new-conferences): Dispose of marker when
we're done with it.
* edit-text.el (lyskom-edit-insert-miscs): Dito.
(kom-edit-add-comment): Dito.
(lyskom-edit-add-recipient/copy): Dito.
(lyskom-edit-insert-aux-item): Added FIXME about marker.
(lyskom-edit-replace-headers): Dispose of markers when done.
2005-03-08 David Byers <>
* compatibility.el (lyskom-encode-coding-string): Renamed
......@@ -3373,7 +3373,8 @@ all conferences from that date forward."
(lyskom-cancel-calls calls)
(signal 'quit nil)))
(when (marker-position (cdr count))
(goto-char (cdr count)))
(goto-char (cdr count))
(set-marker (cdr count) nil))
(cond ((eq 0 (car count))
(lyskom-format-insert 'no-new-conferences
......@@ -258,7 +258,7 @@ nil -> Ingenting."
(set-buffer edit-buffer)
(goto-char where-put-misc)
(set-marker where-put-misc nil)))
(defun lyskom-edit-insert-misc-conf (conf-stat string stream number)
......@@ -1221,7 +1221,8 @@ in the edit buffer."
(blocking-do 'get-text-stat text-no)
(lyskom-get-string 'comment)
insert-at text-no)
(lyskom-error "%s" (lyskom-get-string 'no-such-text-m))))))
(lyskom-error "%s" (lyskom-get-string 'no-such-text-m)))
(set-marker insert-at nil))))
(defun kom-edit-add-recipient ()
......@@ -1359,7 +1360,8 @@ RECPT-TYPE is the type of recipient to add."
(lyskom-edit-do-add-recipient/copy recpt-type
(conf-stat->conf-no conf-stat)
(when win-config (set-window-configuration win-config)))))))
(when win-config (set-window-configuration win-config))))
(set-marker insert-at nil))))
(defun lyskom-edit-sub-recipient/copy (recpt-no edit-buffer)
"Remove the recipient having RECPT-NO from EDIT-BUFFER"
......@@ -1491,6 +1493,7 @@ link as a string."
(concat (lyskom-format
(format "%%#1@%%[%s%%] %%#2s" (lyskom-get-string 'aux-item-prefix))
; FIXME: What happens with marker?
(lyskom-default-button 'aux-edit-menu (cons (current-buffer)
(lyskom-aux-item-call item
......@@ -1616,7 +1619,9 @@ to lyskom-edit-replace-headers"
(lyskom-edit-insert-miscs misc-list subject "" aux-list)
(delete-region start end)
(goto-char end)
(delete-char 1))))
(delete-char 1)
(set-marker start nil)
(set-marker end nil))))
(defun lyskom-looking-at-header (header match-number)
"Check if point is at the beginning of a header of type HEADER.
......@@ -216,4 +216,5 @@
(while (re-search-forward "^\\s-+" nil t)
(replace-match "" nil nil))
(lyskom-fill-region (point-min) (point-max))))
(lyskom-insert "\n\n")))
(lyskom-insert "\n\n")
(set-marker start nil)))
......@@ -1048,7 +1048,8 @@ back, and works even if from has the property."
(error (apply 'message "%S" val)))
(setq start next)
(setq bounds (lyskom-next-property-bounds
(1- start) (point-max) sym))))
(1- start) (point-max) sym)))
(set-marker next nil))
(error (lyskom-ignore var))))
(defun lyskom-do-insert (string)
......@@ -1128,7 +1129,8 @@ The strings buffered are printed before the prompt by lyskom-update-prompt."
(remove-text-properties (point) (+ (point) 1) (text-properties-at (point)))
(lyskom-do-insert string)
(delete-char 1))
(goto-char oldpoint))
(goto-char oldpoint)
(set-marker oldpoint nil))
(let ((window (get-buffer-window (current-buffer))))
(if (and window
(not (pos-visible-in-window-p (point) window)))
......@@ -2207,7 +2209,9 @@ in lyskom-messages."
(while (re-search-forward "<body[^>]*>" end t)
(replace-match "<body>")))))
(funcall fun start end)
(add-text-properties (point-min) (point-max) '(end-closed nil))))
(add-text-properties (point-min) (point-max) '(end-closed nil))
(set-marker start nil)
(set-marker end nil)))
(error (lyskom-ignore var)))))
......@@ -50,7 +50,8 @@
(setq string (substring string (match-end 0))))))
(insert string)
(cons (current-buffer) fields)))
(cons (current-buffer) fields)
(set-marker fields nil)))
(defun fields-replace (fields item string)
Supports Markdown
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