title: Emacs Per File Customization
body: <p>I have an Emacs Lisp file with custom macros I want fontified and indented differently.  The code looks like:</p>
  
  <pre><code>(defmacro* when-let ((var value) &amp;rest body)
    `(let ((,var ,value))
       (when ,var ,@body)))
  
  (defun func ()
    (when-let (a 1)
      a))
  </code></pre>
  
  <p>I want <code>when-let</code> fontified as a <code>font-lock-keyword</code> and indented as above.  I know I can do this in my .emacs file but I'd prefer to make it a directory local or file local customization.  The problem is that directory local and file local customizations seem to be limited to setting variables.  In my .emacs file I have the following.</p>
  
  <pre><code>(add-hook 'emacs-lisp-mode-hook
     (lambda ()
               (put 'when-let 'lisp-indent-function 1)
               (font-lock-add-keywords nil
                                       '(("(\\(when-let\\)\\&gt;" 1
                                          font-lock-keyword-face)))))
  </code></pre>
  
  <p>I want this in <code>.dir-locals.el</code> because it applies only to one file.</p>