Commit d746cd93 authored by Ulrik Haugen's avatar Ulrik Haugen
Browse files

Flaggor på aux-items i edit-buffern blir kvar om man ändrar

mottagartyp på, adderar eller subtraherar mottagare i buffern.
parent 65cba0e1
......@@ -361,7 +361,9 @@ return non-nil if the item is to be included in the list."
(concat "P" (match-string 1)))))
(defun lyskom-edit-insert-cross-reference (item pers)
(lyskom-print-cross-reference item nil pers))
(concat
(lyskom-print-cross-reference item nil pers)
(lyskom-edit-generate-aux-item-flags (aux-item->flags item))))
(defun lyskom-print-cross-reference (item &optional obj pers)
(let ((pers (if (and (zerop (aux-item->creator item))
......@@ -431,7 +433,9 @@ return non-nil if the item is to be included in the list."
(lyskom-aux-item-terminating-button item obj)))
(defun lyskom-edit-insert-no-comments (item &optional obj)
(lyskom-format 'no-comments-edit-aux))
(concat
(lyskom-format 'no-comments-edit-aux)
(lyskom-edit-generate-aux-item-flags (aux-item->flags item))))
(defun lyskom-parse-personal-comments ()
(and (looking-at (lyskom-get-string 'personal-comment-regexp))
......@@ -442,7 +446,9 @@ return non-nil if the item is to be included in the list."
(lyskom-aux-item-terminating-button item obj)))
(defun lyskom-edit-insert-personal-comments (item &optional obj)
(lyskom-format 'personal-comment-edit-aux))
(concat
(lyskom-format 'personal-comment-edit-aux)
(lyskom-edit-generate-aux-item-flags (aux-item->flags item))))
(defun lyskom-parse-request-confirmation ()
(and (looking-at (lyskom-get-string 'request-confirmation-regexp))
......@@ -454,7 +460,9 @@ return non-nil if the item is to be included in the list."
(lyskom-aux-item-terminating-button item obj)))
(defun lyskom-edit-insert-request-confirmation (item &optional obj)
(lyskom-format 'request-confirmation-edit-aux))
(concat
(lyskom-format 'request-confirmation-edit-aux)
(lyskom-edit-generate-aux-item-flags (aux-item->flags item))))
(defun lyskom-request-confirmation-action (text-stat)
(let ((confirmations (text-stat-find-aux text-stat 7))
......
......@@ -1407,7 +1407,7 @@ RECPT-TYPE is the type of recipient to add."
(delete-region (point) (save-excursion (forward-line 1) (point)))))
(defun lyskom-edit-insert-aux-item-flags (flags)
(defun lyskom-edit-generate-aux-item-flags (flags)
(save-excursion
(let ((str (mapconcat 'identity
(delq nil
......@@ -1420,9 +1420,11 @@ RECPT-TYPE is the type of recipient to add."
(lyskom-get-string 'inherit-aux-flag))))
", ")))
(when (not (string= str ""))
(end-of-line)
(insert (format " [%s]" str))))))
(format " [%s]" str)))))
(defun lyskom-edit-insert-aux-item-flags (flags)
(end-of-line)
(insert (lyskom-edit-generate-aux-item-flags flags)))
(defun lyskom-edit-toggle-aux-item-flag (buf arg text flag)
(beginning-of-line)
......
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