all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* derived-mode-run-hooks
@ 2005-07-14 13:41 Juanma Barranquero
  2005-07-15  0:12 ` derived-mode-run-hooks Richard M. Stallman
  2005-07-15  5:06 ` derived-mode-run-hooks Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Juanma Barranquero @ 2005-07-14 13:41 UTC (permalink / raw)


It's OK to delete, or at least comment out, the function
`derived-mode-run-hooks' from derived.el? It has been unused for
almost five years:

http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/Attic/derived.el.diff?r1=1.20&r2=1.21

It still exists in XEmacs' derived.el, but it is not part of the
derived.el API, just an internal function.

-- 
                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-14 13:41 derived-mode-run-hooks Juanma Barranquero
@ 2005-07-15  0:12 ` Richard M. Stallman
  2005-07-15  5:06 ` derived-mode-run-hooks Stefan Monnier
  1 sibling, 0 replies; 10+ messages in thread
From: Richard M. Stallman @ 2005-07-15  0:12 UTC (permalink / raw)
  Cc: emacs-devel

    It's OK to delete, or at least comment out, the function
    `derived-mode-run-hooks' from derived.el? It has been unused for
    almost five years:

Ok.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-14 13:41 derived-mode-run-hooks Juanma Barranquero
  2005-07-15  0:12 ` derived-mode-run-hooks Richard M. Stallman
@ 2005-07-15  5:06 ` Stefan Monnier
  2005-07-15  8:29   ` derived-mode-run-hooks Juanma Barranquero
  2005-07-15 18:10   ` derived-mode-run-hooks Richard M. Stallman
  1 sibling, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2005-07-15  5:06 UTC (permalink / raw)
  Cc: Emacs Devel

> It's OK to delete, or at least comment out, the function
> `derived-mode-run-hooks' from derived.el? It has been unused for
> almost five years:

> http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/Attic/derived.el.diff?r1=1.20&r2=1.21

> It still exists in XEmacs' derived.el, but it is not part of the
> derived.el API, just an internal function.

It's part of the internal API used by code that has been byte-compiled with
Emacs-20 (the macro-expansion of define-derived-mode used
derived-mode-run-hooks back then).

So removing it may prevent running .elc files compiled with Emacs-20.
I'd expect that several people have .elc files compiled with Emacs-20 for
the purpose of making them work with both Emacs-20 and Emacs-21, so unless
you have a good reason to get rid of that function (and the various other
similar ones in derived.el), I'd recommend we keep it a bit longer.
After all, derived.el is normally not loaded by end-users anyway so its size
doesn't matter that much.


        Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-15  5:06 ` derived-mode-run-hooks Stefan Monnier
@ 2005-07-15  8:29   ` Juanma Barranquero
  2005-07-15  8:43     ` derived-mode-run-hooks Juanma Barranquero
                       ` (2 more replies)
  2005-07-15 18:10   ` derived-mode-run-hooks Richard M. Stallman
  1 sibling, 3 replies; 10+ messages in thread
From: Juanma Barranquero @ 2005-07-15  8:29 UTC (permalink / raw)
  Cc: Emacs Devel

On 7/15/05, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> So removing it may prevent running .elc files compiled with Emacs-20.
> I'd expect that several people have .elc files compiled with Emacs-20 for
> the purpose of making them work with both Emacs-20 and Emacs-21, so unless
> you have a good reason to get rid of that function (and the various other
> similar ones in derived.el), I'd recommend we keep it a bit longer.

OK, I'll revert the deletion.

And speaking of .elc compatibility... I have a little major mode
derived from emacs-lisp-mode via `define-derived-mode'. When I compile
it with 21.4 I can use it on 21.4 and 22.0.X; however, when I compile
it with 22.0.X it fails on 21.4 (it does not produce an error, but it
doesn't work either). I think the problem may be related to the use of
`delay-mode-hooks' on newer derived.el, but I'm not entirely sure.

However, the question is: should I expect for a 22.0.X .elc file to
work on 21.4? I would've assumed "not", but for this comment on
`define-derived-mode':

	 ;; Run the hooks, if any.
	 ;; Make the generated code work in older Emacs versions
	 ;; that do not yet have run-mode-hooks.

-- 
                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-15  8:29   ` derived-mode-run-hooks Juanma Barranquero
@ 2005-07-15  8:43     ` Juanma Barranquero
  2005-07-15  9:43     ` derived-mode-run-hooks Juanma Barranquero
  2005-07-15 22:03     ` derived-mode-run-hooks Richard M. Stallman
  2 siblings, 0 replies; 10+ messages in thread
From: Juanma Barranquero @ 2005-07-15  8:43 UTC (permalink / raw)
  Cc: Emacs Devel

> a good reason to get rid of that function (and the various other
> similar ones in derived.el)

While reinstalling the function, I've now seen this comment that I
somehow missed yesterday:

;;; OBSOLETE
;; The functions below are only provided for backward compatibility with
;; code byte-compiled with versions of derived.el prior to Emacs-21.

so I'm pleading non-guilty on grounds of sleep-deprivation-induced
temporary insanity and Coke overdose.

-- 
                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-15  8:29   ` derived-mode-run-hooks Juanma Barranquero
  2005-07-15  8:43     ` derived-mode-run-hooks Juanma Barranquero
@ 2005-07-15  9:43     ` Juanma Barranquero
  2005-07-15 22:03     ` derived-mode-run-hooks Richard M. Stallman
  2 siblings, 0 replies; 10+ messages in thread
From: Juanma Barranquero @ 2005-07-15  9:43 UTC (permalink / raw)
  Cc: Emacs Devel

On 7/15/05, Juanma Barranquero <lekktu@gmail.com> wrote:

> I have a little major mode
> derived from emacs-lisp-mode via `define-derived-mode'. When I compile
> it with 21.4 I can use it on 21.4 and 22.0.X; however, when I compile
> it with 22.0.X it fails on 21.4 (it does not produce an error, but it
> doesn't work either).

Turns out in 22.0.X it needs ":syntax-table nil".

-- 
                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-15  5:06 ` derived-mode-run-hooks Stefan Monnier
  2005-07-15  8:29   ` derived-mode-run-hooks Juanma Barranquero
@ 2005-07-15 18:10   ` Richard M. Stallman
  2005-07-16 10:05     ` derived-mode-run-hooks Juanma Barranquero
  1 sibling, 1 reply; 10+ messages in thread
From: Richard M. Stallman @ 2005-07-15 18:10 UTC (permalink / raw)
  Cc: lekktu, emacs-devel

    So removing it may prevent running .elc files compiled with Emacs-20.
    I'd expect that several people have .elc files compiled with Emacs-20 for
    the purpose of making them work with both Emacs-20 and Emacs-21, so unless
    you have a good reason to get rid of that function (and the various other
    similar ones in derived.el), I'd recommend we keep it a bit longer.

Ok.  Could you add a comment explaining this?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-15  8:29   ` derived-mode-run-hooks Juanma Barranquero
  2005-07-15  8:43     ` derived-mode-run-hooks Juanma Barranquero
  2005-07-15  9:43     ` derived-mode-run-hooks Juanma Barranquero
@ 2005-07-15 22:03     ` Richard M. Stallman
  2005-07-16 10:07       ` derived-mode-run-hooks Juanma Barranquero
  2 siblings, 1 reply; 10+ messages in thread
From: Richard M. Stallman @ 2005-07-15 22:03 UTC (permalink / raw)
  Cc: monnier, emacs-devel

    However, the question is: should I expect for a 22.0.X .elc file to
    work on 21.4? I would've assumed "not", but for this comment on
    `define-derived-mode':

If it is easy to make this work (or work more), we can do it,
but I'd rather not do a lot of work for that sake.
I think that such compatibility is much less important than it once was.
It isn't hard to maintain two sets of .elc files if you have two
Emacs versions installed.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-15 18:10   ` derived-mode-run-hooks Richard M. Stallman
@ 2005-07-16 10:05     ` Juanma Barranquero
  0 siblings, 0 replies; 10+ messages in thread
From: Juanma Barranquero @ 2005-07-16 10:05 UTC (permalink / raw)
  Cc: Stefan Monnier, emacs-devel

On 7/15/05, Richard M. Stallman <rms@gnu.org> wrote:

> Ok.  Could you add a comment explaining this?

Stefan was right and the comment *was* there. I just overlooked it.

-- 
                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: derived-mode-run-hooks
  2005-07-15 22:03     ` derived-mode-run-hooks Richard M. Stallman
@ 2005-07-16 10:07       ` Juanma Barranquero
  0 siblings, 0 replies; 10+ messages in thread
From: Juanma Barranquero @ 2005-07-16 10:07 UTC (permalink / raw)
  Cc: monnier, emacs-devel

On 7/16/05, Richard M. Stallman <rms@gnu.org> wrote:

> If it is easy to make this work (or work more), we can do it,
> but I'd rather not do a lot of work for that sake.

The problem was related to changes in the handling of the inherited
syntax table. I've been able to fix the problem with a one-line
addition to my mode, so I won't spend time on this.

-- 
                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-07-16 10:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-14 13:41 derived-mode-run-hooks Juanma Barranquero
2005-07-15  0:12 ` derived-mode-run-hooks Richard M. Stallman
2005-07-15  5:06 ` derived-mode-run-hooks Stefan Monnier
2005-07-15  8:29   ` derived-mode-run-hooks Juanma Barranquero
2005-07-15  8:43     ` derived-mode-run-hooks Juanma Barranquero
2005-07-15  9:43     ` derived-mode-run-hooks Juanma Barranquero
2005-07-15 22:03     ` derived-mode-run-hooks Richard M. Stallman
2005-07-16 10:07       ` derived-mode-run-hooks Juanma Barranquero
2005-07-15 18:10   ` derived-mode-run-hooks Richard M. Stallman
2005-07-16 10:05     ` derived-mode-run-hooks Juanma Barranquero

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.