From: Alan Mackenzie <acm@muc.de>
To: Hong Xu <hong@topbug.net>
Cc: 37862@debbugs.gnu.org
Subject: bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files.
Date: Sat, 4 Jul 2020 17:10:22 +0000 [thread overview]
Message-ID: <20200704171022.GC19042@ACM> (raw)
In-Reply-To: <89b138ad-e044-d117-e26f-414d29ca7732@topbug.net>
Hello, Hong.
On Sun, Oct 27, 2019 at 13:31:33 -0700, Hong Xu wrote:
> On 10/27/19 6:30 AM, Alan Mackenzie wrote:
> > Thanks for writing this proposal.
> > I think it would be better, given a foo.h, to find all files foo.*, and
> > test each one in turn for a match in auto-mode-alist. Searching this
> > alist is really not that slow, particularly as it is only being done a
> > few times, and not in a tight loop.
> I agree with this approach, if it would not be too slow. Perhaps we can
> set a limit on the number of files that match foo.*.
> > For this, we really want a function in the Emacs core which would find
> > the match in auto-mode-alist. Currently, this functionality is open
> > coded in set-auto-mode (in .../lisp/files.el).
> I like the idea to create a separate function that provides this
> feature. Do you mean it's somewhat buried in `set-auto-mode'? It's
> probably also useful in other places.
> > However, I'm a bit sceptical about the use of this proposed facility.
> > Many projects (possibly most) have .c/.c++ files in a directory called
> > "src", and .h files in a separate directory called "include". This
> > proposed facility wouldn't work in such a set up. To extend it to cope
> > with separate "src"/"include" directories would make it messy.
> This is true; but I think no guessing is perfect. At least the proposed
> solution should help with some smaller projects.
After thinking it over for some time, I'm sorry to say I've decided not
to commit your change to Emacs. I think the disadvantages would
outweigh the advantages.
But again, thanks for taking the trouble to post the idea on the buglist.
--
Alan Mackenzie (Nuremberg, Germany).
prev parent reply other threads:[~2020-07-04 17:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 3:12 bug#37862: [PATCH] Use alternative C++ source files for determining C/C++ header files Hong Xu
2019-10-26 11:06 ` Eli Zaretskii
2019-10-26 15:19 ` Alan Mackenzie
2019-10-27 13:30 ` Alan Mackenzie
2019-10-27 20:31 ` Hong Xu
2020-07-04 17:10 ` Alan Mackenzie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200704171022.GC19042@ACM \
--to=acm@muc.de \
--cc=37862@debbugs.gnu.org \
--cc=hong@topbug.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.