Commit 225ff230 authored by David Byers's avatar David Byers
Browse files

Fix bugs 528, 571

parent 1536f2c6
2002-05-25 David Byers <david.byers@swipnet.se>
Fix bug 528:
* lyskom-buttons.el (lyskom-button-copy-text-no): New function.
* vars.el.in (lyskom-button-actions): Added
lyskom-button-copy-text-no for texts.
Fix bug 571:
* utilities.el (lyskom-delete-duplicates): New function.
* edit-text.el (lyskom-edit-send-check-recipients): Misplaced
paren caused two loops to be nested when they shouldn't have been.
Use lyskom-delete-duplicates to eliminaate duplicate authors.
2002-05-25 Per Cederqvist <ceder@ceder.dyndns.org>
* vars.el.in (lyskom-maybe-setq): Added missing commas: we want to
......
......@@ -678,7 +678,6 @@ The element last pushed is first in the list."
"Push VALUE onto the front of COLLECTOR's value"
(setcdr collector (cons value (cdr collector))))
(eval-and-compile (provide 'lyskom-clienttypes))
;;; clienttypes.el ends here
......@@ -894,7 +894,9 @@ Cannot be called from a callback."
text-no
raw-author-list))
(lyskom-wait-queue 'sending)
(setq raw-author-list (collector->value raw-author-list))
(setq raw-author-list (lyskom-delete-duplicates
(collector->value raw-author-list)
'conf-stat->conf-no))
;;
;; Filter the list. Remote all authors that are direct recipients
......@@ -974,7 +976,7 @@ Cannot be called from a callback."
(not (membership-type->passive
(membership->type membership))))
(lyskom-traverse-break t)))
(setq authors-to-ask-about (cons author authors-to-ask-about)))
(setq authors-to-ask-about (cons author authors-to-ask-about)))))
;;
;; Now authors-to-ask-about contains all authors that we
......@@ -1005,7 +1007,7 @@ Cannot be called from a callback."
'CC-RECPT)
(or send-comments-to
(conf-stat->conf-no author)))
extra-headers)))))))))
extra-headers)))))))
extra-headers))
......
......@@ -1643,6 +1643,7 @@ You must become an active member of the conference to enter it.\n")
;; Button actions
(lyskom-button-view-text-action . "View text")
(lyskom-button-copy-text-no-action . "Copy text number")
(lyskom-button-review-noconversion-action . "Review unconverted")
(lyskom-button-find-root-review-action . "Review tree")
(lyskom-button-find-root-action . "Review root text")
......
......@@ -591,6 +591,12 @@ This is a LysKOM button action."
(goto-char (point-max))
(kom-view arg))))
(defun lyskom-button-copy-text-no (but arg text)
"In the LysKOM buffer BUF, ignore ARG and copy TEXT to the kill ring.
This is a LysKOM button action."
(kill-new text))
(defun lyskom-button-review-noconversion (buf arg text)
"In the LysKOM buffer BUF, view the text ARG without conversion.
Last argument TEXT is ignored. This is a LysKOM button action."
......
......@@ -438,8 +438,7 @@ shown to other users."
(interactive)
(lyskom-start-of-command 'kom-start-anew)
(lyskom-completing-clear-cache)
(let ((old-me lyskom-pers-no)
(new-me nil)
(let ((new-me nil)
(login-successful nil))
(unwind-protect
(progn
......@@ -480,7 +479,11 @@ shown to other users."
;; directly instead of new-me, but that caused
;; problem with asynchrounous code trying to
;; access it.
(setq lyskom-pers-no new-me)
;;
;; Setting lyskom-pers-no fscks up other things
;; if we do keyboard-quit in the middle, so don't.
;;
;; (setq lyskom-pers-no new-me)
;; DEBUG
(if (null conf-stat)
......@@ -528,6 +531,7 @@ shown to other users."
(setq lyskom-is-new-user nil))))
;; Now we are logged in.
(setq lyskom-pers-no new-me)
(lyskom-insert-string 'are-logged-in)
(unless lyskom-is-running-compiled
......@@ -554,7 +558,7 @@ shown to other users."
;; If login succeeded, clear the caches and set the language
(if login-successful
(when login-successful
(progn (clear-all-caches)
(unless (eq lyskom-language kom-default-language)
(when (lyskom-set-language kom-default-language 'local)
......@@ -565,8 +569,7 @@ shown to other users."
(lyskom-format-insert
'language-set-to
(lyskom-language-name kom-default-language))))
(setq lyskom-have-one-login t))
(setq lyskom-pers-no old-me))
(setq lyskom-have-one-login t)))
;; Show motd and encourage writing a presentation
......@@ -585,7 +588,6 @@ shown to other users."
;; Start the prefetch and update some basic caches
(lyskom-refetch))
(lyskom-end-of-command)))
;; Run the hook kom-login-hook. We don't want to hang the
......
......@@ -1656,6 +1656,7 @@ Du m
;; Button actions
(lyskom-button-view-text-action . "terse texten")
(lyskom-button-copy-text-no-action . "Kopiera inlggsnumret")
(lyskom-button-review-noconversion-action . "terse omodifierat")
(lyskom-button-find-root-review-action . "terse trd")
(lyskom-button-find-root-action . "terse urinlgget")
......
......@@ -682,6 +682,21 @@ destructive operations on the result may affect either operand."
(unless (memq x b) (setq result (cons x result))))
(nconc (nreverse result) b)))
(defun lyskom-delete-duplicates (list &optional key)
"Removes all but one instance of each element in LIST.
If optional argument KEY is non-nil, apply KEY to each element before
comparison. Comparison is done with eq."
(let ((clist (mapcar (lambda (el)
(if key
(cons (funcall key el) el)
(cons el el)))
list))
(result nil))
(lyskom-traverse el clist
(unless (assq (car el) result)
(setq result (cons el result))))
(nreverse (mapcar 'cdr result))))
;;; ======================================================================
......
......@@ -968,7 +968,7 @@ to some URL viewers."
"List of URL managers. Each element is a list consisting of
(MANAGER-REGEXP PROTOCOLS NAME VIEW-FUNCTION). When LysKOM attempts to
view a URL, kom-url-viewer-preferences is scanned, and the URL
manager whose MANAGER-REGEXP first matches an element in
-manager whose MANAGER-REGEXP first matches an element in
kom-url-viewer-preferences and whose PROTOCOLS matches the protocol of
the selected URL is used to view the URL by calling its VIEW-FUNCTION
with the URL and the manager entry as arguments.")
......@@ -1313,6 +1313,7 @@ appear more than once"
text-popup-title
lyskom-button-view-text
((lyskom-button-view-text-action . lyskom-button-view-text)
(lyskom-button-copy-text-no-action . lyskom-button-copy-text-no)
(lyskom-button-review-noconversion-action . lyskom-button-review-noconversion)
(lyskom-button-find-root-review-action . lyskom-button-find-root-review)
(lyskom-button-find-root-action . lyskom-button-find-root)
......
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