Commit 011ed542 authored by David Byers's avatar David Byers
Browse files

Fix bug 762 and 763

parent d63bedff
2002-09-18 David Byers <david.byers@swipnet.se>
Fix bug 762:
* commands2.el (kom-set-motd): Rewrote using blocking commands.
The old code didn't really work. Also pick recipients for the text
correctly.
Fix bug 763:
* edit-text.el (lyskom-looking-at-header): Changed from match
number 1 to match number 2 because we need that for english
strings.
Fix bug 522:
* startup.el (lyskom): Print motd of lyskom sort of like a normal
text. Don't print the header because it distracts attention. Do
......
......@@ -36,7 +36,7 @@
# Version of the client.
#
# Also remember to change version number in ../doc/Makefile!
CLIENTVERSION = 0.47.1-BETA-1
CLIENTVERSION = 0.47.1-BETA-2
######################################################################
......
......@@ -1552,26 +1552,25 @@ YYYY-MM-DD."
(def-kom-command kom-set-motd ()
"Set the message of the day for LysKOM."
(interactive)
(if (server-info->motd-of-lyskom lyskom-server-info)
(progn (lyskom-collect 'main)
(initiate-get-text-stat 'main nil
(server-info->motd-of-lyskom lyskom-server-info))
(initiate-get-text 'main nil
(server-info->motd-of-lyskom lyskom-server-info))
(lyskom-use 'main 'lyskom-set-motd))
(lyskom-set-motd nil nil)))
(defun lyskom-set-motd (old-motd-text-stat old-motd-text)
"Set the message of the day for LysKOM.
Use OLD-MOTD-TEXT as the default text if non-nil."
(let ((str (and old-motd-text
(let* ((old-motd-text-stat (and (server-info->motd-of-lyskom lyskom-server-info)
(blocking-do 'get-text-stat (server-info->motd-of-lyskom lyskom-server-info))))
(old-motd-text (and (server-info->motd-of-lyskom lyskom-server-info)
(blocking-do 'get-text (server-info->motd-of-lyskom lyskom-server-info))))
(str (and old-motd-text
old-motd-text-stat
(text->decoded-text-mass old-motd-text old-motd-text-stat))))
(text->decoded-text-mass old-motd-text old-motd-text-stat)))
(recpt (if old-motd-text-stat
(lyskom-get-recipients-from-misc-list
(text-stat->misc-info-list old-motd-text-stat))
(apply 'nconc (mapcar (lambda (x) (list 'RECPT x))
(and lyskom-server-info
(server-info->kom-news-conf lyskom-server-info)
(not (eq 0 (server-info->kom-news-conf lyskom-server-info)))
(list (server-info->kom-news-conf lyskom-server-info))))))))
(lyskom-edit-text
lyskom-proc
(lyskom-create-misc-list)
(apply 'lyskom-create-misc-list recpt)
(if (and str (string-match "\n" str))
(substring str 0 (1- (match-end 0)))
"")
......
......@@ -1559,8 +1559,8 @@ non-nil. If MATCH-NUMBER is 'angled, only match a number inside <>."
(nil
""))))
(if match-number
(string-to-int (buffer-substring (match-beginning 1)
(match-end 1)))
(string-to-int (buffer-substring (match-beginning 2)
(match-end 2)))
t)
nil))
......
......@@ -862,9 +862,9 @@ Text %#1n has more than one root but only one of the trees will be shown.\n")
; From edit-text.el:
(press-C-c-C-c . "Enter C-c C-c to post the text.")
(recipient . "Recipient")
(recipient-prefix . "[Rr]")
(carbon-copy . "Carbon copy")
(blank-carbon-copy . "Blind Carbon copy")
(recipient-prefix . "\\([Rr]\\)")
(carbon-copy-prefix . "[Cc]\\([Aa]\\|[Cc]\\)")
(blank-carbon-copy-prefix . "[Bb]\\([Ll]\\|[Cc][Cc]\\)")
(add-recipient . "Add a recipient")
......
......@@ -875,9 +875,9 @@ M
(recipient . "Mottagare")
(carbon-copy . "Extra kopia")
(blank-carbon-copy . "Dold kopia")
(recipient-prefix . "[Mm]")
(carbon-copy-prefix . "[Ee]")
(blank-carbon-copy-prefix . "[Dd]")
(recipient-prefix . "\\([Mm]\\)")
(carbon-copy-prefix . "\\([Ee]\\)")
(blank-carbon-copy-prefix . "\\([Dd]\\)")
(add-recipient . "Addera mottagare")
(add-recipient-or-xref . "Addera...")
......
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