Commit 8cf072e5 authored by David Byers's avatar David Byers
Browse files

Go over EMPTY and MUSTMATCH parameters to lyskom-read-conf-stat.

Detailed changes:
> 	Go over EMPTY and MUSTMATCH parameters to lyskom-read-conf-stat:
> 	* startup.el (kom-start-anew): Don't allow EMPTY when logging on.
>
> 	* filter.el (kom-filter-subject): Don't use /=. Use not eq
> 	instead.
> 	(kom-filter-author): Same here.
> 	(kom-filter-text): Same here.
>
> 	* commands2.el (kom-create-aux-item): Set MUSTMATCH when readinf
> 	conference name.
>
> 	* vars.el.in (lyskom-default-conference-strategy): Default for
> 	kom-set-permitted-submitters new-permitted-submitters-q is empty.
>
> 	* commands1.el (kom-change-presentation): Don't allow EMPTY when
> 	reading conf name (it means the same as the default initial
> 	value).
> 	(kom-change-conf-motd): Same here.
> 	(kom-set-presentation): Same here.
> 	(kom-set-motd-text): Same here.
> 	(kom-remove-presentation): Same here.
> 	(kom-change-password): Same here.
>
parent f532f010
2003-08-17 David Byers <byers@lysator.liu.se>
Go over EMPTY and MUSTMATCH parameters to lyskom-read-conf-stat:
* startup.el (kom-start-anew): Don't allow EMPTY when logging on.
* filter.el (kom-filter-subject): Don't use /=. Use not eq
instead.
(kom-filter-author): Same here.
(kom-filter-text): Same here.
* commands2.el (kom-create-aux-item): Set MUSTMATCH when readinf
conference name.
* vars.el.in (lyskom-default-conference-strategy): Default for
kom-set-permitted-submitters new-permitted-submitters-q is empty.
* commands1.el (kom-change-presentation): Don't allow EMPTY when
reading conf name (it means the same as the default initial
value).
(kom-change-conf-motd): Same here.
(kom-set-presentation): Same here.
(kom-set-motd-text): Same here.
(kom-remove-presentation): Same here.
(kom-change-password): Same here.
* macros.el (lyskom-with-external-functions): Work even if
byte-compile-unresolved-functions is not bound (e.g. in
check-strings.el and when not compiled).
......
......@@ -1475,9 +1475,7 @@ or conference doesn't have a presentation, a new presentation will
be created."
(interactive)
(lyskom-change-pres-or-motd-2
(let ((no (lyskom-read-conf-no 'what-to-change-pres-you '(all) t nil t)))
(if (zerop no)
(setq no lyskom-pers-no))
(let ((no (lyskom-read-conf-no 'what-to-change-pres-you '(all) nil nil t)))
(blocking-do 'get-conf-stat no))
'pres))
......@@ -1488,9 +1486,7 @@ be created."
or conference doesn't have a notice, a new notice till be created."
(interactive)
(lyskom-change-pres-or-motd-2
(let ((no (lyskom-read-conf-no 'who-to-put-motd-for '(all) t nil t)))
(if (zerop no)
(setq no lyskom-pers-no))
(let ((no (lyskom-read-conf-no 'who-to-put-motd-for '(all) nil nil t)))
(blocking-do 'get-conf-stat no))
'motd))
......@@ -1574,11 +1570,9 @@ TYPE is either 'pres or 'motd, depending on what should be changed."
This command accepts text number prefix arguments (see
`lyskom-read-text-no-prefix-arg')."
(interactive "P")
(let ((conf-no (lyskom-read-conf-no 'what-to-set-pres-you '(all) t nil t))
(let ((conf-no (lyskom-read-conf-no 'what-to-set-pres-you '(all) nil nil t))
(text-no (lyskom-read-text-no-prefix-arg 'what-text-to-set-as-pres-no t
lyskom-previous-text)))
(when (zerop conf-no)
(setq conf-no lyskom-pers-no))
(lyskom-set-pres-or-motd-2
conf-no
text-no
......@@ -1590,16 +1584,11 @@ This command accepts text number prefix arguments (see
This command accepts text number prefix arguments (see
`lyskom-read-text-no-prefix-arg')."
(interactive "P")
(let ((conf-no (lyskom-read-conf-no 'what-to-set-motd-you '(all) t nil t))
(let ((conf-no (lyskom-read-conf-no 'what-to-set-motd-you '(all) nil nil t))
(text-no (lyskom-read-text-no-prefix-arg
'what-text-to-set-as-motd-no t
lyskom-previous-text)))
(when (zerop conf-no)
(setq conf-no lyskom-pers-no))
(lyskom-set-pres-or-motd-2
conf-no
text-no
'motd)))
(lyskom-set-pres-or-motd-2 conf-no text-no 'motd)))
(defun lyskom-set-pres-or-motd-2 (conf-no text-no what)
(let ((set-pres (eq what 'pres)))
......@@ -1636,9 +1625,8 @@ This command accepts text number prefix arguments (see
remove a presentation without adding a new one. This can be accomplished
with the `kom-change-presentation' command."
(interactive)
(let ((conf-stat (or (lyskom-read-conf-stat 'who-to-remove-pres-for
'(all) t nil t)
(blocking-do 'get-conf-stat lyskom-pers-no))))
(let ((conf-stat (lyskom-read-conf-stat 'who-to-remove-pres-for
'(all) nil nil t)))
(cond ((null conf-stat)
(lyskom-insert-string 'cant-get-conf-stat))
((zerop (conf-stat->presentation conf-stat))
......@@ -1659,7 +1647,7 @@ with the `kom-change-presentation' command."
"Removes the notice for a person or conference."
(interactive)
(let ((conf-stat (or (lyskom-read-conf-stat 'who-to-remove-motd-for
'(all) t nil t)
'(all) nil nil t)
(blocking-do 'get-conf-stat lyskom-pers-no))))
(cond
((null conf-stat)
......@@ -2485,7 +2473,7 @@ If MARK-NO is nil, review all marked texts."
person you need either the old password for the person, or have
administrative privileges enabled."
(interactive)
(let ((pers-no (lyskom-read-conf-no 'whos-passwd '(pers) t nil t))
(let ((pers-no (lyskom-read-conf-no 'whos-passwd '(pers) nil nil t))
(old-pw (silent-read (lyskom-get-string 'old-passwd)))
(new-pw1 (silent-read (lyskom-get-string 'new-passwd)))
(new-pw2 (silent-read (lyskom-get-string 'new-passwd-again))))
......@@ -3596,7 +3584,8 @@ This command accepts text number prefix arguments (see
(conf (blocking-do 'get-conf-stat
(lyskom-default-value last-variable)))
(target (lyskom-read-conf-stat who-prompt '(all)
nil (and conf (conf-stat->name conf))
nil
(and conf (conf-stat->name conf))
t)))
(when (and target text-no)
......
......@@ -1508,8 +1508,7 @@ members of the permitted submitters may submit texts to the conference."
(let ((new-conf (lyskom-read-conf-stat
`(new-permitted-submitters-q
,(conf-stat->name conf-stat))
'(all)
t nil t)))
'(all) t nil t)))
(if (eq new-conf nil)
(lyskom-format-insert 'permitted-submitters-removed-for-conf
conf-stat)
......@@ -2920,7 +2919,7 @@ properly in the client."
(object-id (cond ((eq object-type 'server) nil)
((eq object-type 'conference)
(lyskom-read-conf-no 'which-conf-to-add-aux-to
'(pers conf)))
'(pers conf) nil nil t))
((eq object-type 'text)
(lyskom-read-number 'which-text-to-add-aux-to
(if (and lyskom-current-text
......@@ -3248,10 +3247,7 @@ Thie command can only be used if you have administrative rights
to the LysKOM server."
(interactive)
(let* ((conf-stat (lyskom-read-conf-stat 'recommend-which-conf
'(conf)
nil
nil
t))
'(conf) nil nil t))
(priority (and (lyskom-j-or-n-p 'recommend-set-priority-q)
(lyskom-read-num-range 0 255 'priority-q)))
(mship-type (and priority
......@@ -3259,18 +3255,9 @@ to the LysKOM server."
(lyskom-read-membership-type)))
(aux-item (lyskom-create-aux-item
0
29
nil
nil
(lyskom-create-aux-item-flags nil
nil
nil
nil
nil
nil
nil
nil)
0 29 nil nil
(lyskom-create-aux-item-flags nil nil nil nil
nil nil nil nil)
0
(mapconcat 'lyskom-format-object
(delq nil
......
......@@ -343,20 +343,20 @@ Disconnecting from LysKOM since all connections are in use
and you have finished reading. Please come back later.
===============================================================================
\n")
(what-to-change-pres-you . "Change presentation of whom/what (yourself): ")
(what-to-change-pres-you . "Change presentation of whom/what: ")
(what-to-change-faq-you . "Change FAQ for which conference: ")
(who-to-put-motd-for . "Post notice on whom/what (yourself): ")
(who-to-put-motd-for . "Post notice on whom/what: ")
(what-to-set-pres-you . "Set presentation for whom/what (yourself): ")
(what-to-set-pres-you . "Set presentation for whom/what: ")
(what-text-to-set-as-pres-no . "Which text do you want as the new presentation: ")
(what-to-set-motd-you . "Set notice on whom/what (yourself): ")
(what-to-set-motd-you . "Set notice on whom/what: ")
(what-text-to-set-as-motd-no . "Which text do you want as the new notice: ")
(conf-already-has-pres . "The conference/person already has a presentation. Continue anyway? ")
(conf-already-has-motd . "The conference/person already has a notice. Continue anyway? ")
(setting-conf-pres . "Setting presentation of %#1M to text %#2n...")
(setting-conf-motd . "Setting notice for %#1M to text %#2n...")
(who-to-remove-pres-for . "Vilket mte/person vill du ta bort presentationen frn (dig sjlv): ")
(who-to-remove-pres-for . "Vilket mte/person vill du ta bort presentationen frn: ")
(removing-pres-for-conf . "Tar bort presentation (text %#2n) frn %#1M...")
(cant-get-conf-stat . "Cannot get the status of that conference.\n")
......@@ -416,7 +416,7 @@ and you have finished reading. Please come back later.
(new-passwd-again . "Repeat the new password for confirmation: ")
(what-mark-to-unread . "Mark which mark type as unread (name or 0-255, RET for all)? ")
(what-mark-to-view . "Review which mark type (name or 0-255, RET for all)? ")
(whos-passwd . "Change password for whom? (yourself) ")
(whos-passwd . "Change password for whom? ")
(old-passwd . "Your current password: ")
(new-passwd . "The new password: ")
(changing-passwd . "Changing password...")
......
......@@ -455,7 +455,7 @@ An alternative to this is `kom-super-jump'.
To change existing filters, use `kom-filter-edit'."
(interactive)
(when (/= 0 lyskom-current-conf)
(when (not (eq 0 lyskom-current-conf))
(let* (conf perm filter action)
(setq subject (lyskom-read-from-minibuffer
(lyskom-get-string 'filter-subject)
......@@ -463,7 +463,7 @@ To change existing filters, use `kom-filter-edit'."
(setq filter (cons (cons 'subject subject) filter))
(setq conf (lyskom-read-conf-no 'filter-in-conf
'(all) t nil t))
(if (/= conf 0)
(if (not (eq conf 0))
(setq filter (cons (cons 'recipient-no conf) filter)))
(setq action (lyskom-filter-read-action))
(setq perm (lyskom-filter-read-permanent))
......@@ -489,11 +489,11 @@ To change existing filters, use `kom-filter-edit'."
(interactive)
(let (author conf filter action permanent)
(setq author (lyskom-read-conf-no 'filter-author '(pers) t nil t))
(if (/= author 0)
(if (not (eq author 0))
(setq filter (cons (cons 'author-no author) filter)))
(setq conf (lyskom-read-conf-no 'filter-in-conf
'(all) t nil t))
(if (/= conf 0)
(if (not (eq conf 0))
(setq filter (cons (cons 'recipient-no conf) filter)))
(setq action (lyskom-filter-read-action))
(setq permanent (lyskom-filter-read-permanent))
......@@ -622,7 +622,7 @@ single conference.
To change existing filters, use `kom-filter-edit'."
(interactive)
(when (/= 0 lyskom-current-conf)
(when (not (eq 0 lyskom-current-conf))
(let ((conf nil)
(action nil)
(perm nil)
......@@ -632,10 +632,9 @@ To change existing filters, use `kom-filter-edit'."
'filter-which-text)
(or text "")))
(setq filter (cons (cons 'text text) filter))
(setq conf (lyskom-read-conf-no
'filter-in-conf
'(all) t nil t))
(if (/= conf 0)
(setq conf (lyskom-read-conf-no 'filter-in-conf
'(all) t nil t))
(if (not (eq conf 0))
(setq filter (cons (cons 'recipient-no conf) filter)))
(setq action (lyskom-filter-read-action))
(setq perm (lyskom-filter-read-permanent))
......
......@@ -1522,9 +1522,7 @@ All key bindings:
'which-conf)
(t 'which-name)))
(widget-get widget ':lyskom-predicate)
nil
""
t)))
nil "" t)))
(widget-setup))
(defun lyskom-widget-name-value-create (widget)
......
......@@ -542,10 +542,9 @@ shown to other users."
(if new-me
nil
(let ((name nil))
(while (or (null name)
(string= name ""))
(while (or (null name) (string= name ""))
(setq name (lyskom-read-conf-name 'what-is-your-name
'(pers none) t "" t)))
'(pers none) nil nil t)))
(setq new-me
(or (conf-z-info->conf-no
(lyskom-lookup-conf-by-name name '(pers)))
......
......@@ -334,20 +334,20 @@ Kopplar ned fr
du har lst klart allting. Kom tillbaks senare.
===============================================================================
\n")
(what-to-change-pres-you . "Vilket mte/person vill du ndra presentationen fr (dig sjlv): ")
(what-to-change-pres-you . "Vilket mte/person vill du ndra presentationen fr: ")
(what-to-change-faq-you . "Vilket mte vill du ndra FAQ fr: ")
(who-to-put-motd-for . "Vilket mte/person vill du stta lapp p drr fr (dig sjlv): ")
(who-to-put-motd-for . "Vilket mte/person vill du stta lapp p drr fr: ")
(what-to-set-pres-you . "Vilket mte/person vill du stta presentationen fr (dig sjlv): ")
(what-to-set-pres-you . "Vilket mte/person vill du stta presentationen fr: ")
(what-text-to-set-as-pres-no . "Vilket inlgg vill du ska vara den nya presentationen: ")
(what-to-set-motd-you . "Vilket mte/person vill du stta lapp p drr fr (dig sjlv): ")
(what-to-set-motd-you . "Vilket mte/person vill du stta lapp p drr fr: ")
(what-text-to-set-as-motd-no . "Vilket inlgg vill du ska vara den nya lappen: ")
(conf-already-has-pres . "Mtet/personen har redan en presentation. Fortstt nd? ")
(conf-already-has-motd . "Mtet/personen har redan en lapp p drren. Fortstt nd? ")
(setting-conf-pres . "Stter presentation fr %#1M till text %#2n...")
(setting-conf-motd . "Stter lapp p drren fr %#1M till text %#2n...")
(who-to-remove-pres-for . "Vilket mte/person vill du ta bort presentationen frn (dig sjlv): ")
(who-to-remove-pres-for . "Vilket mte/person vill du ta bort presentationen frn: ")
(removing-pres-for-conf . "Tar bort presentation (text %#2n) frn %#1M...")
(cant-get-conf-stat . "Kan ej hmta mtesstatus fr mtet.\n")
......@@ -355,7 +355,7 @@ du har l
(want-become-member . "Vill du bli medlem? ")
(no-ok . "Nehej.\n")
(who-to-remove-motd-for . "Vilket mte/person vill du ta bort lapp p drr fr (dig sjlv): ")
(who-to-remove-motd-for . "Vilket mte/person vill du ta bort lapp p drr fr: ")
(conf-all-read . "inga olsta")
(no-in-conf . "Du r inte nrvarande i ngot mte.\n")
......@@ -407,7 +407,7 @@ du har l
(new-passwd-again . "Mata in det nya lsenordet igen fr kontroll: ")
(what-mark-to-unread . "Olsmarkera vilken markeringstyp (namn eller 0-255, RET fr alla)? ")
(what-mark-to-view . "terse vilken markeringstyp (namn eller 0-255, RET fr alla)? ")
(whos-passwd . "Vem vill du ndra lsenord fr? (dig sjlv) ")
(whos-passwd . "Vem vill du ndra lsenord fr? ")
(old-passwd . "Mata in ditt nuvarande lsenord: ")
(new-passwd . "Mata in det nya lsenordet: ")
(changing-passwd . "ndrar lsenordet...")
......
......@@ -217,11 +217,11 @@ the priority among links that match the same text is undefined."
(default . (lyskom-default-conference-at-point
lyskom-default-conference-self))))
(kom-set-presentation (who-to-set-pres-you
(kom-set-presentation (what-to-set-pres-you
(default . (lyskom-default-conference-at-point
lyskom-default-conference-self))))
(kom-set-motd-text (who-to-set-motd-you
(kom-set-motd-text (what-to-set-motd-you
(default . (lyskom-default-conference-at-point
lyskom-default-conference-self))))
......@@ -297,11 +297,16 @@ the priority among links that match the same text is undefined."
lyskom-default-conference-empty)))
(info-to-conf))
(kom-set-permitted-submitters (conf-to-set-permitted-submitters-q)
(new-permitted-submitters-q
(default . (lyskom-default-conference-empty))))
(lyskom (what-is-your-name
(default . (lyskom-default-conference-empty))))
;; Things I suspect to magical stuff
;; -- lyskom-add-helper
(kom-add-recipient (who-to-add-q))
(kom-add-copy (who-to-add-copy-q))
......@@ -332,8 +337,6 @@ the priority among links that match the same text is undefined."
(kom-status-conf (conf-for-status))
(kom-status-person (pers-for-status))
(kom-set-garb-nice (conf-to-set-garb-nice-q))
(kom-set-permitted-submitters (conf-to-set-permitted-submitters-q)
(new-permitted-submitters-q))
(kom-set-super-conf (conf-to-set-super-conf-q) (new-super-conf-q))
(kom-set-personal-label (label-what-pers) (label-what-conf))
(kom-is-person-member-of-conference (pers-to-check-mship-for) (conf-to-check-mship-of))
......
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