Commit d8d96007 authored by David Byers's avatar David Byers
Browse files

Various

Detailed changes:
> 2007-06-10    <David Byers@GULAG>
>
> 	Better display of texts claiming to be us-ascii:
> 	* mime.el (lyskom-mime-decode-content-type): Pretend us-ascii
> 	texts are really latin-1.
>
> 	Fix bug 819:
> 	* completing-read.el (lyskom-read-conf-internal): When an exact
> 	match is found, return t only if the input string is equal to the
> 	only alternative.
>
> 	Fix bug 1277:
> 	* swedish-strings.el (coding-system-mismatch-warning): Added
> 	reference to Emacs manual.
>
> 	* utilities.el (lyskom-check-configuration): Don't warn about
> 	coding system if UTF-8 is supported.
>
> 	* lyskom-buttons.el (lyskom-make-button-menu): Encode menu strings
> 	properly.
>
3,4c24,36
< 	* language.el (lyskom-language-keymap-internal): Let Emacs 22.1
< 	follow links with mouse-1.
---
> 	Prefer UTF-8 over all but latin-1:
> 	* mime.el (lyskom-charset-alist): Never choose us-ascii. When
> 	us-ascii text is detected, assume latin-1 instead. For some
> 	reason, us-ascii is detected on some emacsen even when this is not
> 	the case. A more powerful charset would perhaps be a better
> 	choice, but chances are if charset detection is broken, then what
> 	are the chances that e.g. unicode conversion works?
> 	(lyskom-charset-alist): Include utf-8 early in the list, making it
> 	the preferred charset (when it works).
>
> 	Follow links with mouse-1 in Emacs 22.1:
> 	* language.el (lyskom-language-keymap-internal): Bind follow-links
> 	in the global LysKOM keymaps.
5a38
> 	Fix various naming issues:
11810,11811c11843,11844
< eval: (ispell-change-dictionary "british")
< eval: (if (boundp 'set-language-environment) (set-language-environment 'Latin-1))
---
> ispell-local-dictionary: "british"
> coding: iso-8859-1
parent 0bf36cbf
2007-06-09 <David Byers@GULAG>
2007-06-10 <David Byers@GULAG>
Better display of texts claiming to be us-ascii:
* mime.el (lyskom-mime-decode-content-type): Pretend us-ascii
texts are really latin-1.
Fix bug 819:
* completing-read.el (lyskom-read-conf-internal): When an exact
match is found, return t only if the input string is equal to the
only alternative.
Fix bug 1277:
* swedish-strings.el (coding-system-mismatch-warning): Added
reference to Emacs manual.
* language.el (lyskom-language-keymap-internal): Let Emacs 22.1
follow links with mouse-1.
* utilities.el (lyskom-check-configuration): Don't warn about
coding system if UTF-8 is supported.
* lyskom-buttons.el (lyskom-make-button-menu): Encode menu strings
properly.
2007-06-09 <David Byers@GULAG>
Prefer UTF-8 over all but latin-1:
* mime.el (lyskom-charset-alist): Never choose us-ascii. When
us-ascii text is detected, assume latin-1 instead. For some
reason, us-ascii is detected on some emacsen even when this is not
the case. A more powerful charset would perhaps be a better
choice, but chances are if charset detection is broken, then what
are the chances that e.g. unicode conversion works?
(lyskom-charset-alist): Include utf-8 early in the list, making it
the preferred charset (when it works).
Follow links with mouse-1 in Emacs 22.1:
* language.el (lyskom-language-keymap-internal): Bind follow-links
in the global LysKOM keymaps.
Fix various naming issues:
* filter.el (lyskom-copy-filter): Renamed from copy-filter.
(lyskom-filter-p): Renamed from filter-p.
(lyskom-make-filter): Renamed from make-filter.
......@@ -11807,6 +11840,6 @@ Sun Oct 12 00:39:47 1997 David Byers <davby@litefix.ida.liu.se>
Local Variables:
outline-regexp:"M\\|T\\|W\\|F\\|S\\|\t\\\*"
eval: (ispell-change-dictionary "british")
eval: (if (boundp 'set-language-environment) (set-language-environment 'Latin-1))
ispell-local-dictionary: "british"
coding: iso-8859-1
End:
......@@ -676,9 +676,7 @@ function work as a name-to-conf-stat translator."
candidate-list)))
(if specials (setq name-list (nconc specials name-list)))
(cond ((lyskom-completing-member string name-list)
(or (and (= (length name-list) 1) t) string)) ; Exact match
((= (length name-list) 1) (car name-list))
(cond ((= (length name-list) 1) (if (string= (car name-list) string) t (car name-list)))
((string-match (lyskom-get-string 'person-or-conf-no-regexp)
string) nil)
((string-match (lyskom-get-string 'session-no-regexp)
......
......@@ -1988,7 +1988,8 @@ but the LysKOM server you are using recommends \"%#2s\".
You may encounter problems when writing comments, and comments to your
texts may contain a mix of characters that cannot be encoded or
displayed correctly. Please consider changing your language
environment to one that uses \"%#2s\" to encode text.
environment to one that uses \"%#2s\" to encode text (see the Emacs
manual and the command set-language-environment for more information).
")
......
......@@ -181,16 +181,17 @@ If there is no active area, then do something else."
;; function alters the menu, so we copy the entries to prevent it
;; from fiddling with lyskom-button-actions.
(let* ((lyskom-language lyskom-global-language)
(title (lyskom-maybe-recode-string title 'iso-8859-1 t)))
(title (lyskom-menu-encode title 'item)))
(when (> (length title) 44) (setq title (concat (substring title 0 40)
" ...")))
(cond ((string-match "XEmacs" (emacs-version))
(cons (lyskom-maybe-recode-string title 'iso-8859-1 t)
(cons title
(delq nil
(mapcar (lambda (entry)
(and (funcall filter (cdr entry) arg)
(vector (lyskom-maybe-recode-string
(lyskom-get-string (car entry)) 'iso-8859-1 t)
(vector (lyskom-menu-encode
(lyskom-get-string (car entry))
'item)
(list (cdr entry)
buf
(if (listp arg)
......@@ -201,13 +202,16 @@ If there is no active area, then do something else."
entries))))
(t (append (list 'keymap title)
(delq nil
(mapcar (lambda (entry)
(and (funcall filter (cdr entry) arg)
(let ((tmp (copy-tree entry)))
(setcar tmp (lyskom-maybe-recode-string
(lyskom-get-string (car tmp))
'iso-8859-1 t))
(cons `(,(cdr entry) ,buf ,arg ,text) tmp))))
(mapcar
(lambda (entry)
(and (funcall filter (cdr entry) arg)
(let ((tmp (copy-tree entry)))
(setcar tmp
(lyskom-menu-encode
(lyskom-get-string (car tmp))
'item))
(cons `(,(cdr entry) ,buf ,arg ,text)
tmp))))
entries)))))))
......
......@@ -34,13 +34,18 @@
"$Id$\n"))
(defvar lyskom-charset-alist
'(((ascii) . us-ascii)
`(((ascii) . iso-8859-1)
((ascii latin-iso8859-1) . iso-8859-1)
,@(condition-case nil
(when (lyskom-coding-system-get 'mule-utf-8 'safe-charsets)
(list (cons (lyskom-coding-system-get 'mule-utf-8
'safe-charsets)
'utf-8)))
(error nil))
((ascii latin-iso8859-2) . iso-8859-2)
((ascii latin-iso8859-3) . iso-8859-3)
((ascii latin-iso8859-4) . iso-8859-4)
((ascii cyrillic-iso8859-5) . iso-8859-5)
;;; ((ascii cyrillic-iso8859-5) . koi8-r)
((ascii arabic-iso8859-6) . iso-8859-6)
((ascii greek-iso8859-7) . iso-8859-7)
((ascii hebrew-iso8859-8) . iso-8859-8)
......@@ -57,22 +62,6 @@
latin-jisx0201 japanese-jisx0208-1978
chinese-gb2312 japanese-jisx0208
korean-ksc5601 japanese-jisx0212) . iso-2022-jp-2)
;; ((ascii latin-iso8859-1 greek-iso8859-7
;; latin-jisx0201 japanese-jisx0208-1978
;; chinese-gb2312 japanese-jisx0208
;; korean-ksc5601 japanese-jisx0212
;; chinese-cns11643-1 chinese-cns11643-2) . iso-2022-int-1)
;; ,(if (or (not (fboundp 'charsetp)) ;; non-Mule case
;; (charsetp 'unicode-a)
;; (not (mm-coding-system-p 'mule-utf-8)))
;; '(utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e)
;; ;; If we have utf-8 we're in Mule 5+.
;; (append '(utf-8)
;; (delete 'ascii
;; (lyskom-coding-system-get 'mule-utf-8 'safe-charsets))))
))
......@@ -187,8 +176,12 @@
(setq param-value (substring param-value 1 -1)))
(setq param-value (replace-in-string param-value
lyskom-mime-wrap-regexp ""))
(when (and (memq param-name '(charset format)) param-value)
(setq param-value (intern param-value)))
(when (eq param-name 'charset)
(setq param-value (intern param-value))
(when (eq param-value 'us-ascii) (setq param-value 'iso-8859-1)))
(when (eq param-name 'format)
(setq param-value (intern param-value)))
(when (and (string-match lyskom-mime-comment-regexp data start)
(eq (match-beginning 0) start))
......
......@@ -2036,7 +2036,8 @@ i emacs.
andras inlgg, och kommentarer till dina inlgg kan f en blandning av
tecken som inte gr att visa ordentligt. Du br byta sprkomgivning i
emacs till en som anvnder \"%#2s\" som frstahandsval fr
teckenkodning.
teckenkodning (se Emacs-manualen och kommandot set-language-environment
fr mer information).
")
......
......@@ -58,7 +58,8 @@
;; Check coding system
(when (and enable-multibyte-characters
(not (memq 'utf-8
(not (coding-system-p 'utf-8))
(not (memq 'utf-8
(lyskom-coding-system-get
(symbol-value (car coding-category-list))
'alias-coding-systems)))
......
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