Commit 98b64d3b authored by David Byers's avatar David Byers
Browse files

bugfixar

parent 246049a9
Fri Aug 8 13:40:06 1997 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-fill-message): Workaround fr bug i
fill-region.
Thu Aug 7 09:33:16 1997 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-fill-message): Nu fungerar det att stta
kom-autowrap till en siffra.
Fri Aug 1 10:44:59 1997 David Byers <davby@ida.liu.se>
* vars.el.in (lyskom-text-buttons): Byt plats p URL och e-mail.
Tue Jul 29 11:30:48 1997 David Byers <davby@ida.liu.se>
* filter.el (kom-super-jump): Hoppa ver Fwd: ocks.
* parse.el (lyskom-parse-num): FIXADE BUGGEN!
* lyskom-rest.el (lyskom-fill-message): kom-autowrap kan vara ett
......
......@@ -560,7 +560,7 @@ the current text"
(lyskom-add-filter
(make-filter (list
(cons 'subject-re
(concat "\\([rR][eE]: *\\)*"
(concat "\\([rR][eE]: *\\|[Ff][Ww][Dd]: *\\)*"
(replace-in-string
(regexp-quote lyskom-current-subject)
"[ \t]+" "[ \t]+")))
......
......@@ -1501,11 +1501,24 @@ in lyskom-messages."
(t 'maybe)))
(defun lyskom-fill-region (start end &optional justify nosqueeze to-eop)
"Fill a region of text, compensating for bugs in Emacs."
(save-match-data
(let ((fill-column (if nosqueeze (1- fill-column) fill-column)))
(when nosqueeze
(condition-case nil
(save-excursion
(goto-char (match-beginning 0))
(backward-char 1)
(delete-horizontal-space))
(error nil)))
(fill-region start (match-beginning 0) nil t))))
(defun lyskom-fill-message (text)
"Try to reformat a message."
(cond
((null kom-autowrap) text)
((and (numberp kom-autowrap) (> kom-autowrap (length text))) text)
((and (numberp kom-autowrap) (> (length text) kom-autowrap)) text)
(t
(save-excursion
(set-buffer (lyskom-get-buffer-create 'lyskom-text " lyskom-text" t))
......@@ -1568,10 +1581,8 @@ in lyskom-messages."
(< paragraph-length lyskom-minimum-brick-size))
(and (not (eq 0 length-difference))
(< paragraph-length lyskom-minimum-triagle-size))))
(save-match-data
(let ((fill-column (1- fill-column)))
(fill-region start (match-beginning 0) nil t))
(lyskom-signal-reformatted-text 'reformat-filled)))
(lyskom-fill-region start (match-beginning 0) nil t)
(lyskom-signal-reformatted-text 'reformat-filled))
(setq start (match-end 0)
in-paragraph nil
wrap-paragraph 'maybe))
......@@ -1602,9 +1613,7 @@ in lyskom-messages."
(and (not (eq 0 length-difference))
(< paragraph-length lyskom-minimum-triagle-size))
(null constant-length)))
(save-match-data
(let ((fill-column (1- fill-column)))
(fill-region start (match-beginning 0) nil t)))
(lyskom-fill-region start (match-beginning 0) nil t)
(lyskom-signal-reformatted-text 'reformat-filled))
(setq start (match-beginning 0)
in-paragraph t
......@@ -1626,9 +1635,7 @@ in lyskom-messages."
(and (not (eq 0 length-difference))
(< paragraph-length lyskom-minimum-triagle-size))
(null constant-length)))
(save-match-data
(let ((fill-column (1- fill-column)))
(fill-region start (match-beginning 0) nil t)))
(lyskom-fill-region start (match-beginning 0) nil t)
(lyskom-signal-reformatted-text 'reformat-filled))
(setq start (match-beginning 0)
in-paragraph t
......@@ -1747,9 +1754,7 @@ in lyskom-messages."
(and (not (eq 0 length-difference))
(< paragraph-length lyskom-minimum-triagle-size))
(not (eq constant-length t))))
(save-match-data
(let ((fill-column (1- fill-column)))
(fill-region start (point) nil t)))
(lyskom-fill-region start (point) nil t)
(lyskom-signal-reformatted-text 'reformat-filled)))
;;
......
......@@ -486,7 +486,7 @@ A number means wrap articles shorter than the number (in bytes)."
;;;
(defvar lyskom-url-protocol-regexp
(def-kom-var lyskom-url-protocol-regexp
"\\(file\\|ftp\\|gopher\\|http\\|https\\|news\\|wais\\|mailto\\|telnet\\):")
(def-kom-var lyskom-text-buttons
......@@ -500,6 +500,11 @@ A number means wrap articles shorter than the number (in bytes)."
nil ; Face or nil (=default)
)
;; Email
("[^()<>@,;:\"\\\\\000- ]+@[^\000- <>;,.'\"!:?) \t\012\014]+\\(\\.[^\000- <>;,.'\"!:?)]+\\)+"
email 0 0 kom-url-face)
;; URLs
("\\(www\\|ftp\\|home\\)\\.[^\t \012\014\"<>|\\]*[^\t \012\014\"<>|.,!(){}?'`:]"
......@@ -510,11 +515,6 @@ A number means wrap articles shorter than the number (in bytes)."
("<URL:\\s-*\\([^>]*\\)\\s-*>"
url 1 1 kom-url-face)
;; Email
("[^()<>@,;:\"\\\\\000- ]+@[^\000- <>;,.'\"!:?) \t\012\014]+\\(\\.[^\000- <>;,.'\"!:?)]+\\)+"
email 0 0 kom-url-face)
;; JySKom enhancements
("<(?m[|ö]te *\\([0-9]+\\)[^0-9]*)?>" conf 0 1 nil)
......
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