[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/raeburn-startup ddae7c3 3/7: Allow dumping of elis
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] scratch/raeburn-startup ddae7c3 3/7: Allow dumping of elisp--xref-identifier-completion-table. |
Date: |
Tue, 30 May 2017 04:53:33 -0400 (EDT) |
branch: scratch/raeburn-startup
commit ddae7c3372f8a3ef5dc02010dea6471f68e4898f
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>
Allow dumping of elisp--xref-identifier-completion-table.
The symbol "obarray" can be output by the dumper, but an actual
obarray cannot in any form that would read back properly.
* lisp/progmodes/elisp-mode.el (elisp--xref-identifier-completion-table):
Rewrite definition to not directly incorporate the value of obarray.
* lisp/loadup.el: Don't exclude it from the dump.
---
lisp/loadup.el | 5 -----
lisp/progmodes/elisp-mode.el | 22 ++++++++++++++--------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 2b5bb3e..19ad5d3 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -542,11 +542,6 @@ lost after dumping")))
;; unprintable objects.
((eq s 'advertised-signature-table)
(make-hash-table :test 'eq :weakness 'key))
- ;; FIXME: Incorporates obarray by value,
- ;; which doesn't work (chained symbols are
- ;; ignored). Reconstruct at startup?
- ((eq s 'elisp--xref-identifier-completion-table)
- nil)
((subrp v)
`(symbol-function ',(intern (subr-name v))))
((and (markerp v) (null (marker-buffer v)))
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index d6f2679..ed984c6 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -810,15 +810,21 @@ non-nil result supercedes the xrefs produced by
(push (elisp--xref-find-definitions sym) lst))
(nreverse lst))))
+;; This used to use apply-partially, but that turned "obarray" into a
+;; reference to the actual obarray, not the symbol, and that's
+;; incompatible with the dumper code.
(defvar elisp--xref-identifier-completion-table
- (apply-partially #'completion-table-with-predicate
- obarray
- (lambda (sym)
- (or (boundp sym)
- (fboundp sym)
- (featurep sym)
- (facep sym)))
- 'strict))
+ (lambda (string pred2 action)
+ (completion-table-with-predicate obarray
+ (lambda (sym)
+ (or (boundp sym)
+ (fboundp sym)
+ (featurep sym)
+ (facep sym)))
+ 'strict
+ string
+ pred2
+ action)))
(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql elisp)))
elisp--xref-identifier-completion-table)
- [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 <=
- [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, 2017/05/30
- [Emacs-diffs] scratch/raeburn-startup 143492e 7/7: ; admin/notes/big-elc: Notes on this experimental branch., Ken Raeburn, 2017/05/30