1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

(internal--c-header-file-path): Move to ffap.el

This function is used so rarely that it's really best not to
preload it.

* lisp/ffap.el (ffap-url-regexp): Precompute.
(ffap-c-path): Use `ffap--c-path`.
(ffap--gcc-is-clang-p, ffap--c-path): Move and rename from subr.el's
* lisp/subr.el (internal--gcc-is-clang-p)
(internal--c-header-file-path): Move to ffap.el and rename.

* lisp/man.el (Man-header-file-path): Default to a new value that
delegates to ffap.
(Man-header-file-path): Obey that new value.

* lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): Use `ffap--gcc-is-clang-p`.

* test/lisp/ffap-tests.el (ffap-tests--c-path)
(ffap-tests--c-path/gcc-mocked, ffap-tests--c-path/clang-mocked):
Move and rename from `subr-tests.el`.
* test/lisp/subr-tests.el (subr-tests-internal--c-header-file-path)
(subr-tests-internal--c-header-file-path/gcc-mocked)
(subr-tests-internal--c-header-file-path/clang-mocked):
Move to `ffap-tests.el` and rename.
This commit is contained in:
Stefan Monnier 2025-02-28 17:03:21 -05:00
parent 678fdcc165
commit 5f165caf31
6 changed files with 151 additions and 143 deletions

View file

@ -374,7 +374,9 @@ The same keyword arguments are supported as in
(defun ert-gcc-is-clang-p ()
"Return non-nil if the `gcc' command actually runs the Clang compiler."
(internal--gcc-is-clang-p))
(require 'ffap)
(declare-function ffap--gcc-is-clang-p "ffap" ())
(ffap--gcc-is-clang-p))
(defvar tramp-default-host-alist)
(defvar tramp-methods)