Function: idlwave-best-rinfo-assq
idlwave-best-rinfo-assq is a byte-compiled function defined in
idlwave.el.gz.
Signature
(idlwave-best-rinfo-assq NAME TYPE CLASS LIST &optional WITH-FILE KEEP-SYSTEM)
Documentation
Like idlwave-rinfo-assq, but get all twins and sort, then return first.
If WITH-FILE is passed, find the best rinfo entry with a file included. If KEEP-SYSTEM is set, don't prune system for compiled syslib files.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/idlwave.el.gz
(defun idlwave-best-rinfo-assq (name type class list &optional with-file
keep-system)
"Like `idlwave-rinfo-assq', but get all twins and sort, then return first.
If WITH-FILE is passed, find the best rinfo entry with a file
included. If KEEP-SYSTEM is set, don't prune system for compiled
syslib files."
(let ((twins (idlwave-routine-twins
(idlwave-rinfo-assq-any-class name type class list)
list))
syslibp)
(when (> (length twins) 1)
(setq twins (sort twins #'idlwave-routine-entry-compare-twins))
(if (and (null keep-system)
(eq 'system (car (nth 3 (car twins))))
(setq syslibp (idlwave-any-syslib (cdr twins)))
(not (equal 1 syslibp)))
;; Its a compiled syslib, so we need to remove the system entry
(setq twins (cdr twins)))
(if with-file
(setq twins (delq nil
(mapcar (lambda (x)
(if (nth 1 (nth 3 x)) x))
twins)))))
(car twins)))