summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-11-06 12:55:44 -0700
committerGlenn Morris <rgm@gnu.org>2010-11-06 12:55:44 -0700
commite2a9c0bca0dc06975181556767a3b6db8de4e486 (patch)
tree78de9005b4153d313e2131766555a1e1914a7db7 /lisp
parent4e44448fcd43f825c373f6620203db213196a194 (diff)
downloademacs-e2a9c0bca0dc06975181556767a3b6db8de4e486.tar.gz
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/idlwave.el30
2 files changed, 20 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index da40654f0de..aaab0c660c5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2010-11-06 Glenn Morris <rgm@gnu.org>
+ * 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.
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 138357e2dfc..1d779fef45f 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -8828,7 +8828,7 @@ routines, and may have been scanned."
(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 @@ routines, and may have been scanned."
;; 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 @@ names and path locations."
(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 @@ This basically calls `idlwave-routine-twin-compare' with the correct args."
(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 @@ This expects NAME TYPE CLASS to be bound to the right values."
;; 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 @@ This expects NAME TYPE CLASS to be bound to the right values."
((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