X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/380874900ca183ec2fdce91949d841328852d7a8..758c81e87ded2bad9f5a5a6683fb498965eb508c:/lisp/find-lisp.el diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el index c7527fe21f..bfe35c0109 100644 --- a/lisp/find-lisp.el +++ b/lisp/find-lisp.el @@ -3,17 +3,15 @@ ;; Author: Peter Breton ;; Created: Fri Mar 26 1999 ;; Keywords: unix -;; Time-stamp: <2006-02-06 13:40:10 ttn> -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -21,9 +19,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; @@ -96,7 +92,7 @@ PARENT is the parent directory of DIR." (string= dir "..") ;; Skip directories which are symlinks ;; Easy way to circumvent recursive loops - (file-symlink-p dir)))) + (file-symlink-p (expand-file-name dir parent))))) (defun find-lisp-default-file-predicate (file dir) "True if FILE matches `find-lisp-regexp'. @@ -196,7 +192,6 @@ It is a function which takes two arguments, the directory and its parent." directory-predicate buffer-name) "Run find (Lisp version) and go into Dired mode on a buffer of the output." (let ((dired-buffers dired-buffers) - buf (regexp find-lisp-regexp)) ;; Expand DIR ("" means default-directory), and make sure it has a ;; trailing slash. @@ -207,7 +202,7 @@ It is a function which takes two arguments, the directory and its parent." (or (and (buffer-name) (string= buffer-name (buffer-name))) - (switch-to-buffer (setq buf (get-buffer-create buffer-name)))) + (switch-to-buffer (get-buffer-create buffer-name))) (widen) (kill-all-local-variables) (setq buffer-read-only nil) @@ -227,7 +222,7 @@ It is a function which takes two arguments, the directory and its parent." (make-local-variable 'revert-buffer-function) (setq revert-buffer-function (function - (lambda(ignore1 ignore2) + (lambda (_ignore1 _ignore2) (find-lisp-insert-directory default-directory find-lisp-file-predicate @@ -250,10 +245,10 @@ It is a function which takes two arguments, the directory and its parent." (goto-char (point-min)) (dired-goto-next-file))) -(defun find-lisp-insert-directory (dir - file-predicate - directory-predicate - sort-function) +(defun find-lisp-insert-directory (dir + file-predicate + directory-predicate + _sort-function) "Insert the results of `find-lisp-find-files' in the current buffer." (let ((buffer-read-only nil) (files (find-lisp-find-files-internal @@ -271,9 +266,9 @@ It is a function which takes two arguments, the directory and its parent." ;; No analog for find-lisp? (insert find-lisp-line-indent "\n") ;; Run the find function - (mapcar + (mapc (function - (lambda(file) + (lambda (file) (find-lisp-find-dired-insert-file (substring file len) (current-buffer)))) @@ -359,9 +354,4 @@ It is a function which takes two arguments, the directory and its parent." (provide 'find-lisp) -;; Local Variables: -;; autocompile: t -;; End: - -;;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a ;;; find-lisp.el ends here