Commit 9e5c2d42 authored by David Byers's avatar David Byers

Fix bug 1678, hard-coded ssl relay port, problems with detecting correct...

Fix bug 1678, hard-coded ssl relay port, problems with detecting correct charset at startup, GUI element encoding on mac
parent 8340bb89
2010-05-13 David Byers <davby@ida.liu.se>
* view-text.el (lyskom-get-root-text-belongs-to): In node
transform, explicitly look in the cache (it's faster), and pass
text-no, not text-stat to lyskom-find-dag-roots.
* review.el (lyskom-find-root): In node transform, explicitly look
in the cache (it's faster), and pass text-no, not text-stat to
lyskom-find-dag-roots.
* utilities.el (lyskom-check-configuration): Also look at
mime-charset.
(lyskom-magic-minibuffer-post-command): Check that
lyskom-minibuffer-point is bound before trying to use it.
(lyskom-find-dag-roots): Apply node-transform to start node.
* startup.el (lyskom-setup-ssh-relay): Removed hard-coded relay
port.
* menus.el (lyskom-menu-encoding-rules): Inserted menu coding
rules for mac (blindly, I can't test).
2010-05-08 David Byers <davby@ida.liu.se>
* utilities.el (lyskom-check-configuration): Check
coding-system-aliases for the server coding system too.
2009-05-09 Pontus Freyhult <pont@soua.net>
* vars.el.in (lyskom-default-password): Fixed typo.
......
......@@ -227,6 +227,7 @@ KEYS should be a string in the format used for saving keyboard macros
(lyskom-function-alias check-coding-system (name) (error "No such coding system"))
(lyskom-function-alias find-coding-systems-for-charsets (cs) nil)
(lyskom-function-alias coding-system-get (cs prop) nil)
(lyskom-function-alias coding-system-aliases (cs) (list cs))
(lyskom-function-alias char-width (c) 1)
(lyskom-function-alias find-charset-string (str) (list (or (lyskom-default-value-safe 'lyskom-server-coding-system)
'ascii)))
......
......@@ -461,6 +461,9 @@
((boundp 'gtk-version-string) '((title . utf-8)
(item . utf-8)
(keys . utf-8)))
((eq window-system 'mac) '((title . mac-roman)
(item . nil)
(keys . nil)))
((memq window-system '(win32 mswindows w32)) '((title . utf-8)
(item . nil)
(keys . utf-8)))
......
......@@ -44,19 +44,21 @@
(lyskom-error "Unable to load required mm-util from gnus")))
(defun lyskom-mime-charset-for-text-gnu (start end)
(let ((codings (delq nil
(mapcar (lambda (cs)
(cond ((eq cs 'undecided) lyskom-server-coding-system)
((eq cs 'compound-text) nil)
((or (coding-system-get cs 'mime-charset)
(coding-system-get cs ':mime-charset)))))
(find-coding-systems-region start end)))))
(cond ((memq lyskom-server-coding-system codings) lyskom-server-coding-system)
(let ((codings
(delq nil
(mapcar (lambda (cs)
(cond ((eq cs 'undecided) lyskom-server-coding-system)
((eq cs 'compound-text) nil)
((or (coding-system-get cs 'mime-charset)
(coding-system-get cs ':mime-charset)))))
(find-coding-systems-region start end)))))
(cond ((memq lyskom-server-coding-system codings)
lyskom-server-coding-system)
((lyskom-traverse cs kom-preferred-charsets
(when (memq cs codings)
(lyskom-traverse-break cs))))
(t (car codings)))))
(defun lyskom-mime-charset-for-text (start end)
"Determine which MIME charset to use for region START..END.
......
......@@ -1536,8 +1536,9 @@ just a list of the firt root found."
(lambda (text-no)
(unless kom-review-uses-cache
(cache-del-text-stat text-no))
(blocking-do 'get-text-stat text-no))
text-stat
(or (cache-get-text-stat text-no)
(blocking-do 'get-text-stat text-no)))
(text-stat->text-no text-stat)
(not all)))
......
......@@ -419,7 +419,6 @@ clients of the event. See lyskom-mode for details on lyskom."
kom-ssh-relay-host))
(when proc (delete-process proc))
(setq relay-port (+ 10000 (random 20000)))
(setq relay-port 4455)
(put procsym 'relay-host
(if (string-match "@" kom-ssh-relay-host)
(substring kom-ssh-relay-host (1+ (match-beginning 0)))
......
......@@ -57,22 +57,19 @@
))
;; Check coding system
(when (and enable-multibyte-characters
(not (coding-system-p 'utf-8))
(not (memq 'utf-8
(lyskom-coding-system-get
(symbol-value (car coding-category-list))
'alias-coding-systems)))
(not (memq lyskom-server-coding-system
(lyskom-coding-system-get
(symbol-value (car coding-category-list))
'alias-coding-systems))))
(lyskom-format-insert 'coding-system-mismatch-warning
(symbol-value (car coding-category-list))
lyskom-server-coding-system
`(face ,kom-warning-face)
))
)
(when enable-multibyte-characters
(let* ((cs (symbol-value (car coding-category-list)))
(aliases (or (lyskom-coding-system-get cs 'mime-charset)
(lyskom-coding-system-get cs ':mime-charset)
(lyskom-coding-system-aliases cs)
(lyskom-coding-system-get cs 'alias-coding-systems))))
(when (and (not (memq 'utf-8 aliases))
(not (memq lyskom-server-coding-system aliases)))
(lyskom-format-insert 'coding-system-mismatch-warning
(symbol-value (car coding-category-list))
lyskom-server-coding-system
`(face ,kom-warning-face)
)))))
(error nil)
)))
......@@ -147,7 +144,7 @@ predecessor function. It is a function that takes a single
argument.
START-NODE is the initial argument to give to the predecessor
function. It is not transformed using NODE-TRANSFORM.
function. It is also transformed using NODE-TRANSFORM.
OTHER-ARGS are other arguments to FUNC, appended at each call.
......@@ -162,9 +159,13 @@ Cycles are by remembering the visited nodes. When a backlink is
detected, it is not traversed."
(let ((result nil)
(visited nil)
(candidates (apply predecessor-func start-node other-args))
(candidates (apply predecessor-func
(funcall node-transform start-node)
other-args))
(cur nil)
(tem nil))
(unless candidates
(setq result (cons start-node result)))
(while candidates
(setq cur (car candidates)
candidates (cdr candidates))
......@@ -2216,7 +2217,8 @@ point without altering the buffer contents."
(when ranges
(lyskom-magic-minibuffer-cancel))))
(unless (or (null lyskom-minibuffer-point)
(unless (or (not (boundp 'lyskom-minibuffer-point))
(null lyskom-minibuffer-point)
(eq lyskom-minibuffer-point (point)))
(lyskom-magic-minibuffer-cancel)))
......
......@@ -611,8 +611,10 @@ If optional FOOTNOTES is non-nil, include text TEXT-STAT is a footnote to."
"Return the top-level parent of TEXT-STAT, following attachment
and footnote (if optional FOOTNOTES is non-nil"
(lyskom-find-dag-roots 'lyskom-get-text-belongs-to
(lambda (x) (blocking-do 'get-text-stat x))
text-stat
(lambda (x)
(or (cache-get-text-stat x)
(blocking-do 'get-text-stat x)))
(text-stat->text-no text-stat)
nil
footnotes))
......
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