diff options
| author | Richard M. Stallman | 2002-04-30 01:59:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-04-30 01:59:00 +0000 |
| commit | 78b3d0f7204777ac38a8027283aea1503b01d024 (patch) | |
| tree | d706ff60d8972f2bb18d36b9ca26d1da40eb0370 | |
| parent | 38eea7c76fab12adf2754fa109ead0d7c2ace04e (diff) | |
| download | emacs-78b3d0f7204777ac38a8027283aea1503b01d024.tar.gz emacs-78b3d0f7204777ac38a8027283aea1503b01d024.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2002-04-29 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * filesets.el (filesets-running-xemacs): Make defvar unconditional. | ||
| 4 | (filesets-ingroup-files): Renamed from filesets-ingroup-paths. | ||
| 5 | (filesets-error): Simplify definition and make conditional | ||
| 6 | on filesets-running-xemacs. | ||
| 7 | (filesets-find-file-using): Renamed from fsfind-file-using. | ||
| 8 | |||
| 1 | 2002-04-29 Colin Walters <walters@verbum.org> | 9 | 2002-04-29 Colin Walters <walters@verbum.org> |
| 2 | 10 | ||
| 3 | * ibuf-ext.el (ibuffer-kill-filter-group): Call `delete' function. | 11 | * 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 @@ | |||
| 84 | 84 | ||
| 85 | ;;; Some variables | 85 | ;;; Some variables |
| 86 | (eval-and-compile | 86 | (eval-and-compile |
| 87 | (unless (boundp 'filesets-running-xemacs) | 87 | (defvar filesets-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version) |
| 88 | (defvar filesets-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version) | 88 | "Non-nil means we are running XEmacs.")) |
| 89 | "Non-nil means we are running XEmacs."))) | ||
| 90 | 89 | ||
| 91 | (defvar filesets-menu-cache nil | 90 | (defvar filesets-menu-cache nil |
| 92 | "The whole filesets menu.") | 91 | "The whole filesets menu.") |
| @@ -97,9 +96,8 @@ | |||
| 97 | 96 | ||
| 98 | (defvar filesets-ingroup-cache nil | 97 | (defvar filesets-ingroup-cache nil |
| 99 | "A plist containing files and their ingroup data.") | 98 | "A plist containing files and their ingroup data.") |
| 100 | (defvar filesets-ingroup-paths nil | 99 | (defvar filesets-ingroup-files nil |
| 101 | "A temporary list of path already processed when searching for | 100 | "List of files already processed when searching for included files.") |
| 102 | included files.") | ||
| 103 | 101 | ||
| 104 | (defvar filesets-has-changed-flag t | 102 | (defvar filesets-has-changed-flag t |
| 105 | "Non-nil means some fileset definition has changed.") | 103 | "Non-nil means some fileset definition has changed.") |
| @@ -1018,43 +1016,26 @@ defined in `filesets-ingroup-patterns'." | |||
| 1018 | :group 'filesets) | 1016 | :group 'filesets) |
| 1019 | 1017 | ||
| 1020 | 1018 | ||
| 1021 | (defun filesets-error (class &rest args) | ||
| 1022 | "`error' wrapper." | ||
| 1023 | (error (apply 'concat | ||
| 1024 | (mapcar (lambda (x) (format "%s " x)) | ||
| 1025 | args)))) | ||
| 1026 | |||
| 1027 | ;;; Emacs compatibility | 1019 | ;;; Emacs compatibility |
| 1028 | (eval-and-compile | 1020 | (eval-and-compile |
| 1029 | (if filesets-running-xemacs | 1021 | (if filesets-running-xemacs |
| 1030 | (progn | 1022 | (progn |
| 1023 | (fset 'filesets-error 'error) | ||
| 1031 | (fset 'filesets-add-submenu 'add-submenu)) | 1024 | (fset 'filesets-add-submenu 'add-submenu)) |
| 1032 | |||
| 1033 | (progn | ||
| 1034 | 1025 | ||
| 1035 | (require 'easymenu) | 1026 | (require 'easymenu) |
| 1036 | 1027 | ||
| 1037 | ;; This should work for 21.1 Emacs | 1028 | (defun filesets-error (class &rest args) |
| 1038 | (defun filesets-add-submenu (menu-path submenu &optional | 1029 | "`error' wrapper." |
| 1039 | before in-menu) | 1030 | (error (mapconcat 'identity args " "))) |
| 1040 | "`easy-menu-define' wrapper." | 1031 | |
| 1041 | (easy-menu-define | 1032 | ;; This should work for 21.1 Emacs |
| 1042 | filesets-submenu global-map "Filesets menu" submenu)) | 1033 | (defun filesets-add-submenu (menu-path submenu &optional |
| 1043 | ))) | 1034 | before in-menu) |
| 1044 | 1035 | "`easy-menu-define' wrapper." | |
| 1045 | ;;; helper | 1036 | (easy-menu-define |
| 1046 | ;(defmacro filesets-testing (feature messagep &rest body) | 1037 | filesets-submenu global-map "Filesets menu" submenu)) |
| 1047 | ; (cond | 1038 | )) |
| 1048 | ; ((equal filesets-version "testing") | ||
| 1049 | ; `(progn ,@body)) | ||
| 1050 | ; (messagep | ||
| 1051 | ; (message "Filestats: feature `%s' is disabled." feature) | ||
| 1052 | ; nil) | ||
| 1053 | ; (t | ||
| 1054 | ; nil))) | ||
| 1055 | |||
| 1056 | ;(defun filesets-not-yet-implemented (feature) | ||
| 1057 | ; (message "Filestats: `%s' is not yet implemented." feature)) | ||
| 1058 | 1039 | ||
| 1059 | (defun filesets-filter-dir-names (lst &optional negative) | 1040 | (defun filesets-filter-dir-names (lst &optional negative) |
| 1060 | "Remove non-directory names from a list of strings. If NEGATIVE is | 1041 | "Remove non-directory names from a list of strings. If NEGATIVE is |
| @@ -1352,7 +1333,7 @@ not be opened." | |||
| 1352 | (filesets-spawn-external-viewer file external-viewer-def) | 1333 | (filesets-spawn-external-viewer file external-viewer-def) |
| 1353 | (filesets-find-file file)))) | 1334 | (filesets-find-file file)))) |
| 1354 | 1335 | ||
| 1355 | (defun fsfind-file-using () | 1336 | (defun filesets-find-file-using () |
| 1356 | "Select a viewer and call `filesets-find-or-display-file'." | 1337 | "Select a viewer and call `filesets-find-or-display-file'." |
| 1357 | (interactive) | 1338 | (interactive) |
| 1358 | (let* ((lst (mapcar (lambda (this) | 1339 | (let* ((lst (mapcar (lambda (this) |
| @@ -2040,7 +2021,7 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." | |||
| 2040 | (not (member f flist)) | 2021 | (not (member f flist)) |
| 2041 | (or (not remdupl-flag) | 2022 | (or (not remdupl-flag) |
| 2042 | (not (member* | 2023 | (not (member* |
| 2043 | f filesets-ingroup-paths | 2024 | f filesets-ingroup-files |
| 2044 | :test 'filesets-files-equalp)))) | 2025 | :test 'filesets-files-equalp)))) |
| 2045 | (let ((no-stub-flag | 2026 | (let ((no-stub-flag |
| 2046 | (and (not this-stub-flag) | 2027 | (and (not this-stub-flag) |
| @@ -2049,8 +2030,8 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." | |||
| 2049 | t)))) | 2030 | t)))) |
| 2050 | (setq count (+ count 1)) | 2031 | (setq count (+ count 1)) |
| 2051 | (setq flist (cons f flist)) | 2032 | (setq flist (cons f flist)) |
| 2052 | (setq filesets-ingroup-paths | 2033 | (setq filesets-ingroup-files |
| 2053 | (cons f filesets-ingroup-paths)) | 2034 | (cons f filesets-ingroup-files)) |
| 2054 | (when no-stub-flag | 2035 | (when no-stub-flag |
| 2055 | (filesets-ingroup-cache-put master f)) | 2036 | (filesets-ingroup-cache-put master f)) |
| 2056 | (setq lst (append lst (list f)))))))) | 2037 | (setq lst (append lst (list f)))))))) |
| @@ -2121,7 +2102,7 @@ FS is a fileset's name. FLIST is a list returned by | |||
| 2121 | "Build a :ingroup submenu for file MASTER." | 2102 | "Build a :ingroup submenu for file MASTER." |
| 2122 | (if (file-readable-p master) | 2103 | (if (file-readable-p master) |
| 2123 | (let ((remdupl-flag (filesets-ingroup-get-remdupl-p master))) | 2104 | (let ((remdupl-flag (filesets-ingroup-get-remdupl-p master))) |
| 2124 | (setq filesets-ingroup-paths (list master)) | 2105 | (setq filesets-ingroup-files (list master)) |
| 2125 | (filesets-ingroup-collect lookup-name remdupl-flag master)) | 2106 | (filesets-ingroup-collect lookup-name remdupl-flag master)) |
| 2126 | (if filesets-be-docile-flag | 2107 | (if filesets-be-docile-flag |
| 2127 | (progn | 2108 | (progn |