(STOP_POLLING, RESUME_POLLING): New macros.
[bpt/emacs.git] / lisp / uniquify.el
CommitLineData
5246db4e 1;;; uniquify.el --- unique buffer names dependent on file name
4c61f92c 2
284b3043 3;; Copyright (c) 1989, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
4c61f92c
KH
4
5;; Author: Dick King <king@reasoning.com>
2ad02767 6;; Maintainer: FSF
284b3043 7;; Keywords: files
4c61f92c
KH
8;; Created: 15 May 86
9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 2, or (at your option)
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
b578f267
EN
23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25;; Boston, MA 02111-1307, USA.
4c61f92c
KH
26
27;;; Commentary:
28
29;; Emacs's standard method for making buffer names unique adds <2>, <3>,
30;; etc. to the end of (all but one of) the buffers. This file replaces
31;; that behavior, for buffers visiting files and dired buffers, with a
5246db4e 32;; uniquification that adds parts of the file name until the buffer names
4c61f92c
KH
33;; are unique. For instance, buffers visiting /u/mernst/tmp/Makefile and
34;; /usr/projects/zaphod/Makefile would be named Makefile|tmp and
35;; Makefile|zaphod, respectively (instead of Makefile and Makefile<2>).
36;; Other buffer name styles are also available.
37
4219b27b
RS
38;; To use this file, do (require 'uniquify)
39;; and set uniquify-buffer-name-style to one of its non-nil alternative values.
40
4c61f92c
KH
41;; For other options, see "User-visible variables", below.
42
d7993a1c
RS
43;; A version of uniquify.el that works under Emacs 18, Emacs 19, XEmacs,
44;; and InfoDock is available from the maintainer.
4c61f92c
KH
45
46;;; Change Log:
47
48;; Originally by Dick King <king@reasoning.com> 15 May 86
feeb94f7 49;; Converted for Emacs 18 by Stephen Gildea <gildea@stop.mail-abuse.org>
4c61f92c
KH
50;; Make uniquify-min-dir-content 0 truly non-invasive. gildea 23 May 89
51;; Some cleanup. uniquify-min-dir-content default 0. gildea 01 Jun 89
52;; Don't rename to "". Michael Ernst <mernst@theory.lcs.mit.edu> 15 Jun 94
53;; Add kill-buffer-hook. Kenneth Manheimer <ken.manheimer@nist.gov> 09 May 95
54;; Add advice for rename-buffer and create-file-buffer, handle dired buffers,
55;; kill-buffer-rationalize-buffer-names-p, documentation. mernst 24 May 95
56;; Remove free variables, fix typos. mernst 5 Jun 95
57;; Efficiently support Emacs 19.27 & earlier. ken.manheimer, mernst 10 Jun 95
58;; Rename user options to "uniquify-...", add uniquify-reverse-dir-content-p,
59;; add uniquify-ask-about-buffer-names-p. king, mernst 13 Jun 95
60;; Prefix functions by "uniquify-..."; rename mnemonic-buffer-names to
61;; uniquify-buffer-name-style; add 'forward and 'post-forward-angle-brackets
62;; styles; remove uniquify-reverse-dir-content-p; add
63;; uniquify-trailing-separator-p. mernst 4 Aug 95
bc2e0aae
KH
64;; Don't call expand-file-name on nil. mernst 7 Jan 96
65;; Check whether list-buffers-directory is bound. mernst 11 Oct 96
66;; Ignore non-file non-dired buffers. Colin Rafferty <craffert@ml.com> 3 Mar 97
4ddd2beb
RS
67;; Use last component, not "", for file name of directories. mernst 27 Jun 97
68;; Use directory-file-name; code cleanup. mernst 6 Sep 97
9a9c6f9f
RS
69;; Add uniquify-ignore-buffers-re.
70;; Andre Srinivasan <andre@visigenic.com> 9 Sep 97
f4eda05f
SM
71;; Add uniquify-list-buffers-directory-modes
72;; Stefan Monnier <monnier@cs.yale.edu> 17 Nov 2000
4126f5b7 73;; Algorithm and data structure changed to reduce consing with lots of buffers
b2f1b848 74