all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `delete-frame-hook' isn't defined
@ 2002-09-28  4:06 John Paul Wallington
  2002-09-29 18:44 ` Richard Stallman
  2002-09-29 19:54 ` Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: John Paul Wallington @ 2002-09-28  4:06 UTC (permalink / raw)


etc/NEWS says:

** Function `delete-frame' runs `delete-frame-hook' before actually
deleting the frame.  The hook is called with one arg, the frame
being deleted.


However, `delete-frame-hook' isn't presently defined as a variable.
`delete-frame' does run the hook if you define it.

Should it be defined?  One possible problem is that tooltips are
frames that are deleted when they disappear.  Users may not expect the
hook to be run then.

Also, should it be renamed to `delete-frame-functions' because it is
an abnormal hook ?

-- 
John Paul Wallington

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

* Re: `delete-frame-hook' isn't defined
  2002-09-28  4:06 `delete-frame-hook' isn't defined John Paul Wallington
@ 2002-09-29 18:44 ` Richard Stallman
  2002-09-30 15:06   ` John Paul Wallington
  2002-09-29 19:54 ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2002-09-29 18:44 UTC (permalink / raw)
  Cc: emacs-devel

    However, `delete-frame-hook' isn't presently defined as a variable.
    `delete-frame' does run the hook if you define it.

    Should it be defined?

Yes, nowadays we may as well give it a defvar.

			   One possible problem is that tooltips are
    frames that are deleted when they disappear.  Users may not expect the
    hook to be run then.

Hmm.  Perhaps it should not be run for tooltip frames.
Can you find a clean way to distinguish tooltip frames?

    Also, should it be renamed to `delete-frame-functions' because it is
    an abnormal hook ?

Yes, definitely.  It was a mistake to give it the name
delete-frame-hook.

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

* Re: `delete-frame-hook' isn't defined
  2002-09-28  4:06 `delete-frame-hook' isn't defined John Paul Wallington
  2002-09-29 18:44 ` Richard Stallman
@ 2002-09-29 19:54 ` Stefan Monnier
  2002-09-30 15:08   ` John Paul Wallington
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2002-09-29 19:54 UTC (permalink / raw)
  Cc: emacs-devel

> Also, should it be renamed to `delete-frame-functions' because it is
> an abnormal hook ?

I think it should stay as `delete-frame-hook' but should not receive
any argument, instead the frame that's about to be deleted should
just be made the `selected-frame'.
But otherwise, yes please rename it.


	Stefan

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

* Re: `delete-frame-hook' isn't defined
  2002-09-30 15:08   ` John Paul Wallington
@ 2002-09-30 15:05     ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2002-09-30 15:05 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, emacs-devel

> > > Also, should it be renamed to `delete-frame-functions' because it is
> > > an abnormal hook ?
> > 
> > I think it should stay as `delete-frame-hook' but should not receive
> > any argument, instead the frame that's about to be deleted should
> > just be made the `selected-frame'.
> 
> Could you explain why that is preferable ?

Because then it's a "standard hook" and I find it a good thing
to keep things as standard as possible: you don't need to look at the
docstring to know the calling convention, for example.


	Stefan

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

* Re: `delete-frame-hook' isn't defined
  2002-09-29 18:44 ` Richard Stallman
@ 2002-09-30 15:06   ` John Paul Wallington
  2002-10-01  6:18     ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: John Paul Wallington @ 2002-09-30 15:06 UTC (permalink / raw)
  Cc: emacs-devel

> 			   One possible problem is that tooltips are
>     frames that are deleted when they disappear.  Users may not expect the
>     hook to be run then.
> 
> Hmm.  Perhaps it should not be run for tooltip frames.
> Can you find a clean way to distinguish tooltip frames?

I haven't found a clean way yet.  If someone knows one, please yell!

One possibility is to run the hook unless the frame's `name' parameter
is `tooltip', but that is probably too fragile as
`tooltip-frame-parameters' is customizable.

-- 
John Paul Wallington

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

* Re: `delete-frame-hook' isn't defined
  2002-09-29 19:54 ` Stefan Monnier
@ 2002-09-30 15:08   ` John Paul Wallington
  2002-09-30 15:05     ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: John Paul Wallington @ 2002-09-30 15:08 UTC (permalink / raw)
  Cc: emacs-devel

> > Also, should it be renamed to `delete-frame-functions' because it is
> > an abnormal hook ?
> 
> I think it should stay as `delete-frame-hook' but should not receive
> any argument, instead the frame that's about to be deleted should
> just be made the `selected-frame'.

Could you explain why that is preferable ?  

-- 
John Paul Wallington

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

* Re: `delete-frame-hook' isn't defined
  2002-09-30 15:06   ` John Paul Wallington
@ 2002-10-01  6:18     ` Richard Stallman
  2002-10-01 15:14       ` John Paul Wallington
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2002-10-01  6:18 UTC (permalink / raw)
  Cc: emacs-devel

    > Hmm.  Perhaps it should not be run for tooltip frames.
    > Can you find a clean way to distinguish tooltip frames?

    I haven't found a clean way yet.  If someone knows one, please yell!

The code that creates a tooltip frame could give it a frame property
`tooltip' with value t.  Then it would be easy to distinguish them.

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

* Re: `delete-frame-hook' isn't defined
  2002-10-01  6:18     ` Richard Stallman
@ 2002-10-01 15:14       ` John Paul Wallington
  2002-10-02  4:07         ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: John Paul Wallington @ 2002-10-01 15:14 UTC (permalink / raw)
  Cc: emacs-devel

>     > Hmm.  Perhaps it should not be run for tooltip frames.
>     > Can you find a clean way to distinguish tooltip frames?
> 
>     I haven't found a clean way yet.  If someone knows one, please yell!
> 
> The code that creates a tooltip frame could give it a frame property
> `tooltip' with value t.  Then it would be easy to distinguish them.

That sounds good.  Is it okay to change `delete-frame-hook' to a
standard hook where the frame to be deleted is made the selected frame?

-- 
John Paul Wallington

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

* Re: `delete-frame-hook' isn't defined
  2002-10-01 15:14       ` John Paul Wallington
@ 2002-10-02  4:07         ` Richard Stallman
  2002-10-02  9:59           ` John Paul Wallington
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2002-10-02  4:07 UTC (permalink / raw)
  Cc: emacs-devel

    That sounds good.  Is it okay to change `delete-frame-hook' to a
    standard hook where the frame to be deleted is made the selected frame?

I think it is cleaner to leave the calling convention unchanged.

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

* Re: `delete-frame-hook' isn't defined
  2002-10-02  4:07         ` Richard Stallman
@ 2002-10-02  9:59           ` John Paul Wallington
  2002-10-02 15:27             ` Juanma Barranquero
  2002-10-02 19:23             ` Richard Stallman
  0 siblings, 2 replies; 12+ messages in thread
From: John Paul Wallington @ 2002-10-02  9:59 UTC (permalink / raw)
  Cc: emacs-devel

>     That sounds good.  Is it okay to change `delete-frame-hook' to a
>     standard hook where the frame to be deleted is made the selected frame?
> 
> I think it is cleaner to leave the calling convention unchanged.

`delete-frame' now runs `delete-frame-functions' instead of
`delete-frame-hook'.  Is it worthwhile making `delete-frame-hook' an
alias for `delete-frame-functions' ?

-- 
John Paul Wallington

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

* Re: `delete-frame-hook' isn't defined
  2002-10-02  9:59           ` John Paul Wallington
@ 2002-10-02 15:27             ` Juanma Barranquero
  2002-10-02 19:23             ` Richard Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Juanma Barranquero @ 2002-10-02 15:27 UTC (permalink / raw)
  Cc: rms, emacs-devel

On Wed, 02 Oct 2002 10:59:44 +0100, John Paul Wallington <jpw@shootybangbang.com> wrote:

> `delete-frame' now runs `delete-frame-functions' instead of
> `delete-frame-hook'.  Is it worthwhile making `delete-frame-hook' an
> alias for `delete-frame-functions' ?

If you're renaming `delete-frame-hook' to `delete-frame-functions',
please add an alias (`delete-frame-hook' exists since 21.1) and also:

(make-obsolete-variable 'delete-frame-hook 'delete-frame-functions "21.4")


                                                           /L/e/k/t/u

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

* Re: `delete-frame-hook' isn't defined
  2002-10-02  9:59           ` John Paul Wallington
  2002-10-02 15:27             ` Juanma Barranquero
@ 2002-10-02 19:23             ` Richard Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2002-10-02 19:23 UTC (permalink / raw)
  Cc: emacs-devel

    `delete-frame' now runs `delete-frame-functions' instead of
    `delete-frame-hook'.  Is it worthwhile making `delete-frame-hook' an
    alias for `delete-frame-functions' ?

Yes, we may as well.  Can you also mark it obsolete so people
will change the name?

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

end of thread, other threads:[~2002-10-02 19:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-28  4:06 `delete-frame-hook' isn't defined John Paul Wallington
2002-09-29 18:44 ` Richard Stallman
2002-09-30 15:06   ` John Paul Wallington
2002-10-01  6:18     ` Richard Stallman
2002-10-01 15:14       ` John Paul Wallington
2002-10-02  4:07         ` Richard Stallman
2002-10-02  9:59           ` John Paul Wallington
2002-10-02 15:27             ` Juanma Barranquero
2002-10-02 19:23             ` Richard Stallman
2002-09-29 19:54 ` Stefan Monnier
2002-09-30 15:08   ` John Paul Wallington
2002-09-30 15:05     ` Stefan Monnier

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.