emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9b96a61: CEDET (srecode-compile-inserter): Avoid `o


From: Stefan Monnier
Subject: [Emacs-diffs] master 9b96a61: CEDET (srecode-compile-inserter): Avoid `oref' on classes
Date: Wed, 06 May 2015 13:12:47 +0000

branch: master
commit 9b96a612cafd224092e1651a167fab193772d6bf
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    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'.
---
 lisp/cedet/srecode/compile.el |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el
index c93a6f7..a8d6a50 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]