Desktop: Comment out obsolete code.

master
Pierre Neidhardt 2020-09-27 12:39:16 +02:00
parent 80ffff63cf
commit e8e6d7f0cd
1 changed files with 15 additions and 17 deletions

View File

@ -234,23 +234,21 @@
;;; REVIEW: `desktop-kill' should not query the user in `kill-emacs-hook'. ;;; REVIEW: `desktop-kill' should not query the user in `kill-emacs-hook'.
;;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28943 ;;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28943
(defun ambrevar/desktop-setup (&rest _ignored) (defun ambrevar/desktop-setup (&rest _ignored)
(when (and (fboundp 'server-running-p) (when (or (not (boundp 'desktop-save-mode))
(server-running-p) (null desktop-save-mode))
(or (not (boundp 'desktop-save-mode)) ;; (when (< emacs-major-version 27)
(null desktop-save-mode))) ;; ;; TODO: By default, Emacs<27 prompts for unsafe variable when loading desktop
(when (< emacs-major-version 27) ;; ;; which stucks the daemon. Disable this behaviour.
;; TODO: By default, Emacs<27 prompts for unsafe variable when loading desktop ;; (defun ambrevar/enable-safe-local-variables ()
;; which stucks the daemon. Disable this behaviour. ;; (setq enable-local-variables t))
(defun ambrevar/enable-safe-local-variables () ;; (add-hook 'after-init-hook 'ambrevar/enable-safe-local-variables))
(setq enable-local-variables t)) (require 'desktop) ; This adds a hook to `after-init-hook'.
(add-hook 'after-init-hook 'ambrevar/enable-safe-local-variables)) ;; (when (< emacs-major-version 27)
(require 'desktop) ; This adds a hook to `after-init-hook'. ;; (defun ambrevar/enable-all-local-variables ()
(when (< emacs-major-version 27) ;; (setq enable-local-variables :all))
(defun ambrevar/enable-all-local-variables () ;; (add-hook 'after-init-hook 'ambrevar/enable-all-local-variables))
(setq enable-local-variables :all)) ;; (when (< emacs-major-version 27)
(add-hook 'after-init-hook 'ambrevar/enable-all-local-variables)) ;; (load "patch-desktop"))
(when (< emacs-major-version 27)
(load "patch-desktop"))
(setq history-length 250 (setq history-length 250
;; Default timer (30) is way too high: for somebody too frenzy, the timer ;; Default timer (30) is way too high: for somebody too frenzy, the timer
;; might never be saved. See ;; might never be saved. See