0

I am having a file open with lisp code that has some functions written. The file has elisp-mode as a major mode. Emacs shows highlighting and errors on lines with functions that some function definitions miss or do not have correct comments. I'd like not to see any warnings on the comments. Is it possible to disable those warnings?

9
  • 1
    The question isn't clear. Show the warning(s) you're talking about - we can't guess what warning you mean, by "function comments" and "something is not according to some rules". (You can wrap code with with-no-warnings, to suppress the warnings it produces. But so far you haven't specified what warnings you're talking about.)
    – Drew
    Jan 1, 2023 at 16:56
  • @Drew Since he mentioned function comments, I think he is speaking about byte-compiler warnings.
    – Tobias
    Jan 1, 2023 at 17:33
  • @Tobias: If you understand what was meant, please edit the question to make what it means clear. Thx.
    – Drew
    Jan 1, 2023 at 18:31
  • 1
    @Drew Let us see whether he accepts my answer. In that case I or he can edit the question accordingly. Otherwise I just delete my answer and we clarify the question. (BTW, all the best for 2023.)
    – Tobias
    Jan 1, 2023 at 19:43
  • 1
    That still does not explain what you are doing when you get the warnings. Are you trying to evaluate something or perhaps as @Tobias suggests, are you trying to byte-compile the file? What does the warning say? Does it identify the function? What does that function look like? You need to describe what is happening in detail.
    – NickD
    Jan 1, 2023 at 21:35

1 Answer 1

0

If you are talking about the byte compiler warnings you can supress them by setting byte-compiler-warnings to nil file-locally.

E.g., the compiler compiles the following file without warnings.

;; -*- lexical-binding: t; byte-compile-warnings: nil  -*-

(defun foo (bar)
  "Very long function comment that exceeds 80 characters by far through very many characters."
  )

The warnings can be controlled more fine-grained. See the variable documentation of byte-compile-warnings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.