]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace ps-remove-duplicates with seq-uniq
authorStefan Kangas <stefankangas@gmail.com>
Sun, 3 Sep 2023 00:55:01 +0000 (02:55 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 3 Sep 2023 00:55:31 +0000 (02:55 +0200)
* lisp/ps-print.el (ps-remove-duplicates): Make obsolete in favor of
seq-uniq.  Update all callers.

; * lisp/tab-line.el: Remove stale comment.

lisp/ps-print.el
lisp/tab-line.el

index b54f09b2bdda5f7b7b86913dbf59a137c35acf79..aa3037f5273cb49a7de64e53e083431f8bad839b 100644 (file)
@@ -4850,17 +4850,6 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th
     (and has-local-background (ps-output "}def\n"))))
 
 
-;; Return a list of the distinct elements of LIST.
-;; Elements are compared with `equal'.
-(defun ps-remove-duplicates (list)
-  (let (new (tail list))
-    (while tail
-      (or (member (car tail) new)
-         (setq new (cons (car tail) new)))
-      (setq tail (cdr tail)))
-    (nreverse new)))
-
-
 ;; Find the first occurrence of ITEM in LIST.
 ;; Return the index of the matching item, or nil if not found.
 ;; Elements are compared with `eq'.
@@ -5342,7 +5331,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
      (if ps-landscape-mode "Landscape" "Portrait")
      "\n%%DocumentNeededResources: font Times-Roman Times-Italic\n%%+ font "
      (mapconcat 'identity
-               (ps-remove-duplicates
+                (seq-uniq
                 (append (ps-fonts 'ps-font-for-text)
                         (list (ps-font 'ps-font-for-header 'normal)
                               (ps-font 'ps-font-for-header 'bold)
@@ -5491,7 +5480,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
      "\n%%IncludeResource: font Times-Italic"
      "\n%%IncludeResource: font "
      (mapconcat 'identity
-               (ps-remove-duplicates
+                (seq-uniq
                 (append (ps-fonts 'ps-font-for-text)
                         (list (ps-font 'ps-font-for-header 'normal)
                               (ps-font 'ps-font-for-header 'bold)
@@ -6548,6 +6537,7 @@ Please send all bug fixes and enhancements to
 (make-obsolete-variable 'ps-print-version 'emacs-version "29.1")
 
 (define-obsolete-function-alias 'ps-print-ensure-fontified #'font-lock-ensure "29.1")
+(define-obsolete-function-alias 'ps-remove-duplicates #'seq-uniq "30.1")
 
 (provide 'ps-print)
 
index f0bc13acb7428f81873b2a0cdbea3499f065cb03..bdf1db7033f074fe0ab15f3785a5a5550772fa38 100644 (file)
@@ -28,7 +28,7 @@
 ;;; Code:
 
 (require 'cl-lib)
-(require 'seq) ; tab-line.el is not pre-loaded so it's safe to use it here
+(require 'seq)
 (require 'icons)
 
 \f