[BLU] Reversing case in emacs

David Kramer david at kramer.ne.mediaone.net
Mon Feb 21 17:24:15 EST 2000


Jerry Feldman wrote:
> 
> I have a case where I need to flip the case on an individual character.
> Short of writing an emacs command, it there a command (or more
> specifically an emacs lisp function) in emacs to either reverse case, up
> case, or down case a single character. In vi, there is a ~ which reverse
> cases a character.


downcase-region is an interactive built-in function.

Convert the region to lower case.  In programs, wants two arguments.
These arguments specify the starting and ending character numbers of
the region to operate on.  When used as a command, the text between
point and the mark is operated on.

(downcase-region BEG END)


upcase-region is an interactive built-in function.

Convert the region to upper case.  In programs, wants two arguments.
These arguments specify the starting and ending character numbers of
the region to operate on.  When used as a command, the text between
point and the mark is operated on.
See also `capitalize-region'.

(upcase-region BEG END)


-- 
-------------------------------------------------------------------
DDDD   David Kramer                    david at kramer.ne.mediaone.net
DK KD                                 http://kramer.ne.mediaone.net
DKK D  
DK KD  HYDROGEN: A colorless, odorless gas which,
DDDD   given enough time, turns into people.
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list