Skip to content
GitLab
Menu
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
ee56b4c0
Commit
ee56b4c0
authored
May 11, 1992
by
Linus Tolke
Browse files
New command mode: Långsamma kommandon.
parent
91b491c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
ee56b4c0
Mon May 11 03:50:07 1992 Linus Tolke Y (linus@robin)
* swedish-strings.el (kom-slow-mode, kom-quick-mode,
kom-slow-mode-map, lyskom-parse-command-and-execute): New
command-giving mode for the swedish-client. Commands can be
typed in and are parsed when return is pressed. No arguments can
yet be given in this way!
* startup.el (lyskom-mode): LysKOM-buffer no longer in read-only
mode.
* clienttypes.el, cache.el, view-text.el (textpointers): removed
the special pointer-representation of the texts. They are now
deleted from the cache when read.
...
...
src/swedish-strings.el
View file @
ee56b4c0
...
...
@@ -412,7 +412,7 @@ Ditt allm\344nna meddelande l\366d:
(buggreport-compilestart . "
Compiling...
")
(buggreport-compileend . "
Compiling...done
")
(buggreport-description . "
Detta
gjorde
jag:
(
Fyll
i
dina
kommenarer
)
\n\n\n
(
Fyll
i
dina
kommen
t
arer
)
\n\n\n
Nr
du
skrivit
klart
skall
du
skicka
in
din
buggrapport
till
LysKOM-utvecklarna.
Det
sker
antingen
med
email
till
bug-lyskom@lysator.liu.se
eller
i
Lysators
LysKOM
till
mtet
...
...
@@ -671,6 +671,8 @@ Felmeddelande: %#1s**************************************************")
(defconst lyskom-commands
'(
(describe-mode "
Hjlp
")
(kom-slow-mode "
Lngsamma
kommandon
")
(kom-quick-mode "
Snabba
kommandon
")
(kom-send-message "
Snda
meddelande
")
(kom-create-conf "
Skapa
mte
")
(kom-delete-conf "
Utplna
")
...
...
@@ -986,3 +988,68 @@ Users are encouraged to use their best sense of humor.")
(41 . "
Klienten
tror
att
servern
sger
att
den
inte
frstr
klienten
")
(42 . "
Ingen
sdan
session
finns
"))
"
All
the
errors
reported
from
the
server
in
plain
text.
")
;;;; This file contains the code that makes it possible to run a
;;;; long-commands mode in the lyskom-buffer.
;;;;
;;; Author: Linus Tolke
(setq lyskom-slow-mode-map
(make-sparse-keymap))
(define-key lyskom-slow-mode-map "
\r
" 'lyskom-parse-command-and-execute)
(defun lyskom-parse-command-and-execute ()
"
Reads
a
command
from
the
last
line
in
the
buffer
and
executes
it.
"
(interactive)
(goto-char (point-max))
(save-restriction
(narrow-to-region lyskom-last-viewed (point-max))
(search-backward lyskom-prompt-text))
(forward-char (length lyskom-prompt-text))
(while (looking-at "
\\s-
")
(forward-char 1))
(let* ((text (buffer-substring (point) (point-max)))
(completion-ignore-case t)
(alternatives (mapcar (function reverse)
(if kom-emacs-knows-iso-8859-1
lyskom-commands
lyskom-swascii-commands)))
(completes (all-completions text alternatives)))
(cond
((zerop (length text))
(kom-next-command))
((> (length completes) 1)
(lyskom-insert "
\nDu
kan
mena
n}gon
av
f
|
ljande:\n
")
(mapcar (function (lambda (string)
(lyskom-insert string)
(lyskom-insert "
\n
")))
completes)
(lyskom-end-of-command))
((= (length completes) 1)
(delete-region (point) (point-max))
(call-interactively (car (reverse-assoc (car completes)
(if kom-emacs-knows-iso-8859-1
lyskom-commands
lyskom-swascii-commands)))))
(t
(lyskom-insert "
Det
finns
inget
s}dant
kommando.\n
")
(lyskom-end-of-command)))
))
(defun kom-slow-mode ()
"
Starts
the
slow-command-mode.
"
(interactive)
(lyskom-start-of-command 'kom-slow-mode)
(use-local-map lyskom-slow-mode-map)
(lyskom-end-of-command))
(defun kom-quick-mode ()
"
Starts
the
quick-command-mode.
"
(
interactive
)
(
lyskom-start-of-command
'kom-quick-mode
)
(
use-local-map
lyskom-mode-map
)
(
lyskom-end-of-command
))
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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