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

Fixed bugs 964, 753, 831 and 927.

Detailed changes:
> 2003-01-06  David Byers  <david.byers@swipnet.se>
>
> 	Clean up :variable assignments:
> 	* compatibility.el (lyskom-make-self-evaluating): New macro. Use
> 	it to make several :symbols self-evalutaing in Emacs 19.
>
> 	Fix bug 964:
> 	* faces.el (lyskom-setup-faces-for-buffer): Catch errors cause
> 	when generating faces since running this code in a tty usually
> 	causes problems. Don't just check window-system, because the color
> 	stuff might work on some implementations.
>
> 	Fix bug 753:
> 	* flags.el (kom-copy-options): New command.
>
> 	* english-strings.el (lyskom-command): Added kom-copy-options.
>
> 	* swedish-strings.el (lyskom-command): Renamed "Spara variabler"
> 	to "Spara inställningar". Added kom-copy-options.
>
> 	Fix bug 831 as well as possible:
> 	* lyskom-rest.el (lyskom-scroll): Cleaned up for readability. Move
> 	point six chars in from the right margin when not scrolling to the
> 	end to prevent automatic hscrolling in Emacs 21.x.
>
> 	Fix bug 927:
> 	* commands1.el (lyskom-who-is-on-check-membership-9): Don't
> 	include passive members.
> 	(lyskom-who-is-on-check-membership-8): Ditto.
>
parent fe48d131
2003-01-06 David Byers <david.byers@swipnet.se>
Clean up :variable assignments:
* compatibility.el (lyskom-make-self-evaluating): New macro. Use
it to make several :symbols self-evalutaing in Emacs 19.
Fix bug 964:
* faces.el (lyskom-setup-faces-for-buffer): Catch errors cause
when generating faces since running this code in a tty usually
causes problems. Don't just check window-system, because the color
stuff might work on some implementations.
Fix bug 753:
* flags.el (kom-copy-options): New command.
* english-strings.el (lyskom-command): Added kom-copy-options.
* swedish-strings.el (lyskom-command): Renamed "Spara variabler"
to "Spara instllningar". Added kom-copy-options.
Fix bug 831 as well as possible:
* lyskom-rest.el (lyskom-scroll): Cleaned up for readability. Move
point six chars in from the right margin when not scrolling to the
end to prevent automatic hscrolling in Emacs 21.x.
Fix bug 927:
* commands1.el (lyskom-who-is-on-check-membership-9): Don't
include passive members.
(lyskom-who-is-on-check-membership-8): Ditto.
2003-01-05 David Byers <david.byers@swipnet.se>
* I have cleaned up all over the place. There are no ChangeLog
......
......@@ -2718,24 +2718,15 @@ Uses Protocol A version 9 calls"
0 (conf-stat->no-of-members conf-stat)))
(len (length who-info-list))
(i 0)
(res nil))
(res nil)
(mship nil))
(while (< i len)
(if (lyskom-member-list-find-member
(setq mship (lyskom-member-list-find-member
(who-info->pers-no (aref who-info-list i))
members)
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
(defun lyskom-who-is-present-check-membership-8 (who-info-list conf-stat)
"Returns a list of those in WHO-INFO-LIST which is present in CONF-STAT."
(let ((len (length who-info-list))
(i 0)
(res nil))
(while (< i len)
(if (eq (who-info->working-conf (aref who-info-list i))
(conf-stat->conf-no conf-stat))
members))
(when (and mship
(not (membership-type->passive
(member->membership-type mship))))
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
......@@ -2746,12 +2737,27 @@ Uses Protocol A version 9 calls"
0 (conf-stat->no-of-members conf-stat)))
(len (length who-info-list))
(i 0)
(res nil))
(res nil)
(mship nil))
(while (< i len)
(if (lyskom-member-list-find-member
(setq mship (lyskom-member-list-find-member
(dynamic-session-info->person (aref who-info-list i))
members)
members))
(when (and mship
(not (membership-type->passive
(member->membership-type mship))))
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
(defun lyskom-who-is-present-check-membership-8 (who-info-list conf-stat)
"Returns a list of those in WHO-INFO-LIST which is present in CONF-STAT."
(let ((len (length who-info-list))
(i 0)
(res nil))
(while (< i len)
(if (eq (who-info->working-conf (aref who-info-list i))
(conf-stat->conf-no conf-stat))
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
......@@ -2764,7 +2770,6 @@ Uses Protocol A version 9 calls"
(while (< i len)
(if (eq (dynamic-session-info->working-conference (aref who-info-list i))
(conf-stat->conf-no conf-stat))
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
......
......@@ -635,16 +635,17 @@ Otherwise treat \\ in NEWTEXT string as special:
;; Emacs 21.
(eval-and-compile
(condition-case nil
(setq lyskom-dummy-variable-to-fool-the-byte-compiler
(symbol-value ':default-help-echo))
(error (set ':default-help-echo ':default-help-echo)))
(condition-case nil
(defmacro lyskom-make-self-evaluating (var)
`(condition-case nil
(setq lyskom-dummy-variable-to-fool-the-byte-compiler
(symbol-value ':group))
(error (set ':group ':group))))
(symbol-value ',var))
(error (set ',var ',var))))
(lyskom-make-self-evaluating :default)
(lyskom-make-self-evaluating :default-help-echo)
(lyskom-make-self-evaluating :group)
(lyskom-make-self-evaluating :automatic)
(lyskom-make-self-evaluating :read-only))
;;; Local Variables:
......
......@@ -1838,6 +1838,10 @@ environment to one that uses \"%#2s\" to encode text.
(jump-from-text . "Skip comments to which text? ")
(jumping-from-text . "Skipping comments to text %#1n.\n")
(jumping-from-text-review . "Skipping reviewed comments.\n")
(session-to-copy-options-from . "Session to copy options from: ")
(reading-settings-from . "Reeading options from %s...")
(reading-settings-from-done . "Reading options from %s...done")
))
......@@ -2041,6 +2045,7 @@ environment to one that uses \"%#2s\" to encode text.
(kom-change-server-faq . "Change server FAQ")
(kom-recommend-conference . "Recommend conference")
(kom-redirect-comments . "Redirect comments")
(kom-copy-options . "Copy options")
))
(lyskom-language-var global lyskom-language-codes en
......
......@@ -280,15 +280,24 @@ This is a LysKOM face variable."
(defun lyskom-setup-faces-for-buffer ()
"Set up faces for the current buffer."
(setq lyskom-default-text-body-face 'default)
(setq lyskom-default-dashed-lines-face 'default)
(setq lyskom-default-async-text-body-face 'default)
(setq lyskom-default-async-dashed-lines-face 'default)
(condition-case nil
(let ((faces (lyskom-generate-faces-for-background
(or (face-background 'default)
(frame-property (selected-frame) 'background-color)
"#ffffff"))))
(setq lyskom-default-text-body-face (cdr (assq 'text-body faces)))
(setq lyskom-default-dashed-lines-face (cdr (assq 'dashed-lines faces)))
(setq lyskom-default-async-text-body-face (cdr (assq 'async-text-body faces)))
(setq lyskom-default-async-dashed-lines-face (cdr (assq 'async-dashed-lines faces)))
))
(setq lyskom-default-text-body-face
(cdr (assq 'text-body faces))
lyskom-default-dashed-lines-face
(cdr (assq 'dashed-lines faces))
lyskom-default-async-text-body-face
(cdr (assq 'async-text-body faces))
lyskom-default-async-dashed-lines-face
(cdr (assq 'async-dashed-lines faces))))
(error nil)))
;;; ================================================================
......
......@@ -56,6 +56,32 @@
(lyskom-get-string 'saving-settings-done)
(lyskom-get-string 'could-not-save-options)))
(def-kom-command kom-copy-options ()
"Copy options from one setting to another."
(interactive)
(let* ((completions
(mapcar (lambda (x)
(cons (save-excursion
(set-buffer x)
(buffer-name))
x))
(delq (or lyskom-buffer (current-buffer))
(copy-sequence lyskom-buffer-list))))
(from-session (completing-read
(lyskom-get-string 'session-to-copy-options-from)
completions
nil t)))
(lyskom-message (lyskom-get-string 'reading-settings-from) from-session)
(lyskom-read-options from-session)
(lyskom-message (lyskom-get-string 'reading-settings-from-done) from-session)
;; Inline kom-save-options
(lyskom-save-options (or lyskom-buffer (current-buffer))
(lyskom-get-string 'saving-settings)
(lyskom-get-string 'saving-settings-done)
(lyskom-get-string 'could-not-save-options))
))
;;;============================================================
;;; lyskom-save-options
......
......@@ -1015,30 +1015,22 @@ will automagically flow into your lyskom log file."
The position lyskom-last-viewed will always remain visible."
;; Find a window to scroll. Scroll the selected window if that shows LysKOM.
;; Otherwise scroll any window currently showing LysKOM.
(let ((win
(cond
((eq (window-buffer (selected-window)) (current-buffer))
(let ((win (cond ((eq (window-buffer (selected-window)) (current-buffer))
(selected-window))
(t ;(get-buffer-window (current-buffer))
nil))))
(if (and win ;Do nothing if no window showed LysKOM.
(not (pos-visible-in-window-p (point-max))))
(progn
(t nil))))
(when (and win (not (pos-visible-in-window-p (point-max))))
(goto-char (point-max))
(recenter -1)
(if (not (pos-visible-in-window-p lyskom-last-viewed))
(progn
(unless (pos-visible-in-window-p lyskom-last-viewed)
(set-window-start win lyskom-last-viewed)
(move-to-window-line -1)
(vertical-motion 1)
(when (not (pos-visible-in-window-p))
(forward-char -1)
(when (> (current-column)
(window-width))
(backward-char (+ (- (current-column)
(window-width))
2)))
)))))))
(when (> (current-column) (window-width))
(backward-char (+ (- (current-column) (window-width)) 6)))
)))))
;;;
;;; Thanks to the stupid danish fool who wrote the widget package, we
......@@ -1051,7 +1043,6 @@ The position lyskom-last-viewed will always remain visible."
;;; (Me, upset? Why would you think *that*?)
;;;
(defun lyskom-do-special-inserts (start sym)
(condition-case var
(let ((bounds (next-text-property-bounds 1 (max (point-min) (1- start))
......
......@@ -1873,6 +1873,10 @@ teckenkodning.
(jump-from-text . "Hoppa ver kommentarer till vilken text? ")
(jumping-from-text . "Hoppar ver kommentarer till inlgg %#1n.\n")
(jumping-from-text-review . "Hoppar ver tersedda kommentarer.\n")
(session-to-copy-options-from . "Kopiera instllningar frn session: ")
(reading-settings-from . "Lser instllningar frn %s...")
(reading-settings-from-done . "Lser instllningar frn %s...klart")
))
(lyskom-language-var local lyskom-month-names sv
......@@ -1995,7 +1999,7 @@ teckenkodning.
(kom-unset-conf-motd . "Ta bort lapp p drren")
(kom-save-text . "Arkivera inlgg (till fil)")
(kom-save-text-body . "Spara inlggstext (p fil)")
(kom-save-options . "Spara variabler")
(kom-save-options . "Spara instllningar")
(kom-shutdown-server . "Stng av servern")
(kom-sync-database . "Spara databasen")
(kom-enable-adm-caps . "verg till administratrsmod")
......@@ -2075,6 +2079,8 @@ teckenkodning.
(kom-recommend-conference . "Rekommendera mte")
(kom-redirect-comments . "Dirigera om kommentarer")
(kom-move-text-tree . "Flytta trd")
(kom-copy-options . "Kopiera instllningar")
))
(lyskom-language-var local lyskom-language-codes sv
......
......@@ -1887,6 +1887,7 @@ Users are encouraged to use their best sense of humor."
kom-review-server-faq
kom-recommend-conference
kom-redirect-comments
kom-copy-options
))
;;; ================================================================
......
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