+2011-03-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * bookmark.el:
+ * desktop.el:
+ * emacs-lock.el:
+ * ps-print.el:
+ * saveplace.el:
+ * net/tramp-cache.el:
+ * textmodes/reftex.el:
+ Don't set `kill-emacs-hook' on noninteractive sessions (bug#8137).
+
2011-03-05 Antoine Levitt <antoine.levitt@gmail.com>
* files.el (delete-directory, copy-directory, list-directory): Use
(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."
(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.
(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)
(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
(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)
+2011-03-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * org-id.el: Don't set `kill-emacs-hook' on noninteractive sessions.
+
2011-02-10 Stefan Monnier <monnier@iro.umontreal.ca>
* org-remember.el (org-remember-mode-map):
(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."
(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
(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)
"Save RefTeX's parse file for this buffer if the information has changed."
;; Save the parsing information if it was modified.
;; This function should be installed in `kill-buffer-hook'.
- ;; We are careful to make sure nothing goes wring in this function.
+ ;; We are careful to make sure nothing goes wrong in this function.
(when (and (boundp 'reftex-mode) reftex-mode
(boundp 'reftex-save-parse-info) reftex-save-parse-info
(boundp 'reftex-docstruct-symbol) reftex-docstruct-symbol
(define-key reftex-mode-map
reftex-extra-bindings-prefix
reftex-extra-bindings-map))
-
+
;;; =========================================================================
;;;
;;; 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 ------------------------------------------------------------------