• Top
    • Documentation
    • Books
      • Cert.pl
      • Community-books
      • Project-dir-alist
      • Bookdata
      • Book-hash
      • Uncertified-books
      • Sysfile
      • Show-books
      • Best-practices
        • Working-with-packages
        • Theory-management
        • Naming-rewrite-rules
        • Conventional-normal-forms
        • Where-do-i-place-my-book
        • File-names
        • File-extensions
        • Remove-whitespace
          • Finite-reasoning
        • Books-reference
        • Where-do-i-place-my-book
        • Books-tour
      • Recursion-and-induction
      • Boolean-reasoning
      • Debugging
      • Projects
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Best-practices

    Remove-whitespace

    How to find and remove whitespace from .lisp files

    Some of us are of the opinion that it's good hygiene to not allow trailing whitespaces. To see trailing-whitespaces in Emacs enable:

    (setq-default show-trailing-whitespace t)

    To remove trailing-whitespaces from a file you have open in emacs do:

    M-x delete-trailing-whitespace

    To find trailing whitespaces in .lisp files within your current directory, in your shell do:

    find . -name '*.lisp' -exec egrep -l " +$" {} ;