[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 b88f4a2 2/2: Avoid breaking non-xwidget Emacs tha
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs-25 b88f4a2 2/2: Avoid breaking non-xwidget Emacs that happen to load xwidget.el. |
Date: |
Tue, 19 Jan 2016 23:07:29 +0000 |
branch: emacs-25
commit b88f4a2c7624362081aca2bc81cc0c5c72b7245d
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Avoid breaking non-xwidget Emacs that happen to load xwidget.el.
* lisp/xwidget.el (window-configuration-change-hook)
(kill-buffer-query-functions): Only modify these hooks if
compiled with xwidget support.
---
lisp/xwidget.el | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index 17fcf3d..ff3b977 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -571,7 +571,8 @@ It can be retrieved with `(xwidget-get XWIDGET PROPNAME)'."
;; This would have felt better in C, but this seems to work well in
;; practice though.
-(add-hook 'window-configuration-change-hook 'xwidget-delete-zombies)
+(if (featurep 'xwidget-internal)
+ (add-hook 'window-configuration-change-hook 'xwidget-delete-zombies))
(defun xwidget-kill-buffer-query-function ()
"Ask beforek illing a buffer that has xwidgets."
@@ -582,7 +583,8 @@ It can be retrieved with `(xwidget-get XWIDGET PROPNAME)'."
(format "Buffer %S has xwidgets; kill it? "
(buffer-name (current-buffer)))))))
-(add-hook 'kill-buffer-query-functions 'xwidget-kill-buffer-query-function)
+(if (featurep 'xwidget-internal)
+ (add-hook 'kill-buffer-query-functions
'xwidget-kill-buffer-query-function))
(provide 'xwidget)