[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/raeburn-startup 7b8795b 6/7: Retain overlay proper
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] scratch/raeburn-startup 7b8795b 6/7: Retain overlay properties when dumping. |
Date: |
Tue, 30 May 2017 04:53:34 -0400 (EDT) |
branch: scratch/raeburn-startup
commit 7b8795bf62fbd28a67d6949e91794cc8921d5ccd
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>
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.
---
lisp/loadup.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 9379057..3583d88 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -545,9 +545,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)
- [Emacs-diffs] scratch/raeburn-startup updated (d38cc1a -> 143492e), Ken Raeburn, 2017/05/30
- [Emacs-diffs] scratch/raeburn-startup 04ef26e 1/7: Suppress some dump-related Lea-malloc calls., Ken Raeburn, 2017/05/30
- [Emacs-diffs] scratch/raeburn-startup ddae7c3 3/7: Allow dumping of elisp--xref-identifier-completion-table., Ken Raeburn, 2017/05/30
- [Emacs-diffs] scratch/raeburn-startup ea962a8 4/7: Load uniquify after dump/reload., Ken Raeburn, 2017/05/30
- [Emacs-diffs] scratch/raeburn-startup 2653005 5/7: Support dumping variable aliases., Ken Raeburn, 2017/05/30
- [Emacs-diffs] scratch/raeburn-startup a6adefd 2/7: Clear out doc strings matching DOC file before dumping., Ken Raeburn, 2017/05/30
- [Emacs-diffs] scratch/raeburn-startup 7b8795b 6/7: Retain overlay properties when dumping.,
Ken Raeburn <=
- [Emacs-diffs] scratch/raeburn-startup 143492e 7/7: ; admin/notes/big-elc: Notes on this experimental branch., Ken Raeburn, 2017/05/30