4.3BSD/usr/contrib/emacs/lisp/nroff-mode.elc
(defvar nroff-mode-abbrev-table nil "Abbrev table used while in nroff mode.")
(defvar nroff-mode-map nil "Major mode keymap for nroff-mode buffers")
(if (not nroff-mode-map) (progn (setq nroff-mode-map (make-sparse-keymap)) (define-key nroff-mode-map " " (quote tab-to-tab-stop)) (define-key nroff-mode-map "s" (quote center-line)) (define-key nroff-mode-map "?" (quote count-text-lines)) (define-key nroff-mode-map "
" (quote electric-nroff-newline)) (define-key nroff-mode-map "n" (quote forward-text-line)) (define-key nroff-mode-map "p" (quote backward-text-line))))
(defun nroff-mode nil "\
Major mode for editing text intended for nroff to format.
\\{nroff-mode-map}
Turning on Nroff mode runs text-mode-hook, then nroff-mode-hook.
Also, try nroff-electric-mode, for automatically inserting
closing requests for requests that are used in matched pairs." (interactive) (byte-code "ÉˆÊ ˆË!ˆÌ‰ˆÍ‰ˆÎ!ˆ
‰ˆÏÐ!ˆÏÆ!ˆÑ‰ˆÏÇ!ˆÒP‰ˆÏÈ!ˆÒP‰ˆÓÔÕ\"‡" [nroff-mode-map mode-name major-mode text-mode-syntax-table local-abbrev-table nroff-mode-abbrev-table page-delimiter paragraph-start paragraph-separate nil kill-all-local-variables use-local-map "Nroff" nroff-mode set-syntax-table make-local-variable nroff-electric-mode "^\\.bp" "^\\.\\|" run-hooks text-mode-hook nroff-mode-hook] 10))
(defun count-text-lines (start end &optional print) "\
Count lines in region, except for nroff request lines.
All lines not starting with a period are counted up.
Interactively, print result in echo area.
Noninteractively, return number of non-request lines from START to END." (interactive "r
p") (byte-code "ȃ ÄÅÆ
\"\"‚# ŠŒÇ
\"ˆebˆÈ ÉÈ !Z))‡" [print start end nil message "Region has %d text lines" count-text-lines narrow-to-region buffer-size forward-text-line] 8))
(defun forward-text-line (&optional cnt) "\
Go forward one nroff text line, skipping lines of nroff requests.
An argument is a repeat count; if negative, move backward." (interactive "p") (byte-code "Áˆ?ƒ
‰‚ ÁˆÃV… m?…: ÄÂ!ˆm?…&