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

Återse brev

Bättre hantering av variabler definierade i .emacs
parent e677a098
Sat Oct 11 13:05:26 1997 David Byers <davby@ida.liu.se>
* defvar.el (def-kom-var): Om variabeln redan r definierad s
skall den inte lsas frn user-arean.
* review.el (lyskom-get-texts-by-generic): Flyttade innehllet i
lyskom-get-texts-by hit.
(lyskom-get-texts-by): Anvnd lyskom-get-texts-by-generic.
(lyskom-get-texts-by-to): Vi kan terse brev till ngon annan.
Fri Oct 10 15:47:22 1997 David Byers <davby@sen2.ida.liu.se>
* Kanske release av 0.45.1
Tue Oct 7 12:30:30 1997 David Byers <davby@ida.liu.se>
* parse.el (lyskom-parse-vector): Klara att parsea 0 { }.
......
......@@ -36,7 +36,7 @@
# makefile too!
#
CLIENTVERSION = 0.45.1-beta
CLIENTVERSION = 0.45.1
DOCFILES=NEWS-0.45.1 MIGRATION-0.44-0.45
FTPDIR=/home/davby/www-pub
......
......@@ -41,6 +41,7 @@
;; Just to get rid of a compiler warning
(defvar enable-multibyte-characters)
(defvar kom-dont-read-saved-variables)
(defvar lyskom-local-variables nil
"List of variables to make local in a LysKOM buffer")
......@@ -216,14 +217,20 @@ local-hook A hook variable that is made local in LysKOM buffers."
(t (error "LysKOM: Strange variable argument type: %S"
(car arglist))))
(setq arglist (cdr arglist)))
(` (progn (defvar (, name) (, value) (, doc-string))
(` (progn (dont-compile (if (and (boundp (quote (, name)))
(listp kom-dont-read-saved-variables))
(add-to-list 'kom-dont-read-saved-variables
(quote (, name)))))
(defvar (, name) (, value) (, doc-string))
(,@ (apply 'append
(list inherited
protected
elisp-block
buffer-local
minibuffer
widget-spec)))))))
widget-spec
)))))))
)
(put 'def-kom-var 'edebug-form-spec
......
......@@ -266,12 +266,35 @@ The defaults for this command is the conference that you are in."
(defun lyskom-get-texts-by-to (by to num &optional again)
"Get NUM texts written by person number BY in conference number TO
Args: BY TO NUM"
(cond ((and (zerop by)
(zerop to)) (lyskom-get-texts-globally num again))
((zerop to) (lyskom-get-texts-by by num again))
((zerop by) (lyskom-get-texts-to to num again))
(t (lyskom-get-texts-by-and-to by to num again))))
((and (eq by lyskom-pers-no)
(not (eq to by))
(let ((conf (blocking-do 'get-conf-stat to)))
(and (conf-type->letterbox (conf-stat->conf-type conf))
(null (map->text-nos
(blocking-do 'get-map
(conf-stat->conf-no conf)
(conf-stat->first-local-no conf)
1))))))
(lyskom-get-texts-by-generic
by num
(function
(lambda (x to)
(let ((found nil))
(lyskom-traverse misc (text-stat->misc-info-list x)
(setq found
(or found
(and (or (eq (misc-info->type misc) 'RECPT)
(eq (misc-info->type misc) 'CC-RECPT)
(eq (misc-info->type misc) 'BCC-RECPT))
(eq (misc-info->recipient-no misc) to)))))
found)))
(list to)
again))
(t (lyskom-get-texts-by-and-to by to num again))))
;;; ============================================================
......@@ -625,6 +648,12 @@ Args: persno confno num &optional again pstart cstart"
"Get NUM texts written by PERSNO. Args: persno num"
(let ((persstat (blocking-do 'get-pers-stat persno)))
(lyskom-check-review-access t persstat)
(lyskom-get-texts-by-generic persno num nil nil again pstart)))
(defun lyskom-get-texts-by-generic (persno num pred args
&optional again pstart)
"Get NUM texts written by PERSNO. Args: persno num"
(let ((persstat (blocking-do 'get-pers-stat persno)))
(cond ((and again (null num)) (setq num lyskom-last-review-num))
((and again (< lyskom-last-review-num 0)) (setq num (- num))))
......@@ -676,13 +705,16 @@ Args: persno confno num &optional again pstart cstart"
(lambda (x)
(initiate-get-text-stat 'main
(function
(lambda (x collector)
(if x
(lambda (x collector pred args)
(when (and x
(or (null pred)
(apply pred
x
args)))
(collector-push
(text-stat->text-no x)
collector))))
x
collector)))
x collector pred args)))
data)
(lyskom-wait-queue 'main)
......@@ -709,8 +741,6 @@ Args: persno confno num &optional again pstart cstart"
(nthcdr (- num) result))
(nfirst (- num) result))))))
(defun lyskom-get-texts-to (confno num &optional again cstart)
"From CONFNO get NUM texts."
(let ((confstat (blocking-do 'get-conf-stat confno)))
......@@ -779,6 +809,8 @@ Args: persno confno num &optional again pstart cstart"
(nfirst (- num) result))))))
;;; ============================================================
;;; Återse baklänges
;;;
......
......@@ -78,7 +78,8 @@ Dont change these. These are defined by the protocol.")
(mapcar 'make-local-variable lyskom-local-variables)
(mapcar 'make-local-hook lyskom-local-hooks))
(def-kom-var kom-dont-read-saved-variables '(lyskom-login-hook)
(def-kom-var kom-dont-read-saved-variables '(kom-dont-read-saved-variables
lyskom-login-hook)
"*Non nil means don't read some variables from the server.
t means don't read any variables. A list means don't read variables that
are in the list.")
......@@ -1340,10 +1341,6 @@ will be shown."
(def-kom-var lyskom-buffer-list nil
"List of all LysKOM buffers.")
(def-kom-var lyskom-who-info-cache nil
"Cache of who info."
local)
(def-kom-var lyskom-static-session-info-cache nil
"Cache of session."
local)
......
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