Commit 49722f6d authored by David Byers's avatar David Byers
Browse files

Added support for lyskom filters (first version).

parent 1736122e
No preview for this file type
...@@ -24,9 +24,12 @@ ...@@ -24,9 +24,12 @@
# #
# $Id$ # $Id$
# $Log$ # $Log$
# Revision 38.5 1995/03/01 17:55:38 byers
# Added support for lyskom filters (first version).
#
# Revision 38.4 1995/02/23 20:40:59 linus # Revision 38.4 1995/02/23 20:40:59 linus
# En arbetsversion av 0.39 incheckad. Det är ganska mycket gjort men det # En arbetsversion av 0.39 incheckad. Det {r ganska mycket gjort men det
# finns mer att göra. # finns mer att g|ra.
# #
# Revision 38.3 1994/01/14 02:40:01 linus # Revision 38.3 1994/01/14 02:40:01 linus
# Fixed local installation path. # Fixed local installation path.
...@@ -153,6 +156,7 @@ PARTS-EL = komtypes.el clienttypes.el startup.el \ ...@@ -153,6 +156,7 @@ PARTS-EL = komtypes.el clienttypes.el startup.el \
reading.el \ reading.el \
internal.el parse.el services.el cache.el\ internal.el parse.el services.el cache.el\
commands1.el commands2.el review.el edit-text.el \ commands1.el commands2.el review.el edit-text.el \
filter.el filter-edit.el \
view-text.el async.el completing-read.el \ view-text.el async.el completing-read.el \
prioritize.el flags.el \ prioritize.el flags.el \
elib-string.el \ elib-string.el \
...@@ -167,6 +171,7 @@ SRC-ELC = komtypes.elc clienttypes.elc startup.elc \ ...@@ -167,6 +171,7 @@ SRC-ELC = komtypes.elc clienttypes.elc startup.elc \
reading.elc \ reading.elc \
internal.elc parse.elc services.elc cache.elc\ internal.elc parse.elc services.elc cache.elc\
commands1.elc commands2.elc review.elc edit-text.elc \ commands1.elc commands2.elc review.elc edit-text.elc \
filter.el filter-edit.el \
view-text.elc async.elc completing-read.elc \ view-text.elc async.elc completing-read.elc \
prioritize.elc flags.elc \ prioritize.elc flags.elc \
elib-string.elc \ elib-string.elc \
......
...@@ -434,6 +434,7 @@ otherwise: the conference is read with lyskom-completing-read." ...@@ -434,6 +434,7 @@ otherwise: the conference is read with lyskom-completing-read."
;;; Author: Inge Wallin ;;; Author: Inge Wallin
;;; Rewritten to use lyskom-read-conf-no by Linus Tolke ;;; Rewritten to use lyskom-read-conf-no by Linus Tolke
;;; Modified to use default recipient by David Byers
(defun kom-send-message () (defun kom-send-message ()
...@@ -442,8 +443,21 @@ otherwise: the conference is read with lyskom-completing-read." ...@@ -442,8 +443,21 @@ otherwise: the conference is read with lyskom-completing-read."
(lyskom-start-of-command 'kom-send-message) (lyskom-start-of-command 'kom-send-message)
(unwind-protect (unwind-protect
(lyskom-send-message (lyskom-send-message
(lyskom-read-conf-no (lyskom-get-string 'who-to-send-message-to) (cond ((null kom-send-message-to-last-sender)
(lyskom-read-conf-no
(format (lyskom-get-string 'who-to-send-message-to)
(lyskom-get-string 'everybody))
'pers t)) 'pers t))
(t
(lyskom-read-conf-no
(format (lyskom-get-string 'who-to-send-message-to)
(lyskom-get-string 'everybody))
'all t
(if lyskom-last-personal-message-sender
(if (string-match "^19" emacs-version)
(cons lyskom-last-personal-message-sender 0)
lyskom-last-personal-message-sender)
"")))))
(lyskom-end-of-command))) (lyskom-end-of-command)))
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -69,6 +69,13 @@ ...@@ -69,6 +69,13 @@
(fset 'user-variable-p (fset 'user-variable-p
(symbol-function 'original-user-variable-p))) (symbol-function 'original-user-variable-p)))
;;;============================================================
;;; kom-edit-options-send
;;;
;;; Finish an edit options session.
;;; This function must be kept in sync with lyskom-save-options
;;; below.
;;;
(defun kom-edit-options-send () (defun kom-edit-options-send ()
"Finishes the edit options and sends the new settings to the server." "Finishes the edit options and sends the new settings to the server."
...@@ -155,6 +162,82 @@ If successful then set the buffer not-modified. Else print a warning." ...@@ -155,6 +162,82 @@ If successful then set the buffer not-modified. Else print a warning."
(defvar lyskom-options-done nil (defvar lyskom-options-done nil
"When we have read all options this is turned non-nil.") "When we have read all options this is turned non-nil.")
;;;============================================================
;;; lyskom-save-options
;;;
;;; Save user-area without feedback in the KOM buffer. This
;;; is for use by all functions but edit-options.
;;;
;;; Messages are given in the minibuffer
(defun lyskom-save-options (kombuf start-message done-message error-message)
(let ((common-block
(concat
(mapconcat (function
(lambda (var)
(lyskom-format-objects
(substring (symbol-name var) 4)
(if (symbol-value var) "1" "0"))))
lyskom-global-boolean-variables
"\n")
"\n"
(mapconcat (function
(lambda (var)
(lyskom-format-objects
(substring (symbol-name var) 4)
(prin1-to-string (symbol-value var)))))
lyskom-global-non-boolean-variables
"\n")
))
(elisp-block
(mapconcat (function
(lambda (var)
(lyskom-format-objects (symbol-name var)
(prin1-to-string
(symbol-value var)))))
lyskom-elisp-variables
"\n")))
(save-excursion
(set-buffer kombuf)
(lyskom-message start-message)
(initiate-create-text 'options 'lyskom-save-options-2
(apply 'lyskom-format-objects
(apply 'lyskom-format-objects
"common"
"elisp"
(mapcar
(function car)
lyskom-other-clients-user-areas))
common-block
elisp-block
(mapcar (function cdr)
lyskom-other-clients-user-areas))
(lyskom-create-misc-list)
kombuf
done-message
error-message))))
(defun lyskom-save-options-2 (text-no kombuf done-message error-message)
(if text-no
(initiate-set-user-area 'options 'lyskom-save-options-3
lyskom-pers-no text-no kombuf
done-message error-message)
(save-excusrsion
(set-buffer kombuf)
(lyskom-insert-string 'could-not-save-options)
(lyskom-message (lyskom-get-string 'could-not-save-options)))))
(defun lyskom-save-options-3 (success kombuf done-message error-message)
(save-excursion
(set-buffer kombuf)
(if success
(progn
(cache-del-pers-stat lyskom-pers-no)
(lyskom-message done-message))
(lyskom-format-insert 'could-not-set-user-area lyskom-errno)
(lyskom-message error-message))))
(defun lyskom-read-options () (defun lyskom-read-options ()
"Reads the user-area and sets the variables according to the choises. "Reads the user-area and sets the variables according to the choises.
Also run lyskom-login-hook (regardless of whether the person has a userarea Also run lyskom-login-hook (regardless of whether the person has a userarea
......
No preview for this file type
...@@ -659,3 +659,49 @@ or get-text-stat." ...@@ -659,3 +659,49 @@ or get-text-stat."
lyskom-blocking-return))) lyskom-blocking-return)))
;; Multiple blocking read from server
(defvar lyskom-multiple-blocking-return nil
"Return from blocking-do-multiple")
(defun lyskom-blocking-do-multiple (call-list)
(let ((lyskom-blocking-return 'not-yet-gotten))
(lyskom-collect 'blocking)
(while call-list
(apply (intern-soft (concat "initiate-"
(symbol-name (car (car call-list)))))
'blocking nil
(cdr (car call-list)))
(setq call-list (cdr call-list)))
(lyskom-use 'blocking 'lyskom-blocking-do-multiple-1)
(while (eq lyskom-multiple-blocking-return 'not-yet-gotten)
(accept-process-output))
lyskom-multiple-blocking-return))
(defun lyskom-blocking-do-multiple-1 (&rest data)
(setq lyskom-multiple-blocking-return data))
(defmacro blocking-do-multiple (bind-list &rest body)
"Bind variables according to BIND-LIST and then eval BODY.
The value of the last form in BODY is returned.
Each element in BIND-LIST is a list (SYMBOL FORM) which binds SYMBOL to
the result of the server call FORM, which is the same as used in blocking-do.
All the forms in BIND-LIST are evaluated before and symbols are bound."
(let ((bindsym 'multiple-bind-sym)
(index 0))
(` (let (((, bindsym)
(lyskom-blocking-do-multiple
(list (,@ (mapcar (function (lambda (x)
(` (list '(, (car (car (cdr x))))
(,@ (cdr (car (cdr x))))))))
bind-list))))))
(let ((,@ (mapcar (function
(lambda (bpat)
(prog1
(` ((, (car bpat))
(elt (, bindsym) (, index))))
(setq index (1+ index)))))
bind-list)))
(,@ body))))))
...@@ -80,6 +80,7 @@ See lyskom-mode for details." ...@@ -80,6 +80,7 @@ See lyskom-mode for details."
(lyskom-mode) ;Clearing lyskom-default... (lyskom-mode) ;Clearing lyskom-default...
(setq lyskom-default-user-name username) (setq lyskom-default-user-name username)
(setq lyskom-default-password password) (setq lyskom-default-password password)
(setq lyskom-server-name host)
(setq lyskom-proc proc) (setq lyskom-proc proc)
(lyskom-insert (lyskom-insert
(lyskom-format 'try-connect lyskom-clientversion host)) (lyskom-format 'try-connect lyskom-clientversion host))
...@@ -430,6 +431,7 @@ to see, set of call." ...@@ -430,6 +431,7 @@ to see, set of call."
(replies-buffer lyskom-unparsed-buffer) (replies-buffer lyskom-unparsed-buffer)
(replies-marker lyskom-unparsed-marker) (replies-marker lyskom-unparsed-marker)
(server-info lyskom-server-info) (server-info lyskom-server-info)
(server-name lyskom-server-name)
) )
(kill-all-local-variables) (kill-all-local-variables)
(make-local-variable 'lyskom-blocking-return) (make-local-variable 'lyskom-blocking-return)
...@@ -447,6 +449,7 @@ to see, set of call." ...@@ -447,6 +449,7 @@ to see, set of call."
(make-local-variable 'lyskom-text-cache) (make-local-variable 'lyskom-text-cache)
(make-local-variable 'lyskom-text-mass-cache) (make-local-variable 'lyskom-text-mass-cache)
(make-local-variable 'lyskom-server-info) (make-local-variable 'lyskom-server-info)
(make-local-variable 'lyskom-server-name)
(make-local-variable 'lyskom-default-user-name) (make-local-variable 'lyskom-default-user-name)
(make-local-variable 'lyskom-default-password) (make-local-variable 'lyskom-default-password)
(make-local-variable 'lyskom-who-info-cache) (make-local-variable 'lyskom-who-info-cache)
...@@ -488,6 +491,7 @@ to see, set of call." ...@@ -488,6 +491,7 @@ to see, set of call."
(make-local-variable 'lyskom-output-queue) (make-local-variable 'lyskom-output-queue)
(make-local-variable 'lyskom-options-done) (make-local-variable 'lyskom-options-done)
(make-local-variable 'lyskom-list-of-edit-buffers) (make-local-variable 'lyskom-list-of-edit-buffers)
(make-local-variable 'lyskom-filter-list)
(setq lyskom-proc proc) (setq lyskom-proc proc)
(setq lyskom-pers-no pers-no) (setq lyskom-pers-no pers-no)
(setq lyskom-membership membership) (setq lyskom-membership membership)
...@@ -496,6 +500,7 @@ to see, set of call." ...@@ -496,6 +500,7 @@ to see, set of call."
(setq lyskom-unparsed-buffer replies-buffer) (setq lyskom-unparsed-buffer replies-buffer)
(setq lyskom-unparsed-marker replies-marker) (setq lyskom-unparsed-marker replies-marker)
(setq lyskom-server-info server-info) (setq lyskom-server-info server-info)
(setq lyskom-server-name server-name)
(setq lyskom-do-when-done (cons kom-do-when-done kom-do-when-done)) (setq lyskom-do-when-done (cons kom-do-when-done kom-do-when-done))
(setq lyskom-output-queue (lyskom-queue-create)) (setq lyskom-output-queue (lyskom-queue-create))
(setq lyskom-list-of-edit-buffers nil) (setq lyskom-list-of-edit-buffers nil)
......
...@@ -393,7 +393,7 @@ Lyskom-sessionen \344r avslutad. ...@@ -393,7 +393,7 @@ Lyskom-sessionen \344r avslutad.
(not-allowed-see-confs . "Du f\345r inte se vilka m\366ten %#1s \344r medlem i.\n") (not-allowed-see-confs . "Du f\345r inte se vilka m\366ten %#1s \344r medlem i.\n")
(is-member-of . "\n%#1s \344r medlem i f\366ljande m\366ten:\n") (is-member-of . "\n%#1s \344r medlem i f\366ljande m\366ten:\n")
(membership-list-header . "Senast inne Osett Namn\n\n") (membership-list-header . "Senast inne Osett Namn\n\n")
(who-to-send-message-to . "Vem vill du skicka meddelandet till? (Alla) ") (who-to-send-message-to . "Vem vill du skicka meddelandet till? (%s) ")
(his-total-unread . "\n%#1s har totalt %#2d ol\344sta.\n") (his-total-unread . "\n%#1s har totalt %#2d ol\344sta.\n")
(message-prompt . "Meddelande: ") (message-prompt . "Meddelande: ")
(message-sent-to-user . (message-sent-to-user .
...@@ -630,6 +630,7 @@ Personligt meddelande fr\345n %#1s (%#3s): ...@@ -630,6 +630,7 @@ Personligt meddelande fr\345n %#1s (%#3s):
; From flags.el: ; From flags.el:
(saving-settings . "Sparar inst\344llningarna") (saving-settings . "Sparar inst\344llningarna")
(hang-on . "V\344nta ett tag...\n") (hang-on . "V\344nta ett tag...\n")
(could-not-save-options . "Kunde ej spara inst\344llningarna.\n")
(could-not-create-area . "Kunde ej skapa texten.\n") (could-not-create-area . "Kunde ej skapa texten.\n")
(could-not-set-user-area . "Kunde ej st\344lla om user-arean. Servern s\344ger felmeddelande: %#1d\n") (could-not-set-user-area . "Kunde ej st\344lla om user-arean. Servern s\344ger felmeddelande: %#1d\n")
(you-dont-exist . "Du finns inte.\n") (you-dont-exist . "Du finns inte.\n")
...@@ -708,6 +709,44 @@ Felmeddelande: %#1s**************************************************") ...@@ -708,6 +709,44 @@ Felmeddelande: %#1s**************************************************")
(footnote . "Fotnot") (footnote . "Fotnot")
(by . " av %#1s") (by . " av %#1s")
(text-created . "Text nummer %#1d \344r skapad.\n") (text-created . "Text nummer %#1d \344r skapad.\n")
(starting-mosaic . "Startar Mosaic...")
(super-jump . "Filtrerar \344rende \"%#1s\" i m\366te \"%#2s\"\n")
(filtered . "[Filtrerad]")
(bad-filter-list . "Fel i filtereingslistan n\344ra %s.")
(invalid-filter-list . "Fel i filtreringslistan.")
(filter-tree . "Hoppar \366ver text %d \"%s\" av %s och dess kommentarstr\344d.\n")
(filter-text . "Hoppar \366ver text %d \"%s\" av %s.\n")
(filter-permanent . "Permanent? ")
(filter-action . "Hur vill du filtrera? ")
(filter-in-conf . "I vilket m\366te (Alla)? ")
(filter-subject . "Filtrera vilket \344rende? ")
(filter-which-text . "Filtrera inl\344gg som inneh\345ller: ")
(filter-author . "Filtrera vilken frfattare? ")
(permanent . "(permanent)")
(temporary . "(tillf\344llig)")
(filter-edit-buffer-name . "*LysKOM Filter Edit*")
(filter-edit-empty-list . "Listan \344r tom")
(filter-edit-start-of-list . "Listans b\366rjan")
(filter-edit-end-of-list . "Listans slut")
(filter-edit-filter-how . "Hur vill du filtrera? ")
(filter-edit-filter-what . "Vad vill du filtrera? ")
(filter-edit-bad-argument . "Felaktig inmatning: %s")
(filter-edit-outside-entry . "Kan inte utf\366ra kommandot utanf\366r ett filter")
(filter-edit-outside-list . "Kan inte utf\366ra operationen utanf\366r listan")
(filter-edit-end-of-pattern . "Filtrets slut")
(filter-edit-save-p . "Spara f\366r\344ndringar? ")
(filter-edit-remove-empty . "Tomma filter g\366r att alla texter filtreras. Vill du ta bort dessa? ")
(filter-edit-restart-p . "Du har gjort \344ndringar. Vill du verkligen b\366rja om? ")
(filter-edit-help . "p Upp, n Ned, i Ny rad, M-i Nytt filter, d Radera rad, M-d Radera filter")
(filter-edit-header . "\304ndra filter f\366r \"%s\"\n")
(filter-edit-saving . "Sparar \344ndringarna...")
(filter-edit-saving-done . "Sparar \344ndringarna...klart")
(filter-edit-saving-error . "Kunde inte spara \344ndringarna!")
(filter-edit-insert-pred . "%#1s (=,!=): ")
(filter-edit-insert-arg . "%#1s %#2s (vad): ")
(no-filters . "Inga filter har definierats.\n")
(view-filters-header . "\nAktiva filter:\n\n")
(view-filters-footer . "")
) )
"Assoc list containing pairs of atoms and strings") "Assoc list containing pairs of atoms and strings")
...@@ -805,12 +844,46 @@ Felmeddelande: %#1s**************************************************") ...@@ -805,12 +844,46 @@ Felmeddelande: %#1s**************************************************")
(kom-list-files "Lista filarean") (kom-list-files "Lista filarean")
(kom-put-file "Ladda upp fil") (kom-put-file "Ladda upp fil")
(kom-get-file "Ladda ner fil") (kom-get-file "Ladda ner fil")
(kom-filter-author "Filtrera f\366rfattare")
(kom-filter-subject "Filtrera \344rende")
(kom-filter-text "Filtrera inneh\345ll")
(kom-super-jump "Superhoppa")
(kom-filter-edit "\304ndra filter")
(kom-list-filters "Lista filter")
(kom-show-user-area "Visa user-arean")
) )
"A list of LysKOM-commands that the extended parser understands.") "A list of LysKOM-commands that the extended parser understands.")
(defvar lyskom-swascii-commands nil (defvar lyskom-swascii-commands nil
"The swascii-versions of lyskom-commands.") "The swascii-versions of lyskom-commands.")
(defvar lyskom-filter-predicate-list
'(("=" . nil) ("!=" . t))
"A list of legal filter comparison predicates.")
(defvar lyskom-filter-what
'((author . "F\366rfattare")
(author-no . "F\366rfattare (nummer)")
(author-re . "F\366rfattare (regexp)")
(subject . "\304rende")
(subject-re . "\304rende (regexp)")
(recipient . "Mottagare")
(recipient-no . "Mottagare (nummer)")
(recipient-re . "Mottagare (regexp)")
(text . "Inneh\345ll")
(text . "Inneh\345ll (regexp)"))
"A list of legal filter conditions and their textual representation.")
(defvar lyskom-filter-actions
'((dontshow . "Visa inte")
(skip-text . "Hoppa \366ver")
(skip-tree . "Hoppa \366ver kommentarer"))
"A list of legal filter actions an their textual representation.")
(defvar lyskom-swascii-filter-actions nil
"The swascii-versions of lyskom-filter-actions.")
(defvar lyskom-swascii-filter-what nil
"The swascii version of lyskom-filter-what")
(defvar lyskom-text-start " (defvar lyskom-text-start "
[0-9]+ 199[0-9]-[0-1][0-9]-[0-3][0-9] +[0-2][0-9]:[0-5][0-9] /[0-9]+ rad\\(er\\)?/ " [0-9]+ 199[0-9]-[0-1][0-9]-[0-3][0-9] +[0-2][0-9]:[0-5][0-9] /[0-9]+ rad\\(er\\)?/ "
...@@ -826,8 +899,10 @@ Cf. paragraph-start.") ...@@ -826,8 +899,10 @@ Cf. paragraph-start.")
(define-prefix-command 'lyskom-change-prefix) (define-prefix-command 'lyskom-change-prefix)
(define-prefix-command 'lyskom-next-prefix) (define-prefix-command 'lyskom-next-prefix)
(define-prefix-command 'lyskom-list-prefix) (define-prefix-command 'lyskom-list-prefix)
(define-prefix-command 'lyskom-get-prefix) ; (define-prefix-command 'lyskom-get-prefix)
(define-prefix-command 'lyskom-S-prefix) (define-prefix-command 'lyskom-S-prefix)
(define-prefix-command 'lyskom-filter-get-prefix)
(define-key lyskom-mode-map "{" 'lyskom-change-prefix) ; krullar (define-key lyskom-mode-map "{" 'lyskom-change-prefix) ; krullar
(define-key lyskom-mode-map "[" 'lyskom-change-prefix) (define-key lyskom-mode-map "[" 'lyskom-change-prefix)
(define-key lyskom-mode-map "}" 'lyskom-review-prefix) (define-key lyskom-mode-map "}" 'lyskom-review-prefix)
...@@ -841,7 +916,7 @@ Cf. paragraph-start.") ...@@ -841,7 +916,7 @@ Cf. paragraph-start.")
(define-key lyskom-mode-map "\033}" 'lyskom-review-prefix) (define-key lyskom-mode-map "\033}" 'lyskom-review-prefix)
(define-key lyskom-mode-map "\033]" 'lyskom-review-prefix) (define-key lyskom-mode-map "\033]" 'lyskom-review-prefix)
(define-key lyskom-mode-map "f" 'lyskom-get-prefix) (define-key lyskom-mode-map "f" 'lyskom-filter-get-prefix)
(define-key lyskom-mode-map "n" 'lyskom-next-prefix) (define-key lyskom-mode-map "n" 'lyskom-next-prefix)
(define-key lyskom-mode-map "l" 'lyskom-list-prefix) (define-key lyskom-mode-map "l" 'lyskom-list-prefix)
(define-key lyskom-mode-map "s" 'lyskom-S-prefix) (define-key lyskom-mode-map "s" 'lyskom-S-prefix)
...@@ -854,8 +929,11 @@ Cf. paragraph-start.") ...@@ -854,8 +929,11 @@ Cf. paragraph-start.")
(define-key lyskom-mode-map [?\345] 'lyskom-review-prefix) (define-key lyskom-mode-map [?\345] 'lyskom-review-prefix)
(define-key lyskom-mode-map [?\305] 'lyskom-review-prefix) (define-key lyskom-mode-map [?\305] 'lyskom-review-prefix)
(define-key lyskom-mode-map [?f ?\344] 'kom-filter-subject)
(define-key lyskom-mode-map [?f ?\304] 'kom-filter-subject)
(define-key lyskom-mode-map [?l ?\344] 'kom-list-summary) (define-key lyskom-mode-map [?l ?\344] 'kom-list-summary)
(define-key lyskom-mode-map [?l ?\304] 'kom-list-summary) (define-key lyskom-mode-map [?l ?\304] 'kom-list-summary)
(define-key lyskom-mode-map [mouse-2] 'kom-mouse-2)
)) ))
;(define-key lyskom-mode-map "vi" 'vilka) ;(define-key lyskom-mode-map "vi" 'vilka)
...@@ -885,6 +963,7 @@ Cf. paragraph-start.") ...@@ -885,6 +963,7 @@ Cf. paragraph-start.")
(define-key lyskom-mode-map "p" 'kom-private-answer) (define-key lyskom-mode-map "p" 'kom-private-answer)
(define-key lyskom-mode-map "P" 'kom-private-answer-previous) (define-key lyskom-mode-map "P" 'kom-private-answer-previous)
(define-key lyskom-mode-map "h" 'kom-jump) (define-key lyskom-mode-map "h" 'kom-jump)
(define-key lyskom-mode-map "H" 'kom-super-jump)
(define-key lyskom-mode-map "lm" 'kom-list-conferences) (define-key lyskom-mode-map "lm" 'kom-list-conferences)
(define-key lyskom-mode-map "ln" 'kom-list-news) (define-key lyskom-mode-map "ln" 'kom-list-news)
(define-key lyskom-mode-map "lp" 'kom-list-persons) (define-key lyskom-mode-map "lp" 'kom-list-persons)
...@@ -895,6 +974,7 @@ Cf. paragraph-start.") ...@@ -895,6 +974,7 @@ Cf. paragraph-start.")
(define-key lyskom-mode-map "l\304" 'kom-list-summary) (define-key lyskom-mode-map "l\304" 'kom-list-summary)
(define-key lyskom-mode-map "l\033{" 'kom-list-summary) ; 7(8)-bit emacs (define-key lyskom-mode-map "l\033{" 'kom-list-summary) ; 7(8)-bit emacs
(define-key lyskom-mode-map "l\033[" 'kom-list-summary) (define-key lyskom-mode-map "l\033[" 'kom-list-summary)
(define-key lyskom-mode-map "lf" 'kom-list-filters)
(define-key lyskom-mode-map "m" 'kom-add-self) (define-key lyskom-mode-map "m" 'kom-add-self)
(define-key lyskom-mode-map "M" 'kom-mark-text) (define-key lyskom-mode-map "M" 'kom-mark-text)
(define-key lyskom-mode-map "A" 'kom-unmark-text) (define-key lyskom-mode-map "A" 'kom-unmark-text)
...@@ -904,13 +984,22 @@ Cf. paragraph-start.") ...@@ -904,13 +984,22 @@ Cf. paragraph-start.")
(define-key lyskom-mode-map "S" 'kom-quit) (define-key lyskom-mode-map "S" 'kom-quit)
(define-key lyskom-mode-map "q" 'kom-quit) (define-key lyskom-mode-map "q" 'kom-quit)
(define-key lyskom-mode-map "z" 'kom-bury) (define-key lyskom-mode-map "z" 'kom-bury)
;; (define-key lyskom-mode-map "r" 'kom-recover) (define-key lyskom-mode-map "R" 'kom-recover)
(define-key lyskom-mode-map "t" 'kom-display-time) (define-key lyskom-mode-map "t" 'kom-display-time)
(define-key lyskom-mode-map "fu" 'kom-get-appreciation) (define-key lyskom-mode-map "fu" 'kom-get-appreciation)
(define-key lyskom-mode-map "fs" 'kom-get-abuse) (define-key lyskom-mode-map "fs" 'kom-get-abuse)
(define-key lyskom-mode-map "f{" 'kom-filter-subject)
(define-key lyskom-mode-map "f[" 'kom-filter-subject)
(define-key lyskom-mode-map "f\344" 'kom-filter-subject)
(define-key lyskom-mode-map "f\304" 'kom-filter-subject)
(define-key lyskom-mode-map "f\033{" 'kom-filter-subject)
(define-key lyskom-mode-map "f\033[" 'kom-filter-subject)
(define-key lyskom-mode-map "ff" 'kom-filter-author)
(define-key lyskom-mode-map "fi" 'kom-filter-text)
(define-key lyskom-mode-map "v" 'kom-who-is-on) (define-key lyskom-mode-map "v" 'kom-who-is-on)
(define-key lyskom-mode-map "V" 'kom-busy-wait) (define-key lyskom-mode-map "V" 'kom-busy-wait)
(define-key lyskom-mode-map "{p" 'kom-change-presentation) (define-key lyskom-mode-map "{p" 'kom-change-presentation)
(define-key lyskom-mode-map "{f" 'kom-filter-edit)
(define-key lyskom-mode-map "} " 'kom-view) (define-key lyskom-mode-map "} " 'kom-view)
(define-key lyskom-mode-map "}0" 'kom-initial-digit-view) (define-key lyskom-mode-map "}0" 'kom-initial-digit-view)
(define-key lyskom-mode-map "}1" 'kom-initial-digit-view) (define-key lyskom-mode-map "}1" 'kom-initial-digit-view)
...@@ -951,6 +1040,46 @@ Cf. paragraph-start.") ...@@ -951,6 +1040,46 @@ Cf. paragraph-start.")
(define-key lyskom-mode-map "\C-?" 'scroll-down) (define-key lyskom-mode-map "\C-?" 'scroll-down)
) )
;;;==============================================================
;;; Keymap for filter editing
;;;
(defvar lyskom-filter-edit-map nil
"Keymap for LysKOM filter edit")
(if lyskom-filter-edit-map ()
(setq lyskom-filter-edit-map (make-keymap))
(suppress-keymap lyskom-filter-edit-map)
(define-key lyskom-filter-edit-map "p" 'lyskom-filter-edit-prev-pattern)
(define-key lyskom-filter-edit-map "P" 'lyskom-filter-edit-prev-entry)
(define-key lyskom-filter-edit-map "n" 'lyskom-filter-edit-next-pattern)
(define-key lyskom-filter-edit-map "N" 'lyskom-filter-edit-next-entry)
(define-key lyskom-filter-edit-map "\C-P" 'lyskom-filter-edit-prev-pattern)
(define-key lyskom-filter-edit-map "\C-N" 'lyskom-filter-edit-next-pattern)
(define-key lyskom-filter-edit-map "\C-B" 'lyskom-filter-edit-prev-pattern)
(define-key lyskom-filter-edit-map "\C-F" 'lyskom-filter-edit-next-pattern)
(define-key lyskom-filter-edit-map "\M-p" 'lyskom-filter-edit-prev-entry)
(define-key lyskom-filter-edit-map "\M-n" 'lyskom-filter-edit-next-entry)
(define-key lyskom-filter-edit-map "d" 'lyskom-filter-edit-delete-pattern)
(define-key lyskom-filter-edit-map "\M-d" 'lyskom-filter-edit-delete-entry)
(define-key lyskom-filter-edit-map "D" 'lyskom-filter-edit-delete-pattern)
(define-key lyskom-filter-edit-map "\C-D" 'lyskom-filter-edit-delete-pattern)
(define-key lyskom-filter-edit-map "i" 'lyskom-filter-edit-insert-pattern)
(define-key lyskom-filter-edit-map "I" 'lyskom-filter-edit-insert-pattern)
(define-key lyskom-filter-edit-map "\M-i" 'lyskom-filter-edit-insert-entry)
(define-key lyskom-filter-edit-map "<" 'lyskom-filter-edit-beginning-of-list)
(define-key lyskom-filter-edit-map ">" 'lyskom-filter-edit-end-of-list)
(define-key lyskom-filter-edit-map "\M-<" 'lyskom-filter-edit-beginning-of-list)
(define-key lyskom-filter-edit-map "\M->" 'lyskom-filter-edit-end-of-list)
(define-key lyskom-filter-edit-map "q" 'lyskom-filter-edit-quit)
(define-key lyskom-filter-edit-map "x" 'lyskom-filter-edit-expunge)
(define-key lyskom-filter-edit-map "s" 'lyskom-filter-edit-save)
(define-key lyskom-filter-edit-map "g" 'lyskom-filter-edit-revert)
(define-key lyskom-filter-edit-map "t" 'lyskom-filter-edit-toggle-permanent)
(define-key lyskom-filter-edit-map "a" 'lyskom-filter-edit-toggle-action)
(define-key lyskom-filter-edit-map "?" 'lyskom-filter-edit-brief-help)
(define-key lyskom-filter-edit-map "h" 'lyskom-filter-edit-brief-help)
)
(defvar lyskom-prioritize-mode-map nil (defvar lyskom-prioritize-mode-map nil
......
...@@ -178,6 +178,31 @@ kom-show-personal-messages-in-buffer decides which buffer to pop.") ...@@ -178,6 +178,31 @@ kom-show-personal-messages-in-buffer decides which buffer to pop.")
"*Non-nil means ding as personal messages arrive. "*Non-nil means ding as personal messages arrive.
Non-nil and non-t means only ding when they really are personal.") Non-nil and non-t means only ding when they really are personal.")
(defvar kom-send-message-to-last-sender t
"*Non-nil means default recipient of personal messages is the sender of
the last message received. Nil means default is everybody.")
(defvar kom-text-buttons
'(("[0-9][0-9][0-9][0-9][0-9]*" lyskom-button-view-text nil)
("\\(\\(ftp\\|gopher\\|http\\|news\\|wais\\):/*[^:/*:*[^/]*/\\S-*\\)"
lyskom-button-follow-url nil))
"*List of patterns to make buttons from in text bodies. Each pattern
consists of (REGEXP ACTION ARG).
REGEXP is a regular expression that is matched with the text body of each
article. If REGEXP contains a \\( \\) pair, the text between the first such