Hi Arash, > Wouldn't `bound-and-true-p' be easier here, i.e.:
Indeed it would. I can submit a touch-up patch re. this, or just bundle it with the next (final?) folding patch that I send. Paul On Wed, Oct 30, 2024 at 10:58 AM Arash Esbati <ar...@gnu.org> wrote: > > Hi all, > > Ikumi Keita <ik...@ikumi.que.jp> writes: > > > branch: main > > commit 510d82b3b356dbbd007fd085662afea99e947fb7 > > Author: Paul Nelson <ultr...@gmail.com> > > Commit: Ikumi Keita <ik...@ikumi.que.jp> > > Thanks for providing and installing this. I have a minor comment: > > > + ;; Fold quotes if TeX-fold-quotes-on-insert is t > > + (when (and (boundp 'TeX-fold-mode) > > + (boundp 'TeX-fold-quotes-on-insert) > > + (fboundp 'TeX-fold-quotes) > > + TeX-fold-mode > > + TeX-fold-quotes-on-insert > > Wouldn't `bound-and-true-p' be easier here, i.e.: > > (when (and (bound-and-true-p TeX-fold-mode) > (bound-and-true-p TeX-fold-quotes-on-insert) > (fboundp 'TeX-fold-quotes)) > > > + (not (eq (char-before) ?\"))) ; Don't fold single quotes > > + (save-excursion > > + (let* ((end (point)) > > + (start (- end > > + (length > > + (if (string= (buffer-substring-no-properties > > + (max (point-min) > > + (- end (length open-quote))) > > + end) > > + open-quote) > > + open-quote > > + close-quote))))) > > + (when start > > + (TeX-fold-quotes start end)))))))) > > + > > Best, Arash