An upgraded (version 208) desktop file cannot be read in Emacs < 25.
* etc/NEWS: Add an entry about upgrading a desktop file.
* lisp/desktop.el (desktop-file-version): Amend doc string.
(desktop-native-file-version, desktop-io-file-version): new variables.
(desktop-clear): Set desktop-io-file-version to nil.
(desktop-buffer-info): make the presence of the last item on the list
conditional on (>= desktop-io-file-version 208).
(desktop-save): Add extra parameter VERSION to take user's C-u or C-u C-u.
Amend the doc string. Add code to determine the output file version.
(desktop-create-buffer): Set desktop-io-file-version to the input file's
version.
Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
Most of these fixes are to documentation; many involve fixing
longstanding quoting glitches that are independent of the
recent substitute-command-keys changes. The changes to code are:
* lisp/cedet/mode-local.el (mode-local-augment-function-help)
(describe-mode-local-overload):
Substitute docstrings before displaying them.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
Quote the generated docstring for later substitution.
Also, the system-name variable is now obsolete.
Fixes Bug#19438.
* doc/lispref/os.texi (System Environment):
* etc/NEWS: Document this.
* doc/misc/efaq.texi:
(Displaying the current file name in the titlebar):
* lisp/desktop.el (desktop-save-frameset):
* lisp/dnd.el (dnd-get-local-file-uri):
* lisp/gnus/message.el (message-make-fqdn):
* lisp/gnus/nnvirtual.el (nnvirtual-retrieve-headers)
(nnvirtual-update-xref-header):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/org/org-clock.el (org-clock-save):
* src/filelock.c (current_lock_owner):
* src/xrdb.c (get_environ_db):
* src/xterm.c (same_x_server):
* src/xterm.c (x_term_init):
Prefer (system-name) to system-name, and avoid naming
locals 'system-name'.
* doc/misc/smtpmail.texi (Server workarounds): Fix grammar.
* lisp/startup.el (system-name): Now an obsolete variable.
* src/editfns.c (cached_system_name): New static var.
(init_and_cache_system_name): New function.
(init_editfns, Fsystem_name): Use it.
(syms_of_editfns): Initialize it and Vsystem_name to the same value.
* src/sysdep.c [HAVE_SOCKETS]: Don't include <sys/socket.h>, <netdb.h>.
(h_errno) [TRY_AGAIN && !HAVE_H_ERRNO]: Remove decl.
(init_system_name) [HAVE_SOCKETS]: Don't canonicalize the name.
Don't create a new string if the current value is already correct.
(desktop-auto-save-disable): New functions.
(desktop-save-mode, desktop-auto-save-timeout): Use them.
(desktop-read): Disable the autosave before loading the desktop,
and enable afterwards.
Fixes: debbugs:17351
(desktop-save-mode, desktop-auto-save-timeout): Add/remove
`desktop-auto-save-set-timer' to/from `window-configuration-change-hook'.
(desktop-auto-save-set-timer): Change REPEAT arg of
`run-with-idle-timer' from t to nil.
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00147.html
* doc/emacs/misc.texi (Saving Emacs Sessions):
Be briefer about desktop's handling of frames.
The manual does not need to mention every option, nor should
it just repeat the doc-strings.
* lisp/desktop.el (desktop-restore-frames)
(desktop-restore-in-current-display, desktop-restore-forces-onscreen)
(desktop-restore-reuses-frames): Doc tweaks.
* etc/NEWS: Related edits.
* lisp/desktop.el (desktop-restore-forces-onscreen)
(desktop-restore-reuses-frames): Use non-keyword values.
(desktop-restore-frameset): Use CLEANUP-FRAMES arg of frameset-restore.
* lisp/frameset.el: Separate options for reusing frames and cleaning up.
(frameset--reuse-list): Remove definition; declare.
(frameset--action-map): Declare.
(frameset--find-frame-if): Doc fix.
(frameset--restore-frame): Cache frame action.
(frameset-restore): New keyword arg CLEANUP-FRAMES, allows to select
how to clean up the frame list after restoring. Remove cleaning
options from REUSE-FRAMES. Change all keyword values to symbols.
(frameset--jump-to-register): Simplify by using CLEANUP-FRAMES.
when enabling, and `desktop-auto-save-cancel-timer' when disabling.
(desktop-auto-save-cancel-timer): New function with some code from
`desktop-auto-save-set-timer'.
(after-init-hook): Don't call `desktop-auto-save-set-timer'.
Instead of setting `desktop-save-mode' to nil, call
`desktop-save-mode' with arg 0.
Fixes: debbugs:16630
`auto-save-timeout'. Doc fix.
(desktop-save): Skip the timestamp in desktop-saved-frameset
when checking for auto-save changes.
(desktop-auto-save): Don't call desktop-auto-save-set-timer since
`desktop-auto-save' is called repeatedly by the idle timer.
(desktop-auto-save-set-timer): Replace `run-with-timer' with
`run-with-idle-timer' and a non-nil arg REPEAT. Doc fix.
Fixes: debbugs:15331
* doc/emacs/ack.texi (Acknowledgments):
* doc/emacs/emacs.texi (Acknowledgments):
* doc/lispref/intro.texi (Acknowledgments): Use accented form of some names.
* lisp/emacs-lisp/authors.el (authors-aliases, authors-ignored-files):
Add some entries.
(authors-fixed-entries): Use accented form of name.
(frameset): Use type vector, not list (incompatible change).
Do not declare a new constructor, use the default one.
Upgrade suggested properties `app', `name' and `desc' to slots `app',
`name' and `description', respectively, and add read-only slot `timestamp'.
Doc fixes.
(frameset-copy, frameset-persistent-filter-alist)
(frameset-filter-alist, frameset-switch-to-gui-p)
(frameset-switch-to-tty-p, frameset-filter-tty-to-GUI)
(frameset-filter-sanitize-color, frameset-filter-minibuffer)
(frameset-filter-iconified, frameset-keep-original-display-p):
Doc fixes.
(frameset-filter-shelve-param, frameset-filter-unshelve-param):
Rename from frameset-filter-(save|restore)-param. All callers changed.
Doc fix.
(frameset-p): Adapt to change to vector and be more thorough.
Change arg name to OBJECT. Doc fix.
(frameset-prop): Rename arg PROP to PROPERTY. Doc fix.
(frameset-session-filter-alist): Rename from frameset-live-filter-alist.
All callers changed.
(frameset-frame-with-id): Rename from frameset-locate-frame-id.
All callers changed.
(frameset--record-minibuffer-relationships): Rename from
frameset--process-minibuffer-frames. All callers changed.
(frameset-save): Add new keyword arguments APP, NAME and DESCRIPTION.
Use new default constructor (again). Doc fix.
(frameset--find-frame-if): Rename from `frameset--find-frame.
All callers changed.
(frameset--reuse-frame): Rename arg FRAME-CFG to PARAMETERS.
(frameset--initial-params): Rename arg FRAME-CFG to PARAMETERS.
Doc fix.
(frameset--restore-frame): Rename args FRAME-CFG and WINDOW-CFG to
PARAMETERS and WINDOW-STATE, respectively.
(frameset-restore): Add new keyword argument PREDICATE.
Reset frameset--target-display to nil. Doc fix.
lisp/desktop.el (desktop-save-frameset): Use new frameset-save args.
Use lexical-binding.
(frameset): Add docstring. Move :version property to its
own `version' slot.
(frameset-copy): Rename from copy-frameset.
(frameset-p): Check more thoroughly.
(frameset-prop): Do not check for :version, which is no longer a prop.
(frameset-live-filter-alist, frameset-persistent-filter-alist):
Use new :never value instead of t.
(frameset-filter-alist): Expand and clarify docstring.
(frameset-filter-tty-to-GUI, frameset-filter-sanitize-color)
(frameset-filter-minibuffer, frameset-filter-save-param)
(frameset-filter-restore-param, frameset-filter-iconified):
Add pointer to docstring of frameset-filter-alist.
(frameset-filter-params): Rename filter values to be more meaningful:
:never instead of t, and reverse the meanings of :save and :restore.
(frameset--process-minibuffer-frames): Clarify error message.
(frameset-save): Avoid unnecessary and confusing call to framep.
Use new BOA constructor for framesets.
(frameset--reuse-list): Doc fix.
(frameset--restore-frame): Rename from frameset--get-frame. Doc fix.
(frameset--minibufferless-last-p): Rename from frameset--sort-states.
(frameset-minibufferless-first-p): Doc fix.
Rename from frameset-sort-frames-for-deletion.
(frameset-restore): Doc fixes. Use new function names.
Most changes suggested by Drew Adams <drew.adams@oracle.com>.
* lisp/desktop.el (desktop-clear): Use new name of sort predicate.
(frameset-live-filter-alist, frameset-persistent-filter-alist):
New variables.
(frameset-filter-alist): Use them. Add autoload cookie.
(frameset-filter-tty-to-GUI): Move from desktop.el and rename.
(frameset--set-id, frameset--reuse-frame): Rename `frame-id' to
`frameset--id' (it's supposed to be internal to frameset.el).
(frameset--process-minibuffer-frames): Ditto. Doc fix.
(frameset--initial-params): New function.
(frameset--get-frame): Use it. Doc fix.
(frameset--move-onscreen): Accept new PRED value for FORCE-ONSCREEN.
Accept :all, not 'all.
(frameset-restore): Add new predicate values for FORCE-ONSCREEN and
FORCE-DISPLAY. Use :keywords for constant arguments to avoid collision
with fbound symbols. Fix frame id matching, and remove matching ids if
the frame being restored is deleted. Obey :delete.
* lisp/desktop.el (desktop-restore-forces-onscreen)
(desktop-restore-reuses-frames): Document :keyword constant values.
(desktop-filter-parameters-alist): Remove, now identical to
frameset-filter-alist.
(desktop--filter-tty*): Remove, moved to frameset.el.
(desktop-save-frameset, desktop-restore-frameset):
Do not pass :filters argument.
(desktop--make-frame): Include `minibuffer' in the minimal set of parameters
passed when creating a frame, because the minibuffer status of a frame cannot
be changed later.
(desktop-restoring-reuses-frames): New option.
(desktop--compute-pos, desktop--move-onscreen): New functions.
(desktop--make-frame): Use desktop--move-onscreen.