title: Right align line numbers with linum-mode?
body: <p>I would like that my <code>linum-mode</code> numbering is right aligned. The closest thing I've found is on emacswiki, but it doesn't work - it seems to <em>left align</em> the digits instead of <em>right align</em> it. <a href="http://www.emacswiki.org/emacs/LineNumbers#toc6" rel="noreferrer">The snippet is found here</a>. Sorry for the horrible indenting, lisp is pretty alien to me :)</p>
  
  <pre><code>(setq linum-format                               
        (lambda (line)                                    
      (propertize                                  
       (format                                 
        (let                                   
        ((w (length (number-to-string (count-lines (point-min)         
                               (point-max))))))    
      (concat "%" (number-to-string w) "d ")) line) 'face 'linum)))
  </code></pre>
  
  <p>Any ideas?</p>