Emacs: Insert Alphabets A to Z

By Xah Lee. Date: . Last updated: .

Here's a command that inserts letters a to z, each on a line by itself.

(defun xah-insert-alphabets-az (&optional @use-uppercase-p)
  "Insert letters a to z vertically.
If `universal-argument' is called first, use CAPITAL letters.

URL `http://ergoemacs.org/emacs/emacs_insert-alphabets.html'
Version 2015-11-06"
  (interactive "P")
  (let (($startChar (if @use-uppercase-p 65 97 )))
    (dotimes ($i 26)
      (insert (format "%c\n" (+ $startChar $i))))))

Sample output:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Liket it? Put $1 at patreon. Or Buy Xah Emacs Tutorial. Thanks.