diff options
| author | Stefan Monnier | 2025-04-06 17:25:43 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2025-04-06 17:25:43 -0400 |
| commit | 3723aabe504a95bf6c5a8aa9ce34d967ca37a159 (patch) | |
| tree | b32169b6876595c8a08ff16bbb3caf97c8c00b74 /lisp | |
| parent | ba13e7de32d08028ab7bffdd73dab271a95ea453 (diff) | |
| download | emacs-scratch/cedet-object-name.tar.gz emacs-scratch/cedet-object-name.zip | |
cedet: Fix some remaining uses of obsolete object-name argscratch/cedet-object-name
* lisp/cedet/srecode/compile.el (srecode-compile-templates):
Delete obsolete object-name argument to `srecode-compile-state` and
`srecode-dictionary-compound-variable` constructors.
(srecode-compile-one-template-tag, srecode-compile-inserter):
Pass object name via explicit `:object-name` arg to `srecode-template`,
`srecode-template-inserter-variable`, and children of `srecode-template`.
* lisp/cedet/srecode/cpp.el (srecode-semantic-apply-tag-to-dict)
(srecode-c-apply-templates): Delete obsolete object-name argument to
`srecode-semantic-tag` constructors.
* lisp/cedet/srecode/dictionary.el (srecode-dictionary-add-entries)
(srecode-compound-toString): Delete obsolete object-name argument to
`srecode-dictionary-compound-variable` and `srecode-field` constructors.
* lisp/cedet/srecode/insert.el (srecode-insert-method-field):
Delete obsolete object-name argument to `srecode-field-value` constructor.
(srecode-parse-input): Pass object name via explicit `:object-name` arg
to `srecode-template`.
* lisp/cedet/srecode/semantic.el (srecode-semantic-handle-:tag)
(srecode-semantic-insert-tag, srecode-semantic-apply-tag-to-dict-default):
Delete obsolete object-name argument to `srecode-semantic-tag` constructors.
* lisp/cedet/srecode/table.el (srecode-mode-table-new): Delete
obsolete object-name argument to `srecode-template-table` constructor.
* lisp/emacs-lisp/eieio-base.el (make-instance):
Emit warning unconditionally.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/cedet/srecode/compile.el | 13 | ||||
| -rw-r--r-- | lisp/cedet/srecode/cpp.el | 6 | ||||
| -rw-r--r-- | lisp/cedet/srecode/dictionary.el | 4 | ||||
| -rw-r--r-- | lisp/cedet/srecode/insert.el | 5 | ||||
| -rw-r--r-- | lisp/cedet/srecode/semantic.el | 8 | ||||
| -rw-r--r-- | lisp/cedet/srecode/table.el | 1 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-base.el | 3 |
7 files changed, 17 insertions, 23 deletions
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 08082b9ecc1..05f70583c2a 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el | |||
| @@ -199,8 +199,7 @@ STATE is the current compilation state." | |||
| 199 | (tag nil) | 199 | (tag nil) |
| 200 | (class nil) | 200 | (class nil) |
| 201 | (table nil) | 201 | (table nil) |
| 202 | (STATE (srecode-compile-state (file-name-nondirectory | 202 | (STATE (srecode-compile-state)) |
| 203 | (buffer-file-name)))) | ||
| 204 | (mode nil) | 203 | (mode nil) |
| 205 | (application nil) | 204 | (application nil) |
| 206 | (framework nil) | 205 | (framework nil) |
| @@ -263,7 +262,7 @@ STATE is the current compilation state." | |||
| 263 | ;; Create a compound dictionary value from "value". | 262 | ;; Create a compound dictionary value from "value". |
| 264 | (require 'srecode/dictionary) | 263 | (require 'srecode/dictionary) |
| 265 | (let ((cv (srecode-dictionary-compound-variable | 264 | (let ((cv (srecode-dictionary-compound-variable |
| 266 | name :value value))) | 265 | :value value))) |
| 267 | (setq vars (cons (cons name cv) vars))) | 266 | (setq vars (cons (cons name cv) vars))) |
| 268 | )) | 267 | )) |
| 269 | ) | 268 | ) |
| @@ -361,7 +360,7 @@ STATE is the current compile state as an object of class | |||
| 361 | :where 'end))))))) | 360 | :where 'end))))))) |
| 362 | 361 | ||
| 363 | ;; Construct and return the template object. | 362 | ;; Construct and return the template object. |
| 364 | (srecode-template (semantic-tag-name tag) | 363 | (srecode-template :object-name (semantic-tag-name tag) |
| 365 | :context context | 364 | :context context |
| 366 | :args (nreverse addargs) | 365 | :args (nreverse addargs) |
| 367 | :dictionary root-dict | 366 | :dictionary root-dict |
| @@ -504,7 +503,8 @@ PROPS are additional properties that might need to be passed | |||
| 504 | to the inserter constructor." | 503 | to the inserter constructor." |
| 505 | ;;(message "Compile: %s %S" name props) | 504 | ;;(message "Compile: %s %S" name props) |
| 506 | (if (not key) | 505 | (if (not key) |
| 507 | (apply #'make-instance 'srecode-template-inserter-variable name props) | 506 | (apply #'make-instance 'srecode-template-inserter-variable |
| 507 | :object-name name props) | ||
| 508 | (let ((classes (eieio-class-children 'srecode-template-inserter)) | 508 | (let ((classes (eieio-class-children 'srecode-template-inserter)) |
| 509 | (new nil)) | 509 | (new nil)) |
| 510 | ;; Loop over the various subclasses and | 510 | ;; Loop over the various subclasses and |
| @@ -515,7 +515,8 @@ to the inserter constructor." | |||
| 515 | (when (and (not (class-abstract-p (car classes))) | 515 | (when (and (not (class-abstract-p (car classes))) |
| 516 | (equal (oref-default (car classes) key) key)) | 516 | (equal (oref-default (car classes) key) key)) |
| 517 | ;; Create the new class, and apply state. | 517 | ;; Create the new class, and apply state. |
| 518 | (setq new (apply #'make-instance (car classes) name props)) | 518 | (setq new (apply #'make-instance (car classes) |
| 519 | :object-name name props)) | ||
| 519 | (srecode-inserter-apply-state new STATE) | 520 | (srecode-inserter-apply-state new STATE) |
| 520 | ) | 521 | ) |
| 521 | (setq classes (cdr classes))) | 522 | (setq classes (cdr classes))) |
diff --git a/lisp/cedet/srecode/cpp.el b/lisp/cedet/srecode/cpp.el index d49ccde24fa..63613969191 100644 --- a/lisp/cedet/srecode/cpp.el +++ b/lisp/cedet/srecode/cpp.el | |||
| @@ -146,8 +146,7 @@ specified in a C file." | |||
| 146 | (value-dict (srecode-dictionary-add-section-dictionary | 146 | (value-dict (srecode-dictionary-add-section-dictionary |
| 147 | dict "VALUE"))) | 147 | dict "VALUE"))) |
| 148 | (srecode-semantic-apply-tag-to-dict | 148 | (srecode-semantic-apply-tag-to-dict |
| 149 | (srecode-semantic-tag (semantic-tag-name value-tag) | 149 | (srecode-semantic-tag :prime value-tag) |
| 150 | :prime value-tag) | ||
| 151 | value-dict)) | 150 | value-dict)) |
| 152 | 151 | ||
| 153 | ;; Discriminate using statements referring to namespaces and | 152 | ;; Discriminate using statements referring to namespaces and |
| @@ -224,8 +223,7 @@ specified in a C file." | |||
| 224 | (let ((template-dict (srecode-dictionary-add-section-dictionary | 223 | (let ((template-dict (srecode-dictionary-add-section-dictionary |
| 225 | templates-dict "ARGS"))) | 224 | templates-dict "ARGS"))) |
| 226 | (srecode-semantic-apply-tag-to-dict | 225 | (srecode-semantic-apply-tag-to-dict |
| 227 | (srecode-semantic-tag (semantic-tag-name template) | 226 | (srecode-semantic-tag :prime template) |
| 228 | :prime template) | ||
| 229 | template-dict))))) | 227 | template-dict))))) |
| 230 | ) | 228 | ) |
| 231 | 229 | ||
diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index 2fbed835bdd..bac3b7c48d3 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el | |||
| @@ -369,7 +369,7 @@ values but STATE is nil." | |||
| 369 | (srecode-dictionary-set-value | 369 | (srecode-dictionary-set-value |
| 370 | dict name | 370 | dict name |
| 371 | (srecode-dictionary-compound-variable | 371 | (srecode-dictionary-compound-variable |
| 372 | name :value value :state state))))) | 372 | :value value :state state))))) |
| 373 | (setq entries (nthcdr 2 entries))) | 373 | (setq entries (nthcdr 2 entries))) |
| 374 | dict) | 374 | dict) |
| 375 | 375 | ||
| @@ -536,7 +536,7 @@ inserted with a new editable field.") | |||
| 536 | (error "Unknown default value for value %S" name))) | 536 | (error "Unknown default value for value %S" name))) |
| 537 | 537 | ||
| 538 | ;; Create a field from the inserter. | 538 | ;; Create a field from the inserter. |
| 539 | (srecode-field name :name name | 539 | (srecode-field :name name |
| 540 | :start start | 540 | :start start |
| 541 | :end (point) | 541 | :end (point) |
| 542 | :prompt (oref sti prompt) | 542 | :prompt (oref sti prompt) |
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 2e70469fa39..ab6ab986f6a 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el | |||
| @@ -648,8 +648,7 @@ Use DICTIONARY to resolve values." | |||
| 648 | Use DICTIONARY to resolve values." | 648 | Use DICTIONARY to resolve values." |
| 649 | (let* ((default (srecode-insert-ask-default sti dictionary)) | 649 | (let* ((default (srecode-insert-ask-default sti dictionary)) |
| 650 | (compound-value | 650 | (compound-value |
| 651 | (srecode-field-value (oref sti object-name) | 651 | (srecode-field-value :firstinserter sti |
| 652 | :firstinserter sti | ||
| 653 | :defaultvalue default)) | 652 | :defaultvalue default)) |
| 654 | ) | 653 | ) |
| 655 | ;; Return this special compound value as the thing to insert. | 654 | ;; Return this special compound value as the thing to insert. |
| @@ -863,7 +862,7 @@ Return the remains of INPUT." | |||
| 863 | (let* ((out (srecode-compile-split-code tag input STATE | 862 | (let* ((out (srecode-compile-split-code tag input STATE |
| 864 | (oref ins object-name)))) | 863 | (oref ins object-name)))) |
| 865 | (oset ins template (srecode-template | 864 | (oset ins template (srecode-template |
| 866 | (eieio-object-name-string ins) | 865 | :object-name (slot-value ins 'object-name) |
| 867 | :context nil | 866 | :context nil |
| 868 | :args nil | 867 | :args nil |
| 869 | :code (cdr out))) | 868 | :code (cdr out))) |
diff --git a/lisp/cedet/srecode/semantic.el b/lisp/cedet/srecode/semantic.el index bfacda54557..1db041cdfd0 100644 --- a/lisp/cedet/srecode/semantic.el +++ b/lisp/cedet/srecode/semantic.el | |||
| @@ -129,8 +129,7 @@ variable default values, and other things." | |||
| 129 | larg nil nil))) | 129 | larg nil nil))) |
| 130 | ;; Apply the sub-argument to the subdictionary. | 130 | ;; Apply the sub-argument to the subdictionary. |
| 131 | (srecode-semantic-apply-tag-to-dict | 131 | (srecode-semantic-apply-tag-to-dict |
| 132 | (srecode-semantic-tag (semantic-tag-name larg) | 132 | (srecode-semantic-tag :prime larg) |
| 133 | :prime larg) | ||
| 134 | subdict) | 133 | subdict) |
| 135 | ) | 134 | ) |
| 136 | ;; Next! | 135 | ;; Next! |
| @@ -203,8 +202,7 @@ variable default values, and other things." | |||
| 203 | (when (not tag) | 202 | (when (not tag) |
| 204 | (error "No tag for current template. Use the semantic kill-ring")) | 203 | (error "No tag for current template. Use the semantic kill-ring")) |
| 205 | (srecode-semantic-apply-tag-to-dict | 204 | (srecode-semantic-apply-tag-to-dict |
| 206 | (srecode-semantic-tag (semantic-tag-name tag) | 205 | (srecode-semantic-tag :prime tag) |
| 207 | :prime tag) | ||
| 208 | dict))) | 206 | dict))) |
| 209 | 207 | ||
| 210 | ;;; :tagtype ARGUMENT HANDLING | 208 | ;;; :tagtype ARGUMENT HANDLING |
| @@ -394,7 +392,7 @@ as `function' will leave point where code might be inserted." | |||
| 394 | ;; Resolve TAG into the dictionary. We may have a :tag arg | 392 | ;; Resolve TAG into the dictionary. We may have a :tag arg |
| 395 | ;; from the macro such that we don't need to do this. | 393 | ;; from the macro such that we don't need to do this. |
| 396 | (when (not (srecode-dictionary-lookup-name dict "TAG")) | 394 | (when (not (srecode-dictionary-lookup-name dict "TAG")) |
| 397 | (let ((tagobj (srecode-semantic-tag (semantic-tag-name tag) :prime tag)) | 395 | (let ((tagobj (srecode-semantic-tag :prime tag)) |
| 398 | ) | 396 | ) |
| 399 | (srecode-semantic-apply-tag-to-dict tagobj dict))) | 397 | (srecode-semantic-apply-tag-to-dict tagobj dict))) |
| 400 | 398 | ||
diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el index ba87c0a01d2..6f98038b614 100644 --- a/lisp/cedet/srecode/table.el +++ b/lisp/cedet/srecode/table.el | |||
| @@ -180,7 +180,6 @@ INIT are the initialization parameters for the new template table." | |||
| 180 | (old (srecode-mode-table-find mt file)) | 180 | (old (srecode-mode-table-find mt file)) |
| 181 | (attr (file-attributes file)) | 181 | (attr (file-attributes file)) |
| 182 | (new (apply #'srecode-template-table | 182 | (new (apply #'srecode-template-table |
| 183 | (file-name-nondirectory file) | ||
| 184 | :file file | 183 | :file file |
| 185 | :filesize (file-attribute-size attr) | 184 | :filesize (file-attribute-size attr) |
| 186 | :filedate (file-attribute-modification-time attr) | 185 | :filedate (file-attribute-modification-time attr) |
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 7975cdf280d..e032a9effdf 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el | |||
| @@ -209,8 +209,7 @@ All slots are unbound, except those initialized with PARAMS." | |||
| 209 | (cl-defmethod make-instance ((class (subclass eieio-named)) &rest args) | 209 | (cl-defmethod make-instance ((class (subclass eieio-named)) &rest args) |
| 210 | (if (not (stringp (car args))) | 210 | (if (not (stringp (car args))) |
| 211 | (cl-call-next-method) | 211 | (cl-call-next-method) |
| 212 | (funcall (if eieio-backward-compatibility #'ignore #'message) | 212 | (message "Obsolete: name passed without :object-name to %S constructor" |
| 213 | "Obsolete: name passed without :object-name to %S constructor" | ||
| 214 | class) | 213 | class) |
| 215 | (apply #'cl-call-next-method class :object-name args))) | 214 | (apply #'cl-call-next-method class :object-name args))) |
| 216 | 215 | ||