Commit 88c32856 authored by Linus Tolke Y's avatar Linus Tolke Y
Browse files

Added defaults for add, subtract recipient.

parent f6e96253
Fri Mar 6 16:49:24 1992 Linus Tolke Y (linus@robert)
* commands1.el (kom-add-recipient, kom-add-copy,
kom-sub-recipient, lyskom-add-sub-rcpt,
lyskom-add-sub-recipient, lyskom-add-sub-recipient-2):
vars.el (lyskom-last-added-rcpt, lyskom-last-added-ccrcpt):
Added defaults for subtract, add recipient.
Sat Feb 29 00:37:24 1992 Per Cederqvist (ceder@lysator)
* swedish-strings.el (lyskom-mode-map): Bound
......
......@@ -1753,18 +1753,19 @@ footnotes) to it as read in the server."
the user has used a prefix command argument."
(interactive "P")
(lyskom-start-of-command 'kom-add-recipient)
(lyskom-add-sub-recipient text-no-arg
(lyskom-get-string 'text-to-add-recipient)
t))
(initiate-get-conf-stat 'main 'lyskom-add-sub-rcpt lyskom-last-added-rcpt
text-no-arg
(lyskom-get-string 'text-to-add-recipient)
t))
(defun kom-add-copy (text-no-arg)
"Add a recipient to a text. If the argument TEXT-NO-ARG is non-nil,
the user has used a prefix command argument."
(interactive "P")
(lyskom-start-of-command 'kom-add-copy)
(lyskom-add-sub-recipient text-no-arg
(lyskom-get-string 'text-to-add-copy)
'copy))
(initiate-get-conf-stat 'main 'lyskom-add-sub-rcpt lyskom-last-added-ccrcpt
text-no-arg (lyskom-get-string 'text-to-add-copy)
'copy))
(defun kom-sub-recipient (text-no-arg)
......@@ -1772,18 +1773,27 @@ the user has used a prefix command argument."
the user has used a prefix command argument."
(interactive "P")
(lyskom-start-of-command 'kom-sub-recipient)
(lyskom-add-sub-recipient text-no-arg
(lyskom-get-string 'text-to-delete-recipient)
nil))
(initiate-get-conf-stat 'main 'lyskom-add-sub-rcpt lyskom-current-conf
text-no-arg
(lyskom-get-string 'text-to-delete-recipient)
nil))
(defun lyskom-add-sub-rcpt (conf text-no-arg prompt do-add)
"Second part of the add/subtract recipient. Fixes default."
(if conf ;+++ annan felhantering
(lyskom-add-sub-recipient text-no-arg prompt do-add
(conf-stat->name conf))
(lyskom-add-sub-recipient text-no-arg prompt do-add)))
(defun lyskom-add-sub-recipient (text-no-arg prompt do-add)
(defun lyskom-add-sub-recipient (text-no-arg prompt do-add &optional default)
"Get the number of the text that is to be added or subtracted a recipient
to/from
Arguments: TEXT-NO-ARG: an argument as it is gotten from (interactive P)
PROMPT: A string that is used when prompting for a number.
DO-ADD: NIL if a recipient should be subtracted.
Otherwise a recipient is added"
Otherwise a recipient is added
DEFAULT: The default conference to be prompted for."
(let ((text-no (cond ((null text-no-arg) lyskom-current-text)
(t text-no-arg))))
(setq text-no (lyskom-read-number prompt text-no))
......@@ -1794,7 +1804,7 @@ DO-ADD: NIL if a recipient should be subtracted.
(lyskom-get-string 'who-to-add-copy-q))
(do-add (lyskom-get-string 'who-to-add-q))
(t (lyskom-get-string 'who-to-sub-q)))
nil nil "" text-no do-add)))
nil nil (or default "") text-no do-add)))
(defun lyskom-add-sub-recipient-2 (conf-stat text-no do-add)
......@@ -1810,7 +1820,10 @@ DO-ADD: NIL if a recipient should be subtracted.
'main 'lyskom-handle-command-answer
text-no (conf-stat->conf-no conf-stat) (if (eq do-add 'copy)
'cc-recpt
'recpt)))
'recpt))
(if (eq do-add 'copy)
(setq lyskom-last-added-ccrcpt (conf-stat->conf-no conf-stat))
(setq lyskom-last-added-rcpt (conf-stat->conf-no conf-stat))))
(lyskom-format-insert 'remove-name-as-recipient
(conf-stat->name conf-stat)
text-no)
......
......@@ -222,7 +222,7 @@ Dont change this. These are defined by the protocol.")
;;; Internal variables and constants
(defconst lyskom-clientversion "0.34.3"
(defconst lyskom-clientversion "0.34.4"
"Version of the LysKOM elisp client.")
(defconst lyskom-max-int 8388607
......@@ -422,6 +422,12 @@ This is used by the command kom-busy-wait.")
(defvar lyskom-current-subject ""
"Current subject.")
(defvar lyskom-last-added-rcpt 0
"The default conference when adding a recipient.")
(defvar lyskom-last-added-ccrcpt 0
"The default conference when adding a ccrecipient.")
(defvar lyskom-saved-file-name (concat default-directory "kom-text")
"The default file name when saving a lyskom-text.")
......
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