From 78b3d0f7204777ac38a8027283aea1503b01d024 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 Apr 2002 01:59:00 +0000 Subject: [PATCH] (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. --- lisp/ChangeLog | 8 ++++++ lisp/filesets.el | 63 +++++++++++++++++------------------------------- 2 files changed, 30 insertions(+), 41 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7022e5be7db..3e0221b182f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-04-29 Richard M. Stallman + + * filesets.el (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. + 2002-04-29 Colin Walters * ibuf-ext.el (ibuffer-kill-filter-group): Call `delete' function. diff --git a/lisp/filesets.el b/lisp/filesets.el index a53f2c68389..00d9e0b6272 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -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 @@ defined in `filesets-ingroup-patterns'." :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) + (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))) - -;(defun filesets-not-yet-implemented (feature) -; (message "Filestats: `%s' is not yet implemented." feature)) + (defun filesets-error (class &rest args) + "`error' wrapper." + (error (mapconcat 'identity args " "))) + + ;; 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 @@ not be opened." (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 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." (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 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." 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 @@ FS is a fileset's name. FLIST is a list returned by "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 -- 2.39.5