1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

40 Commits

Author SHA1 Message Date
Stefan Monnier
8b374c3fd7 (uniquify-rationalize-file-buffer-names, rename-buffer)
(uniquify-delay-rationalize-file-buffer-names, kill-buffer-hook):
Undo 2002/09/27 change, because kill-buffer-hook is not permanent-local.
2002-12-13 19:52:35 +00:00
Richard M. Stallman
5da10d404b (uniquify-get-proposed-name): Don't use directory-sep-char. 2002-10-14 01:28:36 +00:00
Stefan Monnier
124e448b98 (uniquify-rationalize-file-buffer-names):
Add to kill-buffer-hook for buffers with conflict.
(rename-buffer): Check kill-buffer-hook to see if there was a conflict.
(uniquify-delay-rationalize-file-buffer-names): Remove useless check.
(kill-buffer-hook): Don't change globally.
2002-09-27 17:37:47 +00:00
Stefan Monnier
1a4914f340 Use find-file-hook instead of find-file-hooks. 2002-08-15 00:48:20 +00:00
Stefan Monnier
2ff96ab3e7 (uniquify-delay-rationalize-file-buffer-names):
Rename from delay-uniquify-rationalize-file-buffer-names.
Only rationalize if the buffer is under uniquify control.
(uniquify-delayed-rationalize-file-buffer-names):
Rename from delayed-uniquify-rationalize-file-buffer-names.
2002-06-27 15:35:48 +00:00
Stefan Monnier
de856d998f (uniquify-rationalize-file-buffer-names):
Always strip the trailing / even if the file is not a directory.
2002-05-19 02:11:24 +00:00
Stefan Monnier
e07777e6d6 (uniquify-get-proposed-name): Fix (.. "usr" "/usr" 0). 2001-10-23 22:01:17 +00:00
Gerd Moellmann
1c549bbe56 (uniquify-get-proposed-name): Don't assume dirsep is /.
(uniquify-reverse-components): Remove.
2001-10-05 09:27:29 +00:00
Eli Zaretskii
feeb94f7cc Update Stephen Gildea's mail address. 2001-09-23 17:48:31 +00:00
Gerd Moellmann
284b3043c0 Add Keywords header. 2001-09-04 12:54:14 +00:00
Francesco Potortì
1f68710d1d Oops. A typo. 2001-08-02 11:40:26 +00:00
Francesco Potortì
4126f5b78b Code cleanup, speed and consing improvements for uniquify.el.
(uniquify-ref-base, uniquify-ref-filename)
(uniquify-ref-buffer, uniquify-ref-proposed): New functions.
(uniquify-fix-item-base, uniquify-fix-item-filename)
(uniquify-fix-item-buffer, uniquify-fix-item-proposed): Deleted.
Callers changed.
(uniquify-set-proposed): Changed to work with a vector item.
(uniquify-rationalize-file-buffer-names): Use a list of arrays for
the fix list, and a list of strings for the non-file buffer
names.  Both changes reduce consing.
(uniquify-rationalize-a-list): Local variable renaming.
(uniquify-rationalize-conflicting-sublist): Use member instead of
assoc.
(uniquify-rename-buffer): Use unless instead of if not.
2001-08-02 11:30:25 +00:00
Francesco Potortì
57749acfbd These changes correct a corner case that the old code managed correctly.
Precisely when you have a buffer visiting a file in the root directory
and then revert it to a file with the same name in a different
directory.

(uniquify-fix-item-proposed): Renamed from
uniquify-fix-item-min-proposed.
(uniquify-set-proposed): New function.
(uniquify-rationalize-file-buffer-names): Code reshuffled for
clarity and speed.
(uniquify-item-greaterp): Substitutes uniquify-item-lessp.  This
is equivalent to what the old code did.
(uniquify-rationalize-a-list): Never recompute the proposed
name.  Sort the conflicting sublist before rationalising it: this
is equivalent to what the old code did, but one directory element
at a time, and only when necessary.
(uniquify-rationalize-conflicting-sublist): Recompute here the
proposed name.
2001-08-01 19:07:33 +00:00
Francesco Potortì
7ca0c5bc00 (uniquify-rationalize-file-buffer-names): Reshuffled the code for
clarity and speed (maybe).
2001-08-01 14:39:56 +00:00
Francesco Potortì
d06a07057a (uniquify-rationalize-file-buffer-names): Add an
explicit test for " **lose**" buffers generated by
find-alternate-file to avoid an error in particular conditions.
2001-08-01 14:10:44 +00:00
Francesco Potortì
b2f1b8489b Overall speedup when using many buffers.
(uniquify-fix-item-base, uniquify-fix-item-filename,
uniquify-fix-item-buffer): Changed defmacro to defalias (cosmetic change).
(uniquify-fix-item-unrationalized-buffer): Deleted: was the fourth
place in the item, but waas never used.
(uniquify-fix-item-min-proposed): New defalias: the fourth place
in the item is now used as cache for the proposed name.
(uniquify-rationalize-file-buffer-names): Move computation made on
newbuffile out of the loop, in the newbuffile-nd local var.  Use
dolist (cosmetic change).  Compute the proposed name for the most
common case and cache it in the fourth place in the item.
(uniquify-rationalize-file-buffer-names): Used to return a list
of flags indicating renamed buffers, but that return value was
never used.
(uniquify-item-lessp): Replaces uniquify-filename-lessp, works on
the cached proposed name, does much less consing and is quicker.
(uniquify-filename-lessp): Deleted.
(uniquify-rationalize-a-list): Use dolist (cosmetic change).  Do
not bind locally the uniquify-possibly-resolvable flag.  Use the
cached proposed name if possible.
(uniquify-get-proposed-name): Arguments changed, callers changed.
(uniquify-rationalize-conflicting-sublist): Explicitely reset the
uniquify-possibly-resolvable flag, which is no more bound locally.
(uniquify-rename-buffer): Do not set the unrationalised-buffer
flag, which is replaced by the cached proposed name.
2001-07-24 10:39:09 +00:00
Francesco Potortì
def83929f3 (uniquify-rationalize-file-buffer-names): Undo previous change. 2001-06-27 17:48:40 +00:00
Francesco Potortì
45a21f7551 (uniquify-rationalize-file-buffer-names): Do a preliminary quick
reordering.  Can speed things up dramatically.
2001-06-27 15:56:51 +00:00
Gerd Moellmann
2ad0276732 Set maintainer to FSF. 2001-03-07 10:19:33 +00:00
Richard M. Stallman
595ded7377 (uniquify-buffer-name-style): Doc fix. 2001-02-17 13:33:11 +00:00
Stefan Monnier
f4eda05fe5 (uniquify-list-buffers-directory-modes): New var.
(uniquify-buffer-file-name): Use it.
2000-11-21 20:42:39 +00:00
Gerd Moellmann
b878827d99 (toplevel): Require CL at compile time.
(uniquify-push): Removed.
2000-02-12 19:48:01 +00:00
Gerd Moellmann
b8517c22c1 Use new backquote syntax. 1999-11-14 12:07:12 +00:00
Richard M. Stallman
3c7c4868bd (uniquify-ignore-buffers-re): Fix custom type. 1998-07-24 20:13:08 +00:00
Richard M. Stallman
9a9c6f9f44 (uniquify-ignore-buffers-re): New variable.
(uniquify-rationalize-file-buffer-names): Implement it.
1998-05-19 05:07:48 +00:00
Karl Heuer
a5bec26c83 (uniquify-buffer-name-style): Add :require. 1997-10-16 00:04:22 +00:00
Richard M. Stallman
18ed17e43b Use uniquify-file-name-nondirectory throughout; documentation tweaks. 1997-09-09 07:08:58 +00:00
Richard M. Stallman
4ddd2beb67 Rename uniquify-fix-list-* to uniquify-fix-item-*.
All callers changed.

(uniquify-rationalize-file-buffer-names):
Use directory-file-name for directories (eliminate trailing slash).
Call uniquify-fix-item-unrationalized-buffer.
(uniquify-buffer-file-name): Use directory-file-name.
(uniquify-fix-item-unrationalized-buffer): New function.
(uniquify-unrationalized-buffer): Function deleted.
1997-09-07 06:17:29 +00:00
Richard M. Stallman
f152949dc8 Comment change. 1997-09-05 03:51:07 +00:00
Richard M. Stallman
cf66807ecd (delay-uniquify-rationalize-file-buffer-names):
Don't delete this function from kill-buffer-hook, if it is disabled.
1997-08-04 03:42:58 +00:00
Richard M. Stallman
4f5074c108 (uniquify-buffer-name-style): Fix typo. 1997-07-30 19:29:13 +00:00
Richard M. Stallman
8a2d940690 (uniquify-buffer-file-name): Minor change. 1997-07-20 03:46:24 +00:00
Richard M. Stallman
4219b27be4 (delay-uniquify-rationalize-file-buffer-names): Remove this hook here,
if we won't call delayed-uniquify-rationalize-file-buffer-names.
(uniquify-buffer-name-style): Default value is nil.
1997-06-21 23:59:11 +00:00
Richard M. Stallman
c5292bc831 Add defgroup's; use defcustom for user vars. 1997-04-12 08:35:41 +00:00
Karl Heuer
bc2e0aaed9 (uniquify-buffer-file-name): Don't call
expand-file-name on nil.  Check whether list-buffers-directory is
bound.  Ignore non-file non-dired buffers.
1997-03-11 22:42:37 +00:00
Karl Heuer
5246db4e1f Several doc fixes. 1996-01-24 23:32:14 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Karl Heuer
04f3a6563a (uniquify-rationalize-file-buffer-names): If
newbuffile is nil, don't call expand-file-name on it.
1996-01-08 22:41:40 +00:00
Richard M. Stallman
d7993a1c99 (uniquify-fix-list-filename-lessp): Renamed from uniquify-filename-sort. 1995-12-25 18:45:37 +00:00
Karl Heuer
4c61f92c4e Initial revision 1995-12-21 18:13:58 +00:00