Commit 37e1f80b authored by David Byers's avatar David Byers
Browse files

XEmacs compatibility restored.

Fix constant definition of lyskom-max-int
parent 98dd9a91
2002-04-24 David Byers <david.byers@swipnet.se>
* compatibility.el (make-temp-file): Maybe compatibility with
XEmacs. At least the warnings are gone...
* commands2.el (kom-diff-texts): Survive even if diff-command is
not bound (assume that the command is called "diff").
* lyskom-rest.el (lyskom-format-insert-overlays): Made XEmacs
compatible.
(lyskom-format-aux-help): Removed unused variables.
* edit-text.el (lyskom-edit-send-check-recipients): Removed unused
variables.
* commands2.el (kom-status-server): Removed unused variables.
* startup.el (kom-start-anew): Removed unused variable err.
* aux-items.el (lyskom-print-faq-format-subject): Removed unused
variable "subject".
Fix bug 473:
* vars.el.in (lyskom-max-int): Define as variable, not constant.
2002-04-24 David Kgedal <david@virtutech.se> 2002-04-24 David Kgedal <david@virtutech.se>
* commands2.el (kom-change-language): Added prefix parameter to * commands2.el (kom-change-language): Added prefix parameter to
......
...@@ -578,14 +578,13 @@ return non-nil if the item is to be included in the list." ...@@ -578,14 +578,13 @@ return non-nil if the item is to be included in the list."
(lyskom-aux-item-terminating-button item obj))) (lyskom-aux-item-terminating-button item obj)))
(defun lyskom-print-faq-format-subject (text text-stat text-no) (defun lyskom-print-faq-format-subject (text text-stat text-no)
(let ((subject ""))
(if (and text text-stat) (if (and text text-stat)
(concat "\"" (concat "\""
(cond ((string-match "\n" (text->decoded-text-mass text text-stat)) (cond ((string-match "\n" (text->decoded-text-mass text text-stat))
(substring (text->decoded-text-mass text text-stat) 0 (match-beginning 0))) (substring (text->decoded-text-mass text text-stat) 0 (match-beginning 0)))
(t "")) (t ""))
"\"") "\"")
(lyskom-format 'no-such-text-no text-no)))) (lyskom-format 'no-such-text-no text-no)))
(defun lyskom-deferred-print-faq (text-stat defer-info) (defun lyskom-deferred-print-faq (text-stat defer-info)
(if text-stat (if text-stat
......
...@@ -2547,6 +2547,8 @@ to the first text that NEW is a comment or footnote to." ...@@ -2547,6 +2547,8 @@ to the first text that NEW is a comment or footnote to."
(kill-buffer buf) (kill-buffer buf)
file)) file))
(defvar diff-command)
(def-kom-command kom-diff-texts (old new &optional switches) (def-kom-command kom-diff-texts (old new &optional switches)
"Show differences between text OLD and NEW. "Show differences between text OLD and NEW.
When called interactively, it will prompt for the NEW text first, When called interactively, it will prompt for the NEW text first,
...@@ -2602,7 +2604,10 @@ to the first text that NEW is a comment or footnote to." ...@@ -2602,7 +2604,10 @@ to the first text that NEW is a comment or footnote to."
(set-buffer buf) (set-buffer buf)
(let ((buffer-read-only nil)) (let ((buffer-read-only nil))
(apply 'call-process diff-command nil buf nil args)) (apply 'call-process (if (boundp 'diff-command)
diff-command
"diff")
nil buf nil args))
(delete-file oldfile) (delete-file oldfile)
(delete-file newfile)))) (delete-file newfile))))
...@@ -2685,9 +2690,6 @@ to the first text that NEW is a comment or footnote to." ...@@ -2685,9 +2690,6 @@ to the first text that NEW is a comment or footnote to."
(setq lyskom-server-version-info (blocking-do 'get-version-info)) (setq lyskom-server-version-info (blocking-do 'get-version-info))
(let* ((aux-items (server-info->aux-item-list lyskom-server-info)) (let* ((aux-items (server-info->aux-item-list lyskom-server-info))
(e-mail-address (lyskom-get-aux-item aux-items 13))
(faqs (lyskom-get-aux-item aux-items 14))
(recommended-conf (lyskom-get-aux-item aux-items 29))
(canonical-name-aux (car (lyskom-get-aux-item aux-items 31))) (canonical-name-aux (car (lyskom-get-aux-item aux-items 31)))
(invisible-sessions 0) (invisible-sessions 0)
(anonymous-sessions 0) (anonymous-sessions 0)
......
...@@ -465,7 +465,10 @@ If DIR-FLAG is non-nil, create a new empty directory instead of a file." ...@@ -465,7 +465,10 @@ If DIR-FLAG is non-nil, create a new empty directory instead of a file."
(progn (progn
(setq file (setq file
(make-temp-name (make-temp-name
(expand-file-name prefix temporary-file-directory))) (expand-file-name prefix
(lyskom-xemacs-or-gnu
(temp-directory)
temporary-file-directory))))
(if dir-flag (if dir-flag
(make-directory file) (make-directory file)
(write-region "" nil file nil 'silent nil 'excl)) (write-region "" nil file nil 'silent nil 'excl))
......
...@@ -912,7 +912,6 @@ Cannot be called from a callback." ...@@ -912,7 +912,6 @@ Cannot be called from a callback."
(let ((raw-author-list (make-collector)) (let ((raw-author-list (make-collector))
(author-list nil) (author-list nil)
(authors-to-ask-about nil) (authors-to-ask-about nil)
(authors-to-add nil)
(recipient-list (let ((result nil)) (recipient-list (let ((result nil))
(lyskom-traverse misc (cdr misc-list) (lyskom-traverse misc (cdr misc-list)
(when (memq (car misc) (when (memq (car misc)
......
...@@ -1118,12 +1118,19 @@ Args: FORMAT-STRING &rest ARGS" ...@@ -1118,12 +1118,19 @@ Args: FORMAT-STRING &rest ARGS"
(defun lyskom-format-insert-overlays (start format-state) (defun lyskom-format-insert-overlays (start format-state)
"Insert delayed overlays according to FORMAT-STATE." "Insert delayed overlays according to FORMAT-STATE."
(lyskom-traverse overlay (format-state->delayed-overlays format-state) (lyskom-traverse overlay (format-state->delayed-overlays format-state)
(lyskom-xemacs-or-gnu
(let ((overlay (make-extent (+ start (aref overlay 0))
(+ start (aref overlay 1))))
(args (aref overlay 2)))
(while args
(set-extent-property overlay (car args) (car (cdr args)))
(setq args (nthcdr 2 args))))
(let ((overlay (make-overlay (+ start (aref overlay 0)) (let ((overlay (make-overlay (+ start (aref overlay 0))
(+ start (aref overlay 1)))) (+ start (aref overlay 1))))
(args (aref overlay 2))) (args (aref overlay 2)))
(while args (while args
(overlay-put overlay (car args) (car (cdr args))) (overlay-put overlay (car args) (car (cdr args)))
(setq args (nthcdr 2 args)))))) (setq args (nthcdr 2 args)))))))
(defun lyskom-format-insert (format-string &rest argl) (defun lyskom-format-insert (format-string &rest argl)
"Format and insert a string according to FORMAT-STRING. "Format and insert a string according to FORMAT-STRING.
...@@ -1420,13 +1427,12 @@ Deferred insertions and overlays are not supported." ...@@ -1420,13 +1427,12 @@ Deferred insertions and overlays are not supported."
;; ;;
((= format-letter ?$) ((= format-letter ?$)
(when arg (when arg
(let ((overlay (make-overlay 0 0)))
(set-format-state->delayed-overlays (set-format-state->delayed-overlays
format-state format-state
(cons (vector (length (format-state->result format-state)) (cons (vector (length (format-state->result format-state))
nil nil
arg) arg)
(format-state->delayed-overlays format-state)))))) (format-state->delayed-overlays format-state)))))
;; ;;
;; Format a subformat list by recursively formatting the contents ;; Format a subformat list by recursively formatting the contents
;; of the list, augmenting the result and format state ;; of the list, augmenting the result and format state
......
...@@ -577,7 +577,7 @@ shown to other users." ...@@ -577,7 +577,7 @@ shown to other users."
(setq lyskom-is-new-user nil) (setq lyskom-is-new-user nil)
;; Do some FAQ handling ;; Do some FAQ handling
(condition-case err (condition-case nil
(progn (lyskom-update-read-faqs) (progn (lyskom-update-read-faqs)
(lyskom-update-rejected-recommendations) (lyskom-update-rejected-recommendations)
(lyskom-startup-check-faqs) (lyskom-startup-check-faqs)
......
...@@ -1850,7 +1850,7 @@ is a list of vectors, where each vector specifies an item. ...@@ -1850,7 +1850,7 @@ is a list of vectors, where each vector specifies an item.
(defconst lyskom-clientversion "@@CLIENTVERSION@@" (defconst lyskom-clientversion "@@CLIENTVERSION@@"
"Version of the LysKOM elisp client.") "Version of the LysKOM elisp client.")
(defconst lyskom-max-int 8388607 (defvar lyskom-max-int 8388607
"The largest int Emacs, and thus this LysKOM client, can handle.") "The largest int Emacs, and thus this LysKOM client, can handle.")
(defconst lyskom-server-features (defconst lyskom-server-features
......
...@@ -903,8 +903,7 @@ Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO FLAT-REVIEW." ...@@ -903,8 +903,7 @@ Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO FLAT-REVIEW."
pos nil pos nil
truncated t))))) truncated t)))))
(let ((lyskom-current-function-phase 'body) (let ((lyskom-current-function-phase 'body))
(start (point)))
(lyskom-format-insert "%#2$%#1t\n" (lyskom-format-insert "%#2$%#1t\n"
(cons text-stat body) (cons text-stat body)
(and kom-color-text-background (and kom-color-text-background
......
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