From aea7ff5b8344e61a7556664b027b61488cab7d35 Mon Sep 17 00:00:00 2001 From: Denis Zheleztsov Date: Wed, 15 Aug 2018 14:25:17 +0300 Subject: [PATCH] Fix some errors --- idec-mode.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/idec-mode.el b/idec-mode.el index bdd2277..cd1e99c 100644 --- a/idec-mode.el +++ b/idec-mode.el @@ -240,8 +240,7 @@ optionaly return cursor to CHECKPOINT." ;; ii.test.14 (5)* (insert-button echo 'action (lambda (x) (idec-browse-local-echo (button-get x 'echo))) - 'echo echo - '(face nil)) + 'echo echo) (beginning-of-line) (setq start (point)) @@ -255,12 +254,12 @@ optionaly return cursor to CHECKPOINT." ")")) (setq unread (get-echo-unread-messages echo)) - (when (> unread 0) - (princ "*")) + ;; (when (> unread 0) + ;; (princ "*")) (princ " ") ;; [New message] button - (princ "\t[") + (princ " [") (insert-button "New message" 'action (lambda (x) (idec-new-message (button-get x 'echo))) 'echo echo) @@ -271,14 +270,15 @@ optionaly return cursor to CHECKPOINT." 'echo echo 'point (point)) (princ "]") + + ;; Unread messages count (when (> unread 0) (princ (concat " unread (" (number-to-string unread) ")"))) (princ "\n")) (message (concat "IDEC: FUUUUUU <" echo ">"))))) (when checkpoint (goto-char checkpoint))) - (idec-mode) - (add-text-properties (beginning-of-buffer) (end-of-buffer) 'read-only)) + (idec-mode)) (defun idec-browse-local-echo (&optional echo) "Get messages from local ECHO." @@ -306,8 +306,7 @@ optionaly return cursor to CHECKPOINT." (princ (make-string (- longest subj-length) ? )) (princ (concat " " (gethash "time" msg))) - (princ (concat "\t" (gethash "author" msg) "\n"))) - (add-text-properties (beginning-of-buffer) (end-of-buffer) 'read-only))) + (princ (concat "\t" (gethash "author" msg) "\n"))))) (idec))