aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-05-06 09:12:40 -0400
committerStefan Monnier2015-05-06 09:12:40 -0400
commit9b96a612cafd224092e1651a167fab193772d6bf (patch)
tree5353e88d98e4622308fcbfc10e88b8b87ed85828
parenta5847f9081585a15c10e2e28fa4d3aa6ffb9c092 (diff)
downloademacs-9b96a612cafd224092e1651a167fab193772d6bf.tar.gz
emacs-9b96a612cafd224092e1651a167fab193772d6bf.zip
CEDET (srecode-compile-inserter): Avoid `oref' on classes
* lisp/cedet/srecode/compile.el (srecode-compile-inserter): Avoid `oref' on classes (bug#20491). (srecode-compile-split-code): Remove unused var `key'.
-rw-r--r--lisp/cedet/srecode/compile.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el
index c93a6f72a9a..a8d6a5008bb 100644
--- a/lisp/cedet/srecode/compile.el
+++ b/lisp/cedet/srecode/compile.el
@@ -116,19 +116,19 @@ additional static argument data."))
116Plain text strings are not handled via this baseclass." 116Plain text strings are not handled via this baseclass."
117 :abstract t) 117 :abstract t)
118 118
119(cl-defmethod srecode-parse-input ((ins srecode-template-inserter) 119(cl-defmethod srecode-parse-input ((_ins srecode-template-inserter)
120 tag input STATE) 120 _tag input _STATE)
121 "For the template inserter INS, parse INPUT. 121 "For the template inserter INS, parse INPUT.
122Shorten input only by the amount needed. 122Shorten input only by the amount needed.
123Return the remains of INPUT. 123Return the remains of INPUT.
124STATE is the current compilation state." 124STATE is the current compilation state."
125 input) 125 input)
126 126
127(cl-defmethod srecode-match-end ((ins srecode-template-inserter) name) 127(cl-defmethod srecode-match-end ((_ins srecode-template-inserter) _name)
128 "For the template inserter INS, do I end a section called NAME?" 128 "For the template inserter INS, do I end a section called NAME?"
129 nil) 129 nil)
130 130
131(cl-defmethod srecode-inserter-apply-state ((ins srecode-template-inserter) STATE) 131(cl-defmethod srecode-inserter-apply-state ((_ins srecode-template-inserter) _STATE)
132 "For the template inserter INS, apply information from STATE." 132 "For the template inserter INS, apply information from STATE."
133 nil) 133 nil)
134 134
@@ -415,7 +415,7 @@ If END-NAME is specified, and the input string"
415 (match-end 0))) 415 (match-end 0)))
416 (namestart (match-end 0)) 416 (namestart (match-end 0))
417 (junk (string-match regexend what namestart)) 417 (junk (string-match regexend what namestart))
418 end tail name key) 418 end tail name)
419 ;; Add string to compiled output 419 ;; Add string to compiled output
420 (when (> (length prefix) 0) 420 (when (> (length prefix) 0)
421 (setq comp (cons prefix comp))) 421 (setq comp (cons prefix comp)))
@@ -453,8 +453,7 @@ If END-NAME is specified, and the input string"
453 (semantic-tag-name tag))) 453 (semantic-tag-name tag)))
454 ) 454 )
455 ;; Add string to compiled output 455 ;; Add string to compiled output
456 (setq name (substring what namestart end) 456 (setq name (substring what namestart end))
457 key nil)
458 ;; Trim WHAT back. 457 ;; Trim WHAT back.
459 (setq what (substring what tail)) 458 (setq what (substring what tail))
460 ;; Get the inserter 459 ;; Get the inserter
@@ -523,7 +522,7 @@ to the inserter constructor."
523 (setq classes (append classes (eieio-class-children (car classes)))) 522 (setq classes (append classes (eieio-class-children (car classes))))
524 ;; Do we have a match? 523 ;; Do we have a match?
525 (when (and (not (class-abstract-p (car classes))) 524 (when (and (not (class-abstract-p (car classes)))
526 (equal (oref (car classes) key) key)) 525 (equal (oref-default (car classes) key) key))
527 ;; Create the new class, and apply state. 526 ;; Create the new class, and apply state.
528 (setq new (apply (car classes) name props)) 527 (setq new (apply (car classes) name props))
529 (srecode-inserter-apply-state new STATE) 528 (srecode-inserter-apply-state new STATE)
@@ -642,7 +641,7 @@ Argument INDENT specifies the indentation level for the list."
642 (princ "\n")))) 641 (princ "\n"))))
643 ) 642 )
644 643
645(cl-defmethod srecode-dump ((ins srecode-template-inserter) indent) 644(cl-defmethod srecode-dump ((ins srecode-template-inserter) _indent)
646 "Dump the state of the SRecode template inserter INS." 645 "Dump the state of the SRecode template inserter INS."
647 (princ "INS: \"") 646 (princ "INS: \"")
648 (princ (eieio-object-name-string ins)) 647 (princ (eieio-object-name-string ins))