;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:25:20 2007 ;;; from file /home/cyd/emacs/lisp/textmodes/paragraphs.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file contains multibyte non-ASCII characters ;;; and therefore cannot be loaded into Emacs 19. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "20"))) (error "`paragraphs.el' was compiled for Emacs 20 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305%\210\306\307\310\311#\207" [custom-declare-group paragraphs nil "Paragraph and sentence parsing." :group editing put use-hard-newlines permanent-local t] 6) #@108 Non-nil if Use-Hard-Newlines mode is enabled. Use the command `use-hard-newlines' to change this variable. (defvar use-hard-newlines nil (#$ . 772)) (make-variable-buffer-local 'use-hard-newlines) #@900 Minor mode to distinguish hard and soft newlines. When active, the functions `newline' and `open-line' add the text-property `hard' to newlines that they insert, and a line is only considered as a candidate to match `paragraph-start' or `paragraph-separate' if it follows a hard newline. Prefix argument says to turn mode on if positive, off if negative. When the mode is turned on, if there are newlines in the buffer but no hard newlines, ask the user whether to mark as hard any newlines preceeding a `paragraph-start' line. From a program, second arg INSERT specifies whether to do this; it can be `never' to change nothing, t or `always' to force marking, `guess' to try to do the right thing with no questions, nil or anything else to ask the user. Newlines not marked hard are called "soft", and are always internal to paragraphs. The fill functions insert and delete only soft newlines. (defalias 'use-hard-newlines #[(&optional arg insert) "\306=\203 ?\202%\203\307!\310V\202% \204\311\202%\312\313\301\"\210\314\211\203\231\n\311=\204^\n\315=\204^\n\316=\204\231\317ed\320\311$\204\231\212eb\210\321\322\314\311#)\203\231\n\323=\204^\324\325!\203\231\212eb\210\321\322\314\311#\203\230`\326 \210\327\f!\203{\330 S \"\210\327 !\203\224\330 S \"\210\314\210m\204\224\330``T\"\210)\202b)\331\332 \203\243\333\202\244\334\"\210\335 \203\270\312\336 \203\265\337\202\266\340\"\210\341 \210 \207" [arg use-hard-newlines insert pos paragraph-start paragraph-separate toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil always never text-property-any hard search-forward "\n" guess y-or-n-p "Make newlines between paragraphs hard? " move-to-left-margin looking-at set-hard-newline-properties run-hooks use-hard-newlines-hook use-hard-newlines-on-hook use-hard-newlines-off-hook called-interactively-p "Use-Hard-Newlines mode %sabled" "en" "dis" force-mode-line-update] 6 (#$ . 976) (list (or current-prefix-arg 'toggle))]) (byte-code "\300\301\302\303\304!\205 \304J#\207" [add-minor-mode use-hard-newlines nil boundp use-hard-newlines-map] 5) #@715 Regexp for beginning of a line that starts OR separates paragraphs. This regexp should match lines that separate paragraphs and should also match lines that start a paragraph (and are part of that paragraph). This is matched against the text at the left margin, which is not necessarily the beginning of the line, so it should never use "^" as an anchor. This ensures that the paragraph functions will work equally well within a region of text indented by a margin setting. The variable `paragraph-separate' specifies how to distinguish lines that start paragraphs from lines that separate them. If the variable `use-hard-newlines' is non-nil, then only lines following a hard newline are considered to match. (custom-declare-variable 'paragraph-start '"\f\\|[ ]*$" '(#$ . 3112) :group 'paragraphs :type 'regexp) #@386 Regexp for beginning of a line that separates paragraphs. If you change this, you may have to change `paragraph-start' also. This is matched against the text at the left margin, which is not necessarily the beginning of the line, so it should not use "^" as an anchor. This ensures that the paragraph functions will work equally within a region of text indented by a margin setting. (custom-declare-variable 'paragraph-separate '"[ \f]*$" '(#$ . 3937) :group 'paragraphs :type 'regexp) #@356 Non-nil means a single space does not end a sentence. This is relevant for filling. See also `sentence-end-without-period' and `colon-double-space'. This value is used by the function `sentence-end' to construct the regexp describing the end of a sentence, when the value of the variable `sentence-end' is nil. See Info node `(elisp)Standard Regexps'. (custom-declare-variable 'sentence-end-double-space 't '(#$ . 4433) :type 'boolean :group 'fill) #@340 Non-nil means a sentence will end without a period. For example, a sentence in Thai text ends with double space but without a period. This value is used by the function `sentence-end' to construct the regexp describing the end of a sentence, when the value of the variable `sentence-end' is nil. See Info node `(elisp)Standard Regexps'. (custom-declare-variable 'sentence-end-without-period 'nil '(#$ . 4892) :type 'boolean :group 'fill) #@271 String of characters that end sentence without following spaces. This value is used by the function `sentence-end' to construct the regexp describing the end of a sentence, when the value of the variable `sentence-end' is nil. See Info node `(elisp)Standard Regexps'. (custom-declare-variable 'sentence-end-without-space '"’¡£’¡¥’¡©’¡ª‘¡£‘£®‘£¿‘£¡˜¡¤˜¡¥˜¡©˜¡ª•¡¤•¡¥•¡©•¡ª" '(#$ . 5339) :group 'paragraphs :type 'string) #@318 Regexp describing the end of a sentence. The value includes the whitespace following the sentence. All paragraph boundaries also end sentences, regardless. The value nil means to use the default value defined by the function `sentence-end'. You should always use this function to obtain the value of this variable. (custom-declare-variable 'sentence-end 'nil '(#$ . 5768) :group 'paragraphs :type '(choice regexp (const :tag "Use default value" nil))) #@77 Regexp matching the basic end of a sentence, not including following space. (custom-declare-variable 'sentence-end-base '"[.?!][]\"'’¡Éœôòý)}]*" '(#$ . 6228) :group 'paragraphs :type 'string :version "22.1") #@572 Return the regexp describing the end of a sentence. This function returns either the value of the variable `sentence-end' if it is non-nil, or the default value constructed from the variables `sentence-end-base', `sentence-end-double-space', `sentence-end-without-period' and `sentence-end-without-space'. The default value specifies that in order to be recognized as the end of a sentence, the ending period, question mark, or exclamation point must be followed by two spaces, with perhaps some closing delimiters in between. See Info node `(elisp)Standard Regexps'. (defalias 'sentence-end #[nil "\206 \205 \305\306\n \203\307\202\310\311\f\312\313\314\260 \207" [sentence-end sentence-end-without-period sentence-end-base sentence-end-double-space sentence-end-without-space "\\w \\|" "\\(" "\\($\\| $\\| \\| \\)" "\\($\\|[ ]\\)" "\\|[" "]+" "\\)" "[ \n]*"] 9 (#$ . 6443)]) #@56 Regexp describing line-beginnings that separate pages. (custom-declare-variable 'page-delimiter '"^\f" '(#$ . 7341) :group 'paragraphs :type 'regexp) #@148 Non-nil means the paragraph commands are not affected by `fill-prefix'. This is desirable in modes where blank lines are the paragraph delimiters. (custom-declare-variable 'paragraph-ignore-fill-prefix 'nil '(#$ . 7498) :group 'paragraphs :type 'boolean) #@478 Move forward to end of paragraph. With argument ARG, do it ARG times; a negative argument ARG = -N means move backward N paragraphs. 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. Returns the count of paragraphs left to move. (defalias 'forward-paragraph #[(&optional arg) "\204\306`\n\205\n\307\232?\205 ?\205\310\n! \307\232\2041 \311H\312\232\2031 \306\313O\2022 \307\232\204L\311H\312\232\203L\306\313O\202N\f\203]\314\f\315R\202_\316\314\317\260 \313\211!\"\311W\203wo\204w\320!\204\234\321\322`Se]\323#\203\234\320!\203\234T\211\202s`!\324u\210\325 \210o\204\271\326 \210\320!\203\271\324y\210\202\245o\204rT\313\210\f\203\372\313#\325 \210o\204\361\326 \210\320!\204\361\320\f!\203\361`!U\204\353\323#\324y\210\202\312\326 \210o)?\202<\321 \313\306#\203:\323\211\"\203:`!\326 \210\320!\204:\320!\2030$\203:o\204:\327!S\330\"\204:\313\"!b\210\202\372\"\203qm\204S\326 \210\320!\203S\306y\210\202?\311\210i\331 V\203c\306u\210\202r\332\313x\210n\204r\306y\210\202reb\210\202r\311V\203 m\204 m\204\231\326 \210m\204\231\320!\203\231\306y\210\202\201m\204\240S\306y\210\f\203\305m\204w\326 \210m\204w\320!\204w\320\f!\203w\306y\210\202\247\333 \313\306#\203\376\311\224\211!b\210m\204\376\326 \210\320!\204\376\320!\203\370$\203\376\327!S\330\"\204\376\306u\210\202\305`dW\203w!b\210\202w\334\313 \323#\210.\207" [arg opoint fill-prefix paragraph-ignore-fill-prefix fill-prefix-regexp paragraph-start 1 "" regexp-quote 0 94 nil "\\|" "[ ]*$" "^[ ]*\\(?:" "\\)" looking-at re-search-backward "^\n" t -1 beginning-of-line move-to-left-margin get-text-property hard current-left-margin " " re-search-forward constrain-to-field parstart paragraph-separate parsep sp-parstart start found-start multiple-lines use-hard-newlines] 6 (#$ . 7760) "p"]) #@449 Move backward to start of paragraph. With argument ARG, do it ARG times; a negative argument ARG = -N means move forward N paragraphs. 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. (defalias 'backward-paragraph #[(&optional arg) "\204\301\302[!\207" [arg 1 forward-paragraph] 2 (#$ . 9920) "p"]) #@518 Put point at beginning of this paragraph, mark at end. The paragraph marked is the one that contains point or follows point. With argument ARG, puts mark at end of a following paragraph, so that the number of paragraphs marked equals ARG. If ARG is negative, point is put at end of this paragraph, mark is put at beginning of this or a previous paragraph. Interactively, if this command is repeated or (in Transient Mark mode) if the mark is active, it marks the next ARG paragraphs after the ones already marked. (defalias 'mark-paragraph #[(&optional arg allow-extend) "\204\306\307!\203\310\311!\210 \2036\n =\203 \312\313!\204(\f\2036 \2036\314\212\312 b\210\315!\210`)!\207\315!\210\316\317\313\211#\210\320!\207" [arg allow-extend last-command this-command transient-mark-mode mark-active 1 zerop error "Cannot mark zero paragraphs" mark t set-mark forward-paragraph push-mark nil backward-paragraph] 4 (#$ . 10495) "p\np"]) #@148 Kill forward to end of paragraph. With arg N, kill forward to Nth end of paragraph; negative arg -N means kill backward to Nth start of paragraph. (defalias 'kill-paragraph #[(arg) "\301`\302!\210`\"\207" [arg kill-region forward-paragraph] 4 (#$ . 11451) "p"]) #@143 Kill back to start of paragraph. With arg N, kill back to Nth start of paragraph; negative arg -N means kill forward to Nth end of paragraph. (defalias 'backward-kill-paragraph #[(arg) "\301`\302!\210`\"\207" [arg kill-region backward-paragraph] 4 (#$ . 11721) "p"]) #@57 Interchange this (or next) paragraph with previous one. (defalias 'transpose-paragraphs #[(arg) "\301\302\"\207" [arg transpose-subr forward-paragraph] 3 (#$ . 11995) "*p"]) (defalias 'start-of-paragraph-text #[nil "`\302\303\304!\210`\305\302w\210` Y\205% W\205%b\210eV\205%\306 *\207" [npoint opoint nil forward-paragraph -1 " \n" start-of-paragraph-text] 2]) (defalias 'end-of-paragraph-text #[nil "`\301\302!\210h\303=\203\304u\210`X\205 \302u\210`dW\205 \305 )\207" [opoint forward-paragraph 1 10 -1 end-of-paragraph-text] 2]) #@283 Move forward to next `sentence-end'. With argument, repeat. With negative argument, move backward repeatedly to `sentence-beginning'. The variable `sentence-end' is a regular expression that matches ends of sentences. Also, every paragraph boundary terminates sentences as well. (defalias 'forward-sentence #[(&optional arg) "\204\306`\301 \307W\203C`\212\310 \210`)\311 \312#\2038\307\225\fW\2041\311 \312#\2038\307\225b\210\202; b\210*T\211\202\f\307V\203j\212\313 \210`)\314 \312#\203_\315\316x\210\202b b\210)S\211\202D\317\316\n\312#*\207" [arg sentence-end opoint par-beg pos par-end 1 0 start-of-paragraph-text re-search-backward t end-of-paragraph-text re-search-forward " \n" nil constrain-to-field] 5 (#$ . 12551) "p"]) #@112 Put two spaces at the end of sentences from point to the end of buffer. It works using `query-replace-regexp'. (defalias 'repunctuate-sentences #[nil "\300\301\302\"\207" [query-replace-regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +" "\\1\\2\\3 "] 3 (#$ . 13320) nil]) #@110 Move backward to start of sentence. With arg, do it arg times. See `forward-sentence' for more information. (defalias 'backward-sentence #[(&optional arg) "\204\301\302[!\207" [arg 1 forward-sentence] 2 (#$ . 13600) "p"]) #@113 Kill from point to end of sentence. With arg, repeat; negative arg -N means kill back to Nth start of sentence. (defalias 'kill-sentence #[(&optional arg) "\301`\302!\210`\"\207" [arg kill-region forward-sentence] 4 (#$ . 13835) "p"]) #@121 Kill back from point to start of sentence. With arg, repeat, or kill forward to Nth end of sentence if negative arg -N. (defalias 'backward-kill-sentence #[(&optional arg) "\301`\302!\210`\"\207" [arg kill-region backward-sentence] 4 (#$ . 14078) "p"]) #@159 Put mark at end of sentence. Arg works as in `forward-sentence'. If this command is repeated, it marks the next ARG sentences after the ones already marked. (defalias 'mark-end-of-sentence #[(arg) "\303\212 =\203\304\305!\203\304 b\210\306\n!\210`)\307\305#\207" [last-command this-command arg push-mark mark t forward-sentence nil] 4 (#$ . 14339) "p"]) #@48 Interchange this (next) and previous sentence. (defalias 'transpose-sentences #[(arg) "\301\302\"\207" [arg transpose-subr forward-sentence] 3 (#$ . 14705) "*p"])