bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5062: image-toggle-display overwrites nxml-mode local key map


From: Stefan Monnier
Subject: bug#5062: image-toggle-display overwrites nxml-mode local key map
Date: Wed, 02 Dec 2009 22:30:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>>>> 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.


> Why not allow a form there then:

>    ("regexp" '(progn (major-mode) (mino-mode-1 1) (minor-mode-2 1) ...))

Because you can already do it just fine:

   (defun myfoo () (major-mode) (mino-mode-1 1) (minor-mode-2 1))
   
   [...]
   
      ("regexp" . myfoo)


-- Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]