From: Juri Linkov <juri@jurta.org>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Tassilo Horn <tassilo@member.fsf.org>,
Brent Goodrick <bgoodr@gmail.com>,
5062@emacsbugs.donarmstrong.com
Subject: bug#5062: image-toggle-display overwrites nxml-mode local key map
Date: Thu, 03 Dec 2009 02:59:16 +0200 [thread overview]
Message-ID: <87ws15m3gb.fsf@mail.jurta.org> (raw)
In-Reply-To: <e01d8a50911291516i233a1bbds7fdc33ffea72db20@mail.gmail.com> (Lennart Borgman's message of "Mon, 30 Nov 2009 00:16:13 +0100")
>> Or did you mean a joint mode like `c-mode-and-image-minor-mode',
>> `nxml-mode-and-image-minor-mode', `ps-mode-and-doc-view-minor-mode'?
>> Wouldn't this be too clumsy?
>
> Yes, why would it be too clumsy?
>
> A more flexibel way might be to use define-globalized-minor-mode. The
> turn on function there could make any check. It could for example look
> in a list similar to auto-mode-alist, but for minor modes.
>
> But maybe that would take too long time?
I think Stefan's idea of allowing auto-mode-alist to have entries like
("regexp" (major-mode minor-mode-1 minor-mode-2 ...)) is more universal.
Two basic ways to specify modes are:
1. With Local Variables you can put in the first line
-*- mode: major-mode; mode: minor-mode-1; mode: minor-mode-2; ... -*-
or the same to the Local Variables list, or to the
Directory Local Variables.
2. With `auto-mode-alist' you can bind filename patterns to major modes,
but not to minor modes. (major-mode minor-mode-1 minor-mode-2 ...)
would allow to do the same that Local Variables already allows to do, e.g.
("\\.xpm\\'" (c-mode image-minor-mode)),
("\\.svg\\'" (nxml-mode image-minor-mode)),
("\\.ps\\'" (ps-mode doc-view-minor-mode)),
etc.
PS: this feature currently is not too necessary, because in the patch I sent
`image-mode-maybe' was replaced with `image-mode' in `auto-mode-alist'
to display a file as an image by default (the default behavior in 23.1).
And only if someone wants to change this default to display a file as
text initially, this requires either adding `image-mode-maybe' to
`auto-mode-alist' or a combination of normal-mode + image-minor-mode
that can be implemented as a new feature.
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2009-12-03 0:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <878wdixvgt.fsf@mail.jurta.org>
2009-11-28 0:44 ` bug#5062: 23.1.50; image-toggle-display overwrites nxml-mode local key map Brent Goodrick
2009-11-28 2:25 ` Stefan Monnier
2009-11-28 15:26 ` Brent Goodrick
2009-11-28 17:49 ` Juri Linkov
2009-11-28 20:21 ` Stefan Monnier
2009-11-28 22:54 ` Juri Linkov
2009-11-29 15:36 ` Stefan Monnier
2009-11-29 16:03 ` Juri Linkov
2009-11-29 18:33 ` Stefan Monnier
2009-11-29 22:00 ` Lennart Borgman
2009-11-29 22:08 ` Juri Linkov
2009-11-29 23:16 ` Lennart Borgman
2009-12-03 0:59 ` Juri Linkov [this message]
2009-12-03 1:37 ` bug#5062: " Lennart Borgman
2009-12-03 3:08 ` Kevin Rodgers
2009-12-03 3:31 ` Lennart Borgman
2009-12-03 3:30 ` Stefan Monnier
2009-12-03 0:57 ` bug#5062: 23.1.50; " Juri Linkov
2009-12-03 3:28 ` Stefan Monnier
2009-12-03 5:00 ` Jason Rumney
2009-12-04 0:05 ` Juri Linkov
2009-12-04 22:00 ` bug#5062: marked as done (23.1.50; image-toggle-display overwrites nxml-mode local key map) Emacs bug Tracking System
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=87ws15m3gb.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=5062@emacsbugs.donarmstrong.com \
--cc=bgoodr@gmail.com \
--cc=lennart.borgman@gmail.com \
--cc=tassilo@member.fsf.org \
/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.