Commit a2376eaf authored by David Byers's avatar David Byers
Browse files

Clean up XEmacs compile. Fix some issues in mship-edit. Fix failure to...

Clean up XEmacs compile. Fix some issues in mship-edit. Fix failure to register all read texts. Fix problem logging in with notice.

Detailed changes:
> 2004-07-15  David Byers  <byers@lysator.liu.se>
>
> 	* startup.el (lyskom-refetch): Prefetch membership *after*
> 	prefetching unread confs. This should let us get started reading
> 	just a little quicker.
>
> 	* prefetch.el (lyskom-prefetch-read-texts-handler): If we get here
> 	and already have a cached membership, then replace its read-texts
> 	field since the membership we have may come from a call where we
> 	didn't ask for read texts.
>
> 2004-07-13  David Byers  <byers@lysator.liu.se>
>
> 	* mship-edit.el (lp--update-buffer): Call lp--remove-from-list
> 	with the correct parameters.
>
> 	Removed obsolete backwards compatibility setting:
> 	* vars.el.in (kom-default-session-priority): Changed default
> 	session priority to zero. By now everyone who used the old
> 	convention of priority zero meaning passive memberships should
> 	have saved their settings at least once, so they'll still have one
> 	as the default. New users shouldn't be burdened (or confused) by
> 	old baggage.
>
> 	Clean up XEmacs compile:
> 	* prefetch.el (lyskom-prefetch-one-item): Eliminate compiler
> 	warnings from XEmacs.
>
> 	* avltree.el (lyskom-elib-avl-enter-balance1): Eliminate compiler
> 	warnings from XEmacs.
>
> 	* utilities.el (lyskom-list-text-summary): Eliminate compiler
> 	warnings from XEmacs.
>
> 	Fix membership cache related bug:
> 	* startup.el (kom-start-anew): Call lyskom-init-membership here
> 	since a valid cache structure may be needed before we get to
> 	lyskom-refetch.
>
> 	Extend status information:
> 	* commands2.el (kom-is-person-member-of-conference): Show
> 	membership priority.
>
parent ba42276d
2004-07-15 David Byers <byers@lysator.liu.se>
* startup.el (lyskom-refetch): Prefetch membership *after*
prefetching unread confs. This should let us get started reading
just a little quicker.
* prefetch.el (lyskom-prefetch-read-texts-handler): If we get here
and already have a cached membership, then replace its read-texts
field since the membership we have may come from a call where we
didn't ask for read texts.
2004-07-13 David Byers <byers@lysator.liu.se>
* mship-edit.el (lp--update-buffer): Call lp--remove-from-list
with the correct parameters.
Removed obsolete backwards compatibility setting:
* vars.el.in (kom-default-session-priority): Changed default
session priority to zero. By now everyone who used the old
convention of priority zero meaning passive memberships should
have saved their settings at least once, so they'll still have one
as the default. New users shouldn't be burdened (or confused) by
old baggage.
Clean up XEmacs compile:
* prefetch.el (lyskom-prefetch-one-item): Eliminate compiler
warnings from XEmacs.
* avltree.el (lyskom-elib-avl-enter-balance1): Eliminate compiler
warnings from XEmacs.
* utilities.el (lyskom-list-text-summary): Eliminate compiler
warnings from XEmacs.
Fix membership cache related bug:
* startup.el (kom-start-anew): Call lyskom-init-membership here
since a valid cache structure may be needed before we get to
lyskom-refetch.
Extend status information:
* commands2.el (kom-is-person-member-of-conference): Show
membership priority.
2004-07-12 David Byers <byers@lysator.liu.se>
Make kom-handle-membership work again:
......
......@@ -325,8 +325,7 @@
(let* ((br (lyskom-elib-node-branch node branch))
p1
p2
b2
result)
b2)
(cond
((< (lyskom-elib-avl-node-balance br) 0)
(lyskom-elib-avl-node-set-balance br 0)
......
......@@ -2450,6 +2450,8 @@ See `kom-keep-alive' for more information."
(lyskom-format-insert 'pers-will-receive-async
(membership-type->message-flag
(membership->type mship)))
(lyskom-format-insert 'pers-mship-priority
(membership->priority mship))
(when kom-deferred-printing
(lyskom-format-insert
'pers-is-member-of-conf-2
......
......@@ -623,7 +623,7 @@ entry priority"
(defun lp--remove-from-list (elem l)
"Destructively emove the element at index ELEM from the list L."
"Destructively remove ELEM from the list L."
(let* ((n (- (length l) (length (memq elem l)))))
(cond ((= 0 n) (cdr l))
((= n (length l)) l)
......@@ -655,11 +655,9 @@ If optional NEW-MSHIP is non-nil, then get the membership again."
(let ((entry (lp--conf-no-entry conf-no))
(mship (lyskom-get-membership conf-no t)))
;; A new membership
(cond
((null entry)
(let* ((pos (lyskom-membership-position mship))
((and (null entry) mship) ; New membership
(let* ((pos (membership->position mship))
(elem (and pos (lp--get-entry pos)))
(entry (lyskom-create-lp--entry
nil
......@@ -687,7 +685,7 @@ If optional NEW-MSHIP is non-nil, then get the membership again."
((null mship)
(when entry
(lp--set-entry-list
(lp--remove-from-list (lp--entry-position entry)
(lp--remove-from-list entry
(lp--all-entries)))
(lp--erase-entry entry)))
......
......@@ -167,7 +167,7 @@ prefetched the prefetch is not done."
,pers-no
,conf-no
t
0
,lyskom-max-int
,conf-no))
(lyskom-continue-prefetch))
......@@ -236,8 +236,7 @@ process is started. Used to keep prefetch going."
(defun lyskom-prefetch-one-item ()
"Get the first element of the prefetch data structure and fetch it.
Return t if an element was prefetched, otherwise return nil."
(let* ((result nil)
(item (lyskom-queue-delete-first lyskom-prefetch-queue)))
(let ((item (lyskom-queue-delete-first lyskom-prefetch-queue)))
(cond ((null item) nil)
((functionp (car item)) (apply (car item) (cdr item)) t)
(t (signal 'lyskom-internal-error
......@@ -310,12 +309,16 @@ Then prefetch all info (texttree) of comments."
(-- lyskom-pending-prefetch)
(lyskom-stop-prefetch)
(when membership
(unless (lyskom-try-get-membership (membership->conf-no membership) t)
(lyskom-add-memberships-to-membership (list membership)))
(when (and (lyskom-visible-membership membership)
(lyskom-prefetch-map (membership->conf-no membership)
membership))))
(lyskom-start-prefetch))
(let ((old-mship (lyskom-try-get-membership
(membership->conf-no membership) t)))
(if old-mship
(set-membership->read-texts old-mship
(membership->read-texts membership))
(lyskom-add-memberships-to-membership (list membership)))
(when (and (lyskom-visible-membership membership)
(lyskom-prefetch-map (membership->conf-no membership)
membership))))
(lyskom-start-prefetch)))
(defun lyskom-prefetch-membership-handler (memberships pers-no)
......
......@@ -643,6 +643,7 @@ shown to other users."
(when login-successful
(clear-all-caches)
(lyskom-init-membership)
(when (lyskom-set-language (lyskom-default-language) 'local)
(unless lyskom-have-one-login
(lyskom-set-language (lyskom-default-language) 'global)
......@@ -716,10 +717,10 @@ This is called at login and after prioritize and set-unread."
(lyskom-reset-prefetch)
(let ((lyskom-inhibit-prefetch t))
(lyskom-prefetch-membership lyskom-pers-no)
(let ((unreads (blocking-do 'get-unread-confs lyskom-pers-no)))
(lyskom-traverse conf-no (nreverse (conf-no-list->conf-nos unreads))
(lyskom-prefetch-one-membership conf-no lyskom-pers-no))))
(lyskom-prefetch-one-membership conf-no lyskom-pers-no)))
(lyskom-prefetch-membership lyskom-pers-no))
(lyskom-start-prefetch)
(condition-case nil
......
......@@ -853,6 +853,7 @@ M
(pers-is-not-member-of-conf . "Nej, %#1P r inte medlem i mtet %#2M.\n")
(pers-is-member-of-conf-2 . "Antal olsta: %#2D (senast inne %#1s)\n")
(pers-will-receive-async . "Tar %#1?b%[%]%[inte %]emot gruppmeddelanden till mtet\n")
(pers-mship-priority . "Medlemskapets prioritet: %#1d\n")
(Unknown-number . "Oknt antal")
(text-to-check-will-read-for . "...fr medlemskap i mottagare till inlgg: ")
(pers-to-check-will-read-for . "Vilken person vill du kontrollera: ")
......
......@@ -2664,7 +2664,7 @@ function returns non-nil."
(cond
((eq text-no 'in) (setq indent (1+ indent)))
((eq text-no 'out) (setq indent (1- indent)))
(t (let (text text-stat mark)
(t (let (mark)
(cond ((lyskom-mark-p text-no)
(setq mark text-no text-no (mark->text-no text-no)))
((numberp text-no)))
......
......@@ -412,6 +412,7 @@ the priority among links that match the same text is undefined."
(kom-filter-text (filter-in-conf))
(kom-change-conf-type (what-conf-to-change))
(kom-change-privileges (what-pers-privs-to-change))
(kom-change-message-flag (set-message-flag-for-conf))
(t (t (default . (lyskom-default-conference-at-point
lyskom-default-conference-current))))
......@@ -3658,7 +3659,7 @@ different packets.")
"Session number in the server for this connection."
local)
(def-kom-var kom-default-session-priority 1
(def-kom-var kom-default-session-priority 0
"**The default session priority.
Tha value of this variable must be an integer. Only texts in
......
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