unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* conditional text insertion
@ 2011-07-19  5:47 Lister Account
  2011-07-19  7:24 ` Deniz Dogan
  0 siblings, 1 reply; 7+ messages in thread
From: Lister Account @ 2011-07-19  5:47 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

I have a keybinding I just made that essentially will go to the end of a
line, insert a semicolon, return, and auto-indent.

I'd like to only add the semicolon if it doesn't already exist.

In other words, go to the end of the line, if a semicolon is there, return.
If a semicolon is not there, add one, then return.

I'm brand spanking new to emacs, and I'm sure this is a task that others
have resolved, but I'm having trouble googling for a solution.

Thanks,
Steve

[-- Attachment #2: Type: text/html, Size: 524 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-19 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19  5:47 conditional text insertion Lister Account
2011-07-19  7:24 ` Deniz Dogan
2011-07-19  8:54   ` Lister Account
2011-07-19  9:57     ` Lister Account
2011-07-19 14:02       ` Memnon Anon
2011-07-19 17:40         ` Lister Account
2011-07-19 10:02     ` Deniz Dogan

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).