view lisp/forms-pass.el @ 24092:d98712ec1252

(find-buffer-file-type-coding-system): Use default-buffer-file-coding-system when file doesn't exist (and isn't covered by a special case) instead of forcing undecided-dos against the user's wishes. (direct-print-region-helper): New function based on direct-print-region-function; sends data to specified printer port without further translation. Recognize and handle specially the standard `print' and `nprint' programs, as well as `lpr' and similar programs. Only write directly to the printer port if no print program is specified. Work around a bug in Windows 9x affecting Win32 version of Emacs by invoking command.com to write to the printer port instead of writing directly. (direct-print-region-function): Use direct-print-region-helper to do most of the work. (direct-ps-print-region-function): New function; analogue of direct-print-region-function for ps-print. (ps-lpr-command): Comment out setq; leave as example usage. (ps-lpr-switches): Ditto.
author Andrew Innes <andrewi@gnu.org>
date Sun, 17 Jan 1999 19:00:24 +0000
parents 84acc3adcd63
children 67b464da13ec
line wrap: on
line source

;;; forms-pass.el --- passwd file demo for forms-mode

;; This demo visits your passwd file.

;; use yp if present
(or (file-exists-p (setq forms-file "/var/yp/src/passwd"))
    (setq forms-file "/etc/passwd"))

(setq forms-read-only t)		; to make sure
(setq forms-field-sep ":")
(setq forms-number-of-fields 7)

(setq forms-format-list
      (list
       "====== Visiting " forms-file " ======\n\n"
       "User : "	1
       "   Uid: "	3
       "   Gid: "	4
       "\n\n"
       "Name : "	5
       "\n\n"
       "Home : "	6
       "\n\n"
       "Shell: "	7
       "\n"))