Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!bellcore!ulysses!mhuxr!mhuxn!ihnp4!cuae2!ltuxa!we53!wucs!nz From: nz@wucs.UUCP Newsgroups: net.emacs Subject: slight bug in nroff-mode Message-ID: <1649@wucs.UUCP> Date: Mon, 19-May-86 16:25:28 EDT Article-I.D.: wucs.1649 Posted: Mon May 19 16:25:28 1986 Date-Received: Thu, 22-May-86 01:26:33 EDT Distribution: na Organization: Washington U. Engineering Computer Lab Lines: 98 Keywords: GNU Emacs nroff(1) I just got in the newest version of GNU Emacs, 17.64, and was using it to edit a manual page. Lo and behold, the electric-nroff-mode minor mode did not work the same way it did when I originally wrote it and posted it to the net, way back around version 16.60. The main problem is with nroff request-pair matching. When you type .DS you should get .DS _ .DE but you instead get .DS .DE _ which does not do you much good. Apply the following diff to gemacs/lisp/nroff-mode.el and recompile it. Hope this is helpful. ----------- *** nroff-mode.el Mon May 19 14:51:55 1986 --- new-nroff-mode.el Mon May 19 14:54:05 1986 *************** *** 107,112 (".(f" . ".)f") (".DS" . ".DE") (".KS" . ".KE") (".de" . ".."))) (defun electric-nroff-newline (arg) --- 107,116 ----- (".(f" . ".)f") (".DS" . ".DE") (".KS" . ".KE") + (".KF" . ".KE") + (".RS" . ".RE") + (".TS" . ".TE") + (".EQ" . ".EN") (".de" . ".."))) *************** *** 109,114 (".KS" . ".KE") (".de" . ".."))) (defun electric-nroff-newline (arg) "Insert newline for nroff mode; special if electric-nroff mode. In electric-nroff-mode, if ending a line containing an nroff opening request, --- 113,119 ----- (".EQ" . ".EN") (".de" . ".."))) + (defun electric-nroff-newline (arg) "Insert newline for nroff mode; special if electric-nroff mode. In electric-nroff-mode, if ending a line containing an nroff opening request, *************** *** 124,130 nroff-brace-table)))))) (if (null completion) (newline (prefix-numeric-value arg)) ! (insert "\n" completion "\n")))) (defun electric-nroff-mode (arg) "Toggle nroff-electric-newline minor mode --- 129,142 ----- nroff-brace-table)))))) (if (null completion) (newline (prefix-numeric-value arg)) ! (let ((inside-pair-point (+ 1 (dot)))) ! (insert "\n\n" completion "\n") ! (goto-char inside-pair-point) ! ) ! ) ! ) ! ) ! (defun electric-nroff-mode (arg) "Toggle nroff-electric-newline minor mode -- ...nz (Neal Ziring at WU ECL - we're here to provide superior computing.) {seismo,ihnp4,cbosgd}!wucs!nz OR nz@wucs.UUCP "You could get an infinite number of wires into this !*$$#!?! junction box, but we usually don't go that far in practice" -- Employee of London Electricity Board, 1959