Commit 5fc249ff authored by David Kågedal's avatar David Kågedal
Browse files

Några smärre fixar. Bråkade lite med prefetch-koden.

parent 62ba081e
No preview for this file type
......@@ -46,8 +46,8 @@ PARTS-EL = komtypes.el clienttypes.el startup.el \
prioritize.el flags.el messages.el ansaphone.el remote-control.el \
elib-string.el \
lyskom-rest.el
HEADER-EL = macros.el vars.el
HEADER-ELC = macros.elc vars.elc
HEADER-EL = vars.el macros.el
HEADER-ELC = vars.elc macros.elc
SWEDISH-EL = swedish-strings.el
SWEDISH-ELC = swedish-strings.elc
ENGLISH-EL = english-strings.el
......
......@@ -11,6 +11,10 @@ Buggar
åm -> lä -> åh --- Sen får man läsa markerade iaf.
Prefetchhanteringen buggar. Om man går ur ett möte, går med i ett
möte, och går ur det igen, allt utan att göra något annat, så får
man ingen prompt. lyskom-last-conf-done hamnar i osynk.
sentinelmeddelanden i ikoniferade frames buggar. Prova att kasta
ut en session i ett ikonifierat fönster. Eller kanske till och med
bara i en gömd buffert.
......@@ -29,13 +33,15 @@ Buggar
Allmänna förbättringar
Visa fotnoter på ett bättre sätt.
Lista ärenden formaterar fel. (FIXAT)
Det verkar behövas dynamisk anpassning av sessionsfältsbredden i
vilkalistan, vid sessionsnummer över 9999 ser det inte så snyggt
ut.
Felmeddelande för trasiga headerrader vid inskick av inlägg.
Felmeddelande för trasiga headerrader vid inskick av inlägg. (FIXAT)
Bättre dokumentation på URL-variablerna.
......
......@@ -498,8 +498,9 @@ of the person."
(set-read-list-empty lyskom-reading-list)
(setq lyskom-current-conf 0)))
(if self
(setq lyskom-last-conf-received
(1- lyskom-last-conf-received)))
(progn
(-- lyskom-last-conf-received)
(-- lyskom-last-conf-done)))
(read-list-delete-read-info (conf-stat->conf-no conf)
lyskom-to-do-list))))))
......
......@@ -60,7 +60,12 @@ See lyskom-edit-handler.")
(defvar lyskom-edit-return-to-configuration nil
"Status variable for an edit-buffer.")
(put 'abort-send 'error-conditions '(error lyskom-error lyskom-edit-error))
;;; Error signaled by lyskom-edit-parse-headers
(put 'lyskom-unknown-header 'error-conditions
'(error lyskom-error lyskom-unknown-header lyskom-edit-error))
(put 'lyskom-no-subject 'error-conditions
'(error lyskom-error lyskom-no-subject lyskom-edit-error))
(defun lyskom-edit-text (proc misc-list subject body
&optional handler &rest data)
......@@ -349,7 +354,7 @@ Entry to this mode runs lyskom-edit-mode-hook."
(defun lyskom-edit-send (send-function)
"Send the text to the server by calling SEND-FUNCTION."
(interactive)
(condition-case data
(condition-case err
(if (or (string= mode-name lyskom-edit-mode-name)
(j-or-n-p (lyskom-get-string 'already-sent)))
(progn
......@@ -369,7 +374,7 @@ Entry to this mode runs lyskom-edit-mode-hook."
nil t)
(end-of-line)
(if (/= (point) old)
(signal 'abort-send 'enter-subject-idi))))
(signal 'lyskom-no-subject 'enter-subject-idi))))
(setq message (lyskom-edit-extract-text))
(setq mode-name "LysKOM sending")
(save-excursion
......@@ -394,8 +399,10 @@ Entry to this mode runs lyskom-edit-mode-hook."
(set-buffer (window-buffer (selected-window))))
(goto-char (point-max))))
(lyskom-edit-error
(if (cdr (cdr err))
(goto-char (car (cdr (cdr err)))))
(lyskom-beep lyskom-ding-on-no-subject)
(lyskom-message (lyskom-get-string (cdr data))))))
(lyskom-message (lyskom-get-string (cdr err))))))
(defun kom-edit-quit ()
......@@ -465,7 +472,9 @@ Entry to this mode runs lyskom-edit-mode-hook."
(let ((p (point)))
(save-excursion
(let* ((buffer (current-buffer))
(headers (cdr (lyskom-edit-parse-headers)))
(headers (condition-case err
(cdr (lyskom-edit-parse-headers))
(lyskom-edit-error nil))) ; Ignore these errors
(no nil))
(while headers
(if (or (eq (car headers) 'comm-to)
......@@ -537,18 +546,23 @@ Entry to this mode runs lyskom-edit-mode-hook."
;;; in lyskom-edit-mode.
(defun lyskom-looking-at-header (header angled)
(defun lyskom-looking-at-header (header match-number)
"Check if point is at the beginning of a header of type HEADER.
Return the corresponding number (conf no etc.). If ANGLED is non-nil,
only match a number inside <>."
(if (looking-at
(concat (downcase (substring (lyskom-get-string header)
0 4))
(if angled
"[^0-9]*<\\([0-9]+\\)>"
"[^0-9]*\\([0-9]+\\)")))
(concat (regexp-quote (downcase (substring (lyskom-get-string header)
0 4)))
(cond ((eq match-number 'angled)
"[^0-9]*<\\([0-9]+\\)>")
(match-number
"[^0-9]*\\([0-9]+\\)")
(nil
""))))
(if match-number
(string-to-int (buffer-substring (match-beginning 1)
(match-end 1)))
t)
nil))
(defun lyskom-edit-parse-headers ()
......@@ -572,18 +586,21 @@ easy to use the result in a call to `lyskom-create-misc-list'."
(let ((case-fold-search t)
n)
(cond
((setq n (lyskom-looking-at-header 'recipient t))
((setq n (lyskom-looking-at-header 'recipient 'angled))
(nconc result (list 'recpt n)))
((setq n (lyskom-looking-at-header 'carbon-copy t))
((setq n (lyskom-looking-at-header 'carbon-copy 'angled))
(nconc result (list 'cc-recpt n)))
((setq n (lyskom-looking-at-header 'comment nil))
((setq n (lyskom-looking-at-header 'comment t))
(nconc result (list 'comm-to n)))
((setq n (lyskom-looking-at-header 'footnote nil))
((setq n (lyskom-looking-at-header 'footnote t))
(nconc result (list 'footn-to n)))
((looking-at (if kom-emacs-knows-iso-8859-1
((lyskom-looking-at-header (if kom-emacs-knows-iso-8859-1
lyskom-header-subject
lyskom-swascii-header-subject))
(setcar result (lyskom-edit-extract-subject)))))
lyskom-swascii-header-subject)
nil)
(setcar result (lyskom-edit-extract-subject)))
(t
(signal 'lyskom-unknown-header (list unknown-header (point))))))
(forward-line 1)))
result))
......
......@@ -547,6 +547,7 @@ Mark the envelope with \"LysKOM bug report\"\n\n")
(still-want-to-add . "Do you still want to add the conference as a recipient? ")
(could-not-create-text . "\nCouldn't create the article. Error: %#2s.\n")
(no-get-text . "You were not allowed to retrieve the article.")
(unknown-header . "Unknown header")
; From view-text.el:
......
No preview for this file type
......@@ -31,8 +31,9 @@
;;;; be compiled.
;;;;
(defconst lyskom-clientversion-long "$Id$\n"
"Version for every file in the client.")
(setq lyskom-clientversion-long
(concat lyskom-clientversion-long
"$Id$\n"))
......@@ -135,13 +136,6 @@ Value returned is always nil."
"Decrement the variable VAR and return the value."
(list 'setq var (list '1- var)))
(defmacro when (expr &rest body)
"Execute BODY if EXPR evaluates to non-nil"
(list 'if expr (cons 'progn body)))
(put 'when lisp-indent-function 1)
(put 'when 'edebug-form-spec t)
(defsubst listify-vector (vector)
"Turn VECTOR into a list"
(append vector nil))
......@@ -157,10 +151,6 @@ Value returned is always nil."
;; Multiple blocking read from server
(defvar lyskom-quit-flag nil
"A flag indicating if the filter was interrupted by C-g.
It is set to the same value as quit-flag on filter exit.")
(defvar lyskom-multiple-blocking-return nil
"Return from blocking-do-multiple")
......
......@@ -571,7 +571,7 @@ M\344rk kuvertet \"LysKOM buggrapport f\366r elispklienten\".\n\n")
(still-want-to-add . "Vill du fortfarande addera m\366tet? ")
(could-not-create-text . "\nTexten kunde ej skapas. Felet: %#2s.\n")
(no-get-text . "Du fick inte h\344mta texten.")
(unknown-header . "Oknd information p raden")
; From view-text.el:
(line . " /1 rad/ ")
......
......@@ -31,9 +31,9 @@
;;;;
(setq lyskom-clientversion-long
(concat lyskom-clientversion-long
"$Id$\n"))
(defconst lyskom-clientversion-long
"$Id$\n"
"Version for every file in the client.")
......@@ -1078,6 +1078,13 @@ the value of kom-tell-phrases for fun.")
(error nil)))
(defmacro when (expr &rest body)
"Execute BODY if EXPR evaluates to non-nil"
(list 'if expr (cons 'progn body)))
(put 'when lisp-indent-function 1)
(put 'when 'edebug-form-spec t)
(put 'lyskom-make-face 'lisp-indent-function 1)
(when (eq window-system 'x)
......
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