unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: jadamson@partners.org (Joel J. Adamson)
To: help-gnu-emacs@gnu.org
Subject: Re: newbie elisp help ??
Date: Wed, 15 Aug 2007 16:08:29 -0400	[thread overview]
Message-ID: <87k5rwimrm.fsf@W0053328.mgh.harvard.edu> (raw)
In-Reply-To: mailman.4824.1187198869.32220.help-gnu-emacs@gnu.org

William Case <billlinux@rogers.com> writes:

> I suppose I am asking for the programming equivalent of 'C-u n'.

Well yeah: my question is "why do you want to program this?"  Whenever
I want such a divider, I just enter "M-7 M-0 *", like this:

**********************************************************************

That took three keystrokes.  If you want to repeat it a bunch of
times, you can make it a macro, and name the macro.  However, either
making it a macro and calling it by name, or programming it as an
interactive function takes more keystrokes (unless you give it a
one-letter name or bind it to a key, e.g., C-c *).

If you want to call this from inside a function, or make it part of a
mode, I'd suggest looking at the code for major modes, such as sh-mode
or message-mode.

Joel

-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

"It can be interesting to study ancient philosophy, but more as a kind
of accident report than to teach you anything useful."
                                        --Paul Graham
					http://www.paulgraham.com/raq.html

  parent reply	other threads:[~2007-08-15 20:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4824.1187198869.32220.help-gnu-emacs@gnu.org>
2007-08-15 18:02 ` newbie elisp help ?? Pascal Bourguignon
2007-08-15 19:04   ` William Case
2007-08-17 20:44   ` Thien-Thi Nguyen
2007-08-15 20:08 ` Joel J. Adamson [this message]
2007-08-16  2:30   ` William Case
     [not found]   ` <mailman.4845.1187231410.32220.help-gnu-emacs@gnu.org>
2007-08-16 14:09     ` Joel J. Adamson
2007-08-15 17:27 William Case
2007-08-15 17:48 ` Lennart Borgman (gmail)
2007-08-15 18:16   ` William Case
2007-08-15 18:24     ` Lennart Borgman (gmail)
     [not found] ` <46C342F9.8070808@gmail.com>
2007-08-15 19:07   ` William Case

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k5rwimrm.fsf@W0053328.mgh.harvard.edu \
    --to=jadamson@partners.org \
    --cc=help-gnu-emacs@gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).