• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/textmodes/

Lines Matching +defs:backward +defs:sentence

1 ;;; paragraphs.el --- paragraph and sentence parsing
34 "Paragraph and sentence parsing."
121 (defcustom sentence-end-double-space t
122 "Non-nil means a single space does not end a sentence.
123 This is relevant for filling. See also `sentence-end-without-period'
126 This value is used by the function `sentence-end' to construct the
127 regexp describing the end of a sentence, when the value of the variable
128 `sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
131 ;;;###autoload(put 'sentence-end-double-space 'safe-local-variable 'booleanp)
133 (defcustom sentence-end-without-period nil
134 "Non-nil means a sentence will end without a period.
135 For example, a sentence in Thai text ends with double space but
138 This value is used by the function `sentence-end' to construct the
139 regexp describing the end of a sentence, when the value of the variable
140 `sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
143 ;;;###autoload(put 'sentence-end-without-period 'safe-local-variable 'booleanp)
145 (defcustom sentence-end-without-space
147 "String of characters that end sentence without following spaces.
149 This value is used by the function `sentence-end' to construct the
150 regexp describing the end of a sentence, when the value of the variable
151 `sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
154 ;;;###autoload(put 'sentence-end-without-space 'safe-local-variable 'stringp)
156 (defcustom sentence-end nil
157 "Regexp describing the end of a sentence.
158 The value includes the whitespace following the sentence.
162 function `sentence-end'. You should always use this function
166 ;;;###autoload(put 'sentence-end 'safe-local-variable 'string-or-null-p)
168 (defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*"
169 "Regexp matching the basic end of a sentence, not including following space."
173 ;;;###autoload(put 'sentence-end-base 'safe-local-variable 'stringp)
175 (defun sentence-end ()
176 "Return the regexp describing the end of a sentence.
178 This function returns either the value of the variable `sentence-end'
180 variables `sentence-end-base', `sentence-end-double-space',
181 `sentence-end-without-period' and `sentence-end-without-space'.
184 end of a sentence, the ending period, question mark, or exclamation point
187 (or sentence-end
188 (concat (if sentence-end-without-period "\\w \\|")
190 sentence-end-base
191 (if sentence-end-double-space
193 "\\|[" sentence-end-without-space "]+"
213 a negative argument ARG = -N means move backward N paragraphs.
250 (re-search-backward "^\n" (max (1- (point)) (point-min)) t)
286 (while (and (re-search-backward sp-parstart nil 1)
314 (skip-chars-backward " \t")
352 (defun backward-paragraph (&optional arg)
353 "Move backward to start of paragraph.
396 (backward-paragraph arg))))
401 negative arg -N means kill backward to Nth start of paragraph."
405 (defun backward-kill-paragraph (arg)
410 (kill-region (point) (progn (backward-paragraph arg) (point))))
442 (defun forward-sentence (&optional arg)
443 "Move forward to next `sentence-end'. With argument, repeat.
444 With negative argument, move backward repeatedly to `sentence-beginning'.
446 The variable `sentence-end' is a regular expression that matches ends of
451 (sentence-end (sentence-end)))
455 (if (and (re-search-backward sentence-end par-beg t)
457 (re-search-backward sentence-end par-beg t)))
463 (if (re-search-forward sentence-end par-end t)
464 (skip-chars-backward " \t\n")
477 (defun backward-sentence (&optional arg)
478 "Move backward to start of sentence. With arg, do it arg times.
479 See `forward-sentence' for more information."
482 (forward-sentence (- arg)))
484 (defun kill-sentence (&optional arg)
485 "Kill from point to end of sentence.
486 With arg, repeat; negative arg -N means kill back to Nth start of sentence."
488 (kill-region (point) (progn (forward-sentence arg) (point))))
490 (defun backward-kill-sentence (&optional arg)
491 "Kill back from point to start of sentence.
492 With arg, repeat, or kill forward to Nth end of sentence if negative arg -N."
494 (kill-region (point) (progn (backward-sentence arg) (point))))
496 (defun mark-end-of-sentence (arg)
497 "Put mark at end of sentence. Arg works as in `forward-sentence'.
505 (forward-sentence arg)
510 "Interchange this (next) and previous sentence."
512 (transpose-subr 'forward-sentence arg))