4.3BSD/usr/contrib/emacs/lisp/paragraphs.elc


(defun forward-paragraph (&optional arg) "\
Move forward to end of paragraph.  With arg, do it arg times.
A line which  paragraph-start  matches either separates paragraphs
(if  paragraph-separate  matches it also) or is the first line of a paragraph.
A paragraph end is the beginning of a line which is not part of the paragraph
to which the end of the previous line belongs, or the end of the buffer." (interactive "p") (byte-code "ň	lj

\"?
!	&	R'W!?=`Se]#D
! o?S!]!K 
j
\"? o?!?	!!mo?
#!!`Zf=!łebT(V& m?!!ň

\"?m?!?	!!
#!bdbS*" [arg fill-prefix-regexp fill-prefix paragraph-separate t nil paragraph-start 1 equal "" regexp-quote "\\|^" "[ 	]*$" 0 looking-at re-search-backward "^
" forward-char -1 beginning-of-line forward-line end-of-line 2 10 re-search-forward match-beginning] 30))

(defun backward-paragraph (&optional arg) "\
Move backward to start of paragraph.  With arg, do it arg times.
A paragraph start is the beginning of a line which is a first-line-of-paragraph
or which is ordinary text and follows a paragraph-separating line; except:
if the first real line of a paragraph is preceded by a blank line,
the paragraph starts at that blank line.
See forward-paragraph for more information." (interactive "p") (byte-code "	‰[!" [arg nil 1 forward-paragraph] 2))

(defun mark-paragraph nil "\
Put point at beginning of this paragraph, mark at end." (interactive) (byte-code "!`s!" [nil forward-paragraph 1 backward-paragraph] 3))

(defun kill-paragraph (arg) "\
Kill to end of paragraph." (interactive "p") (byte-code "`!`\"" [arg nil kill-region forward-paragraph] 4))

(defun backward-kill-paragraph (arg) "\
Kill back to start of paragraph." (interactive "p") (byte-code "`!`\"" [arg nil kill-region backward-paragraph] 4))

(defun transpose-paragraphs (arg) "\
Interchange this (or next) paragraph with previous one." (interactive "p") (byte-code "\"" [arg nil transpose-subr forward-paragraph] 3))

(defun start-of-paragraph-text nil (byte-code "`!`!`Y(	b	eV$ %‚)*" [opoint npoint nil forward-paragraph -1 skip-chars-forward " 	
" start-of-paragraph-text] 4))

(defun end-of-paragraph-text nil (byte-code "`!h=!ƈ`X-!`dW) *Ƃ.)" [opoint forward-paragraph 1 10 forward-char -1 nil end-of-paragraph-text] 5))

(defun forward-sentence (&optional arg) "\
Move forward to next sentence-end.  With argument, repeat.
With negative argument, move backward repeatedly to sentence-beginning.
Sentence ends are identified by the value of sentence-end
treated as a regular expression.  Also, every paragraph boundary
terminates sentences as well." (interactive "p") (byte-code "ň	ƉW5 `)
P	#)!Sb+	b)T
V] `)
#Q!Sb)S6" [arg par-beg sentence-end t par-end nil 1 0 start-of-paragraph-text re-search-backward "[^ 	
]" match-end end-of-paragraph-text re-search-forward skip-chars-backward " 	
"] 9))

(defun backward-sentence (&optional arg) "\
Move backward to start of sentence.  With arg, do it arg times.
See forward-sentence for more information." (interactive "p") (byte-code "	‰[!" [arg nil 1 forward-sentence] 2))

(defun kill-sentence (&optional arg) "\
Kill from point to end of sentence.
With arg, repeat, or backward if negative arg." (interactive "p") (byte-code "ˆ`	!`\")" [beg arg nil forward-sentence kill-region] 4))

(defun backward-kill-sentence (&optional arg) "\
Kill back from point to start of sentence.
With arg, repeat, or forward if negative arg." (interactive "p") (byte-code "ˆ`	!`\")" [beg arg nil backward-sentence kill-region] 4))

(defun mark-end-of-sentence (arg) "\
Put mark at end of sentence.  Arg works as in forward-sentence." (interactive "p") (byte-code "Š!`)!" [arg nil push-mark forward-sentence] 3))

(defun transpose-sentences (arg) "\
Interchange this (next) and previous sentence." (interactive "p") (byte-code "\"" [arg nil transpose-subr forward-sentence] 3))