Commit 7297407c authored by Linus Tolke Y's avatar Linus Tolke Y
Browse files

Fixed some bytecomp warnings.

parent f3f08902
makealfa
lyskom.el
makealfa
makealfa.c
vars.el
No preview for this file type
......@@ -24,7 +24,10 @@
#
# $Id$
# $Log$
# Revision 38.1 1994/01/10 18:07:53 linus
# Revision 38.2 1994/01/14 00:28:00 linus
# Fixed some bytecomp warnings.
#
# Revision 38.1 1994/01/10 18:07:53 linus
# The installation method changed (again).
# The version is now contained in the Makefile.
#
......@@ -132,7 +135,6 @@ CLIENTVERSION = 0.38.1
GENERIC-CLEAN = *~ *.o core
GENERIC-DIST-CLEAN = TAGS
MKDIR = /bin/mkdir
RM = /usr/gnu/bin/rm -vf
......@@ -212,6 +214,7 @@ install: installnodoc installdoc
installatlysator: lyskom-$(CLIENTVERSION).elc lyskom.el
# Lysator
cp lyskom.el /usr/local/lib/emacs/site-lisp/lyskom.el
cp lyskom.el /usr/local/var/elisp/lyskom.el
cp lyskom-$(CLIENTVERSION).elc /usr/local/lib/emacs/site-lisp/lyskom.elc
lyskom-$(CLIENTVERSION).elc: lyskom.el
......@@ -228,10 +231,8 @@ lyskom-$(CLIENTVERSION).el.gz: lyskom.el
lyskom-$(CLIENTVERSION).elc.gz: lyskom-$(CLIENTVERSION).elc
gzip -9 < lyskom-$(CLIENTVERSION).elc > lyskom-$(CLIENTVERSION).elc.gz
installatftp: lyskom-$(CLIENTVERSION).el.gz lyskom-$(CLIENTVERSION).elc.gz
touch lyskom-$(CLIENTVERSION).elc.gz # Do we have confidence problems?
mv lyskom-$(CLIENTVERSION).el.gz lyskom-$(CLIENTVERSION).elc.gz \
/usr/ftp/pub/lyskom/elisp-client
installatftp: lyskom-$(CLIENTVERSION).el.gz
mv lyskom-$(CLIENTVERSION).el.gz /usr/ftp/pub/lyskom/elisp-client
.PHONY: installnodoc
installnodoc: installatlysator installatftp
......
......@@ -386,18 +386,6 @@ The text is converted, before insertion."
(lyskom-run 'async 'lyskom-prefetch-and-print-prompt))
(defun lyskom-conf-fetched-p (conf-no)
"Return t if CONF-NO has been prefetched."
(let ((n (1- (length lyskom-membership)))
(result nil))
(while (and (not result)
(>= n 0))
(if (= (membership->conf-no (elt lyskom-membership n))
conf-no)
(setq result t))
(-- n))
result))
(defun lyskom-add-new-text (recipient text-no local-no)
"RECIPIENT is a conf-stat and recipient of TEXT-NO.
......
......@@ -85,7 +85,11 @@ The fourth argument INITIAL is the initial contents of the input-buffer.
Returns the name."
(let* ((completion-ignore-case t)
(current-lyskom-process lyskom-proc) ;What an ugly hack.
; When lyskom-read-conf-name-internal is called the current-buffer
; is the minibuffer and the buffer-local variable lyskom-proc is not
; correct. Then the variable lyskom-blocking-process must be set
; instead. It is not buffer-local but scopes the let.
(lyskom-blocking-process lyskom-proc)
(minibuffer-local-completion-map
lyskom-minibuffer-local-completion-map)
(minibuffer-local-must-match-map
......
......@@ -46,6 +46,20 @@
(defvar lyskom-edit-mode-name "LysKOM edit"
"Name of the mode.")
(defvar lyskom-is-dedicated-edit-window nil
"Status variable for an edit-window.")
(defvar lyskom-edit-handler nil
"Status variable for an edit-buffer.
See lyskom-edit-handler-data.")
(defvar lyskom-edit-handler-data nil
"Status variable for an edit-buffer.
See lyskom-edit-handler.")
(defvar lyskom-edit-return-to-configuration nil
"Status variable for an edit-buffer.")
(defun lyskom-edit-text (proc misc-list subject body
&optional handler &rest data)
"Edit a text in a new buffer.
......@@ -88,8 +102,6 @@ Does lyskom-end-of-command."
(switch-to-buffer-other-frame buffer))
(t
(switch-to-buffer buffer)))
(if (boundp 'lyskom-filter-old-buffer)
(setq lyskom-filter-old-buffer (current-buffer)))
(lyskom-edit-mode)
(setq lyskom-proc proc)
(make-local-variable 'lyskom-edit-handler)
......@@ -573,75 +585,6 @@ Point must be located on the line where the subject is."
(buffer-substring (match-beginning 1) (match-end 1)))
(defun lyskom-edit-extract-text ()
"Get text as a string."
(save-excursion
(goto-char (point-min))
(if (not (or (re-search-forward
(regexp-quote
(if kom-emacs-knows-iso-8859-1
lyskom-header-separator
lyskom-swascii-header-separator))
nil (point-max))
(not (or (equal (char-to-string
(elt
(if kom-emacs-knows-iso-8859-1
lyskom-header-subject
lyskom-swascii-header-subject)
0))
(buffer-substring (point) (1+ (point))))
(equal (char-to-string
(elt
(if kom-emacs-knows-iso-8859-1
lyskom-swascii-header-subject
lyskom-header-subject)
0))
(buffer-substring (point) (1+ (point))))))))
(let ((char (string-to-char
(upcase (buffer-substring (point) (1+ (point)))))))
(nconc
result
(cons
(cond
((eq char (elt (lyskom-get-string 'recipient) 0)) ;recpt
(re-search-forward "<\\([0-9]+\\)>")
(cons 'recpt (string-to-int (buffer-substring
(match-beginning 1)
(match-end 1)))))
((eq char (elt (lyskom-get-string 'carbon-copy) 0)) ;cc-recpt
(re-search-forward "<\\([0-9]+\\)>")
(cons 'cc-recpt (string-to-int (buffer-substring
(match-beginning 1)
(match-end 1)))))
((eq char (elt (lyskom-get-string 'comment) 0)) ;comm-to
(re-search-forward "\\([0-9]+\\)")
(cons 'comm-to (string-to-int (buffer-substring
(match-beginning 1)
(match-end 1)))))
((eq char (elt (lyskom-get-string 'footnote) 0)) ;footn-to
(re-search-forward "\\([0-9]+\\)")
(cons 'footn-to (string-to-int (buffer-substring
(match-beginning 1)
(match-end 1)))))
(t
(signal 'lyskom-internal-error
(list "Unknown header line: "
(buffer-substring (point)
(progn
(end-of-line)
(point)))))))
nil)))
(beginning-of-line 2))
result))
(defun lyskom-edit-extract-subject ()
"Find the subject.
Point must be located on the line where the subject is."
(re-search-forward ": \\(.*\\)")
(buffer-substring (match-beginning 1) (match-end 1)))
(defun lyskom-edit-extract-text ()
"Get text as a string."
(save-excursion
......
No preview for this file type
......@@ -103,36 +103,6 @@ first non-white character was not equal to CHAR."
(buffer-substring lyskom-parse-pos (point-max))))
(defun lyskom-parse-num ()
"Parse next token as a number.
Signal lyskom-parse-incomplete if the number is not followed by whitespace.
Signal lyskom-protocol-error if the next token is not a number."
(let ((max (point-max))
(pos lyskom-parse-pos)
(result 0))
;; skip whitespace
(while (and (< pos max)
(or (= (char-after pos) 32)
(= (char-after pos) 13)
(= (char-after pos) 10)))
(setq pos (1+ pos)))
;; read the number
(while (and (< pos max) (>= (char-after pos) ?0)
(<= (char-after pos) ?9))
(setq result (+ (* 10 result) (char-after pos) (- ?0)))
(setq pos (1+ pos)))
(cond
((= max pos)
(signal 'lyskom-parse-incomplete nil))
((or (= pos 1) (< (char-after (1- pos)) ?0)
(> (char-after (1- pos)) ?9))
(signal 'lyskom-protocol-error
(list "Expected number, got " (lyskom-string-to-parse)))))
(setq lyskom-parse-pos pos)
result))
(defun lyskom-parse-num ()
"Parse the next token as a number.
Signal lyskom-parse-incomplete if the number is not followed by whitespace.
......
......@@ -151,7 +151,7 @@ Checks for errors then gets maps and calls next function."
(lyskom-insert-string 'no-get-conf)
t)
((not (eq (not pers-no) (not pers-stat)))
(lyskom-insert-string 'no'get'pers)
(lyskom-insert-string 'no-get-pers)
t)
((and (not conf-stat)
(not pers-stat))
......@@ -499,13 +499,15 @@ of the root text as argument."
(defun lyskom-review-tree (text)
"Takes a TEXT as an arg, shows the text and the tree of all comments.
Does a lyskom-end-of-command.
Text is a text-no or a text-stat."
Text is a text-no."
(cond
((integerp text)
(lyskom-view-text 'main text nil t nil (lyskom-get-current-priority) t))
(t
(lyskom-view-text 'main (text-stat->text-no text-stat)
nil t nil (lyskom-get-current-priority) t)))
(t
(signal 'lyskom-internal-error
(list 'lyskom-review-tree
"Called with incorrect argument."
text))))
(lyskom-run 'main 'lyskom-end-of-command))
......
......@@ -625,6 +625,17 @@ Args: KOM-QUEUE HANDLER &rest DATA."
;; Blocking reading from server:
(defvar lyskom-blocking-return nil
"Return from blocking-do.")
(defvar lyskom-blocking-process nil
"The process the where the lyskom-session is.
If blocking-do is called from a buffer that is no well-connected to the
lyskom-session, i.e. the lyskom-proc variable is not set, then this variable
has to be set for the blocking-do to be able to know what process to send
questions to. This is the case when called from the minibuffer when
completing.")
(defun blocking-return (retval)
"Sets blocking variable."
(setq lyskom-blocking-return retval))
......@@ -637,7 +648,7 @@ The cache is consulted when command is get-conf-stat, get-pers-stat
or get-text-stat."
(save-excursion
(set-buffer (process-buffer (or lyskom-proc
current-lyskom-process)))
lyskom-blocking-process)))
(cond
((and (eq command 'get-conf-stat)
(cache-get-conf-stat (car data))))
......
......@@ -44,7 +44,9 @@
(defun lyskom (&optional host username password)
"Start a LysKOM session.
Optional arguments: HOST, USERNAME and PASSWORD."
Optional arguments: HOST, USERNAME and PASSWORD.
See lyskom-mode for details."
(interactive (list (lyskom-read-string (lyskom-format 'server-q
(or (getenv "KOMSERVER")
lyskom-default-server)))
......@@ -480,7 +482,12 @@ Commands:
All bindings (this is here due to the fact that inconsistensies while
developping this package are frequent):
\\{lyskom-mode-map}
Entry to this mode runs lyskom-mode-hook."
Entry to this mode runs lyskom-mode-hook.
Functions and variables beginning with kom- are intended for the user to see,
set or call.
Functions and variables beginning with lyskom- are not intended for the user
to see, set of call."
(interactive)
(lyskom-clear-vars)
(setq mode-line-buffer-identification
......@@ -512,6 +519,7 @@ Entry to this mode runs lyskom-mode-hook."
(server-info lyskom-server-info)
)
(kill-all-local-variables)
(make-local-variable 'lyskom-blocking-return)
(make-local-variable 'lyskom-unparsed-buffer)
(make-local-variable 'lyskom-unparsed-marker)
(make-local-variable 'lyskom-is-writing)
......
......@@ -47,6 +47,9 @@
;;; Set the keymap for lyskom-edit-mode
(defvar lyskom-edit-prefix nil
"Mode-map for lyskom edit mode.")
(if lyskom-edit-mode-map
nil
(setq lyskom-edit-mode-map (make-sparse-keymap))
......@@ -99,10 +102,15 @@ Avbryt=\\[kom-edit-quit], \
Annat se \\[describe-mode] ---")
"*String to separate headers from text body.")
(defvar lyskom-swascii-header-separator nil
"The swascii version of lyskom-header-separator.")
(defvar lyskom-header-subject "\304rende: "
"*String to prompt for subject in the edit buffer.")
(defvar lyskom-swascii-header-subject nil
"The swascii version of lyskom-header-subject.")
(defconst lyskom-strings
'(
......@@ -796,6 +804,9 @@ Felmeddelande: %#1s**************************************************")
)
"A list of LysKOM-commands that the extended parser understands.")
(defvar lyskom-swascii-commands nil
"The swascii-versions of lyskom-commands.")
(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\\)?/ "
......@@ -1066,8 +1077,10 @@ Users are encouraged to use their best sense of humor.")
;;; Author: Linus Tolke
(setq lyskom-slow-mode-map
(make-sparse-keymap))
(defvar lyskom-slow-mode-map
(make-sparse-keymap)
"Mode map for the `slow' lyskom command mode.")
(define-key lyskom-slow-mode-map "\r" 'lyskom-parse-command-and-execute)
(defun lyskom-parse-command-and-execute ()
......
;;;;;
;;;;; -*- emacs-lisp -*-
;;;;; $Id$
;;;;; Copyright (C) 1991 Lysator Academic Computer Association.
;;;;;
......@@ -157,6 +157,9 @@ 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 lyskom-no-prompt nil
"Tells the session that we have no prompt.")
(defvar kom-show-personal-messages-in-buffer t
"*Buffer to show personal messages in.
If nil, discard them.
......@@ -241,6 +244,34 @@ TCP/IP connection. This should be unlimited, but in practise there
are systems that limits this. This variable is automatically adjusted
if any problems are detected.")
(defvar lyskom-do-when-done nil
"Internal of kom-do-when-done.")
(defvar lyskom-do-when-starting nil
"Internal of kom-do-when-starting.")
(defvar lyskom-list-of-edit-buffers nil
"Keeps track of active edit-buffers.")
(defvar lyskom-sessions-with-unread nil
"List of lyskom-sessions with unread texts.
This is not buffer-local.")
(defvar lyskom-time-last-command nil
"Keeps the time of the last lyskom-command in this session.")
(defvar lyskom-buffer nil
"What is the lyskom-buffer we are connected to.")
(defvar output nil
"Uaark. Just to omit a warning...")
(defvar lyskom-errno nil
"Errno of last lyskom error.")
(defvar lyskom-parse-pos nil
"Position of parsing.")
(defvar lyskom-unparsed-buffer nil
"Buffer containing unparsed information from the server.")
......@@ -568,3 +599,6 @@ the value of kom-tell-phrases for fun.")
(defvar lyskom-default-password nil
"Default LysKOM PASSWORD.")
(defvar mode-line-conf-name nil
"Conf name that is present on the mode-line.")
Markdown is supported
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