Commit 8cb78d8c authored by Linus Tolke Y's avatar Linus Tolke Y
Browse files

Small fixes for emacs 18.55, jump.

parent e7d42508
No preview for this file type
......@@ -24,7 +24,10 @@
#
# $Id$
# $Log$
# Revision 36.7 1993/11/21 04:37:06 linus
# Revision 36.8 1993/12/14 02:21:29 linus
# Small fixes for emacs 18.55, jump.
#
# Revision 36.7 1993/11/21 04:37:06 linus
# Better tags entry.
#
# Revision 36.6 1993/09/10 16:36:51 linus
......@@ -151,7 +154,7 @@ PARTS-ELC = $(SRC-ELC)
.SUFFIXES : .el .elc
.el.elc:
$(EMACS-BATCH) -l ./macros.elc -f batch-byte-compile $*.el
$(EMACS-BATCH) -l `pwd`/macros -l `pwd`/vars -f batch-byte-compile $*.el
all: lyskom.elc
......
......@@ -187,6 +187,7 @@ this function shall be with current-buffer the BUFFER."
(lyskom-save-excursion
(set-buffer buffer)
(if (and (not (zerop lyskom-pers-no))
(/= lyskom-pers-no pers-no)
(or kom-presence-messages
kom-presence-messages-in-buffer))
(initiate-get-conf-stat 'follow
......@@ -358,26 +359,26 @@ The text is converted, before insertion."
(cache-del-pers-stat (text-stat->author text-stat)) ;+++Borde {ndra i cachen i st{llet.
(lyskom-traverse
misc-info (text-stat->misc-info-list text-stat)
(let ((type (misc-info->type misc-info)))
(cond
((or (eq type 'RECPT)
(eq type 'CC-RECPT))
;; add on lyskom-reading-list and lyskom-to-do-list if
;; this recipient is a recipient that has been checked.
(initiate-get-conf-stat 'async 'lyskom-add-new-text
(misc-info->recipient-no misc-info)
(text-stat->text-no text-stat)
(misc-info->local-no misc-info)))
((eq type 'COMM-TO)
(cache-del-text-stat (misc-info->comm-to misc-info)))
((eq type 'FOOTN-TO)
(cache-del-text-stat (misc-info->footn-to misc-info)))
(t
(signal 'lyskom-internal-error
(list 'lyskom-async-new-text
"Unexpected misc-info in new text "
type))))))
misc-info (text-stat->misc-info-list text-stat)
(let ((type (misc-info->type misc-info)))
(cond
((or (eq type 'RECPT)
(eq type 'CC-RECPT))
;; add on lyskom-reading-list and lyskom-to-do-list if
;; this recipient is a recipient that has been checked.
(initiate-get-conf-stat 'async 'lyskom-add-new-text
(misc-info->recipient-no misc-info)
(text-stat->text-no text-stat)
(misc-info->local-no misc-info)))
((eq type 'COMM-TO)
(cache-del-text-stat (misc-info->comm-to misc-info)))
((eq type 'FOOTN-TO)
(cache-del-text-stat (misc-info->footn-to misc-info)))
(t
(signal 'lyskom-internal-error
(list 'lyskom-async-new-text
"Unexpected misc-info in new text "
type))))))
;; Give a message if the user is waiting. Update the prompt.
(lyskom-run 'async 'lyskom-default-new-text-hook text-stat)
......@@ -437,3 +438,8 @@ In that case, just discard this call."
(read-list-enter-first info lyskom-reading-list))))
(lyskom-set-mode-line))))
;;; Local Variables:
;;; eval: (put 'lyskom-traverse 'lisp-indent-hook 2)
;;; end:
......@@ -242,7 +242,8 @@ as TYPE. If no such misc-info, return NIL"
(progn
(lyskom-start-of-command 'kom-send-letter)
(lyskom-tell-internat 'kom-tell-write-letter)
(let* ((tono (lyskom-read-conf-no (lyskom-get-string 'who-letter-to) 'all))
(let* ((tono (lyskom-read-conf-no (lyskom-get-string 'who-letter-to)
'all))
(conf-stat (blocking-do 'get-conf-stat tono)))
(if (if (zerop (conf-stat->msg-of-day conf-stat))
t
......@@ -590,9 +591,11 @@ user so instead."
"Deal with the answer from an attempt to create a conference.
Add the person creating and execute lyskom-end-of-command."
(if (null conf-no)
(lyskom-format-insert 'could-not-create-conf
conf-name
lyskom-errno)
(progn
(lyskom-format-insert 'could-not-create-conf
conf-name
lyskom-errno)
(lyskom-end-of-command))
(progn
(lyskom-format-insert 'created-conf-no-name
conf-no
......@@ -1753,6 +1756,7 @@ MY-SESSION-NO is the session number of the running session.
(defun kom-jump (&optional text-no)
"Jumps all comments to the current text. Descends recursively in comment tree.
The three is truncated if we encounter an older text.
If optional arg TEXT-NO is present then jump all comments to that text instead."
(interactive (list
(cond
......@@ -1788,17 +1792,24 @@ footnotes) to it as read in the server."
(if mark-as-read
(lyskom-mark-as-read text-stat))
(lyskom-is-read (text-stat->text-no text-stat))
(lyskom-traverse misc (text-stat->misc-info-list text-stat)
(cond
((or (eq (misc-info->type misc) 'COMM-IN)
(eq (misc-info->type misc) 'FOOTN-IN))
(initiate-get-text-stat 'main
'lyskom-jump
(if (eq (misc-info->type misc)
'COMM-IN)
(misc-info->comm-in misc)
(misc-info->footn-in misc))
mark-as-read)))))))
(lyskom-traverse
misc
(text-stat->misc-info-list text-stat)
(cond
((and (or (eq (misc-info->type misc) 'COMM-IN)
(eq (misc-info->type misc) 'FOOTN-IN))
(> (if (eq (misc-info->type misc)
'COMM-IN)
(misc-info->comm-in misc)
(misc-info->footn-in misc))
(text-stat->text-no text-stat)))
(initiate-get-text-stat 'main
'lyskom-jump
(if (eq (misc-info->type misc)
'COMM-IN)
(misc-info->comm-in misc)
(misc-info->footn-in misc))
mark-as-read)))))))
;;; ================================================================
......@@ -1957,3 +1968,6 @@ DO-ADD: NIL if a comment should be subtracted.
;;; ================================================================
;;; Local Variables:
;;; eval: (put 'lyskom-traverse 'lisp-indent-hook 2)
;;; end:
......@@ -215,6 +215,10 @@ to conf-no translator."
Where every word matches the corresponding word in the car part of ALIST.
parst matching ([^)]) in string and alist are disgarded."
(let* ((a-whitespace "\\([ \t]\\|([^)]*)\\)+")
(string (let ((initwhite (concat "\\`" a-whitespace)))
(if (string-match initwhite string)
(substring string (match-end 0))
string)))
(endfirstword (string-match a-whitespace string))
(firstword (substring string 0 endfirstword))
(reststring (and endfirstword
......
......@@ -65,7 +65,12 @@ Does lyskom-end-of-command."
(config (current-window-configuration)))
(setq lyskom-list-of-edit-buffers (cons buffer
lyskom-list-of-edit-buffers))
(process-kill-without-query (get-buffer-process (current-buffer)) t)
(condition-case emacs-18.55
(process-kill-without-query (get-buffer-process (current-buffer)) t)
(error
;; You loose some...
(message "Old emacs! Upgrade!")
(process-kill-without-query (get-buffer-process (current-buffer)))))
(cond
((and (or (bufferp kom-write-texts-in-window)
(stringp kom-write-texts-in-window))
......@@ -277,6 +282,7 @@ Entry to this mode runs lyskom-edit-mode-hook."
(auto-fill-mode 1)
(make-local-variable 'paragraph-start)
(make-local-variable 'paragraph-separate)
(make-local-variable 'lyskom-proc)
(setq paragraph-start (concat "^"
(regexp-quote
lyskom-header-separator)
......@@ -775,9 +781,14 @@ buffer and edit buffers."
(while (and lyskom-list-of-edit-buffers
(not (memq (car lyskom-list-of-edit-buffers) (buffer-list))))
(setq lyskom-list-of-edit-buffers (cdr lyskom-list-of-edit-buffers)))
(if lyskom-list-of-edit-buffers
(process-kill-without-query proc t)
(process-kill-without-query proc nil)))
(condition-case emacs-18.55
(if lyskom-list-of-edit-buffers
(process-kill-without-query proc t)
(process-kill-without-query proc nil))
(error
;; You loose some if you only have emacs-18.55...
(message "Running emacs 18.55 or earlier? Please upgrade!")
(process-kill-without-query proc))))
lyskom-list-of-edit-buffers))
......
No preview for this file type
......@@ -86,3 +86,7 @@ Value returned is always nil."
"Decrement the variable VAR and return the value."
(list 'setq var (list '1- var)))
;;; Local Variables:
;;; eval: (put 'lyskom-traverse 'lisp-indent-hook 2)
;;; end:
......@@ -45,6 +45,16 @@ Args: KOM-QUEUE HANDLER PERS-NO PASSWORD &rest DATA."
(lyskom-send-packet kom-queue (lyskom-format-objects 0 pers-no password)))
(defun initiate-login-new (kom-queue handler pers-no password status
&rest data)
"Log in on server.
Args: KOM-QUEUE HANDLER PERS-NO PASSWORD STATUS &rest DATA.
Status is 0 for visible login and 1 for invisible login."
(lyskom-call kom-queue lyskom-ref-no handler data 'lyskom-parse-void)
(lyskom-send-packet kom-queue (lyskom-format-objects 62 pers-no
password status)))
(defun initiate-logout (kom-queue handler &rest data)
"Log out from server.
Args: KOM-QUEUE HANDLER &rest DATA."
......@@ -545,6 +555,9 @@ Args: KOM-QUEUE HANDLER PERS-NO &rest DATA."
Args: KOM-QUEUE HANDLER CONF-NO &rest DATA."
(let ((conf-stat (cache-get-conf-stat conf-no)))
(cond
((zerop conf-no) ;No real user.
(lyskom-call-add kom-queue 'PARSED nil handler data)
(lyskom-check-call kom-queue))
((null conf-stat) ;Cached info?
(lyskom-call kom-queue ;No, ask the server.
lyskom-ref-no
......@@ -641,7 +654,7 @@ or get-text-stat."
'blocking 'blocking-return
data)
(while (eq lyskom-blocking-return 'not-yet-gotten)
(accept-process-output lyskom-proc))
(accept-process-output))
lyskom-blocking-return)))))
......@@ -528,6 +528,7 @@ Entry to this mode runs lyskom-mode-hook."
(make-local-variable 'lyskom-server-info)
(make-local-variable 'lyskom-default-user-name)
(make-local-variable 'lyskom-default-password)
(make-local-variable 'lyskom-time-last-command)
(make-local-variable 'lyskom-who-info-cache)
(make-local-variable 'lyskom-who-info-buffer)
(make-local-variable 'lyskom-who-info-buffer-is-on)
......@@ -577,4 +578,8 @@ Entry to this mode runs lyskom-mode-hook."
(setq lyskom-do-when-done (cons kom-do-when-done kom-do-when-done))
(setq lyskom-output-queue (lyskom-queue-create))
(setq lyskom-list-of-edit-buffers nil)
(condition-case emacs-18.55
(setq lyskom-time-last-command (current-time))
(error ; No function current-time
))
(lyskom-set-mode-line (lyskom-get-string 'not-present-anywhere))))
......@@ -628,7 +628,7 @@ Personligt meddelande fr\345n %#1s (%#3s):
; From lyskom-rest.el:
(mode-line-unread " Ol\344sta")
(mode-line-unread . " Ol\344sta")
(error-code . "Felkod %#2d: %#1s.\n")
(extended-command . "LysKOM: ")
......@@ -993,6 +993,8 @@ Cf. paragraph-start.")
(kom-tell-change-name "\304ndrar sitt namn till n\345got annat.")
(kom-tell-change-supervisor "\304ndrar organisat\366r f\366r n\345got.")
(kom-tell-next-lyskom "Hoppar till ett annat LysKOM.")
(kom-tell-is-back "\304r tillbaka.")
(kom-tell-is-idle "Har inte r\366rt lyskom p\345 en bra stund.")
)
"These texts are used as arguments to lyskom-tell-server.
The variable kom-mercial defaults to kom-tell-wait.
......
......@@ -540,6 +540,8 @@ unread texts in list-unread.")
(kom-tell-change-name)
(kom-tell-change-supervisor)
(kom-tell-next-lyskom)
(kom-tell-is-back)
(kom-tell-is-idle)
)
"Users must not change this constant, but are encouraged to change
the value of kom-tell-phrases for fun.")
......
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