summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-08-21 22:06:34 +0300
committerEli Zaretskii <eliz@gnu.org>2022-08-21 22:06:34 +0300
commitc3087b59f062b8d48b554b5dc3ac67f511058070 (patch)
tree4ead399fd9f33f22173159d8e3ee861e7b034bf2
parent1e1263b00b9cb722216fde7e45c42259960ab38a (diff)
downloademacs-c3087b59f062b8d48b554b5dc3ac67f511058070.tar.gz
; * lisp/find-file.el (ff-other-file-alist): Another doc fix. (Bug#57325)
-rw-r--r--lisp/find-file.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/find-file.el b/lisp/find-file.el
index e137397d24c..999cdd164e2 100644
--- a/lisp/find-file.el
+++ b/lisp/find-file.el
@@ -192,12 +192,16 @@ filename that EXTRACT returned."
The value could be an alist or a symbol whose value is an alist.
Each element of the alist has the form
- (REGEXP (ETXENSION...))
+ (REGEXP (ETXENSION...))
+or
+ (REGEXP FUNCTION)
where REGEXP is the regular expression matching a file's extension,
-and EXTENSIONs is the list of literal file-name extensions to search for.
-This list should contain the most used extensions before the others,
-since the search algorithm searches sequentially through each
+EXTENSIONs is the list of literal file-name extensions to search for,
+and FUNCTION is a function of one argument, the current file's name,
+that returns the list of extensions to search for.
+The list of extensions should contain the most used extensions before the
+others, since the search algorithm searches sequentially through each
directory specified in `ff-search-directories'. If a file is not found,
a new one is created with the first matching extension (`.cc' yields `.hh').
This alist should be set by the major mode."