Commit 7eb72ac8 authored by David Byers's avatar David Byers
Browse files

Minor changes based on code inspection.

Use def-kom-command when possible, made some code more robust,
Added utilities file and moved certain functions there.
Removed lots of emacs 18 compatibility. This type of code will have to go into
special compatibility files later on.
Got rid of all the compiler warnings I could.
Other minor changes (see ChangeLog)
parent aad9ec8c
Tue Apr 2 15:15:11 1996 David Byers <davby@sen2.ida.liu.se>
* Blev av med alla kompilatorvarningar genom att ta bort
kompatibilitetskod fr Emacs 18 och Lucid Emacs.
* lyskom-rest: Tog bort kompatibilitetskod i kom-initial-digit-view.
* prioritize.el: Tog bort referenser till kom-buffer.
* macros.el: Lade till kompatibilitetsbindning av frame-width.
* flags.el: Lade till dummydefinition av original-user-variable-p s
en kompilatorvarning frsvann.
* utilities.el: Lade till regexpp.
* filter.el: Dokumenterade lyskom-filter-hack. Anvnd
lyskom-apo-timeous-s och lyskom-apo-timeout-ms i lyskom-filter-text-p.
Skydda anrop till filterfunktionerne i lyskom-check-filter-list med
condition-case fr att undvika otrevligheter. Fixade bug i kompilering
av tomma filter. Flyttade regexpp till utilities.el. Anvnd
def-kom-command till anvndarkommandon.
* completing-read.el: Lade till hantering af typen conflogin fr alla
inloggade personer eller mten. Tog bort emacs 18-kompatibilitet i
anrop till completing-read.
* edit-text.el: lyskom-edit-text anropar inte lngre
lyskom-end-of-command. Tog bort Emacs 18.55-kompatibilitet frn anrop
till processs-kill-without-query. Tog bort variabeln kom-buffer. Tog
bort kompatibilitet med Emacs 18 och Lucid emacs frn
kom-edit-insert-digit-text. Anropar alltid lyskom-send-transform-text
nr texter skickas in. Infrde kom-cite-string som i stllet fr ">"
framfr kommentarer. Flyttade sit-for i lyskom-edit-get-commented fr
att f bort momentana markrfrflyttningar vid insttning av
kommenterad text.
* commands1.el: Gjorde om alla kommentarfunktioner med def-kom-command
och tog bort explicita lyskom-end-of-command.
* commands2.el: Tog bort lite kompatibilitet med Emacs 18. Anvnd
lyskom-beep fr att pipa nr vnta avslutas.
(kom-set-session-priority): Anvnd lyskom-read-num-range. Skrev om
referenser till debugger-old-buffer fr att slippa
kompileringsvarningar.
Mon Apr 1 14:57:53 1996 David Byers <davby@sen2.ida.liu.se>
* commands1.el: Prioritet stts mellan 1 och 255, aldrig till noll.
Man blir inte lngree erbjuden att skriva presentation till hemliga
mten. Fixade ngra formatstrngar. Anvnde def-kom-command p ngra
fler stllen.
* english-strings.el: Nya appreciation och abuse strngar (frn
misc/F}-uppmuntran).
* cache.el: Ersatte anrop till eval med anrop till symbol-value.
* internal.el (lyskom-check-call): Skydda anrop till kom-queue-resume
med unwind-protect.
* lyskom-rest.el (lyskom-insert-before-prompt): Flytta inte point vid
insert. Det r *irriterande*. lyskom-modify-prompt: Lade in antal
inspelade meddelanden i prompten (om man har ngra).
* utilities.el, filter-edit.el, macros.el, filter.el: Flyttade ngra
funktioner till utilities.el.
* Anrop till lyskom-message har nu en korrekt formatstrng som frsta
argument.
* lyskom-rest.el (lyskom-print-prompt): Stt lyskom-is-waiting till
nil om man inte r vid sista prompten. lyskom-is-waiting mste vara
nil om asynkrona texter skall sparas och inte skrivas ut.
Fri Mar 29 03:26:34 1996 David Kgedal <davidk@lysator.liu.se> Fri Mar 29 03:26:34 1996 David Kgedal <davidk@lysator.liu.se>
* review.el (lyskom-review-comments,kom-review-comments): Skrev om * review.el (lyskom-review-comments,kom-review-comments): Skrev om
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
# $Id$ # $Id$
# #
CLIENTVERSION = 0.40.1 CLIENTVERSION = 0.41-beta
GENERIC-CLEAN = *~ *.o core GENERIC-CLEAN = *~ *.o core
GENERIC-DIST-CLEAN = TAGS GENERIC-DIST-CLEAN = TAGS
...@@ -37,7 +37,7 @@ EMACS=emacs ...@@ -37,7 +37,7 @@ EMACS=emacs
EMACS-BATCH = $(EMACS) -batch EMACS-BATCH = $(EMACS) -batch
# NOTE: lyskom-rest.el must be the last file in PARTS-EL and SRC-ELC. # NOTE: lyskom-rest.el must be the last file in PARTS-EL and SRC-ELC.
PARTS-EL = komtypes.el clienttypes.el startup.el \ PARTS-EL = komtypes.el clienttypes.el utilities.el startup.el \
reading.el \ reading.el \
internal.el parse.el services.el cache.el\ internal.el parse.el services.el cache.el\
commands1.el commands2.el review.el edit-text.el \ commands1.el commands2.el review.el edit-text.el \
...@@ -52,7 +52,7 @@ SWEDISH-EL = swedish-strings.el ...@@ -52,7 +52,7 @@ SWEDISH-EL = swedish-strings.el
SWEDISH-ELC = swedish-strings.elc SWEDISH-ELC = swedish-strings.elc
ENGLISH-EL = english-strings.el ENGLISH-EL = english-strings.el
ENGLISH-ELC = english-strings.elc ENGLISH-ELC = english-strings.elc
SRC-ELC = komtypes.elc clienttypes.elc startup.elc \ SRC-ELC = komtypes.elc clienttypes.elc utilities.elc startup.elc \
reading.elc \ reading.elc \
internal.elc parse.elc services.elc cache.elc\ internal.elc parse.elc services.elc cache.elc\
commands1.elc commands2.elc review.elc edit-text.elc \ commands1.elc commands2.elc review.elc edit-text.elc \
...@@ -88,6 +88,16 @@ lyskom.el: $(HEADER-EL) $(SWEDISH-EL) $(PARTS-EL) ...@@ -88,6 +88,16 @@ lyskom.el: $(HEADER-EL) $(SWEDISH-EL) $(PARTS-EL)
lyskom.elc: lyskom.el lyskom.elc: lyskom.el
$(EMACS-BATCH) -f batch-byte-compile lyskom.el $(EMACS-BATCH) -f batch-byte-compile lyskom.el
# Only testing
.PHONY: verbose
verbose: $(HEADER-EL) $(SWEDISH-EL) $(PARTS-EL)
@echo "Building lyskom.el"
@echo "" > lyskom.el
@for i in $(HEADER-EL) $(SWEDISH-EL) $(PARTS-EL) ; do \
echo '(eval-when-compile (message "Compiling %s" "'$$i'"))' >> lyskom.el ;\
cat $$i >> lyskom.el ; \
done
# For fast compiling # For fast compiling
.PHONY: fast .PHONY: fast
fast: $(HEADER-ELC) $(SWEDISH-ELC) $(PARTS-ELC) fast: $(HEADER-ELC) $(SWEDISH-ELC) $(PARTS-ELC)
......
...@@ -36,14 +36,6 @@ ...@@ -36,14 +36,6 @@
(concat lyskom-clientversion-long (concat lyskom-clientversion-long
"$Id$\n")) "$Id$\n"))
(defvar lyskom-ansaphone-messages nil
"Messages collected by the automatic reply facility.
The most recent message is the first message in the list.")
(defvar lyskom-ansaphone-when-set (current-time-string)
"Time when the auto-reply facility was enabled.")
(defconst lyskom-ansaphone-tag "Auto-reply:\n") (defconst lyskom-ansaphone-tag "Auto-reply:\n")
...@@ -100,7 +92,7 @@ The most recent message is the first message in the list.") ...@@ -100,7 +92,7 @@ The most recent message is the first message in the list.")
(def-kom-command kom-erase-messages () (def-kom-command kom-erase-messages ()
"Erase collected messages" "Erase collected messages"
(interactive) (interactive)
(lyskom-message (lyskom-get-string 'ansaphone-messages-gone)) (lyskom-message "%s" (lyskom-get-string 'ansaphone-messages-gone))
(setq lyskom-ansaphone-messages nil)) (setq lyskom-ansaphone-messages nil))
......
...@@ -324,7 +324,7 @@ Non-nil NOBEEP means don't beep." ...@@ -324,7 +324,7 @@ Non-nil NOBEEP means don't beep."
; messages. Should it be? ; messages. Should it be?
; /davidk ; /davidk
(eq recipient 0)) ; Public message (eq recipient 0)) ; Public message
(lyskom-beep (if (not nobeep) kom-ding-on-common-messages 0)) (if (not nobeep) (lyskom-beep kom-ding-on-common-messages))
(lyskom-format 'message-broadcast (lyskom-format 'message-broadcast
(cond (cond
((stringp sender) sender) ((stringp sender) sender)
...@@ -333,7 +333,7 @@ Non-nil NOBEEP means don't beep." ...@@ -333,7 +333,7 @@ Non-nil NOBEEP means don't beep."
message message
when)) when))
((= (conf-stat->conf-no recipient) lyskom-pers-no) ; Private ((= (conf-stat->conf-no recipient) lyskom-pers-no) ; Private
(lyskom-beep (if (not nobeep) kom-ding-on-personal-messages 0)) (if (not nobeep) (lyskom-beep kom-ding-on-personal-messages))
(lyskom-format 'message-from (lyskom-format 'message-from
(cond (cond
((stringp sender) sender) ((stringp sender) sender)
...@@ -342,7 +342,7 @@ Non-nil NOBEEP means don't beep." ...@@ -342,7 +342,7 @@ Non-nil NOBEEP means don't beep."
message message
when)) when))
(t ; Group message (t ; Group message
(lyskom-beep (if (not nobeep) kom-ding-on-group-messages 0)) (if (not nobeep) (lyskom-beep kom-ding-on-group-messages))
(lyskom-format 'message-from-to (lyskom-format 'message-from-to
message message
(cond (cond
...@@ -375,7 +375,7 @@ converted, before insertion." ...@@ -375,7 +375,7 @@ converted, before insertion."
(t (t
(set-buffer (get-buffer-create kom-show-personal-messages-in-buffer)) (set-buffer (get-buffer-create kom-show-personal-messages-in-buffer))
(goto-char (point-max)) (goto-char (point-max))
(insert (if kom-emacs-knows-iso-8859-1 (lyskom-insert (if kom-emacs-knows-iso-8859-1
string string
(iso-8859-1-to-swascii string))))) (iso-8859-1-to-swascii string)))))
(if kom-pop-personal-messages (if kom-pop-personal-messages
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
;;;; ;;;;
;;;; ;;;;
(setq lyskom-clientversion-long (setq lyskom-clientversion-long
(concat lyskom-clientversion-long (concat lyskom-clientversion-long
"$Id$\n")) "$Id$\n"))
...@@ -351,15 +350,15 @@ Args: KEY DATA CACHE. ...@@ -351,15 +350,15 @@ Args: KEY DATA CACHE.
CACHE is a (the only one) quoted variable pointing to the cache (an alist). CACHE is a (the only one) quoted variable pointing to the cache (an alist).
The variable might be changed." The variable might be changed."
(cond (cond
((null (eval __cache__)) ((null (symbol-value __cache__))
(set __cache__ (list (cons __key__ __data__)))) (set __cache__ (list (cons __key__ __data__))))
(t (let ((oldval (assoc __key__ (eval __cache__)))) (t (let ((oldval (assoc __key__ (symbol-value __cache__))))
(cond (cond
((null oldval) ((null oldval)
(set __cache__ (set __cache__
(cons (cons __key__ __data__) (cons (cons __key__ __data__)
(eval __cache__)))) (symbol-value __cache__))))
(t (t
(setcdr oldval __data__))))))) (setcdr oldval __data__)))))))
...@@ -367,7 +366,7 @@ The variable might be changed." ...@@ -367,7 +366,7 @@ The variable might be changed."
(defun cache-del (__key__ __cache__) (defun cache-del (__key__ __cache__)
"Delete item with key KEY from CACHE. "Delete item with key KEY from CACHE.
CACHE is the name of the variable that points to the cache." CACHE is the name of the variable that points to the cache."
(let ((oldval (assoc __key__ (eval __cache__)))) (let ((oldval (assoc __key__ (symbol-value __cache__))))
(if oldval (if oldval
(setcdr oldval nil)))) ;A pair (key . nil) will remain. (setcdr oldval nil)))) ;A pair (key . nil) will remain.
;Fix this bug someday. +++ ;Fix this bug someday. +++
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
;;;; Authors: Linus Tolke and Inge Wallin ;;;; Authors: Linus Tolke and Inge Wallin
;;;; ;;;;
(setq lyskom-clientversion-long (setq lyskom-clientversion-long
(concat lyskom-clientversion-long (concat lyskom-clientversion-long
"$Id$\n")) "$Id$\n"))
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
;;;; This file contains the code for some of the high level commands. ;;;; This file contains the code for some of the high level commands.
;;;; ;;;;
(setq lyskom-clientversion-long (setq lyskom-clientversion-long
(concat lyskom-clientversion-long (concat lyskom-clientversion-long
"$Id$\n")) "$Id$\n"))
...@@ -96,10 +95,9 @@ ...@@ -96,10 +95,9 @@
;;; Author: Inge Wallin ;;; Author: Inge Wallin
(defun kom-delete-text (text-no-arg) (def-kom-command kom-delete-text (text-no-arg)
"Delete a text. Argument: TEXT-NO" "Delete a text. Argument: TEXT-NO"
(interactive "P") (interactive "P")
(lyskom-start-of-command 'kom-delete-text)
(let ((text-no (cond ((null text-no-arg) 0) (let ((text-no (cond ((null text-no-arg) 0)
((integerp text-no-arg) text-no-arg) ((integerp text-no-arg) text-no-arg)
((listp text-no-arg) (car text-no-arg)) ((listp text-no-arg) (car text-no-arg))
...@@ -109,7 +107,7 @@ ...@@ -109,7 +107,7 @@
(lyskom-read-number (lyskom-get-string 'what-text-to-delete) (lyskom-read-number (lyskom-get-string 'what-text-to-delete)
lyskom-current-text))) lyskom-current-text)))
(lyskom-format-insert 'deleting-text text-no) (lyskom-format-insert 'deleting-text text-no)
(lyskom-handle-command-answer (blocking-do 'delete-text text-no)))) (lyskom-report-command-answer (blocking-do 'delete-text text-no))))
;;; ================================================================ ;;; ================================================================
...@@ -213,12 +211,11 @@ as TYPE. If no such misc-info, return NIL" ...@@ -213,12 +211,11 @@ as TYPE. If no such misc-info, return NIL"
;;; Author: Inge Wallin ;;; Author: Inge Wallin
;;; Rewritten using read-conf-no by Linus Tolke (4=>1) ;;; Rewritten using read-conf-no by Linus Tolke (4=>1)
(defun kom-send-letter (&optional pers-no) (def-kom-command kom-send-letter (&optional pers-no)
"Send a personal letter to a person or a conference." "Send a personal letter to a person or a conference."
(interactive) (interactive)
(condition-case error (condition-case error
(progn (progn
(lyskom-start-of-command 'kom-send-letter)
(lyskom-tell-internat 'kom-tell-write-letter) (lyskom-tell-internat 'kom-tell-write-letter)
(let* ((tono (or pers-no (let* ((tono (or pers-no
(lyskom-read-conf-no (lyskom-read-conf-no
...@@ -234,7 +231,6 @@ as TYPE. If no such misc-info, return NIL" ...@@ -234,7 +231,6 @@ as TYPE. If no such misc-info, return NIL"
(lyskom-view-text (conf-stat->msg-of-day conf-stat)) (lyskom-view-text (conf-stat->msg-of-day conf-stat))
(if (lyskom-j-or-n-p (lyskom-get-string 'motd-persist-q)) (if (lyskom-j-or-n-p (lyskom-get-string 'motd-persist-q))
t t
(lyskom-end-of-command)
nil))) nil)))
(if (= tono lyskom-pers-no) (if (= tono lyskom-pers-no)
(lyskom-edit-text lyskom-proc (lyskom-edit-text lyskom-proc
...@@ -244,8 +240,7 @@ as TYPE. If no such misc-info, return NIL" ...@@ -244,8 +240,7 @@ as TYPE. If no such misc-info, return NIL"
(lyskom-create-misc-list 'recpt tono (lyskom-create-misc-list 'recpt tono
'recpt lyskom-pers-no) 'recpt lyskom-pers-no)
"" ""))))) "" "")))))
(quit (lyskom-end-of-command) (quit (signal 'quit "Quitting in letter"))))
(signal 'quit "Quitting in letter"))))
;;; ================================================================ ;;; ================================================================
...@@ -322,10 +317,10 @@ Returns t if it was possible, otherwise nil." ...@@ -322,10 +317,10 @@ Returns t if it was possible, otherwise nil."
100 ; When adding someone else 100 ; When adding someone else
(if (and (numberp kom-membership-default-priority) (if (and (numberp kom-membership-default-priority)
(< kom-membership-default-priority 256) (< kom-membership-default-priority 256)
(>= kom-membership-default-priority 0)) (> kom-membership-default-priority 0))
kom-membership-default-priority kom-membership-default-priority
(lyskom-read-num-range (lyskom-read-num-range
0 255 (lyskom-get-string 'priority-q))))) 1 255 (lyskom-get-string 'priority-q)))))
(where (where
(if (/= lyskom-pers-no (conf-stat->conf-no pers-conf-stat)) (if (/= lyskom-pers-no (conf-stat->conf-no pers-conf-stat))
1 ; When adding someone else 1 ; When adding someone else
...@@ -558,12 +553,16 @@ Add the person creating and execute lyskom-end-of-command." ...@@ -558,12 +553,16 @@ Add the person creating and execute lyskom-end-of-command."
"Starts editing a presentation for the newly created conference. "Starts editing a presentation for the newly created conference.
This does lyskom-end-of-command" This does lyskom-end-of-command"
(lyskom-tell-internat 'kom-tell-conf-pres) (lyskom-tell-internat 'kom-tell-conf-pres)
(let ((conf (blocking-do 'get-conf-stat conf-no)))
(if (and conf
(not (conf-type->secret (conf-stat->conf-type conf))))
(lyskom-dispatch-edit-text lyskom-proc (lyskom-dispatch-edit-text lyskom-proc
(lyskom-create-misc-list (lyskom-create-misc-list
'recpt 'recpt
(server-info->conf-pres-conf lyskom-server-info)) (server-info->conf-pres-conf
lyskom-server-info))
conf-name "" conf-name ""
'lyskom-set-presentation conf-no)) 'lyskom-set-presentation conf-no))))
(defun lyskom-set-presentation (text-no conf-no) (defun lyskom-set-presentation (text-no conf-no)
...@@ -609,17 +608,18 @@ If optional arg TEXT-NO is present write a comment to that text instead." ...@@ -609,17 +608,18 @@ If optional arg TEXT-NO is present write a comment to that text instead."
(if text-no (if text-no
(format " (%d)" text-no) (format " (%d)" text-no)
""))) "")))
(unwind-protect
(if text-no (if text-no
(lyskom-write-comment-soon (lyskom-write-comment-soon
(blocking-do 'get-text-stat text-no) (blocking-do 'get-text-stat text-no)
(blocking-do 'get-text text-no) (blocking-do 'get-text text-no)
text-no text-no
'comment) 'comment)
(lyskom-insert-string 'confusion-what-to-comment) (lyskom-insert-string 'confusion-what-to-comment))
(lyskom-end-of-command))) (lyskom-end-of-command)))
(defun kom-write-footnote (&optional text-no) (def-kom-command kom-write-footnote (&optional text-no)
"Write a footnote to a text. "Write a footnote to a text.
If optional arg TEXT-NO is present write a footnote to that text instead." If optional arg TEXT-NO is present write a footnote to that text instead."
(interactive (list (interactive (list
...@@ -632,27 +632,23 @@ If optional arg TEXT-NO is present write a footnote to that text instead." ...@@ -632,27 +632,23 @@ If optional arg TEXT-NO is present write a footnote to that text instead."
(lyskom-read-number (lyskom-get-string 'what-comment-no))) (lyskom-read-number (lyskom-get-string 'what-comment-no)))
(t (t
(signal 'lyskom-internal-error '(kom-write-comment)))))) (signal 'lyskom-internal-error '(kom-write-comment))))))
(lyskom-start-of-command 'kom-write-footnote)
(if text-no (if text-no
(lyskom-write-comment-soon (lyskom-write-comment-soon
(blocking-do 'get-text-stat text-no) (blocking-do 'get-text-stat text-no)
(blocking-do 'get-text text-no) (blocking-do 'get-text text-no)
text-no 'footnote) text-no 'footnote)
(lyskom-insert-string 'confusion-what-to-footnote) (lyskom-insert-string 'confusion-what-to-footnote)))
(lyskom-end-of-command)))
(defun kom-comment-previous () (def-kom-command kom-comment-previous ()
"Write a comment to previously viewed text." "Write a comment to previously viewed text."
(interactive) (interactive)
(lyskom-start-of-command 'kom-comment-previous)
(if lyskom-previous-text (if lyskom-previous-text
(lyskom-write-comment-soon (lyskom-write-comment-soon
(blocking-do 'get-text-stat lyskom-previous-text) (blocking-do 'get-text-stat lyskom-previous-text)
(blocking-do 'get-text lyskom-previous-text) (blocking-do 'get-text lyskom-previous-text)
lyskom-previous-text 'comment) lyskom-previous-text 'comment)
(lyskom-insert-string 'confusion-what-to-comment) (lyskom-insert-string 'confusion-what-to-comment)))
(lyskom-end-of-command)))
(defun lyskom-write-comment-soon (text-stat text text-no type) (defun lyskom-write-comment-soon (text-stat text text-no type)
...@@ -662,8 +658,7 @@ TYPE is either 'comment or 'footnote." ...@@ -662,8 +658,7 @@ TYPE is either 'comment or 'footnote."
;; Text not found? ;; Text not found?
((or (null text-stat) ((or (null text-stat)
(null text)) (null text))
(lyskom-format-insert 'cant-read-textno text-no) (lyskom-format-insert 'cant-read-textno text-no))
(lyskom-end-of-command))
;; Give header. ;; Give header.
((string-match "\n" (text->text-mass text)) ((string-match "\n" (text->text-mass text))
(lyskom-write-comment text-stat (lyskom-write-comment text-stat
...@@ -679,8 +674,7 @@ TYPE is either 'comment or 'footnote." ...@@ -679,8 +674,7 @@ TYPE is either 'comment or 'footnote."
The default subject is SUBJECT. TYPE is either 'comment or 'footnote." The default subject is SUBJECT. TYPE is either 'comment or 'footnote."
(if (null text-stat) (if (null text-stat)
(progn (progn
(lyskom-insert-string 'confusion-what-to-comment) (lyskom-insert-string 'confusion-what-to-comment))
(lyskom-end-of-command))
(let ((ccrep)) (let ((ccrep))
(lyskom-tell-internat (if (eq type 'comment) (lyskom-tell-internat (if (eq type 'comment)
'kom-tell-write-comment 'kom-tell-write-comment
...@@ -719,7 +713,7 @@ TYPE is info whether this is going to be a comment of footnote. ...@@ -719,7 +713,7 @@ TYPE is info whether this is going to be a comment of footnote.
CCREP is a list of all recipients that are going to be cc-recipients." CCREP is a list of all recipients that are going to be cc-recipients."
(condition-case x (condition-case x
;; Catch any quits and run lyskom-end-of-command. ;; Catch any quits
(progn (progn
;; Filter multiple recipients through y-or-n-p. ;; Filter multiple recipients through y-or-n-p.
(if (and kom-confirm-multiple-recipients (> (length data) 1) (if (and kom-confirm-multiple-recipients (> (length data) 1)
...@@ -770,8 +764,7 @@ CCREP is a list of all recipients that are going to be cc-recipients." ...@@ -770,8 +764,7 @@ CCREP is a list of all recipients that are going to be cc-recipients."
recver recver
subject ""))) subject "")))
(quit (lyskom-end-of-command) (quit (signal 'quit "quit in lyskom-comment-recipients"))))
(signal 'quit "quit in lyskom-comment-recipients"))))
;;; ================================================================ ;;; ================================================================
...@@ -781,7 +774,7 @@ CCREP is a list of all recipients that are going to be cc-recipients." ...@@ -781,7 +774,7 @@ CCREP is a list of all recipients that are going to be cc-recipients."
;;; Rewritten using blocking-do by: Linus Tolke ;;; Rewritten using blocking-do by: Linus Tolke
(defun kom-private-answer (&optional text-no) (def-kom-command kom-private-answer (&optional text-no)
"Write a private answer to the current text. "Write a private answer to the current text.
If optional arg TEXT-NO is present write a private answer to If optional arg TEXT-NO is present write a private answer to
that text instead." that text instead."
...@@ -795,14 +788,12 @@ that text instead." ...@@ -795,14 +788,12 @@ that text instead."
(lyskom-read-number (lyskom-get-string 'what-private-no))) (lyskom-read-number (lyskom-get-string 'what-private-no)))
(t (t
(signal 'lyskom-internal-error '(kom-private-answer)))))) (signal 'lyskom-internal-error '(kom-private-answer))))))
(lyskom-start-of-command 'kom-private-answer)
(if text-no (if text-no
(lyskom-private-answer-soon (lyskom-private-answer-soon
(blocking-do 'get-text-stat text-no) (blocking-do 'get-text-stat text-no)
(blocking-do 'get-text text-no) (blocking-do 'get-text text-no)
text-no) text-no)
(lyskom-insert-string 'confusion-who-to-reply-to) (lyskom-insert-string 'confusion-who-to-reply-to)))
(lyskom-end-of-command)))
(defun lyskom-private-answer-soon (text-stat text text-no) (defun lyskom-private-answer-soon (text-stat text text-no)
...@@ -813,16 +804,14 @@ that text instead." ...@@ -813,16 +804,14 @@ that text instead."
(substring (text->text-mass text) (substring (text->text-mass text)
0 (match-beginning 0))) 0 (match-beginning 0)))
(lyskom-private-answer text-stat "")) (lyskom-private-answer text-stat ""))
(lyskom-format-insert 'no-such-text-no text-no) (lyskom-format-insert 'no-such-text-no text-no)))
(lyskom-end-of-command)))
(defun lyskom-private-answer (text-stat subject) (defun lyskom-private-answer (text-stat subject)
"Write a private answer. Args: TEXT-STAT SUBJECT." "Write a private answer. Args: TEXT-STAT SUBJECT."
(if (null text-stat) (if (null text-stat)
(progn (progn
(lyskom-insert-string 'confusion-what-to-answer-to) (lyskom-insert-string 'confusion-what-to-answer-to))
(lyskom-end-of-command))
(progn (progn
(lyskom-tell-internat 'kom-tell-write-reply) (lyskom-tell-internat 'kom-tell-write-reply)
(lyskom-edit-text lyskom-proc (lyskom-edit-text lyskom-proc
...@@ -839,16 +828,14 @@ that text instead." ...@@ -839,16 +828,14 @@ that text instead."