Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!nirvana.cs.titech!wnoc-tyo-news!sranha!sranhd!sran230.sra.co.jp!sran230!kawabe
From: kawabe@sra.CO.JP (Yoshikatsu Kawabe)
Newsgroups: fj.editor.emacs
Subject: Re: [Q] gopher.el
Date: 14 Dec 1993 04:34:39 GMT
Organization: Software Research Associates, Inc., Japan
Lines: 102
Distribution: fj
Message-ID: <KAWABE.93Dec14133440@sras48.sra.CO.JP>
References: <17034@hoffman.cc.sophia.ac.jp>
NNTP-Posting-Host: sras48.sra.co.jp
In-reply-to: yokota-n@hoffman.cc.sophia.ac.jp's message of 13 Dec 93 17:54:46 GMT
Xref: galaxy.trc.rwcp.or.jp fj.editor.emacs:4284
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.editor.emacs&nb=4284&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.


>>>>> In article <17034@hoffman.cc.sophia.ac.jp>,
yokota-n@hoffman.cc.sophia.ac.jp (Narumi Yokota) writes:
  | 
  | gopher.el$B$r$D$+$C$F8+$?$N$G$9$,!"%P%$%J%j!<%U%!%$%k$N%;!<%V$,JQ$J$N$G$9!#(B
  | $B$I$3$,JQ$+$H$$$&$H%5%$%:$,L/$K%G%+$/$J$k$N$G$9!#(B
  |

$BJ8;z%3!<%I$N<+F0JQ49$,9T$o$l$F$$$k$?$a$G$7$g$&!#(B $B$3$A$i$G$O!"(B
gopher.el Version 1.03 $B$K<!$N%Q%C%A$r$"$F$F;H$C$F$$$^$9!#$?$@$7!"(B
$B$3$l$O(B MULE $BMQ$NJQ99$K$J$C$F$$$F!"(BNEMACS $B$G$OF0$-$^$;$s!#(B

  | $B$"$H(Bgopher.el$B$K=q$$$F$"$C$?(B.emacs$B$N@_DjJ}K!$G@_Dj$7$F$b(BM-x gopher$B$G(B
  | $B5/F0$7$^$;$s!#$J$<$J$N$G$7$g$&$+!#(B($BM}6~$G$OF0$/$O$:$J$N$K!D(B)
  |

gopher-root-node $B$O@5$7$/@_Dj$5$l$F$$$^$9$+!#(B

____ Y. Kawabe @ SRA ____


--- gopher.el.origSun Aug 15 22:33:36 1993
+++ gopher.elTue Dec 14 13:28:54 1993
@@ -175,6 +175,11 @@
 (require 'electric)
 (require 'forms)
 
+;;
+
+(define-service-coding-system "gopher" nil *noconv*)
+(define-service-coding-system 70 nil *noconv*)
+
 ;; background has the same name as an epoch function. 
 ;; Rename it to gopher-background...
 ;; also, the version i got from the archive didn't have a provide...
@@ -525,6 +530,10 @@
         (progn
           (kill-buffer dirbuf)
           (error "Problems retrieving directory."))
+      
+      ;; convert coding-sytem
+      (set-buffer tmpbuf)
+      (code-convert-region (point-min) (point-max) *autoconv* *internal*)
 
       ;; Parse it and store our internal representation in gopher-dir.
       (switch-to-buffer dirbuf)
@@ -632,7 +641,9 @@
   (setq major-mode 'gopher-directory-mode)
   (setq mode-name "gopher dir")
   (run-hooks 'gopher-directory-mode-hook)
-  (setq buffer-read-only t))
+  (setq buffer-read-only t)
+  (setq truncate-lines t)
+  )
 
 
 ;;; keymap for directory mode
@@ -650,6 +661,7 @@
 ; Virginia Peck <vapeck@cs>  Mon Aug 10 1992
 (define-key gopher-directory-mode-map "n"  'next-line)
 (define-key gopher-directory-mode-map "p"  'previous-line)
+(define-key gopher-directory-mode-map "g"  'goto-line)
 ;;(define-key gopher-directory-mode-map "\C-xk"  'gopher-last-node)
 
 ; Stewart Clamen <clamen@cs.cmu.edu>  Mon Aug 17 1992
@@ -1087,6 +1099,10 @@
           (kill-buffer docbuf)
           (error "Problems retrieving document."))
       
+      ;; convert coding-sytem
+      (set-buffer docbuf)
+      (code-convert-region (point-min) (point-max) *autoconv* *internal*)
+      
       ;; Turn on document mode and put the description in the mode line.
       (switch-to-buffer docbuf)
       (gopher-make-local-vars
@@ -1355,9 +1371,9 @@
   (error "Problems retrieving object.")
   (kill-buffer buf))
  
-      (save-excursion
-(set-buffer buf)
-(write-file fname))
+      (set-buffer buf)
+      (let ((require-final-newline nil))
+(write-region (point-min) (point-max) fname nil nil *noconv*))
       (kill-buffer buf)
       (if (and showit gopher-image-display-command)
 
@@ -1398,9 +1414,9 @@
           (error "Problems retrieving object.")
           (kill-buffer buf))
 
-      (save-excursion
-        (set-buffer buf)
-        (write-file fname))
+      (set-buffer buf)
+      (let ((require-final-newline nil))
+(write-region (point-min) (point-max) fname nil nil *noconv*))
       (kill-buffer buf)
       )))
 
