1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +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 (list
(car (car
(sort components (sort components
#'(lambda (a b) (lambda (a b)
(let* ((get-recent (lambda (n) (let* ((get-recent (lambda (n)
(car (car
(sort (sort
(delq nil (delq nil
(mapcar (lambda (p) (mapcar (lambda (p)
(and (memq (car p) '(DTSTART RDATE)) (and (memq (car p) '(DTSTART RDATE))
(car (cddr p)))) (car (cddr p))))
n)) n))
'string-greaterp)))) 'string-greaterp))))
(a-recent (funcall get-recent (car (cddr a)))) (a-recent (funcall get-recent (car (cddr a))))
(b-recent (funcall get-recent (car (cddr b))))) (b-recent (funcall get-recent (car (cddr b)))))
(string-greaterp a-recent b-recent)))))))) (string-greaterp a-recent b-recent))))))))
(defun icalendar--convert-all-timezones (icalendar) (defun icalendar--convert-all-timezones (icalendar)
"Convert all timezones in the ICALENDAR into an alist. "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) ((4) parse-time-months)
((5) (100)) ((5) (100))
((2 1 0) ((2 1 0)
,#'(lambda () (and (stringp parse-time-elt) ,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 8) (= (length parse-time-elt) 8)
(= (aref parse-time-elt 2) ?:) (= (aref parse-time-elt 2) ?:)
(= (aref parse-time-elt 5) ?:))) (= (aref parse-time-elt 5) ?:)))
[0 2] [3 5] [6 8]) [0 2] [3 5] [6 8])
((8 7) parse-time-zoneinfo ((8 7) parse-time-zoneinfo
,#'(lambda () (car parse-time-val)) ,(lambda () (car parse-time-val))
,#'(lambda () (cadr parse-time-val))) ,(lambda () (cadr parse-time-val)))
((8) ((8)
,#'(lambda () ,(lambda ()
(and (stringp parse-time-elt) (and (stringp parse-time-elt)
(= 5 (length parse-time-elt)) (= 5 (length parse-time-elt))
(or (= (aref parse-time-elt 0) ?+) (or (= (aref parse-time-elt 0) ?+)
(= (aref parse-time-elt 0) ?-)))) (= (aref parse-time-elt 0) ?-))))
,#'(lambda () (* 60 (+ (cl-parse-integer parse-time-elt :start 3 :end 5) ,(lambda () (* 60 (+ (cl-parse-integer parse-time-elt :start 3 :end 5)
(* 60 (cl-parse-integer parse-time-elt :start 1 :end 3))) (* 60 (cl-parse-integer parse-time-elt :start 1 :end 3)))
(if (= (aref parse-time-elt 0) ?-) -1 1)))) (if (= (aref parse-time-elt 0) ?-) -1 1))))
((5 4 3) ((5 4 3)
,#'(lambda () (and (stringp parse-time-elt) ,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 10) (= (length parse-time-elt) 10)
(= (aref parse-time-elt 4) ?-) (= (aref parse-time-elt 4) ?-)
(= (aref parse-time-elt 7) ?-))) (= (aref parse-time-elt 7) ?-)))
[0 4] [5 7] [8 10]) [0 4] [5 7] [8 10])
((2 1 0) ((2 1 0)
,#'(lambda () (and (stringp parse-time-elt) ,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 5) (= (length parse-time-elt) 5)
(= (aref parse-time-elt 2) ?:))) (= (aref parse-time-elt 2) ?:)))
[0 2] [3 5] ,#'(lambda () 0)) [0 2] [3 5] ,(lambda () 0))
((2 1 0) ((2 1 0)
,#'(lambda () (and (stringp parse-time-elt) ,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 4) (= (length parse-time-elt) 4)
(= (aref parse-time-elt 1) ?:))) (= (aref parse-time-elt 1) ?:)))
[0 1] [2 4] ,#'(lambda () 0)) [0 1] [2 4] ,(lambda () 0))
((2 1 0) ((2 1 0)
,#'(lambda () (and (stringp parse-time-elt) ,(lambda () (and (stringp parse-time-elt)
(= (length parse-time-elt) 7) (= (length parse-time-elt) 7)
(= (aref parse-time-elt 1) ?:))) (= (aref parse-time-elt 1) ?:)))
[0 1] [2 4] [5 7]) [0 1] [2 4] [5 7])
((5) (50 110) ,#'(lambda () (+ 1900 parse-time-elt))) ((5) (50 110) ,(lambda () (+ 1900 parse-time-elt)))
((5) (0 49) ,#'(lambda () (+ 2000 parse-time-elt)))) ((5) (0 49) ,(lambda () (+ 2000 parse-time-elt))))
"(slots predicate extractor...)") "(slots predicate extractor...)")
;;;###autoload(put 'parse-time-rules 'risky-local-variable t) ;;;###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))) (pcase (intern (downcase (pcomplete-arg 1)))
('chat (mapcar (lambda (elt) (plist-get elt :nick)) ('chat (mapcar (lambda (elt) (plist-get elt :nick))
(cl-remove-if-not (cl-remove-if-not
#'(lambda (elt) (lambda (elt)
(eq (plist-get elt :type) 'CHAT)) (eq (plist-get elt :type) 'CHAT))
erc-dcc-list))) erc-dcc-list)))
('close (delete-dups ('close (delete-dups
(mapcar (lambda (elt) (symbol-name (plist-get elt :type))) (mapcar (lambda (elt) (symbol-name (plist-get elt :type)))
erc-dcc-list))) erc-dcc-list)))
('get (mapcar #'erc-dcc-nick ('get (mapcar #'erc-dcc-nick
(cl-remove-if-not (cl-remove-if-not
#'(lambda (elt) (lambda (elt)
(eq (plist-get elt :type) 'GET)) (eq (plist-get elt :type) 'GET))
erc-dcc-list))) erc-dcc-list)))
('send (pcomplete-erc-all-nicks)))) ('send (pcomplete-erc-all-nicks))))
(pcomplete-here (pcomplete-here
(pcase (intern (downcase (pcomplete-arg 2))) (pcase (intern (downcase (pcomplete-arg 2)))
('get (mapcar (lambda (elt) (plist-get elt :file)) ('get (mapcar (lambda (elt) (plist-get elt :file))
(cl-remove-if-not (cl-remove-if-not
#'(lambda (elt) (lambda (elt)
(and (eq (plist-get elt :type) 'GET) (and (eq (plist-get elt :type) 'GET)
(erc-nick-equal-p (erc-extract-nick (erc-nick-equal-p (erc-extract-nick
(plist-get elt :nick)) (plist-get elt :nick))
(pcomplete-arg 1)))) (pcomplete-arg 1))))
erc-dcc-list))) erc-dcc-list)))
('close (mapcar #'erc-dcc-nick ('close (mapcar #'erc-dcc-nick
(cl-remove-if-not (cl-remove-if-not
#'(lambda (elt) (lambda (elt)
(eq (plist-get elt :type) (eq (plist-get elt :type)
(intern (upcase (pcomplete-arg 1))))) (intern (upcase (pcomplete-arg 1)))))
erc-dcc-list))) erc-dcc-list)))
('send (pcomplete-entries))))) ('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)) (let* ((buffers (mapcar #'car erc-modified-channels-alist))
(counts (mapcar #'cadr erc-modified-channels-alist)) (counts (mapcar #'cadr erc-modified-channels-alist))
(faces (mapcar #'cddr erc-modified-channels-alist)) (faces (mapcar #'cddr erc-modified-channels-alist))
(long-names (mapcar #'(lambda (buf) (long-names (mapcar (lambda (buf)
(or (buffer-name buf) (or (buffer-name buf)
"")) ""))
buffers)) buffers))
(short-names (if (functionp erc-track-shorten-function) (short-names (if (functionp erc-track-shorten-function)
(funcall 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)) (use-local-map (make-sparse-keymap))
(local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol)) (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
(add-hook 'kill-buffer-hook (add-hook 'kill-buffer-hook
#'(lambda () (setq erc-debug-irc-protocol nil)) (lambda () (setq erc-debug-irc-protocol nil))
nil 'local) nil 'local)
(goto-char (point-max)) (goto-char (point-max))
(let ((inhibit-read-only t)) (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)) (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 is empty") 'active)
(erc-display-line (erc-make-notice "Ignore list:") 'active) (erc-display-line (erc-make-notice "Ignore list:") 'active)
(mapc #'(lambda (item) (mapc (lambda (item)
(erc-display-line (erc-make-notice item) (erc-display-line (erc-make-notice item)
'active)) 'active))
(erc-with-server-buffer erc-ignore-list)))) (erc-with-server-buffer erc-ignore-list))))
t) t)
@ -3129,8 +3129,8 @@ were most recently invited. See also `invitation'."
(when chnl (when chnl
;; Prevent double joining of same channel on same server. ;; Prevent double joining of same channel on same server.
(let* ((joined-channels (let* ((joined-channels
(mapcar #'(lambda (chanbuf) (mapcar (lambda (chanbuf)
(with-current-buffer chanbuf (erc-default-target))) (with-current-buffer chanbuf (erc-default-target)))
(erc-channel-list erc-server-process))) (erc-channel-list erc-server-process)))
(server (with-current-buffer (process-buffer erc-server-process) (server (with-current-buffer (process-buffer erc-server-process)
(or erc-session-server erc-server-announced-name))) (or erc-session-server erc-server-announced-name)))
@ -4149,9 +4149,9 @@ Displays PROC and PARSED appropriately using `erc-display-message'."
(mapconcat (mapconcat
#'identity #'identity
(let (res) (let (res)
(mapc #'(lambda (x) (mapc (lambda (x)
(if (stringp x) (if (stringp x)
(setq res (append res (list x))))) (setq res (append res (list x)))))
parsed) parsed)
res) res)
" "))) " ")))
@ -4539,10 +4539,10 @@ See also: `erc-echo-notice-in-user-buffers',
;; Remove the unbanned masks from the ban list ;; Remove the unbanned masks from the ban list
(setq erc-channel-banlist (setq erc-channel-banlist
(cl-delete-if (cl-delete-if
#'(lambda (y) (lambda (y)
(member (upcase (cdr y)) (member (upcase (cdr y))
(mapcar #'upcase (mapcar #'upcase
(cdr (split-string mode))))) (cdr (split-string mode)))))
erc-channel-banlist))) erc-channel-banlist)))
((string-match "^\\+" mode) ((string-match "^\\+" mode)
;; Add the banned mask(s) to the ban list ;; Add the banned mask(s) to the ban list

View File

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

View File

@ -233,7 +233,7 @@ sibling."
(push index msg-list))) (push index msg-list)))
(forward-line)) (forward-line))
(mh-scan-folder mh-current-folder (mh-scan-folder mh-current-folder
(mapcar #'(lambda (x) (format "%s" x)) (mapcar (lambda (x) (format "%s" x))
(mh-coalesce-msg-list msg-list)) (mh-coalesce-msg-list msg-list))
t)) t))
(when mh-index-data (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 #'call-process (expand-file-name mh-scan-prog mh-progs) nil '(t nil) nil
"-width" "10000" "-format" "-width" "10000" "-format"
"%(msg)\n%{message-id}\n%{references}\n%{in-reply-to}\n%{subject}\n" "%(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)) (goto-char (point-min))
(let ((roots ()) (let ((roots ())
(case-fold-search t)) (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-remove-parent-link id)
(mh-thread-add-link (car ancestors) id))) (mh-thread-add-link (car ancestors) id)))
(mh-thread-add-link (car ancestors) (cadr ancestors))))))) (mh-thread-add-link (car ancestors) (cadr ancestors)))))))
(maphash #'(lambda (_k v) (maphash (lambda (_k v)
(when (null (mh-container-parent v)) (when (null (mh-container-parent v))
(push v roots))) (push v roots)))
mh-thread-id-table) mh-thread-id-table)
(setq roots (mh-thread-prune-containers roots)) (setq roots (mh-thread-prune-containers roots))
(prog1 (setq roots (mh-thread-group-by-subject 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-history)
(mh-thread-remove-parent-link node))))) (mh-thread-remove-parent-link node)))))
(let ((results ())) (let ((results ()))
(maphash #'(lambda (_k v) (maphash (lambda (_k v)
(when (and (null (mh-container-parent v)) (when (and (null (mh-container-parent v))
(gethash (mh-message-id (mh-container-message v)) (gethash (mh-message-id (mh-container-message v))
mh-thread-id-index-map)) mh-thread-id-index-map))
(push v results))) (push v results)))
mh-thread-id-table) mh-thread-id-table)
(mh-thread-sort-containers results)))) (mh-thread-sort-containers results))))
(defun mh-thread-sort-containers (containers) (defun mh-thread-sort-containers (containers)
"Sort a list of message CONTAINERS to be in ascending order wrt index." "Sort a list of message CONTAINERS to be in ascending order wrt index."
(sort containers (sort containers
#'(lambda (x y) (lambda (x y)
(when (and (mh-container-message x) (mh-container-message y)) (when (and (mh-container-message x) (mh-container-message y))
(let* ((id-x (mh-message-id (mh-container-message x))) (let* ((id-x (mh-message-id (mh-container-message x)))
(id-y (mh-message-id (mh-container-message y))) (id-y (mh-message-id (mh-container-message y)))
(index-x (gethash id-x mh-thread-id-index-map)) (index-x (gethash id-x mh-thread-id-index-map))
(index-y (gethash id-y mh-thread-id-index-map))) (index-y (gethash id-y mh-thread-id-index-map)))
(and (integerp index-x) (integerp index-y) (and (integerp index-x) (integerp index-y)
(< index-x index-y))))))) (< index-x index-y)))))))
(defvar mh-thread-last-ancestor) (defvar mh-thread-last-ancestor)

View File

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