diff options
| author | Juanma Barranquero | 2011-03-06 01:30:16 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2011-03-06 01:30:16 +0100 |
| commit | 845fc5e555e73449596ba475060fd2674f3b51e9 (patch) | |
| tree | 5f039af84ae06b3378829c498190df480c75ac84 | |
| parent | d3877e8f063815efe92b3bced08f54f9c1644b74 (diff) | |
| download | emacs-845fc5e555e73449596ba475060fd2674f3b51e9.tar.gz emacs-845fc5e555e73449596ba475060fd2674f3b51e9.zip | |
* lisp/bookmark.el:
* 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
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/bookmark.el | 3 | ||||
| -rw-r--r-- | lisp/desktop.el | 3 | ||||
| -rw-r--r-- | lisp/emacs-lock.el | 3 | ||||
| -rw-r--r-- | lisp/net/tramp-cache.el | 3 | ||||
| -rw-r--r-- | lisp/obsolete/fast-lock.el | 3 | ||||
| -rw-r--r-- | lisp/org/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/org/org-id.el | 3 | ||||
| -rw-r--r-- | lisp/ps-print.el | 3 | ||||
| -rw-r--r-- | lisp/saveplace.el | 3 | ||||
| -rw-r--r-- | lisp/textmodes/reftex.el | 7 |
11 files changed, 35 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84fcf3a0cff..283e07b7a19 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2011-03-06 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * bookmark.el: | ||
| 4 | * desktop.el: | ||
| 5 | * emacs-lock.el: | ||
| 6 | * ps-print.el: | ||
| 7 | * saveplace.el: | ||
| 8 | * net/tramp-cache.el: | ||
| 9 | * textmodes/reftex.el: | ||
| 10 | Don't set `kill-emacs-hook' on noninteractive sessions (bug#8137). | ||
| 11 | |||
| 1 | 2011-03-05 Antoine Levitt <antoine.levitt@gmail.com> | 12 | 2011-03-05 Antoine Levitt <antoine.levitt@gmail.com> |
| 2 | 13 | ||
| 3 | * files.el (delete-directory, copy-directory, list-directory): Use | 14 | * files.el (delete-directory, copy-directory, list-directory): Use |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index cd946e46be9..d3db54c81d4 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -2181,7 +2181,8 @@ This also runs `bookmark-exit-hook'." | |||
| 2181 | (bookmark-time-to-save-p t) | 2181 | (bookmark-time-to-save-p t) |
| 2182 | (bookmark-save))) | 2182 | (bookmark-save))) |
| 2183 | 2183 | ||
| 2184 | (add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal) | 2184 | (unless noninteractive |
| 2185 | (add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal)) | ||
| 2185 | 2186 | ||
| 2186 | (defun bookmark-unload-function () | 2187 | (defun bookmark-unload-function () |
| 2187 | "Unload the Bookmark library." | 2188 | "Unload the Bookmark library." |
diff --git a/lisp/desktop.el b/lisp/desktop.el index 4ca4cec38ff..fd5baaf020f 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -611,7 +611,8 @@ Furthermore, it clears the variables listed in `desktop-globals-to-clear'." | |||
| 611 | (delete-other-windows)) | 611 | (delete-other-windows)) |
| 612 | 612 | ||
| 613 | ;; ---------------------------------------------------------------------------- | 613 | ;; ---------------------------------------------------------------------------- |
| 614 | (add-hook 'kill-emacs-hook 'desktop-kill) | 614 | (unless noninteractive |
| 615 | (add-hook 'kill-emacs-hook 'desktop-kill)) | ||
| 615 | 616 | ||
| 616 | (defun desktop-kill () | 617 | (defun desktop-kill () |
| 617 | "If `desktop-save-mode' is non-nil, do what `desktop-save' says to do. | 618 | "If `desktop-save-mode' is non-nil, do what `desktop-save' says to do. |
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el index 22795a47d98..6033648298d 100644 --- a/lisp/emacs-lock.el +++ b/lisp/emacs-lock.el | |||
| @@ -88,7 +88,8 @@ If the buffer is locked, signal error and display its name." | |||
| 88 | (if emacs-lock-buffer-locked | 88 | (if emacs-lock-buffer-locked |
| 89 | (setq emacs-lock-from-exiting t))) | 89 | (setq emacs-lock-from-exiting t))) |
| 90 | 90 | ||
| 91 | (add-hook 'kill-emacs-hook 'check-emacs-lock) | 91 | (unless noninteractive |
| 92 | (add-hook 'kill-emacs-hook 'check-emacs-lock)) | ||
| 92 | (add-hook 'kill-buffer-hook 'emacs-lock-check-buffer-lock) | 93 | (add-hook 'kill-buffer-hook 'emacs-lock-check-buffer-lock) |
| 93 | (add-hook 'shell-mode-hook 'emacs-lock-was-buffer-locked) | 94 | (add-hook 'shell-mode-hook 'emacs-lock-was-buffer-locked) |
| 94 | (add-hook 'shell-mode-hook 'emacs-lock-shell-sentinel) | 95 | (add-hook 'shell-mode-hook 'emacs-lock-shell-sentinel) |
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index a98e523a68b..f8bc594e959 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -353,7 +353,8 @@ KEY identifies the connection, it is either a process or a vector." | |||
| 353 | (write-region | 353 | (write-region |
| 354 | (point-min) (point-max) tramp-persistency-file-name)))))) | 354 | (point-min) (point-max) tramp-persistency-file-name)))))) |
| 355 | 355 | ||
| 356 | (add-hook 'kill-emacs-hook 'tramp-dump-connection-properties) | 356 | (unless noninteractive |
| 357 | (add-hook 'kill-emacs-hook 'tramp-dump-connection-properties)) | ||
| 357 | (add-hook 'tramp-cache-unload-hook | 358 | (add-hook 'tramp-cache-unload-hook |
| 358 | '(lambda () | 359 | '(lambda () |
| 359 | (remove-hook 'kill-emacs-hook | 360 | (remove-hook 'kill-emacs-hook |
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 68d06ef34bc..a59e7871458 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el | |||
| @@ -840,7 +840,8 @@ See `fast-lock-get-face-properties'." | |||
| 840 | 840 | ||
| 841 | (add-hook 'after-save-hook 'fast-lock-save-cache-after-save-file) | 841 | (add-hook 'after-save-hook 'fast-lock-save-cache-after-save-file) |
| 842 | (add-hook 'kill-buffer-hook 'fast-lock-save-cache-before-kill-buffer) | 842 | (add-hook 'kill-buffer-hook 'fast-lock-save-cache-before-kill-buffer) |
| 843 | (add-hook 'kill-emacs-hook 'fast-lock-save-caches-before-kill-emacs) | 843 | (unless noninteractive |
| 844 | (add-hook 'kill-emacs-hook 'fast-lock-save-caches-before-kill-emacs)) | ||
| 844 | 845 | ||
| 845 | ;;;###autoload | 846 | ;;;###autoload |
| 846 | (when (fboundp 'add-minor-mode) | 847 | (when (fboundp 'add-minor-mode) |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 5f0908e11c6..54f2eaf2330 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-03-06 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * org-id.el: Don't set `kill-emacs-hook' on noninteractive sessions. | ||
| 4 | |||
| 1 | 2011-02-10 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2011-02-10 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * org-remember.el (org-remember-mode-map): | 7 | * org-remember.el (org-remember-mode-map): |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index 2f64b8b0bb6..b979097dee3 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -519,7 +519,8 @@ When CHECK is given, prepare detailed information about duplicate IDs." | |||
| 519 | (puthash id (abbreviate-file-name file) org-id-locations) | 519 | (puthash id (abbreviate-file-name file) org-id-locations) |
| 520 | (add-to-list 'org-id-files (abbreviate-file-name file)))) | 520 | (add-to-list 'org-id-files (abbreviate-file-name file)))) |
| 521 | 521 | ||
| 522 | (add-hook 'kill-emacs-hook 'org-id-locations-save) | 522 | (unless noninteractive |
| 523 | (add-hook 'kill-emacs-hook 'org-id-locations-save)) | ||
| 523 | 524 | ||
| 524 | (defun org-id-hash-to-alist (hash) | 525 | (defun org-id-hash-to-alist (hash) |
| 525 | "Turn an org-id hash into an alist, so that it can be written to a file." | 526 | "Turn an org-id hash into an alist, so that it can be written to a file." |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 19431c30d68..b51eb944696 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -6645,7 +6645,8 @@ If FACE is not a valid face name, use default face." | |||
| 6645 | (error "Unprinted PostScript")))) | 6645 | (error "Unprinted PostScript")))) |
| 6646 | 6646 | ||
| 6647 | (cond ((fboundp 'add-hook) | 6647 | (cond ((fboundp 'add-hook) |
| 6648 | (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check)) | 6648 | (unless noninteractive |
| 6649 | (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check))) | ||
| 6649 | (kill-emacs-hook | 6650 | (kill-emacs-hook |
| 6650 | (message "Won't override existing `kill-emacs-hook'")) | 6651 | (message "Won't override existing `kill-emacs-hook'")) |
| 6651 | (t | 6652 | (t |
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index b7d43bd230a..c10b5cbb7ec 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -300,7 +300,8 @@ may have changed\) back to `save-place-alist'." | |||
| 300 | 300 | ||
| 301 | (add-hook 'find-file-hook 'save-place-find-file-hook t) | 301 | (add-hook 'find-file-hook 'save-place-find-file-hook t) |
| 302 | 302 | ||
| 303 | (add-hook 'kill-emacs-hook 'save-place-kill-emacs-hook) | 303 | (unless noninteractive |
| 304 | (add-hook 'kill-emacs-hook 'save-place-kill-emacs-hook)) | ||
| 304 | 305 | ||
| 305 | (add-hook 'kill-buffer-hook 'save-place-to-alist) | 306 | (add-hook 'kill-buffer-hook 'save-place-to-alist) |
| 306 | 307 | ||
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 6719a647c36..7e150bff997 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -567,7 +567,7 @@ on the menu bar. | |||
| 567 | "Save RefTeX's parse file for this buffer if the information has changed." | 567 | "Save RefTeX's parse file for this buffer if the information has changed." |
| 568 | ;; Save the parsing information if it was modified. | 568 | ;; Save the parsing information if it was modified. |
| 569 | ;; This function should be installed in `kill-buffer-hook'. | 569 | ;; This function should be installed in `kill-buffer-hook'. |
| 570 | ;; We are careful to make sure nothing goes wring in this function. | 570 | ;; We are careful to make sure nothing goes wrong in this function. |
| 571 | (when (and (boundp 'reftex-mode) reftex-mode | 571 | (when (and (boundp 'reftex-mode) reftex-mode |
| 572 | (boundp 'reftex-save-parse-info) reftex-save-parse-info | 572 | (boundp 'reftex-save-parse-info) reftex-save-parse-info |
| 573 | (boundp 'reftex-docstruct-symbol) reftex-docstruct-symbol | 573 | (boundp 'reftex-docstruct-symbol) reftex-docstruct-symbol |
| @@ -2397,7 +2397,7 @@ IGNORE-WORDS List of words which should be removed from the string." | |||
| 2397 | (define-key reftex-mode-map | 2397 | (define-key reftex-mode-map |
| 2398 | reftex-extra-bindings-prefix | 2398 | reftex-extra-bindings-prefix |
| 2399 | reftex-extra-bindings-map)) | 2399 | reftex-extra-bindings-map)) |
| 2400 | 2400 | ||
| 2401 | 2401 | ||
| 2402 | ;;; ========================================================================= | 2402 | ;;; ========================================================================= |
| 2403 | ;;; | 2403 | ;;; |
| @@ -2568,7 +2568,8 @@ With optional NODE, go directly to that node." | |||
| 2568 | ;;; Install the kill-buffer and kill-emacs hooks ------------------------------ | 2568 | ;;; Install the kill-buffer and kill-emacs hooks ------------------------------ |
| 2569 | 2569 | ||
| 2570 | (add-hook 'kill-buffer-hook 'reftex-kill-buffer-hook) | 2570 | (add-hook 'kill-buffer-hook 'reftex-kill-buffer-hook) |
| 2571 | (add-hook 'kill-emacs-hook 'reftex-kill-emacs-hook) | 2571 | (unless noninteractive |
| 2572 | (add-hook 'kill-emacs-hook 'reftex-kill-emacs-hook)) | ||
| 2572 | 2573 | ||
| 2573 | ;;; Run Hook ------------------------------------------------------------------ | 2574 | ;;; Run Hook ------------------------------------------------------------------ |
| 2574 | 2575 | ||