diff --git a/src/ChangeLog b/src/ChangeLog index 0a442fa3d0ebff59530cf90e9a2f387b5f7d5bc3..b06f470c6e20bf61add3afdae79dc850a51dd011 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,72 @@ 2000-12-31 Ulrik Haugen + * view-text.el (lyskom-view-text): Replaced + (or (eq foo 'a) (eq foo 'b) ...) with (member foo '(a b ...)) + This means that the comparison will be done by `equal' instead, + but that shouldn't matter. + (lyskom-text-read-p): Ditto. + (lyskom-text-read-at-least-once-p): Ditto. + (lyskom-mark-as-read): Ditto. + + * utilities.el (lyskom-text-recipients): Ditto. + + * review.el (lyskom-get-texts-by-to): Ditto. + (kom-review-backward): Ditto. + (kom-review-clear): Ditto. + + * prefetch.el (lyskom-prefetch-text-all-handler): Ditto. + (lyskom-prefetch-texttree-handler): Ditto. + (lyskom-prefetch-texts-handler): Ditto. + + * parse.el (lyskom-parse-bitstring): Ditto. + + * mship-edit.el (lp--format-insert-entry): Ditto except I replaced + (and (not (eq foo a)) (not (eq foo b)) ...) with + (not (member foo (list a b)) + + * lyskom-rest.el (kom-view-next-new-text): Ditto. + (kom-view-next-text): Ditto. + (lyskom-is-read-handler): Ditto. + (lyskom-get-prioritized-session): Ditto. + (lyskom-what-to-do): Ditto. + + * lyskom-buttons.el (lyskom-generate-button): Ditto. + (lyskom-view-url-windows): Ditto. + (lyskom-view-url-netscape): Ditto. + + * komtypes.el (lyskom-is-recipient): Ditto. + + * filter.el (lyskom-filter-text-p-2): Ditto. + + * filter-edit.el (lyskom-verify-filter-pattern): Ditto. + (lyskom-format-filter-pattern-insert): Ditto. + (lyskom-filter-edit-insert-pattern): Ditto. + + * edit-text.el (lyskom-edit-send-check-recipients): Ditto. + (lyskom-edit-send-check-recipients): Ditto. + (lyskom-edit-get-commented): Ditto. + + * completing-read.el (lyskom-complete-string): Ditto. + + * commands2.el (kom-list-summary): Ditto. + (kom-postpone): Ditto. + (kom-set-personal-label): Ditto. + + * commands1.el (lyskom-get-recipients-from-misc-list): Ditto. + (lyskom-list-created-conferences-2): Ditto except I replaced + (or (eq (a) foo) (eq (b) foo) ...) with + (member foo (list (a) (b) ...)) + (lyskom-jump): Ditto. + + * clienttypes.el (read-list-delete-text): Ditto. + + * buffers.el (lyskom-display-buffer): Ditto. + + * autoconf.el (extract-configuration-option): Ditto. + + * async.el (lyskom-async-new-text): Ditto. + (lyskom-async-deleted-text): Ditto. + * swedish-strings.el (lyskom-sv-mode-map): Made "" scroll up as well as the other delete-keys. diff --git a/src/async.el b/src/async.el index 2fffe5dfe25699396590f1d5c8af750b34ffc54d..bb5aaab216554eaaadf39e851c9f2d7a430e9f6f 100644 --- a/src/async.el +++ b/src/async.el @@ -667,9 +667,7 @@ converted, before insertion." misc-info (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc-info))) (cond - ((or (eq type 'RECPT) - (eq type 'CC-RECPT) - (eq type 'BCC-RECPT)) + ((member type '(RECPT CC-RECPT BCC-RECPT)) ;; add on lyskom-reading-list and lyskom-to-do-list if ;; this recipient is a recipient that has been checked. (if (and (eq (misc-info->recipient-no misc-info) @@ -705,9 +703,7 @@ converted, before insertion." (lyskom-traverse misc-info (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc-info))) - (cond ((or (eq type 'RECPT) - (eq type 'CC-RECPT) - (eq type 'BCC-RECPT)) + (cond ((member type '(RECPT CC-RECPT BCC-RECPT)) (initiate-get-conf-stat 'async 'lyskom-delete-old-text (misc-info->recipient-no misc-info) text-stat diff --git a/src/autoconf.el b/src/autoconf.el index 7034af41b66973248e321825bcf5d87ad04dcdbe..508203b6924b1a682fa305eea34ff07d729a4f2e 100644 --- a/src/autoconf.el +++ b/src/autoconf.el @@ -19,7 +19,7 @@ (cond ((and (eq c ?') (not dquot)) (setq squot (not squot))) ((and (eq c ?\") (not squot)) (setq dquot (not dquot))) ((eq c ?\\) (setq start (1+ start))) - ((and (or (eq c ?\ ) (eq c ?\t) (eq c ?\r) (eq c ?\n)) + ((and (member c '(?\ ?\t ?\r ?\n)) (not squot) (not dquot)) (setq end i)) diff --git a/src/buffers.el b/src/buffers.el index 835eebbd23bbea96e88e8e88b9367caf003a3cc2..f5c3cd165ee479546f141bbb54e83086ba2e6275 100644 --- a/src/buffers.el +++ b/src/buffers.el @@ -499,7 +499,7 @@ Returns the window displaying BUFFER." ;; OTHER, OTHER-WINDOW -- Switch to in another window ;; - ((or (eq open 'other) (eq open 'other-window)) + ((member open '(other other-window)) (switch-to-buffer-other-window buffer) (setq dedicated-window (selected-window)) (setq window (selected-window))) diff --git a/src/clienttypes.el b/src/clienttypes.el index f0f93192e26ad32a1cbb507c78dc03956700a6c6..0f6b3f3d4ad24d6f4f3eb8d275b9f00584bcf9db 100644 --- a/src/clienttypes.el +++ b/src/clienttypes.el @@ -253,9 +253,8 @@ TEXT-NO may be nil, in which case only empty read-infos on RLIST are removed." (if text-no (cond ((let ((type (read-info->type (car curr)))) - (or (eq type 'REVIEW) ; Don't change REVIEW et c. - (eq type 'REVIEW-TREE) - (eq type 'REVIEW-MARK)))) + ; Don't change REVIEW et c. + (member type '(REVIEW REVIEW-TREE REVIEW-MARK)))) (t ; Do change all other entries. (let ((tl (read-info->text-list (car curr)))) (text-list->delq tl text-no))))) diff --git a/src/commands1.el b/src/commands1.el index cea24463f1cf612dc385106d64b5e63c09b63fb9..5f6f0cd8356579f1f5a788ed75f3f01b44bf44fa 100644 --- a/src/commands1.el +++ b/src/commands1.el @@ -1209,9 +1209,7 @@ Don't ask for confirmation." (let* ((info (car misc-list)) (type (misc-info->type info))) (cond ((null misc-list) '()) - ((or (eq type 'RECPT) - (eq type 'CC-RECPT) - (eq type 'BCC-RECPT)) + ((member type '(RECPT CC-RECPT BCC-RECPT)) (append (list (intern (downcase (symbol-name type))) (misc-info->recipient-no info)) (lyskom-get-recipients-from-misc-list @@ -1601,9 +1599,9 @@ Those that you are not a member in will be marked with an asterisk." (lyskom-message (lyskom-format (if arg 'finding-created-pers-confs 'finding-created-confs) (elt counter 1) (elt counter 2))) - (when (and cs (or (eq (conf-stat->creator cs) pers-no) - (eq (conf-stat->supervisor cs) pers-no) - (eq (conf-stat->super-conf cs) pers-no))) + (when (and cs (member pers-no (list (conf-stat->creator cs) + (conf-stat->supervisor cs) + (conf-stat->super-conf cs)))) (aset counter 3 (1+ (elt counter 3))) (lyskom-format-insert "%[%#1@%4#2:m %#3c %4#4s %#5s %#2M%]\n" (lyskom-default-button 'conf (conf-stat->conf-no cs)) @@ -3175,8 +3173,7 @@ footnotes) to it as read in the server." misc (text-stat->misc-info-list text-stat) (cond - ((and (or (eq (misc-info->type misc) 'COMM-IN) - (eq (misc-info->type misc) 'FOOTN-IN)) + ((and (member (misc-info->type misc) '(COMM-IN FOOTN-IN)) (> (if (eq (misc-info->type misc) 'COMM-IN) (misc-info->comm-in misc) diff --git a/src/commands2.el b/src/commands2.el index 61bb776e20d486f11682e2f7639170f4f3179c09..a90e2fb1ffebad8666e6e7734e59643981156fbd 100644 --- a/src/commands2.el +++ b/src/commands2.el @@ -937,9 +937,7 @@ on one line." (let ((type (read-info->type (read-list->nth lyskom-reading-list r)))) - (if (or (eq type 'CONF) - (eq type 'REVIEW-MARK) - (eq type 'REVIEW)) + (if (member type '(CONF REVIEW-MARK REVIEW)) (setq len 0) (++ r)))) (read-list->nth lyskom-reading-list r))))))) @@ -1519,12 +1517,9 @@ current conference to another session." (> len 0)) (let ((type (read-info->type (read-list->first lyskom-reading-list)))) (cond - ((or (eq type 'REVIEW) - (eq type 'REVIEW-TREE) - (eq type 'REVIEW-MARK)) + ((member type '(REVIEW REVIEW-TREE REVIEW-MARK)) (read-list-rotate lyskom-reading-list)) - ((or (eq type 'COMM-IN) - (eq type 'FOOTN-IN)) + ((member type '(COMM-IN FOOTN-IN)) (set-read-list-del-first lyskom-reading-list)) ((eq type 'CONF) (let* ((rlist (read-info->text-list @@ -2025,8 +2020,7 @@ Return-value: 'no-session if there is no suitable session to switch to 0 label))) (cache-del-text-stat objno)) - ((or (eq type 'conf) - (eq type 'pers)) + ((member type '(conf pers)) (setq object (lyskom-read-conf-stat (lyskom-get-string (if (eq type 'pers) diff --git a/src/completing-read.el b/src/completing-read.el index e3e37fde0a4c7d2e7156ad35d258df4b8528bdb8..fa2b6f85f31bb9dc257a73a1795f7c2dab5a72a5 100644 --- a/src/completing-read.el +++ b/src/completing-read.el @@ -631,8 +631,8 @@ the LysKOM rules of string matching." ((eq (aref next-char-state 0) 'match) (if (eq (aref next-char-state 1) ?\ ) (progn - (cond ((or (eq (symbol-value current-state) 'start-of-word) - (eq (symbol-value current-state) 'start-of-string)) + (cond ((member (symbol-value current-state) + '(start-of-word start-of-string)) nil) ((eq last-event-worth-noting 'mismatch) (lyskom-complete-string-accumulate current-accumulator @@ -698,9 +698,8 @@ the LysKOM rules of string matching." ;; ((and (> paren-depth 0) - (or (eq (aref next-char-state 0) 'mismatch) - (eq (aref next-char-state 0) 'space-mismatch) - (eq (aref next-char-state 0) 'open-paren-mismatch))) + (member (aref next-char-state 0) + '(mismatch space-mismatch open-paren-mismatch))) (setq last-event-worth-noting 'mismatch) (setq tmp-accumulator nil) (setq tmp-state nil) @@ -715,8 +714,8 @@ the LysKOM rules of string matching." ;; ((and (eq (aref next-char-state 0) 'space-mismatch) - (or (eq (symbol-value current-state) 'start-of-string) - (eq (symbol-value current-state) 'start-of-word))) + (member (symbol-value current-state) + '(start-of-string start-of-word))) (setq last-event-worth-noting nil) (lyskom-complete-string-skip-whitespace data-list)) @@ -725,12 +724,11 @@ the LysKOM rules of string matching." ;; Advance to the end of the current word ;; - ((and (or (eq (aref next-char-state 0) 'mismatch) - (eq (aref next-char-state 0) 'space-mismatch)) + ((and (member (aref next-char-state 0) '(mismatch space-mismatch)) (zerop paren-depth)) (setq last-event-worth-noting 'mismatch) - (if (or (eq (symbol-value current-state) 'start-of-word) - (eq (symbol-value current-state) 'start-of-string)) + (if (member (symbol-value current-state) + '(start-of-word start-of-string)) (setq done t) (progn (if (not have-here) diff --git a/src/edit-text.el b/src/edit-text.el index 70565885c3b797d5c9797e0cef9aeda5ede0eb4b..2cfb28e3d776727dbd5fe5c5fbcb5cb1fec73427 100644 --- a/src/edit-text.el +++ b/src/edit-text.el @@ -796,9 +796,7 @@ Cannot be called from a callback." (cond ((eq (car misc) 'comm-to) (setq comm-to-list (cons (cdr misc) comm-to-list))) - ((or (eq (car misc) 'recpt) - (eq (car misc) 'cc-recpt) - (eq (car misc) 'bcc-recpt)) + ((member (car misc) '(recpt cc-recpt bcc-recpt)) (when (eq (car misc) 'recpt) (setq num-real-recpt (1+ num-real-recpt)) (when (eq (cdr misc) me) (setq num-me (1+ num-me)))) @@ -915,9 +913,7 @@ Cannot be called from a callback." ;; (lyskom-traverse misc (cdr misc-list) - (cond ((or (eq (car misc) 'recpt) - (eq (car misc) 'bcc-recpt) - (eq (car misc) 'cc-recpt)) + (cond ((member (car misc) '(recpt bcc-recpt cc-recpt)) (if (or (memq (cdr misc) author-list) (eq (cdr misc) me)) (setq author-list (delq (cdr misc) author-list)))))) @@ -1082,8 +1078,7 @@ WINDOW plus any optional arguments given in ARG-LIST." (lyskom-edit-error nil))) ; Ignore these errors (no nil)) (while headers - (if (or (eq (car headers) 'comm-to) - (eq (car headers) 'footn-to)) + (if (member (car headers) '(comm-to footn-to)) (setq no (car (cdr headers)) headers nil) (setq headers (cdr (cdr headers))))) diff --git a/src/filter-edit.el b/src/filter-edit.el index 4d3df7e8aa5a68b26c736ffad43b849d9b41ec9c..8bdd532952be49db5eb9c0c1508fd849e23ac30d 100644 --- a/src/filter-edit.el +++ b/src/filter-edit.el @@ -130,23 +130,17 @@ ((eq 'not (car (car filter))) (lyskom-verify-filter-pattern (cons (cdr (car filter)) (cdr filter)))) - ((or (eq 'author-re (car (car filter))) - (eq 'recipient-re (car (car filter))) - (eq 'subject-re (car (car filter))) - (eq 'text-re (car (car filter)))) + ((member (car (car filter)) + '(author-re recipient-re subject-re text-re)) (and (lyskom-filter-verify-regexp (cdr (car filter))) (lyskom-verify-filter-pattern (cdr filter)))) - ((or (eq 'author (car (car filter))) - (eq 'subject (car (car filter))) - (eq 'recipient (car (car filter))) - (eq 'text (car (car filter)))) + ((member (car (car filter)) '(author subject recipient text)) (and (stringp (cdr (car filter))) (lyskom-verify-filter-pattern (cdr filter)))) - ((or (eq 'author-no (car (car filter))) - (eq 'recipient-no (car (car filter)))) + ((member (car (car filter)) '(author-no recipient-no)) (and (integerp (cdr (car filter))) (lyskom-verify-filter-pattern (cdr filter)))) @@ -281,8 +275,7 @@ If NEG is non-nil, format the negation." " != " " = ") (cdr (car pat)))) - (cond ((or (eq (car (car pat)) 'recipient-no) - (eq (car (car pat)) 'author-no)) + (cond ((member (car (car pat)) '(recipient-no author-no)) (save-excursion (if (boundp 'lyskom-buffer) (set-buffer lyskom-buffer)) @@ -534,17 +527,11 @@ If NEWLINE is non-nil, insert a newline after the header." (setq what (cdr (assoc what rev-what))) (if (not - (cond ((or (eq what 'author) - (eq what 'subject) - (eq what 'text) - (eq what 'recipient)) (setq arg argstring)) - ((or (eq what 'author-no) - (eq what 'recipient-no)) (setq arg - (string-to-int argstring))) - ((or (eq what 'author-re) - (eq what 'subject-re) - (eq what 'text-re) - (eq what 'recipient-re)) + (cond ((member what '(author subject text recipient)) + (setq arg argstring)) + ((member what '(author-no recipient-no)) + (setq arg (string-to-int argstring))) + ((member what '(author-re subject-re text-re recipient-re)) (setq arg argstring) (lyskom-filter-verify-regexp arg)))) (lyskom-error (lyskom-get-string 'filter-edit-bad-argument) diff --git a/src/filter.el b/src/filter.el index 80f861f29f53152db642817dbe927167c3db5b83..014fc9bb7624572571365e84cc9e2a62d7e20aee 100644 --- a/src/filter.el +++ b/src/filter.el @@ -166,9 +166,7 @@ invalid-value until a filter action has been selected.") misc (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc))) - (if (or (eq type 'RECPT) - (eq type 'CC-RECPT) - (eq type 'BCC-RECPT)) + (if (member type '(RECPT CC-RECPT BCC-RECPT)) (initiate-get-conf-stat 'filter nil (misc-info->recipient-no misc))))) diff --git a/src/komtypes.el b/src/komtypes.el index 263dceab455016d66d6e8e099285a2982196820f..ad448aa6c322e12bcf4d1cc34c9ab81e4a97fff2 100644 --- a/src/komtypes.el +++ b/src/komtypes.el @@ -2024,9 +2024,7 @@ Args: CONF-STAT TAG PERSON" (let ((result nil)) (lyskom-traverse misc (text-stat->misc-info-list text-stat) - (when (and (or (eq (misc-info->type misc) 'RECPT) - (eq (misc-info->type misc) 'CC-RECPT) - (eq (misc-info->type misc) 'BCC-RECPT)) + (when (and (member (misc-info->type misc) '(RECPT CC-RECPT BCC-RECPT)) (eq (misc-info->recipient-no misc) conf-no)) (setq result t))) result)) diff --git a/src/lyskom-buttons.el b/src/lyskom-buttons.el index 8055ab761cc339f964649d84212bcc2493d6ac53..0cfdbf3509b2ff31f70f5bb8004f84eef23a43c9 100644 --- a/src/lyskom-buttons.el +++ b/src/lyskom-buttons.el @@ -421,8 +421,7 @@ information." (hints (and data (elt data 4))) (the-hint (lyskom-get-button-hint hints)) (props - (cond ((and (or (eq type 'conf) - (eq type 'pers)) + (cond ((and (member type '(conf pers)) numarg) (list 'face (or face @@ -869,9 +868,7 @@ This is a LysKOM button action." (defun lyskom-view-url-windows (url manager) "View the URL URL in Microsoft Windows. MANGER is the URL manager. Fall back on Netscape if not running in Microsoft Windows." - (cond ((or (eq window-system 'win32) - (eq window-system 'mswindows) - (eq window-system 'w32)) + (cond ((member window-system '(win32 mswindows w32)) (let ((programs '("start" "explorer" "C:\\Program Files\\Netscape\\Communicator\\Program\\netscape.exe" @@ -899,9 +896,7 @@ that, starts a new one." (setq url (replace-in-string url "," "%2C")) (setq url (replace-in-string url "(" "%28")) (setq url (replace-in-string url ")" "%29")) - (let* ((url-string (if (or (eq window-system 'win32) - (eq window-system 'mswindows) - (eq window-system 'w32)) + (let* ((url-string (if (member window-system '(win32 mswindows w32)) (list url) (list "-remote" (format "openUrl(%s)" url)))) diff --git a/src/lyskom-rest.el b/src/lyskom-rest.el index 47c02aa699c1910dc292f6db88634994ffe48816..4e31ebb79d6a291f97b99318fa83e1a80594f5a0 100644 --- a/src/lyskom-rest.el +++ b/src/lyskom-rest.el @@ -364,12 +364,9 @@ If the optional argument REFETCH is non-nil, all caches are cleared and (> len 1)) (let ((type (read-info->type (read-list->first lyskom-reading-list)))) (cond - ((or (eq type 'REVIEW) - (eq type 'REVIEW-TREE) - (eq type 'REVIEW-MARK)) + ((member type '(REVIEW REVIEW-TREE REVIEW-MARK)) (read-list-rotate lyskom-reading-list)) - ((or (eq type 'COMM-IN) - (eq type 'FOOTN-IN)) + ((member type '(COMM-IN FOOTN-IN)) (set-read-list-del-first lyskom-reading-list)) (t (setq finished t)))) @@ -399,8 +396,7 @@ If the optional argument REFETCH is non-nil, all caches are cleared and (priority (read-info->priority (read-list->first lyskom-reading-list))) (is-review-tree (eq type 'REVIEW-TREE)) - (is-review (or (eq type 'REVIEW) - (eq type 'REVIEW-MARK) + (is-review (or (member type '(REVIEW REVIEW-MARK)) is-review-tree)) (mark-as-read (not is-review))) (when is-review @@ -415,8 +411,7 @@ If the optional argument REFETCH is non-nil, all caches are cleared and priority is-review-tree (not is-review) - (or (eq type 'REVIEW) - (eq type 'REVIEW-MARK)))) + (member type '(REVIEW REVIEW-MARK)))) (if mark-as-read (lyskom-is-read text-no) (read-list-delete-text nil lyskom-reading-list) @@ -463,9 +458,7 @@ lyskom-mark-as-read." "Update lyskom-membership for all recipients to TEXT-STAT." (lyskom-traverse misc (text-stat->misc-info-list text-stat) - (if (or (eq 'RECPT (misc-info->type misc)) - (eq 'BCC-RECPT (misc-info->type misc)) - (eq 'CC-RECPT (misc-info->type misc))) + (if (member (misc-info->type misc) '(RECPT BCC-RECPT CC-RECPT)) (let ((membership (lyskom-try-get-membership (misc-info->recipient-no misc)))) (if membership @@ -2637,9 +2630,9 @@ Set lyskom-current-prompt accordingly. Tell server what I am doing." (defun lyskom-get-prioritized-session () "Get the session to go to if we are doing an auto-goto-session" - (let ((session-list (if (or (eq kom-server-priority-breaks 'express-letters) - (eq kom-server-priority-breaks 'letters) - (eq kom-server-priority-breaks 'after-conf-letters)) + (let ((session-list (if (member kom-server-priority-breaks + '(express-letters letters + after-conf-letters)) lyskom-sessions-with-unread-letters lyskom-sessions-with-unread)) (session nil) @@ -2687,24 +2680,23 @@ Set lyskom-current-prompt accordingly. Tell server what I am doing." (set-buffer pri-session) kom-server-priority)))) (and (not (eq pri-session (current-buffer))) - (or (and (or (eq kom-server-priority-breaks 'express) - (eq kom-server-priority-breaks 'express-letters) ) + (or (and (member kom-server-priority-breaks + '(express express-letters)) pri-session (or (null pri) (> pri-session-pri pri))) (and (eq kom-server-priority-breaks 'when-done) pri-session (read-list-isempty lyskom-reading-list) (read-list-isempty lyskom-to-do-list)) - (and (or (eq kom-server-priority-breaks t) - (eq kom-server-priority-breaks 'letters)) + (and (member kom-server-priority-breaks '(t letters)) pri-session (or (null type) (eq type 'CONF) (eq type 'REVIEW) (eq type 'REVIEW-MARK)) (or (null pri) (> pri-session-pri pri))) - (and (or (eq kom-server-priority-breaks 'after-conf) - (eq kom-server-priority-breaks 'after-conf-letters)) + (and (member kom-server-priority-breaks + '(after-conf after-conf-letters)) pri-session (read-list-isempty lyskom-reading-list) (or (null pri) (> pri-session-pri pri))) @@ -2716,9 +2708,7 @@ Set lyskom-current-prompt accordingly. Tell server what I am doing." (not (read-list-isempty lyskom-to-do-list)) (let ((type (read-info->type (read-list->first lyskom-reading-list)))) (or (eq kom-higher-priority-breaks 'express) - (eq type 'CONF) - (eq type 'REVIEW) - (eq type 'REVIEW-MARK))) + (member type '(CONF REVIEW REVIEW-MARK)))) (> (read-info->priority (read-list->first lyskom-to-do-list)) (read-info->priority (read-list->first lyskom-reading-list)))) (if (> (text-list->length (read-info->text-list diff --git a/src/mship-edit.el b/src/mship-edit.el index 7c0ea248df13b4dd70471cf9d9a9c9602aeaa5b0..eb960bb90f0a73331252fdea0eeaa06117d513d1 100644 --- a/src/mship-edit.el +++ b/src/mship-edit.el @@ -259,10 +259,9 @@ only recomputed if the window width changes." (lp--format-entry mship-conf-stat entry)) (when (or (eq (lp--entry->state entry) 'expanded) - (and (not (eq (membership->created-by (lp--entry->membership entry)) - lyskom-pers-no)) - (not (eq (membership->created-by (lp--entry->membership entry)) 0)) - (not (eq (lp--entry->state entry) 'contracted)))) + (not (member (membership->created-by + (lp--entry->membership entry)) + (list lyskom-pers-no 0 'contracted)))) (lyskom-insert-at-point "\n ") (if (null adder-conf-stat) (lyskom-format-insert-at-point diff --git a/src/parse.el b/src/parse.el index 860a92f27cc60d18c9e981a17e545caec724c637..34aa7f388538965d1072ab07c6e76c8d653d5033 100644 --- a/src/parse.el +++ b/src/parse.el @@ -284,8 +284,7 @@ Signal lyskom-parse-incomplete if there is no nonwhite char to parse." (t (lyskom-protocol-error 'lyskom-parse-bitstring "Expected bool or space, got %S" char)))) - (if (not (or (eq char ?\ ) - (eq char ?\n))) + (if (not (member char '(?\ ?\n))) ;; This occurs when the received string is longer than ;; expected. (progn diff --git a/src/prefetch.el b/src/prefetch.el index 552606efcf36fcb91b6bc31a97595c4932c1477c..93803c9e5325f8a969a706d35dfcb4d35794f62b 100644 --- a/src/prefetch.el +++ b/src/prefetch.el @@ -640,9 +640,7 @@ Put the requests on QUEUE." (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc))) (cond - ((or (eq type 'RECPT) - (eq type 'BCC-RECPT) - (eq type 'CC-RECPT)) + ((member type '(RECPT BCC-RECPT CC-RECPT)) (lyskom-prefetch-conf (misc-info->recipient-no misc) queue)) ((eq type 'COMM-IN) (lyskom-prefetch-textauth (misc-info->comm-in misc) queue)) @@ -672,9 +670,7 @@ Put the requests on QUEUE." (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc))) (cond - ((or (eq type 'RECPT) - (eq type 'BCC-RECPT) - (eq type 'CC-RECPT)) + ((member type '(RECPT BCC-RECPT CC-RECPT)) (lyskom-prefetch-conf (misc-info->recipient-no misc) queue)) ((eq type 'COMM-IN) (lyskom-prefetch-texttree (misc-info->comm-in misc) queue t)) @@ -808,9 +804,7 @@ Put the requests on QUEUE." (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc))) (cond - ((or (eq type 'RECPT) - (eq type 'BCC-RECPT) - (eq type 'CC-RECPT)) + ((member type '(RECPT BCC-RECPT CC-RECPT)) (lyskom-prefetch-conf (misc-info->recipient-no misc) queue)) ((eq type 'COMM-IN) (lyskom-prefetch-textauth (misc-info->comm-in misc) queue)) diff --git a/src/review.el b/src/review.el index b91bffe58af364438479cd8b88d382b063f9c6a9..e0d3ec6b00fb2c94fe979597355966f42124b1c6 100644 --- a/src/review.el +++ b/src/review.el @@ -281,9 +281,8 @@ Args: BY TO NUM" (lyskom-traverse misc (text-stat->misc-info-list x) (setq found (or found - (and (or (eq (misc-info->type misc) 'RECPT) - (eq (misc-info->type misc) 'CC-RECPT) - (eq (misc-info->type misc) 'BCC-RECPT)) + (and (member (misc-info->type misc) + '(RECPT CC-RECPT BCC-RECPT)) (eq (misc-info->recipient-no misc) to))))) found))) (list to) @@ -948,10 +947,8 @@ If reading forward then starts reading backward and the other way round." (interactive) (cond ((and (not (read-list-isempty lyskom-reading-list)) - (or (eq (read-info->type (read-list->first lyskom-reading-list)) - 'REVIEW) - (eq (read-info->type (read-list->first lyskom-reading-list)) - 'REVIEW-MARK))) + (member (read-info->type (read-list->first lyskom-reading-list)) + '(REVIEW REVIEW-MARK))) (let* ((info (read-list->first lyskom-reading-list)) (list (read-info->text-list info)) (texts (cdr list)) @@ -1174,21 +1171,13 @@ end." (interactive) (let ((found nil)) (if (not (read-list-isempty lyskom-reading-list)) - (while (or (eq (read-info->type (read-list->first lyskom-reading-list)) - 'REVIEW) - (eq (read-info->type (read-list->first lyskom-reading-list)) - 'REVIEW-TREE) - (eq (read-info->type (read-list->first lyskom-reading-list)) - 'REVIEW-MARK)) + (while (member (read-info->type (read-list->first lyskom-reading-list)) + '(REVIEW REVIEW-TREE REVIEW-MARK)) (set-read-list-del-first lyskom-reading-list) (setq found t))) (if (not (read-list-isempty lyskom-to-do-list)) - (while (or (eq (read-info->type (read-list->first lyskom-to-do-list)) - 'REVIEW) - (eq (read-info->type (read-list->first lyskom-to-do-list)) - 'REVIEW-TREE) - (eq (read-info->type (read-list->first lyskom-to-do-list)) - 'REVIEW-MARK)) + (while (member (read-info->type (read-list->first lyskom-to-do-list)) + '(REVIEW REVIEW-TREE REVIEW-MARK)) (set-read-list-del-first lyskom-to-do-list) (setq found t))) diff --git a/src/utilities.el b/src/utilities.el index d37af0e5d77c240c8ddc66e66811c32bd8ca0206..f5d06840f8d3af07493d4567989eecb584762fa8 100644 --- a/src/utilities.el +++ b/src/utilities.el @@ -1178,9 +1178,7 @@ If WANT-TYPES is non-nil then the result is an assoc list where the car of each element is the recipient number and the cdr is the type." (let ((result nil)) (lyskom-traverse misc (text-stat->misc-info-list text-stat) - (when (or (eq (misc-info->type misc) 'RECPT) - (eq (misc-info->type misc) 'CC-RECPT) - (eq (misc-info->type misc) 'BCC-RECPT)) + (when (member (misc-info->type misc) '(RECPT CC-RECPT BCC-RECPT)) (if want-types (setq result (cons (cons (misc-info->recipient-no misc) (misc-info->type misc)) diff --git a/src/view-text.el b/src/view-text.el index 5ea7eddd7417737fcc4ea6f62f6435aa050d5dfa..ead58293e359d62b84b0ad2d2beed1735c90445f 100644 --- a/src/view-text.el +++ b/src/view-text.el @@ -215,9 +215,7 @@ Note that this function must not be called asynchronously." (text-stat->misc-info-list text-stat) (let ((type (misc-info->type misc))) (cond - ((or (eq type 'RECPT) - (eq type 'BCC-RECPT) - (eq type 'CC-RECPT)) + ((member type '(RECPT BCC-RECPT CC-RECPT)) (lyskom-print-header-recpt (misc-info->recipient-no misc) misc)) @@ -526,9 +524,7 @@ recipients to it that the user is a member in." (let* ((misc-info (elt misc-info-list i)) (type (misc-info->type misc-info))) (cond - ((or (eq type 'RECPT) - (eq type 'BCC-RECPT) - (eq type 'CC-RECPT)) + ((member type '(RECPT BCC-RECPT CC-RECPT)) ;; Is this function ever called asynchronously? If not, we ;; can use lyskom-get-membership istead. (let ((membership (lyskom-try-get-membership @@ -566,9 +562,7 @@ blocking-do." (setq misc-item (car misc-info-list)) (setq type (misc-info->type misc-item)) (setq misc-info-list (cdr misc-info-list)) - (cond ((or (eq type 'RECPT) - (eq type 'BCC-RECPT) - (eq type 'CC-RECPT)) + (cond ((member type '(RECPT BCC-RECPT CC-RECPT)) (setq membership (if bg (lyskom-try-get-membership (misc-info->recipient-no misc-item) t) @@ -906,9 +900,7 @@ the client. That is done by lyskom-is-read." (let ((misc-info-list (text-stat->misc-info-list text-stat))) (lyskom-traverse misc-info misc-info-list - (if (and (or (eq (misc-info->type misc-info) 'RECPT) - (eq (misc-info->type misc-info) 'BCC-RECPT) - (eq (misc-info->type misc-info) 'CC-RECPT)) + (if (and (member (misc-info->type misc-info) '(RECPT BCC-RECPT CC-RECPT)) ;; The whole membership list might not be fetched ;; yet. So we better mark it as read in all conferences. ;; (lyskom-member-p (misc-info->recipient-no misc-info))