From: Stefan Monnier Date: Wed, 6 May 2015 13:12:40 +0000 (-0400) Subject: CEDET (srecode-compile-inserter): Avoid `oref' on classes X-Git-Tag: emacs-25.0.90~2183 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9b96a612cafd224092e1651a167fab193772d6bf;p=emacs.git 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'. --- 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.")) Plain text strings are not handled via this baseclass." :abstract t) -(cl-defmethod srecode-parse-input ((ins srecode-template-inserter) - tag input STATE) +(cl-defmethod srecode-parse-input ((_ins srecode-template-inserter) + _tag input _STATE) "For the template inserter INS, parse INPUT. Shorten input only by the amount needed. Return the remains of INPUT. STATE is the current compilation state." input) -(cl-defmethod srecode-match-end ((ins srecode-template-inserter) name) +(cl-defmethod srecode-match-end ((_ins srecode-template-inserter) _name) "For the template inserter INS, do I end a section called NAME?" nil) -(cl-defmethod srecode-inserter-apply-state ((ins srecode-template-inserter) STATE) +(cl-defmethod srecode-inserter-apply-state ((_ins srecode-template-inserter) _STATE) "For the template inserter INS, apply information from STATE." nil) @@ -415,7 +415,7 @@ If END-NAME is specified, and the input string" (match-end 0))) (namestart (match-end 0)) (junk (string-match regexend what namestart)) - end tail name key) + end tail name) ;; Add string to compiled output (when (> (length prefix) 0) (setq comp (cons prefix comp))) @@ -453,8 +453,7 @@ If END-NAME is specified, and the input string" (semantic-tag-name tag))) ) ;; Add string to compiled output - (setq name (substring what namestart end) - key nil) + (setq name (substring what namestart end)) ;; Trim WHAT back. (setq what (substring what tail)) ;; Get the inserter @@ -523,7 +522,7 @@ to the inserter constructor." (setq classes (append classes (eieio-class-children (car classes)))) ;; Do we have a match? (when (and (not (class-abstract-p (car classes))) - (equal (oref (car classes) key) key)) + (equal (oref-default (car classes) key) key)) ;; Create the new class, and apply state. (setq new (apply (car classes) name props)) (srecode-inserter-apply-state new STATE) @@ -642,7 +641,7 @@ Argument INDENT specifies the indentation level for the list." (princ "\n")))) ) -(cl-defmethod srecode-dump ((ins srecode-template-inserter) indent) +(cl-defmethod srecode-dump ((ins srecode-template-inserter) _indent) "Dump the state of the SRecode template inserter INS." (princ "INS: \"") (princ (eieio-object-name-string ins))