aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Colascione2018-06-11 16:54:23 -0700
committerDaniel Colascione2018-06-11 16:54:23 -0700
commit0626d5aba518a6d22ffacd7a1e3f4c70d7248e5f (patch)
tree8ed6504f2530faa7ed7cd768181cb5fabfc00700 /src
parent4ff438a45a5d3e380622ceaf4b9aa93cf89be4c8 (diff)
downloademacs-0626d5aba518a6d22ffacd7a1e3f4c70d7248e5f.tar.gz
emacs-0626d5aba518a6d22ffacd7a1e3f4c70d7248e5f.zip
Add after-delete-frame-functions
Instead of working around the behavior delete-frame-functions, just add an after-delete-frame-functions hook. * doc/lispref/frames.texi (Deleting Frames): Document `after-delete-frame-functions'. * etc/NEWS: Mention `after-delete-frame-functions'. * lisp/frame.el (blink-cursor--should-blink): (blink-cursor--rescan-frames, blink-frame-mode): Get rid of the ugly ignored-frame parameter and switch from `delete-frame-functions' to `after-delete-frame-functions'. * src/frame.c (syms_of_frame): New variable `after-delete-frame-functions'. (delete_frame): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index bf0269292d6..d477c1acc3f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2161,6 +2161,16 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
2161 if (!is_tooltip_frame) 2161 if (!is_tooltip_frame)
2162 update_mode_lines = 15; 2162 update_mode_lines = 15;
2163 2163
2164 /* Now run the post-deletion hooks. */
2165 if (NILP (Vrun_hooks) || is_tooltip_frame)
2166 ;
2167 else if (EQ (force, Qnoelisp))
2168 pending_funcalls
2169 = Fcons (list3 (Qrun_hook_with_args, Qafter_delete_frame_functions, frame),
2170 pending_funcalls);
2171 else
2172 safe_call2 (Qrun_hook_with_args, Qafter_delete_frame_functions, frame);
2173
2164 return Qnil; 2174 return Qnil;
2165} 2175}
2166 2176
@@ -5897,6 +5907,14 @@ recursively). */);
5897 Vdelete_frame_functions = Qnil; 5907 Vdelete_frame_functions = Qnil;
5898 DEFSYM (Qdelete_frame_functions, "delete-frame-functions"); 5908 DEFSYM (Qdelete_frame_functions, "delete-frame-functions");
5899 5909
5910 DEFVAR_LISP ("after-delete-frame-functions",
5911 Vafter_delete_frame_functions,
5912 doc: /* Functions run after deleting a frame.
5913The functions are run with one arg, the frame that was deleted and
5914which is now dead. */);
5915 Vafter_delete_frame_functions = Qnil;
5916 DEFSYM (Qafter_delete_frame_functions, "after-delete-frame-functions");
5917
5900 DEFVAR_LISP ("menu-bar-mode", Vmenu_bar_mode, 5918 DEFVAR_LISP ("menu-bar-mode", Vmenu_bar_mode,
5901 doc: /* Non-nil if Menu-Bar mode is enabled. 5919 doc: /* Non-nil if Menu-Bar mode is enabled.
5902See the command `menu-bar-mode' for a description of this minor mode. 5920See the command `menu-bar-mode' for a description of this minor mode.