diff options
author | Case Duckworth | 2022-02-07 13:14:10 -0600 |
---|---|---|
committer | Case Duckworth | 2022-02-07 13:14:10 -0600 |
commit | 3b9b91686f15492bfe7652c26a9698b3ef6524ae (patch) | |
tree | 154dfd273c8cf07609f4ffee0dcda5dc764a429f /lisp | |
parent | Add gdrive.el, which is unfinished (diff) | |
download | emacs-3b9b91686f15492bfe7652c26a9698b3ef6524ae.tar.gz emacs-3b9b91686f15492bfe7652c26a9698b3ef6524ae.zip |
Unglobify user-save-mode
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/user-save.el | 13 |
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))) |