1000.
(elint-add-required-env): Don't beep on error.
(elint-forms): In case of error, return ENV unchanged.
+ (elint-init-env): Skip non-list forms.
+ (elint-log): Handle unknown file positions.
2009-09-12 Daiki Ueno <ueno@unixuser.org>
(setq form (elint-top-form-form (car forms))
forms (cdr forms))
(cond
+ ;; Eg nnmaildir seems to use [] as a form of comment syntax.
+ ((not (listp form))
+ (elint-error "Skipping non-list form `%s'" form))
;; Add defined variable
((memq (car form) '(defvar defconst defcustom))
(setq env (elint-env-add-var env (cadr form))))
(if f
(file-name-nondirectory f)
(buffer-name)))
- (save-excursion
- (goto-char elint-current-pos)
- (1+ (count-lines (point-min)
- (line-beginning-position))))
+ (if (boundp 'elint-current-pos)
+ (save-excursion
+ (goto-char elint-current-pos)
+ (1+ (count-lines (point-min)
+ (line-beginning-position))))
+ 0) ; unknown position
type
(apply 'format string args))))