about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/user-save.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/user-save.el b/lisp/user-save.el index 1284547..8e01af1 100644 --- a/lisp/user-save.el +++ b/lisp/user-save.el
@@ -73,9 +73,16 @@ whether the buffer needs to be saved."
73(define-minor-mode user-save-mode 73(define-minor-mode user-save-mode
74 "Mode to enable an an extra user-save hook." 74 "Mode to enable an an extra user-save hook."
75 :lighter " US" 75 :lighter " US"
76 :global t 76 :keymap user-save-mode-map)
77 :keymap 'user-save-mode-map 77
78 (if user-save-mode 78;;;###autoload
79(defun turn-off-user-save-mode ()
80 "Turn off `user-save-mode' in the current buffer."
81 (user-save-mode -1))
82
83;;;###autoload
84(define-globalized-minor-mode user-save-global-mode user-save-mode user-save-mode
85 (if user-save-global-mode
79 (when user-save-hook-into-kill-emacs 86 (when user-save-hook-into-kill-emacs
80 (add-hook 'kill-emacs-hook #'user-save-some-buffers)) 87 (add-hook 'kill-emacs-hook #'user-save-some-buffers))
81 (remove-hook 'kill-emacs-hook #'user-save-some-buffers))) 88 (remove-hook 'kill-emacs-hook #'user-save-some-buffers)))