Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lyskom-elisp-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lyskom-elisp-client
lyskom-elisp-client
Commits
35af28db
Commit
35af28db
authored
33 years ago
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
Better handling of personal messages.
parent
24785781
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/ChangeLog
+22
-0
22 additions, 0 deletions
src/ChangeLog
src/async.el
+31
-4
31 additions, 4 deletions
src/async.el
src/vars.el
+21
-0
21 additions, 0 deletions
src/vars.el
with
74 additions
and
4 deletions
src/ChangeLog
+
22
−
0
View file @
35af28db
No preview for this file type
This diff is collapsed.
Click to expand it.
src/async.el
+
31
−
4
View file @
35af28db
...
...
@@ -263,9 +263,33 @@ Args: SENDER: conf-stat for the person issuing the broadcast message or a
RECIPIENT: 0 if this message is for everybody, otherwise the pers-no
of the user.
MESSAGE: A string containing the message."
(
lyskom-insert-before-prompt
(
cond
((
eq
kom-show-personal-messages-in-buffer
t
)
(
lyskom-insert-personal-message
sender
recipient
message
'lyskom-insert-before-prompt
))
((
null
kom-show-personal-messages-in-buffer
))
(
t
(
lyskom-save-excursion
(
set-buffer
(
get-buffer-create
kom-show-personal-messages-in-buffer
))
(
goto-char
(
point-max
))
(
lyskom-insert-personal-message
sender
recipient
message
'insert
))))
(
run-hooks
'lyskom-personal-message-hook
))
(
defun
lyskom-insert-personal-message
(
sender
recipient
message
insert-function
)
"Insert a personal message in the current buffer.
Arguments: SENDER RECIPIENT MESSAGE INSERT-FUNCTION.
SENDER is a pers-stat (possibly nil) or a string.
RECIPIENT is 0 if the message is public, otherwise the pers-no of the user.
MESSAGE is a string containing the message.
INSERT-FUNCTION is a function that given a string inserts it into the
current buffer."
(
funcall
insert-function
"\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"
)
(
lyskom-insert-before-prompt
(
funcall
insert-function
(
if
(
=
recipient
0
)
(
lyskom-format
'message-broadcast
(
cond
...
...
@@ -281,9 +305,12 @@ Args: SENDER: conf-stat for the person issuing the broadcast message or a
(
t
(
lyskom-get-string
'unknown
)))
message
(
substring
(
current-time-string
)
11
19
))))
(
lyskom-insert-before-prompt
(
funcall
insert-function
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"
)
(
beep
))
(
if
kom-pop-personal-messages
(
pop-to-buffer
(
current-buffer
)))
(
if
kom-ding-on-personal-messages
(
beep
)))
;;; ================================================================
...
...
This diff is collapsed.
Click to expand it.
src/vars.el
+
21
−
0
View file @
35af28db
...
...
@@ -151,7 +151,20 @@ otherwise => the new conf is entered after all conferences.")
(
defvar
lyskom-prompt-executing-default-command-text
". "
"*Text to end the prompt while the default-commands is executing."
)
(
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."
)
(
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."
)
(
defvar
kom-ding-on-personal-messages
t
"*Non-nil means ding as personal messages arrive.
Non-nil and non-t means only ding when they really are personal."
)
(
defconst
lyskom-elisp-variables
'
(
kom-do-when-done
...
...
@@ -422,6 +435,14 @@ The hook is run with current-buffer the lyskom buffer, not the who-info-buffer."
"*Hook to run when we have logged in. Other purposes than kom-do-when-starting.
This could be set in the user-area."
)
(
defvar
lyskom-personal-message-hook
nil
"*Hook to run when a personal message is received.
When the hook is run 'sender' is bound to the pers-stat of the sender
of the message (or possibly nil), 'recipient' is 0 if the message is a
public message and otherwise the pers-no of the user, and 'message' is
a string that holds the message."
)
(
defvar
lyskom-executing-command
t
"Non-nil means the client is executing a command.
Most commands can't be interrupted by another command."
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment