]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't dump a copy of the obarray.
authorKen Raeburn <raeburn@raeburn.org>
Wed, 14 Dec 2016 05:32:47 +0000 (00:32 -0500)
committerKen Raeburn <raeburn@raeburn.org>
Sat, 22 Jul 2017 08:36:20 +0000 (04:36 -0400)
The obarray was included by value in a function definition as a result
of apply-partial, but it writes out as a simple array and a lot of
chained symbols are discarded.

* lisp/progmodes/elisp-mode.el (elisp--xref-identifier-completion-table):
Rewrite definition to not directly incorporate the value of obarray.

lisp/progmodes/elisp-mode.el

index b3f452ca5b966a6ece2e58b37e5378ddbb855825..11d741c0b9e84ea8861322513fa7a0eccff61623 100644 (file)
@@ -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)