changeset 483:991f80dc633d

[xemacs-hg @ 2001-04-24 16:25:15 by hrvojen] Make sure the callbacks in about-finish-buffer work even if the event is nil. Published in <sxs1yqi467q.fsf@florida.arsdigita.de>.
author hrvojen
date Tue, 24 Apr 2001 16:25:18 +0000
parents f4f05bb53234
children 029314e67086
files lisp/ChangeLog lisp/about.el
diffstat 2 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Apr 24 14:40:10 2001 +0000
+++ b/lisp/ChangeLog	Tue Apr 24 16:25:18 2001 +0000
@@ -1,3 +1,8 @@
+2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+	* about.el (about-finish-buffer): Make sure the last change works
+	even if EVENT is nil.
+
 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
 
 	* about.el (about-mailto-link): Use compose-mail for sending mail.
--- a/lisp/about.el	Tue Apr 24 14:40:10 2001 +0000
+++ b/lisp/about.el	Tue Apr 24 16:25:18 2001 +0000
@@ -307,16 +307,20 @@
       (widget-create 'link
 		     :help-echo "Bury this buffer"
 		     :action (lambda (widget event)
-			       ;; For some reason,
-			       ;; (bury-buffer (event-buffer event))
-			       ;; doesn't work.
-			       (with-selected-window (event-window event)
+			       (if event
+				   ;; For some reason,
+				   ;; (bury-buffer (event-buffer event))
+				   ;; doesn't work.
+				   (with-selected-window (event-window event)
+				     (bury-buffer))
 				 (bury-buffer)))
 		     :tag "Bury")
     (widget-create 'link
 		   :help-echo "Kill this buffer"
 		   :action (lambda (widget event)
-			     (kill-buffer (event-buffer event)))
+			     (if event
+				 (kill-buffer (event-buffer event))
+			       (kill-buffer (current-buffer))))
 		   :tag "Kill"))
   (widget-insert " this buffer and return to previous.\n")
   (use-local-map (make-sparse-keymap))