aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/ChangeLog
diff options
context:
space:
mode:
authorStefan Monnier2015-01-08 16:03:04 -0500
committerStefan Monnier2015-01-08 16:03:04 -0500
commita749f1c648f2b9bf1a0b0b10e2da4c1c4e3d431d (patch)
tree91bdfc947ac2c6618bace6524cada16e2c5599cf /lisp/ChangeLog
parent5fbd17e369ca30a47ab8a2eda0b2f2ea9b690bb4 (diff)
parent6a67b20ddd458d71a1d63746504d91b1acea9b2b (diff)
downloademacs-a749f1c648f2b9bf1a0b0b10e2da4c1c4e3d431d.tar.gz
emacs-a749f1c648f2b9bf1a0b0b10e2da4c1c4e3d431d.zip
Shrink EIEIO object header. Move generics to eieio-generic.el.
Diffstat (limited to 'lisp/ChangeLog')
-rw-r--r--lisp/ChangeLog256
1 files changed, 254 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4077e351ba8..bca8d28b1a5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,255 @@
12015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/eieio.el (defclass): Move from eieio-defclass all the code
4 that creates functions, and most of the sanity checks.
5 Mark as obsolete the <class>-child-p function.
6 * emacs-lisp/eieio-core.el (eieio--define-field-accessors): Remove.
7 (eieio--class, eieio--object): Use cl-defstruct.
8 (eieio--object-num-slots): Define manually.
9 (eieio-defclass-autoload): Use eieio--class-make.
10 (eieio-defclass-internal): Rename from eieio-defclass. Move all the
11 `(lambda...) definitions and most of the sanity checks to `defclass'.
12 Mark as obsolete the <class>-list-p function, the <class> variable and
13 the <initarg> variables. Use pcase-dolist.
14 (eieio-defclass): New compatibility function.
15 * emacs-lisp/eieio-opt.el (eieio-build-class-alist)
16 (eieio-class-speedbar): Don't use eieio-default-superclass var.
17
182015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
19
20 * emacs-lisp/eieio-generic.el: New file.
21 * emacs-lisp/eieio-core.el: Move all generic function code to
22 eieio-generic.el.
23 (eieio--defmethod): Declare.
24
25 * emacs-lisp/eieio.el: Require eieio-generic. Move all generic
26 function code to eieio-generic.el.
27 * emacs-lisp/eieio-opt.el (eieio-help-generic): Move to
28 eieio-generic.el.
29 * emacs-lisp/eieio-datadebug.el (eieio-debug-methodinvoke): Update call
30 to eieio--generic-call.
31 * emacs-lisp/eieio-base.el (eieio-instance-inheritor): Don't use
32 <class>-child type.
33
342015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
35
36 * emacs-lisp/chart.el (chart-add-sequence, chart-bar-quickie):
37 Don't use <class> as a variable.
38
39 * emacs-lisp/eieio.el (same-class-p): Accept class object as well.
40 (call-next-method): Simplify.
41 (clone): Obey eieio-backward-compatibility.
42
43 * emacs-lisp/eieio-opt.el (eieio-read-generic-p): Remove.
44 (eieio-read-generic): Use `generic-p' instead.
45
46 * emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var.
47 (eieio-defclass-autoload): Obey it.
48 (eieio--class-object): Improve error behavior.
49 (eieio-class-children-fast, same-class-fast-p): Remove. Inline at
50 every use site.
51 (eieio--defgeneric-form-primary-only): Rename from
52 eieio-defgeneric-form-primary-only; update all callers.
53 (eieio--defgeneric-form-primary-only-one): Rename from
54 eieio-defgeneric-form-primary-only-one; update all callers.
55 (eieio-defgeneric-reset-generic-form)
56 (eieio-defgeneric-reset-generic-form-primary-only)
57 (eieio-defgeneric-reset-generic-form-primary-only-one): Remove.
58 (eieio--method-optimize-primary): New function to replace them.
59 (eieio--defmethod, eieio-defmethod): Use it.
60 (eieio--perform-slot-validation): Rename from
61 eieio-perform-slot-validation; update all callers.
62 (eieio--validate-slot-value): Rename from eieio-validate-slot-value.
63 Change `class' to be a class object. Update all callers.
64 (eieio--validate-class-slot-value): Rename from
65 eieio-validate-class-slot-value. Change `class' to be a class object.
66 Update all callers.
67 (eieio-oset-default): Accept class object as well.
68 (eieio--generic-call-primary-only): Rename from
69 eieio-generic-call-primary-only. Update all callers.
70
71 * emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
72 Improve error messages.
73 (eieio-persistent-slot-type-is-class-p): Handle `list-of' types, as
74 well as user-defined types. Emit errors for legacy types like
75 <class>-child and <class>-list, if not eieio-backward-compatibility.
76
772015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
78
79 * emacs-lisp/eieio.el (eieio-class-parents): Accept class objects.
80 (eieio--class-slot-initarg): Rename from class-slot-initarg.
81 Change `class' arg to be a class object. Update all callers.
82 (call-next-method): Adjust to new return value of `eieio-generic-form'.
83 (eieio-default-superclass): Set var to the class object.
84 (eieio-edebug-prin1-to-string): Fix recursive call for lists.
85 Change print behavior to affect class objects rather than
86 class symbols.
87
88 * emacs-lisp/eieio-core.el (eieio-class-object): New function.
89 (eieio-class-parents-fast): Remove macro.
90 (eieio--class-option-assoc): Rename from class-option-assoc.
91 Update all callers.
92 (eieio--class-option): Rename from class-option. Change `class' arg to
93 be a class object. Update all callers.
94 (eieio--class-method-invocation-order): Rename from
95 class-method-invocation-order. Change `class' arg to be a class
96 object. Update all callers.
97 (eieio-defclass-autoload, eieio-defclass): Set the `parent' field to
98 a list of class objects rather than names.
99 (eieio-defclass): Remove redundant quotes. Use `eieio-oref-default'
100 for accessors to class allocated slots.
101 (eieio--perform-slot-validation-for-default): Rename from
102 eieio-perform-slot-validation-for-default. Update all callers.
103 (eieio--add-new-slot): Rename from eieio-add-new-slot.
104 Update all callers. Use push.
105 (eieio-copy-parents-into-subclass): Adjust to new content of
106 `parent' field. Use dolist.
107 (eieio-oref): Remove support for providing a class rather than
108 an object.
109 (eieio-oref-default): Prefer class objects over class names.
110 (eieio--slot-originating-class-p): Rename from
111 eieio-slot-originating-class-p. Update all callers. Use `or'.
112 (eieio--slot-name-index): Turn check into assertion.
113 (eieio--class-slot-name-index): Rename from
114 eieio-class-slot-name-index. Change `class' arg to be a class object.
115 Update all callers.
116 (eieio-attribute-to-initarg): Move to eieio-test-persist.el.
117 (eieio--c3-candidate): Rename from eieio-c3-candidate.
118 Update all callers.
119 (eieio--c3-merge-lists): Rename from eieio-c3-merge-lists.
120 Update all callers.
121 (eieio--class-precedence-c3): Rename from eieio-class-precedence-c3.
122 Update all callers.
123 (eieio--class-precedence-dfs): Rename from eieio-class-precedence-dfs.
124 Update all callers.
125 (eieio--class-precedence-bfs): Rename from eieio-class-precedence-bfs.
126 Update all callers. Adjust to new `parent' content.
127 (eieio--class-precedence-list): Rename from -class-precedence-list.
128 Update all callers.
129 (eieio-generic-call): Use autoloadp and autoload-do-load.
130 Slight simplification.
131 (eieio-generic-call, eieio-generic-call-primary-only): Adjust to new
132 return value of `eieio-generic-form'.
133 (eieiomt-add): Index the hashtable with class objects rather than
134 class names.
135 (eieio-generic-form): Accept class objects as well.
136
137 * emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
138 Adjust to new convention for eieio-persistent-validate/fix-slot-value.
139 (eieio-persistent-validate/fix-slot-value):
140 Change `class' arg to be a class object. Update all callers.
141
1422015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
143
144 * emacs-lisp/eieio.el (child-of-class-p): Make it accept class objects
145 additionally to class names.
146
147 * emacs-lisp/eieio-core.el (eieio--with-scoped-class): Use let-binding.
148 (object): Remove first (constant) slot; rename second to `class-tag'.
149 (eieio--object-class-object, eieio--object-class-name): New funs
150 to replace eieio--object-class.
151 (eieio--class-object, eieio--class-p): New functions.
152 (same-class-fast-p): Make it a defsubst, change its implementation
153 to check the class objects rather than their names.
154 (eieio-object-p): Rewrite.
155 (eieio-defclass): Adjust the object initialization according to the new
156 object layout.
157 (eieio--scoped-class): Declare it returns a class object (not a class
158 name any more). Adjust calls accordingly (along with calls to
159 eieio--with-scoped-class).
160 (eieio--slot-name-index): Rename from eieio-slot-name-index and change
161 its class arg to be a class object. Adjust callers accordingly.
162 (eieio-slot-originating-class-p): Make its start-class arg a class
163 object. Adjust all callers.
164 (eieio--initarg-to-attribute): Rename from eieio-initarg-to-attribute.
165 Make its `class' arg a class object. Adjust all callers.
166
167 * emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
168 Use eieio--slot-name-index rather than eieio-slot-name-index.
169
1702015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
171
172 * emacs-lisp/eieio.el (make-instance): Simplify by not adding an object
173 name argument.
174 (eieio-object-name): Use eieio-object-name-string.
175 (eieio--object-names): New const.
176 (eieio-object-name-string, eieio-object-set-name-string): Re-implement
177 using a hashtable rather than a built-in slot.
178 (eieio-constructor): Rename from `constructor'. Remove `newname' arg.
179 (clone): Don't mess with the object's "name".
180
181 * emacs-lisp/eieio-custom.el (eieio-widget-test): Remove dummy arg.
182 (eieio-object-value-get): Use eieio-object-set-name-string.
183
184 * emacs-lisp/eieio-core.el (eieio--defalias): Follow aliases.
185 (eieio--object): Remove `name' field.
186 (eieio-defclass): Adjust to new convention where constructors don't
187 take an "object name" any more.
188 (eieio--defgeneric-init-form, eieio--defmethod): Follow aliases.
189 (eieio-validate-slot-value, eieio-oset-default)
190 (eieio-slot-name-index): Don't hardcode eieio--object-num-slots.
191 (eieio-generic-call-primary-only): Simplify.
192
193 * emacs-lisp/eieio-base.el (clone) <eieio-instance-inheritor>:
194 Use call-next-method.
195 (eieio-constructor): Rename from `constructor'.
196 (eieio-persistent-convert-list-to-object): Drop objname.
197 (eieio-persistent-validate/fix-slot-value): Don't hardcode
198 eieio--object-num-slots.
199 (eieio-named): Use a normal slot.
200 (slot-missing) <eieio-named>: Remove.
201 (eieio-object-name-string, eieio-object-set-name-string, clone)
202 <eieio-named>: New methods.
203
2042015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
205
206 * emacs-lisp/eieio-core.el (eieio--class-v): Rename from class-v.
207 (method-*): Add a "eieio--" prefix to those constants.
208
209 * emacs-lisp/eieio.el: Move edebug specs to the corresponding macro.
210
211 * emacs-lisp/eieio-speedbar.el: Use lexical-binding.
212
2132015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
214
215 * emacs-lisp/eieio.el (child-of-class-p): Fix case where `class' is
216 `eieio-default-superclass'.
217
218 * emacs-lisp/eieio-datadebug.el: Use lexical-binding.
219
220 * emacs-lisp/eieio-custom.el: Use lexical-binding.
221 (eieio-object-value-to-abstract): Simplify.
222
223 * emacs-lisp/eieio-opt.el (eieio-build-class-list): Use cl-mapcan.
224 (eieio-build-class-alist): Use dolist.
225 (eieio-all-generic-functions): Adjust to use of hashtables.
226
227 * emacs-lisp/eieio-core.el (class): Rename field symbol-obarray to
228 symbol-hashtable. It contains a hashtable instead of an obarray.
229 (generic-p): Use symbol property `eieio-method-hashtable' instead of
230 `eieio-method-obarray'.
231 (generic-primary-only-p, generic-primary-only-one-p):
232 Slight optimization.
233 (eieio-defclass-autoload-map): Use a hashtable instead of an obarray.
234 (eieio-defclass-autoload, eieio-defclass): Adjust/simplify accordingly.
235 (eieio-class-un-autoload): Use autoload-do-load.
236 (eieio-defclass): Use dolist, cl-pushnew, cl-callf.
237 Use new cl-deftype-satisfies. Adjust to use of hashtables.
238 Don't hardcode the value of eieio--object-num-slots.
239 (eieio-defgeneric-form-primary-only-one): Remove `doc-string' arg.
240 Use a closure rather than a backquoted lambda.
241 (eieio--defmethod): Adjust call accordingly. Set doc-string via the
242 function-documentation property.
243 (eieio-slot-originating-class-p, eieio-slot-name-index)
244 (eieiomt--optimizing-hashtable, eieiomt-install, eieiomt-add)
245 (eieio-generic-form): Adjust to use of hashtables.
246 (eieiomt--sym-optimize): Rename from eieiomt-sym-optimize; take
247 additional class argument.
248 (eieio-generic-call-methodname): Remove, unused.
249
250 * emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
251 Prefer \' to $.
252
12015-01-08 Eli Zaretskii <eliz@gnu.org> 2532015-01-08 Eli Zaretskii <eliz@gnu.org>
2 254
3 * simple.el (line-move-visual): When converting X pixel coordinate 255 * simple.el (line-move-visual): When converting X pixel coordinate
@@ -609,8 +861,8 @@
609 * electric.el (Electric-pop-up-window): 861 * electric.el (Electric-pop-up-window):
610 * help.el (resize-temp-buffer-window): Call fit-window-to-buffer 862 * help.el (resize-temp-buffer-window): Call fit-window-to-buffer
611 with `preserve-size' t. 863 with `preserve-size' t.
612 * minibuffer.el (minibuffer-completion-help): Use 864 * minibuffer.el (minibuffer-completion-help):
613 `resize-temp-buffer-window' instead of `fit-window-to-buffer' 865 Use `resize-temp-buffer-window' instead of `fit-window-to-buffer'
614 (Bug#19355). Preserve size of completions window. 866 (Bug#19355). Preserve size of completions window.
615 * register.el (register-preview): Preserve size of register 867 * register.el (register-preview): Preserve size of register
616 preview window. 868 preview window.