Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
377 B

5 years ago
  1. # -*- mode: snippet -*-
  2. # name: read lines of a file
  3. # contributor : Xah Lee
  4. # --
  5. (defun read-lines (filePath)
  6. "Return a list of lines in FILEPATH."
  7. (with-temp-buffer
  8. (insert-file-contents filePath)
  9. (split-string
  10. (buffer-string) "\n" t)))
  11. ;; process all lines
  12. (mapc
  13. (lambda (aLine)
  14. (message aLine) ; do your stuff here
  15. )
  16. (read-lines "inputFilePath")
  17. )