]> git.eshelyaron.com Git - emacs.git/commitdiff
Retain overlay properties when dumping.
authorKen Raeburn <raeburn@raeburn.org>
Tue, 30 May 2017 08:35:35 +0000 (04:35 -0400)
committerKen Raeburn <raeburn@raeburn.org>
Sat, 22 Jul 2017 08:36:22 +0000 (04:36 -0400)
* lisp/loadup.el: When dumping an overlay, save the properties and
attach them to the newly created overlay at load time.

lisp/loadup.el

index d0f954f24aef12dedddd6f71c640276a951b7ef2..12c7d2d720f416bc2f8a6e793405f48fd4a0c258 100644 (file)
@@ -553,9 +553,17 @@ lost after dumping")))
                          ((and (markerp v) (null (marker-buffer v)))
                           '(make-marker))
                          ((and (overlayp v) (null (overlay-buffer v)))
-                          '(let ((ol (make-overlay (point-min) (point-min))))
-                             (delete-overlay ol)
-                             ol))
+                          (let (propsets
+                                (props (overlay-properties v)))
+                            (while props
+                              (let ((prop (car props))
+                                    (val (cadr props)))
+                                (push `(overlay-put ol ',prop ',val) propsets)
+                                (setq props (cddr props))))
+                            `(let ((ol (make-overlay (point-min) (point-min))))
+                               ,@propsets
+                               (delete-overlay ol)
+                               ol)))
                          ;; abbrev-table-p isn't very robust
                          ((condition-case nil
                               (abbrev-table-p v)