Commit 958ed55e authored by David Byers's avatar David Byers
Browse files

Add/remove footnote

parent c2a5e107
1999-06-22 David Byers <davby@ida.liu.se>
Add/remove footnotes
* commands1.el (kom-sub-footnote): New function.
(lyskom-add-sub-footnote): New function.
(kom-add-footnote): New function.
1999-06-21 David Byers <davby@ida.liu.se>
* commands1.el (lyskom-sub-member): Become passive member the
......
......@@ -3034,7 +3034,49 @@ DO-ADD: NIL if a comment should be subtracted.
(blocking-do (if do-add 'add-comment 'sub-comment)
comment-text-no
text-no))))
(def-kom-command kom-add-footnote (text-no-arg)
"Add a text as a footnote to another text."
(interactive "P")
(lyskom-add-sub-footnote text-no-arg
(lyskom-get-string 'text-to-add-footnote-to)
t))
(def-kom-command kom-sub-footnote (text-no-arg)
"Remove a footnote from a text."
(interactive "P")
(lyskom-add-sub-footnote text-no-arg
(lyskom-get-string 'text-to-delete-footnote-from)
nil))
(defun lyskom-add-sub-footnote (text-no-arg prompt do-add)
"Get the number of the text that is going to have a footnote added to it or
subtracted from it
Arguments: TEXT-NO-ARG: an argument as it is gotten from (interactive P)
PROMPT: A string that is used when prompting for a number.
DO-ADD: NIL if a footnote should be subtracted.
Otherwise a footnote is added"
(let* ((text-no (lyskom-read-number prompt
(or text-no-arg lyskom-current-text)))
(footnote-text-no (lyskom-read-number
(lyskom-get-string
(if do-add
'text-to-add-footn-q
'text-to-remove-footn-q))
(if (eq text-no lyskom-current-text)
nil
lyskom-current-text))))
(lyskom-format-insert (if do-add 'add-footnote-to 'sub-footnote-to)
footnote-text-no
text-no)
(cache-del-text-stat text-no)
(cache-del-text-stat footnote-text-no)
(lyskom-report-command-answer
(blocking-do (if do-add 'add-footnote 'sub-footnote)
footnote-text-no
text-no))))
......
......@@ -336,6 +336,8 @@ du har l
(text-to-move . "Vilket inlgg vill du flytta: ")
(text-to-add-comment-to . "Vilket inlgg vill du addera en kommentar till:")
(text-to-delete-comment-from . "Vilket inlgg vill du subtrahera en kommentar frn:")
(text-to-add-footnote-to . "Vilket inlgg vill du addera en fotnot till:")
(text-to-delete-footnote-from . "Vilket inlgg vill du subtrahera en fotnot frn:")
(where-on-list-q . "Placering p listan? (0-%#1d) ")
(member-in-conf . "Bli medlem i %#1M...")
......@@ -414,8 +416,12 @@ i svensk datorhistoria. L
(moving-name . "Flyttar text %#3n frn %#1M till %#2M...")
(text-to-add-q . "Vilket inlgg vill du addera som kommentar? ")
(text-to-remove-q . "Vilket inlgg vill du subtrahera som kommentar? ")
(text-to-add-footn-q . "Vilket inlgg vill du addera som fotnot? ")
(text-to-remove-footn-q . "Vilket inlgg vill du subtrahera som fotnot? ")
(add-comment-to . "Adderar text %#1n som kommentar till text %#2n...") ;
(sub-comment-to . "Subtraherar text %#1n som kommentar till text %#2n...")
(add-footnote-to . "Adderar text %#1n som fotnot till text %#2n...") ;
(sub-footnote-to . "Subtraherar text %#1n som fotnot till text %#2n...")
(comment-keep-recpt-p ."Ska %#1s vara mottagare? ")
(comment-all-relevant-p . "Inlgget har flera mottagare. r alla relevanta? ")
(please-edit-recipients . "ndra mottagarlistan och skicka in inlgget igen.")
......@@ -1393,6 +1399,9 @@ Du m
(kom-add-faq . "Addera FAQ")
(kom-del-faq . "Ta bort FAQ")
(kom-review-faq . "terse FAQ")
(kom-add-footnote . "Addera fotnot")
(kom-sub-footnote . "Subtrahera fotnot")
))
(lyskom-language-var lyskom-language-codes sv
......
......@@ -1105,6 +1105,9 @@ Users are encouraged to use their best sense of humor."
kom-add-faq
kom-del-faq
kom-review-faq
kom-add-footnote
kom-sub-footnote
))
;;; ================================================================
......
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