From: Mark Borges <mdb@cdc.noaa.gov>
Subject: Re: .signature vs message.el
Date: 09 Apr 1996 13:12:43 -0600 [thread overview]
Message-ID: <vk91g55hzo.fsf@cdc.noaa.gov> (raw)
In-Reply-To: Mark Borges's message of 09 Apr 1996 00:12:52 -0600
>> On 09 Apr 1996 00:12:52 -0600,
>> Mark Borges(mb) wrote:
mb> Before the switch, I had a cheesy function defined on `\C-c\C-w'
mb> in mail-mode-map that would insert the contents of "~/.sig"
mb> normally, but if given a prefix argument, would insert the
mb> contents of "~/.signature" instead.
mb> What is the cleanest way to get this behavior back?
Well, this is what I came up with. Can anyone see anything cleaner?
Can message-mode-map somehow inherit from mail-mode-map (or
vice-versa), so I don't have to replicate code for VM?
--------------------------------------------------
; is there a better hook -- one that only runs once, after message has
; done its thing, e.g., message-init-hook?
(add-hook 'message-setup-hook 'my-mail-setup)
(defun my-mail-setup ()
(setq
message-signature nil
message-indent-citation-function nil
message-citation-line-function nil
message-cite-function 'sc-cite-original
)
; ...other stuff...
(define-key mail-mode-map [(control x) n] 'abbrev-hacking-next-line)
(define-key mail-mode-map [(meta >)] 'abbrev-hacking-end-of-buffer)
(define-key message-mode-map [(control c) (control w)] 'mdb:signature)
; so VM can see it too
(define-key mail-mode-map [(control c) (control w)] 'mdb:signature))
;;; ********************
(defun mdb:signature (&optional long-sig)
"Sign letter with contents of `mail-signature-file'.
Prefix arg means use long signature."
(interactive "P")
(require 'message)
(if long-sig
(setq message-signature-file "~/.signature")
(setq message-signature-file "~/.sig"))
(message-insert-signature 1)
)
--------------------------------------------------
--
-mb-
next prev parent reply other threads:[~1996-04-09 19:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-03-28 15:26 Robert Pluim
1996-03-28 19:34 ` Jack Vinson
1996-03-29 5:41 ` Lars Magne Ingebrigtsen
1996-03-29 12:00 ` Robert Pluim
1996-04-09 6:12 ` Mark Borges
1996-04-09 19:12 ` Mark Borges [this message]
1996-04-09 22:08 ` d. hall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vk91g55hzo.fsf@cdc.noaa.gov \
--to=mdb@cdc.noaa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).