aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-05-05 01:55:25 +0000
committerRichard M. Stallman2002-05-05 01:55:25 +0000
commitcd56bfef62f8999e62e666773b7d8c40413090c3 (patch)
tree5db72f309c9685f42f2972b3d7bcbd70893b2ea8
parentdbfd87a1ebee15fdb73042f54c377cd05bd4d2fd (diff)
downloademacs-cd56bfef62f8999e62e666773b7d8c40413090c3.tar.gz
emacs-cd56bfef62f8999e62e666773b7d8c40413090c3.zip
(filesets-browse-dir-function): Renamed from ...-fn.
(filesets-open-file-function, filesets-save-buffer-function): Likewise. (filesets-tree-max-level): Doc fix. (filesets-commands, filesets-external-viewers) (filesets-ingroup-patterns): Mark as risky. (filesets-cache-hostname-flag): Doc fix. (filesets-menu-cache-file): Doc fix. Mark as risky. (filesets-menu-before, filesets-menu-path, filesets-menu-in-menu): Don't defcustom them if running in Emacs.
-rw-r--r--lisp/filesets.el78
1 files changed, 42 insertions, 36 deletions
diff --git a/lisp/filesets.el b/lisp/filesets.el
index 0195d70d64c..9654512b82c 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -262,26 +262,27 @@ COND-FN takes one argument: the current element."
262 :type 'sexp 262 :type 'sexp
263 :group 'filesets) 263 :group 'filesets)
264 264
265(defcustom filesets-menu-path nil 265(when filesets-running-xemacs
266 "*The menu under which the filesets menu should be inserted. 266 (defcustom filesets-menu-path nil
267 "*The menu under which the filesets menu should be inserted.
267XEmacs specific; see `add-submenu' for documentation." 268XEmacs specific; see `add-submenu' for documentation."
268 :set (function filesets-set-default) 269 :set (function filesets-set-default)
269 :type 'sexp 270 :type 'sexp
270 :group 'filesets) 271 :group 'filesets)
271 272
272(defcustom filesets-menu-before "File" 273 (defcustom filesets-menu-before "File"
273 "*The name of a menu before which this menu should be added. 274 "*The name of a menu before which this menu should be added.
274XEmacs specific; see `add-submenu' for documentation." 275XEmacs specific; see `add-submenu' for documentation."
275 :set (function filesets-set-default) 276 :set (function filesets-set-default)
276 :type 'sexp 277 :type 'sexp
277 :group 'filesets) 278 :group 'filesets)
278 279
279(defcustom filesets-menu-in-menu nil 280 (defcustom filesets-menu-in-menu nil
280 "*Use that instead of `current-menubar' as the menu to change. 281 "*Use that instead of `current-menubar' as the menu to change.
281XEmacs specific; see `add-submenu' for documentation." 282XEmacs specific; see `add-submenu' for documentation."
282 :set (function filesets-set-default) 283 :set (function filesets-set-default)
283 :type 'sexp 284 :type 'sexp
284 :group 'filesets) 285 :group 'filesets))
285 286
286(defcustom filesets-menu-shortcuts-flag t 287(defcustom filesets-menu-shortcuts-flag t
287 "*Non-nil means to prepend menus with hopefully unique shortcuts." 288 "*Non-nil means to prepend menus with hopefully unique shortcuts."
@@ -305,12 +306,13 @@ XEmacs specific; see `add-submenu' for documentation."
305 (if filesets-running-xemacs 306 (if filesets-running-xemacs
306 "~/.xemacs/filesets-cache.el" 307 "~/.xemacs/filesets-cache.el"
307 "~/.filesets-cache.el") 308 "~/.filesets-cache.el")
308 "*File to be used for saving the filesets menu between (X)Emacs 309 "*File to be used for saving the filesets menu between sessions.
309sessions. Set this to \"\", to disable caching of menus. 310Set this to \"\", to disable caching of menus.
310Don't forget to check out `filesets-menu-ensure-use-cached'." 311Don't forget to check out `filesets-menu-ensure-use-cached'."
311 :set (function filesets-set-default) 312 :set (function filesets-set-default)
312 :type 'file 313 :type 'file
313 :group 'filesets) 314 :group 'filesets)
315(put 'filesets-menu-cache-file 'risky-local-variable t)
314 316
315(defcustom filesets-menu-cache-contents 317(defcustom filesets-menu-cache-contents
316 '(filesets-be-docile-flag 318 '(filesets-be-docile-flag
@@ -378,8 +380,9 @@ Don't forget to check out `filesets-menu-ensure-use-cached'."
378 :group 'filesets) 380 :group 'filesets)
379 381
380(defcustom filesets-cache-hostname-flag nil 382(defcustom filesets-cache-hostname-flag nil
381 "*Non-nil means cache the hostname. If the current name differs from 383 "*Non-nil means cache the hostname.
382the cached one, rebuild the menu and create a new cache file." 384If the current name differs from the cached one,
385rebuild the menu and create a new cache file."
383 :set (function filesets-set-default) 386 :set (function filesets-set-default)
384 :type 'boolean 387 :type 'boolean
385 :group 'filesets) 388 :group 'filesets)
@@ -407,7 +410,7 @@ will not be rewrapped if their length exceeds this value."
407 :type 'integer 410 :type 'integer
408 :group 'filesets) 411 :group 'filesets)
409 412
410(defcustom filesets-browse-dir-fn 'dired 413(defcustom filesets-browse-dir-function 'dired
411 "*A function or command used for browsing directories. 414 "*A function or command used for browsing directories.
412When using an external command, \"%s\" will be replaced with the 415When using an external command, \"%s\" will be replaced with the
413directory's name. 416directory's name.
@@ -425,7 +428,7 @@ Note: You have to manually rebuild the menu if you change this value."
425 :value nil)) 428 :value nil))
426 :group 'filesets) 429 :group 'filesets)
427 430
428(defcustom filesets-open-file-fn 'filesets-find-or-display-file 431(defcustom filesets-open-file-function 'filesets-find-or-display-file
429 "*The function used for opening files. 432 "*The function used for opening files.
430 433
431`filesets-find-or-display-file' ... Filesets' default function for 434`filesets-find-or-display-file' ... Filesets' default function for
@@ -448,7 +451,7 @@ Caveat: Changes will take effect only after rebuilding the menu."
448 :value nil)) 451 :value nil))
449 :group 'filesets) 452 :group 'filesets)
450 453
451(defcustom filesets-save-buffer-fn 'save-buffer 454(defcustom filesets-save-buffer-function 'save-buffer
452 "*The function used to save a buffer. 455 "*The function used to save a buffer.
453Caveat: Changes will take effect after rebuilding the menu." 456Caveat: Changes will take effect after rebuilding the menu."
454 :set (function filesets-set-default) 457 :set (function filesets-set-default)
@@ -495,7 +498,7 @@ computer environments."
495(defcustom filesets-tree-max-level 3 498(defcustom filesets-tree-max-level 3
496 "*Maximum scan depth for directory trees. 499 "*Maximum scan depth for directory trees.
497A :tree fileset is defined by a base directory the contents of which 500A :tree fileset is defined by a base directory the contents of which
498will be recursively added to the menu. filesets-tree-max-level tells up 501will be recursively added to the menu. `filesets-tree-max-level' tells up
499to which level the directory structure should be scanned/listed, 502to which level the directory structure should be scanned/listed,
500i.e. how deep the menu should be. Try something like 503i.e. how deep the menu should be. Try something like
501 504
@@ -551,6 +554,7 @@ the filename."
551 (function :tag "Function" 554 (function :tag "Function"
552 :value nil))))) 555 :value nil)))))
553 :group 'filesets) 556 :group 'filesets)
557(put 'filesets-commands 'risky-local-variable t)
554 558
555(defcustom filesets-external-viewers 559(defcustom filesets-external-viewers
556 (let 560 (let
@@ -694,7 +698,7 @@ In order to view pdf or rtf files in an Emacs buffer, you could use these:
694 :value :capture-output) 698 :value :capture-output)
695 (boolean :tag "Boolean")))))) 699 (boolean :tag "Boolean"))))))
696 :group 'filesets) 700 :group 'filesets)
697 701(put 'filesets-external-viewers 'risky-local-variable t)
698 702
699(defcustom filesets-ingroup-patterns 703(defcustom filesets-ingroup-patterns
700 '(("^.+\\.tex$" t 704 '(("^.+\\.tex$" t
@@ -882,6 +886,7 @@ With duplicates removed, it would be:
882 (const :format "" :value :preprocess) 886 (const :format "" :value :preprocess)
883 (function :tag "Function"))))))) 887 (function :tag "Function")))))))
884 :group 'filesets) 888 :group 'filesets)
889(put 'filesets-ingroup-patterns 'risky-local-variable t)
885 890
886(defcustom filesets-data 891(defcustom filesets-data
887 nil 892 nil
@@ -945,7 +950,7 @@ optional.
945 950
946In conjunction with the :tree tag, :save is void. :open refers to the 951In conjunction with the :tree tag, :save is void. :open refers to the
947function used for opening files in a directory, not for opening the 952function used for opening files in a directory, not for opening the
948directory. For browsing directories, `filesets-browse-dir-fn' is used. 953directory. For browsing directories, `filesets-browse-dir-function' is used.
949 954
950Before using :ingroup, make sure that the file type is already 955Before using :ingroup, make sure that the file type is already
951defined in `filesets-ingroup-patterns'." 956defined in `filesets-ingroup-patterns'."
@@ -1007,6 +1012,7 @@ defined in `filesets-ingroup-patterns'."
1007 :value (:open) 1012 :value (:open)
1008 (const :format "" :value :open) 1013 (const :format "" :value :open)
1009 (function :tag "Function"))))))) 1014 (function :tag "Function")))))))
1015(put 'filesets-data 'risky-local-variable t)
1010 1016
1011 1017
1012(defcustom filesets-query-user-limit 15 1018(defcustom filesets-query-user-limit 15
@@ -1345,19 +1351,19 @@ not be opened."
1345 (filesets-find-or-display-file nil (cadr (assoc viewer lst)))))) 1351 (filesets-find-or-display-file nil (cadr (assoc viewer lst))))))
1346 1352
1347(defun filesets-browser-name () 1353(defun filesets-browser-name ()
1348 "Get the directory browser's name as defined in `filesets-browse-dir-fn'." 1354 "Get the directory browser's name as defined in `filesets-browse-dir-function'."
1349 (cond 1355 (cond
1350 ((listp filesets-browse-dir-fn) 1356 ((listp filesets-browse-dir-function)
1351 (car filesets-browse-dir-fn)) 1357 (car filesets-browse-dir-function))
1352 (t 1358 (t
1353 filesets-browse-dir-fn))) 1359 filesets-browse-dir-function)))
1354 1360
1355(defun filesets-browse-dir (dir) 1361(defun filesets-browse-dir (dir)
1356 "Browse DIR using `filesets-browse-dir-fn'." 1362 "Browse DIR using `filesets-browse-dir-function'."
1357 (if (functionp filesets-browse-dir-fn) 1363 (if (functionp filesets-browse-dir-function)
1358 (funcall filesets-browse-dir-fn dir) 1364 (funcall filesets-browse-dir-function dir)
1359 (let ((name (car filesets-browse-dir-fn)) 1365 (let ((name (car filesets-browse-dir-function))
1360 (args (format (cadr filesets-browse-dir-fn) (expand-file-name dir)))) 1366 (args (format (cadr filesets-browse-dir-function) (expand-file-name dir))))
1361 (with-temp-buffer 1367 (with-temp-buffer
1362 (start-process (concat "Filesets:" name) 1368 (start-process (concat "Filesets:" name)
1363 "*Filesets external directory browser*" 1369 "*Filesets external directory browser*"
@@ -1418,14 +1424,14 @@ See `filesets-data'."
1418Use FILESET-ENTRY for finding the open function, if provided." 1424Use FILESET-ENTRY for finding the open function, if provided."
1419 (filesets-data-get (or fileset-entry 1425 (filesets-data-get (or fileset-entry
1420 (filesets-get-fileset-from-name fileset-name)) 1426 (filesets-get-fileset-from-name fileset-name))
1421 ':open filesets-open-file-fn t)) 1427 ':open filesets-open-file-function t))
1422 1428
1423(defun filesets-entry-get-save-fn (fileset-name &optional fileset-entry) 1429(defun filesets-entry-get-save-fn (fileset-name &optional fileset-entry)
1424 "Get the save-function for FILESET-NAME. 1430 "Get the save-function for FILESET-NAME.
1425Use FILESET-ENTRY for finding the save function, if provided." 1431Use FILESET-ENTRY for finding the save function, if provided."
1426 (filesets-data-get (or fileset-entry 1432 (filesets-data-get (or fileset-entry
1427 (filesets-get-fileset-from-name fileset-name)) 1433 (filesets-get-fileset-from-name fileset-name))
1428 ':save filesets-save-buffer-fn t)) 1434 ':save filesets-save-buffer-function t))
1429 1435
1430(defun filesets-entry-get-files (entry) 1436(defun filesets-entry-get-files (entry)
1431 "Get the file list for fileset ENTRY." 1437 "Get the file list for fileset ENTRY."