]> code.delx.au - gnu-emacs/commitdiff
* lisp/bookmark.el:
authorJuanma Barranquero <lekktu@gmail.com>
Sun, 6 Mar 2011 00:30:16 +0000 (01:30 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Sun, 6 Mar 2011 00:30:16 +0000 (01:30 +0100)
* lisp/desktop.el:
* lisp/emacs-lock.el:
* lisp/ps-print.el:
* lisp/saveplace.el:
* lisp/net/tramp-cache.el:
* lisp/textmodes/reftex.el:
* lisp/org/org-id.el: Don't set `kill-emacs-hook' on noninteractive sessions.

Fixes: debbugs:8137
lisp/ChangeLog
lisp/bookmark.el
lisp/desktop.el
lisp/emacs-lock.el
lisp/net/tramp-cache.el
lisp/obsolete/fast-lock.el
lisp/org/ChangeLog
lisp/org/org-id.el
lisp/ps-print.el
lisp/saveplace.el
lisp/textmodes/reftex.el

index 84fcf3a0cffe4510142a5c8d17a3c2e374b115e8..283e07b7a194583bc0e7f49e125abc3e70ca6c38 100644 (file)
@@ -1,3 +1,14 @@
+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
index cd946e46be95a142e421268444f27a23f6f16dee..d3db54c81d4aa4da3de5eed0df4b82911e25d2f4 100644 (file)
@@ -2181,7 +2181,8 @@ This also runs `bookmark-exit-hook'."
        (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."
index 4ca4cec38fffec1a5e418d0d5cb17a9944dc9c82..fd5baaf020f7c2b51391c82adb28168b55e090f5 100644 (file)
@@ -611,7 +611,8 @@ Furthermore, it clears the variables listed in `desktop-globals-to-clear'."
   (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.
index 22795a47d9809dafcda9fe81a08a00e814af0547..6033648298dd42552495cc16959460b52b669361 100644 (file)
@@ -88,7 +88,8 @@ If the buffer is locked, signal error and display its name."
   (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)
index a98e523a68bccc1ebc33fab6d75d97f33d8521d4..f8bc594e959bed5d4a92d7a732e9e56da23859f1 100644 (file)
@@ -353,7 +353,8 @@ KEY identifies the connection, it is either a process or a vector."
          (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
index 68d06ef34bc2c394f5e936ce53d038b67a5b3364..a59e78714588e32f3cd0776a9fc58ae9a1ea1a37 100644 (file)
@@ -840,7 +840,8 @@ See `fast-lock-get-face-properties'."
 
 (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)
index 5f0908e11c6098075eb67a779e0033be139196e1..54f2eaf2330923098a33ecf6a81c9c2d6f0f6b00 100644 (file)
@@ -1,3 +1,7 @@
+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):
index 2f64b8b0bb655b9e7084b59cf921b50a5bc9654b..b979097dee355760cb215ed380a5bc2ad3ef5d17 100644 (file)
@@ -519,7 +519,8 @@ When CHECK is given, prepare detailed information about duplicate IDs."
     (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."
index 19431c30d68def8a852536ccb3fbfd23788e5199..b51eb94469654506a8bea7be059f91038cc2c6ef 100644 (file)
@@ -6645,7 +6645,8 @@ If FACE is not a valid face name, use default face."
         (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
index b7d43bd230a88869a4eb0c66ae09974775351dec..c10b5cbb7eccce217dd59941bafd053e63d13a09 100644 (file)
@@ -300,7 +300,8 @@ may have changed\) back to `save-place-alist'."
 
 (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)
 
index 6719a647c36a43045f57ed7e7d69bc4aec01b1b6..7e150bff997bcea26121bbb4a131beece1753a9f 100644 (file)
@@ -567,7 +567,7 @@ on the menu bar.
   "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
@@ -2397,7 +2397,7 @@ IGNORE-WORDS List of words which should be removed from the string."
   (define-key reftex-mode-map
     reftex-extra-bindings-prefix
     reftex-extra-bindings-map))
-    
+
 
 ;;; =========================================================================
 ;;;
@@ -2568,7 +2568,8 @@ With optional NODE, go directly to that node."
 ;;; 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 ------------------------------------------------------------------