(when (file-exists-p file)
(delete-file file)))
-(defun gnus-delete-duplicates (list)
- "Remove duplicate entries from LIST."
- (let ((result nil))
- (while list
- (unless (member (car list) result)
- (push (car list) result))
- (pop list))
- (nreverse result)))
-
(defun gnus-delete-directory (directory)
"Delete files in DIRECTORY. Subdirectories remain.
If there's no subdirectory, delete DIRECTORY as well."
;; gnus-util.
(autoload 'gnus-output-to-rmail "gnus-rmail")
+(define-obsolete-function-alias 'gnus-delete-duplicates #'seq-uniq "29.1")
+
(provide 'gnus-util)
;;; gnus-util.el ends here
;; Look for the credentials based on
;; the virtual server name and the address
(nnimap-credentials
- (gnus-delete-duplicates
+ (seq-uniq
(list server nnimap-address))
ports
nnimap-user))))
(let* ((flags (substring suffix 3))
(flags-as-list (append flags nil))
(new-flags
- (concat (gnus-delete-duplicates
+ (concat (seq-uniq
;; maildir flags must be sorted
(sort (cons flag flags-as-list) #'<)))))
(concat ":2," new-flags)))
dir (nnmaildir--nndir dir)
dir (nnmaildir--marks-dir dir)
ls (nnmaildir--group-ls nnmaildir--cur-server pgname)
- all-marks (gnus-delete-duplicates
+ all-marks (seq-uniq
;; get mark names from mark dirs and from flag
;; mappings
(append
pgname (nnmaildir--pgname nnmaildir--cur-server gname)
ls (nnmaildir--group-ls nnmaildir--cur-server pgname)
all-marks (funcall ls marksdir nil "\\`[^.]" 'nosort)
- all-marks (gnus-delete-duplicates
+ all-marks (seq-uniq
;; get mark names from mark dirs and from flag
;; mappings
(append
(setq alist (remove it alist)) it))
alist)
-;; borrowed from Gnus
-(defun ibuffer-remove-duplicates (list)
- "Return a copy of LIST with duplicate elements removed."
- (let ((new nil)
- (tail list))
- (while tail
- (or (member (car tail) new)
- (setq new (cons (car tail) new)))
- (setq tail (cdr tail)))
- (nreverse new)))
-
(defun ibuffer-split-list (fn elts)
(declare (obsolete seq-group-by "29.1"))
(let ((res (seq-group-by fn elts)))
(mapcar (lambda (mode)
(cons (format "%s" mode) `((mode . ,mode))))
(let ((modes
- (ibuffer-remove-duplicates
+ (seq-uniq
(mapcar (lambda (buf)
(buffer-local-value 'major-mode buf))
(buffer-list)))))
(push buf ibuffer-do-occur-bufs)))
(occur-1 regexp nlines ibuffer-do-occur-bufs)))
+(define-obsolete-function-alias 'ibuffer-remove-duplicates #'seq-uniq "29.1")
+
(provide 'ibuf-ext)
;; Local Variables: