On 11 Mar 2005 10:10:44 -0800, Scott Waichler <[EMAIL PROTECTED]> wrote:
> I am looking for a way to toggle the character under the cursor. When
> the character is "T", I'd like to hit a keystroke and change it to "F",
> and vice versa. I use these characters to set logical values in R
> programming. Can anyone tell me the lisp coded needed for this?
Possibly a kludge, but:
(defun toggle-t-r ()
(interactive)
(case (char-after)
(?F (delete-char 1)
(insert "T")
(backward-char 1))
(?T (delete-char 1)
(insert "F")
(backward-char 1))))
--
Denis Bueno
PGP: http://pgp.mit.edu:11371/pks/lookup?search=0xA1B51B4B&op=index
_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs