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

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

Re: newbie elisp help ??


From: Joel J. Adamson
Subject: Re: newbie elisp help ??
Date: Wed, 15 Aug 2007 16:08:29 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

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


reply via email to

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