all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 8137@debbugs.gnu.org
Subject: bug#8137: Requiring a file during bytecompilation runs that file's kill-emacs-hook.
Date: Thu, 3 Mar 2011 18:18:40 +0100	[thread overview]
Message-ID: <AANLkTin+YreMDgvSwkjK3a3fdTNSJ_pWwZny4bdEjE19@mail.gmail.com> (raw)
In-Reply-To: <8762s413bc.fsf@stupidchicken.com>

On Mon, Feb 28, 2011 at 18:23, Chong Yidong <cyd@stupidchicken.com> 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 @@

 \f
 ;;
-(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	other threads:[~2011-03-03 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28  5:13 bug#8137: Requiring a file during bytecompilation runs that file's kill-emacs-hook Juanma Barranquero
2011-02-28  9:28 ` martin rudalics
2011-02-28 12:27   ` Juanma Barranquero
2011-02-28 14:14     ` martin rudalics
2011-02-28 17:23 ` Chong Yidong
2011-03-03 17:18   ` Juanma Barranquero [this message]
2011-03-05 20:24     ` Chong Yidong
2011-03-05 22:34       ` Juanma Barranquero
2011-03-05 23:58         ` Chong Yidong
2011-03-06  0:58           ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTin+YreMDgvSwkjK3a3fdTNSJ_pWwZny4bdEjE19@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=8137@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.