forms-pass.el 692 B

12345678910111213141516171819202122232425262728293031323334
  1. ;;; forms-pass.el --- passwd file demo for forms-mode -*- no-byte-compile: t -*-
  2. ;; This file is part of GNU Emacs.
  3. ;;; Commentary:
  4. ;; This demo visits your passwd file.
  5. ;;; Code:
  6. ;; use yp if present
  7. (or (file-exists-p (setq forms-file "/var/yp/src/passwd"))
  8. (setq forms-file "/etc/passwd"))
  9. (setq forms-read-only t) ; to make sure
  10. (setq forms-field-sep ":")
  11. (setq forms-number-of-fields 7)
  12. (setq forms-format-list
  13. (list
  14. "====== Visiting " forms-file " ======\n\n"
  15. "User : " 1
  16. " Uid: " 3
  17. " Gid: " 4
  18. "\n\n"
  19. "Name : " 5
  20. "\n\n"
  21. "Home : " 6
  22. "\n\n"
  23. "Shell: " 7
  24. "\n"))
  25. ;;; forms-pass.el ends here