From 0e76716c5faa5e91ac3913b02ba4dc690cf5df83 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 11 Feb 2025 19:04:00 +0100 Subject: [PATCH] Delete redundant lambdas around unary functions This is not just stylistic, but also slightly faster. These are all regular defuns, of course, as this won't work with macros and defsubsts. * lisp/calc/calc-nlfit.el (math-nlfit-fit-curve) (calc-fit-hubbert-linear-curve): * lisp/calendar/cal-tex.el (cal-tex-latexify-list): * lisp/calendar/todo-mode.el (todo-sort): * lisp/cedet/semantic/ctxt.el (semantic-ctxt-end-of-symbol-default) (semantic-ctxt-current-symbol-default): * lisp/cedet/semantic/symref.el (semantic-symref-result-get-files): * lisp/cedet/semantic/texi.el (semantic-texi-command-completion-list): * lisp/descr-text.el (describe-char): * lisp/emacs-lisp/eieio-datadebug.el (data-debug-add-specialized-thing): * lisp/emacs-lisp/rmc.el (read-multiple-choice--short-answers): * lisp/eshell/em-pred.el (eshell-modifier-alist): * lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group): * lisp/gnus/gnus-dired.el (gnus-dired-attach): * lisp/help-mode.el (help-package-def): * lisp/ibuf-ext.el (ibuffer-mark-modified-buffers): * lisp/image/image-dired.el: * lisp/international/quail.el (quail-keyseq-translate) (quail-get-translations): * lisp/isearch.el (isearch-pre-command-hook) (search-within-boundaries): * lisp/mail/supercite.el (sc-ask): * lisp/mh-e/mh-e.el (mh-variant-set): * lisp/net/rcirc.el (rcirc-nick-channels, rcirc-channel-nicks): (rcirc-browse-url): * lisp/obsolete/thumbs.el (thumbs-cleanup-thumbsdir): * lisp/org/org-agenda.el (org-agenda-filter-completion-function): * lisp/org/org-table.el (org-table-eval-formula): * lisp/org/org.el (org-set-regexps-and-options): * lisp/org/ox.el (org-export--get-inbuffer-options): * lisp/ses.el (ses-range): * lisp/textmodes/emacs-news-mode.el (emacs-news--buttonize): * lisp/textmodes/ispell.el (ispell-begin-tex-skip-regexp): * lisp/vc/vc-cvs.el (vc-cvs-stay-local-p): * lisp/window.el (window--state-get-1): * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-all-groups-work): Delete redundant lambdas around unary functions. (Bug#66816) --- lisp/calc/calc-nlfit.el | 4 ++-- lisp/calendar/cal-tex.el | 2 +- lisp/calendar/todo-mode.el | 2 +- lisp/cedet/semantic/ctxt.el | 4 ++-- lisp/cedet/semantic/sort.el | 3 ++- lisp/cedet/semantic/symref.el | 2 +- lisp/cedet/semantic/texi.el | 2 +- lisp/descr-text.el | 3 +-- lisp/emacs-lisp/eieio-datadebug.el | 2 +- lisp/emacs-lisp/rmc.el | 2 +- lisp/eshell/em-pred.el | 2 +- lisp/gnus/gnus-cache.el | 2 +- lisp/gnus/gnus-dired.el | 6 ++---- lisp/help-mode.el | 2 +- lisp/ibuf-ext.el | 3 +-- lisp/image/image-dired.el | 2 +- lisp/international/quail.el | 7 ++----- lisp/isearch.el | 5 ++--- lisp/mail/supercite.el | 2 +- lisp/mh-e/mh-e.el | 2 +- lisp/net/rcirc.el | 9 ++++----- lisp/obsolete/thumbs.el | 2 +- lisp/org/org-agenda.el | 2 +- lisp/org/org-table.el | 3 +-- lisp/org/org.el | 2 +- lisp/org/ox.el | 2 +- lisp/ses.el | 2 +- lisp/textmodes/emacs-news-mode.el | 2 +- lisp/textmodes/ispell.el | 4 +--- lisp/vc/vc-cvs.el | 2 +- lisp/window.el | 3 +-- test/lisp/emacs-lisp/shortdoc-tests.el | 2 +- 32 files changed, 41 insertions(+), 53 deletions(-) diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el index 2761f35061e..82874284b65 100644 --- a/lisp/calc/calc-nlfit.el +++ b/lisp/calc/calc-nlfit.el @@ -678,7 +678,7 @@ (sdata (if (math-contains-sdev-p ydata) (mapcar (lambda (x) (math-get-sdev x t)) ydata) nil)) - (ydata (mapcar (lambda (x) (math-get-value x)) ydata)) + (ydata (mapcar #'math-get-value ydata)) (calc-curve-varnames nil) (calc-curve-coefnames nil) (calc-curve-nvars 1) @@ -757,7 +757,7 @@ (sdata (if (math-contains-sdev-p pdata) (mapcar (lambda (x) (math-get-sdev x t)) pdata) nil)) - (pdata (mapcar (lambda (x) (math-get-value x)) pdata)) + (pdata (mapcar #'math-get-value pdata)) (poverqdata (math-map-binop 'math-div pdata qdata)) (parmvals (math-nlfit-least-squares qdata poverqdata sdata sdevv)) (finalparms (list (nth 0 parmvals) diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index 8df47431889..c0bb9760810 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -1600,7 +1600,7 @@ FINAL-SEPARATOR is non-nil." (or separator (setq separator "\\\\")) (let (result) (setq result - (mapconcat (lambda (x) (cal-tex-LaTeXify-string x)) + (mapconcat #'cal-tex-LaTeXify-string (dolist (d date-list (reverse result)) (and (car d) (calendar-date-equal date (car d)) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 27678328b4a..dc6f7345b21 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -3772,7 +3772,7 @@ option `todo-categories-align'." "Return a copy of LIST, possibly sorted according to KEY." (let* ((l (copy-sequence list)) (fn (if (eq key 'alpha) - (lambda (x) (upcase x)) ; Alphabetize case insensitively. + #'upcase ; Alphabetize case insensitively. (lambda (x) (todo-get-count key x)))) ;; Keep track of whether the last sort by key was descending or ;; ascending. diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el index 9fc935f4893..3570ccd855d 100644 --- a/lisp/cedet/semantic/ctxt.el +++ b/lisp/cedet/semantic/ctxt.el @@ -362,7 +362,7 @@ This will move past type/field names when applicable. Depends on `semantic-type-relation-separator-character', and will work on C like languages." (if point (goto-char point)) - (let* ((fieldsep1 (mapconcat (lambda (a) (regexp-quote a)) + (let* ((fieldsep1 (mapconcat #'regexp-quote semantic-type-relation-separator-character "\\|")) ;; NOTE: The [ \n] expression below should used \\s-, but that @@ -446,7 +446,7 @@ This will include a list of type/field names when applicable. Depends on `semantic-type-relation-separator-character'." (save-excursion (if point (goto-char point)) - (let* ((fieldsep1 (mapconcat (lambda (a) (regexp-quote a)) + (let* ((fieldsep1 (mapconcat #'regexp-quote semantic-type-relation-separator-character "\\|")) ;; NOTE: The [ \n] expression below should used \\s-, but that diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el index 9c4aad3db55..3eb4c159b75 100644 --- a/lisp/cedet/semantic/sort.el +++ b/lisp/cedet/semantic/sort.el @@ -243,7 +243,7 @@ unmodified as components of their parent tags." ;; table, and reorganize them into buckets based on class. ;; (defvar semantic-bucketize-tag-class - ;; Must use lambda because `semantic-tag-class' is a macro. + ;; Must use lambda because `semantic-tag-class' is a defsubst. (lambda (tok) (semantic-tag-class tok)) "Function used to get a symbol describing the class of a tag. This function must take one argument of a semantic tag. @@ -401,6 +401,7 @@ buckets with the bucket function." ;; get embedded types to scan and make copies ;; of them. (mapcar + ;; Must use lambda because `semantic-tag-clone' is a defsubst. (lambda (tok) (semantic-tag-clone tok)) (semantic-find-tags-by-class 'type (semantic-tag-type-members (car decent-list))))) diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index 99a3287343f..b1a99634ef0 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -398,7 +398,7 @@ this list.") (if (slot-boundp result 'hit-files) (oref result hit-files) (let* ((lines (oref result hit-lines)) - (files (mapcar (lambda (a) (cdr a)) lines)) + (files (mapcar #'cdr lines)) (ans nil)) (setq ans (list (car files)) files (cdr files)) diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index 27720930328..5965e62d151 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el @@ -385,7 +385,7 @@ Optional argument POINT is where to look for the environment." )) (defvar semantic-texi-command-completion-list - (append (mapcar (lambda (a) (car a)) texinfo-section-list) + (append (mapcar #'car texinfo-section-list) texinfo-environments ;; Is there a better list somewhere? Here are few ;; of the top of my head. diff --git a/lisp/descr-text.el b/lisp/descr-text.el index ff4c259463e..3fb21309f7b 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -407,8 +407,7 @@ The character information includes: (composition-string nil) (disp-vector (and display-table (aref display-table char))) (multibyte-p enable-multibyte-characters) - (overlays (mapcar (lambda (o) (overlay-properties o)) - (overlays-at pos))) + (overlays (mapcar #'overlay-properties (overlays-at pos))) (char-description (if (< char 128) (single-key-description char) (string (if (not multibyte-p) diff --git a/lisp/emacs-lisp/eieio-datadebug.el b/lisp/emacs-lisp/eieio-datadebug.el index 2acd1b8d2e4..5ae665a57fb 100644 --- a/lisp/emacs-lisp/eieio-datadebug.el +++ b/lisp/emacs-lisp/eieio-datadebug.el @@ -111,7 +111,7 @@ PREBUTTONTEXT is some text between PREFIX and the object button." ))))))) ;;; Augment the Data debug thing display list. -(data-debug-add-specialized-thing (lambda (thing) (eieio-object-p thing)) +(data-debug-add-specialized-thing #'eieio-object-p #'data-debug-insert-object-button) ;;; DEBUG METHODS diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el index c4df8cf2f98..158c1e857cc 100644 --- a/lisp/emacs-lisp/rmc.el +++ b/lisp/emacs-lisp/rmc.el @@ -191,7 +191,7 @@ Usage example: (format "%s (%s): " prompt - (mapconcat (lambda (e) (cdr e)) altered-names ", "))) + (mapconcat #'cdr altered-names ", "))) tchar buf wrong-char answer command) (save-window-excursion (save-excursion diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 754c17a1926..845fc5a3b3d 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -122,7 +122,7 @@ The format of each entry is (?e . (lambda (lst) (mapcar #'file-name-extension lst))) (?t . (lambda (lst) (mapcar #'file-name-nondirectory lst))) (?q . #'identity) ; Obsolete as of Emacs 31.1. - (?u . (lambda (lst) (seq-uniq lst))) + (?u . #'seq-uniq) (?o . (lambda (lst) (sort lst #'string-lessp))) (?O . (lambda (lst) (sort lst #'string-greaterp))) (?j . (eshell-join-members)) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index b9af1ec93bb..59c5d7bb891 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -502,7 +502,7 @@ Returns the list of articles removed." (file-name-coding-system nnmail-pathname-coding-system)) (when (file-exists-p dir) (setq articles - (sort (mapcar (lambda (name) (string-to-number name)) + (sort (mapcar #'string-to-number (directory-files dir nil "\\`[0-9]+\\'" t)) #'<)) ;; Update the cache active file, just to synch more. diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el index ce27fc404ac..1b296cbcffc 100644 --- a/lisp/gnus/gnus-dired.el +++ b/lisp/gnus/gnus-dired.el @@ -136,10 +136,8 @@ filenames." ;; warn if user tries to attach without any files marked (if (null files-to-attach) (error "No files to attach") - (setq files-str - (mapconcat - (lambda (f) (file-name-nondirectory f)) - files-to-attach ", ")) + (setq files-str (mapconcat #'file-name-nondirectory + files-to-attach ", ")) (setq bufs (gnus-dired-mail-buffers)) ;; set up destination mail composition buffer diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 4ea4250556f..7f272de790e 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -368,7 +368,7 @@ The format is (FUNCTION ARGS...).") (define-button-type 'help-package-def :supertype 'help-xref - 'help-function (lambda (file) (dired file)) + 'help-function #'dired 'help-echo "mouse-2, RET: visit package directory") (define-button-type 'help-theme-def diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index a8d60ff7917..94742cded01 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1872,8 +1872,7 @@ Otherwise buffers whose name matches an element of (defun ibuffer-mark-modified-buffers () "Mark all modified buffers." (interactive) - (ibuffer-mark-on-buffer - (lambda (buf) (buffer-modified-p buf)))) + (ibuffer-mark-on-buffer #'buffer-modified-p)) ;;;###autoload (defun ibuffer-mark-unsaved-buffers () diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 452be29c5d5..3b550fbc35a 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -2084,7 +2084,7 @@ when using per-directory thumbnail file storage")) ;; ;; Sort function. Compare time between two files. ;; (lambda (l1 l2) ;; (time-less-p (car l1) (car l2))))) -;; (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) files)))) +;; (dirsize (apply #'+ (mapcar #'cadr files)))) ;; (while (> dirsize image-dired-dir-max-size) ;; (y-or-n-p ;; (format "Size of thumbnail directory: %d, delete old file %s? " diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 94d4a758705..daa55b14b87 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -772,8 +772,7 @@ you type is correctly handled." (defun quail-keyseq-translate (keyseq) (apply 'string - (mapcar (lambda (x) (quail-keyboard-translate x)) - keyseq))) + (mapcar #'quail-keyboard-translate keyseq))) (defun quail-insert-kbd-layout (kbd-layout) "Insert the visual keyboard layout table according to KBD-LAYOUT. @@ -2144,9 +2143,7 @@ minibuffer and the selected frame has no other windows)." (setq str (format "%s[%s]" str - (concat (sort (mapcar (lambda (x) (car x)) - (cdr map)) - '<))))) + (concat (sort (mapcar #'car (cdr map)) #'<))))) ;; Show list of translations. (if (and quail-current-translations (not (quail-deterministic))) diff --git a/lisp/isearch.el b/lisp/isearch.el index 3d06e78f4f0..1e65a645a1d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -3230,7 +3230,7 @@ See more for options in `search-exit-option'." (setq isearch-pre-move-point (point))) ;; Append control characters to the search string ((eq search-exit-option 'append) - (unless (memq nil (mapcar (lambda (k) (characterp k)) key)) + (unless (memq nil (mapcar #'characterp key)) (isearch-process-search-string key key)) (setq this-command 'ignore)) ;; Other characters terminate the search and are then executed normally. @@ -4654,8 +4654,7 @@ defaults to the value of `isearch-search-fun-default' when nil." (match-data))))) (when found (goto-char found)) (when match-data (set-match-data - (mapcar (lambda (m) (copy-marker m)) - match-data)))) + (mapcar #'copy-marker match-data)))) (setq found (funcall (or search-fun (isearch-search-fun-default)) string (if bound (if isearch-forward diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index dc580298c7f..1637f40b70c 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -596,7 +596,7 @@ selected letter is returned, or nil if the question was not answered. Note that WORD is a string and LETTER is a character. All LETTERs in the list should be unique." (let* ((prompt (concat - (mapconcat (lambda (elt) (car elt)) alist ", ") + (mapconcat #'car alist ", ") "? (" (mapconcat (lambda (elt) (char-to-string (cdr elt))) alist "/") diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 107b91f8355..ac13d3b2adb 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -878,7 +878,7 @@ finally GNU mailutils MH." (sit-for 5) (setq variant (concat "gnu-mh" (substring variant (match-end 0))))) - (let ((valid-list (mapcar (lambda (x) (car x)) (mh-variants)))) + (let ((valid-list (mapcar #'car (mh-variants)))) (cond ((eq variant 'none)) ((eq variant 'autodetect) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 5a1f7eebeb0..98b99ebabd9 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2272,8 +2272,7 @@ PROCESS is the process object for the current connection." "Return list of channels for NICK. PROCESS is the process object for the current connection." (with-rcirc-process-buffer process - (mapcar (lambda (x) (car x)) - (gethash nick rcirc-nick-table)))) + (mapcar #'car (gethash nick rcirc-nick-table)))) (defun rcirc-put-nick-channel (process nick channel &optional line) "Add CHANNEL to list associated with NICK. @@ -2327,7 +2326,7 @@ PROCESS is the process object for the current connection." (if record (setq nicks (cons (cons k (cdr record)) nicks))))) rcirc-nick-table) - (mapcar (lambda (x) (car x)) + (mapcar #'car (sort (nconc pseudo-nicks nicks) (lambda (x y) (let ((lx (or (cdr x) 0)) @@ -3004,8 +3003,8 @@ If ARG is given, opens the URL in a new browser window." (filtered (seq-filter (lambda (x) (>= point (cdr x))) rcirc-urls)) - (completions (mapcar (lambda (x) (car x)) filtered)) - (defaults (mapcar (lambda (x) (car x)) filtered))) + (completions (mapcar #'car filtered)) + (defaults (mapcar #'car filtered))) (browse-url (completing-read "Rcirc browse-url: " completions nil nil (car defaults) nil defaults) arg))) diff --git a/lisp/obsolete/thumbs.el b/lisp/obsolete/thumbs.el index fb24fa26a83..582bb7f0caf 100644 --- a/lisp/obsolete/thumbs.el +++ b/lisp/obsolete/thumbs.el @@ -204,7 +204,7 @@ reached." ,f))) (directory-files (thumbs-thumbsdir) t (image-file-name-regexp))) (lambda (l1 l2) (time-less-p (car l1) (car l2))))) - (dirsize (apply #'+ (mapcar (lambda (x) (cadr x)) files-list)))) + (dirsize (apply #'+ (mapcar #'cadr files-list)))) (while (> dirsize thumbs-thumbsdir-max-size) (progn (message "Deleting file %s" (cadr (cdar files-list)))) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 87eda4700b7..8fdd998fc52 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -8186,7 +8186,7 @@ FLAG specifies the type of completion operation to perform. This function is passed as a collection function to `completing-read', which see." (let ((completion-ignore-case t) ;tags are case-sensitive - (confirm (lambda (x) (stringp x))) + (confirm #'stringp) (prefix "") (operator "") table diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 22eecd55363..59e1b49f92c 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -2539,8 +2539,7 @@ location of point." ;; replace fields with duration values if relevant (if duration (setq fields - (mapcar (lambda (x) (org-table-time-string-to-seconds x)) - fields))) + (mapcar #'org-table-time-string-to-seconds fields))) (if (eq numbers t) (setq fields (mapcar (lambda (x) diff --git a/lisp/org/org.el b/lisp/org/org.el index a11eee94297..ab5316a0b13 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -4283,7 +4283,7 @@ related expressions." '("ARCHIVE" "CATEGORY" "COLUMNS" "PRIORITIES")))) ;; Startup options. Get this early since it does change ;; behavior for other options (e.g., tags). - (let ((startup (cl-mapcan (lambda (value) (split-string value)) + (let ((startup (cl-mapcan #'split-string (cdr (assoc "STARTUP" alist))))) (dolist (option startup) (pcase (assoc-string option org-startup-options t) diff --git a/lisp/org/ox.el b/lisp/org/ox.el index cc50d031765..7f3f66a6f26 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -1552,7 +1552,7 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored." (newline (mapconcat #'identity values "\n")) (split - (cl-mapcan (lambda (v) (split-string v)) values)) + (cl-mapcan #'split-string values)) ((t) (org-last values)) (otherwise diff --git a/lisp/ses.el b/lisp/ses.el index eeef8f040f9..88e83ae160b 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -4011,7 +4011,7 @@ Use `math-format-value' as a printer for Calc objects." (unless reorient-x (setq result (mapcar #'nreverse result))) (when transpose - (let ((ret (mapcar (lambda (x) (list x)) (pop result))) iter) + (let ((ret (mapcar #'list (pop result))) iter) (while result (setq iter ret) (dolist (elt (pop result)) diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index d49dd5eeac7..32a8a224df7 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -260,7 +260,7 @@ untagged NEWS entry." (while (re-search-forward "\"\\(([a-z0-9-]+)[ \n][^\"]\\{1,80\\}\\)\"" nil t) (buttonize-region (match-beginning 1) (match-end 1) - (lambda (node) (info node)) + #'info (match-string 1))))))) (defun emacs-news--sections (regexp) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 24d09c3e9bc..9cec637f996 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -3310,9 +3310,7 @@ otherwise, the current line is skipped." Generated from `ispell-tex-skip-alists'." (concat ;; raw tex keys - (mapconcat (lambda (lst) (car lst)) - (car ispell-tex-skip-alists) - "\\|") + (mapconcat #'car (car ispell-tex-skip-alists) "\\|") "\\|" ;; keys wrapped in begin{} (mapconcat (lambda (lst) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 91db030fa1c..06597ed7853 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -790,7 +790,7 @@ and that it passes `vc-cvs-global-switches' to it before FLAGS." If FILE is a list of files, return non-nil if any of them individually should stay local." (if (listp file) - (delq nil (mapcar (lambda (arg) (vc-cvs-stay-local-p arg)) file)) + (delq nil (mapcar #'vc-cvs-stay-local-p file)) (let ((stay-local vc-cvs-stay-local)) (if (symbolp stay-local) stay-local (let ((dirname (if (file-directory-p file) diff --git a/lisp/window.el b/lisp/window.el index ab15979baed..290b5cae64d 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -6309,8 +6309,7 @@ specific buffers." ,@(when next-buffers `((next-buffers . ,(if writable - (mapcar (lambda (buffer) (buffer-name buffer)) - next-buffers) + (mapcar #'buffer-name next-buffers) next-buffers)))) ,@(when prev-buffers `((prev-buffers diff --git a/test/lisp/emacs-lisp/shortdoc-tests.el b/test/lisp/emacs-lisp/shortdoc-tests.el index 14d757711be..560221f5533 100644 --- a/test/lisp/emacs-lisp/shortdoc-tests.el +++ b/test/lisp/emacs-lisp/shortdoc-tests.el @@ -56,7 +56,7 @@ (ert-deftest shortdoc-all-groups-work () "Test that all defined shortdoc groups display correctly." - (dolist (group (mapcar (lambda (x) (car x)) shortdoc--groups)) + (dolist (group (mapcar #'car shortdoc--groups)) (let ((buf-name (format "*Shortdoc %s*" group)) buf) (unwind-protect (progn