[MERGE] remove has_key() usage

Vincent LADEUIL v.ladeuil at alplog.fr
Thu Aug 31 12:42:37 BST 2006


>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:

    jam> Aaron Bentley wrote:
    >> John Arbash Meinel wrote:
    >> 
    >>>> If you want some more things to look for, we also need to remove
    >>>> trailing whitespace from lines.
    >> 
    >> Why do you feel a change like that is useful?  From my point of view
    >> trailing whitespace doesn't harm anything.
    >> 
    >> Aaron

    jam> Until you open a file in an editor setup to warn you about trailing
    jam> whitespace, and it shows up everywhere in bright red 

Lol, I swear I write my previous mail before reading this one !


<snip/>

    jam> (The line in ~/.vimrc is "let python_highlight_space_errors = 1")

So just for completeness, here is what you have to add to your
.emacs to get the same effect:

(defface my-invalid-face
  '((t (:background "Red" :underline t)))
  "Face used to highlight invalid constructs or other uglyties"
  )

(defun my-python-mode-hook ()
  (font-lock-add-keywords 'python-mode
			  '(("^\\s *\t" . 'my-invalid-face)); Leading tabs
			  '(("[ \t]+$" . 'my-invalid-face)); Trailing spaces
                          )
  )

(add-hook 'python-mode-hook 'my-python-mode-hook)

          Vincent




More information about the bazaar mailing list