]> git.eshelyaron.com Git - emacs.git/commit
Improve performance of `find-buffer-visiting' (bug#66117)
authorIhor Radchenko <yantar92@posteo.net>
Sun, 8 Oct 2023 08:48:42 +0000 (11:48 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 30 Dec 2023 07:53:46 +0000 (09:53 +0200)
commitb7a737ef49e787120ea7a7e9f4d4ef04dd1a0723
treef05276bb8e942e8b33a88d04b5a6beaf392028a8
parent0cb252cf21efec49f693f5a8873ed02c1bcbd713
Improve performance of `find-buffer-visiting' (bug#66117)

* src/buffer.c (Fget_truename_buffer): Expose `get_truename_buffer' to
Elisp.
(Ffind_buffer): New subr searching for a live buffer with a given
value of buffer-local variable.
(syms_of_buffer): Register the new added subroutines.
* src/filelock.c (lock_file): Use the new `Fget_truename_buffer' name.
* src/lisp.h:
* test/manual/etags/c-src/emacs/src/lisp.h: Remove no-longer-necessary
extern declarations for `get_truename_buffer'.
* lisp/files.el (find-buffer-visiting): Refactor, using subroutines to
search for buffers instead of slow manual Elisp iterations.
lisp/files.el
src/buffer.c
src/filelock.c
src/lisp.h
test/manual/etags/c-src/emacs/src/lisp.h