1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

Remove redundant #' before lambda in {calendar,erc,mh-e}/*.el

* lisp/calendar/icalendar.el (icalendar--get-most-recent-observance):
* lisp/calendar/parse-time.el (parse-time-rules):
* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC):
* lisp/erc/erc-track.el (erc-modified-channels-display):
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol)
(erc-cmd-IGNORE, erc-cmd-JOIN, erc-default-server-handler)
(erc-banlist-update):
* lisp/mh-e/mh-search.el (mh-search, mh-mairix-convert-to-sop*)
(mh-index-create-sequences):
* lisp/mh-e/mh-thread.el (mh-toggle-threads, mh-thread-generate)
(mh-thread-prune-containers, mh-thread-sort-containers):
* lisp/mh-e/mh-utils.el (mh-sub-folders): Remove redundant #' before
lambda.
This commit is contained in:
Stefan Kangas 2021-04-09 00:04:13 +02:00
parent ff796823e5
commit 3492cc36f2
8 changed files with 112 additions and 112 deletions

View File

@ -581,19 +581,19 @@ ALIST is a VTIMEZONE potentially containing historical records."
(list
(car
(sort components
#'(lambda (a b)
(let* ((get-recent (lambda (n)
(car
(sort
(delq nil
(mapcar (lambda (p)
(and (memq (car p) '(DTSTART RDATE))
(car (cddr p))))
n))
'string-greaterp))))
(a-recent (funcall get-recent (car (cddr a))))
(b-recent (funcall get-recent (car (cddr b)))))
(string-greaterp a-recent b-recent))))))))
(lambda (a b)
(let* ((get-recent (lambda (n)
(car
(sort
(delq nil
(mapcar (lambda (p)
(and (memq (car p) '(DTSTART RDATE))
(car (cddr p))))
n))
'string-greaterp))))
(a-recent (funcall get-recent (car (cddr a))))
(b-recent (funcall get-recent (car (cddr b)))))
(string-greaterp a-recent b-recent))))))))
(defun icalendar--convert-all-timezones (icalendar)
"Convert all timezones in the ICALENDAR into an alist.

View File

@ -103,46 +103,46 @@ letters, digits, plus or minus signs or colons."
((4) parse-time-months)
((5) (100))
((2 1 0)
,#'(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 8)
(= (aref parse-time-elt 2) ?:)
(= (aref parse-time-elt 5) ?:)))
,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 8)
(= (aref parse-time-elt 2) ?:)
(= (aref parse-time-elt 5) ?:)))
[0 2] [3 5] [6 8])
((8 7) parse-time-zoneinfo
,#'(lambda () (car parse-time-val))
,#'(lambda () (cadr parse-time-val)))
,(lambda () (car parse-time-val))
,(lambda () (cadr parse-time-val)))
((8)
,#'(lambda ()
(and (stringp parse-time-elt)
(= 5 (length parse-time-elt))
(or (= (aref parse-time-elt 0) ?+)
(= (aref parse-time-elt 0) ?-))))
,#'(lambda () (* 60 (+ (cl-parse-integer parse-time-elt :start 3 :end 5)
(* 60 (cl-parse-integer parse-time-elt :start 1 :end 3)))
(if (= (aref parse-time-elt 0) ?-) -1 1))))
,(lambda ()
(and (stringp parse-time-elt)
(= 5 (length parse-time-elt))
(or (= (aref parse-time-elt 0) ?+)
(= (aref parse-time-elt 0) ?-))))
,(lambda () (* 60 (+ (cl-parse-integer parse-time-elt :start 3 :end 5)
(* 60 (cl-parse-integer parse-time-elt :start 1 :end 3)))
(if (= (aref parse-time-elt 0) ?-) -1 1))))
((5 4 3)
,#'(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 10)
(= (aref parse-time-elt 4) ?-)
(= (aref parse-time-elt 7) ?-)))
,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 10)
(= (aref parse-time-elt 4) ?-)
(= (aref parse-time-elt 7) ?-)))
[0 4] [5 7] [8 10])
((2 1 0)
,#'(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 5)
(= (aref parse-time-elt 2) ?:)))
[0 2] [3 5] ,#'(lambda () 0))
,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 5)
(= (aref parse-time-elt 2) ?:)))
[0 2] [3 5] ,(lambda () 0))
((2 1 0)
,#'(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 4)
(= (aref parse-time-elt 1) ?:)))
[0 1] [2 4] ,#'(lambda () 0))
,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 4)
(= (aref parse-time-elt 1) ?:)))
[0 1] [2 4] ,(lambda () 0))
((2 1 0)
,#'(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 7)
(= (aref parse-time-elt 1) ?:)))
,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 7)
(= (aref parse-time-elt 1) ?:)))
[0 1] [2 4] [5 7])
((5) (50 110) ,#'(lambda () (+ 1900 parse-time-elt)))
((5) (0 49) ,#'(lambda () (+ 2000 parse-time-elt))))
((5) (50 110) ,(lambda () (+ 1900 parse-time-elt)))
((5) (0 49) ,(lambda () (+ 2000 parse-time-elt))))
"(slots predicate extractor...)")
;;;###autoload(put 'parse-time-rules 'risky-local-variable t)

View File

@ -415,33 +415,33 @@ where FOO is one of CLOSE, GET, SEND, LIST, CHAT, etc."
(pcase (intern (downcase (pcomplete-arg 1)))
('chat (mapcar (lambda (elt) (plist-get elt :nick))
(cl-remove-if-not
#'(lambda (elt)
(eq (plist-get elt :type) 'CHAT))
(lambda (elt)
(eq (plist-get elt :type) 'CHAT))
erc-dcc-list)))
('close (delete-dups
(mapcar (lambda (elt) (symbol-name (plist-get elt :type)))
erc-dcc-list)))
('get (mapcar #'erc-dcc-nick
(cl-remove-if-not
#'(lambda (elt)
(eq (plist-get elt :type) 'GET))
(lambda (elt)
(eq (plist-get elt :type) 'GET))
erc-dcc-list)))
('send (pcomplete-erc-all-nicks))))
(pcomplete-here
(pcase (intern (downcase (pcomplete-arg 2)))
('get (mapcar (lambda (elt) (plist-get elt :file))
(cl-remove-if-not
#'(lambda (elt)
(and (eq (plist-get elt :type) 'GET)
(erc-nick-equal-p (erc-extract-nick
(plist-get elt :nick))
(pcomplete-arg 1))))
(lambda (elt)
(and (eq (plist-get elt :type) 'GET)
(erc-nick-equal-p (erc-extract-nick
(plist-get elt :nick))
(pcomplete-arg 1))))
erc-dcc-list)))
('close (mapcar #'erc-dcc-nick
(cl-remove-if-not
#'(lambda (elt)
(eq (plist-get elt :type)
(intern (upcase (pcomplete-arg 1)))))
(lambda (elt)
(eq (plist-get elt :type)
(intern (upcase (pcomplete-arg 1)))))
erc-dcc-list)))
('send (pcomplete-entries)))))

View File

@ -686,9 +686,9 @@ Use `erc-make-mode-line-buffer-name' to create buttons."
(let* ((buffers (mapcar #'car erc-modified-channels-alist))
(counts (mapcar #'cadr erc-modified-channels-alist))
(faces (mapcar #'cddr erc-modified-channels-alist))
(long-names (mapcar #'(lambda (buf)
(or (buffer-name buf)
""))
(long-names (mapcar (lambda (buf)
(or (buffer-name buf)
""))
buffers))
(short-names (if (functionp erc-track-shorten-function)
(funcall erc-track-shorten-function

View File

@ -2321,7 +2321,7 @@ If ARG is non-nil, show the *erc-protocol* buffer."
(use-local-map (make-sparse-keymap))
(local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
(add-hook 'kill-buffer-hook
#'(lambda () (setq erc-debug-irc-protocol nil))
(lambda () (setq erc-debug-irc-protocol nil))
nil 'local)
(goto-char (point-max))
(let ((inhibit-read-only t))
@ -2945,9 +2945,9 @@ If no USER argument is specified, list the contents of `erc-ignore-list'."
(if (null (erc-with-server-buffer erc-ignore-list))
(erc-display-line (erc-make-notice "Ignore list is empty") 'active)
(erc-display-line (erc-make-notice "Ignore list:") 'active)
(mapc #'(lambda (item)
(erc-display-line (erc-make-notice item)
'active))
(mapc (lambda (item)
(erc-display-line (erc-make-notice item)
'active))
(erc-with-server-buffer erc-ignore-list))))
t)
@ -3129,8 +3129,8 @@ were most recently invited. See also `invitation'."
(when chnl
;; Prevent double joining of same channel on same server.
(let* ((joined-channels
(mapcar #'(lambda (chanbuf)
(with-current-buffer chanbuf (erc-default-target)))
(mapcar (lambda (chanbuf)
(with-current-buffer chanbuf (erc-default-target)))
(erc-channel-list erc-server-process)))
(server (with-current-buffer (process-buffer erc-server-process)
(or erc-session-server erc-server-announced-name)))
@ -4149,9 +4149,9 @@ Displays PROC and PARSED appropriately using `erc-display-message'."
(mapconcat
#'identity
(let (res)
(mapc #'(lambda (x)
(if (stringp x)
(setq res (append res (list x)))))
(mapc (lambda (x)
(if (stringp x)
(setq res (append res (list x)))))
parsed)
res)
" ")))
@ -4539,10 +4539,10 @@ See also: `erc-echo-notice-in-user-buffers',
;; Remove the unbanned masks from the ban list
(setq erc-channel-banlist
(cl-delete-if
#'(lambda (y)
(member (upcase (cdr y))
(mapcar #'upcase
(cdr (split-string mode)))))
(lambda (y)
(member (upcase (cdr y))
(mapcar #'upcase
(cdr (split-string mode)))))
erc-channel-banlist)))
((string-match "^\\+" mode)
;; Add the banned mask(s) to the ban list

View File

@ -274,23 +274,23 @@ folder containing the index search results."
t)))
;; Copy the search results over.
(maphash #'(lambda (folder msgs)
(let ((cur (car (mh-translate-range folder "cur")))
(msgs (sort (cl-loop
for msg being the hash-keys of msgs
collect msg)
#'<)))
(mh-exec-cmd "refile" msgs "-src" folder
"-link" index-folder)
;; Restore cur to old value, that refile changed
(when cur
(mh-exec-cmd-quiet nil "mark" folder "-add" "-zero"
"-sequence"
"cur" (format "%s" cur)))
(cl-loop for msg in msgs
do (cl-incf result-count)
(setf (gethash result-count origin-map)
(cons folder msg)))))
(maphash (lambda (folder msgs)
(let ((cur (car (mh-translate-range folder "cur")))
(msgs (sort (cl-loop
for msg being the hash-keys of msgs
collect msg)
#'<)))
(mh-exec-cmd "refile" msgs "-src" folder
"-link" index-folder)
;; Restore cur to old value, that refile changed
(when cur
(mh-exec-cmd-quiet nil "mark" folder "-add" "-zero"
"-sequence"
"cur" (format "%s" cur)))
(cl-loop for msg in msgs
do (cl-incf result-count)
(setf (gethash result-count origin-map)
(cons folder msg)))))
folder-results-map)
;; Vist the results folder.
@ -1136,10 +1136,10 @@ REGEXP-LIST is an alist of fields and values."
((atom (cadr expr)) `(or (and ,expr)))
((eq (caadr expr) 'not) (mh-mairix-convert-to-sop* (cadadr expr)))
((eq (caadr expr) 'and) (mh-mairix-convert-to-sop*
`(or ,@(mapcar #'(lambda (x) `(not ,x))
`(or ,@(mapcar (lambda (x) `(not ,x))
(cdadr expr)))))
((eq (caadr expr) 'or) (mh-mairix-convert-to-sop*
`(and ,@(mapcar #'(lambda (x) `(not ,x))
`(and ,@(mapcar (lambda (x) `(not ,x))
(cdadr expr)))))
(t (error "Unreachable: %s" expr))))
@ -1620,7 +1620,7 @@ garbled."
(cl-loop for seq in seq-list
do (apply #'mh-exec-cmd "mark" mh-current-folder
"-sequence" (symbol-name (car seq)) "-add"
(mapcar #'(lambda (x) (format "%s" x)) (cdr seq))))))
(mapcar (lambda (x) (format "%s" x)) (cdr seq))))))
;;;###mh-autoload
(defun mh-create-sequence-map (seq-list)

View File

@ -233,7 +233,7 @@ sibling."
(push index msg-list)))
(forward-line))
(mh-scan-folder mh-current-folder
(mapcar #'(lambda (x) (format "%s" x))
(mapcar (lambda (x) (format "%s" x))
(mh-coalesce-msg-list msg-list))
t))
(when mh-index-data
@ -591,7 +591,7 @@ Only information about messages in MSG-LIST are added to the tree."
#'call-process (expand-file-name mh-scan-prog mh-progs) nil '(t nil) nil
"-width" "10000" "-format"
"%(msg)\n%{message-id}\n%{references}\n%{in-reply-to}\n%{subject}\n"
folder (mapcar #'(lambda (x) (format "%s" x)) msg-list)))
folder (mapcar (lambda (x) (format "%s" x)) msg-list)))
(goto-char (point-min))
(let ((roots ())
(case-fold-search t))
@ -635,9 +635,9 @@ Only information about messages in MSG-LIST are added to the tree."
(mh-thread-remove-parent-link id)
(mh-thread-add-link (car ancestors) id)))
(mh-thread-add-link (car ancestors) (cadr ancestors)))))))
(maphash #'(lambda (_k v)
(when (null (mh-container-parent v))
(push v roots)))
(maphash (lambda (_k v)
(when (null (mh-container-parent v))
(push v roots)))
mh-thread-id-table)
(setq roots (mh-thread-prune-containers roots))
(prog1 (setq roots (mh-thread-group-by-subject roots))
@ -720,25 +720,25 @@ For now it will take the last string inside angles."
mh-thread-history)
(mh-thread-remove-parent-link node)))))
(let ((results ()))
(maphash #'(lambda (_k v)
(when (and (null (mh-container-parent v))
(gethash (mh-message-id (mh-container-message v))
mh-thread-id-index-map))
(push v results)))
(maphash (lambda (_k v)
(when (and (null (mh-container-parent v))
(gethash (mh-message-id (mh-container-message v))
mh-thread-id-index-map))
(push v results)))
mh-thread-id-table)
(mh-thread-sort-containers results))))
(defun mh-thread-sort-containers (containers)
"Sort a list of message CONTAINERS to be in ascending order wrt index."
(sort containers
#'(lambda (x y)
(when (and (mh-container-message x) (mh-container-message y))
(let* ((id-x (mh-message-id (mh-container-message x)))
(id-y (mh-message-id (mh-container-message y)))
(index-x (gethash id-x mh-thread-id-index-map))
(index-y (gethash id-y mh-thread-id-index-map)))
(and (integerp index-x) (integerp index-y)
(< index-x index-y)))))))
(lambda (x y)
(when (and (mh-container-message x) (mh-container-message y))
(let* ((id-x (mh-message-id (mh-container-message x)))
(id-y (mh-message-id (mh-container-message y)))
(index-x (gethash id-x mh-thread-id-index-map))
(index-y (gethash id-y mh-thread-id-index-map)))
(and (integerp index-x) (integerp index-y)
(< index-x index-y)))))))
(defvar mh-thread-last-ancestor)

View File

@ -544,8 +544,8 @@ nested folders within them."
(mh-sub-folders-actual folder)))
(t match))))
(if add-trailing-slash-flag
(mapcar #'(lambda (x)
(if (cdr x) (cons (concat (car x) "/") (cdr x)) x))
(mapcar (lambda (x)
(if (cdr x) (cons (concat (car x) "/") (cdr x)) x))
sub-folders)
sub-folders)))