[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21922: Patch for fixing the "straight-quote" case
From: |
Noam Postavsky |
Subject: |
bug#21922: Patch for fixing the "straight-quote" case |
Date: |
Tue, 08 Oct 2019 23:41:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Luis Henriquez-Perez <luishenriquezperez@gmail.com> writes:
> (when-let (point (char-before containing-sexp))
> (char-equal point ?'))
> (and (char-before point)
> (char-equal (char-before point) ?'))
You can use eq instead of char-equal, and then the extra check for nil
isn't needed.
> (save-excursion
> (goto-char (1+ point))
> (looking-at-p "quote[\t\n\f\s]+(")))))
I would suggest (looking-at-p "[[:whitespace:]\n]*quote\_>") instead,
and maybe move the save-excursion outside of the loop.
Overall, the approach looks reasonable to me.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#21922: Patch for fixing the "straight-quote" case,
Noam Postavsky <=