emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102276: Minor idlwave change.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102276: Minor idlwave change.
Date: Sat, 06 Nov 2010 12:55:44 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102276
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2010-11-06 12:55:44 -0700
message:
  Minor idlwave change.
  * lisp/progmodes/idlwave.el (idlwave-routine-entry-compare-twins):
  (idlwave-study-twins): Prefix dynamic local `class'.
  (idlwave-routine-twin-compare): Update for above name change.
modified:
  lisp/ChangeLog
  lisp/progmodes/idlwave.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-11-06 19:47:42 +0000
+++ b/lisp/ChangeLog    2010-11-06 19:55:44 +0000
@@ -1,5 +1,9 @@
 2010-11-06  Glenn Morris  <address@hidden>
 
+       * progmodes/idlwave.el (idlwave-routine-entry-compare-twins):
+       (idlwave-study-twins): Prefix dynamic local `class'.
+       (idlwave-routine-twin-compare): Update for above name change.
+
        * emacs-lisp/eieio-comp.el (byte-compile-file-form-defmethod):
        Use boundp tests to silence compiler.  Update for changed name of
        bytecomp-filename variable.

=== modified file 'lisp/progmodes/idlwave.el'
--- a/lisp/progmodes/idlwave.el 2010-11-03 07:57:43 +0000
+++ b/lisp/progmodes/idlwave.el 2010-11-06 19:55:44 +0000
@@ -8828,7 +8828,7 @@
   (let* ((entry (car entries))
         (name (car entry))      ;
         (type (nth 1 entry))    ; Must be bound for
-        (class (nth 2 entry))   ;  idlwave-routine-twin-compare
+        (idlwave-twin-class (nth 2 entry)) ;  idlwave-routine-twin-compare
         (cnt 0)
         source type type-cons file alist syslibp key)
     (while (setq entry (pop entries))
@@ -8870,7 +8870,6 @@
 
 ;; FIXME: Dynamically scoped vars need to use the `idlwave-' prefix.
 ;; (defvar type)
-;; (defvar class)
 (defmacro idlwave-xor (a b)
   `(and (or ,a ,b)
        (not (and ,a ,b))))
@@ -8903,7 +8902,9 @@
 (defun idlwave-routine-entry-compare-twins (a b)
   "Compare two routine entries, under the assumption that they are twins.
 This basically calls `idlwave-routine-twin-compare' with the correct args."
-  (let* ((name (car a)) (type (nth 1 a)) (class (nth 2 a)) ; needed outside
+  (let* ((name (car a))
+        (type (nth 1 a))
+        (idlwave-twin-class (nth 2 a)) ; used in idlwave-routine-twin-compare
         (asrc (nth 3 a))
         (atype (car asrc))
         (bsrc (nth 3 b))
@@ -8916,18 +8917,16 @@
        (list atype afile (list atype)))
      (if (stringp bfile)
         (list (file-truename bfile) bfile (list btype))
-       (list btype bfile (list btype))))
-    ))
+       (list btype bfile (list btype))))))
 
 ;; Bound in idlwave-study-twins,idlwave-routine-entry-compare-twins.
-;; FIXME: Dynamically scoped vars need to use the `idlwave-' prefix.
-(defvar class)
+(defvar idlwave-twin-class)
 
 (defun idlwave-routine-twin-compare (a b)
   "Compare two routine twin entries for sorting.
 In here, A and B are not normal routine info entries, but special
 lists (KEY FILENAME (TYPES...)).
-This expects NAME TYPE CLASS to be bound to the right values."
+This expects NAME TYPE IDLWAVE-TWIN-CLASS to be bound to the right values."
   (let* (;; Dis-assemble entries
         (akey (car a))      (bkey (car b))
         (afile (nth 1 a))   (bfile (nth 1 b))
@@ -8959,16 +8958,19 @@
         ;; Look at file names
         (aname (if (stringp afile) (downcase (file-name-nondirectory afile)) 
""))
         (bname (if (stringp bfile) (downcase (file-name-nondirectory bfile)) 
""))
-        (fname-re (if class (format "\\`%s__\\(%s\\|define\\)\\.pro\\'"
-                                    (regexp-quote (downcase class))
-                                    (regexp-quote (downcase name)))
+        (fname-re (if idlwave-twin-class
+                      (format "\\`%s__\\(%s\\|define\\)\\.pro\\'"
+                              (regexp-quote (downcase idlwave-twin-class))
+                              (regexp-quote (downcase name)))
                     (format "\\`%s\\.pro" (regexp-quote (downcase name)))))
         ;; Is file name derived from the routine name?
         ;; Method file or class definition file?
         (anamep (string-match fname-re aname))
-        (adefp (and class anamep (string= "define" (match-string 1 aname))))
+        (adefp (and idlwave-twin-class anamep
+                    (string= "define" (match-string 1 aname))))
         (bnamep (string-match fname-re bname))
-        (bdefp (and class bnamep (string= "define" (match-string 1 bname)))))
+        (bdefp (and idlwave-twin-class bnamep
+                    (string= "define" (match-string 1 bname)))))
 
     ;; Now: follow JD's ideas about sorting.  Looks really simple now,
     ;; doesn't it?  The difficult stuff is hidden above...
@@ -8980,7 +8982,7 @@
      ((idlwave-xor acompp bcompp)      acompp) ; Compiled entries
      ((idlwave-xor apathp bpathp)      apathp) ; Library before non-library
      ((idlwave-xor anamep bnamep)      anamep) ; Correct file names first
-     ((and class anamep bnamep                  ; both file names match ->
+     ((and idlwave-twin-class anamep bnamep     ; both file names match ->
           (idlwave-xor adefp bdefp))  bdefp)   ; __define after __method
      ((> anpath bnpath)                t)      ; Who is first on path?
      (t                                nil)))) ; Default


reply via email to

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