diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-08-22 06:30:29 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-08-22 06:30:29 +0200 |
commit | 0c410206aa91b9bc9a0922d63ec34de765eb86a6 (patch) | |
tree | 6d29238a1cad7a1067c375c93fb97d9c761139e0 /lisp/find-file.el | |
parent | e154ba196a38c1398d506f9c1c8ba58966d9aa3e (diff) | |
parent | 582ea6a1e9f98c124a7b044f1db7d4c63da5646d (diff) | |
download | emacs-0c410206aa91b9bc9a0922d63ec34de765eb86a6.tar.gz emacs-0c410206aa91b9bc9a0922d63ec34de765eb86a6.tar.bz2 emacs-0c410206aa91b9bc9a0922d63ec34de765eb86a6.zip |
Merge from origin/emacs-28
582ea6a1e9 Update to Org 9.5.4-19-g4dff42
7a3ae3cb62 ; * lisp/find-file.el (ff-other-file-alist): Fix typo.
c3087b59f0 ; * lisp/find-file.el (ff-other-file-alist): Another doc f...
1e1263b00b * lisp/find-file.el (ff-other-file-alist): Doc fix. (Bug#...
Diffstat (limited to 'lisp/find-file.el')
-rw-r--r-- | lisp/find-file.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/find-file.el b/lisp/find-file.el index 809592413dd..614ff420f25 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -189,8 +189,19 @@ filename that EXTRACT returned." (defcustom ff-other-file-alist 'cc-other-file-alist "Alist of extensions to find given the current file's extension. -This list should contain the most used extensions before the others, -since the search algorithm searches sequentially through each +The value could be an alist or a symbol whose value is an alist. +Each element of the alist has the form + + (REGEXP (EXTENSION...)) +or + (REGEXP FUNCTION) + +where REGEXP is the regular expression matching a file's extension, +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." |