;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:25:17 2007 ;;; from file /home/cyd/emacs/lisp/textmodes/nroff-mode.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`nroff-mode.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'nroff nil "Nroff mode." :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) :group 'wp :prefix "nroff-") #@71 Non-nil means automatically closing requests when you insert an open. (custom-declare-variable 'nroff-electric-mode 'nil '(#$ . 725) :group 'nroff :type 'boolean) #@37 Major mode keymap for `nroff-mode'. (defvar nroff-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210)\207" [map make-sparse-keymap define-key " " tab-to-tab-stop "s" center-line "?" nroff-count-text-lines "\n" nroff-electric-newline "n" nroff-forward-text-line "p" nroff-backward-text-line] 4) (#$ . 894)) #@42 Syntax table used while in `nroff-mode'. (defvar nroff-mode-syntax-table (byte-code "\302!\303\304\305 #\210\303\306\307 #\210\303\310\311 #\210 )\207" [text-mode-syntax-table st copy-syntax-table modify-syntax-entry 34 "\" 2" 92 "\\ 1" 10 ">"] 4) (#$ . 1296)) (byte-code "\301B\302\301!\204\303\301\304\"\210\301\207" [current-load-list nroff-imenu-expression default-boundp set-default ((nil "^\\.SH \"?\\([^\"\n]*\\)\"?$" 1))] 3) #@49 Font-lock highlighting control in `nroff-mode'. (custom-declare-variable 'nroff-font-lock-keywords '(list "^[.']\\s-*\\sw+" (concat "\\\\" "\\(" (mapconcat 'identity '("[f*n]*\\[.+?]" "(.." "[^(\"]") "\\|") "\\)")) '(#$ . 1743) :group 'nroff :type '(repeat regexp)) #@36 Hook run by function `nroff-mode'. (custom-declare-variable 'nroff-mode-hook 'nil '(#$ . 2015) :type 'hook :group 'nroff) (byte-code "\302\303N\204\f\304\302\303\305#\210\306\307!\204\304\307\310\311#\210\307B\312\307!\204(\313\307\314 \"\210\306\315!\2044\304\315\310\311#\210\315B\312\315!\204D\313\315\316 \"\210\304\301\310\311#\210\301B\312\301!\204^\313\301\317\301\320\"\210 \"\210\304\311\321\322#\207" [current-load-list nroff-mode-abbrev-table nroff-mode-hook variable-documentation put "Hook run when entering Nroff mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp nroff-mode-map definition-name nroff-mode default-boundp set-default make-sparse-keymap nroff-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent text-mode] 5) #@269 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. (defalias 'nroff-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2036 \321 =\203<\322\f\323 \"\210)\324 !\210\325\f!\210./\306\326!\210\327\306\330!\210\331\306\332!\210\333\306\334!\210\335\306\336!\210\337P\306\340!\210\337 P \306\341!\210\342!\306\343!\210\344#\306\345!\210\346%\306\347!\210\350'\306\351!\2100))\352\353!\203\250\353\354!\207\355\354!\207" [delay-mode-hooks major-mode mode-name nroff-mode-map nroff-mode-syntax-table parent make-local-variable t text-mode nroff-mode "Nroff" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table use-local-map set-syntax-table font-lock-defaults (nroff-font-lock-keywords nil t nil backward-paragraph) outline-regexp "\\.H[ ]+[1-7]+ " outline-level nroff-outline-level page-delimiter "^\\.\\(bp\\|SK\\|OP\\)" paragraph-start "[.']\\|" paragraph-separate comment-start "\\\" " comment-start-skip "\\\\\"[ ]*" comment-column 24 comment-indent-function nroff-comment-indent imenu-generic-expression fboundp run-mode-hooks nroff-mode-hook run-hooks nroff-mode-abbrev-table local-abbrev-table nroff-imenu-expression] 6 (#$ . 2891) nil]) (defalias 'nroff-outline-level #[nil "\212\301!\210\302\303w\210\304``T{!)\207" [outline-regexp looking-at ".H " nil string-to-number] 3]) #@102 Compute indent for an nroff/troff comment. Puts a full-stop before comments on a line by themselves. (defalias 'nroff-comment-indent #[nil "`\302\216\303\304x\210n\203T\305c\210\306\202.\212\307u\210\310\311!)\203%\306\202. i\312\\\313\245\313_]*\207" [pt comment-column ((goto-char pt)) " " nil 46 1 -1 looking-at "^[.']" 9 8] 3 (#$ . 4588)]) #@223 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. (defalias 'nroff-count-text-lines #[(start end &optional print) "\203\f\303\304\305 \n\"\"\207\212\214 \n}\210eb\210\306 \307\306 !Z*\207" [print start end message "Region has %d text lines" nroff-count-text-lines buffer-size forward-text-line] 5 (#$ . 4948) "r\np"]) #@126 Go forward one nroff text line, skipping lines of nroff requests. An argument is a repeat count; if negative, move backward. (defalias 'nroff-forward-text-line #[(&optional cnt) "\204\301\302V\203*m\204*\301y\210m\204#\303\304!\203#\301y\210\202S\211\202\302W\203No\204N\305y\210o\204G\303\304!\203G\305y\210\2027T\211\202+\207" [cnt 1 0 looking-at "[.']." -1] 3 (#$ . 5447) "p"]) #@128 Go backward one nroff text line, skipping lines of nroff requests. An argument is a repeat count; negative means move forward. (defalias 'nroff-backward-text-line #[(&optional cnt) "\301[!\207" [cnt nroff-forward-text-line] 2 (#$ . 5860) "p"]) (byte-code "\301B\302\303!\207" [current-load-list nroff-brace-table (lambda (#1=#:defconst-tmp-var) (defconst nroff-brace-table #1#)) ((".(b" . ".)b") (".(l" . ".)l") (".(q" . ".)q") (".(c" . ".)c") (".(x" . ".)x") (".(z" . ".)z") (".(d" . ".)d") (".(f" . ".)f") (".LG" . ".NL") (".SM" . ".NL") (".LD" . ".DE") (".CD" . ".DE") (".BD" . ".DE") (".DS" . ".DE") (".DF" . ".DE") (".FS" . ".FE") (".KS" . ".KE") (".KF" . ".KE") (".LB" . ".LE") (".AL" . ".LE") (".BL" . ".LE") (".DL" . ".LE") (".ML" . ".LE") (".RL" . ".LE") (".VL" . ".LE") (".RS" . ".RE") (".TS" . ".TE") (".EQ" . ".EN") (".PS" . ".PE") (".BS" . ".BE") (".G1" . ".G2") (".na" . ".ad b") (".nf" . ".fi") (".de" . ".."))] 2) #@208 Insert newline for nroff mode; special if electric-nroff mode. In `electric-nroff-mode', if ending a line containing an nroff opening request, automatically inserts the matching closing request after point. (defalias 'nroff-electric-newline #[(arg) "\212\305 \210?\205 \205`d\306ZX\205\307``\306\\{\n\"A)\310\311!?\211\2041\312\313!!\202A\212\314\f\261\210 \203>\315c\210)\316u*\207" [arg nroff-electric-mode nroff-brace-table needs-nl completion beginning-of-line 3 assoc looking-at "[ ]*$" newline prefix-numeric-value "\n\n" "\n" 1] 5 (#$ . 6800) "P"]) #@107 Non-nil if Nroff-Electric mode is enabled. Use the command `nroff-electric-mode' to change this variable. (defvar nroff-electric-mode nil (#$ . 7378)) (make-variable-buffer-local 'nroff-electric-mode) #@314 Toggle `nroff-electric-newline' minor mode. `nroff-electric-newline' forces Emacs to check for an nroff request at the beginning of the line, and insert the matching closing request if necessary. This command toggles that mode (off->on, on->off), with an argument, turns it on iff arg is positive, otherwise off. (defalias 'nroff-electric-mode #[(&optional arg) "\302=\203 ?\202%\203\303!\304V\202% \204\305\202%\306\307\301\"\210\310\311\312!\2040\313\314!\210\315\316 \203:\317\202;\320\"\210\321 \203O\306\322 \203L\323\202M\324\"\210\325 \210 \207" [arg nroff-electric-mode toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil derived-mode-p nroff-mode error "Must be in nroff mode" run-hooks nroff-electric-mode-hook nroff-electric-mode-on-hook nroff-electric-mode-off-hook called-interactively-p "Nroff-Electric mode %sabled" "en" "dis" force-mode-line-update] 3 (#$ . 7586) (list (or current-prefix-arg 'toggle))]) (byte-code "\300\301\302\303\304!\205 \304J#\210\305\306\307\310#\210\311\306\307\312#\210\305\313\314\310#\210\311\313\314\312#\210\305\315\316\310#\210\311\315\316\312#\210\305\317\320\310#\210\311\317\320\312#\210\305\321\301\310#\210\311\321\301\312#\210\322\323!\207" [add-minor-mode nroff-electric-mode " Electric" boundp nroff-electric-mode-map defalias count-text-lines nroff-count-text-lines nil make-obsolete "22.1" forward-text-line nroff-forward-text-line backward-text-line nroff-backward-text-line electric-nroff-newline nroff-electric-newline electric-nroff-mode provide nroff-mode] 5)