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

Put everything but the hooks into the customize buffer

parent 6084a98d
1999-10-14 David Byers <davby@ida.liu.se>
* option-edit.el (lyskom-ansaphone-reply-widget): New widget type.
(lyskom-customize-buffer-format): Added ansaphone replies.
(lyskom-custom-variables): Added kom-ansaphone-replies.
1999-10-13 David Byers <davby@ida.liu.se>
* Removed all references to kom-emacs-knows-iso-8859-1
* review.el (kom-review-noconversion): Don't set
kom-emacs-knows-iso-8859-1
* commands2.el (kom-display-who-buffer): Kommenterade ut.
* option-edit.el (lyskom-ding-widget): Full definition of ding
widget.
(lyskom-create-widget): Don't insert doc button if doc string is
empty.
1999-10-12 David Byers <davby@ida.liu.se>
* edit-text.el (Info-current-file): Get rid of Info-related
......
......@@ -1066,18 +1066,18 @@ Format is 23:29 if the text is written today. Otherwise 04-01."
;;; Author: Linus Tolke
(def-kom-command kom-display-who-buffer ()
"Make the who-buffer appear on the screen as a temp buffer."
(interactive)
(let ((win (selected-window))
(who (display-buffer lyskom-who-info-buffer)))
(unwind-protect
(progn
(select-window who)
(if (numberp kom-who-buffer-size-when-displaying)
(enlarge-window (- kom-who-buffer-size-when-displaying
(window-height who)))))
(select-window win))))
;;(def-kom-command kom-display-who-buffer ()
;; "Make the who-buffer appear on the screen as a temp buffer."
;; (interactive)
;; (let ((win (selected-window))
;; (who (display-buffer lyskom-who-info-buffer)))
;; (unwind-protect
;; (progn
;; (select-window who)
;; (if (numberp kom-who-buffer-size-when-displaying)
;; (enlarge-window (- kom-who-buffer-size-when-displaying
;; (window-height who)))))
;; (select-window win))))
......
......@@ -807,8 +807,8 @@ Help: \\[describe-mode] ---")
(comment-in-text . "Comment in text %#1n")
(footnote-in-text . "Footnote in text %#1n")
(attachment-to-text . "Attachment to text %#1n")
(attachment-in-text . "Attachment in text %#1n")
(attachment-to-text . "Attachment %#3sto text %#1n")
(attachment-in-text . "Attachment %#3sin text %#1n")
(envelope-sender . "Sent by: %#1s\n")
(attachment-filename . "Attachment file name: \"%#1s\"\n")
......@@ -2021,6 +2021,7 @@ You must become an active member of the conference to enter it.\n")
(some-person . "Person %#1d")
(invalid-value . "Invalid value (%#1S)")
(unknown-command . "Unknown command (%#1s)")
(ding . "Audio cue")
;;
;; Help messages
......@@ -2065,6 +2066,7 @@ Select whether to execute command or keyboard macro.")
(number-of-times . "A few times")
(specific-spec . "Per mottager/avsndare")
(sound-file . "Audio file")
(other-persons . "All others")
(selected-mark . "Mark ")
(conf-or-person . "Person eller mte")
......@@ -2073,7 +2075,27 @@ Select whether to execute command or keyboard macro.")
(before . "Before the text")
(after . "After the text")
(depth-first . "In comment order")
(time-order . "I time order")
(time-order . "In time order")
(ar-message-type . "Message type")
(ar-personal . "Personal")
(ar-group . "Group")
(ar-alarm . "Alarm")
(ar-any-type . "Any message type")
(ar-sender . "Sender")
(ar-any-sender . "Any sender")
(ar-specified-sender . "Specified senders")
(ar-pers-or-conf . "Person or conference")
(ar-recipient . "Recipient")
(ar-any-recipient . "Any recipient")
(ar-specified-recipient . "Specified recipients")
(ar-person . "Person")
(ar-message-text . "Message text")
(ar-any-message . "Any message")
(ar-matching-regexp . "Matching regexp")
(ar-reply . "Reply")
(ar-no-reply . "No reply")
(ar-reply-text . "Reply text")
(express-break . "Immediately upon creation ")
(break . "After current comment chain")
......@@ -2247,9 +2269,18 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
;; Doc strings for variables
;;
(kom-emacs-knows-iso-8859-1-doc . "\
Turned on means that LysKOM expects Emacs to understand ISO-8859-1. There
is no point in turning this off.")
(kom-ansaphone-replies-doc . "\
This setting controls automatic replies in detail. You can set replies
for specific senders, recipients and even message contents. If the message
being replied to does not match any element in this list, the default
auto reply message above is sent instead.
For each pattern in the list you can set the required message type,
sender the message must have, recipient the message must have, a regular
expression the message must match and the reply to send.
It is advisable to configure the client not to send a message to any
group or alarm message.")
(kom-bury-buffers-doc . "\
Controls how the LysKOM buffer is handled when moving to another KOM buffer
......@@ -2293,6 +2324,8 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
%S - Inserts the server name.
%p - Inserts the name of the user currently logged on.
%w - Inserts the name of the current conference.
%a - Inserts `anonymous'
%A - Inserts `Anonymous'
%# - Inserts the current session number.
% - Inserts a space if it seems necessary.
%% - Inserts a percent sign.
......@@ -2314,6 +2347,102 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
%S - Inserts the server name.
%p - Inserts the name of the user currently logged on.
%w - Inserts the name of the current conference.
%a - Inserts `anonymous'
%A - Inserts `Anonymous'
%# - Inserts the current session number.
% - Inserts a space if it seems necessary.
%% - Inserts a percent sign.
Here are a few examples:
\"%[%c% %m%] - \" The default prompt
\"%[%s: %c% %m%] - \" Could display \"LysKOM: Se tiden - \"")
(kom-anonymous-prompt-format-doc . "\
The format of the LysKOM prompt used when anonymous. Certain control
sequences cause special text to be inserted:
%c - Inserts the current default command.
%[ - Inserts `[' if the ansaphone is on.
%] - Inserts `]' is the ansaphone is on.
%m - Inserts information about recorded messages.
%s - Inserts the name of the LysKOM system
%S - Inserts the server name.
%p - Inserts the name of the user currently logged on.
%w - Inserts the name of the current conference.
%a - Inserts `anonymous'
%A - Inserts `Anonymous'
%# - Inserts the current session number.
% - Inserts a space if it seems necessary.
%% - Inserts a percent sign.
Here are a few examples:
\"%[%c% %m%] - \" The default prompt
\"%[%s: %c% %m%] - \" Could display \"LysKOM: Se tiden - \"")
(kom-anonymous-prompt-format-executing-doc . "\
The format of the LysKOM prompt when the default command is executing
and the session is anonymous. Certain control sequences cause special
text to be inserted:
%c - Inserts the current default command.
%[ - Inserts `[' if the ansaphone is on.
%] - Inserts `]' is the ansaphone is on.
%m - Inserts information about recorded messages.
%s - Inserts the name of the LysKOM system
%S - Inserts the server name.
%p - Inserts the name of the user currently logged on.
%w - Inserts the name of the current conference.
%a - Inserts `anonymous'
%A - Inserts `Anonymous'
%# - Inserts the current session number.
% - Inserts a space if it seems necessary.
%% - Inserts a percent sign.
Here are a few examples:
\"%[%c% %m%] - \" The default prompt
\"%[%s: %c% %m%] - \" Could display \"LysKOM: Se tiden - \"")
(kom-enabled-prompt-format-doc . "\
The format of the LysKOM prompt when in administrator mode. Certain
control sequences cause special text to be inserted:
%c - Inserts the current default command.
%[ - Inserts `[' if the ansaphone is on.
%] - Inserts `]' is the ansaphone is on.
%m - Inserts information about recorded messages.
%s - Inserts the name of the LysKOM system
%S - Inserts the server name.
%p - Inserts the name of the user currently logged on.
%w - Inserts the name of the current conference.
%a - Inserts `anonymous'
%A - Inserts `Anonymous'
%# - Inserts the current session number.
% - Inserts a space if it seems necessary.
%% - Inserts a percent sign.
Here are a few examples:
\"%[%c% %m%] - \" The default prompt
\"%[%s: %c% %m%] - \" Could display \"LysKOM: Se tiden - \"")
(kom-enabled-prompt-format-executing-doc . "\
The format of the LysKOM prompt when the default command is executing
and the session is in administrator mode. Certain control sequences
cause special text to be inserted:
%c - Inserts the current default command.
%[ - Inserts `[' if the ansaphone is on.
%] - Inserts `]' is the ansaphone is on.
%m - Inserts information about recorded messages.
%s - Inserts the name of the LysKOM system
%S - Inserts the server name.
%p - Inserts the name of the user currently logged on.
%w - Inserts the name of the current conference.
%a - Inserts `anonymous'
%A - Inserts `Anonymous'
%# - Inserts the current session number.
% - Inserts a space if it seems necessary.
%% - Inserts a percent sign.
......@@ -2780,12 +2909,13 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-check-for-new-comments-doc . "")
(kom-check-commented-author-membership . "")
(kom-confirm-multiple-recipients-doc . "")
(kom-check-commented-author-membership-doc . "")
;;
;; Tags for variables
;;
(kom-emacs-knows-iso-8859-1-tag . "Emacs can display ISO-8859-1:")
(kom-ansaphone-replies-tag . "Automatic replies")
(kom-bury-buffers-tag . "Bury buffers when changing LysKOM:")
(kom-personal-messages-in-window-tag . "Personal messages: ")
......@@ -2798,6 +2928,10 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-user-prompt-format-tag . "Prompt format:")
(kom-user-prompt-format-executing-tag . "Prompt format when executing:")
(kom-anonymous-prompt-format-tag . "Prompt format (anonymous):")
(kom-anonymous-prompt-format-executing-tag . "Prompt format when executing (anonymous):")
(kom-enabled-prompt-format-tag . "Prompt format (admin):")
(kom-enabled-prompt-format-executing-tag . "Prompt format when executing (admin):")
(kom-higher-priority-breaks-tag .
"Read prioritized texts: ")
......@@ -2918,6 +3052,8 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-text-footer-dash-length-tag . "Text footer length")
(kom-text-header-dash-length-tag . "Length of dashed line before text")
(kom-show-personal-message-date-tag . "Show date and time of messages")
(kom-w3-simplify-body-tag . "Display HTML without document colors")
(kom-mercial-tag . "Text do display when all is read")
)
)
......
......@@ -808,8 +808,7 @@ The position lyskom-last-viewed will always remain visible."
Leaves the point at the end of the buffer if possible without
scrolling past lyskom-last-viewed (generally the most recent prompt.)
Leaves the point at the end of the window if not possible. If buffer
is not on screen then doesn't move point.
The text is converted according to the value of kom-emacs-knows-iso-8859-1."
is not on screen then doesn't move point."
(when (symbolp string) (setq string (lyskom-get-string string)))
(let ((was-at-max (= (save-excursion (end-of-line) (point)) (point-max))))
(save-excursion
......@@ -826,9 +825,7 @@ The text is converted according to the value of kom-emacs-knows-iso-8859-1."
(defun lyskom-insert-at-point (string)
"Insert STRING in the current buffer at point.
The text is converted according to the value of
kom-emacs-knows-iso-8859-1."
"Insert STRING in the current buffer at point."
(let ((inhibit-read-only t))
(lyskom-do-insert string))
(lyskom-trim-buffer))
......
......@@ -75,8 +75,19 @@
[kom-presence-messages-in-buffer]
"\n"
[kom-page-before-command]
[kom-deferred-printing]
[kom-max-buffer-size]
[kom-bury-buffers]
"\n"
[kom-agree-text]
[kom-mercial]
"\n"
[kom-user-prompt-format]
[kom-user-prompt-format-executing]
[kom-anonymous-prompt-format]
[kom-anonymous-prompt-format-executing]
[kom-enabled-prompt-format]
[kom-enabled-prompt-format-executing]
"\n\n"
section
(window-locations bold centered)
......@@ -121,9 +132,14 @@
[kom-default-session-priority]
[kom-print-number-of-unread-on-entrance]
[kom-allow-incompleteness]
[kom-permissive-completion]
[kom-continuous-scrolling]
[kom-inhibit-typeahead]
[kom-created-texts-are-read]
[kom-higher-priority-breaks]
[kom-review-priority]
[kom-read-depth-first]
[kom-reading-puts-comments-in-pointers-last]
[kom-show-footnotes-immediately]
[kom-follow-comments-outside-membership]
"\n"
......@@ -154,6 +170,7 @@
[kom-ignore-message-senders]
[kom-ignore-message-recipients]
[kom-show-personal-message-date]
[lyskom-filter-outgoing-messages]
"\n\n"
section
(writing bold centered)
......@@ -192,7 +209,8 @@
[kom-ansaphone-show-messages]
"\n"
[kom-ansaphone-default-reply]
"\n"
[kom-ansaphone-replies]
"\n\n"
section
(remote-control bold centered)
......@@ -430,8 +448,7 @@ customize buffer but do not save them to the server."
(defvar lyskom-custom-variables
'((kom-emacs-knows-iso-8859-1 (toggle (yes no)))
(kom-personal-messages-in-window (open-window))
'((kom-personal-messages-in-window (open-window))
(kom-write-texts-in-window (open-window))
(kom-list-membership-in-window (open-window))
(kom-edit-filters-in-window (open-window))
......@@ -445,6 +462,10 @@ customize buffer but do not save them to the server."
(kom-default-language (language-choice))
(kom-user-prompt-format (string))
(kom-user-prompt-format-executing (string))
(kom-anonymous-prompt-format (string))
(kom-anonymous-prompt-format-executing (string))
(kom-enabled-prompt-format (string))
(kom-enabled-prompt-format-executing (string))
(kom-cite-string (string))
(kom-created-texts-are-read (toggle (yes no)))
(kom-default-mark (choice ((number (0 255)
......@@ -508,7 +529,8 @@ customize buffer but do not save them to the server."
:format "%[%t%] %v"))
(kom-permissive-completion (noggle (on off)))
(kom-membership-default-priority
(choice ((const (ask-every-time nil))
(choice ((const (ask-every-time ask))
(const (ask-every-time nil))
(number (0 255)
:tag fixed-priority
:help-echo select-priority
......@@ -601,6 +623,8 @@ customize buffer but do not save them to the server."
(kom-show-personal-message-date (toggle (on off)))
(kom-mercial (string))
(kom-w3-simplify-body (toggle (on off)))
(kom-bury-buffers (toggle (on off)))
(kom-ansaphone-replies (ansaphone))
))
(defvar lyskom-widget-functions
......@@ -620,6 +644,7 @@ customize buffer but do not save them to the server."
(person . lyskom-person-widget)
(language-choice . lyskom-language-widget)
(file . lyskom-file-widget)
(ansaphone . lyskom-ansaphone-reply-widget)
))
(defun lyskom-make-menu-tag (str)
......@@ -674,27 +699,28 @@ customize buffer but do not save them to the server."
(let ((widget (apply 'widget-create spec)))
(condition-case nil
(progn
(lyskom-custom-string doc-sym)
(widget-insert " ")
(widget-create 'lyskom-widget-help
':value (lyskom-default-value 'kom-customize-format)
':help-echo
(if (eq (lyskom-default-value 'kom-customize-format)
'long)
(lyskom-custom-string 'hide-doc)
(lyskom-custom-string 'show-doc))
':args
(list (list 'long
"\n%s\n\n"
(lyskom-custom-string doc-sym)
(lyskom-custom-string 'hide-doc)
"!")
(list 'short
"%s"
""
(lyskom-custom-string 'show-doc)
"?"))
':format "%[[%T]%]\n%D"))
(if (string= "" (lyskom-custom-string doc-sym))
(widget-insert "\n")
(widget-insert " ")
(widget-create 'lyskom-widget-help
':value (lyskom-default-value 'kom-customize-format)
':help-echo
(if (eq (lyskom-default-value 'kom-customize-format)
'long)
(lyskom-custom-string 'hide-doc)
(lyskom-custom-string 'show-doc))
':args
(list (list 'long
"\n%s\n\n"
(lyskom-custom-string doc-sym)
(lyskom-custom-string 'hide-doc)
"!")
(list 'short
"%s"
""
(lyskom-custom-string 'show-doc)
"?"))
':format "%[[%T]%]\n%D")))
(error (widget-insert "\n")))
widget)))
......@@ -888,28 +914,38 @@ customize buffer but do not save them to the server."
':tag (lyskom-custom-string 'specific-spec)
':menu-tag (lyskom-custom-string 'specific-spec)
':args
`((cons number number))
; :value (1 . 1)
; `(lyskom-name :tag ,(lyskom-custom-string 'conf-of-person))
; `(menu-choice
; :case-fold t
; :format "%[%t%] %v"
; :args
; `((item :tag ,(lyskom-custom-string 'turned-off)
; :value nil
; :format "%t"
; :match (lambda (w v) (or (null v) (eq v 0))))
; (lyskom-number :tag ,(lyskom-custom-string 'number-of-times)
; :help-echo ,(lyskom-custom-string 'select-number)
; :value "1"
; :format "%[%t%]: (%v)"
; :size 0
; :min-value 1
; :max-value 255)
; (lyskom-string :tag ,(lyskom-custom-string 'sound-file)
; :help-echo ,(lyskom-custom-string 'select-audio-file)
; :size 0)))))
)
`((cons :format "%v"
:value (1 . 0)
:args
((menu-choice
:case-fold t
:format "%[%t%]: %v"
:tag ,(lyskom-custom-string 'conf-or-person)
:args
((lyskom-name :tag ,(lyskom-custom-string 'conf-or-person))
(item :tag ,(lyskom-custom-string 'other-persons)
:value t
:format "%t\n")))
(menu-choice
:case-fold t
:format "%[%t%]: %v\n"
:tag ,(lyskom-custom-string 'ding)
:args
((item :tag ,(lyskom-custom-string 'turned-off)
:value nil
:format "%t"
:match (lambda (w v) (or (null v) (eq v 0))))
(lyskom-number :tag ,(lyskom-custom-string 'number-of-times)
:help-echo ,(lyskom-custom-string 'select-number)
:value "1"
:format "%[%t%]: (%v)"
:size 0
:min-value 1
:max-value 255)
(lyskom-string :tag ,(lyskom-custom-string 'sound-file)
:help-echo ,(lyskom-custom-string 'select-audio-file)
:size 0))))))
)
)))
(defun lyskom-toggle-widget-inverse (type &optional args propl)
......@@ -968,6 +1004,55 @@ customize buffer but do not save them to the server."
(list 'lyskom-number
':size 0)))
;;;
;;; The ansaphone reply widget (whew!)
(defun lyskom-ansaphone-reply-widget (type &optional args propl)
(list 'editable-list
:format "%t:\n%v%i\n"
:args
`((group
:args ((menu-choice :tag ,(lyskom-custom-string 'ar-message-type)
:format "%[%t%]: %v"
:args
((item :value personal :tag ,(lyskom-custom-string 'ar-personal))
(item :value group :tag ,(lyskom-custom-string 'ar-group))
(item :value common :tag ,(lyskom-custom-string 'ar-alarm))
(item :value nil :tag ,(lyskom-custom-string 'ar-any-type))))
(menu-choice :tag ,(lyskom-custom-string 'ar-sender)
:args
((item :value nil :tag ,(lyskom-custom-string 'ar-any-sender))
(editable-list :tag ,(lyskom-custom-string 'ar-specified-sender)
:menu-tag ,(lyskom-custom-string 'ar-specified-sender)
:format "%t:\n%v%i\n"
:indent 14
:args
((lyskom-name
:format "%[%t%]: %v"
:tag ,(lyskom-custom-string 'ar-person))))))
(menu-choice :tag ,(lyskom-custom-string 'ar-recipient)
:args
((item :value nil :tag ,(lyskom-custom-string 'ar-any-recipient))
(editable-list :tag ,(lyskom-custom-string 'ar-specified-recipient)
:menu-tag ,(lyskom-custom-string 'ar-specified-recipient)
:format "%t:\n%v%i\n"
:indent 14
:args
((lyskom-name :tag ,(lyskom-custom-string 'ar-pers-or-conf)
:format "%[%t%]: %v"
:lyskom-predicate (pers conf))))))
(menu-choice :tag ,(lyskom-custom-string 'ar-message-text)
:args
((item :value nil :tag ,(lyskom-custom-string 'ar-any-message))
(lyskom-string :tag ,(lyskom-custom-string 'ar-matching-regexp)
:size 0
:format "%[%t%] `%v'\n")))
(menu-choice :tag ,(lyskom-custom-string 'ar-reply)
:args
((item :value nil :tag ,(lyskom-custom-string 'ar-no-reply))
(lyskom-string :tag ,(lyskom-custom-string 'ar-reply-text)
:size 0
:format "%[%t%] `%v'\n"))))))))
;;; ======================================================================
......@@ -1167,7 +1252,6 @@ customize buffer but do not save them to the server."
':format "%[%t%] %v"
':action 'lyskom-widget-string-action)
;;;
;;; A Number widget
;;;
......
......@@ -1296,11 +1296,9 @@ text is shown and a REVIEW list is built to shown the other ones."
(t
(signal 'lyskom-internal-error '(kom-review-noconversion))))))
(lyskom-start-of-command 'kom-review-noconversion)
(let ((kom-emacs-knows-iso-8859-1 t)
(lyskom-format-special nil)
(let ((lyskom-format-special nil)
(kom-smileys nil)
(kom-autowrap nil))
(lyskom-ignore kom-emacs-knows-iso-8859-1)
(lyskom-view-text text-no))
(lyskom-end-of-command))
......
......@@ -2063,6 +2063,7 @@ Du m
(some-person . "Person %#1d")
(invalid-value . "Otilltet vrde (%#1S)")
(unknown-command . "Oknt kommando (%#1s)")
(ding . "Ljudsignal")
;;
;; Help messages
......@@ -2106,6 +2107,7 @@ Du m
(number-of-times . "Ngra gnger")
(specific-spec . "Per mottager/avsndare")
(sound-file . "Ljudfil")
(other-persons . "Alla andra")
(selected-mark . "Markering")
(conf-or-person . "Person eller mte")
(ask . "Frga varje gng")
......@@ -2116,6 +2118,26 @@ Du m
(depth-first . "I kommentarsordning")
(time-order . "I tidsordning")
(ar-message-type . "Meddelandetype")
(ar-personal . "Personligt meddelande")
(ar-group . "Gruppmeddelande")
(ar-alarm . "Alarmmeddelande")
(ar-any-type . "Alla meddelandetyper")
(ar-sender . "Avsndare")
(ar-any-sender . "Alla avsndare")
(ar-specified-sender . "Specifika avsndare")
(ar-pers-or-conf . "Person eller mte")
(ar-recipient . "Mottagare")
(ar-any-recipient . "Alla mottagare")
(ar-specified-recipient . "Specifika mottagare")
(ar-person . "Person")
(ar-message-text . "Meddelandetext")
(ar-any-message . "Alla meddelanden")
(ar-matching-regexp . "Meddelanden som matchar")
(ar-reply . "Automatsvar")
(ar-no-reply . "Inget svar")
(ar-reply-text . "Svarstext")