help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: title-case function


From: Emanuel Berg
Subject: Re: title-case function
Date: Sun, 21 Apr 2019 15:45:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Paul W. Rankin wrote:

> A slight improvement below.
> Function title-case works on a string object,
> title-case-region works on the region.
> Using a temp buffer is a bit annoying
> though...

Hint: Make it a DWIM interface!

E.g.,

(defun count-chars (&optional start end)
  (interactive
   (if (use-region-p)
       (list (region-beginning) (region-end))
     (list (point-min) (point-max)) ))
  (message "%d" (- end start)) )

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]