(defun lsdb-insert-entry (entry)
(let ((entry-name (capitalize (symbol-name (car entry)))))
(intern entry-name lsdb-known-entry-names)
- (insert "\t" entry-name ": "
- (if (listp (cdr entry))
- (mapconcat
- #'identity (cdr entry)
- (if (eq ?, (nth 2 (assq (car entry) lsdb-entry-type-alist)))
- ", "
- "\n\t\t"))
- (cdr entry))
- "\n")))
+ (if (>= (lsdb-entry-score entry) 0)
+ (insert "\t" entry-name ": "
+ (if (listp (cdr entry))
+ (mapconcat
+ #'identity (cdr entry)
+ (if (eq ?, (nth 2 (assq (car entry)
+ lsdb-entry-type-alist)))
+ ", "
+ "\n\t\t"))
+ (cdr entry))
+ "\n"))))
(defun lsdb-print-record (record)
(insert (car record) "\n")
(lambda (entry1 entry2)
(> (lsdb-entry-score entry1) (lsdb-entry-score entry2))))))
(while entries
- (if (>= (lsdb-entry-score (car entries)) 0)
- (lsdb-insert-entry (car entries)))
+ (lsdb-insert-entry (car entries))
(setq entries (cdr entries)))))
;;;_. Completion
(lsdb-edit-form
(cdr entry) "Editing the entry."
`(lambda (form)
- (unless (equal form ',entry-name)
+ (unless (equal form ',(cdr entry))
(save-excursion
(set-buffer lsdb-buffer-name)
(goto-char ,marker)