Commit 7017e0d9 authored by David Byers's avatar David Byers
Browse files

Added mship-edit.el to the main build.

YMMV
parent 11bdf265
1999-12-05 David Byers <davby@ida.liu.se>
* Makefile (SOURCES): Added mship-edit.el.
1999-12-04 David Byers <davby@ida.liu.se>
* mship-edit.el (lp--maybe-update-entry-for-conf): New function.
(lp--compute-format-string): Properties on unreads.
(lp--maybe-update-unreads): New function.
(lp--update-buffer): Support adding and removing memberships.
* deferred-insert.el (lyskom-replace-deferred): Perform the
deferred insertion in the right buffer.
* view-text.el (lyskom-mark-as-read-callback): New function.
(lyskom-mark-as-read): Call it.
1999-12-03 David Byers <davby@ida.liu.se>
* flags.el: Removed commented kom-edit-options stuff.
* swedish-strings.el (lyskom-sv-mode-map): Fixed remaininig
bindings of swedish characters.
1999-12-03 David Byers <davby@sen2.ida.liu.se> 1999-12-03 David Byers <davby@sen2.ida.liu.se>
* swedish-strings.el, english-strings.el (lyskom-command): Removed * swedish-strings.el, english-strings.el (lyskom-command): Removed
......
...@@ -83,6 +83,7 @@ SOURCES = $(LANGUAGE-EL) \ ...@@ -83,6 +83,7 @@ SOURCES = $(LANGUAGE-EL) \
view-text.el \ view-text.el \
async.el \ async.el \
completing-read.el \ completing-read.el \
mship-edit.el \
prioritize.el \ prioritize.el \
flags.el \ flags.el \
messages.el \ messages.el \
......
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
Att göra i elisp-klienten Att göra i elisp-klienten
========================= =========================
* SHOWSTOPPERS
** Om man går ur ett möte i en server som inte har set-membership-type
så försöker klienten ändå att göra set-membership-type
(commands1.el, lyskom-sub-member.)
** När man går med i ett möte så sorteras inte medlemskapet in korrekt
i medlemskapslistan.
* MULEification * MULEification
These items have to be dealt with before the client can be used in a These items have to be dealt with before the client can be used in a
multibyte environment (where the strings sent from the server are in multibyte environment (where the strings sent from the server are in
......
...@@ -284,14 +284,11 @@ chosen according to this" ...@@ -284,14 +284,11 @@ chosen according to this"
(setq lyskom-current-prompt nil) (setq lyskom-current-prompt nil)
(lyskom-insert "\n") (lyskom-insert "\n")
(if (and (eq (window-buffer (selected-window)) (if (and (eq (window-buffer (selected-window))
(current-buffer)) (current-buffer)))
;; (= (point) (point-max))
)
(progn (progn
(if (pos-visible-in-window-p (1- (point-max))) (if (pos-visible-in-window-p (1- (point-max)))
(goto-char (point-max))) (goto-char (point-max)))
(sit-for 0))) (sit-for 0)))
; (lyskom-scroll)
(run-hooks 'lyskom-before-command-hook) (run-hooks 'lyskom-before-command-hook)
(if kom-page-before-command ;Nice with dumb terminals. (if kom-page-before-command ;Nice with dumb terminals.
(if (or (not (listp kom-page-before-command)) (if (or (not (listp kom-page-before-command))
......
...@@ -132,6 +132,8 @@ The insertion will be at (point)." ...@@ -132,6 +132,8 @@ The insertion will be at (point)."
(defun lyskom-replace-deferred (defer-info &rest replacement-data) (defun lyskom-replace-deferred (defer-info &rest replacement-data)
"Replace some defered text." "Replace some defered text."
(save-excursion (save-excursion
(when (marker-buffer (defer-info->pos defer-info))
(set-buffer (marker-buffer (defer-info->pos defer-info))))
(goto-char (defer-info->pos defer-info)) (goto-char (defer-info->pos defer-info))
(apply 'lyskom-format-insert-at-point (apply 'lyskom-format-insert-at-point
(defer-info->format defer-info) (defer-info->format defer-info)
......
...@@ -40,201 +40,9 @@ ...@@ -40,201 +40,9 @@
(require 'lyskom-command "command")) (require 'lyskom-command "command"))
;;; Author: Linus Tolke
;;; Dummy defun of original-user-variable-p to eliminate compiler warning.
;;;; (defun original-user-variable-p (x) nil)
;;;;
;;;; (fset 'original-user-variable-p
;;;; (symbol-function 'user-variable-p))
;;;;
;;;;
;;;; (defun lyskom-user-variable-p (symbol)
;;;; (and (original-user-variable-p symbol)
;;;; (or (string-match "^kom-"
;;;; (symbol-name symbol))
;;;; (string-match "^lyskom-"
;;;; (symbol-name symbol)))))
;;;;
;;;; (defun lyskom-Edit-options-modify (modfun)
;;;; (save-excursion
;;;; (let ((inhibit-read-only t)
;;;; var pos tmp)
;;;; (re-search-backward "^;; \\|\\`")
;;;; (forward-char 3)
;;;; (setq pos (point))
;;;; (save-restriction
;;;; (narrow-to-region pos (progn (end-of-line) (1- (point))))
;;;; (goto-char pos)
;;;; (setq var (read (current-buffer))))
;;;; (goto-char pos)
;;;; (forward-line 1)
;;;; (forward-char 1)
;;;; (save-excursion
;;;; (set var (setq tmp (funcall modfun var)))
;;;; (if (boundp 'lyskom-buffer)
;;;; (set-buffer lyskom-buffer))
;;;; (set var tmp))
;;;; (kill-sexp 1)
;;;; (prin1 (symbol-value var) (current-buffer)))))
;;;;
(defvar lyskom-options-text nil (defvar lyskom-options-text nil
"Text mass when reading options.") "Text mass when reading options.")
;;;;
;;;; (def-kom-command kom-save-options ()
;;;; "Save options that have been set somewhere."
;;;; (interactive)
;;;; (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-external-function edit-options)
;;;; (defun kom-edit-options ()
;;;; "Edit options for the lyskom client."
;;;; (interactive)
;;;; (fset 'user-variable-p
;;;; (symbol-function 'lyskom-user-variable-p))
;;;; (let ((buf (current-buffer))
;;;; (curwin (current-window-configuration)))
;;;; (edit-options)
;;;; (fset 'Edit-options-modify
;;;; (symbol-function 'lyskom-Edit-options-modify))
;;;; (make-local-variable 'lyskom-buffer)
;;;; (make-local-variable 'lyskom-edit-return-to-configuration)
;;;; (setq lyskom-buffer buf)
;;;; (setq lyskom-edit-return-to-configuration curwin)
;;;; (local-set-key "\C-c\C-c" 'kom-edit-options-send)
;;;; (local-set-key "\C-c\C-k" 'kom-edit-quit)
;;;; )
;;;; (fset '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 ()
;;;; "Finishes the edit options and sends the new settings to the server."
;;;; (interactive)
;;;; ; The check for changes is not a very good one.
;;;; (cond
;;;; ((not (eq major-mode 'Edit-options-mode))
;;;; (error "You are not in the correct buffer. (Couldn't fool me this time."))
;;;; ((buffer-modified-p (current-buffer))
;;;; ;lets do it.
;;;; ;lyskom-global-variables is a list of variables in the common block.
;;;; ;lyskom-elisp-variables is a list of varibles in the elisp block.
;;;; (let* ((optbuf (current-buffer))
;;;; (print-readably t)
;;;; (common-block nil)
;;;; (elisp-block nil))
;;;; (save-excursion
;;;; (set-buffer lyskom-buffer)
;;;; (setq
;;;; 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)
;;;; (concat (symbol-name var)
;;;; " "
;;;; (let* ((data (prin1-to-string (symbol-value var)))
;;;; (coding
;;;; (lyskom-mime-charset-coding-system
;;;; (lyskom-mime-string-charset data)))
;;;; (val (condition-case nil
;;;; (encode-coding-string data coding)
;;;; (error nil))))
;;;; ;; FIXME
;;;; (if (and val nil)
;;;; (format "%dC%s%dH%s"
;;;; (string-bytes (symbol-name coding))
;;;; (symbol-name coding)
;;;; (string-bytes val)
;;;; val)
;;;; (format "%dH%s"
;;;; (string-bytes data)
;;;; data))))))
;;;; lyskom-elisp-variables
;;;; "\n"))
;;;; (lyskom-start-of-command (lyskom-get-string 'saving-settings) t)
;;;; (lyskom-insert-string 'hang-on)
;;;; (initiate-create-text
;;;; 'options 'lyskom-edit-options-send
;;;; ;;; This is a cludge awaiting prot-B
;;;; (cons 'raw-text
;;;; (apply 'lyskom-format-objects
;;;; (apply 'lyskom-format-objects
;;;; "common"
;;;; "elisp"
;;;; (mapcar
;;;; (function car)
;;;; (cons 'STRING
;;;; (cons 'raw-text
;;;; lyskom-other-clients-user-areas))))
;;;; (cons 'STRING (cons 'raw-text common-block))
;;;; (cons 'STRING (cons 'raw-text elisp-block))
;;;; (mapcar (lambda (el)
;;;; (cons 'STRING (cons 'raw-text (cdr el))))
;;;; lyskom-other-clients-user-areas)))
;;;; (lyskom-create-misc-list)
;;;; nil
;;;; optbuf))))
;;;; (t
;;;; (let ((optbuf (current-buffer)))
;;;; (set-buffer lyskom-buffer)
;;;; (lyskom-start-of-command (lyskom-get-string 'saving-settings) t)
;;;; (lyskom-insert-string 'no-changes)
;;;; (lyskom-edit-options-done t optbuf)))))
;;;;
;;;;
;;;; (defun lyskom-edit-options-send (text-no optbuf)
;;;; "Handles the call after the options text has been sent to the buffer."
;;;; (if text-no
;;;; (initiate-set-user-area 'options 'lyskom-edit-options-done
;;;; lyskom-pers-no text-no optbuf)
;;;; (lyskom-insert-string 'could-not-create-area)
;;;; (lyskom-end-of-command)))
;;;;
;;;;
;;;; (defun lyskom-edit-options-done (success optbuf)
;;;; "Handles the return from the set user area call.
;;;; If successful then set the buffer not-modified. Else print a warning."
;;;; (if success
;;;; (save-excursion
;;;; ;;;+++ This should be done with the asynchronous call instead.
;;;; (cache-del-pers-stat lyskom-pers-no)
;;;; (set-buffer optbuf)
;;;; (not-modified)
;;;; (set-window-configuration lyskom-edit-return-to-configuration))
;;;; (lyskom-format-insert 'could-not-set-user-area lyskom-errno))
;;;; (lyskom-end-of-command))
;;;;
;;;;
(def-kom-var lyskom-options-done nil (def-kom-var 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."
local) local)
......
This diff is collapsed.
...@@ -1749,6 +1749,9 @@ Du m ...@@ -1749,6 +1749,9 @@ Du m
(lyskom-language-keymap lyskom-mode-map sv lyskom-sv-mode-map) (lyskom-language-keymap lyskom-mode-map sv lyskom-sv-mode-map)
(defvar lyskom-sv-S-prefix nil) (defvar lyskom-sv-S-prefix nil)
(defvar lyskom-sv-list-prefix nil)
(defvar lyskom-sv-fast-reply-prefix nil)
(defvar lyskom-sv-filter-get-prefix nil)
(if lyskom-sv-mode-map (if lyskom-sv-mode-map
nil nil
...@@ -1826,10 +1829,8 @@ Du m ...@@ -1826,10 +1829,8 @@ Du m
(define-key lyskom-sv-mode-map (kbd "l p") 'kom-list-persons) (define-key lyskom-sv-mode-map (kbd "l p") 'kom-list-persons)
(define-key lyskom-sv-mode-map (kbd "l r") 'kom-list-re) (define-key lyskom-sv-mode-map (kbd "l r") 'kom-list-re)
(define-key lyskom-sv-mode-map (kbd "l s") 'kom-membership) (define-key lyskom-sv-mode-map (kbd "l s") 'kom-membership)
(define-key lyskom-sv-mode-map (kbd "l ") 'kom-list-summary) (define-key lyskom-sv-list-prefix (lyskom-keys "") 'kom-list-summary)
(define-key lyskom-sv-mode-map (kbd "l ") 'kom-list-summary) (define-key lyskom-sv-list-prefix (lyskom-keys "") 'kom-list-summary)
(define-key lyskom-sv-mode-map [?l adiaeresis] 'kom-list-summary)
(define-key lyskom-sv-mode-map [?l Adiaeresis] 'kom-list-summary)
(define-key lyskom-sv-mode-map (kbd "l {") 'kom-list-summary) (define-key lyskom-sv-mode-map (kbd "l {") 'kom-list-summary)
(define-key lyskom-sv-mode-map (kbd "l [") 'kom-list-summary) (define-key lyskom-sv-mode-map (kbd "l [") 'kom-list-summary)
(define-key lyskom-sv-mode-map (kbd "l f") 'kom-list-filters) (define-key lyskom-sv-mode-map (kbd "l f") 'kom-list-filters)
...@@ -1850,10 +1851,8 @@ Du m ...@@ -1850,10 +1851,8 @@ Du m
(define-key lyskom-sv-mode-map (kbd "f u") 'kom-get-appreciation) (define-key lyskom-sv-mode-map (kbd "f u") 'kom-get-appreciation)
(define-key lyskom-sv-mode-map (kbd "f s") 'kom-get-abuse) (define-key lyskom-sv-mode-map (kbd "f s") 'kom-get-abuse)
(define-key lyskom-sv-mode-map (kbd "f t") 'kom-move-text) (define-key lyskom-sv-mode-map (kbd "f t") 'kom-move-text)
(define-key lyskom-sv-mode-map (kbd "f ") 'kom-filter-subject) (define-key lyskom-sv-filter-get-prefix (lyskom-keys "") 'kom-filter-subject)
(define-key lyskom-sv-mode-map (kbd "f ") 'kom-filter-subject) (define-key lyskom-sv-filter-get-prefix (lyskom-keys "") 'kom-filter-subject)
(define-key lyskom-sv-mode-map [?f Adiaeresis] 'kom-filter-subject)
(define-key lyskom-sv-mode-map [?f adiaeresis] 'kom-filter-subject)
(define-key lyskom-sv-mode-map (kbd "f {") 'kom-filter-subject) (define-key lyskom-sv-mode-map (kbd "f {") 'kom-filter-subject)
(define-key lyskom-sv-mode-map (kbd "f [") 'kom-filter-subject) (define-key lyskom-sv-mode-map (kbd "f [") 'kom-filter-subject)
(define-key lyskom-sv-mode-map (kbd "f f") 'kom-filter-author) (define-key lyskom-sv-mode-map (kbd "f f") 'kom-filter-author)
......
...@@ -831,9 +831,16 @@ the client. That is done by lyskom-is-read." ...@@ -831,9 +831,16 @@ the client. That is done by lyskom-is-read."
;; yet. So we better mark it as read in all conferences. ;; yet. So we better mark it as read in all conferences.
;; (lyskom-member-p (misc-info->recipient-no misc-info)) ;; (lyskom-member-p (misc-info->recipient-no misc-info))
) )
(initiate-mark-as-read 'background nil (initiate-mark-as-read 'background
'lyskom-mark-as-read-callback
(misc-info->recipient-no misc-info) (misc-info->recipient-no misc-info)
(list (misc-info->local-no misc-info))))))) (list (misc-info->local-no misc-info))
text-stat
(misc-info->recipient-no misc-info)
(list (misc-info->local-no misc-info)))))))
(defun lyskom-mark-as-read-callback (result text-stat recipient local-nos)
(lp--maybe-update-unreads recipient))
(defun lyskom-print-header-recpt (conf-no misc) (defun lyskom-print-header-recpt (conf-no misc)
......
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