fix(lib): restart-emacs name collision on Emacs 29+
Emacs 29 introduces a new command: restart-emacs, which clashes with the more featureful restart-emacs package that Doom installs to manage the session. Fortunately, the built-in one is defines in files.el, which is eagerly loaded at startup, so as long as the third-party one is loaded (at some point), it shouldn't be a problem. Fix: #6492
This commit is contained in:
parent
170dadca5a
commit
f0e8728bbc
1 changed files with 8 additions and 1 deletions
|
@ -113,7 +113,13 @@
|
|||
(doom-save-session file))
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'doom/restart #'restart-emacs)
|
||||
(defun doom/restart ()
|
||||
"Restart Emacs (and the daemon, if active).
|
||||
|
||||
Unlike `doom/restart-and-restore', does not restart the current session."
|
||||
(interactive)
|
||||
(require 'restart-emacs)
|
||||
(restart-emacs))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/restart-and-restore (&optional debug)
|
||||
|
@ -122,6 +128,7 @@
|
|||
If DEBUG (the prefix arg) is given, start the new instance with the --debug
|
||||
switch."
|
||||
(interactive "P")
|
||||
(require 'restart-emacs)
|
||||
(doom/quicksave-session)
|
||||
(save-some-buffers nil t)
|
||||
(letf! ((#'save-buffers-kill-emacs #'kill-emacs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue