X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6afef3f6ca2f3009c722b84e249903b7f807b044..73d213f2816876fe9c6c429e75a3be5454a42b34:/lisp/filesets.el diff --git a/lisp/filesets.el b/lisp/filesets.el index 464c7c3eec..d5e79c0bd9 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -1,6 +1,6 @@ -;;; filesets.el --- handle group of files -*- coding: utf-8 -*- +;;; filesets.el --- handle group of files -;; Copyright (C) 2002-2015 Free Software Foundation, Inc. +;; Copyright (C) 2002-2016 Free Software Foundation, Inc. ;; Author: Thomas Link ;; Maintainer: emacs-devel@gnu.org @@ -140,7 +140,7 @@ put \"(setq filesets-menu-ensure-use-cached VALUE)\" into your startup file -- before loading filesets.el. So, when should you think about setting this value to t? If filesets.el -is loaded before user customizations. Thus, if (require 'filesets) +is loaded before user customizations. Thus, if (require \\='filesets) precedes the `custom-set-variables' command or, for XEmacs, if init.el is loaded before custom.el, set this variable to t.") @@ -415,10 +415,10 @@ at the last position. Possible uses: If you don't want to save `filesets-data' in your normal configuration file, you can add a something like this - \(lambda () - \(insert (format \"(setq-default filesets-data \\='%S)\" + (lambda () + (insert (format \"(setq-default filesets-data \\='%S)\" filesets-data)) - \(newline 2)) + (newline 2)) to this hook. @@ -550,14 +550,14 @@ will be recursively added to the menu. `filesets-tree-max-level' tells up to which level the directory structure should be scanned/listed, i.e. how deep the menu should be. Try something like - \(\"HOME -- only one level\" - \(:tree \"~\" \"^[^.].*[^~]$\") - \(:tree-max-level 1) - \(:filter-dirs-flag t)) - \(\"HOME -- up to 3 levels\" - \(:tree \"~\" \"^[^.].*[^~]$\") - \(:tree-max-level 3) - \(:filter-dirs-flag t)) + (\"HOME -- only one level\" + (:tree \"~\" \"^[^.].*[^~]$\") + (:tree-max-level 1) + (:filter-dirs-flag t)) + (\"HOME -- up to 3 levels\" + (:tree \"~\" \"^[^.].*[^~]$\") + (:tree-max-level 3) + (:filter-dirs-flag t)) and it should become clear what this option is about. In any case, including directory trees to the menu can take a lot of memory." @@ -679,20 +679,20 @@ variables my-ps-viewer, my-pdf-viewer, my-dvi-viewer, my-pic-viewer. In order to view pdf or rtf files in an Emacs buffer, you could use these: - \(\"^.+\\\\.pdf\\\\\\='\" \"pdftotext\" - \((:capture-output t) - \(:args (\"%S - | fmt -w \" window-width)) - \(:ignore-on-read-text t) - \(:constraintp (lambda () - \(and \(filesets-which-command-p \"pdftotext\") - \(filesets-which-command-p \"fmt\")))))) - \(\"^.+\\\\.rtf\\\\\\='\" \"rtf2htm\" - \((:capture-output t) - \(:args (\"%S 2> /dev/null | w3m -dump -T text/html\")) - \(:ignore-on-read-text t) - \(:constraintp (lambda () - \(and (filesets-which-command-p \"rtf2htm\") - \(filesets-which-command-p \"w3m\"))))))" + (\"^.+\\\\.pdf\\\\\\='\" \"pdftotext\" + ((:capture-output t) + (:args (\"%S - | fmt -w \" window-width)) + (:ignore-on-read-text t) + (:constraintp (lambda () + (and (filesets-which-command-p \"pdftotext\") + (filesets-which-command-p \"fmt\")))))) + (\"^.+\\\\.rtf\\\\\\='\" \"rtf2htm\" + ((:capture-output t) + (:args (\"%S 2> /dev/null | w3m -dump -T text/html\")) + (:ignore-on-read-text t) + (:constraintp (lambda () + (and (filesets-which-command-p \"rtf2htm\") + (filesets-which-command-p \"w3m\"))))))" :set (function filesets-set-default) :type '(repeat :tag "Viewer" (list :tag "Definition" @@ -756,7 +756,7 @@ In order to view pdf or rtf files in an Emacs buffer, you could use these: (defcustom filesets-ingroup-patterns '(("^.+\\.tex$" t (((:name "Package") - (:pattern "\\\\usepackage\\W*\\(\\[[^\]]*\\]\\W*\\)?{\\W*\\(.+\\)\\W*}") + (:pattern "\\\\usepackage\\W*\\(\\[[^]]*\\]\\W*\\)?{\\W*\\(.+\\)\\W*}") (:match-number 2) (:stub-flag t) (:get-file-name (lambda (master file) @@ -951,18 +951,18 @@ variable will take effect after rebuilding the menu. Caveat: Fileset names have to be unique. Example definition: - \\='\(\(\"My Wiki\" - \(:ingroup \"~/Etc/My-Wiki/WikiContents\")) - \(\"My Homepage\" - \(:pattern \"~/public_html/\" \"^.+\\\\.html$\") - \(:open filesets-find-file)) - \(\"User Configuration\" - \(:files \"~/.xinitrc\" + \\='((\"My Wiki\" + (:ingroup \"~/Etc/My-Wiki/WikiContents\")) + (\"My Homepage\" + (:pattern \"~/public_html/\" \"^.+\\\\.html$\") + (:open filesets-find-file)) + (\"User Configuration\" + (:files \"~/.xinitrc\" \"~/.bashrc\" \"~/.bash_profile\")) - \(\"HOME\" - \(:tree \"~\" \"^[^.].*[^~]$\") - \(:filter-dirs-flag t))) + (\"HOME\" + (:tree \"~\" \"^[^.].*[^~]$\") + (:filter-dirs-flag t))) `filesets-data' is a list of (NAME-AS-STRING . DEFINITION), DEFINITION being an association list with the fields: @@ -2450,13 +2450,13 @@ and edit your startup file as shown below: 1. `filesets-data': Edit all :pattern filesets in your startup file and transform all entries as shown in this example: - \(\"Test\" (:pattern \"~/dir/^pattern$\")) - --> \(\"Test\" (:pattern \"~/dir/\" \"^pattern$\")) + (\"Test\" (:pattern \"~/dir/^pattern$\")) + --> (\"Test\" (:pattern \"~/dir/\" \"^pattern$\")) 2. `filesets-data': Change all occurrences of \":document\" to \":ingroup\": - \(\(\"Test\" \(:document \"~/dir/file\")) - --> \(\(\"Test\" \(:ingroup \"~/dir/file\")) + ((\"Test\" (:document \"~/dir/file\")) + --> ((\"Test\" (:ingroup \"~/dir/file\")) 3. `filesets-subdocument-patterns': If you already modified the variable previously called `filesets-subdocument-patterns', change its name to