unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Tom Tromey <tom@tromey.com>
Cc: Emacs discussions <emacs-devel@gnu.org>
Subject: Re: exposing the effective mode in a multi-mode
Date: Mon, 18 Sep 2017 09:30:53 +0000	[thread overview]
Message-ID: <20170918093053.GB15839@ACM> (raw)
In-Reply-To: <874ls0c40s.fsf@tromey.com>

Hello, Tom

On Sun, Sep 17, 2017 at 17:13:39 -0600, Tom Tromey wrote:
> I noticed that company couldn't do CSS completion in a <style> element
> in mhtml-mode.

> company-css understands how web-mode handles sub-modes, by calling a
> web-mode function ("web-mode-language-at-pos") directly, but it doesn't
> understand mhtml-mode.

> So, I'd like to propose this patch for Emacs 26.  It adds a new function
> to prog-mode.el so that multi-modes can expose the sub-mode at point.
> It also changes mhtml-mode to set the new variable to make this work.

prog-mode seems the wrong place to put this.  It has nothing to do with
programming languages, as such, and everything to do with multi-mode
modes.

The facility will surely be needed by modes which aren't derived from
prog-mode.

The implementation of multi modes is, as far as I understand it, still
in flux.  Is the current implementation going to be applicable to all
these various ways of doing multi-mode?  Would it not be better to have
this as a hook function (in global namespace), where the pertinent
multi-mode could set the hook to its own function?

Just a few thoughts.

> Tom

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).



  parent reply	other threads:[~2017-09-18  9:30 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
2017-09-18  9:30 ` Alan Mackenzie [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918093053.GB15839@ACM \
    --to=acm@muc.de \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).