Leo P White | 6 Jun 2012 16:29
Picon
Picon
Favicon
Gravatar

Major mode for EIEIO custom buffers

Hi,

I think it would be an improvement if eieio-custom.el had its own major 
mode for the buffers it creates.

I need this because I have a minor mode that defines new key bindings for 
RET and TAB, which shadow the ones in widget-keymap. This is easily 
remedied, but it requires a hook for the buffers that eieio-custom creates. 
Rather than just adding a hook, it seems more sensible to create a simple 
major mode, as this would also improve documentation.

I've included a simple patch below.

Regards,

Leo

-----------------------------------------------------------------

diff -ruN old/eieio-custom.el new/eieio-custom.el
--- old/eieio-custom.el	2012-06-06 14:55:00.258634000 +0100
+++ new/eieio-custom.el	2012-06-06 15:05:15.311976000 +0100
 <at>  <at>  -332,6 +332,16  <at>  <at> 
 Optional argument GROUP is the sub-group of slots to display."
   (eieio-customize-object obj group))

+(defvar eieio-custom-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map widget-keymap)
+    map)
(Continue reading)

Eric M. Ludlam | 7 Jun 2012 01:41
Picon
Gravatar

Re: Major mode for EIEIO custom buffers

Hi Leo,

That is an interesting idea.  It seems better than just using 
fundamental mode.

Have you ever made a copyright assignment for contributions to Emacs? 
Your patch is probably small enough that it isn't needed, but it would 
be better if you already had provided a release.

Thanks
Eric

On 06/06/2012 10:29 AM, Leo P White wrote:
> Hi,
>
> I think it would be an improvement if eieio-custom.el had its own major
> mode for the buffers it creates.
>
> I need this because I have a minor mode that defines new key bindings for
> RET and TAB, which shadow the ones in widget-keymap. This is easily
> remedied, but it requires a hook for the buffers that eieio-custom creates.
> Rather than just adding a hook, it seems more sensible to create a simple
> major mode, as this would also improve documentation.
>
> I've included a simple patch below.
>
> Regards,
>
> Leo
>
(Continue reading)

Leo P White | 7 Jun 2012 13:03
Picon
Picon
Favicon
Gravatar

Re: Major mode for EIEIO custom buffers


I haven't made a copyright assignment before. What forms do I need?

Leo

On Jun 7 2012, Eric M. Ludlam wrote:

>Hi Leo,
>
>That is an interesting idea.  It seems better than just using 
>fundamental mode.
>
>Have you ever made a copyright assignment for contributions to Emacs? 
>Your patch is probably small enough that it isn't needed, but it would 
>be better if you already had provided a release.
>
>Thanks
>Eric
>
>
>On 06/06/2012 10:29 AM, Leo P White wrote:
>> Hi,
>>
>> I think it would be an improvement if eieio-custom.el had its own major
>> mode for the buffers it creates.
>>
>> I need this because I have a minor mode that defines new key bindings 
>> for RET and TAB, which shadow the ones in widget-keymap. This is easily 
>> remedied, but it requires a hook for the buffers that eieio-custom 
>> creates. Rather than just adding a hook, it seems more sensible to 
(Continue reading)


Gmane