changeset 45012:161015ebadc0

(filesets-running-xemacs): Make defvar unconditional. (filesets-ingroup-files): Renamed from filesets-ingroup-paths. (filesets-error): Simplify definition and make conditional on filesets-running-xemacs. (filesets-find-file-using): Renamed from fsfind-file-using.
author Richard M. Stallman <rms@gnu.org>
date Tue, 30 Apr 2002 01:58:43 +0000
parents 2e2beba30184
children 564222cd2e88
files lisp/filesets.el
diffstat 1 files changed, 22 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/filesets.el	Tue Apr 30 01:56:23 2002 +0000
+++ b/lisp/filesets.el	Tue Apr 30 01:58:43 2002 +0000
@@ -84,9 +84,8 @@
 
 ;;; Some variables
 (eval-and-compile
-  (unless (boundp 'filesets-running-xemacs)
-    (defvar filesets-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)
-      "Non-nil means we are running XEmacs.")))
+  (defvar filesets-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)
+    "Non-nil means we are running XEmacs."))
 
 (defvar filesets-menu-cache nil
   "The whole filesets menu.")
@@ -97,9 +96,8 @@
 
 (defvar filesets-ingroup-cache nil
   "A plist containing files and their ingroup data.")
-(defvar filesets-ingroup-paths nil
-  "A temporary list of path already processed when searching for
-included files.")
+(defvar filesets-ingroup-files nil
+  "List of files already processed when searching for included files.")
 
 (defvar filesets-has-changed-flag t
   "Non-nil means some fileset definition has changed.")
@@ -1018,43 +1016,26 @@
   :group 'filesets)
 
 
-(defun filesets-error (class &rest args)
-  "`error' wrapper."
-  (error (apply 'concat
-		(mapcar (lambda (x) (format "%s " x))
-			args))))
-
 ;;; Emacs compatibility
 (eval-and-compile
   (if filesets-running-xemacs
       (progn
+	(fset 'filesets-error 'error)
 	(fset 'filesets-add-submenu 'add-submenu))
-    
-    (progn
-
-      (require 'easymenu)
-      
-      ;; This should work for 21.1 Emacs
-      (defun filesets-add-submenu (menu-path submenu &optional
-					     before in-menu)
-	"`easy-menu-define' wrapper."
-	(easy-menu-define
-	  filesets-submenu global-map "Filesets menu" submenu))
-      )))
 
-;;; helper
-;(defmacro filesets-testing (feature messagep &rest body)
-;  (cond
-;   ((equal filesets-version "testing")
-;    `(progn ,@body))
-;   (messagep
-;    (message "Filestats: feature `%s' is disabled." feature)
-;    nil)
-;   (t
-;    nil)))
+    (require 'easymenu)
+      
+    (defun filesets-error (class &rest args)
+      "`error' wrapper."
+      (error (mapconcat 'identity args " ")))
 
-;(defun filesets-not-yet-implemented (feature)
-;  (message "Filestats: `%s' is not yet implemented." feature))
+    ;; This should work for 21.1 Emacs
+    (defun filesets-add-submenu (menu-path submenu &optional
+					   before in-menu)
+      "`easy-menu-define' wrapper."
+      (easy-menu-define
+	filesets-submenu global-map "Filesets menu" submenu))
+    ))
 
 (defun filesets-filter-dir-names (lst &optional negative)
   "Remove non-directory names from a list of strings. If NEGATIVE is
@@ -1352,7 +1333,7 @@
 	(filesets-spawn-external-viewer file external-viewer-def)
       (filesets-find-file file))))
 
-(defun fsfind-file-using ()
+(defun filesets-find-file-using ()
   "Select a viewer and call `filesets-find-or-display-file'."
   (interactive)
   (let* ((lst (mapcar (lambda (this)
@@ -2040,7 +2021,7 @@
 				 (not (member f flist))
 				 (or (not remdupl-flag)
 				     (not (member*
-					   f filesets-ingroup-paths
+					   f filesets-ingroup-files
 					   :test 'filesets-files-equalp))))
 			(let ((no-stub-flag
 			       (and (not this-stub-flag)
@@ -2049,8 +2030,8 @@
 				      t))))
 			  (setq count (+ count 1))
 			  (setq flist (cons f flist))
-			  (setq filesets-ingroup-paths
-				(cons f filesets-ingroup-paths))
+			  (setq filesets-ingroup-files
+				(cons f filesets-ingroup-files))
 			  (when no-stub-flag
 			    (filesets-ingroup-cache-put master f))
 			  (setq lst (append lst (list f))))))))
@@ -2121,7 +2102,7 @@
   "Build a :ingroup submenu for file MASTER."
   (if (file-readable-p master)
       (let ((remdupl-flag  (filesets-ingroup-get-remdupl-p master)))
-	(setq filesets-ingroup-paths (list master))
+	(setq filesets-ingroup-files (list master))
 	(filesets-ingroup-collect lookup-name remdupl-flag master))
     (if filesets-be-docile-flag
 	(progn