all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.