diff options
author | JSDurand <mmemmew@gmail.com> | 2022-11-24 16:47:27 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-11-24 16:47:27 +0800 |
commit | 6586ca65a26bc5e4bb446eff0a2fb314724f4e64 (patch) | |
tree | 75dd44d291d1e7bec964865c85971d534ea5ce13 | |
parent | 6372bfbf10b500ce708a9f0fde8caae67c667d7a (diff) |
desktop: silently save bookmarks
* desktop-conf.el (desktop-save-hook, durand-bookmark-save): Do not
display messages emitted by `bookmark-save' automatically, but log
them to the *Messages* buffer.
-rw-r--r-- | desktop-conf.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/desktop-conf.el b/desktop-conf.el index 7478742..6fa2ab0 100644 --- a/desktop-conf.el +++ b/desktop-conf.el @@ -40,12 +40,18 @@ ;;; Also save bookmarks before -(add-hook 'desktop-save-hook #'bookmark-save) +(defun durand-bookmark-save () + "Silently save bookmarks." + (let ((inhibit-message t)) + (cond ((featurep 'bookmark) (bookmark-save nil nil nil))))) + +(add-hook 'desktop-save-hook #'durand-bookmark-save) ;;; Overwrite the saving function ;; Modify to hard-code the directory to save the desktop file. -(defun durand-desktop-save-a (dirname &optional release only-if-changed version) +(defun durand-desktop-save-a + (dirname &optional release only-if-changed version) "Save the state of Emacs in a desktop file in directory DIRNAME. Optional argument RELEASE non-nil says we're done with this desktop, in which case this function releases the lock of the |