summaryrefslogtreecommitdiff
path: root/lisp/ibuffer.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-08-09 18:15:56 +0200
committerStefan Kangas <stefan@marxist.se>2022-08-09 18:15:56 +0200
commit3ef18c7a213f4f3c03eec033fcb8219fb17cd53d (patch)
tree889cecf146a27847abc3c71ea23985083d19365f /lisp/ibuffer.el
parentb0653b27e25bfad2416364c33e1a5994285435c4 (diff)
downloademacs-3ef18c7a213f4f3c03eec033fcb8219fb17cd53d.tar.gz
emacs-3ef18c7a213f4f3c03eec033fcb8219fb17cd53d.tar.bz2
emacs-3ef18c7a213f4f3c03eec033fcb8219fb17cd53d.zip
Make ibuffer-aif obsolete in favor of if-let
* lisp/ibuf-macs.el (ibuffer-aif): Make obsolete in favor of 'if-let'. * lisp/ibuffer.el (ibuffer-mouse-toggle-mark) (ibuffer-mark-interactive, ibuffer-compile-format, process): Prefer 'if-let' to above obsolete macro. (ibuffer-toggle-marks, ibuffer-map-lines): Prefer 'when-let' to above obsolete macro.
Diffstat (limited to 'lisp/ibuffer.el')
-rw-r--r--lisp/ibuffer.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index d6870aab5dd..5cb4fe2a7a3 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -832,7 +832,7 @@ width and the longest string in LIST."
(let ((pt (save-excursion
(mouse-set-point event)
(point))))
- (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name)
+ (if-let ((it (get-text-property (point) 'ibuffer-filter-group-name)))
(ibuffer-toggle-marks it)
(goto-char pt)
(let ((mark (ibuffer-current-mark)))
@@ -1263,8 +1263,8 @@ become unmarked.
If point is on a group name, then this function operates on that
group."
(interactive)
- (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name)
- (setq group it))
+ (when-let ((it (get-text-property (point) 'ibuffer-filter-group-name)))
+ (setq group it))
(let ((count
(ibuffer-map-lines
(lambda (_buf mark)
@@ -1336,7 +1336,7 @@ If point is on a group name, this function operates on that group."
(when (and movement (< movement 0))
(setq arg (- arg)))
(ibuffer-forward-line 0)
- (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name)
+ (if-let ((it (get-text-property (point) 'ibuffer-filter-group-name)))
(progn
(require 'ibuf-ext)
(ibuffer-mark-on-buffer #'identity mark it))
@@ -1540,7 +1540,7 @@ If point is on a group name, this function operates on that group."
;; `ibuffer-inline-columns' alist and insert it
;; into our generated code. Otherwise, we just
;; generate a call to the column function.
- (ibuffer-aif (assq sym ibuffer-inline-columns)
+ (if-let ((it (assq sym ibuffer-inline-columns)))
(nth 1 it)
`(or (,sym buffer mark) "")))
;; You're not expected to understand this. Hell, I
@@ -1737,7 +1737,7 @@ If point is on a group name, this function operates on that group."
(cond ((zerop total) "No processes")
((= 1 total) "1 process")
(t (format "%d processes" total))))))
- (ibuffer-aif (get-buffer-process buffer)
+ (if-let ((it (get-buffer-process buffer)))
(format "(%s %s)" it (process-status it))
""))
@@ -1872,8 +1872,8 @@ the buffer object itself and the current mark symbol."
(let ((result
(if (buffer-live-p (ibuffer-current-buffer))
(when (or (null group)
- (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group)
- (equal group it)))
+ (when-let ((it (get-text-property (point) 'ibuffer-filter-group)))
+ (equal group it)))
(save-excursion
(funcall function
(ibuffer-current-buffer)