Commit 7a9c872e authored by David Byers's avatar David Byers
Browse files

Fixed bug 755 (for footnotes too) and improved the read-only marking of the...

Fixed bug 755 (for footnotes too) and improved the read-only marking of the separator line in the edit buffer

Detailed changes:
> 	Like bug 755 but for footnotes:
> 	* utilities.el (lyskom-maybe-get-footnoted-text): New function.
>
> 	* vars.el.in (kom-pick-text-no-strategy-alist): Added better
> 	default for kom-sub-footnote.
>
> 	* commands1.el (kom-sub-comment): Print a message when there are
> 	no comments to the text rather than continue.
> 	(kom-sub-footnote): Ditto, for footnotes.
>
> 	Fix bug 755:
> 	* utilities.el (lyskom-maybe-get-commented-text): New function.
>
> 	* vars.el.in (kom-pick-text-no-strategy-alist): Added defaults for
> 	kom-sub-comment.
>
> 	* edit-text.el (lyskom-edit-insert-miscs): Make the read-only
> 	marking on the separator non-sticky at the end.
>
parent 14fbab3e
2003-07-27 David Byers <byers@lysator.liu.se>
Like bug 755 but for footnotes:
* utilities.el (lyskom-maybe-get-footnoted-text): New function.
* vars.el.in (kom-pick-text-no-strategy-alist): Added better
default for kom-sub-footnote.
* commands1.el (kom-sub-comment): Print a message when there are
no comments to the text rather than continue.
(kom-sub-footnote): Ditto, for footnotes.
Fix bug 755:
* utilities.el (lyskom-maybe-get-commented-text): New function.
* vars.el.in (kom-pick-text-no-strategy-alist): Added defaults for
kom-sub-comment.
* edit-text.el (lyskom-edit-insert-miscs): Make the read-only
marking on the separator non-sticky at the end.
Fix bug 747:
* commands2.el (lyskom-status-pers-list-one-membership): New
function.
......
......@@ -3998,8 +3998,11 @@ hard to understand.
This command accepts text number prefix arguments (see
`lyskom-read-text-no-prefix-arg')."
(interactive (list (lyskom-read-text-no-prefix-arg 'text-to-delete-comment-from)))
(lyskom-add-sub-comment text-no-arg
nil))
(if (lyskom-misc-infos-from-list
'COMM-IN (text-stat->misc-info-list
(blocking-do 'get-text-stat text-no-arg)))
(lyskom-add-sub-comment text-no-arg nil)
(lyskom-format-insert 'text-has-no-comments text-no-arg)))
(defun lyskom-add-sub-comment (text-no do-add)
"Get the number of the text that is going to have a comment added to it or
......@@ -4062,8 +4065,12 @@ hard to understand.
This command accepts text number prefix arguments (see
`lyskom-read-text-no-prefix-arg')."
(interactive (list (lyskom-read-text-no-prefix-arg 'text-to-delete-footnote-from)))
(lyskom-add-sub-footnote text-no-arg
nil))
(if (lyskom-misc-infos-from-list
'FOOTN-IN (text-stat->misc-info-list
(blocking-do 'get-text-stat text-no-arg)))
(lyskom-add-sub-footnote text-no-arg nil)
(lyskom-format-insert 'text-has-no-footnotes text-no-arg)))
(defun lyskom-add-sub-footnote (text-no do-add)
"Get the number of the text that is going to have a footnote added to it or
......
......@@ -251,7 +251,8 @@ nil -> Ingenting."
(lyskom-get-string 'header-separator))
body
(lyskom-get-string 'header-subject)
`(read-only t))
`(read-only t)
`(read-only t rear-nonsticky t end-open t))
where-put-misc)
(set-buffer edit-buffer)
(goto-char where-put-misc)
......@@ -1513,6 +1514,7 @@ to lyskom-edit-replace-headers"
"Replace all headers with SUBJECT and MISC-LIST"
(save-excursion
(let ((start nil)
(inhibit-read-only t)
(end nil))
(goto-char (point-min))
(setq start (point-marker))
......
......@@ -920,7 +920,7 @@ Text %#1n has more than one root but only one of the trees will be shown.\n")
Post: \\[kom-edit-send], \
Kill: \\[kom-edit-quit], \
Help: \\[describe-mode] ---")
(text-mass . "%#4s%#1s\n%[%#5@%#2s%]\n%#3s")
(text-mass . "%#4s%#1s\n%[%#5@%#2s%]%[%#6@\n%]%#3s")
(comment-to-by . "%#1s to text %#2n%#3s.\n")
(already-sent . "You have already posted this text. Post it anyway? ")
(subject . "Subject: ")
......@@ -1929,6 +1929,9 @@ environment to one that uses \"%#2s\" to encode text.
(set-message-flag-for-conf . "Sett message flag for which conference? ")
(set-message-flag-to-what . "Receive grupp messages to %#1M? ")
(setting-message-flag . "%#1?b%[Enabling%]%[Disabling%] reception of group messages to %#2M...")
(text-has-no-comments . "Text %#1n has no comments\n")
(text-has-no-footnotes . "Text %#1n has no footnotes\n")
))
......
......@@ -952,7 +952,7 @@ M
Skicka in=\\[kom-edit-send], \
Avbryt=\\[kom-edit-quit], \
Annat se \\[describe-mode] ---")
(text-mass . "%#4s%#1s\n%[%#5@%#2s%]\n%#3s")
(text-mass . "%#4s%#1s\n%[%#5@%#2s%]%[%#6@\n%]%#3s")
(comment-to-by . "%#1s till text %#2n%#3s.\n")
(already-sent . "Du har redan skickat denna text en gng. Snd nd? ")
(subject . "rende: ")
......@@ -1963,6 +1963,9 @@ teckenkodning.
(set-message-flag-for-conf . "ndra meddelandeflagga fr vilket mte? ")
(set-message-flag-to-what . "Vill du ta emot gruppmeddelanden till %#1M? ")
(setting-message-flag . "%#1?b%[Slr p%]%[Stnger av%] mottagning av gruppmeddelanden till %#2M...")
(text-has-no-comments . "Inlgg %#1n har inga kommentarer\n")
(text-has-no-footnotes . "Inlgg %#1n har inga fotnoter\n")
))
(lyskom-language-var local lyskom-month-names sv
......
......@@ -651,10 +651,29 @@ non-negative integer and 0 means the given text-no."
(setq ancestors (cdr ancestors)))
result)))
(defun lyskom-maybe-get-commented-text (&optional arg p d c)
(let* ((text-no (lyskom-text-at-point))
(text-stat (and text-no (blocking-do 'get-text-stat text-no))))
(when text-no
(if (lyskom-misc-infos-from-list
'COMM-IN (text-stat->misc-info-list text-stat))
text-no
(lyskom-get-text-at-point-ancestor 1 p d c)))))
(defun lyskom-maybe-get-footnoted-text (&optional arg p d c)
(let* ((text-no (lyskom-text-at-point))
(text-stat (and text-no (blocking-do 'get-text-stat text-no))))
(when text-no
(if (lyskom-misc-infos-from-list
'FOOTN-IN (text-stat->misc-info-list text-stat))
text-no
(lyskom-get-text-at-point-ancestor 1 p d c)))))
(defun lyskom-get-explicit-text (arg &optional prompt default constraint) arg)
;; NOTUSED: lyskom-get-command-specified-default-text
(defun lyskom-get-command-specified-default-text (a p def &optional c) def)
(defun lyskom-get-command-specified-default-text (a p def &optional c)
def)
(defun lyskom-get-last-read-text (&optional arg prompt default constraint)
(lyskom-default-value 'lyskom-current-text))
......
......@@ -211,6 +211,10 @@ the priority among links that match the same text is undefined."
(nil . lyskom-get-previous-text)))
(kom-private-answer-previous . ((t . lyskom-get-previous-text)
(nil . lyskom-get-previous-text)))
(kom-sub-comment . ((t . lyskom-maybe-get-commented-text)
(nil . lyskom-maybe-get-commented-text)))
(kom-sub-footnote . ((t . lyskom-maybe-get-footnoted-text)
(nil . lyskom-maybe-get-footnoted-text)))
(t . ((t . lyskom-get-text-at-point) ; default for prompts
(nil . lyskom-get-text-at-point) ; no prefix arg
(0 . lyskom-prompt-for-text-no)
......
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