Commit 98e1cf5b authored by David Byers's avatar David Byers
Browse files

Fixed bugs 1638, 1542.

parent 6c0554cf
2007-07-07 <David Byers@GULAG>
* commands2.el (kom-delete-user-area): New command.
Fix bug 1542:
* flags.el (kom-copy-options): Pass portable-only to
lyskom-read-options.
(lyskom-copy-indirect-assq): New function.
* command.el (lyskom-start-of-command): Don't mess up
lyskom-default-user-name when reconnecting.
* vars.el.in: Marked a bunch of non-portable variables as such.
Marked some indirect assqs for copy-transition.
* flags.el (lyskom-read-options): Added portable-only argument.
(lyskom-read-options-eval): Same here.
(lyskom-maybe-set-var-from-string): Same here, and convert
variables when portable-only as requested.
* defvar.el (lyskom-save-variables): Cleaned up old backquote
syntax.
(lyskom-with-lyskom-minibuffer): Same here.
(def-kom-var): Same here.
(lyskom-non-portable-server-variables): New variable.
(def-kom-var): Support non-portable and copy-transition variable
specs.
Fix bug 1638:
* review.el (lyskom-maybe-run-mouse-2): New function to run unread
mouse-2 event under certain circumstances.
(kom-toggle-mark-as-read-prefix): Use lyskom-maybe-run-mouse-2
(kom-toggle-cache-prefix): Here too.
2007-07-07 David Byers <davby@sysinst-gw.sysinst.ida.liu.se> 2007-07-07 David Byers <davby@sysinst-gw.sysinst.ida.liu.se>
* edit-text.el (lyskom-edit-insert-buglist): Don't use interactive * edit-text.el (lyskom-edit-insert-buglist): Don't use interactive
......
...@@ -594,13 +594,14 @@ chosen according to this" ...@@ -594,13 +594,14 @@ chosen according to this"
(if (or (eq t kom-relogin-behaviour) (if (or (eq t kom-relogin-behaviour)
(and (eq 'ask kom-relogin-behaviour) (and (eq 'ask kom-relogin-behaviour)
(lyskom-j-or-n-p (lyskom-get-string 'resurrect-session)))) (lyskom-j-or-n-p (lyskom-get-string 'resurrect-session))))
(lyskom (if (= 4894 lyskom-server-port) ; Should we do this different? (let ((lyskom-default-user-name lyskom-default-user-name))
lyskom-server-name (lyskom (if (= 4894 lyskom-server-port) ; Should we do this different?
(concat lyskom-server-name lyskom-server-name
":" (concat lyskom-server-name
(int-to-string lyskom-server-port))) ":"
lyskom-pers-no (int-to-string lyskom-server-port)))
lyskom-default-password) lyskom-pers-no
lyskom-default-password))
(lyskom-error "%s" (lyskom-get-string 'dead-session))))) (lyskom-error "%s" (lyskom-get-string 'dead-session)))))
(if (and lyskom-is-waiting (if (and lyskom-is-waiting
......
...@@ -1843,6 +1843,24 @@ primarily intended for use by developers." ...@@ -1843,6 +1843,24 @@ primarily intended for use by developers."
nil nil nil nil nil) nil nil nil nil nil)
(lyskom-wait-queue 'main))) (lyskom-wait-queue 'main)))
(def-kom-command kom-delete-user-area ()
"Remove the user area of the current person. The user area
is where all settings are stored. Deleting it means all settings
are lost. Do not delete the user area unless you're sure you really
want to."
(interactive)
(lyskom-format-insert 'delete-user-area-warning
`(face ,kom-warning-face))
(when (lyskom-ja-or-nej-p (lyskom-get-string 'delete-user-area-confirm))
(let* ((pers-stat (blocking-do 'get-pers-stat lyskom-pers-no))
(user-area (pers-stat->user-area pers-stat)))
(lyskom-insert 'deleting-user-area)
(lyskom-report-command-answer (blocking-do 'delete-text user-area))
(lyskom-insert 'removing-user-area)
(lyskom-report-command-answer (blocking-do 'set-user-area lyskom-pers-no 0))
)))
;;;============================================================ ;;;============================================================
;;; Bli anonym ;;; Bli anonym
......
...@@ -395,7 +395,10 @@ visible in the event's window." ...@@ -395,7 +395,10 @@ visible in the event's window."
(lyskom-function-alias event-closest-point (e) (lyskom-function-alias event-closest-point (e)
"Return the character position closest to the mouse event EVENT." "Return the character position closest to the mouse event EVENT."
(car (cdr (event-start e))))) (car (cdr (event-start e))))
(lyskom-function-alias event-type (e)
(event-basic-type e)))
;;; ====================================================================== ;;; ======================================================================
......
...@@ -63,6 +63,9 @@ These are the flags that are saved in the elisp-client part of the server.") ...@@ -63,6 +63,9 @@ These are the flags that are saved in the elisp-client part of the server.")
"Tells the client what variables are not to be saved in the server, but "Tells the client what variables are not to be saved in the server, but
are to be read from the server. This is for transitioning.") are to be read from the server. This is for transitioning.")
(defvar lyskom-copy-transition-variables nil
"Tells the client about variables that need transforming when copying.")
(defvar lyskom-minibuffer-variables nil (defvar lyskom-minibuffer-variables nil
"These are variables that should be set in the minibuffer by "These are variables that should be set in the minibuffer by
lyskom-with-lyskom-minibuffer.") lyskom-with-lyskom-minibuffer.")
...@@ -75,6 +78,9 @@ lyskom-with-lyskom-minibuffer.") ...@@ -75,6 +78,9 @@ lyskom-with-lyskom-minibuffer.")
Don't change these. They are defined by the protocol.") Don't change these. They are defined by the protocol.")
(defvar lyskom-non-portable-server-variables nil
"List of variables that should not be copied from server to server.")
(defmacro lyskom-save-variables (var-list &rest forms) (defmacro lyskom-save-variables (var-list &rest forms)
"Save the values and property list of symbols in VAR-LIST and execute FORMS "Save the values and property list of symbols in VAR-LIST and execute FORMS
...@@ -84,38 +90,37 @@ is saved before executing FORMS and restored when FORMS have finished." ...@@ -84,38 +90,37 @@ is saved before executing FORMS and restored when FORMS have finished."
(sym2 (make-symbol "lyskom-saved-symbols")) (sym2 (make-symbol "lyskom-saved-symbols"))
(sym3 (make-symbol "lyskom-saved-local")) (sym3 (make-symbol "lyskom-saved-local"))
(sym4 (make-symbol "lyskom-saved-plist"))) (sym4 (make-symbol "lyskom-saved-plist")))
(` (let* (((, sym2) (quote (, var-list))) `(let* ((,sym2 (quote ,var-list))
((, sym1) (mapcar 'symbol-value (, sym2))) (,sym1 (mapcar 'symbol-value ,sym2))
((, sym4) (mapcar 'symbol-plist (, sym2))) (,sym4 (mapcar 'symbol-plist ,sym2))
((, sym3) (mapcar (function (,sym3 (mapcar (lambda (v)
(lambda (v) (local-variable-p v (current-buffer)))
(local-variable-p v (current-buffer)))) ,sym2)))
(, sym2))))
(unwind-protect (unwind-protect
(progn (,@ forms)) (progn ,@forms)
(while (, sym1) (while ,sym1
(if (car (, sym3)) (make-local-variable (car (, sym2)))) (when (car ,sym3) (make-local-variable (car ,sym2)))
(set (car (, sym2)) (car (, sym1))) (set (car ,sym2) (car ,sym1))
(setplist (car (, sym2)) (car (, sym4))) (setplist (car ,sym2) (car ,sym4))
(setq (, sym1) (cdr (, sym1)) (setq ,sym1 (cdr ,sym1)
(, sym2) (cdr (, sym2)) ,sym2 (cdr ,sym2)
(, sym3) (cdr (, sym3)) ,sym3 (cdr ,sym3)
(, sym4) (cdr (, sym4))))))))) ,sym4 (cdr ,sym4)))))))
(put 'lyskom-save-variables 'edebug-form-spec (put 'lyskom-save-variables 'edebug-form-spec
'(sexp body)) '(sexp body))
(defmacro lyskom-with-lyskom-minibuffer (&rest forms) (defmacro lyskom-with-lyskom-minibuffer (&rest forms)
"Run FORMS after ensuring that LysKOM minibuffer variables will be set." "Run FORMS after ensuring that LysKOM minibuffer variables will be set."
(` (let* ((lyskom-minibuffer-values `(let* ((lyskom-minibuffer-values
(mapcar 'symbol-value lyskom-minibuffer-variables))) (mapcar 'symbol-value lyskom-minibuffer-variables)))
(unwind-protect (unwind-protect
(progn (progn
(add-hook 'minibuffer-setup-hook (add-hook 'minibuffer-setup-hook
'lyskom-setup-minibuffer-variables) 'lyskom-setup-minibuffer-variables)
(,@ forms)) ,@forms)
(remove-hook 'minibuffer-setup-hook (remove-hook 'minibuffer-setup-hook
'lyskom-setup-minibuffer-variables))))) 'lyskom-setup-minibuffer-variables))))
(put 'lyskom-with-lyskom-minibuffer 'edebug-form-spec (put 'lyskom-with-lyskom-minibuffer 'edebug-form-spec
'(body)) '(body))
...@@ -153,10 +158,12 @@ language-force A language-variable whose value is to be forced." ...@@ -153,10 +158,12 @@ language-force A language-variable whose value is to be forced."
(protected nil) (protected nil)
(elisp-block nil) (elisp-block nil)
(transition-block nil) (transition-block nil)
(copy-transition-block nil)
(buffer-local nil) (buffer-local nil)
(widget-spec nil) (widget-spec nil)
(doc-string nil) (doc-string nil)
(minibuffer nil) (minibuffer nil)
(non-portable nil)
(local-hook-doc nil) (local-hook-doc nil)
(local-var-doc nil) (local-var-doc nil)
(server-doc nil) (server-doc nil)
...@@ -167,16 +174,15 @@ language-force A language-variable whose value is to be forced." ...@@ -167,16 +174,15 @@ language-force A language-variable whose value is to be forced."
(cond ((stringp (car arglist)) (setq doc-string (car arglist))) (cond ((stringp (car arglist)) (setq doc-string (car arglist)))
((consp (car arglist)) ((consp (car arglist))
(setq widget-spec (setq widget-spec
(` ((setq lyskom-custom-variables `((setq lyskom-custom-variables
(cons (quote (, (list name (cons (quote ,(list name (car arglist)))
(car arglist)))) lyskom-custom-variables)))))
lyskom-custom-variables))))))
((symbolp (car arglist)) ((symbolp (car arglist))
(cond ((eq (car arglist) 'server) (cond ((eq (car arglist) 'server)
(setq local-var-doc t server-doc t) (setq local-var-doc t server-doc t)
(setq elisp-block (setq elisp-block
`((add-to-list 'lyskom-elisp-variables ', name) `((add-to-list 'lyskom-elisp-variables ',name)
(add-to-list 'lyskom-local-variables ', name)))) (add-to-list 'lyskom-local-variables ',name))))
((eq (car arglist) 'common) ((eq (car arglist) 'common)
(setq local-var-doc t server-doc t) (setq local-var-doc t server-doc t)
...@@ -197,50 +203,52 @@ language-force A language-variable whose value is to be forced." ...@@ -197,50 +203,52 @@ language-force A language-variable whose value is to be forced."
'(,name . ,converter)) '(,name . ,converter))
(add-to-list 'lyskom-local-variables ',name))))) (add-to-list 'lyskom-local-variables ',name)))))
((eq (car arglist) 'copy-transition)
(let ((converter (car (cdr arglist))))
(setq arglist (cdr arglist))
(setq local-var-doc t server-doc t)
(setq copy-transition-block
`((add-to-list 'lyskom-copy-transition-variables
'(,name . ,converter))))))
((eq (car arglist) 'server-hook) ((eq (car arglist) 'server-hook)
(setq local-hook-doc t server-doc t) (setq local-hook-doc t server-doc t)
(setq elisp-block (setq elisp-block
(` ((add-to-list 'lyskom-elisp-variables `((add-to-list 'lyskom-elisp-variables ',name)
(quote (, name))) (add-to-list 'lyskom-local-hooks ',name))))
(add-to-list 'lyskom-local-hooks
(quote (, name)))))))
((eq (car arglist) 'protected) ((eq (car arglist) 'protected)
(setq local-var-doc t) (setq local-var-doc t)
(setq protected (setq protected
(` ((put (quote (, name)) 'permanent-local t) `((put ',name 'permanent-local t)
(add-to-list 'lyskom-protected-variables (add-to-list 'lyskom-protected-variables ',name)
(quote (, name))) (add-to-list 'lyskom-local-variables ',name))))
(add-to-list 'lyskom-local-variables
(quote (, name)))))))
((eq (car arglist) 'inherited) ((eq (car arglist) 'inherited)
(setq local-var-doc t) (setq local-var-doc t)
(setq inherited (setq inherited
(` ((add-to-list 'lyskom-inherited-variables `((add-to-list 'lyskom-inherited-variables ',name)
(quote (, name))) (put ',name 'permanent-local t)
(put (quote (, name)) 'permanent-local t) (add-to-list 'lyskom-protected-variables ',name)
(add-to-list 'lyskom-protected-variables (add-to-list 'lyskom-local-variables ',name))))
(quote (, name)))
(add-to-list 'lyskom-local-variables
(quote (, name)))))))
((eq (car arglist) 'local) ((eq (car arglist) 'local)
(setq local-var-doc t) (setq local-var-doc t)
(setq buffer-local (setq buffer-local
(` ((add-to-list 'lyskom-local-variables `((add-to-list 'lyskom-local-variables ',name))))
(quote (, name)))))))
((eq (car arglist) 'local-hook) ((eq (car arglist) 'local-hook)
(setq local-hook-doc t) (setq local-hook-doc t)
(setq buffer-local (setq buffer-local
(` ((add-to-list 'lyskom-local-hooks `((add-to-list 'lyskom-local-hooks ',name))))
(quote (, name)))))))
((eq (car arglist) 'non-portable)
(setq non-portable
`((add-to-list 'lyskom-non-portable-server-variables ',name))))
((eq (car arglist) 'minibuffer) ((eq (car arglist) 'minibuffer)
(setq minibuffer (setq minibuffer
(` ((add-to-list 'lyskom-minibuffer-variables `((add-to-list 'lyskom-minibuffer-variables ',name))))
(quote (, name)))))))
((eq (car arglist) 'language-force) ((eq (car arglist) 'language-force)
(setq language-force (setq language-force
...@@ -273,23 +281,24 @@ This variable is normally stored on a per-session basis in the ...@@ -273,23 +281,24 @@ This variable is normally stored on a per-session basis in the
LysKOM server, but can be set in your .emacs simply by setting LysKOM server, but can be set in your .emacs simply by setting
it using setq or defvar."))) it using setq or defvar.")))
(` (progn (dont-compile (if (and (boundp (quote (, name))) `(progn (dont-compile (if (and (boundp ',name)
(or (not (boundp lyskom-is-loaded)) (or (not (boundp lyskom-is-loaded))
(not lyskom-is-loaded)) (not lyskom-is-loaded))
(listp kom-dont-read-saved-variables)) (listp kom-dont-read-saved-variables))
(add-to-list 'kom-dont-read-saved-variables (add-to-list 'kom-dont-read-saved-variables ',name)))
(quote (, name))))) (defvar ,name ,value ,doc-string)
(defvar (, name) (, value) (, doc-string)) ,@(apply 'append
(,@ (apply 'append (list inherited
(list inherited protected
protected elisp-block
elisp-block transition-block
transition-block copy-transition-block
buffer-local buffer-local
minibuffer minibuffer
widget-spec non-portable
language-force widget-spec
))))))) language-force
)))))
(put 'def-kom-var 'edebug-form-spec (put 'def-kom-var 'edebug-form-spec
...@@ -298,6 +307,3 @@ it using setq or defvar."))) ...@@ -298,6 +307,3 @@ it using setq or defvar.")))
(eval-and-compile (provide 'lyskom-defvar)) (eval-and-compile (provide 'lyskom-defvar))
...@@ -2063,6 +2063,21 @@ written a presentation.%] ...@@ -2063,6 +2063,21 @@ written a presentation.%]
") ")
(delete-user-area-warning . "\
%#1@\
========================================================================
If you delete your user area, all your saved settings will be lost. You
can restore the user area by saving your current settings, but any
saved settings from other clients will still be lost.
Are you completely certain that you know what you are doing and that
you really want to delete your user area?
========================================================================
")
(delete-user-area-confirm . "Delete your user area and all saved settings? ")
(removing-user-area . "Removing reference to user area from person status...")
(deleting-user-area . "Deleting the user area...")
(status-server-stats . "Server statistics:\n\n") (status-server-stats . "Server statistics:\n\n")
(current-average . "current") (current-average . "current")
......
...@@ -86,7 +86,7 @@ settings and save them to your emacs init file." ...@@ -86,7 +86,7 @@ settings and save them to your emacs init file."
completions completions
nil t))) nil t)))
(lyskom-message (lyskom-get-string 'reading-settings-from) from-session) (lyskom-message (lyskom-get-string 'reading-settings-from) from-session)
(setq lyskom-saved-unknown-variables (lyskom-read-options from-session)) (setq lyskom-saved-unknown-variables (lyskom-read-options from-session t))
(lyskom-message (lyskom-get-string 'reading-settings-from-done) from-session) (lyskom-message (lyskom-get-string 'reading-settings-from-done) from-session)
;; Inline kom-save-options ;; Inline kom-save-options
...@@ -96,6 +96,18 @@ settings and save them to your emacs init file." ...@@ -96,6 +96,18 @@ settings and save them to your emacs init file."
(lyskom-get-string 'could-not-save-options)) (lyskom-get-string 'could-not-save-options))
)) ))
(defun lyskom-copy-indirect-assq (val)
"Attempt to filter out non-portable stuff from an indirect assq"
(cond ((eq val t) t)
((eq val nil) nil)
(t (delq nil
(mapcar (lambda (el)
(cond ((numberp el) nil)
((atom el) el)
((and (consp el) (symbolp (car el))) el)
(t nil)))
val)))))
;;;============================================================ ;;;============================================================
;;; lyskom-save-options ;;; lyskom-save-options
...@@ -252,13 +264,15 @@ settings and save them to your emacs init file." ...@@ -252,13 +264,15 @@ settings and save them to your emacs init file."
(lyskom-format-insert 'could-not-set-user-area lyskom-errno) (lyskom-format-insert 'could-not-set-user-area lyskom-errno)
(when error-message (lyskom-message "%s" error-message))))) (when error-message (lyskom-message "%s" error-message)))))
(defun lyskom-read-options (&optional buffer) (defun lyskom-read-options (&optional buffer portable-only)
"Reads the user-area and sets the variables according to the choises. "Reads the user-area and sets the variables according to the choises.
Returns a association list of variables that were ignored. Each list Returns a association list of variables that were ignored. Each list
element is a cons (NAME . VALUE), where NAME is the name of the variable element is a cons (NAME . VALUE), where NAME is the name of the variable
and VALUE is the unparsed value (i.e. it is always a string). and VALUE is the unparsed value (i.e. it is always a string).
If optional BUFFER is non-nil, read settings in that buffer." If optional BUFFER is non-nil, read settings in that buffer.
If optional PORTABLE-ONLY is non-nil, skip variables marked non-portable."
(if (and lyskom-pers-no (if (and lyskom-pers-no
(not (zerop lyskom-pers-no))) (not (zerop lyskom-pers-no)))
(let ((pers-stat (let ((pers-stat
...@@ -278,13 +292,16 @@ If optional BUFFER is non-nil, read settings in that buffer." ...@@ -278,13 +292,16 @@ If optional BUFFER is non-nil, read settings in that buffer."
(save-excursion (save-excursion
(when buffer (set-buffer buffer)) (when buffer (set-buffer buffer))
(blocking-do 'get-text (blocking-do 'get-text
(pers-stat->user-area pers-stat))))))) (pers-stat->user-area pers-stat)))
portable-only))))
nil)) nil))
(defun lyskom-read-options-eval (text) (defun lyskom-read-options-eval (text &optional portable-only)
"Handles the call from where we have the text. "Handles the call from where we have the text.
Returns a alist of variables that were ignored. See lyskom-read-options Returns a alist of variables that were ignored. See lyskom-read-options
for more information." for more information.
If optional PORTABLE-ONLY is non-nil, skip variables marked non-portable."
(let ((ignored-user-area-vars nil)) (let ((ignored-user-area-vars nil))
(condition-case nil (condition-case nil
(when text ;+++ Other error handler (when text ;+++ Other error handler
...@@ -333,7 +350,7 @@ for more information." ...@@ -333,7 +350,7 @@ for more information."
(cons tmp lyskom-global-variables)) (cons tmp lyskom-global-variables))
tmp)))) tmp))))
(unless (lyskom-maybe-set-var-from-string (elt spec 1) value (elt spec 2)) (unless (lyskom-maybe-set-var-from-string (elt spec 1) value (elt spec 2) portable-only)
(setq ignored-user-area-vars (setq ignored-user-area-vars
(cons (cons (elt spec 1) value) ignored-user-area-vars)))))) (cons (cons (elt spec 1) value) ignored-user-area-vars))))))
;; Note that elisp-no may be nil here, so the comparison ;; Note that elisp-no may be nil here, so the comparison
...@@ -344,7 +361,7 @@ for more information." ...@@ -344,7 +361,7 @@ for more information."
(while (> (length lyskom-options-text) 2) (while (> (length lyskom-options-text) 2)
(setq name (intern (lyskom-read-options-eval-get-holerith))) (setq name (intern (lyskom-read-options-eval-get-holerith)))
(setq value (lyskom-read-options-eval-get-holerith)) (setq value (lyskom-read-options-eval-get-holerith))
(if (lyskom-maybe-set-var-from-string name value) (if (lyskom-maybe-set-var-from-string name value nil portable-only)
(when (functionp (cdr (assq name lyskom-transition-variables))) (when (functionp (cdr (assq name lyskom-transition-variables)))
(set name (funcall (cdr (assq name lyskom-transition-variables)) (set name (funcall (cdr (assq name lyskom-transition-variables))
(symbol-value name)))) (symbol-value name))))
...@@ -442,17 +459,22 @@ If optional NO-CODING is set, assume the string has internal coding." ...@@ -442,17 +459,22 @@ If optional NO-CODING is set, assume the string has internal coding."
(cons (lyskom-decode-coding-string name coding) string) (cons (lyskom-decode-coding-string name coding) string)
(error (cons name string))))))) (error (cons name string)))))))
(defun lyskom-maybe-set-var-from-string (var string &optional type) (defun lyskom-maybe-set-var-from-string (var string &optional type portable-only)
"This is a wrapper around lyskom-set-var-from-string that does nothing "This is a wrapper around lyskom-set-var-from-string that does nothing
if the variable is in kom-dont-read-saved-variables. if the variable is in kom-dont-read-saved-variables.
Return non-nil if the variable shouldn't have been set in the first place." Return non-nil if the variable shouldn't have been set in the first place."
(cond ((eq kom-dont-read-saved-variables t) t) (prog1
((memq var kom-dont-read-saved-variables) t) (cond ((eq kom-dont-read-saved-variables t) t)
((not (or (memq var lyskom-elisp-variables) ((memq var kom-dont-read-saved-variables) t)
(assq var lyskom-transition-variables) ((and portable-only (memq var lyskom-non-portable-server-variables)) nil)
(lyskom-flag-global-variable-from-elisp var))) nil) ((not (or (memq var lyskom-elisp-variables)
(t (lyskom-set-var-from-string var string type) t))) (assq var lyskom-transition-variables)
(lyskom-flag-global-variable-from-elisp var))) nil)
(t (lyskom-set-var-from-string var string type) t))
(when (and portable-only (assq var lyskom-copy-transition-variables))
(set var (funcall (cdr (assq var lyskom-copy-transition-variables))
(symbol-value var))))))
(defun lyskom-set-var-from-string (var string &optional type) (defun lyskom-set-var-from-string (var string &optional type)
"This is a wrapper aroud read-from-string. "This is a wrapper aroud read-from-string.
......
...@@ -95,6 +95,22 @@ ...@@ -95,6 +95,22 @@
;;; ================================================================ ;;; ================================================================
;;; Temoporary change of mark-as-read ;;; Temoporary change of mark-as-read
(defun lyskom-maybe-run-mouse-2 (command)
(lyskom-xemacs-or-gnu
nil
(when (and (eq command 'mouse-drag-region)
unread-command-events
(eventp (car unread-command-events))
(eq (lyskom-event-type
(car unread-command-events)) 'mouse-2))
(let* ((sequence (vector (car unread-command-events)))
(command (or (lookup-key (current-local-map)
sequence)
(lookup-key global-map sequence))))
(setq unread-command-events (cdr unread-command-events))
(when (commandp command)
(call-interactively command))))))
(defun kom-toggle-mark-as-read-prefix () (defun kom-toggle-mark-as-read-prefix ()
"Read one key sequence and run one command with state of "Read one key sequence and run one command with state of
kom-review-marks-texts-as-read toggled."