help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Email "cut here" code snippets


From: Glyn Millington
Subject: Re: Email "cut here" code snippets
Date: Thu, 29 Jan 2015 13:30:34 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

torys.anderson@gmail.com (Tory S. Anderson) writes:

> I use GNUs and notice that some people include "---8<-- cut here" type
> snippets, which are specially formatted in my view. Where can I find
> this behavior documented, and is there a predefined shortcut for
> inserting these? I haven't spotted anything on it in the GNUs manual or
> online searches.

I have had this in my init.el/.emacs for ever!  It's not mine and I can't
remember where it came from but it works



;;;; SCISSORS
(defvar scissors "8<------"
  "string to insert in \\[scissors]")

(defun scissors ()
  "Insert a line of SCISSORS in the buffer"
  (interactive)
  (or (bolp) (beginning-of-line 2))
  (while (<= (current-column) (- (or fill-column 70) (length scissors)))
    (insert scissors))
  (newline))

(bind-key "s-s" 'scissors)


hth


Glyn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]