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