From: Samuel Freilich <sfreilich@google.com>
To: 20774@debbugs.gnu.org
Subject: bug#20774: Typo in Patch
Date: Fri, 26 Jun 2015 19:40:09 -0400 [thread overview]
Message-ID: <CACQEUgMJnBGFmnGuXPtaTXPygJLHvPNneXW6P439ZJ3sKfJVGA@mail.gmail.com> (raw)
In-Reply-To: <CACQEUgNniBhrw3XtKeVSq2kkfCbkYq+kQSd-ONTG3GxPeh7SVw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 113 bytes --]
There was a typo in that previous patch. Should have been regexp-quote, not
regex-quote. Fixed version attached.
[-- Attachment #1.2: Type: text/html, Size: 134 bytes --]
[-- Attachment #2: emacs-auto-fill-different-first-line-fixed.patch --]
[-- Type: text/x-patch, Size: 2611 bytes --]
*** simple.el.old 2015-06-08 19:19:20.484397387 -0400
--- simple.el.new 2015-06-08 19:18:58.340305301 -0400
***************
*** 6559,6575 ****
(setq fill-prefix prefix))))
(while (and (not give-up) (> (current-column) fc))
! ;; Determine where to split the line.
! (let* (after-prefix
(fill-point
(save-excursion
(beginning-of-line)
! (setq after-prefix (point))
! (and fill-prefix
! (looking-at (regexp-quote fill-prefix))
! (setq after-prefix (match-end 0)))
(move-to-column (1+ fc))
! (fill-move-to-break-point after-prefix)
(point))))
;; See whether the place we found is any good.
--- 6559,6581 ----
(setq fill-prefix prefix))))
(while (and (not give-up) (> (current-column) fc))
! ;; Determine where to split the line.
! (let* (line-start
! after-prefix
(fill-point
(save-excursion
(beginning-of-line)
! (setq line-start (point))
! ;; Skip the fill-prefix. Note that we might be on the first line of the
! ;; paragraph, and the fist line can differ in adaptive-fill-mode.
! (when (or (and adaptive-fill-mode
! adaptive-fill-first-line-regexp
! (looking-at adaptive-fill-first-line-regexp))
! (and fill-prefix
! (looking-at (regexp-quote fill-prefix))))
! (setq after-prefix (match-end 0)))
(move-to-column (1+ fc))
! (fill-move-to-break-point (or after-prefix line-start))
(point))))
;; See whether the place we found is any good.
***************
*** 6578,6586 ****
(or (bolp)
;; There is no use breaking at end of line.
(save-excursion (skip-chars-forward " ") (eolp))
! ;; It is futile to split at the end of the prefix
! ;; since we would just insert the prefix again.
! (and after-prefix (<= (point) after-prefix))
;; Don't split right after a comment starter
;; since we would just make another comment starter.
(and comment-start-skip
--- 6584,6592 ----
(or (bolp)
;; There is no use breaking at end of line.
(save-excursion (skip-chars-forward " ") (eolp))
! ;; It is futile to split earlier in the line than the length of the
! ;; prefix, since we would just insert the prefix again.
! (and fill-prefix (<= (point) (+ line-start (length fill-prefix))))
;; Don't split right after a comment starter
;; since we would just make another comment starter.
(and comment-start-skip
next prev parent reply other threads:[~2015-06-26 23:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 23:39 bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Samuel Freilich
2015-06-26 23:40 ` Samuel Freilich [this message]
2017-08-22 12:49 ` npostavs
2017-08-22 16:00 ` Samuel Freilich
2017-08-23 3:56 ` npostavs
2017-08-23 18:20 ` Samuel Freilich
2017-08-24 2:16 ` npostavs
2017-08-24 15:11 ` Samuel Freilich
2017-08-25 1:45 ` npostavs
2017-08-29 3:37 ` npostavs
2017-08-29 3:55 ` npostavs
2017-08-31 0:51 ` npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACQEUgMJnBGFmnGuXPtaTXPygJLHvPNneXW6P439ZJ3sKfJVGA@mail.gmail.com \
--to=sfreilich@google.com \
--cc=20774@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.