This is somewhere between fully intentional and a bug. I'm not sure towards which side this one leans to, so I'll just let the sources speak for themselves:
(defun elint-add-required-env (env name file)
"Augment ENV with the variables defined by feature NAME in FILE."
(condition-case err
(let* ((libname (if (stringp file)
file
(symbol-name name)))
;; First try to find .el files, then the raw name
(lib1 (locate-library (concat libname ".el") t))
(lib (or lib1 (locate-library libname t))))
;; Clear the messages :-/
;; (Messes up the "Initializing elint..." message.)
;;; (message nil)
(if lib
(with-current-buffer (find-file-noselect lib)
;; FIXME this doesn't use a temp buffer, because it
;; stores the result in buffer-local variables so that
;; it can be reused.
(elint-update-env)
(setq env (elint-env-add-env env elint-buffer-env)))
;;; (with-temp-buffer
;;; (insert-file-contents lib)
;;; (with-syntax-table emacs-lisp-mode-syntax-table
;;; (elint-update-env))
;;; (setq env (elint-env-add-env env elint-buffer-env))))
;;(message "Elint processed (require '%s)" name))
(error "%s.el not found in load-path" libname)))
(error
(message "Can't get variables from require'd library %s: %s"
name (error-message-string err))))
env)
The crucial part here is find-file-noselect
. To recapitulate, elint is a package that lints elisp files by a set of built-in rules and rules that are created by scanning both the source buffer and all required libraries. The latter is done recursively to catch them all. Now, if it were using temporary buffers to do this, you wouldn't ever know of it, but it doesn't and instead goes for the horrifictried and true way of opening extra buffers, storing buffer-local data in them and keeping them around in case someone lints stuff again.
I'm afraid there's no option to customize this behavior. Hand in a bug or better, if you have an idea how to do better, a patch.
Personally, I wouldn't bother. Use M-x byte-compile-file
and look at the compilation buffer instead. Its warnings cover everything elint does and unlike elint, the byte-compiler gets improved on a regular basis. The excellent flycheck package hides this manual step for you and integrates the warnings right where they belong, into the source buffer in form of squiggly lines.