Emacs Lisp Function Frequency (Emacs 27. Year 2020)
Emacs 27 Lisp Function Frequency
This page shows a table of emacs lisp functions in order of their usage frequency.
If you are a emacs lisp beginner, you want to master the these functions by order. Go down the list and see which is the first one you don't recognize. A fun way to judge your lisp expertise and challenge friends.
setq55211if51253defun40229let31698and27604or21195car21092when20185not18504eq18458point16003cdr15510list13548nth13472defvar12640goto-char12370while11145interactive11034concat10123define-key9906cons9388cond8918defcustom7990progn7987let*7965unless7881insert7683t7422save-excursion7302lambda7279format7279autoload6694error6591point-min6178const5667length5480-5378=5344memq5091message49641+4840fn4833string-match4821>4792&optional4752<4708looking-at4594+4568point-max4360equal4282put4267funcall4128require4076push40721-4025aref3813fboundp3710with-current-buffer3576match-string3553match-end3465re-search-forward3400dolist3393null3369match-beginning3260current-buffer3010mapcar2933stringp2865substring2816defconst2747assq2740forward-line2665declare-function2489register-definition-prefixes2485choice2422assoc2324append2277string=2246string2223cadr2126*2113apply2035set1926make-local-variable1894forward-char1861expand-file-name1853plist-get1820member1799>=1798beginning-of-line1796car-safe1778x1775consp1769<=1756file1629name1607throw1600princ1598nreverse1587delete-region1586condition-case1580defsubst1527pop1502zerop1481repeat1462arg1444a1440provide1439aset1421symbol-name1390org-element-property1342start1332add-hook1325/1306setf1294listp1279buffer-substring1270defmacro1247string-to-number1242intern1229type1208function1206set-buffer1205get1193get-text-property1182class1178mapconcat1175file-exists-p1148skip-chars-forward1137replace-match1134setcdr1119regexp-quote1103symbolp1085eobp1085modify-syntax-entry1085menu-item1080char-after1073max1064boundp1061oref1056defalias1053delq1019current-column1016save-restriction1015- case-fold-search 1014
search-forward9921969defgroup967cl-defmethod958numberp953end-of-line949s948setcar931setq-local923end916n915erase-buffer906default897beg890buffer884catch881purecopy875var867defface865min858math-mul853prog1851i850make-sparse-keymap850&rest849background846regexp842put-text-property839symbol-value835pos831buffer-name827with-temp-buffer817mapc805integerp804string-equal802group789re-search-backward787skip-chars-backward785line-beginning-position776nil774downcase772elt760file-name-directory759file-name-nondirectory758map753nconc752/=746symbol746declare740narrow-to-region739make-variable-buffer-local736eval735get-buffer-create727[0-9]+\\725bolp721kill-buffer712user-error711run-hooks704buffer-substring-no-properties701- inhibit-read-only 686
unwind-protect684nthcdr681pcase678eval-when-compile676c-lang-const671widget-get664vector661delete-char659caar657\\653buf651widen651replace-regexp-in-string644make-string642save-match-data639line-end-position637dir634math-div623see622tag622overlay-put619call-interactively617.*\\614set-marker611ignore-errors609p609backward-char596buffer-file-name593key587split-string586following-char581signal576char-before574filename572remove-hook562get-buffer558select-window556kbd555selected-window554sort554entry554file-directory-p549gethash545add-to-list542string-match-p542value536str534define-obsolete-function-alias532`530_528prefix-numeric-value528math-add526result525y-or-n-p523featurep522point-marker515bindings--define-key513mark512read-string509,502read5020497cl-incf496bobp488propertize487functionp484cddr483float478table478sit-for474match-string-no-properties473buffer-string468dotimes468copy-sequence467completing-read465c462f459custom-autoload459val456cl-loop451org-defkey448get-buffer-window438switch-to-buffer438- :foreground 434
2432number-to-string431b429math-reject-arg422from420forward-sexp418char-to-string418form411item411reverse409indent405[^402range400%399min-colors397math-sub397derived-mode-p394preceding-char393widget393buffer-live-p389delete-file388last388logand384which377gnus-message377debug376cl-assert375count368integer362insert-file-contents361event360alist358indent-to355marker-position353args353the352regexp-opt351[349delete348custom-put-if-not346window345eolp344cdar343called-interactively-p341this341format-message339files339set-buffer-modified-p338file-name-as-directory337data334substitute-command-keys334puthash334face334count-lines332%s332sym330save-window-excursion330prefix328window-buffer327find-file-noselect325marker-buffer325url324copy-marker323make-symbol322point-at-eol320add-text-properties319proc316buffer-modified-p314prompt314math-neg312define-derived-mode311file-attributes311current-indentation310load306char305e305date304len303process302abs301expr300deffoo2994297org-element-type297upcase296c-lang-defconst295res294insert-buffer-substring292control291make-vector290num287info287file-readable-p286mod285pop-to-buffer284article283body281l280obj280format-time-string279global-set-key277selected-frame275gnus274vec271context270defvar-local269custom-manual269defvoo269doctor-put-meaning269func267buffer-size266point-at-bol266number265search-backward264process-buffer263line262move-to-column261region-beginning261node261frame260define-minor-mode258semantic-tag-name258in257calc-wrapper256directory-file-name255limit255text253ash253get-buffer-process252sexp252move-marker251m250widget-put249command247Org246semantic-lambda246math-normalize244dun-mprincl243pred242v240mode239region-end239cmd238make-hash-table236make-overlay233write-region232next-single-property-change231window-height231push-mark231oset230directory-files229element229overlay-get229int-to-string229make-marker226back-to-indentation226cdr-safe225read-from-minibuffer224make-obsolete-variable224vhdl-insert-keyword224plist-put223to223overlay-start222process-status221for221ding220getenv220header220vectorp219symbol-function219obsolete219org-string-nw-p219state218delete-overlay217e.g.216prin1-to-string215msg214function-item214define-obsolete-variable-alias213id212file-truename211status211""211- buffer-read-only 209
buffer-list209with-output-to-temp-buffer209- default-directory 208
executable-find207register-input-method207newline206intern-soft206recenter206month2053204save-buffer203path202quail-define-package202read-file-name200begin200defclass200category200message-fetch-field199handle198select197lookup-key196ediff-with-current-buffer196.+\\195fset195host195event-start194posn-window194window-frame194
Python Script to Count Emacs Lisp Function Frequency
This list is generated by reading all lisp files bundled with GNU Emacs 27.1 of 2020-08-11. Total of 1583 emacs lisp files. Then count the occurrences of the first word after the left parenthesis.
This list is generated by the following Python script.
# -*- coding: utf-8 -*- # python 3 # purpose: count emacs lisp function frequency list of emacs lisp programs # see # http://xahlee.info/emacs/emacs/function-frequency.html # 2006-10-27, 2020-12-17 # algorithm sketch: # for each file in a given dir, # read in the file # delete comment lines # break it into a list of temp lines, seperated by ( # for each such line, grab the first word # put this into a wordlist # for each in wordlist, add it into a hash key, and if already exist, increase by 1 import os, sys, shutil, re, operator # /Applications/Emacs27.1.app/Contents/Resources/lisp/ # copy it to a temp directory, ungzip the files inputDir = "/Users/xah/xx/lisp" # keys are words, vals are count of occurrences wordFreq = {} def countMe(filePath): "add words frequency into wordFreq" print("reading:", filePath) inF = open(filePath, "rb") s = str(inF.read(), "iso-8859-1") inF.close() # ; rid of some comments (on a line by themselves) s = s.splitlines() s = [x for x in s if not re.search(r"\s*;", x)] s = " ".join(s) s = s.split("(") wordlist = [] for li in s: if li: s2 = re.split(r"\s+|\)", li) if s2: if s2[0]: wordlist.append(s2[0]) # add to dict for wd in wordlist: if wd in wordFreq: wordFreq[wd] = wordFreq[wd] + 1 else: wordFreq[wd] = 1 for dir_path, subdir_list, file_list in os.walk(inputDir): for fname in file_list: if re.search(r"\.el$", fname, re.U): countMe(os.path.join(dir_path, fname)) print() # print(wordFreq) for k, v in sorted(iter(wordFreq.items()), key=operator.itemgetter(1), reverse=True): print(k, v)