Commit 3652d35d authored by David Byers's avatar David Byers
Browse files

Synched english and swedish versions.

parent 5f7fbba5
1999-06-19 David Byers <davby@ida.liu.se>
* completing-read.el (lyskom-read-conf-stat): Don't croak if we
get an uconf-stat back from lyskom-read-conf.
1999-06-17 David Byers <davby@ida.liu.se>
* utilities.el (lyskom-maxint): Clip to 32 bit integers.
1999-06-17 David Byers <davby@ida.liu.se>
* feature.el (lyskom-define-feature): Inherit feature variables
......
......@@ -7,6 +7,37 @@ Att g
listan, glöm inte att ta bort det från listan!
Använd face-flag i lyskom-format-aux för att bestämma om man skall
visa faces eller inte. Kolla att
1) det går att visa faces
2) lyskom-show-faces är satt
innan man försöker. Man skulle till och med kunna sätta face-flag
efter de här villkoren. Lägg till användarvariabeln kom-show-faces som
talar om när man vill ha faces:
0) alltid/aldrig
1) vilkalistan (working conf och person)
2) status möte/person (föreslagen default)
3) varje inlägg
4) brev
5) in- och utloggningar
6) personliga meddelanden
7) mottagarna till inlägg
8) namnändring
dessa funktioner får sedan binda om lyskom-show-faces dynamiskt till
true eller false.
Visa bilder mindre än X * Y pixels, mindre än X bytes
Kombinera med möjlighet att bara visa bilder för kom-friends
För varje punkt på listan, tala om vilka man vill eller inte vill se
bilder för.
* SAKER ATT KOLLA
......
......@@ -312,7 +312,7 @@ according to the value of FLAG."
"%s"
(lyskom-format 'has-entered
(or conf-stat
(lyskom-get-string 'secret-person))
(lyskom-get-string 'unknown-person))
server
))))
......@@ -325,7 +325,7 @@ according to the value of FLAG."
'(face kom-presence-face))
server)
(lyskom-format-insert-before-prompt 'has-entered-r
(lyskom-get-string 'secret-person)
(lyskom-get-string 'unknown-person)
(and kom-text-properties
'(face kom-presence-face))
server))))))
......@@ -343,7 +343,7 @@ according to the value of FLAG."
(lyskom-message
"%s"
(lyskom-format 'has-left (or conf-stat
(lyskom-get-string 'secret-person))
(lyskom-get-string 'unknown-person))
server))))
(cond
((lyskom-show-presence (conf-stat->conf-no conf-stat)
......@@ -354,7 +354,7 @@ according to the value of FLAG."
'(face kom-presence-face))
server)
(lyskom-format-insert-before-prompt 'has-left-r
(lyskom-get-string 'secret-person)
(lyskom-get-string 'unknown-person)
(and kom-text-properties
'(face kom-presence-face))
server))))))
......
......@@ -11,6 +11,11 @@
;;;;
;;;; or by M-x lyskom-check-strings
;;;;
;;;; TODO:
;;;; Check that all -tag and -doc strings correspond to an existing variable
;;;; Check that all server-local variables have -tag and -doc strings.
;;;; Check that all server-local variables are in the settings buffer
;;;; Check that all server-local variables have a widget definition
;;;;
(require 'lyskom)
......@@ -27,12 +32,32 @@
(or noninteractive
(lcs-setup-message-buffer))
(lcs-message t "Languages: %s" (mapcar 'car lyskom-languages))
(lcs-message t "Checking variables")
(lcs-check-lyskom-commands (mapcar 'car
(lcs-all-category-string
'lyskom-command)))
(lcs-message t "Checking languages: %s" (mapcar 'car lyskom-languages))
(lcs-check-key-bindings (mapcar 'car (lcs-all-category-string
'lyskom-command))
'lyskom-mode-map)
(mapcar 'lcs-check-category lyskom-language-categories)
(or noninteractive
(display-buffer lcs-message-buffer)))
(defun lcs-check-lyskom-commands (commands)
"Check the lyskom-commands variable"
(let ((tmp (copy-sequence lyskom-commands)))
(mapcar (lambda (el)
(if (memq el lyskom-commands)
(setq tmp (delq el tmp))
(lcs-message nil "(%s) Missing in lyskom-commands" el)))
commands)
(mapcar (lambda (el)
(lcs-message nil "(%s) Unknown command in lyskom-commands" el))
tmp)))
(defun lcs-check-category (category)
"Check the strings in CATEGORY."
(lcs-message t "Checking category %s" category)
......@@ -81,6 +106,30 @@ STRINGS is a list of (language . string)."
(lcs-message nil "(%s:%s) Missing languages %s"
category name langs))))
(defun lcs-check-key-bindings (commands keymap)
"Check the commands in CATEGORY named NAME for bindings
in lyskom-X-mode-map"
(let* ((langs (mapcar 'car lyskom-languages))
(keymaps (get keymap 'lyskom-language-keymap))
(all-missing nil))
(while commands
(let ((lang-c (copy-sequence langs)))
(mapcar (lambda (lang)
(when (where-is-internal (car commands)
(symbol-value (cdr (assq lang keymaps))))
(setq lang-c (delq lang lang-c))))
langs)
(cond ((equal lang-c langs) (setq all-missing
(cons (car commands) all-missing)))
(lang-c
(lcs-message nil "(%s:%s) Missing binding in %s" keymap
(car commands) lang-c)))
(setq commands (cdr commands))))
(mapcar (lambda (el)
(lcs-message nil "(%s:%s) Missing in %s" keymap el langs))
all-missing)))
(defun lcs-check-string (category name lang string)
"Check the string in CATEGORY named NAME in language LANG.
STRING is the string."
......
......@@ -2161,7 +2161,7 @@ Uses Protocol A version 8 calls"
(format-string-2 (lyskom-info-line-format-string
session-width "s" "s"))
(lyskom-default-conf-string 'not-present-anywhere)
(lyskom-default-pers-string 'secret-person))
(lyskom-default-pers-string 'unknown-person))
(if conf-stat
(lyskom-format-insert 'who-is-active-and-member conf-stat))
......@@ -2237,7 +2237,7 @@ Uses Protocol A version 9 calls"
(format-string-3 (lyskom-info-line-format-string
session-width "D" "s"))
(lyskom-default-conf-string 'not-present-anywhere)
(lyskom-default-pers-string 'secret-person))
(lyskom-default-pers-string 'unknown-person))
(if (zerop idle-hide)
(lyskom-insert (lyskom-get-string 'who-is-active-all))
......
......@@ -2015,6 +2015,14 @@ is alive."
(defun lyskom-default-agree-string (&optional text)
(unless text (setq text kom-agree-text))
(cond ((null text) (lyskom-get-string 'default-agree-string))
((stringp text) text)
((functionp text) (funcall text))
((listp text) (lyskom-default-agree-string
(elt text (random (length kom-agree-text)))))))
(def-kom-command kom-agree (&optional text-no)
"Convenience function to add agreement."
(interactive (list (lyskom-read-text-no-prefix-arg 'what-agree-no
......@@ -2022,7 +2030,7 @@ is alive."
(lyskom-format-insert 'agreeing text-no)
(lyskom-fast-reply text-no
(lyskom-read-string (lyskom-get-string 'agree-prompt)
(lyskom-get-string 'default-agree-string)
(lyskom-default-agree-string)
'lyskom-fast-reply-history)))
......
This diff is collapsed.
......@@ -856,25 +856,13 @@ Args: FORMAT-STRING &rest ARGS"
(defvar lyskom-format-format
"%\\(=\\)?\\(-?[0-9]+\\)?\\(#\\([0-9]+\\)\\)?\\(:\\)?\\([][@MmPpnrtsdoxcCSD]\\)"
"%\\(=\\)?\\(-?[0-9]+\\)?\\(#\\([0-9]+\\)\\)?\\(:\\)?\\(&\\)?\\([][@MmPpnrtsdoxcCSDF]\\)"
"regexp matching format string parts.")
(defun lyskom-insert-string (atom)
"Find the string corresponding to ATOM and insert it into the LysKOM buffer."
(lyskom-insert (lyskom-get-string atom)))
;;(defun lyskom-get-string (atom &optional assoc-list)
;; "Get the string corresponding to ATOM and return it."
;; (if (stringp atom)
;; atom
;; (let ((format-pair (assoc atom (or assoc-list lyskom-strings))))
;; (if (null format-pair)
;; (signal 'lyskom-internal-error
;; (list 'lyskom-get-string
;; (list atom ": string not found")))
;; (cdr format-pair)))))
(defun lyskom-format (format-string &rest argl)
(format-state->result (lyskom-do-format format-string argl)))
......@@ -963,6 +951,7 @@ Note that it is not allowed to use deferred insertions in the text."
(format-letter nil)
(colon-flag nil)
(equals-flag nil)
(face-flag nil)
(abort-format nil))
;;
......@@ -1020,10 +1009,11 @@ Note that it is not allowed to use deferred insertions in the text."
(match-end 4)))
nil)
colon-flag (match-beginning 5)
format-letter (if (match-beginning 6)
face-flag (match-beginning 6)
format-letter (if (match-beginning 7)
(aref (format-state->format-string
format-state)
(match-beginning 6))
(match-beginning 7))
(signal 'lyskom-internal-error
(list 'lyskom-format-aux
(format-state->format-string
......@@ -1047,6 +1037,7 @@ Note that it is not allowed to use deferred insertions in the text."
format-letter
equals-flag
colon-flag
face-flag
(if (and (match-beginning 2)
(eq (aref (format-state->format-string format-state)
(match-beginning 2))
......@@ -1063,6 +1054,7 @@ Note that it is not allowed to use deferred insertions in the text."
format-letter
equals-flag
colon-flag
face-flag
pad-letter
allow-defer)
(let ((arg nil)
......@@ -1173,6 +1165,15 @@ Note that it is not allowed to use deferred insertions in the text."
((= format-letter ?\[)
(setq format-state (lyskom-format-aux format-state allow-defer)
result nil))
((= format-letter ?F)
(setq result
(if (lyskom-conf-stat-p arg)
(let ((face (conf-stat-find-aux arg 9))
(string (copy-sequence "X")))
(lyskom-maybe-add-face-to-string face string))
"!!!")))
;;
;; Format a conference or person name by retreiving information
;; about the conference or person and inserting it as a button
......@@ -1231,18 +1232,15 @@ Note that it is not allowed to use deferred insertions in the text."
(format-state->delayed-content
format-state)))
lyskom-defer-indicator)
;; The conf-stat was in the cache
(setq arg tmp)
; (let ((aux (conf-stat-find-aux arg
; 10
; lyskom-pers-no))
; (face (conf-stat-find-aux arg
; 9)))
; (lyskom-maybe-add-face-to-string
; face
(uconf-stat->name arg)
)))
;; Find the name and return it
;; The argument is an integer and we do not permit
;; deferred printing
((integerp arg)
(let ((conf-stat (blocking-do 'get-uconf-stat arg)))
(if (null conf-stat)
......@@ -1254,8 +1252,13 @@ Note that it is not allowed to use deferred insertions in the text."
;; We got a conf-stat, and can use it directly
((lyskom-conf-stat-p arg)
(conf-stat->name arg))
(if face-flag
(let ((face (conf-stat-find-aux arg 9)))
(lyskom-maybe-add-face-to-string face
(conf-stat->name arg)))
(conf-stat->name arg)))
;; We have an uconf-stat
((lyskom-uconf-stat-p arg)
(uconf-stat->name arg))
......@@ -1272,6 +1275,7 @@ Note that it is not allowed to use deferred insertions in the text."
(lyskom-default-button (if (= format-letter ?P) 'pers 'conf)
arg)
propl))))
;;
;; Format a conference or person number the same way as names,
;; but insert the number rather than the name
......
......@@ -171,7 +171,6 @@ du
Email-adress:\nWWW:\t\n\nAnnat:\t")
(presentation-help . "Du skriver just nu din presentation.\n")
(not-present-anywhere . "Ej nrvarande i ngot mte.")
(secret-person . "Hemlig person")
(in-secret-conference . "Hemligt mte (%#1d).")
(start-new-session-same-server
. "Du kr redan mot den servern. Vill du starta en ny session? ")
......@@ -793,7 +792,7 @@ upptagna. Logga ut och kom tillbaks senare om du v
(has-left . "Nu har %#1:P gtt ur %#2s.")
(has-left-r . "%#2@Nu har %#1P gtt ur %#3s.\n")
(unknown . "oknd")
(secret-person . "Hemlig person")
(unknown-person . "Oknd person")
(no-longer-member . "Du r inte lngre medlem i %#1M\n")
(no-longer-member-n . "Du r inte lngre medlem i mte %#1m (finns inte.)\n")
......@@ -835,7 +834,7 @@ Gruppmeddelande till %#3M\nfr
(session-no-regexp . "\\`[ \t]*[sS]\\w*[ \t]+\\([0-9]+\\)\\'")
(conf-prompt . "Vilket mte/person? ")
;;n From prioritize.el:
;; From prioritize.el:
(cant-move-nothing-nowhere . "Kan inte flytta ingenting ngonstans.")
(goto-priority-prompt . "Hoppa till prioritet: ")
......@@ -1269,7 +1268,6 @@ Inneh
(kom-list-news . "Lista nyheter")
(kom-list-re . "Lista (med) regexpar")
(kom-membership . "Lista medlemsskap")
;; (kom-list-marks "Lista markeringar")
(kom-postpone . "Uppskjuta lsning")
(kom-set-session-priority . "Stt lsniv")
(kom-prioritize . "Prioritera mten")
......@@ -1918,7 +1916,7 @@ Inneh
;; Help messages
;;
(variable-type-help . "Kryssa i fr att spara instllningen i servern")
(variable-type-help . "Kryssa i fr att spara instllningen i servern.")
(default-help-echo . "ndra vrdet p %#1s.")
(change-this-name . "ndra namnet p denna rad.")
(show-doc . "Visa hjlptexten.")
......@@ -2045,7 +2043,6 @@ i servern. Annars sparas det i din .emacs.")
(audio-cues . "Ljudsignaler\n")
(audio-cues-when . "Ge ljudsignal:\n")
(automatic-replies . "Automatiskt svar\n")
(mail-import . "Emailimport\n")
(audio-cues-doc . "\
Efterfljande instllningar bestmmer vilken ljudsignal LysKOM skall ge
......@@ -2556,17 +2553,6 @@ i servern. Annars sparas det i din .emacs.")
av elispklienten, men det var visst ngon som ville ha det, s ...")
(kom-mail-address-doc . "\
Vrde fr From:-headern i skickade email.")
(kom-mail-importer-persons-doc . "\
Personer som i sjlva verket r emailimportrer. Inlgg av dessa
personer kommer att formatteras som emailtexter istllet fr som
vanliga inlgg.")
(kom-mail-visible-headers-doc . "\
Visa dessa headers i emailtexter.")
;;
;; Tags for variables
;;
......@@ -2683,9 +2669,6 @@ i servern. Annars sparas det i din .emacs.")
(kom-show-namedays-tag . "Visa dagens namn:")
(kom-ispell-dictionary-tag . "Ordlista:")
(kom-mail-address-tag . "Emailadress: ")
(kom-mail-importer-persons-tag . "Mailimportrer: ")
(kom-mail-visible-headers-tag . "Visa dessa headers:")
)
)
......
......@@ -844,6 +844,14 @@ don't send a reply.
If none of the elements match, KOM-ANSAPHONE-DEFAULT-REPLY is sent."
server)
(def-kom-var kom-agree-text nil
"*If non-nil the default text to use when agreeing with a text.
This variable can be a string, function or list. If a string, the
string is used as the message. If a function, the function is called
and the return value is used. If a list, one of the elements is selected
at random and used. This element may be a string, function or list."
server)
(def-kom-var kom-default-language nil
"*Which language to use for new sessions."
server inherited protected)
......@@ -1034,6 +1042,7 @@ Users are encouraged to use their best sense of humor."
kom-review-all-marked-texts
kom-add-recipient
kom-add-copy
kom-add-bcc
kom-sub-recipient
kom-move-text
kom-add-comment
......
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