[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New command suggestion
- To: bug-zwei@MIT-OZ
- Subject: New command suggestion
- From: Scott Layson <X.GYRO@MIT-OZ>
- Date: Sat ,21 Jul 84 20:44:00 EDT
- Mail-from: X.GYRO created at 21-Jul-84 20:44:48
This is a really handy command I invented for the FinalWord editor.
FW users are so fond of it that I thought someone might want to add it
to Zmacs. I bind it to c-C, which (as far as I know) has never been
bound in the default system.
Is there some more appropriate mailing list for messages of this kind?
"Change case of current/previous word. Try it, it undoes itself.
If the cursor is on a word, this command rotates the case of the word (starting
at the current cursor position) from lowercase to capitalized to uppercase and
back to lowercase. If the cursor is not on a word, the command works on the
beginning of the previous word." ()
(let ((point (point))
(save-point (copy-bp (point))))
(if (not (= (word-syntax (bp-ch-char point)) word-alphabetic))
(move-bp point (or (forward-word point -1) (barf))))
(setq *numeric-arg* 1)
(let ((this-ch (bp-ch-char point))
(next-ch (bp-ch-char (forward-char point))))
(if (is-lowercase this-ch)
(if (is-lowercase next-ch)
(move-bp (point) save-point)