Commit 81e0cd84 authored by David Kågedal's avatar David Kågedal
Browse files

Fixade min förra trasiga incheckning.

parent ff481c03
......@@ -1400,2811 +1400,8 @@ to be bold with yellow text on a red background."
"Set the LysKOM color and face scheme to SCHEME. Valid schemes are listed
in lyskom-face-schemes."
(let ((tmp (assoc scheme lyskom-face-schemes)))
(if (and tmp (or (eq window-system 'x) ;;;;; -*- emacs-lisp -*-
;;;;; $Id$
;;;;; Copyright (C) 1991, 1996 Lysator Academic Computer Association.
;;;;;
;;;;; This file is part of the LysKOM server.
;;;;;
;;;;; LysKOM is free software; you can redistribute it and/or modify it
;;;;; under the terms of the GNU General Public License as published by
;;;;; the Free Software Foundation; either version 2, or (at your option)
;;;;; any later version.
;;;;;
;;;;; LysKOM is distributed in the hope that it will be useful, but WITHOUT
;;;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
;;;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
;;;;; for more details.
;;;;;
;;;;; You should have received a copy of the GNU General Public License
;;;;; along with LysKOM; see the file COPYING. If not, write to
;;;;; Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
;;;;; or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
;;;;; MA 02139, USA.
;;;;;
;;;;; Please mail bug reports to bug-lyskom@lysator.liu.se.
;;;;;
;;;; ================================================================
;;;; ================================================================
;;;;
;;;; File: vars.el
;;;;
;;;; This file contains almost all the variables used in lyskom.
;;;;
(defconst lyskom-clientversion-long
"$Id$\n"
"Version for every file in the client.")
(provide 'lyskom)
;;;; ================================================================
;;;; Emacs dependant variables
(defvar kom-emacs-knows-iso-8859-1 t
"*If non-nil then dont convert texts and other things to swascii.
This variable is not saved. It should be set in your .emacs
This variable is not saved in the LysKOM server.")
;;;; ================================================================
;;;; Variables and constants.
;;; User flags
(defvar kom-bury-buffers t
"*Controls the behaviour of kom-next-kom and its cousins.
If this variable is non-nil the current buffer is sent to the back
of the buffer list when one of the commands `kom-next-kom',
`kom-previous-kom' or `kom-next-unread-kom' is invoked.
This variable is stored in the LysKOM server.")
(defvar kom-write-texts-in-window nil
"*Nil means edit texts in the same window that is used for reading texts.
'other means edit in another window. Creating that window if necessary.
A buffer or buffer name means use the first window displaying that buffer.
If no window is displaying that buffer or the buffer does not exits then it
uses the same window.
This variable is stored in the LysKOM server.")
(defvar kom-prompt-format "%s"
"*Basic format for LysKOM prompts. Needs to be a valid format
string. The only format specifier should be a single \"%s\", which
will be replaced by the real prompt.
This variable is stored in the LysKOM server")
(defvar kom-cite-string ">"
"*String to insert before each line of a commented text.
This variable is stored in the LysKOM server.")
(defvar kom-created-texts-are-read t
"*Non-nil means automatically mark texts that you create as read.
This variable is stored in the LysKOM server.")
(defvar kom-dont-restore-window-after-editing nil
"*If non-nil then don't restore the window configuration after sending a text.
This variable is not saved in the LysKOM server.")
(defvar kom-default-mark 100
"*If non-nil (must be an integer) then the user is not asked for type of mark.
This variable is stored in the LysKOM server.")
(defvar kom-reading-puts-comments-in-pointers-last t
"*If Non-nil the texts are shown with comments references at the end.
This variable is stored in the LysKOM server.")
(defvar kom-dashed-lines t
"*If Non-nil then all texts will be surrounded by lines of dashes.
This variable is stored in the LysKOM server.")
(defvar kom-print-number-of-unread-on-entrance t
"*If Non-nil then print automatically the number of unread articles when
entering a conference.
This variable is stored in the LysKOM server.")
(defvar kom-presence-messages t
"*If non-nil, lyskom prints continuous info about what other people are doing.
Info is printed on the message line and never in the buffer. If minibuffer is
used then no message is printed.
If you want the messages in the buffer you could set the variable
kom-presence-messages-in-buffer.
This variable is stored in the LysKOM server.")
(defvar kom-presence-messages-in-buffer nil
"*If t, lyskom prints information about what other people are doing in buffer.
All printing is done just before the prompt.
If nil no messages are printed.
If 'presence then messages about people logging in, out and people
changing name is printed.
This variable is stored in the LysKOM server.")
(defvar kom-show-where-and-what t
"*Non-nil means kom-who-is-on shows from which machine the user is running
and what he is doing.
This variable is stored in the LysKOM server.")
(defvar kom-idle-hide 30
"*The number of minutes of idle-time before a user is excluded from the list
of users. This can be overridden by a prefix argument to `kom-who-is-on'.
This variable is not stored in the LysKOM server.")
(defvar kom-show-footnotes-immediately t
"*Non-nil means show footnotes immediately following the text.
This variable is stored in the LysKOM server.")
(defvar kom-follow-comments-outside-membership nil
"*Show comments in conferences you are not a member of.
If this variable is nil, texts with no recipient you are a member of
will not be shown.
This variable is stored in the LysKOM server.")
(defvar kom-who-buffer-size-when-displaying 10
"*Size of window to display the who-buffer.
This is used when executing the kom-display-who-buffer command.
This variable is stored in the LysKOM server.")
(defvar kom-read-depth-first t
"*Non-nil means read comments and footnotes to a text before other texts.
This variable is stored in the LysKOM server.")
(defvar kom-continuous-scrolling t
"*Non-nil means scroll LysKOM window as text is inserted. The last viewed
position (generally the most recent prompt) will always be visible.
This variable is stored in the LysKOM server.")
;; Should this be set to nil if baud-rate is low?
(defvar kom-deferred-printing t
"*Non-nil means delay printing of some information not in the cache.
You might want to turn this off to have the old, linear behaviour.
This variable is not stored in the LysKOM server.")
(defvar lyskom-defer-indicator "[...]")
(defvar kom-higher-priority-breaks nil
"*Non-nil means allow texts from conferences with highter priority to break in.
If the value is 'express then texts are allowed to break in the middle of a
comment chain. Otherwise we dont let them in until the end of the comment
tree.
This variable is stored in the LysKOM server.")
(defvar lyskom-view-text-hook nil
"*Hook that is called before a text is shown. When the hooks is
called, text is bound to the text mass of the text and text-stat to
the text-stat of the text to be shown.
This variable is not stored in the LysKOM server.")
(defvar lyskom-send-message-hook '(lyskom-send-message-trim-newlines)
"*Hook that is called before a personal, group or common message is sent.
When called, lyskom-message-string is bound to the message that will be sent
and lyskom-message-recipient to the conf-stat of the recipient or nil if
the recipient does not exist or if the message is a common message.
If lyskom-message-string is set to nil by a hook, the message will not
be sent.")
(defvar lyskom-send-message-setup-hook nil
"*Hook that is called when the minibuffer is entered to read a message.")
(defvar lyskom-send-message-exit-hook nil
"*Hook that is called when the minibuffer is exited after reading a message.")
(defvar lyskom-after-load-hook nil
"*Hook to run once after lyskom is loaded.
This variable is not saved in the LysKOM server.")
(defvar lyskom-login-hook nil
"*What to do when logged in.
This hook is called after we have logged in but before and command is
accepted from the keyboard. It is called immediately before
kom-login-hook.
This variable is not stored in the LysKOM server.")
(defvar kom-login-hook nil
"*What to do when logged in.
This is a list of commands that are executed after we have logged in but before
any command is accepted from the keyboard. See also lyskom-login-hook.
This variable is stored in the LysKOM server.")
(defvar kom-do-when-done '(kom-review-all-marked-texts kom-display-time)
"*What to do when all texts are read.
This is a list of commands and lists of commands that are prompted for
and executed when there are no more new texts. The last element in
the list is the one that will never be removed from the list.
A command can be one of:
type prompt
lyskom-function from the lyskom-command-name function.
command \"Kommandot:\" name of function or definition of
lambda expression
keyboard macro \"Kommandot:\" keyboard macro definition.
This variable is stored in the LysKOM server.")
(defvar kom-page-before-command nil
"*This is a list of all commands before which the screen is cleared.
If it isn't a list and isn't nil the screen is cleared before all commands.
This variable is stored in the LysKOM server.")
(defvar kom-permissive-completion nil
"*If t, completion on logged-in persons will usually also include
persons who are not logged in. Values other than t or nil are reserved
for future use.
This variable is stored in the LysKOM server.")
(defvar kom-membership-default-priority 100
"*Default priority when joining a new conference.
If a valid priority then new conferences are read with this priority.
Otherwise ask the user for a priority.
Valid priorities are only the range 0-255.
This variable is stored in the LysKOM server.")
(defvar kom-membership-default-placement 'last
"*Tells the system where to put new conferences.
The value can be one of the following:
'first => before all other conferences.
'last => after all other conferences.
a number => at that position
otherwise => the new conf is entered after all conferences.
This variable is stored in the LysKOM server.")
(defvar lyskom-prompt-text " - "
"*Text to end the prompt.
This variable is stored in the LysKOM server.")
(defvar lyskom-prompt-executing-default-command-text ". "
"*Text to end the prompt while the default-commands is executing.
This variable is stored in the LysKOM server.")
(defvar lyskom-current-prompt nil
"The current prompt or nil.
This is either nil, indicating that there is currently no prompt, or
one a symbol indcating which prompt is shown in the LysKOM buffer.
This variable is not saved in the LysKOM server.")
(defvar kom-show-personal-messages-in-buffer t
"*Buffer to show personal messages in.
If nil, discard them.
If t, insert them in the *kom* buffert.
If non-nil and non-t this should be a buffer or a name of a (possibly
nonexistent) buffer in which the message is inserted.
This variable is stored in the LysKOM server.")
(defvar kom-pop-personal-messages nil
"*Non-nil means pop up a buffer with personal messages as they arrive.
kom-show-personal-messages-in-buffer decides which buffer to pop.
This variable is stored in the LysKOM server.")
(defvar kom-ding-on-priority-break 1
"*Non-nil means ding if a higher priority text or conference breaks in.
A number means the number of times to ding. A string is an argument for the
program named by kom-audio-player.
This variable is stored in the LysKOM server.")
(defvar kom-ding-on-wait-done 1
"*Non-nil means ding when busy-waiting finishes.
A number means the number of times to ding. A string is an argument
for the program named by kom-audio-player. A symbol is interpreted as a
function to call.
This variable is stored in the LysKOM server.")
(defvar kom-ding-on-common-messages 0
"*Non-nil means ding as common messages arrive.
A number means the number of times to ding. A string is an argument for the
program named by kom-audio-player. A symbol is interpreted as a function to
call.
This variable is stored in the LysKOM server.")
(defvar kom-ding-on-group-messages 1
"*Non-nil means ding as group messages arrive.
A number means the number of times to ding. A string is an argument for the
program named by kom-audio-player. A symbol is interpreted as a function
to call.
This variable is stored in the LysKOM server.")
(defvar kom-ding-on-personal-messages 2
"*Non-nil means ding as personal messages arrive.
A number means the number of times to ding. A string is an argument for the
program named by kom-audio-player. A symbol is interpreted as a function
to call.
This variable is stored in the LysKOM server")
(defvar lyskom-ding-on-no-subject 2
"*How to ding if the user has not entered a subject line.
A number means the number of times to ding. A string is an argument for the
program named by kom-audio-player. A symbol is interpreted as a function
to call.
This variable is not saved in the LysKOM server.")
(defvar kom-audio-player "audioplay"
"*Program to play audio files.
This variable is not saved in the LysKOM server.")
(defvar kom-default-message-recipient 'group
"*Determines default recipient of personal messages.
everybody means the default recipient is everybody.
group means the default recipient is the group to which the last
message was sent, if it was a group message. If the last message
was a personal message or a common message, it means the same as
sender.
sender means the sender of the last message received.
This variable is stored in the LysKOM server.")
(defvar lyskom-filter-outgoing-messages t
"*t if outgoing remote-control messages and automatic replies are not
to be displayed in the buffer.
This variable is not saved in the LysKOM server.")
(defvar kom-friends nil
"*List of people whose names should be formatted using kom-friends-face.
This variable is stored in the LysKOM server.")
(defvar kom-default-face-scheme
(condition-case err
(cond ((null window-system) 'default)
((not (x-display-color-p)) 'monochrome)
((eq (cdr (assoc 'background-mode (frame-parameters))) 'dark)
'inverse)
(t 'default))
(error 'default))
"*Face scheme to use per default for new logins.
This variable is not saved in the LysKOM server.")
(defvar kom-text-properties t
"*Non-nil means to insert text properties in the Emacs buffer for
various LysKOM elements.
This variable is not saved in the LysKOM server.")
(defvar kom-use-button-hints t
"*Non-nil means use button hints for overriding default actions.
This variable is not saved in the LysKOM server.")
;;;
;;; lyskom-button-actions has been moved to swedish-strings.el on account
;;; of there being a bunch of language-dependent strings in it.
;;;
(defvar lyskom-text-buttons
'(
;; Text numbers
("\\(\\<[0-9][0-9][0-9][0-9]\\([0-9]\\)?\\([0-9]\\)?\\([0-9]\\)?\\>\\)"
; Match
text ; Button type
0 ; Portion that's a button
1 ; Portion that's the arg
nil ; Face or nil (=default)
)
;; URLs
("\\(file://\\|ftp://\\|gopher://\\|http://\\|https://\\|news:\\|wais://\\|mailto:\\|telnet:\\)[^\t \012
\"<>|\\]*[^\t \012
\"<>|.,!(){}?'`]"
url 0 nil kom-url-face)
;; JySKom enhancements
("<(m[|ö]te *\\([0-9]+\\)[^0-9]*)>" conf 0 1 nil)
("<(text *\\([0-9]+\\)[^0-9]*)>" text 0 1 nil)
("<(person *\\([0-9]+\\)[^0-9]*)>" pers 0 1 nil)
)
"List of buttons to install in the text mass of LysKOM objects. Each element is
a list consisting of REGEXP TYPE BUTTON-MATCH BUTTON-ARG-MATCH FACE.
REGEXP is the regexp to look for in the text.
TYPE is the button type. Valid button types are defined in lyskom-button-actions
BUTTON-MATCH is the number of the parenthesized expression that is the actual button.
BUTTON-ARG-MATCH is the number of the expression to used as the button argument.
FACE is the text face to apply to the button, or nil to use the default face.
This variable is not saved in the LysKOM server")
(defvar kom-url-viewer-preferences '("emacs"
"netscape"
"w3")
"*LysKOM will attempt to use URL viewers in the order specified here.
kom-url-managers is a list of all available viewers. Note that the elements
are all strings.
When you select an URL, this list is used to determine which URL
viewer to use in the following manner: Each element is in turn matched
against the manager regexp for each manager in kom-url-managers, and the
first manager found that matches is used to display the URL.
See kom-url-managers for a list of all available URL viewers. See
kom-netscape-command and kom-mosaic-command for information specific
to some URL viewers.
This variable is not saved in the LysKOM server.")
(defvar kom-url-managers '(("w3"
"\\(http\\|gopher\\|ftp\\)"
"Emacs W3"
lyskom-view-url-w3)
("netscape"
".*"
"Netscape Navigator"
lyskom-view-url-netscape)
("\\(emacs\\|dired\\)"
"\\(ftp\\|file\\)"
"dired"
lyskom-view-url-dired)
("\\(emacs\\|telnet-mode\\)"
"telnet"
"emacs telnet"
lyskom-view-url-telnet)
("\\(emacs\\|mail-mode\\)"
"mailto"
"mail-mode"
lyskom-view-url-mailmode)
("mosaic"
"\\(http\\|gopher\\|ftp\\|mailto\\|news\\|wais\\|file\\|te|net\\)"
lyskom-view-url-mosaic))
"List of URL managers. Each element is a list consisting of
(MANAGER-REGEXP PROTOCOLS NAME VIEW-FUNCTION). When LysKOM attempts to
view an URL, kom-url-viewer-preferences is scanned, and the URL
manager whose MANAGER-REGEXP first matches an element in
kom-url-viewer-preferences and whose PROTOCOLS matches the protocol of
the selected URL is used to view the URL by calling its VIEW-FUNCTION
with the URL and the manager entry as arguments.
This variable is not saved in the LysKOM server.")
(defvar kom-mosaic-command "/usr/local/bin/mosaic"
"*Command to run to start Mosaic
This variable is not saved in the LysKOM server.")
(defvar kom-netscape-command "netscape"
"*Command to run to start Netscape.
If a string, it should be a command that starts Netscape with no
arguments. If a list, the first element must be a command that starts
Netscape. The remaining elements are used as arguments to Netscape.
For instance, a value of \"netscape\" is valid, but \"netscape -d host:0\"
is not. Instead, the latter should be \(\"netscape\" \"-d\" \"host:0\"\)
This variable is not saved in the LysKOM server.")
(defvar kom-confirm-multiple-recipients 'after
"*Non-nil means ask the user for confirmation about recipients.
When the user writes a comment to a text with more than one recipient
he gets a y-or-n-p question for all recipients. 'before means check
before opening the edit buffer. Anything else means check before
sending the article.
This variable is stored in the LysKOM server.")
(defvar kom-check-commented-author-membership t
"*Non-nil means check that the authors of the commented texts are
members of at least one of the recipient conferences. If not, offer to
add them as recipients.
This variable is saved in the LysKOM server.")
(defvar kom-inhibit-typeahead nil
"*If non-nil, discard keyboard input that arrives while a LysKOM command is
executing.
This variable is saved in the LysKOM server.")
(defvar kom-max-buffer-size nil
"*If non-nil, ensure that buffers won't grow any larger than this
This variable is not saved in the LysKOM server.")
(defvar lyskom-print-complex-dates (and (>= emacs-minor-version 29)
(>= emacs-major-version 19))
"If non-nil, print today and yesterday using a special format. Doesn't
work very well with Emacs 19.28 or older. You may want to set this to nil,
but never set it to non-nil explicitly.
This variable is not saved in the LysKOM server.")
(defvar kom-server-aliases
'(("kom.lysator.liu.se" . "LysKOM")
("kom.ludd.luth.se" . "LuddKOM")
("rydkom.rydnet.lysator.liu.se" . "RydKOM")
("kom.csd.uu.se" . "CSD-KOM")
("striterax.medio.mh.se" . "MedioKOM")
("kom.mds.mdh.se" . "MdS-KOM"))
"*An alist mapping server names to shorter identification strings
This variable is not saved in the LysKOM server.")
(defvar kom-ansaphone-on nil
"t if automatic replies to personal messages are in effect.")
(defvar kom-ansaphone-record-messages t
"*t if messages are recorded while the ansaphone is on.
This variable is stored in the lyskom server.")
(defvar kom-ansaphone-show-messages t
"*t if messages are to be shown when they are recorded.
This variable is stored in the LysKOM server.")
(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.")
(defvar kom-remote-control t
"*t if LysKOM may be remotely controlled.
This variable is stored in the LysKOM server.")
(defvar kom-remote-controllers nil
"*Persons who may control LysKOM using messages.By default you can
always control your own sessions. See kom-self-control for more
information.
This variable is stored in the LysKOM server.")
(defvar kom-self-control t
"*If non-nil, remote control commands are accepted from sessions logged
in as the same user as the current session.
This variable is stored in the LysKOM server.")
(defvar kom-ansaphone-replies
'((group nil nil nil nil)
(common nil nil nil nil))
"*List of automatic replies to various messages.
A list of (MESSAGE-TYPE SENDER RECIPIENT TEXT REPLY)
MESSAGE-TYPE is one of personal, group or common or nil
SENDER is a list of integers or a single integer or nil
RECIPIENT is a list of integers or a single integer or nil
TEXT is a regular expression or nil
REPLY is a string or nil
When an incoming message arrives and the auto-reply facility is on,
this list is checked for automatic replies. The message type, sender,
recipient and text of the incoming messages is matched against the
elements of this list. If a match is found, the corresponding reply is
send. A nil in one of the message-type, sender, recipient or text
components in the list is taken to mean a wildcard. A null reply means
don't send a reply.
If none of the elements match, KOM-ANSAPHONE-DEFAULT-REPLY is sent.