title: What does byte-compile-disable-warning do?
body: <p>It doesn't seem to do anything at all, no matter what the argument is. It also doesn't affect the byte-compile warnings in any way. If used according to its description. Is there any example of how to use it?</p>
  
  <p>For example, the code below:</p>
  
  <pre><code>(defmacro deflocal (var &amp;rest body)
    (let ((symb var)
          (val (car body))
          (doc (cadr body)))
      `(progn
         (let ((byte-compile-warnings nil))
         ;; (byte-compile-disable-warning 'make-local)
         (set (make-local-variable ',symb) ,val)
         (put ',symb 'variable-documentation ,doc)
         ;; (byte-compile-enable-warning 'make-local)
         ))))
  </code></pre>
  
  <p>Can do whatever it wants to <code>byte-compile-warnings</code>, and it doesn't affect the compiler's output in any way (I still get warnings about assignment to free variable.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Because this was opaque in my description above. Here's why I don't want to use <code>defvar</code>. I have an interactive function that will start sort of interactive shell for communicating with a program outside Emacs. This shell may be started directly by user, indirectly when entering several different major modes or when performing some other tasks, like compiling, checking syntax and so on. The system is fairly complex.</p>
  
  <p>I've encountered many times that certain functions may eventually set variables in the buffers I don't want. For example, when compilation hook calls a function that assumes it is called in the buffer that owns the connection object. The connection can fail, and so the system is made to try to automatically restore the connection, once it discovers that it failed for any reason (unfortunately, the other program I have to connect to is very unstable and its communication facilities are poorly implemented). So if, for example, flymake process suddenly realizes it needs to restore the connection it will create it in whatever buffer flymake was at that point. Similarly, compilation mode buffer, completion buffer, help buffers and so on. It is <em>very</em> difficult to follow after these changes of context.</p>
  
  <p>Now, when I can be sure that no other buffer will accidentally declare the variable to reference the connection object, or else it will error, I'm safe, and it is easy to debug and troubleshoot the problems as they appear. However, once I use <code>defvar</code>, after a while I realize that some rouge duplicated processes have been created, and I've absolutely no clue who did that.</p>