Commit bbc85fa6 authored by Linus Tolke's avatar Linus Tolke
Browse files

Markera+user-area buggen fixad. Flags.el

parent 68f9bd59
No preview for this file type
......@@ -55,13 +55,23 @@
(let ((buf lyskom-buffer)
(optbuf (current-buffer))
(common-block
(mapconcat (function
(lambda (var)
(lyskom-format-objects
(substring (symbol-name var) 4)
(if (symbol-value var) "1" "0"))))
lyskom-global-variables
"\n"))
(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)
......@@ -163,14 +173,21 @@ If successful then set the buffer not-modified. Else print a warning."
(cond
((= r common-no)
(let ((txt working)
name value)
name gname value)
(while (> (length txt) 2)
(setq name (lyskom-read-options-eval-get-holerith))
(setq gname (lyskom-read-options-eval-get-holerith))
(setq value (lyskom-read-options-eval-get-holerith))
(setq name (concat "kom-" name))
(if (string= value "1")
(setq value "t")
(setq value "nil"))
(setq name (concat "kom-" gname))
(if (memq (intern-soft name) lyskom-global-boolean-variables)
(if (string= value "1")
(setq value "t")
(setq value "nil"))
(if (memq (intern-soft name)
lyskom-global-non-boolean-variables)
nil
(setq name (concat "UNK-" gname))
(setq lyskom-global-non-boolean-variables
(cons name lyskom-global-non-boolean-variables))))
(set (intern name) (car (read-from-string value))))))
((= r elisp-no)
(let ((txt working)
......@@ -205,7 +222,3 @@ If successful then set the buffer not-modified. Else print a warning."
(prog1
(substring txt start (+ start len))
(setq txt (substring txt (+ start len))))))
......@@ -149,19 +149,26 @@ otherwise => the new conf is entered after all conferences.")
"Tells the client what flags and hooks that are to be saved in the server.
These are the flags that are saved in the elisp-client part of the server.")
(defconst lyskom-global-variables '(
(defconst lyskom-global-boolean-variables '(
kom-created-texts-are-read
kom-dashed-lines
kom-default-mark
kom-presence-messages
kom-print-number-of-unread-on-entrance
kom-read-depth-first
kom-reading-puts-comments-in-pointers-last
)
"Tells the client what flags that are to be saved in the common block.
"List of flags that are to be saved as booleans in the common block.
Dont change this. These are defined by the protocol.")
(defconst lyskom-global-non-boolean-variables '(
kom-default-mark
)
"List of flags that are to be saved in the common block.
These are the non-boolean ones. See: lyskom-global-boolean-variables.
Dont change this. These are defined by the protocol.")
;;; ================================================================
;;; Internal variables and constants
......
Supports Markdown
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