Hi Paul,
>>>>> Arash Esbati <[email protected]> writes:
> Paul Nelson <[email protected]> writes:
>> OK, I did this with RefTeX (checking if it's bound and enabled). For
>> bibtex.el, I just require'd it inside the internal function where it's
>> used. I also implemented your correction to the docs. Please find
>> attached the updated patch. Any further feedback welcome.
Looking at your proposal again, a minor concern arose in my mind. The
new function `TeX-fold--bib-abbrev' can return nil, especially when
RefTeX isn't active. Then, let's look at this piece of code:
----------------------------------------------------------------------
(defun TeX-fold-cite-display (keys &rest _args)
[...]
(let* (...
[...]
(key-list (split-string keys "[ \f\t\n\r\v,]+"))
(references
(mapcar #'TeX-fold--bib-abbrev key-list))
(joined-references (string-join references ", ")))
----------------------------------------------------------------------
This calls `TeX-fold--bib-abbrev' repeatedly on each element of
`key-list', so the result `references' can be a list of multiple `nil's.
In that case, `joined-references' seems to have unexpected form:
(let ((r (list nil nil nil)))
(string-join r ", ")) --> ", , "
(However, maybe we should always turn on RefTeX in LaTeX mode buffers
and forget about usages without RefTeX. It wouldn't hurt after all,
since RefTeX is part of Emacs for quite a long period; I suppose there
are practically no users who don't activate RefTeX in AUCTeX LaTeX
mode.)
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex