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

Require confirmation to add full recipients

parent 531a001c
2000-01-06 David Byers <davby@ida.liu.se>
* lyskom-rest.el (j-or-n-p): Output the answer in the minibuffer
like y-or-n-p in XEmacs (and probably Emacs) does.
* swedish-strings.el (lyskom-message): Added yes-string and
no-string.
* services.el (blocking-do-multiple): Added edebug-form-spec for
blocking-do-multiple.
* commands1.el (lyskom-add-sub-recipient): Confirm adding as full
recipient.
* edit-text.el (lyskom-edit-add-recipient/copy): Removed duplicate
calls to lyskom-edit-do-add-recipient/copy. Confirm adding as full
recipient.
1999-12-29 David Byers <davby@ida.liu.se>
* commands1.el (lyskom-add-sub-recipient): Point at start of
minibuffer when reading target conference.
1999-12-13 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-recursive-prompt-update): New variable.
......
......@@ -2990,7 +2990,7 @@ actual text to do whatever on."
(lyskom-get-string 'who-to-move-from-q)
'(all)
nil
(if conf2 (conf-stat->name conf2) "")
(cons (if conf2 (conf-stat->name conf2) "") 0)
t)))
(conf-to-add-to (lyskom-read-conf-stat
......@@ -3003,9 +3003,17 @@ actual text to do whatever on."
(t (lyskom-error "internal error"))))
'(all)
nil
(if conf (conf-stat->name conf) "")
(cons (if conf (conf-stat->name conf) "") 0)
t))
(result nil))
;; Confirm add a full recipient
(when (and (eq action 'add-rcpt)
conf-to-add-to
(not (lyskom-j-or-n-p (lyskom-format 'really-add-as-recpt-q conf-to-add-to) t)))
(setq action 'add-copy))
(setq result
(cond ((eq action 'add-rcpt)
(lyskom-format-insert 'adding-name-as-recipient
......
......@@ -1212,44 +1212,44 @@ RECPT-TYPE is the type of recipient to add."
(set-buffer lyskom-buffer)
;; +++ The information about msg-of-day might be old. We should
;; make sure it is up-to-date.
(let ((text-no (conf-stat->msg-of-day conf-stat)))
(if (zerop text-no)
;; If we have no notice on the recipient, just go ahead
(if what-to-do
(funcall what-to-do conf-stat insert-at edit-buffer)
(lyskom-edit-do-add-recipient/copy recpt-type
(conf-stat->conf-no conf-stat)
edit-buffer))
;; Otherwise, show the notive and keep on going
(blocking-do-multiple ((text (get-text text-no))
(text-stat (get-text-stat text-no)))
(if (and text (get-buffer-window edit-buffer))
(let ((win-config (current-window-configuration)))
;;(set-buffer buffer)
(with-output-to-temp-buffer "*Motd*"
(lyskom-princ
(lyskom-format 'conf-has-motd-no
(text->text-no text)
(text->decoded-text-mass text
text-stat))))
(and (j-or-n-p (lyskom-get-string 'still-want-to-add))
(if what-to-do
(funcall what-to-do conf-stat insert-at edit-buffer)
(lyskom-edit-do-add-recipient/copy recpt-type
(conf-stat->conf-no conf-stat)
edit-buffer)))
(set-window-configuration win-config))
(if what-to-do
(funcall what-to-do conf-stat insert-at edit-buffer)
(lyskom-edit-do-add-recipient/copy recpt-type
(conf-stat->conf-no conf-stat)
edit-buffer))))))))))
(let ((text-no (conf-stat->msg-of-day conf-stat))
(win-config nil)
(text nil)
(text-stat nil)
(collector (make-collector)))
(unless (zerop text-no)
(initiate-get-text 'edit 'collector-push text-no collector)
(initiate-get-text-stat 'edit 'collector-push text-no collector)
(lyskom-wait-queue 'edit)
(setq text-stat (elt (collector->value collector) 0))
(setq text (elt (collector->value collector) 1)))
(when (or (null text)
(null text-stat)
(null (get-buffer-window edit-buffer))
(progn (setq win-config (current-window-configuration))
(with-output-to-temp-buffer "*Motd*"
(lyskom-princ
(lyskom-format 'conf-has-motd-no
(text->text-no text)
(text->decoded-text-mass text
text-stat))))
(j-or-n-p (lyskom-get-string 'still-want-to-add))))
(when (and (eq recpt-type 'recpt)
(not (lyskom-j-or-n-p (lyskom-format
'really-add-as-recpt-q
conf-stat) t)))
(setq recpt-type 'cc-recpt))
(when what-to-do
(funcall what-to-do conf-stat insert-at edit-buffer))
(lyskom-edit-do-add-recipient/copy recpt-type
(conf-stat->conf-no conf-stat)
edit-buffer))
(when win-config (set-window-configuration win-config)))))))
(defun kom-edit-add-cross-reference ()
(interactive)
......
......@@ -3035,6 +3035,12 @@ lyskom-get-string to retrieve regexps for answer and string for repeated query."
t)))
quittable)
(signal 'quit nil))
(lyskom-message "%s" (concat prompt
(lyskom-get-string 'j-or-n)
(if (char-in-string input-char (lyskom-get-string 'y-instring))
(lyskom-get-string 'yes-string)
(lyskom-get-string 'no-string))))
(char-in-string input-char (lyskom-get-string 'y-instring))))
......
......@@ -1376,6 +1376,8 @@ or get-text-stat."
(setq lyskom-multiple-blocking-return data
lyskom-ok-to-send-new-calls nil))
(put 'blocking-do-multiple 'edebug-form-spec '(sexp body))
(eval-and-compile (provide 'lyskom-services))
......
......@@ -426,6 +426,7 @@ i svensk datorhistoria. L
(who-to-add-q . "Vilket mte/person vill du addera som mottagare? ")
(who-to-add-copy-q . "Vilket mte/person vill du addera som kopiemottagare? ")
(who-to-add-bcc-q . "Vilket mte/person vill du addera som mottagare fr knnedom? ")
(really-add-as-recpt-q . "Skall framtida kommentarer till inlgget ocks hamna i %#1M? ")
(who-to-sub-q . "Vilket mte/person vill du subtrahera som mottagare? ")
(who-to-move-from-q . "Frn vilket mte vill du flytta texten? ")
(who-to-move-to-q . "Vart vill du flytta texten? ")
......@@ -1027,6 +1028,8 @@ Du b
(yes-regexp . "\\`[jJ][aA]\\'")
(no-regexp . "\\`[nN][eE][jJ]\\'")
(yes-string . "Ja")
(no-string . "Nej")
(yes-or-no-nag . "Svara bara ja eller nej.")
(yes-or-no . "(ja eller nej) ")
......
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