]> git.eshelyaron.com Git - emacs.git/commitdiff
(PC-expand-many-files): Apply completion-ignored-extensions.
authorKarl Heuer <kwzh@gnu.org>
Mon, 23 Mar 1998 00:29:43 +0000 (00:29 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 23 Mar 1998 00:29:43 +0000 (00:29 +0000)
lisp/complete.el

index 022e9aebafb6dccd3be998ab7b42701f18343754..e007f53e0de6b30f870cc4eb2fd0aba8c1ff3eff 100644 (file)
@@ -836,9 +836,23 @@ or properties are considered."
       (delete-backward-char 1)
       (insert "\")")
       (goto-char (point-min))
-      (let ((files (read (current-buffer))))
+      (let ((files (read (current-buffer))) (p nil))
        (kill-buffer (current-buffer))
-       files))))
+       (or (equal completion-ignored-extensions PC-ignored-extensions)
+           (setq PC-ignored-regexp
+                 (concat "\\("
+                         (mapconcat
+                          'regexp-quote
+                          (setq PC-ignored-extensions
+                                completion-ignored-extensions)
+                          "\\|")
+                         "\\)\\'")))
+       (setq p nil)
+       (while files
+         (or (string-match PC-ignored-regexp (car files))
+             (setq p (cons (car files) p)))
+         (setq files (cdr files)))
+       p))))
 
 ;;; Facilities for loading C header files.  This is independent from the
 ;;; main completion code.  See also the variable `PC-include-file-path'