]> git.eshelyaron.com Git - emacs.git/commitdiff
Disable desktop-restore-frames by default on Android
authorPo Lu <luangruo@yahoo.com>
Sat, 5 Apr 2025 02:30:30 +0000 (10:30 +0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 8 Apr 2025 05:41:39 +0000 (07:41 +0200)
* lisp/desktop.el (desktop-restore-frames): Default to nil when
\(featurep 'android).

* doc/emacs/misc.texi (Saving Emacs Sessions): Adjust to match.

(cherry picked from commit d582ed9dc9be516f17dc9a526c3f9615001a46a6)

doc/emacs/misc.texi
lisp/desktop.el

index 22de2c3f272b07f555c6e465329988087d5b37b6..7e9edfce26d2c345b38655fe34c780bea0c9330f 100644 (file)
@@ -2853,11 +2853,14 @@ can use @kbd{M-x desktop-read} to restore a previously-saved desktop
 if the current Emacs session didn't load any desktop yet.
 
 @vindex desktop-restore-frames
-  By default, the desktop tries to save and restore the frame and
-window configuration.  To disable this, set
-@code{desktop-restore-frames} to @code{nil}.  (See that variable's
-documentation for some related options that you can customize to
-fine-tune this behavior.)
+  By default, the desktop tries to save and restore the frame and window
+configuration.@footnote{Except on Android, where this option defaults to
+@code{nil} because the window manager (@pxref{Android Windowing}) is too
+prohibitive to admit of restoring frame configurations.}  To disable or
+enable this, set @code{desktop-restore-frames} to @code{nil} or any
+non-@code{nil} value respectively.  (See that variable's documentation
+for some related options that you can customize to fine-tune this
+behavior.)
 
 @vindex frameset-filter-alist
   When the desktop restores the frame and window configuration, it
index d1cbc3d7d93794bba40e3107e8de188da09ca903..ec5267b7073caf8a99dd24a4ccb5cb627ca8f9ab 100644 (file)
@@ -423,13 +423,17 @@ host is off-line."
   :type '(repeat symbol)
   :group 'desktop)
 
-(defcustom desktop-restore-frames t
+(defcustom desktop-restore-frames (not (featurep 'android))
   "When non-nil, save and restore the frame and window configuration.
 See related options `desktop-restore-reuses-frames',
-`desktop-restore-in-current-display', and `desktop-restore-forces-onscreen'."
+`desktop-restore-in-current-display', and `desktop-restore-forces-onscreen'.
+
+This option is enabled by default elsewhere than on Android, where it is
+disabled by default as programs are too handicapped by the window
+manager for frames to be restored."
   :type 'boolean
   :group 'desktop
-  :version "24.4")
+  :version "31.1")
 
 (defcustom desktop-restore-in-current-display t
   "Controls how restoring of frames treats displays.