Newsgroups: fj.editor.emacs
Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!wnoc-tyo-news!news.u-tokyo.ac.jp!s.u-tokyo!kuis!okabe
From: okabe@kutsuda.kuis.kyoto-u.ac.jp (Yasuo Okabe)
Subject: Re: mh-e no signature
In-Reply-To: a93m80@kyushu-id.ac.jp's message of Thu, 13 May 1993 13:24:30 GMT
Message-ID: <OKABE.93May14200053@boots.kutsuda.kuis.kyoto-u.ac.jp>
Sender: news@kuis.kyoto-u.ac.jp
Nntp-Posting-Host: sole.kutsuda.kuis.kyoto-u.ac.jp
Reply-To: okabe@kutsuda.kuis.kyoto-u.ac.jp
Organization: Dept. of Information Science, Kyoto University, JAPAN
References: <A93M80.93May13222430@kidss2.kyushu-id.ac.jp>
Distribution: fj
Date: Fri, 14 May 1993 11:00:53 GMT
Lines: 75
Xref: galaxy.trc.rwcp.or.jp fj.editor.emacs:3737
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.editor.emacs&nb=3737&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 <A93M80.93May13222430@kidss2.kyushu-id.ac.jp>,
    a93m80@kyushu-id.ac.jp (Munehiro Touno) writes:

a93m80>   mh-e$B$G%7%0%M%A%c$r$D$1$k;~$O(B C-c C-s$B$G$9$,!"$3$N$H$-$K(B
a93m80> $BFI$_9~$^$l$k%U%!%$%k$O!"(B.signature$B$G$9!#$3$NFI$_9~$^$l$k(B
a93m80> $B%U%!%$%kL>$rJQ99$7$?$$$N$G$9$,$I$&$7$?$i$h$$$N$G$7$g$&$+!)(B
a93m80>   /usr/local/emacs18.55/mh-e-3.6.el $B$r$N$>$$$F$=$l$i$7$$(B
a93m80> $B$H$3$m$O8+$D$+$C$?$N$G$9$,!"$3$l$r$I$&$d$C$F(B.emacs$B$K@_Dj(B
a93m80> $B$9$l$P$h$$$N$+$o$+$j$^$;$s!#(B

$B$3$l$r$=$N$^$^(B .emacs $B$K=q$$$F$b$&$^$/$$$+$J$$!"$H$$$&$3$H$G$9$M!#(B
$B$*$=$i$/(B mh-e $B$,%W%j%m!<%I$5$l$F$$$J$$$N$G!"(B.emacs $B$GDj5A$7$F$b(B
mh-e.el $B$,FI$_9~$^$l$k$H$-$K85$N$h$&$KDj5A$7$J$*$5$l$F$7$^$&(B
$B>u67$@$H?d;!$7$^$9!#(B

$B2r7h:v$O$$$m$$$m9M$($i$l$^$9$,!"(B.emacs $B$K=q$/$@$1$NJ}K!$H$$$&$3$H$J$i!"(B

(defun my-mh-insert-signature ()
  "Insert the file $B%U%!%$%kL>(B at the current point."
  (interactive "")
  (insert-file-contents "$B%U%!%$%kL>(B"))

(setq mh-letter-mode-hook
      '(lambda ()
(define-key mh-letter-mode-map "\C-c\C-s" 'my-mh-insert-signature)))

$B$H=q$$$F$*$1$P$*K>$_$NF0:n$,F@$i$l$k$H;W$$$^$9!#(B

$B;d<+?H$O(B hook $B$K$@$i$@$i=q$/$N$OM>$j9%$-$G$O$J$$$N$G!"(B.emacs $B$G(B

    (setq load-path (cons (expand-file-name "~/lib/elisp") load-path))

$B$H$7$F$*$$$F!"(B~/lib/elisp/mh-e.el $B$K(B

(load "/usr/local/lib/elisp/mh-e.elc" nil t nil)
;
(define-key mh-letter-mode-map "\C-c\C-s" 'my-mh-insert-signature)))
$B$=$NB>8D?ME*$J@_Dj(B

$B$H=q$/$h$&$K$7$F$$$^$9!#(B

$B$D$$$G$K8@$$$^$9$H!"I8=`$N(B mh-insert-signature $B$O8=:_0LCV$KFI$_9~$`$N$,(B
$B5$$KF~$i$J$$$N$G!"0J2<$N$h$&$J4X?t$rDj5A$7$F;H$C$F$$$^$9!#(B

;
(defvar mh-signature-file "~/.mh_signature"
  "*Your .mh_signature file. Use `.mh_signature-DISTRIBUTION'
   instead if exists.")

(defun mh-insert-signature-at-eof (&optional arg)
  "Insert the file ~/.mh_signature at the end of file."
  (interactive "P")
  (let ((signature
 (if mh-signature-file
     (expand-file-name mh-signature-file nil)))
(distribution nil))
    (save-excursion
      (if arg
  (setq distribution "world"))
      (if signature
  (progn
    ;; Change signature file by distribution.
    (if (file-exists-p (concat signature "-" distribution))
(setq signature (concat signature "-" distribution)))
    ;; Insert signature.
    (if (file-exists-p signature)
(progn
  (goto-char (point-max))
  (insert "-----\n")
  (insert-file-contents signature)))
    (set-buffer-modified-p (buffer-modified-p))) ; force mode line update
    )))
)
-----
$B2,It<wCK!w5~ETBg3X9)3XIt>pJs9)3X65<<7W;;5!%=%U%H%&%'%"9V:B(B
