Commit 890a066a authored by Johan Sundström's avatar Johan Sundström
Browse files

Negative prefix arguments to functions wanting a text-no now find that

text-no from the arg:th message before point in the kom buffer.
parent 61a86f67
2000-04-29 Johan Sundstrm <>
* utilities.el: (lyskom-read-text-no-prefix-arg): negative prefix
arguments are now interpreted as a reference to the text-no `arg'
messages up in the kom buffer.
* commands1.el (kom-view-commented-text): Now uses
lyskom-read-text-no-prefix-arg to optionally override text-no via
prefix arguments instead of the current text.
* review.el (kom-review-noconversion): Same here.
* swedish-strings.el (lyskom-message): Added strings
review-noconversion-q and review-commented-q to accomodate for
the above functions.
2000-04-01 David Byers <>
* mship-edit.el (lp--calculate-distance): Fix problem when
......@@ -454,14 +454,27 @@ The value is actually the element of LIST whose car equals KEY."
(defun lyskom-read-text-no-prefix-arg (prompt &optional always-read)
"Call in interactive list to read text-no.
If optional argument ALWAYS-READ is non-nil the user is prompted if
an explicit prefix argument was not given."
an explicit prefix argument was not given. A positive prefix argument
is interpreted as a text-no, whereas a negative prefix argument will
try to find the text-no of the text `arg' messages above point from
the current kom buffer."
((null current-prefix-arg)
(if always-read
((null current-prefix-arg)
(if always-read
(lyskom-read-number prompt lyskom-current-text)
((integerp current-prefix-arg) current-prefix-arg)
((listp current-prefix-arg)
((or (integerp current-prefix-arg)
(eq '- current-prefix-arg))
(let ((current-prefix-arg
(if (eq '- current-prefix-arg) -1 current-prefix-arg)))
(if (> current-prefix-arg 0)
(backward-text (- 1 current-prefix-arg))
(buffer-substring (point)
(search-forward " ")))))))
((listp current-prefix-arg)
(lyskom-read-number prompt (lyskom-text-at-point)))
(t (lyskom-error (lyskom-get-string 'bad-text-no-prefix)
Supports Markdown
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