Index: contentswitch.el =================================================================== RCS file: /home/tzz/cvsroot/emacs/contentswitch.el,v retrieving revision 1.1 retrieving revision 1.3 diff -r1.1 -r1.3 59c59,63 < (defvar contentswitch-context-bias (if (featurep 'saveplace) 100) --- > (defgroup contentswitch nil > "The contentswitch package." > :version "22.1") > > (defcustom contentswitch-context-bias (if (featurep 'saveplace) 100) 78,86c82,96 < information this feature useless.") < < (defvar contentswitch-enable-name-matches t < "If t then the query string is also tested on buffer and file < names for possible matches.") < < (defvar contentswitch-jump-to-match-location nil < "If t then the after switching to the file point is put to the < location where the match was found.") --- > information this feature useless." > :group 'contentswitch > :type '(radio (const :format "LRU order " nil) > (const :format "Distance from point" t) > (integer :format "Maximum non-unique matches: %v"))) > > (defcustom contentswitch-enable-name-matches t > "Match the query string against the buffer and file name as well." > :group 'contentswitch > :type 'boolean) > > (defcustom contentswitch-jump-to-match-location nil > "After switching, put point at match." > :group 'contentswitch > :type 'boolean) 88c98 < (defvar contentswitch-file-history-variable --- > (defcustom contentswitch-file-history-variable 100,124c110,160 < restored when Emacs is restarted.") < < (defvar contentswitch-ignore nil < "List of regexps for excluding buffer and files from the results.") < < (defvar contentswitch-max-files-from-history 30 < "Do not show more matches from file history than this limit.") < < (defvar contentswitch-file-completion-delay 0.3 < "Delay before showing completions from file history.") < < (defvar contentswitch-max-name-length 25 < "Width of the name column in the result list.") < < (defvar contentswitch-before-context-length 10 < "Number of characters from context shown before the actual match.") < < (defvar contentswitch-selection-face 'highlight < "Face for selection.") < < (defvar contentswitch-context-face 'header-line < "Face for match context.") < < (defvar contentswitch-match-face 'lazy-highlight < "Face for match.") --- > restored when Emacs is restarted." > :group 'contentswitch > :type '(choice :tag "File history" > (const :tag "recentf" recentf-list) > (const :tag "file name history" file-name-history) > (const :tag "Empty" nil))) > > (defcustom contentswitch-ignore '(remote) > "Options for excluding buffer and files from the results." > :group 'contentswitch > :type > '(repeat (choice :tag "Ignore these" > (regexp :tag "Regular expression") > (const :tag "Remote filenames" remote) > (const :tag "Encrypted files" encrypted) > (const :tag "Hidden buffers" hidden-buffer)))) > > (defcustom contentswitch-max-files-from-history 30 > "Do not show more matches from file history than this limit." > :group 'contentswitch > :type 'integer) > > (defcustom contentswitch-file-completion-delay 0.3 > "Delay before showing completions from file history." > :group 'contentswitch > :type 'float) > > (defcustom contentswitch-max-name-length 25 > "Width of the name column in the result list." > :group 'contentswitch > :type 'integer) > > (defcustom contentswitch-before-context-length 10 > "Number of characters from context shown before the actual match." > :group 'contentswitch > :type 'integer) > > (defcustom contentswitch-selection-face 'highlight > "Face for selection." > :group 'contentswitch > :type 'face) > > (defcustom contentswitch-context-face 'header-line > "Face for match context." > :group 'contentswitch > :type 'face) > > (defcustom contentswitch-match-face 'lazy-highlight > "Face for match." > :group 'contentswitch > :type 'face) 254a291,308 > (defun contentswitch-ignore-p (item) > (let ((name (if (bufferp item) > (buffer-name item) > item))) > (or > (and (member 'remote contentswitch-ignore) > (file-remote-p name)) > (and (member 'encrypted contentswitch-ignore) > (featurep 'epa-file) > (string-match epa-file-name-regexp name)) > (and (member 'hidden-buffer contentswitch-ignore) > (bufferp item) > (string-match "^ " name)) > (some (lambda (regex) > (and (stringp regex) > (string-match regex name))) > contentswitch-ignore)))) > 283,286c337 < (some (lambda (regex) < (string-match < regex (buffer-name buffer))) < contentswitch-ignore) --- > (contentswitch-ignore-p buffer) 306,308c357 < (some (lambda (regex) < (string-match regex file)) < contentswitch-ignore)) --- > (contentswitch-ignore-p file))