Function: elint-log-message

elint-log-message is a byte-compiled function defined in elint.el.gz.

Signature

(elint-log-message ERRSTR &optional TOP)

Documentation

Insert ERRSTR last in the lint log buffer.

Optional argument TOP non-nil means pretend elint-top-form-logged is non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/elint.el.gz
(defun elint-log-message (errstr &optional top)
  "Insert ERRSTR last in the lint log buffer.
Optional argument TOP non-nil means pretend `elint-top-form-logged' is non-nil."
  (with-current-buffer (elint-get-log-buffer)
    (goto-char (point-max))
    (let ((inhibit-read-only t))
      (or (bolp) (newline))
      ;; Do we have to say where we are?
      (unless (or elint-top-form-logged top)
	(let* ((form (elint-top-form-form elint-top-form))
	       (top (car form)))
	  (elint-output (cond
			 ((memq top '(defun defsubst))
			  (format "\nIn function %s:" (cadr form)))
			 ((eq top 'defmacro)
			  (format "\nIn macro %s:" (cadr form)))
			 ((memq top '(defvar defconst))
			  (format "\nIn variable %s:" (cadr form)))
			 (t "\nIn top level expression:"))))
	(setq elint-top-form-logged t))
      (elint-output errstr))))