summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2025-02-11 19:04:00 +0100
committerStefan Kangas <stefankangas@gmail.com>2025-02-11 19:04:00 +0100
commit0e76716c5faa5e91ac3913b02ba4dc690cf5df83 (patch)
treee2e1c6ee89b25a989cb2d0d6724d77c6a1044b79 /lisp/emacs-lisp
parent14e0f214e6d144030d696afc3ed2f2abdd3c9f06 (diff)
downloademacs-0e76716c5faa5e91ac3913b02ba4dc690cf5df83.tar.gz
emacs-0e76716c5faa5e91ac3913b02ba4dc690cf5df83.tar.bz2
emacs-0e76716c5faa5e91ac3913b02ba4dc690cf5df83.zip
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)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/eieio-datadebug.el2
-rw-r--r--lisp/emacs-lisp/rmc.el2
2 files changed, 2 insertions, 2 deletions
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