bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8137: Requiring a file during bytecompilation runs that file's kill-


From: Juanma Barranquero
Subject: bug#8137: Requiring a file during bytecompilation runs that file's kill-emacs-hook.
Date: Thu, 3 Mar 2011 18:18:40 +0100

On Mon, Feb 28, 2011 at 18:23, Chong Yidong <address@hidden> wrote:

> There are nine other places in Emacs that add to kill-emacs-hook at
> top-level, which ought to be checked too.

There are twelve places, counting Org.

bookmark.el
desktop.el
emacs-lock.el
ps-print.el
saveplace.el
net/tramp-cache.el
obsolete/fast-lock.el
org/ob.el
org/org-id.el
progmodes/ps-mode.el
textmodes/reftex.el
textmodes/tex-mode.el

There's no obvious case (that I can see) designed for non-interactive
use, so I'd say let's apply the change and see whether someone
complains.

    Juanma




=== modified file 'lisp/bookmark.el'
--- lisp/bookmark.el    2011-02-10 16:56:00 +0000
+++ lisp/bookmark.el    2011-03-03 16:58:14 +0000
@@ -2181,7 +2181,8 @@
        (bookmark-time-to-save-p t)
        (bookmark-save)))

-(add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal))

 (defun bookmark-unload-function ()
   "Unload the Bookmark library."

=== modified file 'lisp/desktop.el'
--- lisp/desktop.el     2011-01-26 08:36:39 +0000
+++ lisp/desktop.el     2011-03-03 16:57:13 +0000
@@ -611,7 +611,8 @@
   (delete-other-windows))

 ;; ----------------------------------------------------------------------------
-(add-hook 'kill-emacs-hook 'desktop-kill)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'desktop-kill))

 (defun desktop-kill ()
   "If `desktop-save-mode' is non-nil, do what `desktop-save' says to do.

=== modified file 'lisp/emacs-lock.el'
--- lisp/emacs-lock.el  2011-01-25 04:08:28 +0000
+++ lisp/emacs-lock.el  2011-03-03 16:56:27 +0000
@@ -88,7 +88,8 @@
   (if emacs-lock-buffer-locked
       (setq emacs-lock-from-exiting t)))

-(add-hook 'kill-emacs-hook 'check-emacs-lock)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'check-emacs-lock))
 (add-hook 'kill-buffer-hook 'emacs-lock-check-buffer-lock)
 (add-hook 'shell-mode-hook 'emacs-lock-was-buffer-locked)
 (add-hook 'shell-mode-hook 'emacs-lock-shell-sentinel)

=== modified file 'lisp/net/tramp-cache.el'
--- lisp/net/tramp-cache.el     2011-02-05 09:52:07 +0000
+++ lisp/net/tramp-cache.el     2011-03-03 16:48:37 +0000
@@ -353,7 +353,8 @@
          (write-region
           (point-min) (point-max) tramp-persistency-file-name))))))

-(add-hook 'kill-emacs-hook 'tramp-dump-connection-properties)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'tramp-dump-connection-properties))
 (add-hook 'tramp-cache-unload-hook
          '(lambda ()
             (remove-hook 'kill-emacs-hook

=== modified file 'lisp/obsolete/fast-lock.el'
--- lisp/obsolete/fast-lock.el  2011-01-25 04:08:28 +0000
+++ lisp/obsolete/fast-lock.el  2011-03-03 16:46:59 +0000
@@ -840,7 +840,8 @@

 (add-hook 'after-save-hook 'fast-lock-save-cache-after-save-file)
 (add-hook 'kill-buffer-hook 'fast-lock-save-cache-before-kill-buffer)
-(add-hook 'kill-emacs-hook 'fast-lock-save-caches-before-kill-emacs)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'fast-lock-save-caches-before-kill-emacs))

 ;;;###autoload
 (when (fboundp 'add-minor-mode)

=== modified file 'lisp/org/ob.el'
--- lisp/org/ob.el      2011-01-25 04:08:28 +0000
+++ lisp/org/ob.el      2011-03-03 16:46:31 +0000
@@ -1959,7 +1959,8 @@
        (message "Failed to remove temporary Org-babel directory %s"
                org-babel-temporary-directory)))))

-(add-hook 'kill-emacs-hook 'org-babel-remove-temporary-directory)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'org-babel-remove-temporary-directory))

 (provide 'ob)


=== modified file 'lisp/org/org-id.el'
--- lisp/org/org-id.el  2011-01-25 04:08:28 +0000
+++ lisp/org/org-id.el  2011-03-03 16:44:19 +0000
@@ -519,7 +519,8 @@
     (puthash id (abbreviate-file-name file) org-id-locations)
     (add-to-list 'org-id-files (abbreviate-file-name file))))

-(add-hook 'kill-emacs-hook 'org-id-locations-save)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'org-id-locations-save))

 (defun org-id-hash-to-alist (hash)
   "Turn an org-id hash into an alist, so that it can be written to a file."

=== modified file 'lisp/progmodes/ps-mode.el'
--- lisp/progmodes/ps-mode.el   2011-01-26 08:36:39 +0000
+++ lisp/progmodes/ps-mode.el   2011-03-03 16:45:31 +0000
@@ -1162,7 +1162,8 @@

 
 ;;
-(add-hook 'kill-emacs-hook 'ps-run-cleanup)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'ps-run-cleanup))

 (provide 'ps-mode)


=== modified file 'lisp/ps-print.el'
--- lisp/ps-print.el    2011-02-03 07:21:56 +0000
+++ lisp/ps-print.el    2011-03-03 16:52:22 +0000
@@ -6645,7 +6645,8 @@
         (error "Unprinted PostScript"))))

 (cond ((fboundp 'add-hook)
-       (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check))
+       (unless noninteractive
+         (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check)))
       (kill-emacs-hook
        (message "Won't override existing `kill-emacs-hook'"))
       (t

=== modified file 'lisp/saveplace.el'
--- lisp/saveplace.el   2011-01-25 04:08:28 +0000
+++ lisp/saveplace.el   2011-03-03 16:38:03 +0000
@@ -300,7 +300,8 @@

 (add-hook 'find-file-hook 'save-place-find-file-hook t)

-(add-hook 'kill-emacs-hook 'save-place-kill-emacs-hook)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'save-place-kill-emacs-hook))

 (add-hook 'kill-buffer-hook 'save-place-to-alist)


=== modified file 'lisp/textmodes/reftex.el'
--- lisp/textmodes/reftex.el    2011-01-25 04:08:28 +0000
+++ lisp/textmodes/reftex.el    2011-03-03 16:45:48 +0000
@@ -2568,7 +2568,8 @@
 ;;; Install the kill-buffer and kill-emacs hooks ------------------------------

 (add-hook 'kill-buffer-hook 'reftex-kill-buffer-hook)
-(add-hook 'kill-emacs-hook  'reftex-kill-emacs-hook)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook  'reftex-kill-emacs-hook))

 ;;; Run Hook ------------------------------------------------------------------


=== modified file 'lisp/textmodes/tex-mode.el'
--- lisp/textmodes/tex-mode.el  2011-01-28 21:16:04 +0000
+++ lisp/textmodes/tex-mode.el  2011-03-03 16:37:51 +0000
@@ -1990,7 +1990,8 @@
            (delete-file (concat dir (car list))))
           (setq list (cdr list))))))

-(add-hook 'kill-emacs-hook 'tex-delete-last-temp-files)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'tex-delete-last-temp-files))

 ;;
 ;; Machinery to guess the command that the user wants to execute.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]