unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66816: [PATCH] Delete redundant lambdas around unary functions
@ 2023-10-29 13:02 Stefan Kangas
  2023-10-29 19:03 ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2023-10-29 13:02 UTC (permalink / raw)
  To: 66816

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

Severity: wishlist

Please see the attached patch.

I've been able to measure around 10% better performance in the few cases
I looked into.  Here's an example:

    (benchmark-run 1000
      (seq-filter (lambda (n) (bufferp n))
                  (number-sequence 0 100000)))
    => (69.007736 333 47.018879999999996)

    (benchmark-run 1000
      (seq-filter #'bufferp
                  (number-sequence 0 100000)))
    => (61.541616 333 47.673137)

[-- Attachment #2: 0001-Delete-redundant-lambdas-around-unary-functions.patch --]
[-- Type: text/x-patch, Size: 24458 bytes --]

From a48df8cb9b701160aa4d844eade2c9a580a6b359 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 29 Oct 2023 11:35:19 +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.
---
 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 72b906ff69b..445034005f5 100644
--- a/lisp/calc/calc-nlfit.el
+++ b/lisp/calc/calc-nlfit.el
@@ -678,7 +678,7 @@ math-nlfit-fit-curve
           (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 @@ calc-fit-hubbert-linear-curve
           (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 8399d77b4c4..70655d3dd08 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -1600,7 +1600,7 @@ cal-tex-latexify-list
   (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 093ea0e22b6..964fdfbc961 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -3718,7 +3718,7 @@ todo-sort
   "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 84e6c6ebecb..051a6813320 100644
--- a/lisp/cedet/semantic/ctxt.el
+++ b/lisp/cedet/semantic/ctxt.el
@@ -362,7 +362,7 @@ semantic-ctxt-end-of-symbol-default
 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 @@ semantic-ctxt-current-symbol-default
 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 aebd50a649b..051cc7a8b02 100644
--- a/lisp/cedet/semantic/sort.el
+++ b/lisp/cedet/semantic/sort.el
@@ -243,7 +243,7 @@ semantic-flatten-tags-table
 ;; 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 @@ semantic-adopt-external-members
 		      ;; 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 1ebd7ea154b..8ef1baf3643 100644
--- a/lisp/cedet/semantic/symref.el
+++ b/lisp/cedet/semantic/symref.el
@@ -398,7 +398,7 @@ semantic-symref-result-get-files
   (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 45e03cb9102..1bb1a1cd475 100644
--- a/lisp/cedet/semantic/texi.el
+++ b/lisp/cedet/semantic/texi.el
@@ -385,7 +385,7 @@ semantic-analyze-current-context
     ))
 
 (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 4834c2eb7ba..5c9d25b48a8 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -425,8 +425,7 @@ describe-char
            (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 a80d1ae2720..a1d1e60db09 100644
--- a/lisp/emacs-lisp/eieio-datadebug.el
+++ b/lisp/emacs-lisp/eieio-datadebug.el
@@ -111,7 +111,7 @@ data-debug/eieio-insert-slots
               )))))))
 
 ;;; 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 45e2bbf3831..d41561bd3ff 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -188,7 +188,7 @@ read-multiple-choice--short-answers
           (format
            "%s (%s): "
            prompt
-           (mapconcat (lambda (e) (cdr e)) altered-names ", ")))
+           (mapconcat #'cdr altered-names ", ")))
          tchar buf wrong-char answer)
     (save-window-excursion
       (save-excursion
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el
index ae7d0c43bc4..c8fad99ae2b 100644
--- a/lisp/eshell/em-pred.el
+++ b/lisp/eshell/em-pred.el
@@ -122,7 +122,7 @@ eshell-modifier-alist
     (?e . (lambda (lst) (mapcar #'file-name-extension lst)))
     (?t . (lambda (lst) (mapcar #'file-name-nondirectory lst)))
     (?q . (lambda (lst) (mapcar #'eshell-escape-arg lst)))
-    (?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 13be21630ec..0ec07a55508 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -516,7 +516,7 @@ gnus-cache-articles-in-group
 	(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 b146b51430a..42da6a57cbb 100644
--- a/lisp/gnus/gnus-dired.el
+++ b/lisp/gnus/gnus-dired.el
@@ -130,10 +130,8 @@ gnus-dired-attach
     ;; 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 b51276d5e06..a31e87cad00 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -359,7 +359,7 @@ 'help-package
 
 (define-button-type 'help-package-def
   :supertype 'help-xref
-  'help-function (lambda (file) (dired file))
+  'help-function #'dired
   'help-echo (purecopy "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 37065f5d41a..e42e7b2699b 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1875,8 +1875,7 @@ ibuffer-mark-by-mode
 (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 83f228b2d59..8e083fcd6d5 100644
--- a/lisp/image/image-dired.el
+++ b/lisp/image/image-dired.el
@@ -2048,7 +2048,7 @@ 'image-dired-display-previous-thumbnail-original
 ;;            ;; 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 894378bda8b..ff7df7750b3 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -772,8 +772,7 @@ quail-keyboard-translate
 
 (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.
@@ -2139,9 +2138,7 @@ quail-get-translations
 	  (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 4d231fba469..f049832b648 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3226,7 +3226,7 @@ isearch-pre-command-hook
       (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.
@@ -4641,8 +4641,7 @@ search-within-boundaries
                                          (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 8d9cb5511ed..dfae123d7a1 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -596,7 +596,7 @@ sc-ask
 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 34c809a5ecd..a21ee3e0ccf 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -878,7 +878,7 @@ mh-variant-set
     (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 ecfeb9f8f84..8728e761ac8 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2268,8 +2268,7 @@ rcirc-nick-channels
   "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.
@@ -2323,7 +2322,7 @@ rcirc-channel-nicks
                    (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))
@@ -2983,8 +2982,8 @@ rcirc-browse-url
          (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 ddf734f22ea..c0c78079a8d 100644
--- a/lisp/obsolete/thumbs.el
+++ b/lisp/obsolete/thumbs.el
@@ -204,7 +204,7 @@ thumbs-cleanup-thumbsdir
 		    ,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 38e81d9d713..1a6e7974480 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -8448,7 +8448,7 @@ org-agenda-filter-completion-function
 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 aa819aa7d2f..c196aafa6ae 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -2519,8 +2519,7 @@ org-table-eval-formula
 	;; 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 8b02721a859..db8f052f80a 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -4171,7 +4171,7 @@ org-set-regexps-and-options
 		  '("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 94cc5a22881..94c3f068e3b 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -1536,7 +1536,7 @@ org-export--get-inbuffer-options
 		      (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 30bf33e47bf..d0b0bdd04e6 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3998,7 +3998,7 @@ ses-range
     (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 773b07764aa..fec03565ae1 100644
--- a/lisp/textmodes/emacs-news-mode.el
+++ b/lisp/textmodes/emacs-news-mode.el
@@ -246,7 +246,7 @@ emacs-news--buttonize
         (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 9bd1135c5be..3fa30ebf133 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -3282,9 +3282,7 @@ ispell-begin-tex-skip-regexp
 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 145697d1b06..423c598037d 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -790,7 +790,7 @@ vc-cvs-stay-local-p
 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 06d5cfc0077..78f41058659 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -6099,8 +6099,7 @@ window--state-get-1
             ,@(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 596b47d2543..5706e23e046 100644
--- a/test/lisp/emacs-lisp/shortdoc-tests.el
+++ b/test/lisp/emacs-lisp/shortdoc-tests.el
@@ -56,7 +56,7 @@ shortdoc-all-functions-fboundp
 
 (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
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#66816: [PATCH] Delete redundant lambdas around unary functions
  2023-10-29 13:02 bug#66816: [PATCH] Delete redundant lambdas around unary functions Stefan Kangas
@ 2023-10-29 19:03 ` Mattias Engdegård
  2023-10-29 21:55   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2023-10-29 19:03 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Stefan Monnier, 66816

> I've been able to measure around 10% better performance in the few cases
> I looked into.  Here's an example:
> 
>     (benchmark-run 1000
>       (seq-filter (lambda (n) (bufferp n))
>                   (number-sequence 0 100000)))

(This would be less of a problem if we could inline functions on the Lisp level...)

We could also have the compiler η-reduce automatically. I investigated this very briefly some time ago. Maybe I can dig up the patch.

One problem is that the arity isn't necessarily preserved. Most of the time this isn't a problem but it could be something to watch out for if doing the η-reduction by hand.







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66816: [PATCH] Delete redundant lambdas around unary functions
  2023-10-29 19:03 ` Mattias Engdegård
@ 2023-10-29 21:55   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-30  8:56     ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-29 21:55 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: Stefan Kangas, 66816

The patch looks good to me.

> We could also have the compiler η-reduce automatically. I investigated this
> very briefly some time ago. Maybe I can dig up the patch.
> One problem is that the arity isn't necessarily preserved.

And even if we check the arity before performing the rewrite, the arity
at compile-time may be different from the arity at run-time, so it's not
a safe optimization.

OTOH we could emit a warning :-)

> Most of the time this isn't a problem but it could be something to
> watch out for if doing the η-reduction by hand.

I've been bitten a few times, indeed.


        Stefan






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66816: [PATCH] Delete redundant lambdas around unary functions
  2023-10-29 21:55   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-30  8:56     ` Mattias Engdegård
  2023-10-30 15:00       ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2023-10-30  8:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Stefan Kangas, 66816

29 okt. 2023 kl. 22.55 skrev Stefan Monnier <monnier@iro.umontreal.ca>:

> The patch looks good to me.

To me, too -- good work.

One version that the patch doesn't seem to include is

  (lambda (X...) (funcall F X...)) -> F

which is less safe in general (since the value of the expression F could change between the closure creation and application) but sometimes obviously fine, as when the function is a parameter to `mapcar`.

The patch also appears limited to unary functions.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66816: [PATCH] Delete redundant lambdas around unary functions
  2023-10-30  8:56     ` Mattias Engdegård
@ 2023-10-30 15:00       ` Mattias Engdegård
  0 siblings, 0 replies; 5+ messages in thread
From: Mattias Engdegård @ 2023-10-30 15:00 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Stefan Monnier, 66816

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

Since I had a tool for it handy, I scanned the Emacs tree. Output attached, in case it might be of use.
Caution: it has not been vetted in any way and definitely contains plenty of false positives.


[-- Attachment #2: eta-opportunities.log --]
[-- Type: application/octet-stream, Size: 13180 bytes --]

-*- compilation -*-
lisp/calc/calc-nlfit.el:681:26: lambda η-reduces to #'math-get-value (arity 1)
lisp/calc/calc-nlfit.el:760:26: lambda η-reduces to #'math-get-value (arity 1)
lisp/calc/calcalg2.el:3539:6: lambda η-reduces to #'math-sqr (arity 1)
lisp/calc/calcalg2.el:3545:6: lambda η-reduces to #'math-solve-get-sign (arity 1)
lisp/calendar/cal-china.el:587:20: lambda η-reduces to #'car (arity 1)
lisp/calendar/cal-tex.el:1603:22: lambda η-reduces to #'cal-tex-LaTeXify-string (arity 1)
lisp/calendar/diary-lib.el:1015:11: lambda η-reduces to diary-goto-entry-function (arity 1)
lisp/calendar/icalendar.el:1802:21: lambda η-reduces to #'number-to-string (arity 1)
lisp/calendar/todo-mode.el:3721:20: lambda η-reduces to #'upcase (arity 1)
lisp/cedet/ede/pmake.el:116:35: lambda η-reduces to #'ede-proj-makefile-dependency-files (arity 1)
lisp/cedet/semantic/analyze/refs.el:232:25: lambda η-reduces to #'semantic-tag-name (arity 1)
lisp/cedet/semantic/ctxt.el:365:32: lambda η-reduces to #'regexp-quote (arity 1)
lisp/cedet/semantic/ctxt.el:449:34: lambda η-reduces to #'regexp-quote (arity 1)
lisp/cedet/semantic/db-javascript.el:176:29: lambda η-reduces to #'semanticdb-get-database-tables (arity 1)
lisp/cedet/semantic/lex-spp.el:435:22: lambda η-reduces to #'semantic-lex-spp-one-token-to-txt (arity 1)
lisp/cedet/semantic/sort.el:149:14: lambda η-reduces to #'semantic-tag-lessp-name-then-type (arity 2)
lisp/cedet/semantic/sort.el:247:3: lambda η-reduces to #'semantic-tag-class (arity 1)
lisp/cedet/semantic/sort.el:404:24: lambda η-reduces to #'semantic-tag-clone (arity 1)
lisp/cedet/semantic/symref.el:401:27: lambda η-reduces to #'cdr (arity 1)
lisp/cedet/semantic/tag.el:800:20: lambda η-reduces to #'semantic-tag-name (arity 1)
lisp/cedet/semantic/texi.el:388:19: lambda η-reduces to #'car (arity 1)
lisp/emacs-lisp/edebug.el:3711:23: lambda η-reduces to #'prin1-to-string (arity 1)
lisp/emacs-lisp/eieio-datadebug.el:114:35: lambda η-reduces to #'eieio-object-p (arity 1)
lisp/emacs-lisp/rmc.el:191:23: lambda η-reduces to #'cdr (arity 1)
lisp/emacs-lisp/shortdoc.el:976:21: lambda η-reduces to #'insert (arity 1)
lisp/eshell/esh-var.el:172:13: lambda η-reduces to #'file-user-uid (arity 0)
lisp/eshell/esh-var.el:173:13: lambda η-reduces to #'file-group-gid (arity 0)
lisp/gnus/gnus-agent.el:1056:37: lambda η-reduces to #'mail-header-number (arity 1)
lisp/gnus/gnus-cache.el:519:27: lambda η-reduces to #'string-to-number (arity 1)
lisp/gnus/gnus-cloud.el:440:14: lambda η-reduces to #'mail-header-number (arity 1)
lisp/gnus/gnus-dired.el:135:14: lambda η-reduces to #'file-name-nondirectory (arity 1)
lisp/gnus/gnus-group.el:3381:27: lambda η-reduces to #'gnus-get-info (arity 1)
lisp/gnus/gnus-group.el:3386:21: lambda η-reduces to #'gnus-info-group (arity 1)
lisp/gnus/gnus-group.el:3769:38: lambda η-reduces to #'gnus-info-group (arity 1)
lisp/gnus/gnus-search.el:1078:16: lambda η-reduces to #'gnus-group-server (arity 1)
lisp/gnus/gnus-sum.el:5096:24: lambda η-reduces to #'mail-header-number (arity 1)
lisp/gnus/gnus-sum.el:13019:47: lambda η-reduces to #'mail-header-number (arity 1)
lisp/gnus/gnus-topic.el:896:29: lambda η-reduces to #'gnus-info-group (arity 1)
lisp/gnus/gnus-topic.el:1664:5: lambda η-reduces to #'gnus-info-group (arity 1)
lisp/gnus/gnus-topic.el:1667:7: lambda η-reduces to #'gnus-get-info (arity 1)
lisp/international/mule-cmds.el:1613:20: lambda η-reduces to exitfun (arity 0)
lisp/international/quail.el:775:18: lambda η-reduces to #'quail-keyboard-translate (arity 1)
lisp/international/quail.el:2142:47: lambda η-reduces to #'car (arity 1)
lisp/mail/supercite.el:599:30: lambda η-reduces to #'car (arity 1)
lisp/mh-e/mh-e.el:881:29: lambda η-reduces to #'car (arity 1)
lisp/net/imap.el:1520:14: lambda η-reduces to #'number-to-string (arity 1)
lisp/net/newst-backend.el:1107:21: lambda η-reduces to #'xml-node-children (arity 1)
lisp/net/newst-backend.el:1196:21: lambda η-reduces to #'xml-node-children (arity 1)
lisp/net/newst-backend.el:1246:26: lambda η-reduces to #'xml-node-children (arity 1)
lisp/net/newst-backend.el:1296:26: lambda η-reduces to #'xml-node-children (arity 1)
lisp/net/newst-backend.el:1355:26: lambda η-reduces to #'xml-node-children (arity 1)
lisp/net/newst-backend.el:1419:26: lambda η-reduces to #'xml-node-children (arity 1)
lisp/net/rcirc.el:2271:13: lambda η-reduces to #'car (arity 1)
lisp/net/rcirc.el:2326:23: lambda η-reduces to #'car (arity 1)
lisp/net/rcirc.el:2986:31: lambda η-reduces to #'car (arity 1)
lisp/net/rcirc.el:2987:28: lambda η-reduces to #'car (arity 1)
lisp/obsolete/nnir.el:954:24: lambda η-reduces to #'gnus-group-real-name (arity 1)
lisp/obsolete/nnir.el:1321:18: lambda η-reduces to #'gnus-group-server (arity 1)
lisp/obsolete/thumbs.el:207:40: lambda η-reduces to #'cadr (arity 1)
lisp/org/ob-gnuplot.el:150:25: lambda η-reduces to add-to-body (arity 1)
lisp/org/oc-basic.el:678:11: lambda η-reduces to #'org-cite-concat (arity 3)
lisp/org/org-agenda.el:8451:18: lambda η-reduces to #'stringp (arity 1)
lisp/org/org-table.el:2522:27: lambda η-reduces to #'org-table-time-string-to-seconds (arity 1)
lisp/org/org-table.el:2562:39: lambda η-reduces to #'org-table-time-string-to-seconds (arity 1)
lisp/org/org-table.el:2580:36: lambda η-reduces to #'org-table-time-string-to-seconds (arity 1)
lisp/org/org.el:4174:33: lambda η-reduces to #'split-string (arity 1)
lisp/org/ox-ascii.el:2141:53: lambda η-reduces to #'text-mode (arity 0)
lisp/org/ox-beamer.el:1011:53: lambda η-reduces to #'LaTeX-mode (arity 0)
lisp/org/ox-koma-letter.el:914:7: lambda η-reduces to #'LaTeX-mode (arity 0)
lisp/org/ox-latex.el:4162:53: lambda η-reduces to #'LaTeX-mode (arity 0)
lisp/org/ox-md.el:756:41: lambda η-reduces to #'text-mode (arity 0)
lisp/org/ox-org.el:276:53: lambda η-reduces to #'org-mode (arity 0)
lisp/org/ox.el:1539:35: lambda η-reduces to #'split-string (arity 1)
lisp/progmodes/cc-guess.el:362:45: lambda η-reduces to #'car (arity 1)
lisp/progmodes/cc-vars.el:137:23: lambda η-reduces to #'symbol-name (arity 1)
lisp/textmodes/emacs-news-mode.el:240:35: lambda η-reduces to #'describe-symbol (arity 1)
lisp/textmodes/emacs-news-mode.el:249:29: lambda η-reduces to #'info (arity 1)
lisp/textmodes/ispell.el:3285:15: lambda η-reduces to #'car (arity 1)
lisp/textmodes/rst.el:2553:23: lambda η-reduces to #'cons (arity 2)
lisp/textmodes/rst.el:3290:21: lambda η-reduces to #'<= (arity 2)
lisp/vc/vc-cvs.el:793:25: lambda η-reduces to #'vc-cvs-stay-local-p (arity 1)
lisp/char-fold.el:374:43: lambda η-reduces to #'cdr (arity 1)
lisp/char-fold.el:474:48: lambda η-reduces to #'cdr (arity 1)
lisp/char-fold.el:483:46: lambda η-reduces to #'cdr (arity 1)
lisp/descr-text.el:428:30: lambda η-reduces to #'overlay-properties (arity 1)
lisp/dired.el:1696:29: lambda η-reduces to #'string-match (arity 2)
lisp/help-mode.el:245:18: lambda η-reduces to #'customize-variable (arity 1)
lisp/help-mode.el:251:18: lambda η-reduces to #'customize-face (arity 1)
lisp/help-mode.el:362:18: lambda η-reduces to #'dired (arity 1)
lisp/ibuf-ext.el:1810:6: lambda η-reduces to #'ibuffer-locked-buffer-p (arity 1)
lisp/ibuf-ext.el:1879:4: lambda η-reduces to #'buffer-modified-p (arity 1)
lisp/isearch.el:1203:27: lambda η-reduces to #'bounds-of-thing-at-point (arity 1)
lisp/isearch.el:3229:33: lambda η-reduces to #'characterp (arity 1)
lisp/isearch.el:4644:39: lambda η-reduces to #'copy-marker (arity 1)
lisp/outline.el:1820:7: lambda η-reduces to #'icon-elements (arity 1)
lisp/ses.el:4001:26: lambda η-reduces to #'list (arity 1)
lisp/shadowfile.el:541:17: lambda η-reduces to #'shadow-remove-from-todo (arity 1)
lisp/tab-bar.el:2137:38: lambda η-reduces to tab-bar-tab-group-function (arity 1)
lisp/tab-bar.el:2168:38: lambda η-reduces to tab-bar-tab-group-function (arity 1)
lisp/tab-line.el:420:50: lambda η-reduces to #'tab-line-tabs-buffer-group-name (arity 1)
lisp/window.el:6102:35: lambda η-reduces to #'buffer-name (arity 1)
test/lisp/emacs-lisp/cl-seq-tests.el:108:50: lambda η-reduces to #'eql (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:150:68: lambda η-reduces to #'< (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:151:68: lambda η-reduces to #'>= (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:152:53: lambda η-reduces to #'>= (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:153:57: lambda η-reduces to #'< (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:175:68: lambda η-reduces to #'< (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:176:68: lambda η-reduces to #'>= (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:177:69: lambda η-reduces to #'< (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:178:51: lambda η-reduces to #'>= (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:179:55: lambda η-reduces to #'< (arity 2)
test/lisp/emacs-lisp/cl-seq-tests.el:235:32: lambda η-reduces to #'eql (arity 2)
test/lisp/emacs-lisp/ert-tests.el:538:44: lambda η-reduces to #'ert-pass (arity 0)
test/lisp/emacs-lisp/ert-x-tests.el:162:35: lambda η-reduces to #'ert-pass (arity 0)
test/lisp/emacs-lisp/generator-tests.el:306:45: lambda η-reduces to #'- (arity 1)
test/lisp/emacs-lisp/hierarchy-tests.el:223:31: lambda η-reduces to #'string< (arity 2)
test/lisp/emacs-lisp/hierarchy-tests.el:345:38: lambda η-reduces to #'cons (arity 2)
test/lisp/emacs-lisp/hierarchy-tests.el:352:38: lambda η-reduces to #'cons (arity 2)
test/lisp/emacs-lisp/hierarchy-tests.el:360:38: lambda η-reduces to #'cons (arity 2)
test/lisp/emacs-lisp/hierarchy-tests.el:367:38: lambda η-reduces to #'cons (arity 2)
test/lisp/emacs-lisp/hierarchy-tests.el:375:33: lambda η-reduces to #'cons (arity 2)
test/lisp/emacs-lisp/hierarchy-tests.el:387:40: lambda η-reduces to #'list (arity 3)
test/lisp/emacs-lisp/lisp-tests.el:269:3: lambda η-reduces to #'up-list (arity 0)
test/lisp/emacs-lisp/lisp-tests.el:304:3: lambda η-reduces to #'backward-up-list (arity 0)
test/lisp/emacs-lisp/map-tests.el:730:23: lambda η-reduces to #'eq (arity 2)
test/lisp/emacs-lisp/map-tests.el:754:23: lambda η-reduces to #'eq (arity 2)
test/lisp/emacs-lisp/seq-tests.el:104:35: lambda η-reduces to #'list (arity 2)
test/lisp/emacs-lisp/seq-tests.el:108:35: lambda η-reduces to #'list (arity 2)
test/lisp/emacs-lisp/shortdoc-tests.el:59:26: lambda η-reduces to #'car (arity 1)
test/lisp/emacs-lisp/vtable-tests.el:33:12: lambda η-reduces to #'vtable-column-align (arity 1)
test/lisp/erc/erc-fill-tests.el:52:16: lambda η-reduces to erc-fill-tests--time-vals (arity 0)
test/lisp/erc/erc-tests.el:1077:18: lambda η-reduces to #'current-buffer (arity 0)
test/lisp/mh-e/mh-utils-tests.el:378:22: lambda η-reduces to #'car (arity 1)
test/lisp/mh-e/mh-utils-tests.el:382:29: lambda η-reduces to #'car (arity 1)
test/lisp/mh-e/mh-utils-tests.el:396:37: lambda η-reduces to #'car (arity 1)
test/lisp/mh-e/mh-utils-tests.el:411:28: lambda η-reduces to #'car (arity 1)
test/lisp/mh-e/mh-utils-tests.el:413:29: lambda η-reduces to #'car (arity 1)
test/lisp/mh-e/mh-utils-tests.el:415:33: lambda η-reduces to #'car (arity 1)
test/lisp/mh-e/mh-utils-tests.el:428:31: lambda η-reduces to #'car (arity 1)
test/lisp/ls-lisp-tests.el:114:26: lambda η-reduces to #'ls-lisp-version-lessp (arity 2)
test/lisp/ls-lisp-tests.el:131:26: lambda η-reduces to #'ls-lisp-version-lessp (arity 2)
test/src/comp-resources/comp-test-funcs-dyn2.el:28:3: lambda η-reduces to #'car (arity 1)
test/src/comp-resources/comp-test-funcs.el:112:14: lambda η-reduces to #'1+ (arity 1)
test/src/comp-resources/comp-test-funcs.el:243:3: lambda η-reduces to #'1+ (arity 1)
test/src/chartab-tests.el:40:9: lambda η-reduces to #'chartab-set-and-test (arity 1)
test/src/fns-tests.el:210:22: lambda η-reduces to #'string-lessp (arity 2)
test/src/fns-tests.el:211:22: lambda η-reduces to #'string< (arity 2)
test/src/fns-tests.el:288:50: lambda η-reduces to #'< (arity 2)
test/src/fns-tests.el:290:50: lambda η-reduces to #'> (arity 2)
test/src/fns-tests.el:292:52: lambda η-reduces to #'< (arity 2)
test/src/fns-tests.el:294:52: lambda η-reduces to #'> (arity 2)
test/src/fns-tests.el:298:51: lambda η-reduces to #'< (arity 2)
test/src/fns-tests.el:302:18: lambda η-reduces to #'< (arity 2)
test/src/fns-tests.el:306:38: lambda η-reduces to #'> (arity 2)
test/src/fns-tests.el:309:51: lambda η-reduces to #'> (arity 2)
test/src/fns-tests.el:318:31: lambda η-reduces to #'< (arity 2)
test/src/fns-tests.el:321:44: lambda η-reduces to #'< (arity 2)
test/src/fns-tests.el:336:45: lambda η-reduces to #'< (arity 2)
test/src/fns-tests.el:339:42: lambda η-reduces to #'< (arity 2)
test/src/regex-emacs-tests.el:218:37: lambda η-reduces to #'cddr (arity 1)
test/src/regex-emacs-tests.el:228:35: lambda η-reduces to #'cdr (arity 1)
test/src/syntax-tests.el:512:27: lambda η-reduces to #'char-syntax (arity 1)
test/src/treesit-tests.el:390:42: lambda η-reduces to #'car (arity 1)
test/src/treesit-tests.el:768:21: lambda η-reduces to #'treesit-node-type (arity 1)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-30 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-29 13:02 bug#66816: [PATCH] Delete redundant lambdas around unary functions Stefan Kangas
2023-10-29 19:03 ` Mattias Engdegård
2023-10-29 21:55   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-30  8:56     ` Mattias Engdegård
2023-10-30 15:00       ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).