Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convenience functions for routine entries

  • Loading branch information...
commit 3ee283529b9d13e48c006f64b0292a04eb918c15 1 parent 787db41
@jdtsmith authored
Showing with 20 additions and 8 deletions.
  1. +20 −8 idlw-routine.el
View
28 idlw-routine.el
@@ -3,7 +3,7 @@
;; Format for all routine info user catalog, library catalogs, etc.:
;;
;; ("ROUTINE" type class
-;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") |
+;; (system nil nil nil) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") |
;; (buffer pro_file dir) | (compiled pro_file dir)
;; "calling_string" ("LINKFILE" (("KWD1" . anchorlink1) ...))
;; ("LINKFILE2" (("KWD2" . ancorlink2) ...)) ...)
@@ -17,6 +17,19 @@
;;----------------------------------------------------
+;; Convenience Routines for routine info lists
+
+(defun idlwave-routine-routine-name (x)
+ (car x))
+
+(defun idlwave-routine-class-name (x)
+ (nth 2 x))
+
+(defun idlwave-routine-first-link-file (x)
+ (car (nth 5 x)))
+
+
+;;----------------------------------------------------
;; Routine Info
(defun idlwave-routine-info (&optional arg external)
@@ -493,13 +506,12 @@ When TYPE is not specified, both procedures and functions will be considered."
(idlwave-uniquify rtn))))
(defun idlwave-make-full-name (class &optional name)
- (let (class)
- (when (listp class)
- ;; a routine info or idlwave-what-module entry
- (setq name (car class)
- class (nth 2 class)))
- ;; Make a fully qualified module name including the class name
- (concat (if class (format "%s::" class) "") name)))
+ (when (and (listp class) (not (null class)))
+ ;; a routine info or idlwave-what-module entry
+ (setq name (car class)
+ class (nth 2 class)))
+ ;; Make a fully qualified module name including the class name
+ (concat (if class (format "%s::" class) "") name))
(defun idlwave-determine-class (cw-list type)
;; Determine the class of a routine call. CW-LIST is the `cw-list'
Please sign in to comment.
Something went wrong with that request. Please try again.