From: Alex Branham <alex.branham@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 35967@debbugs.gnu.org, npostavs@gmail.com
Subject: bug#35967: [PATCH] avoid flyspell error if point is at bob
Date: Fri, 14 Jun 2019 13:17:31 -0500 [thread overview]
Message-ID: <87tvcsqbes.fsf@gmail.com> (raw)
In-Reply-To: <83d0jk9oft.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
On Tue 11 Jun 2019 at 09:39, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: npostavs@gmail.com
>> Cc: Alex Branham <alex.branham@gmail.com>, 35967@debbugs.gnu.org
>> Date: Tue, 11 Jun 2019 10:12:12 -0400
>>
>> it seems fairly easy to remember that bobp should treat a narrowed
>> buffer the same way that beginning-of-buffer will.
>
> Not for this old curmudgeon, evidently.
Here's a new patch that checks for (equal (point) 1) rather than using
bobp. OK to push to master?
Alex
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Avoid-a-flyspell-error-if-point-is-at-beginning-of-b.patch --]
[-- Type: text/x-patch, Size: 1391 bytes --]
From c7d7ccaf5b94a1146e4664ec21564f982686fcab Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham@gmail.com>
Date: Fri, 14 Jun 2019 13:15:36 -0500
Subject: [PATCH] Avoid a flyspell error if point is at beginning of buffer
* lisp/textmodes/flyspell.el (flyspell-generic-progmode-verify): Check
if point is at the beginning of the buffer. This prevents an error
when e.g. 'flyspell-auto-correct-word' gets called with point at the
beginning of the buffer.
---
lisp/textmodes/flyspell.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index d18916dfd0..7237a0f8ab 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -423,9 +423,10 @@ flyspell-prog-text-faces
(defun flyspell-generic-progmode-verify ()
"Used for `flyspell-generic-check-word-predicate' in programming modes."
- ;; (point) is next char after the word. Must check one char before.
- (let ((f (get-text-property (- (point) 1) 'face)))
- (memq f flyspell-prog-text-faces)))
+ (unless (eql (point) 1)
+ ;; (point) is next char after the word. Must check one char before.
+ (let ((f (get-text-property (- (point) 1) 'face)))
+ (memq f flyspell-prog-text-faces))))
;; Records the binding of M-TAB in effect before flyspell was activated.
(defvar flyspell--prev-meta-tab-binding)
--
2.21.0
next prev parent reply other threads:[~2019-06-14 18:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 20:43 bug#35967: [PATCH] avoid flyspell error if point is at bob Alex Branham
2019-05-29 16:08 ` Eli Zaretskii
2019-05-30 11:58 ` Basil L. Contovounesios
2019-06-11 14:12 ` npostavs
2019-06-11 14:39 ` Eli Zaretskii
2019-06-14 18:17 ` Alex Branham [this message]
2019-06-14 18:31 ` npostavs
2019-06-14 18:41 ` Alex Branham
2019-06-14 19:14 ` Andreas Schwab
2019-06-17 19:04 ` Alex Branham
2019-06-18 12:18 ` Stefan Monnier
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=87tvcsqbes.fsf@gmail.com \
--to=alex.branham@gmail.com \
--cc=35967@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=npostavs@gmail.com \
/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.