Commit 9252c9f7 authored by David Byers's avatar David Byers
Browse files

Bugfixes

parent 310770a8
No preview for this file type
......@@ -505,9 +505,10 @@ otherwise: the conference is read with lyskom-completing-read."
(lyskom-send-message 0 message))
(defun lyskom-send-message (pers-no message)
"Send a message to the person with the number CONF-NO. CONF-NO == 0
means send the message to everybody."
(defun lyskom-send-message (pers-no message &optional dontshow)
"Send a message to the person with the number PERS-NO. PERS-NO == 0
means send the message to everybody. MESSAGE is the message to
send. If DONTSHOW is non-nil, don't display the sent message."
(let* ((string (or message
(lyskom-read-string (lyskom-get-string 'message-prompt))))
(reply (blocking-do 'send-message pers-no string))
......@@ -515,13 +516,14 @@ means send the message to everybody."
nil
(blocking-do 'get-conf-stat pers-no))))
(if reply
(lyskom-handle-as-personal-message
(if to-conf-stat
(lyskom-format 'message-sent-to-user
string to-conf-stat)
(lyskom-format 'message-sent-to-all string))
lyskom-pers-no
lyskom-filter-outgoing-messages)
(if (not dontshow)
(lyskom-handle-as-personal-message
(if to-conf-stat
(lyskom-format 'message-sent-to-user
string to-conf-stat)
(lyskom-format 'message-sent-to-all string))
lyskom-pers-no
lyskom-filter-outgoing-messages))
(lyskom-format-insert-before-prompt 'message-nope
(or to-conf-stat
(lyskom-get-string 'everybody))
......
......@@ -981,8 +981,7 @@ Text:
"The swascii version of lyskom-filter-what")
(defvar lyskom-text-start "
[0-9]+ 199[0-9]-[0-1][0-9]-[0-3][0-9] +[0-2][0-9]:[0-5][0-9] /[0-9]+ line\\(s\\)?/ "
(defvar lyskom-text-start "[0-9]+ +\\(199[0-9]-[0-1][0-9]-[0-3][0-9]\\|today\\|yesterday\\) +[0-2][0-9]:[0-5][0-9] +/[0-9]+ line\\(s\\)?/ "
"Regexp matching beginning of a article in LysKOM buffer.
Cf. paragraph-start.")
......
No preview for this file type
......@@ -170,7 +170,8 @@ Value returned is always nil."
(cdr (car call-list)))
(setq call-list (cdr call-list)))
(lyskom-use 'blocking 'lyskom-blocking-do-multiple-1)
(while (eq lyskom-multiple-blocking-return 'not-yet-gotten)
(while (and (eq lyskom-multiple-blocking-return 'not-yet-gotten)
(not lyskom-quit-flag))
(accept-process-output))
lyskom-multiple-blocking-return))
......
......@@ -78,7 +78,8 @@ turn auto-reply on, off turn it off and nil toggle its state."
session-no
(cond ((eq state 'on) "on")
((eq state 'off) "off")
(t ""))))))
(t "")))
t)))
(def-kom-command kom-remote-set-message (&optional session-no message)
"Remotely set the default reply message of another client.
......@@ -97,7 +98,8 @@ Optional argument MESSAGE specifies the message."
(format "Remote-command: %d %d\nset message\n%s"
lyskom-session-no
session-no
message))))
message)
t)))
(def-kom-command kom-remote-list-messages (&optional session-no)
"List messages collected from a remote auto-reply facility.
......@@ -111,7 +113,8 @@ Optional argument SESSION-NO specifies the target session."
(lyskom-send-message (session-info->pers-no info)
(format "Remote-command: %d %d\nlist messages\n"
lyskom-session-no
session-no))))
session-no)
t)))
......@@ -127,7 +130,8 @@ Optional argument SESSION-NO specifies the target session."
(lyskom-send-message (session-info->pers-no info)
(format "Remote-command: %d %d\nerase messages\n"
lyskom-session-no
session-no))))
session-no)
t)))
(def-kom-command kom-remote-quit (&optional session-no)
......@@ -142,7 +146,8 @@ Optional argument SESSION-NO specifies the target session."
(lyskom-send-message (session-info->pers-no info)
(format "Remote-command: %d %d\nquit\n"
lyskom-session-no
session-no))))
session-no)
t)))
;;;============================================================
;;;
......
......@@ -1011,8 +1011,7 @@ Text:
(defvar lyskom-swascii-filter-what nil
"The swascii version of lyskom-filter-what")
(defvar lyskom-text-start "
[0-9]+ 199[0-9]-[0-1][0-9]-[0-3][0-9] +[0-2][0-9]:[0-5][0-9] /[0-9]+ rad\\(er\\)?/ "
(defvar lyskom-text-start "[0-9]+ +\\(199[0-9]-[0-1][0-9]-[0-3][0-9]\\|idag\\|igr\\) +[0-2][0-9]:[0-5][0-9] +/[0-9]+ rad\\(er\\)?/ "
"Regexp matching beginning of a text in lyskom buffer.
Cf. paragraph-start.")
......
......@@ -343,8 +343,12 @@ kom-url-managers is a list of all available viewers.")
lyskom-view-url-mosaic))
"List of URL managers. Each element is a list consisting of
(MANAGER_REGEXP . VIEW_FUNCTION). Manager regexp is matched against
the user's kom-url-viewer setting.")
(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.")
(defvar kom-mosaic-command "/usr/local/bin/mosaic"
"*Command to run to start Mosaic")
......@@ -359,7 +363,7 @@ he gets a y-or-n-p question for all recipients.")
(defvar kom-max-buffer-size nil
"*If non-nil, ensure that buffers won't grow any larger than this")
(defvar lyskom-print-complex-dates (and (>= emacs-minor-version 28)
(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.")
......@@ -372,10 +376,53 @@ he gets a y-or-n-p question for all recipients.")
("kom.mds.mdh.se" . "MdS-KOM"))
"An alist mapping server names to shorter identification strings")
(defvar kom-ansaphone-on nil
"t if automatic replies to personal messages are in effect.")
(defvar kom-remote-control t
"*t if LysKOM may be remotely controlled.")
(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.")
(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.")
(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.")
(defconst lyskom-elisp-variables
'(kom-ding-on-personal-messages
kom-ding-on-group-messages
kom-ding-on-common-messages
kom-ding-on-priority-break
kom-show-personal-messages-in-buffer
kom-pop-personal-messages
kom-do-when-done
kom-higher-priority-breaks
kom-login-hook
......@@ -394,6 +441,8 @@ he gets a y-or-n-p question for all recipients.")
kom-remote-controllers
kom-ansaphone-on
kom-ansaphone-default-reply
kom-ansaphone-replies
kom-show-footnotes-immediately
lyskom-fetch-map-nos
lyskom-new-text-hook
lyskom-prefetch-conf-tresh
......@@ -705,52 +754,14 @@ This is used by the command kom-busy-wait.")
"Hook to run when the LysKOM session is correctly ended.")
(defvar kom-quit-when-idle t
"*Non-niil to automatically quit when LysKOM is full and the session is idle")
(defvar kom-ansaphone-on nil
"t if automatic replies to personal messages are in effect.")
(defvar kom-remote-control t
"*t if LysKOM may be remotely controlled.")
(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.")
(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.")
"Non-niil to automatically quit when LysKOM is full and the session is idle")
(defvar kom-permanent-filter-list nil
"*List of patterns to filter permanently")
"List of patterns to filter permanently")
(defvar kom-session-filter-list nil
"List of patterns to filter during this session")
(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.")
(defvar lyskom-filter-list nil
"List of patterns that are filtered.")
......@@ -895,6 +906,17 @@ the value of kom-tell-phrases for fun.")
nil
(,@ body))))
(defun lyskom-set-face-foreground (face color)
(condition-case error
(set-face-foreground face color)
(error nil)))
(defun lyskom-set-face-background (face color)
(condition-case error
(set-face-background face color)
(error nil)))
(put 'lyskom-make-face 'lisp-indent-function 1)
(when (eq window-system 'x)
......@@ -904,22 +926,22 @@ the value of kom-tell-phrases for fun.")
;; Face for text buttons and other KOM buttons
(lyskom-make-face 'kom-active-face
(copy-face 'default 'kom-active-face)
(set-face-foreground 'kom-active-face
(lyskom-set-face-foreground 'kom-active-face
(if dark-bg "lightblue" "blue4")))
;; Face for URL buttons
(lyskom-make-face 'kom-url-face
(copy-face 'default 'kom-url-face)
(set-face-foreground 'kom-url-face
(lyskom-set-face-foreground 'kom-url-face
(if dark-bg "Moccasin" "BlueViolet")))
;; Face for highlighting you own name
(lyskom-make-face 'kom-me-face
(copy-face 'bold 'kom-me-face)
(set-face-foreground 'kom-me-face "gold")
(set-face-background 'kom-me-face "black"))
(lyskom-set-face-foreground 'kom-me-face "gold")
(lyskom-set-face-background 'kom-me-face "black"))
;; Not sure what this is for
(lyskom-make-face 'kom-highlight-face
(copy-face 'highlight 'kom-highlight-face)
(set-face-foreground 'kom-highlight-face
(lyskom-set-face-foreground 'kom-highlight-face
"midnight blue"))
;; This face is not used at the moment (960226)
(lyskom-make-face 'kom-text-face
......@@ -927,7 +949,7 @@ the value of kom-tell-phrases for fun.")
;; Face for the subject string
(lyskom-make-face 'kom-subject-face
(copy-face 'kom-text-face 'kom-subject-face)
(set-face-foreground 'kom-subject-face
(lyskom-set-face-foreground 'kom-subject-face
(if dark-bg "Khaki" "dark green")))
;; Not used (960226)
(lyskom-make-face 'kom-text-no-face
......
Supports Markdown
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