>From 38a1d0ae71b13b7676ea0ede0a605ff6f23aceed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Sat, 27 Nov 2021 23:52:50 +0100 Subject: [PATCH] Preserve default value of project-read-file-name-function This package can be pulled as a dependency (e.g. of ada-mode), unbeknownst to the user who might not expect nor desire this setting. * uniquify-files.el: Do not unconditionally change project-read-file-name-function; expand commentary to let users know how to opt in. --- uniquify-files.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/uniquify-files.el b/uniquify-files.el index d9430539fe..a314d001fc 100644 --- a/uniquify-files.el +++ b/uniquify-files.el @@ -33,6 +33,11 @@ ;; We accomplish this by preprocessing the list of absolute file names ;; to be in that style, in an alist with the original absolute file ;; names, and do completion on that alist. +;; +;; To use it with `project-find-file', customize +;; `project-read-file-name-function': +;; +;; (setq project-read-file-name-function 'uniq-file-read) (require 'cl-lib) (require 'files) @@ -317,8 +322,5 @@ done on UNIQIFIED-NAME, PRED is called with ABS-NAME." prompt table predicate hist default))) (cdr (assoc found alist)))) -;;;###autoload -(setq-default project-read-file-name-function #'uniq-file-read) - (provide 'uniquify-files) ;;; uniquify-files.el ends here -- 2.34.0