Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv31514
Modified Files:
misc-commands.lisp
Log Message:
Linebreaks in docstrings.
--- /project/climacs/cvsroot/climacs/misc-commands.lisp 2006/05/06 19:51:04 1.11
+++ /project/climacs/cvsroot/climacs/misc-commands.lisp 2006/05/14 07:14:17 1.12
@@ -30,7 +30,10 @@
(define-command (com-overwrite-mode :name t :command-table editing-table) ()
"Toggle overwrite mode for the current mode.
-When overwrite is on, an object entered on the keyboard will replace the object after the point. When overwrite is off (the default), objects are inserted at point. In both cases point is positioned after the new object."
+When overwrite is on, an object entered on the keyboard
+will replace the object after the point.
+When overwrite is off (the default), objects are inserted at point.
+In both cases point is positioned after the new object."
(with-slots (overwrite-mode) (current-window)
(setf overwrite-mode (not overwrite-mode))))
@@ -40,7 +43,9 @@
(define-command (com-not-modified :name t :command-table buffer-table) ()
"Clear the modified flag for the current buffer.
-The modified flag is automatically set when the contents of the buffer are changed. This flag is consulted, for instance, when deciding whether to prompt you to save the buffer before killing it."
+The modified flag is automatically set when the contents
+of the buffer are changed. This flag is consulted, for instance,
+when deciding whether to prompt you to save the buffer before killing it."
(setf (needs-saving (buffer (current-window))) nil))
(set-key 'com-not-modified
@@ -50,7 +55,10 @@
(define-command (com-set-fill-column :name t :command-table fill-table)
((column 'integer :prompt "Column Number:"))
"Set the fill column to the specified value.
-You must supply a numeric argument. The fill column is the column beyond which automatic line-wrapping will occur. The default fill column is 70."
+You must supply a numeric argument. The fill column is
+the column beyond which automatic line-wrapping will occur.
+
+The default fill column is 70."
(set-fill-column column))
(set-key `(com-set-fill-column ,*numeric-argument-marker*)
@@ -123,7 +131,8 @@
((count 'integer :prompt "Number of Objects")
(killp 'boolean :prompt "Kill?"))
"Delete the object after point.
-With a numeric argument, kill that many objects after (or before, if negative) point."
+With a numeric argument, kill that many objects
+after (or before, if negative) point."
(let* ((point (point (current-window)))
(mark (clone-mark point)))
(forward-object mark count)
@@ -146,7 +155,8 @@
((count 'integer :prompt "Number of Objects")
(killp 'boolean :prompt "Kill?"))
"Delete the object before point.
-With a numeric argument, kills that many objects before (or after, if negative) point."
+With a numeric argument, kills that many objects
+before (or after, if negative) point."
(let* ((point (point (current-window)))
(mark (clone-mark point)))
(backward-object mark count)
@@ -161,7 +171,7 @@
'(#\Backspace))
(define-command (com-zap-to-object :name t :command-table deletion-table) ()
- "Prompt for an object and kill the objects between point and the next occurence of that object after point.
+ "Prompt for an object and kill to the next occurence of that object after point.
Characters can be entered in #\ format."
(let* ((item (handler-case (accept 't :prompt "Zap to Object")
(error () (progn (beep)
@@ -174,8 +184,10 @@
(delete-range current-point (- (offset item-mark) current-offset))))
(define-command (com-zap-to-character :name t :command-table deletion-table) ()
- "Prompt for a character and kill the objects between point and the next occurence of that character after point.
-FIXME: Accepts a string (that is, zero or more characters) terminated by a #\NEWLINE. If a zero length string signals an error. If a string of length >1, uses the first character of the string."
+ "Prompt for a character and kill to the next occurence of that character after point.
+FIXME: Accepts a string (that is, zero or more characters)
+terminated by a #\NEWLINE. If a zero length string signals an error.
+If a string of length >1, uses the first character of the string."
(let* ((item-string (handler-case (accept 'string :prompt "Zap to Character") ; Figure out how to get #\d and d. (or 'string 'character)?
(error () (progn (beep)
(display-message "Not a valid string. ")
@@ -206,8 +218,13 @@
(define-command (com-transpose-objects :name t :command-table editing-table) ()
"Transpose the objects before and after point, advancing point.
-At the end of a line transpose the previous two objects without advancing point. At the beginning of the buffer do nothing. At the beginning of any line other than the first effectively move the first object of that line to the end of the previous line.
-FIXME: at the end of a single object line at the beginning of the buffer deletes that object."
+At the end of a line transpose the previous two objects without
+advancing point. At the beginning of the buffer do nothing.
+At the beginning of any line other than the first effectively
+move the first object of that line to the end of the previous line.
+
+FIXME: at the end of a single object line at the beginning of
+the buffer deletes that object."
(transpose-objects (point (current-window))))
(set-key 'com-transpose-objects
@@ -217,7 +234,8 @@
(define-command (com-backward-object :name t :command-table movement-table)
((count 'integer :prompt "Number of Objects"))
"Move point backward one object.
-With a numeric argument, move point backward (or forward, if negative) that number of objects."
+With a numeric argument, move point backward (or forward, if negative)
+that number of objects."
(backward-object (point (current-window)) count))
(set-key `(com-backward-object ,*numeric-argument-marker*)
@@ -231,7 +249,8 @@
(define-command (com-forward-object :name t :command-table movement-table)
((count 'integer :prompt "Number of Objects"))
"Move point forward one object.
-With a numeric argument, move point forward (or backward, if negative) that number of objects."
+With a numeric argument, move point forward (or backward, if negative)
+that number of objects."
(forward-object (point (current-window)) count))
(set-key `(com-forward-object ,*numeric-argument-marker*)
@@ -267,8 +286,14 @@
(define-command (com-transpose-words :name t :command-table editing-table) ()
"Transpose the words around point, leaving point at the end of them.
-With point in the whitespace between words, transpose the words before and after point. With point inside a word, transpose that word with the next one. With point before the first word of the buffer, transpose the first two words of the buffer.
-FIXME: with point after the penultimate word of the buffer, or if there are <2 words in the buffer, Strange Things (TM) happen (including breaking Climacs)."
+With point in the whitespace between words, transpose the words before
+and after point. With point inside a word, transpose that word with
+the next one. With point before the first word of the buffer, transpose
+the first two words of the buffer.
+
+FIXME: with point after the penultimate word of the buffer,
+or if there are <2 words in the buffer, Strange Things (TM)
+happen (including breaking Climacs)."
(transpose-words (point (current-window))))
(set-key 'com-transpose-words
@@ -299,7 +324,9 @@
(define-command (com-transpose-lines :name t :command-table editing-table) ()
"Transpose current line and previous line, leaving point at the end of them.
-If point is in the first line, transpose the first two lines. If point is in the last line of the buffer and there is no final #\Newline, add one."
+If point is in the first line, transpose the first two lines.
+If point is in the last line of the buffer and there is no
+final #\Newline, add one."
(transpose-lines (point (current-window))))
(set-key 'com-transpose-lines
@@ -309,7 +336,8 @@
(define-command (com-previous-line :name t :command-table movement-table)
((numarg 'integer :prompt "How many lines?"))
"Move point to the previous line.
-With a numeric argument, move point up (down, if negative) that many lines. Successive line movement commands seek to respect the 'goal column'."
+With a numeric argument, move point up (down, if negative) that many lines.
+Successive line movement commands seek to respect the 'goal column'."
(let* ((window (current-window))
(point (point window)))
(unless (or (eq (previous-command window) 'com-previous-line)
@@ -330,7 +358,8 @@
(define-command (com-next-line :name t :command-table movement-table)
((numarg 'integer :prompt "How many lines?"))
"Move point to the next line.
-With a numeric argument, move point down (up, if negative) that many lines. Successive line movement commands seek to respect the 'goal column'."
+With a numeric argument, move point down (up, if negative) that many lines.
+Successive line movement commands seek to respect the 'goal column'."
(let* ((window (current-window))
(point (point window)))
(unless (or (eq (previous-command window) 'com-previous-line)
@@ -390,7 +419,12 @@
((numarg 'integer :prompt "Kill how many lines?")
(numargp 'boolean :prompt "Kill entire lines?"))
"Kill the objects on the current line after point.
-When at the end of a line, kill the #\Newline. With a numeric argument of 0, kill the objects on the current line before point. With a non-zero numeric argument, kill that many lines forward (backward, if negative) from point. Successive kills append to the kill ring."
+When at the end of a line, kill the #\\Newline.
+With a numeric argument of 0, kill the objects on the current line before point.
+With a non-zero numeric argument, kill that many lines forward (backward,
+if negative) from point.
+
+Successive kills append to the kill ring."
(let* ((pane (current-window))
(point (point pane))
(concatenate-p (eq (previous-command pane) 'com-kill-line)))
@@ -403,7 +437,8 @@
(define-command (com-forward-word :name t :command-table movement-table)
((count 'integer :prompt "Number of words"))
"Move point to the next word end.
-With a numeric argument, move point forward (backward, if negative) that many words."
+With a numeric argument, move point forward (backward, if negative)
+that many words."
(if (plusp count)
(forward-word (point (current-window)) count)
(backward-word (point (current-window)) (- count))))
@@ -419,7 +454,8 @@
(define-command (com-backward-word :name t :command-table movement-table)
((count 'integer :prompt "Number of words"))
"Move point to the previous word beginning.
-With a numeric argument, move point backward (forward, if negative) that many words."
+With a numeric argument, move point backward (forward, if negative)
+that many words."
(backward-word (point (current-window)) count))
(set-key `(com-backward-word ,*numeric-argument-marker*)
@@ -459,7 +495,10 @@
(define-command (com-kill-word :name t :command-table deletion-table)
((count 'integer :prompt "Number of words"))
"Kill from point until the next word end.
-With a numeric argument, kill forward (backward, if negative) that many words. Successive kills append to the kill ring."
+With a numeric argument, kill forward (backward, if negative)
+that many words.
+
+Successive kills append to the kill ring."
(let* ((pane (current-window))
(point (point pane))
(concatenate-p (eq (previous-command pane) 'com-kill-word)))
@@ -472,7 +511,10 @@
(define-command (com-backward-kill-word :name t :command-table deletion-table)
((count 'integer :prompt "Number of words"))
"Kill from point until the previous word beginning.
-With a numeric argument, kill backward (forward, if negative) that many words. Successive kills append to the kill ring."
+With a numeric argument, kill backward (forward, if negative)
+that many words.
+
+Successive kills append to the kill ring."
(let* ((pane (current-window))
(point (point pane))
(concatenate-p (eq (previous-command pane) 'com-backward-kill-word)))
@@ -485,7 +527,11 @@
(define-command (com-mark-word :name t :command-table marking-table)
((count 'integer :prompt "Number of words"))
"Place mark at the next word end.
-With a positive numeric argument, place mark at the end of that many words forward. With a negative numeric argument, place mark at the beginning of that many words backward. Successive invocations extend the selection."
+With a positive numeric argument, place mark at the end of
+that many words forward. With a negative numeric argument,
+place mark at the beginning of that many words backward.
+
+Successive invocations extend the selection."
(let* ((pane (current-window))
(point (point pane))
(mark (mark pane)))
@@ -540,7 +586,12 @@
(define-command (com-capitalize-word :name t :command-table case-table) ()
"Capitalize the next word.
-If point is in a word, convert the next character to upper case and the remaining letters in the word to lower case. If point is before the start of a word, convert the first character of that word to upper case and the rest of the letters to lower case. Leave point at the word end."
+If point is in a word, convert the next character to
+upper case and the remaining letters in the word to lower case.
+If point is before the start of a word, convert the first character
+of that word to upper case and the rest of the letters to lower case.
+
+Leave point at the word end."
(capitalize-word (point (current-window))))
(set-key 'com-capitalize-word
@@ -625,7 +676,11 @@
(define-command (com-delete-indentation :name t :command-table indent-table) ()
"Join current line to previous non-blank line.
-Leaves a single space between the last non-whitespace object of the previous line and the first non-whitespace object of the current line, and point after that space. If there is no previous non-blank line, deletes all whitespace at the beginning of the buffer at leaves point there."
+Leaves a single space between the last non-whitespace object
+of the previous line and the first non-whitespace object of
+the current line, and point after that space. If there is no
+previous non-blank line, deletes all whitespace at the
+beginning of the buffer at leaves point there."
(delete-indentation (point (current-window))))
(set-key 'com-delete-indentation
@@ -772,6 +827,7 @@
((count 'integer :prompt "Number of spaces"))
"Delete whitespace around point, leaving a single space.
With a positive numeric argument, leave that many spaces.
+
FIXME: should distinguish between types of whitespace."
(just-one-space (point (current-window)) count))
@@ -805,7 +861,10 @@
(define-command (com-goto-line :name t :command-table movement-table) ()
"Prompts for a line number, and sets point to the beginning of that line.
-The first line of the buffer is 1. Giving a number <1 leaves point at the beginning of the buffer. Giving a line number larger than the number of the last line in the buffer leaves point at the beginning of the last line of the buffer."
+The first line of the buffer is 1. Giving a number <1 leaves
+point at the beginning of the buffer. Giving a line number
+larger than the number of the last line in the buffer leaves
+point at the beginning of the last line of the buffer."
(goto-line (point (current-window))
(handler-case (accept 'integer :prompt "Goto Line")
(error () (progn (beep)
@@ -903,7 +962,9 @@
(define-command (com-rotate-yank :name t :command-table editing-table) ()
"Replace the immediately previously yanked objects with others.
-Must be given immediately following a Yank or Rotate Yank command. The replacement objects are those before the previously yanked objects in the kill ring."
+Must be given immediately following a Yank or Rotate Yank command.
+The replacement objects are those before the previously yanked
+objects in the kill ring."
(let* ((pane (current-window))
(point (point pane))
(last-yank (kill-ring-yank *kill-ring*)))
@@ -971,7 +1032,9 @@
(define-command (com-dabbrev-expand :name t :command-table editing-table) ()
"Expand word before point dynamically.
-Search from point (first backward to the beginning of the buffer, then forward) for words for which the word before point is a prefix, inserting each in turn at point as an expansion."
+Search from point (first backward to the beginning of the buffer,
+then forward) for words for which the word before point is a prefix,
+inserting each in turn at point as an expansion."
(let* ((window (current-window))
(point (point window)))
(with-slots (original-prefix prefix-start-offset dabbrev-expansion-mark) window
@@ -1015,7 +1078,8 @@
(define-command (com-backward-paragraph :name t :command-table movement-table)
((count 'integer :prompt "Number of paragraphs"))
"Move point to the previous paragraph start.
-With a numeric argument, move point backward (forward, if negative) that many paragraphs."
+With a numeric argument, move point backward (forward, if negative)
+that many paragraphs."
(let* ((pane (current-window))
(point (point pane))
(syntax (syntax (buffer pane))))
@@ -1030,7 +1094,8 @@
(define-command (com-forward-paragraph :name t :command-table movement-table)
((count 'integer :prompt "Number of paragraphs"))
"Move point to the next paragraph end.
-With a numeric argument, move point forward (backward, if negative) that many paragraphs."
+With a numeric argument, move point forward (backward, if negative)
+that many paragraphs."
(let* ((pane (current-window))
(point (point pane))
(syntax (syntax (buffer pane))))
@@ -1045,7 +1110,13 @@
(define-command (com-mark-paragraph :name t :command-table marking-table)
((count 'integer :prompt "Number of paragraphs"))
"Place point and mark around the current paragraph.
-Put point at the beginning of the current paragraph, and mark at the end. With a positive numeric argument, put mark that many paragraphs forward. With a negative numeric argument, put point at the end of the current paragraph and mark that many paragraphs backward. Successive invocations extend the selection.
+Put point at the beginning of the current paragraph, and mark at the end.
+With a positive numeric argument, put mark that many paragraphs forward.
+With a negative numeric argument, put point at the end of the current
+paragraph and mark that many paragraphs backward.
+
+Successive invocations extend the selection.
+
FIXME: when called with point already at the beginning or end of a paragraph marks 2 paras."
(let* ((pane (current-window))
(point (point pane))
@@ -1067,7 +1138,8 @@
(define-command (com-backward-sentence :name t :command-table movement-table)
((count 'integer :prompt "Number of sentences"))
"Move point to the previous sentence beginning.
-With a numeric argument, move point backward (forward if negative) that many sentences."
+With a numeric argument, move point backward (forward if negative)
+that many sentences."
(let* ((pane (current-window))
(point (point pane))
(syntax (syntax (buffer pane))))
@@ -1082,7 +1154,8 @@
(define-command (com-forward-sentence :name t :command-table movement-table)
((count 'integer :prompt "Number of sentences"))
"Move point to the next sentence end.
-With a numeric argument, move point forward (backward if negative) that many sentences."
+With a numeric argument, move point forward (backward if negative)
+that many sentences."
(let* ((pane (current-window))
(point (point pane))
(syntax (syntax (buffer pane))))
@@ -1097,7 +1170,8 @@
(define-command (com-kill-sentence :name t :command-table deletion-table)
((count 'integer :prompt "Number of sentences"))
"Kill the objects from point to the next sentence end.
-With a numeric argument, kill forward (backward if negative) that many sentences."
+With a numeric argument, kill forward (backward if negative)
+that many sentences."
(let* ((pane (current-window))
(point (point pane))
(mark (clone-mark point))
@@ -1115,7 +1189,8 @@
(define-command (com-backward-kill-sentence :name t :command-table deletion-table)
((count 'integer :prompt "Number of sentences"))
"Kill the objects from point to the previous sentence beginning.
-With a numeric argument, kill backward (forward if negative) that many sentences."
+With a numeric argument, kill backward (forward if negative)
+that many sentences."
(let* ((pane (current-window))
(point (point pane))
(mark (clone-mark point))
@@ -1139,7 +1214,11 @@
(define-command (com-forward-page :name t :command-table movement-table)
((count 'integer :prompt "Number of pages"))
"Move point to the beginning of the next page.
-With a numeric argument, move point forward (backward if negative) that many pages. When no page delimeter is found, leave point at the end of the buffer. A page is delimited by the sequence #\Newline #\Page."
+With a numeric argument, move point forward (backward if negative)
+that many pages. When no page delimeter is found, leave point at the
+ end of the buffer.
+
+A page is delimited by the sequence #\Newline #\Page."
(let* ((pane (current-window))
(point (point pane)))
(if (plusp count)
@@ -1160,7 +1239,11 @@
(define-command (com-backward-page :name t :command-table movement-table)
((count 'integer :prompt "Number of pages"))
"Move point to the end of the previous page.
-With a numeric argument, move point backward (forward if negative) that many pages. When no page delimeter is found, leave point at the beginning of the buffer. A page is delimited by the sequence #\Newline #\Page."
+With a numeric argument, move point backward (forward if negative)
+that many pages. When no page delimeter is found, leave point at the
+beginning of the buffer.
+
[180 lines skipped]