diff options
author | Alan Mackenzie <acm@muc.de> | 2022-01-22 11:02:50 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2022-01-22 11:02:50 +0000 |
commit | 14d64a8adcc866deecd758b898e8ef2d836b354a (patch) | |
tree | 83cff9669e266f8e283ccb8cd7518e909240f1e1 /lisp/emacs-lisp/multisession.el | |
parent | bdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff) | |
parent | ebe334cdc234de2897263aed4c05ac7088c11857 (diff) | |
download | emacs-scratch/correct-warning-pos.tar.gz |
Merge branch 'master' into scratch/correct-warning-posscratch/correct-warning-pos
Diffstat (limited to 'lisp/emacs-lisp/multisession.el')
-rw-r--r-- | lisp/emacs-lisp/multisession.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el index e6a2424c518..4a293796a83 100644 --- a/lisp/emacs-lisp/multisession.el +++ b/lisp/emacs-lisp/multisession.el @@ -434,10 +434,16 @@ storage method to list." multisession-edit-mode) (unless id (error "No value on the current line")) - (let* ((object (make-multisession - :package (car id) - :key (cdr id) - :storage multisession-storage)) + (let* ((object (or + ;; If the multisession variable already exists, use + ;; it (so that we update it). + (and (boundp (intern-soft (cdr id))) + (symbol-value (intern (cdr id)))) + ;; Create a new object. + (make-multisession + :package (car id) + :key (cdr id) + :storage multisession-storage))) (value (multisession-value object))) (setf (multisession-value object) (car (read-from-string |