Commit 5efa8242 authored by David Byers's avatar David Byers
Browse files

Review commented in edit buffer rewritten as blocking function so it

can use lyskom-view-text with impunity (it did anyway, and sometimes
crashed and burned as a result.)

Default async message recipient can be the last recipient of a send
async message.
parent 23b2ce8f
1999-11-22 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-modeline-keymap): Go to unread session on
mouse up, not mouse down since mouse up event is bound to bad
things in XEmacs.
* edit-text.el (lyskom-edit-get-commented): Rewrote as blocking.
* option-edit.el (lyskom-custom-variables): Added last-recipient
option to kom-default-message-recipient.
* vars.el.in (lyskom-last-message-recipient): New variable.
* commands2.el (kom-send-message): Added last-recipient option to
kom-default-message-recipients..
1999-11-21 David Byers <davby@ida.liu.se>
* edit-text.el (lyskom-edit-insert-miscs): Use lyskom-princ to
......
......@@ -513,36 +513,44 @@ otherwise: the conference is read with lyskom-completing-read."
(def-kom-command kom-send-message (&optional who message)
"Send a message to one of the users in KOM right now."
(interactive)
(let ((target (or who
(lyskom-read-conf-no
(format (lyskom-get-string 'who-to-send-message-to)
(lyskom-get-string 'nobody))
(if kom-permissive-completion
'(all)
'(login conf))
;; Initial string:
t
(cond
((eq kom-default-message-recipient 'everybody) nil)
((and (eq kom-default-message-recipient 'group)
lyskom-last-group-message-recipient)
(cons lyskom-last-group-message-recipient 0))
((or (and (eq kom-default-message-recipient 'group)
(null lyskom-last-group-message-recipient))
(and (eq kom-default-message-recipient 'sender)
lyskom-last-personal-message-sender))
(cons lyskom-last-personal-message-sender 0))
(t
(if lyskom-last-personal-message-sender
(cons lyskom-last-personal-message-sender 0)
"")))
t))))
(let* ((tmp nil)
(target (or who
(lyskom-read-conf-no
(format (lyskom-get-string 'who-to-send-message-to)
(lyskom-get-string 'nobody))
(if kom-permissive-completion
'(all)
'(login conf))
;; Initial string:
t
(cond
((eq kom-default-message-recipient 'everybody) nil)
((and (eq kom-default-message-recipient 'group)
lyskom-last-group-message-recipient)
(cons lyskom-last-group-message-recipient 0))
((or (and (eq kom-default-message-recipient 'group)
(null lyskom-last-group-message-recipient))
(and (eq kom-default-message-recipient 'sender)
lyskom-last-personal-message-sender))
(cons lyskom-last-personal-message-sender 0))
((and (eq kom-default-message-recipient 'last-recipient)
lyskom-last-message-recipient
(not (eq 0 lyskom-last-message-recipient))
(setq tmp (blocking-do 'get-uconf-stat lyskom-last-message-recipient)))
(cons (conf-stat->name tmp) 0))
(t
(if lyskom-last-personal-message-sender
(cons lyskom-last-personal-message-sender 0)
"")))
t))))
(if (zerop target)
(lyskom-format-insert 'message-use-alarm-instead
(lyskom-command-name 'kom-send-alarm))
(setq lyskom-last-message-recipient target)
(lyskom-format-insert 'message-recipient-info target)
(lyskom-send-message target message))))
......
......@@ -1059,11 +1059,10 @@ Cannot be called from a callback."
(no
(goto-char p)
(set-buffer lyskom-buffer)
(lyskom-collect 'edit)
(initiate-get-text 'edit thendo no)
(initiate-get-text-stat 'edit nil no)
(lyskom-use 'edit thendo buffer window)
(set-buffer buffer))
(blocking-do-multiple ((text (get-text no))
(text-stat (get-text-stat no)))
(set-buffer buffer)
(funcall thendo text text-stat buffer window)))
(t
(lyskom-message "%s" (lyskom-get-string 'no-such-text-m))))))
(sit-for 0)))
......
......@@ -2118,9 +2118,10 @@ Select whether to execute command or keyboard macro.")
(discard-messages . "Nowhere - discard them")
(in-named-buffer . "In a named buffer ")
(everybody-rcpt . "Everybody ")
(group-rcpt . "The recipient of the last group message")
(sender-rcpt . "The sender of the most recent message ")
(everybody-rcpt . "Everybody ")
(group-rcpt . "The recipient of the last group message ")
(sender-rcpt . "The sender of the most recent message ")
(last-recipient-recpt . "The last person I send a message to")
(viewer-program . "Web browser")
(no-viewer . "(ingenting valt)")
......
......@@ -3353,7 +3353,7 @@ One parameter - the prompt string."
(if lyskom-modeline-keymap
nil
(setq lyskom-modeline-keymap (make-sparse-keymap))
(define-key lyskom-modeline-keymap (kbd (lyskom-keys 'button2)) 'kom-modeline-next-unread-kom)
(define-key lyskom-modeline-keymap (kbd (lyskom-keys 'button2up)) 'kom-modeline-next-unread-kom)
(define-key lyskom-modeline-keymap (kbd (lyskom-keys 'button3)) 'kom-modeline-select-unread-kom))
......
......@@ -552,7 +552,8 @@ customize buffer but do not save them to the server."
(kom-default-message-recipient
(choice ((const (everybody-rcpt everybody))
(const (group-rcpt group))
(const (sender-rcpt sender)))))
(const (sender-rcpt sender))
(const (last-recipient-recpt last-recipient)))))
(lyskom-filter-outgoing-messages (noggle (yes no)))
(kom-friends (repeat (person nil :tag name) :indent 4))
(kom-url-viewer-preferences (repeat (url-viewer nil :tag viewer-program)
......
......@@ -2169,9 +2169,10 @@ Du m
(discard-messages . "Ingenstans ")
(in-named-buffer . "I namngiven buffert")
(everybody-rcpt . "Alla")
(group-rcpt . "Senaste gruppmeddelandes mottagare")
(sender-rcpt . "Senaste meddelandes avsndare")
(everybody-rcpt . "Alla ")
(group-rcpt . "Senaste gruppmeddelandes mottagare")
(sender-rcpt . "Senaste meddelandes avsndare ")
(last-recipient-recpt . "Senaste mottagaren ")
(viewer-program . "WWW-lsare")
(no-viewer . "(ingenting valt)")
......
......@@ -1782,6 +1782,10 @@ an unknown person.")
"Name of target for last group message received"
local)
(def-kom-var lyskom-last-message-recipient nil
"Number of last async message recipient sent to."
local)
(def-kom-var lyskom-is-new-user nil
"An internal variable used in kom-start-anew")
......
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