From: Dmitry Gutov <dgutov@yandex.ru>
To: Tom Tromey <tom@tromey.com>
Cc: Emacs discussions <emacs-devel@gnu.org>
Subject: Re: exposing the effective mode in a multi-mode
Date: Thu, 21 Sep 2017 17:19:52 +0300 [thread overview]
Message-ID: <964f1d15-9a2c-8059-a3db-1699fd35d172@yandex.ru> (raw)
In-Reply-To: <87lgla9f57.fsf@tromey.com>
On 9/20/17 7:18 AM, Tom Tromey wrote:
>>>>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> writes:
>
> Dmitry> So I thought it might be useful to return the name of the language
> Dmitry> instead of the mode. The default implementation could look like this:
>
> Are there modes that can adapt to multiple different major modes for
> language, but without knowing the details of the major mode? I don't
> know but it seems iffy to me.
Do you know many cases where this isn't true?
Its the usual case in company-mode backends, I think. E.g.,
company-clang only cares that the edited language is one from a given
list, not about the current major mode. Same for third-party backends
for JS, and company-css, of course.
There might be some problems about unknown major modes setting the
syntax table to unreasonable values, but we could treat those as bugs in
those major modes.
Anyway, my suggestion makes things more complex. I'm not seeing a lot of
reaction to it, so maybe disregard for now. We could add some
major-mode->language mapping later down the road.
next prev parent reply other threads:[~2017-09-21 14:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 23:13 exposing the effective mode in a multi-mode Tom Tromey
2017-09-18 9:01 ` Dmitry Gutov
2017-09-20 4:18 ` Tom Tromey
2017-09-21 14:19 ` Dmitry Gutov [this message]
2017-09-18 9:30 ` Alan Mackenzie
2017-09-20 4:21 ` Tom Tromey
2017-09-19 12:23 ` Stefan Monnier
2017-10-08 21:20 ` Tom Tromey
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=964f1d15-9a2c-8059-a3db-1699fd35d172@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=tom@tromey.com \
/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.