Me, as an icon
Me! From the Abi-Station Icon generator.
[ 19:40 Feb 19, 2005 More humor | permalink to this entry | ]
I had already googled to no avail, and had concluded that the only way was to write a new text-indent function which could be bound to the return key in the text mode hook.
This went fairly smoothly: I got a little help in #emacs with checking the pattern immediately before the cursor (though I turned out not to need that after all) and for the function called "bobp" (beginning of buffer predicate). Here's what I ended up with:
(defun newline-and-text-indent ()
"Insert a newline, then indent the next line sensibly for text"
(interactive)
(if (or (bobp)
(looking-at "^$"))
(newline)
(newline-and-indent)
))
(defun text-indent-hook ()
(local-set-key "\C-m" 'newline-and-text-indent)
)
(setq text-mode-hook 'text-indent-hook)
It seems to work fine. For the curious, here's my current .emacs