I have this function in config
(defun launch-separate-emacs-under-x () (interactive) (call-process "sh" nil nil nil "-c" "emacs &")) (defun restart-emacs () (interactive) (add-hook 'kill-emacs-hook (if (display-graphic-p) #'launch-separate-emacs-under-x #'launch-separate-emacs-in-terminal) t) (kill-emacs))
In general if i execute any command say
package-install it will be added to command history. But when I execute above function using
M-x, it is not getting added into commands history. How to make emacs to add this command to history?