unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 66816@debbugs.gnu.org
Subject: bug#66816: [PATCH] Delete redundant lambdas around unary functions
Date: Mon, 30 Oct 2023 16:00:34 +0100	[thread overview]
Message-ID: <BB0DFAD1-35CD-4CAD-A0A3-DAF32D347F61@gmail.com> (raw)
In-Reply-To: <B6EC89B5-D1A9-4282-9F67-51E5105DACA5@gmail.com>

[-- 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)

      reply	other threads:[~2023-10-30 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BB0DFAD1-35CD-4CAD-A0A3-DAF32D347F61@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=66816@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).