1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

Remove redundant #' before lambda in ibuf-*.el

* lisp/ibuf-ext.el (ibuffer-included-in-filters-p)
(ibuffer-included-in-filter-p-1, ibuffer-do-kill-lines)
(ibuffer-jump-to-buffer, ibuffer-mark-on-buffer)
(ibuffer-mark-by-name-regexp, ibuffer-mark-by-mode-regexp)
(ibuffer-mark-by-content-regexp, ibuffer-mark-by-mode)
(ibuffer-mark-modified-buffers, ibuffer-mark-unsaved-buffers)
(ibuffer-mark-dissociated-buffers, ibuffer-mark-help-buffers)
(ibuffer-mark-compressed-file-buffers, ibuffer-mark-old-buffers)
(ibuffer-mark-special-buffers, ibuffer-mark-read-only-buffers)
(ibuffer-mark-dired-buffers, ibuffer-do-occur):
* lisp/ibuf-macs.el (ibuffer-save-marks, define-ibuffer-sorter)
(define-ibuffer-op): Remove redundant #' before lambda.
This commit is contained in:
Stefan Kangas 2021-04-09 00:14:12 +02:00
parent cdd72c5d89
commit 512ec97bcf
2 changed files with 91 additions and 91 deletions

View File

@ -687,7 +687,7 @@ specifications with the same structure as
`ibuffer-filtering-qualifiers'."
(not
(memq nil ;; a filter will return nil if it failed
(mapcar #'(lambda (filter)
(mapcar (lambda (filter)
(ibuffer-included-in-filter-p buf filter))
filters))))
@ -724,7 +724,7 @@ specification, with the same structure as an element of the list
;; (dolist (filter-spec (cdr filter) nil)
;; (when (ibuffer-included-in-filter-p buf filter-spec)
;; (throw 'has-match t))))
(memq t (mapcar #'(lambda (x)
(memq t (mapcar (lambda (x)
(ibuffer-included-in-filter-p buf x))
(cdr filter))))
('and
@ -1589,7 +1589,7 @@ to move by. The default is `ibuffer-marked-char'."
(message "No buffers marked; use `m' to mark a buffer")
(let ((count
(ibuffer-map-marked-lines
#'(lambda (_buf _mark)
(lambda (_buf _mark)
'kill))))
(message "Killed %s lines" count))))
@ -1609,7 +1609,7 @@ a prefix argument reverses the meaning of that variable."
(when current-prefix-arg
(setq only-visible (not only-visible)))
(if only-visible
(let ((table (mapcar #'(lambda (x)
(let ((table (mapcar (lambda (x)
(buffer-name (car x)))
(ibuffer-current-state-list))))
(when (null table)
@ -1621,7 +1621,7 @@ a prefix argument reverses the meaning of that variable."
(let (buf-point)
;; Blindly search for our buffer: it is very likely that it is
;; not in a hidden filter group.
(ibuffer-map-lines #'(lambda (buf _marks)
(ibuffer-map-lines (lambda (buf _marks)
(when (string= (buffer-name buf) name)
(setq buf-point (point))
nil))
@ -1635,7 +1635,7 @@ a prefix argument reverses the meaning of that variable."
(dolist (group ibuffer-hidden-filter-groups)
(ibuffer-jump-to-filter-group group)
(ibuffer-toggle-filter-group)
(ibuffer-map-lines #'(lambda (buf _marks)
(ibuffer-map-lines (lambda (buf _marks)
(when (string= (buffer-name buf) name)
(setq buf-point (point))
nil))
@ -1775,7 +1775,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
(defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group)
(let ((count
(ibuffer-map-lines
#'(lambda (buf _mark)
(lambda (buf _mark)
(when (funcall func buf)
(ibuffer-set-mark-1 (or ibuffer-mark-on-buffer-mark
ibuffer-marked-char))
@ -1791,7 +1791,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
"Mark all buffers whose name matches REGEXP."
(interactive "sMark by name (regexp): ")
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(string-match regexp (buffer-name buf)))))
(defun ibuffer-locked-buffer-p (&optional buf)
@ -1816,7 +1816,7 @@ When BUF nil, default to the buffer at current line."
"Mark all buffers whose major mode matches REGEXP."
(interactive "sMark by major mode (regexp): ")
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(with-current-buffer buf
(string-match regexp (format-mode-line mode-name nil nil buf))))))
@ -1840,7 +1840,7 @@ Otherwise buffers whose name matches an element of
(interactive (let ((reg (read-string "Mark by content (regexp): ")))
(list reg current-prefix-arg)))
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(let ((mode (with-current-buffer buf major-mode))
res)
(cond ((and (not all-buffers)
@ -1869,7 +1869,7 @@ Otherwise buffers whose name matches an element of
(format-prompt "Mark by major mode" default)
(ibuffer-list-buffer-modes) nil t nil nil default)))))
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(eq (buffer-local-value 'major-mode buf) mode))))
;;;###autoload
@ -1877,14 +1877,14 @@ Otherwise buffers whose name matches an element of
"Mark all modified buffers."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf) (buffer-modified-p buf))))
(lambda (buf) (buffer-modified-p buf))))
;;;###autoload
(defun ibuffer-mark-unsaved-buffers ()
"Mark all modified buffers that have an associated file."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf) (and (buffer-local-value 'buffer-file-name buf)
(lambda (buf) (and (buffer-local-value 'buffer-file-name buf)
(buffer-modified-p buf)))))
;;;###autoload
@ -1892,7 +1892,7 @@ Otherwise buffers whose name matches an element of
"Mark all buffers whose associated file does not exist."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(with-current-buffer buf
(or
(and buffer-file-name
@ -1907,7 +1907,7 @@ Otherwise buffers whose name matches an element of
"Mark buffers whose major mode is in variable `ibuffer-help-buffer-modes'."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(with-current-buffer buf
(memq major-mode ibuffer-help-buffer-modes)))))
@ -1916,7 +1916,7 @@ Otherwise buffers whose name matches an element of
"Mark buffers whose associated file is compressed."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(with-current-buffer buf
(and buffer-file-name
(string-match ibuffer-compressed-file-name-regexp
@ -1927,7 +1927,7 @@ Otherwise buffers whose name matches an element of
"Mark buffers which have not been viewed in `ibuffer-old-time' hours."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf)
(lambda (buf)
(with-current-buffer buf
(when buffer-display-time
(time-less-p
@ -1939,7 +1939,7 @@ Otherwise buffers whose name matches an element of
"Mark all buffers whose name begins and ends with `*'."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf) (string-match "^\\*.+\\*$"
(lambda (buf) (string-match "^\\*.+\\*$"
(buffer-name buf)))))
;;;###autoload
@ -1947,14 +1947,14 @@ Otherwise buffers whose name matches an element of
"Mark all read-only buffers."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf) (buffer-local-value 'buffer-read-only buf))))
(lambda (buf) (buffer-local-value 'buffer-read-only buf))))
;;;###autoload
(defun ibuffer-mark-dired-buffers ()
"Mark all `dired' buffers."
(interactive)
(ibuffer-mark-on-buffer
#'(lambda (buf) (eq (buffer-local-value 'major-mode buf) 'dired-mode))))
(lambda (buf) (eq (buffer-local-value 'major-mode buf) 'dired-mode))))
;;;###autoload
(defun ibuffer-do-occur (regexp &optional nlines)
@ -1970,7 +1970,7 @@ defaults to one."
(let ((ibuffer-do-occur-bufs nil))
;; Accumulate a list of marked buffers
(ibuffer-map-marked-lines
#'(lambda (buf _mark)
(lambda (buf _mark)
(push buf ibuffer-do-occur-bufs)))
(occur-1 regexp nlines ibuffer-do-occur-bufs)))

View File

@ -66,7 +66,7 @@ During evaluation of body, bind `it' to the value returned by TEST."
(ibuffer-redisplay-engine
;; Get rid of dead buffers
(delq nil
(mapcar #'(lambda (e) (when (buffer-live-p (car e))
(mapcar (lambda (e) (when (buffer-live-p (car e))
e))
ibuffer-save-marks-tmp-mark-list)))
(ibuffer-redisplay t))))))
@ -154,7 +154,7 @@ value if and only if `a' is \"less than\" `b'.
(ibuffer-redisplay t)
(setq ibuffer-last-sorting-mode ',name))
(push (list ',name ,description
#'(lambda (a b)
(lambda (a b)
,@body))
ibuffer-sorting-functions-alist)
:autoload-end))
@ -259,7 +259,7 @@ buffer object.
'ibuffer-map-deletion-lines)
(_
'ibuffer-map-marked-lines))
#'(lambda (buf mark)
(lambda (buf mark)
;; Silence warning for code that doesn't
;; use `mark'.
(ignore mark)