[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww
From: |
Van L |
Subject: |
FW: bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww |
Date: |
Wed, 10 Oct 2018 21:17:14 +1100 |
Hello,
I am looking for a one-space after punctuation sentence-ending for M-e to jump
by.
Disabling the following variable stops short at Nov. or Gov. (see below)
┌────
│ (setq sentence-end-double-space nil)
└────
┌────
│ Haley’s departure also stoked speculation she could replace Lindsey Graham as
the senator from
│ South Carolina, a possibility that Trump played down. Talk in Washington is
that should Trump
│ replace Attorney General Jeff Sessions with Graham after the Nov. 6
congressional elections,
│ South Carolina Gov. Henry McMaster would be responsible for selecting a
replacement to serve
│ until the 2020 election. McMaster was previously Haley’s No. 2 in the state.
└────
and I’m aware of names like A. B. C. Nurmagomedov which will stop early, too.
What rules specify an almost perfect spot for the end of a sentence followed by
single space?; to fit in the sentence-end function.
Is WordNet useful for this?
https://en.wikipedia.org/wiki/Wordnet
┌────
│ 178 (defun sentence-end ()
│ 179 "Return the regexp describing the end of a sentence.
│ 180
│ 181 This function returns either the value of the variable `sentence-end'
│ 182 if it is non-nil, or the default value constructed from the
│ 183 variables `sentence-end-base', `sentence-end-double-space',
│ 184 `sentence-end-without-period' and `sentence-end-without-space'.
│ 185
│ 186 The default value specifies that in order to be recognized as the
│ 187 end of a sentence, the ending period, question mark, or exclamation point
│ 188 must be followed by two spaces, with perhaps some closing delimiters
│ 189 in between. See Info node `(elisp)Standard Regexps'."
│ 190 (or sentence-end
│ 191 ;; We accept non-break space along with space.
│ 192 (concat (if sentence-end-without-period "\\w[ \u00a0][ \u00a0]\\|")
│ 193 "\\("
│ 194 sentence-end-base
│ 195 (if sentence-end-double-space
│ 196 "\\($\\|[ \u00a0]$\\|\t\\|[ \u00a0][ \u00a0]\\)" "\\($\\|[\t
\u00a0]\\)")
│ 197 "\\|[" sentence-end-without-space "]+"
│ 198 "\\)"
│ 199 "[ \u00a0\t\n]*")))
└────
- FW: bug#32758: 26.1 emacs-mac 7.2; forward-sentence in eww,
Van L <=