From: Ken Raeburn Date: Tue, 30 May 2017 08:35:35 +0000 (-0400) Subject: Retain overlay properties when dumping. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=98025ef515a43a633a5330b60c2f04cda969e9cc;p=emacs.git Retain overlay properties when dumping. * lisp/loadup.el: When dumping an overlay, save the properties and attach them to the newly created overlay at load time. --- diff --git a/lisp/loadup.el b/lisp/loadup.el index d0f954f24ae..12c7d2d720f 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -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)