Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
dcaab97b
Commit
dcaab97b
authored
Sep 02, 2000
by
David Byers
Browse files
Fixed bugs.
Removed obsolete files.
parent
0d319168
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
dcaab97b
Sat Sep 2 14:24:57 2000 David Byers <davby@sen2.ida.liu.se>
* slow.el (lyskom-expand-slow-command): Use
lyskom-slow-list-completions to sort possible completions.
(lyskom-slow-list-completions): New function.
(kom-slow-list-completions): Use lyskom-slow-list-completions.
* compatibility.el (char-before): New compatibility definition.
2000-09-02 David Byers <davby@sen2.ida.liu.se>
* utilities.el (lyskom-maybe-frob-completion-table): Add third
argument to lyskom-recode-string.
* lyskom-buttons.el (lyskom-make-button-menu): Add third argument
to lyskom-recode-string.
2000-09-01 David Byers <davby@sen2.ida.liu.se>
* slow.el (kom-slow-click-or-yank): Fixed typo.
* Release of 0.46-BETA-W
2000-09-01 David Byers <davby@ida.liu.se>
...
...
src/compatibility.el
View file @
dcaab97b
...
...
@@ -164,6 +164,22 @@ KEYS should be a string in the format used for saving keyboard macros
;;;
(
lyskom-provide-macro
char-before
(
&optional
pos
buffer
)
`
(
save-excursion
(
save-restriction
(
widen
)
,@
(
if
buffer
`
((
set-buffer
,
buffer
)))
,
(
if
pos
`
(
if
(
or
(
>
,
pos
(
point-max
))
(
<=
,
pos
(
point-min
)))
nil
(
goto-char
,
pos
)
(
preceding-char
))
`
(
if
(
<=
(
point
)
(
point-min
))
nil
(
preceding-char
))))))
(
lyskom-provide-function
characterp
(
obj
)
(
integerp
obj
))
...
...
src/distribution-README
View file @
dcaab97b
---------------------------------------------------------------------------
The
LysKOM
Emacs
Lisp
Client
---------------------------------------------------------------------------
LysKOM
is
a
project
in
progress
at
the
Lysator
Academic
Computing
...
...
@@ -109,9 +104,8 @@
in
a
zip
file
.
The
archive
contains
all
the
files
needed
to
build
the
client
and
a
pre
-
built
client
.
The
client
is
also
available
as
an
RPM
(
for
RedHat
,
Mandrake
,
Gentus
and
other
RedHat
-
based
Linux
distributions
)
and
a
Debian
package
.
These
assume
that
you
are
using
Gnu
Emacs
20.5
or
later
.
The
client
is
also
available
as
an
RPM
and
a
Debian
package
.
These
assume
that
you
are
using
Gnu
Emacs
20.5
or
later
.
You
can
either
install
manually
(
see
section
3.1
)
or
using
the
Makefile
(
section
3.3
).
However
you
install
,
there
are
a
few
...
...
src/lyskom-buttons.el
View file @
dcaab97b
...
...
@@ -161,15 +161,15 @@ If there is no active area, then do something else."
;; Use the command as the event for simplicity. Note that the menu
;; function alters the menu, so we copy the entries to prevent it
;; from fiddling with lyskom-button-actions.
(
let
((
title
(
lyskom-maybe-recode-string
title
'iso-8859-1
)))
(
let
((
title
(
lyskom-maybe-recode-string
title
'iso-8859-1
t
)))
(
when
(
>
(
length
title
)
44
)
(
setq
title
(
concat
(
substring
title
0
40
)
" ..."
)))
(
cond
((
string-match
"XEmacs"
(
emacs-version
))
(
cons
(
lyskom-maybe-recode-string
title
'iso-8859-1
)
(
cons
(
lyskom-maybe-recode-string
title
'iso-8859-1
t
)
(
mapcar
(
function
(
lambda
(
entry
)
(
vector
(
lyskom-maybe-recode-string
(
lyskom-get-string
(
car
entry
))
'iso-8859-1
)
(
lyskom-get-string
(
car
entry
))
'iso-8859-1
t
)
(
list
(
cdr
entry
)
buf
(
if
(
listp
arg
)
...
...
@@ -183,7 +183,7 @@ If there is no active area, then do something else."
(
let
((
tmp
(
copy-tree
entry
)))
(
setcar
tmp
(
lyskom-maybe-recode-string
(
lyskom-get-string
(
car
tmp
))
'iso-8859-1
))
'iso-8859-1
t
))
(
cons
(
`
((
,
(
cdr
entry
))
(
,
buf
)
(
,
arg
)
...
...
src/lyskom-rest.el
View file @
dcaab97b
...
...
@@ -3587,8 +3587,8 @@ One parameter - the prompt string."
`
(
kom-show-unread-in-frame-title
(
lyskom-session-has-unreads
(
" ("
((
lyskom-session-has-unreads
,
(
lyskom-maybe-recode-string
(
lyskom-get-string
'frame-title-unread
)
'iso-8859-1
))
(
lyskom-session-has-unread-letters
,
(
lyskom-maybe-recode-string
(
lyskom-get-string
'frame-title-letters
)
'iso-8859-1
)))
((
lyskom-session-has-unreads
,
(
lyskom-maybe-recode-string
(
lyskom-get-string
'frame-title-unread
)
'iso-8859-1
t
))
(
lyskom-session-has-unread-letters
,
(
lyskom-maybe-recode-string
(
lyskom-get-string
'frame-title-letters
)
'iso-8859-1
t
)))
")"
))))
(
add-hook
'kill-buffer-hook
'lyskom-remove-buffer-from-lists
)
...
...
src/makealfa.l
deleted
100644 → 0
View file @
0d319168
%%
"clientversion \"0."[.0-9]+ { printf("%s.alfa",yytext); }
%%
\ No newline at end of file
src/slow.el
View file @
dcaab97b
...
...
@@ -93,10 +93,10 @@ Currently the prompt is assumed to be on the last line of the buffer."
(
interactive
"@e"
)
(
let
((
pos
(
event-closest-point
event
)))
(
if
(
and
(
lyskom-slow-on-prompt-line
pos
)
(
<=
(
save-excursion
(
lyskom-slow-start-of-line
)
pos
)))
(
<=
(
lyskom-slow-start-of-line
)
pos
)))
(
let
((
fn
(
lookup-key
global-map
(
this-command-keys
))))
(
when
(
commandp
fn
)
(
call-interactively
fn
)))
(
kom-button-click
event
)))
)
(
kom-button-click
event
)))
(
defun
kom-slow-button-press
()
"Run kom-button-press unless on the prompt line."
...
...
@@ -160,9 +160,7 @@ Currently the prompt is assumed to be on the last line of the buffer."
longest
)))
(
when
(
lyskom-string=
(
lyskom-unicase
longest
)
(
lyskom-unicase
text
))
(
if
(
or
have-space
eager-completion
)
(
lyskom-format-insert-before-prompt
'command-completions
(
mapconcat
'identity
completes
"\n "
)))
(
lyskom-slow-list-completions
completes
))
(
unless
(
or
eager-completion
(
eq
?\
(
char-before
(
point
)))
(
insert
" "
))))
))
(
t
(
signal
'lyskom-internal-error
'
()))))))
...
...
@@ -210,15 +208,19 @@ If the completion was not exact it returns nil."
(
delete-region
(
cdr
command
)
(
point-max
))
(
call-interactively
(
car
command
))))))
(
defun
lyskom-slow-list-completions
(
completes
)
"List strings in COMPLETES as possible completions for a command."
(
cond
(
completes
(
lyskom-format-insert-before-prompt
'command-completions
(
mapconcat
'identity
(
sort
completes
'string-lessp
)
"\n "
)))
(
t
(
lyskom-insert-before-prompt
(
lyskom-get-string
'no-such-command
)))))
(
defun
kom-slow-list-completions
()
(
interactive
)
(
save-excursion
(
let*
((
text
(
lyskom-get-entered-slow-command
))
(
completes
(
and
text
(
all-completions
text
'lyskom-complete-command
))))
(
cond
(
completes
(
lyskom-format-insert-before-prompt
'command-completions
(
mapconcat
'identity
completes
"\n "
)))
(
t
(
lyskom-insert-before-prompt
(
lyskom-get-string
'no-such-command
)))))))
(
lyskom-slow-list-completions
(
all-completions
(
or
(
lyskom-get-entered-slow-command
)
""
)
'lyskom-complete-command
))))
(
defun
kom-slow-mode
()
...
...
src/test-async/test-async.el
deleted
100644 → 0
View file @
0d319168
;;;;;
;;;;; $Id$
;;;;; Copyright (C) 1991 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 1, 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.
;;;;;
(
defun
lyskom-parse-async
(
tokens
buffer
)
"Parse an asynchronous message from the server.
The message consists of TOKENS tokens. Unknown messages are skipped.
Actions are taken to perform the various tasks that is required on reciept of
an asynchronous message.
If variable kom-presence-messages is non-nil or some minibuffer editing is
going on then nothing is printed on the message area.
This function is called with the lyskom-unparsed-buffer as current-buffer.
All calls using the lyskom-variables have to be made using the buffer BUFFER.
Be careful when editing this. All parsing is done with the buffer this
function is called with as the current-buffer, while all calls from
this function shall be with current-buffer the BUFFER."
(
let
((
msg-no
(
lyskom-parse-num
)))
(
cond
((
eq
msg-no
0
)
; New text
(
let*
((
text-no
(
lyskom-parse-num
))
(
text-stat
(
lyskom-parse-text-stat
text-no
)))
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
lyskom-call-hook
'lyskom-new-text-hook
text-stat
)
(
lyskom-call-hook
'kom-new-text-hook
text-stat
)
;;(lyskom-async-new-text text-stat);;OLD-OLD-OLD
)))
;
((
eq
msg-no
1
)
; Logout
(
let
((
pno
(
lyskom-parse-num
)))
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
lyskom-call-hook
'lyskom-logout-hook
pno
)
(
lyskom-call-hook
'kom-logout-hook
pno
)
;;(if (and (not (zerop lyskom-pers-no));;OLD-OLD-OLD
;; (or kom-presence-messages
;; kom-presence-messages-in-buffer))
;; (initiate-get-conf-stat 'follow 'lyskom-show-logged-out-person
;; pno));;OLD-OLD-OLD
)))
((
eq
msg-no
2
)
; Login, obsolete.
(
lyskom-skip-tokens
tokens
))
((
eq
msg-no
3
)
; Conference deleted
(
lyskom-skip-tokens
tokens
))
((
eq
msg-no
4
)
; Conference created
(
lyskom-skip-tokens
tokens
))
((
eq
msg-no
5
)
; A person or conference has changed name.
(
let
((
conf-no
(
lyskom-parse-num
))
(
old-name
(
lyskom-parse-string
))
(
new-name
(
lyskom-parse-string
)))
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
lyskom-call-hook
'lyskom-name-change-hook
conf-no
old-name
new-name
)
(
lyskom-call-hook
'kom-name-change-hook
conf-no
old-name
new-name
)
;;(cache-del-conf-stat conf-no) ;+++Borde {ndra i cachen i st{llet.
;;(cond
;; ((lyskom-is-in-minibuffer))
;; (kom-presence-messages
;; (message (concat old-name " har nu bytt namn till " new-name))))
;;(cond
;; (kom-presence-messages-in-buffer
;; (lyskom-insert-before-prompt
;; (concat old-name " har nu bytt namn till " new-name "\n"))))
)))
((
eq
msg-no
6
)
;i_am_on - something is moving
(
let
((
info
(
lyskom-parse-who-info
)))
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
lyskom-call-hook
'lyskom-i-am-on-hook
info
)
(
lyskom-call-hook
'kom-i-am-on-hook
info
)
;;(if (zerop lyskom-pers-no)
;; nil
;; (if (and (/= (who-info->pers-no info) 0)
;; (/= (who-info->pers-no info) lyskom-pers-no))
;; ;Don't show myself.
;; (initiate-get-conf-stat 'follow
;; 'lyskom-show-changed-person
;; (who-info->pers-no info)
;; (who-info->working-conf info)
;; (who-info->doing-what info)))
;; (if (/= (who-info->working-conf info) 0)
;; (initiate-get-conf-stat 'void nil
;; (who-info->working-conf info))))
)))
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
((
eq
msg-no
7
)
; Database is syncing.
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
if
(
and
(
not
(
lyskom-is-in-minibuffer
))
kom-presence-messages
)
(
message
"Databasen synkas. V{nta ett bra tag!"
))
(
setq
mode-line-process
": saving"
)
(
set-buffer-modified-p
(
buffer-modified-p
))
(
sit-for
0
)
(
if
(
not
lyskom-pending-calls
)
(
initiate-get-time
'async
nil
))))
((
eq
msg-no
8
)
; Forced leave conference
(
lyskom-skip-tokens
tokens
))
((
eq
msg-no
9
)
; A person has logged in
(
let
((
pers-no
(
lyskom-parse-num
))
(
session
(
lyskom-parse-num
)))
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
if
(
and
(
/=
0
lyskom-pers-no
)
(
/=
pers-no
lyskom-pers-no
))
; Don't show myself.
(
initiate-get-conf-stat
'follow
(
if
kom-presence-messages
'lyskom-show-logged-in-person
nil
)
pers-no
)))))
((
eq
msg-no
10
)
; Broadcast message
(
let
((
sender
(
lyskom-parse-num
))
(
message
(
lyskom-parse-string
)))
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
initiate-get-conf-stat
'follow
'lyskom-show-broadcast-message
sender
message
))))
((
eq
msg-no
11
)
(
lyskom-save-excursion
(
set-buffer
buffer
)
(
lyskom-insert-before-prompt
"\
===========================================================
Meddelande
fr}n
LysKOM-systemet:
N}gon
f|rs|kte
koppla
upp,
men
misslyckades
eftersom
alla
tillg{ngliga
f
|
rbindelser
{r
upptagna.
Logga
ut
och
kom
tillbaks
senare
om
du
v{ntar
nu.
===========================================================\n
")))
((eq msg-no 12) ; Message to the user (or everybody)
(let ((recipient (lyskom-parse-num))
(sender (lyskom-parse-num))
(message (lyskom-parse-string)))
(lyskom-save-excursion
(set-buffer buffer)
(cond
((string= message "
info
")
(initiate-send-message 'follow nil sender
(format "
emacs-version
%s\n%s
"
emacs-version
(
save-excursion
(
goto-char
(
point-min
))
(
forward-line
3
)
(
buffer-substring
(
point-min
)
(
point
))))))
(
t
(
initiate-get-conf-stat
'follow
'lyskom-show-personal-message
sender
recipient
message
)))))
)
(
t
(
lyskom-skip-tokens
tokens
))
)))
\ No newline at end of file
src/utilities.el
View file @
dcaab97b
...
...
@@ -312,9 +312,12 @@ TYPE should be `list' or `vector'."
"\000\001\002\003\004\005\006\007\010 \012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]~\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237!AAAA[]ACEEEEIIIINOOOO\\OUUUYYAAAA[]ACEEEEIIIINOOOO\\OUUUYY"
"String mapping lowercase to uppercase and equivalents to each others."
)
(
defsubst
lyskom-maybe-recode-string
(
s
&optional
coding
)
"Change the encoding of S when multibyte characters are not supported"
(
if
(
multibyte-string-p
s
)
(
defsubst
lyskom-maybe-recode-string
(
s
&optional
coding
force
)
"Change the encoding of S for when multibyte characters are not supported.
Optional second argument CODING is the coding system to use. If optional
third argument FORCE is non-nil, always encode multibyte strings, otherwise
only encode when multibyte strings are not supported."
(
if
(
and
(
multibyte-string-p
s
)
(
or
force
(
not
enable-multibyte-characters
)))
(
encode-coding-string
s
(
or
coding
(
and
lyskom-language
(
lyskom-language-coding
lyskom-language
))
...
...
@@ -327,11 +330,11 @@ characters are enabled. This function is destructive unless optional copy
is non-nil."
(
cond
(
enable-multibyte-characters
table
)
(
copy
(
mapcar
(
lambda
(
el
)
(
cons
(
lyskom-maybe-recode-string
(
car
el
))
(
cons
(
lyskom-maybe-recode-string
(
car
el
)
nil
t
)
(
cdr
el
)))
table
))
(
t
(
lyskom-traverse
el
table
(
setcar
el
(
lyskom-maybe-recode-string
(
car
el
))))
(
setcar
el
(
lyskom-maybe-recode-string
(
car
el
)
nil
t
)))
table
)))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment