1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

62 Commits

Author SHA1 Message Date
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Thien-Thi Nguyen
aaef169dc6 Update years in copyright notice; nfc. 2006-02-06 15:23:23 +00:00
Thien-Thi Nguyen
0d30b33766 Update years in copyright notice; nfc. 2005-08-06 22:13:43 +00:00
Lute Kamstra
086add1519 Update FSF's address. 2005-07-04 23:32:44 +00:00
Juanma Barranquero
0c4eeda3b5 (uniquify): Finish `defgroup' description with period. 2005-07-04 02:36:52 +00:00
Juanma Barranquero
f530778210 Specify missing group (and type, if simple) in defcustom. 2005-05-19 19:06:19 +00:00
Stefan Monnier
9890ec7d19 (uniquify-rationalize-file-buffer-names): Fix corner case when renaming
to the same name.
2005-01-05 21:49:02 +00:00
Stefan Monnier
2eec3e8edf (uniquify-rationalize-file-buffer-names): Re-add an interactive spec. 2005-01-05 21:20:38 +00:00
Richard M. Stallman
e7e7e16883 (uniquify-rationalize-file-buffer-names): Delete interactive spec. 2004-12-27 16:38:06 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Stefan Monnier
dee9b44fb6 (uniquify-after-kill-buffer-p): Set default to t.
(uniquify-ignore-buffers-re): Revert to nil now that uniquify
is more careful about preserving buffer names.
2003-05-13 19:15:19 +00:00
Stefan Monnier
1c4001a1df (uniquify-rationalize-file-buffer-names): Thinko. 2003-05-10 22:46:10 +00:00
Stefan Monnier
aa74499543 (uniquify-rationalize-file-buffer-names):
Refresh the dirname in the case that rename-buffer was skipped.
(uniquify-buffer-file-name): Return a dirname with no trailing slash.
2003-05-10 18:16:19 +00:00
Stefan Monnier
75e2fcb63a Use the original buffer-name as `base' in place of the
nondirectory part of the file name.
(uniquify-rationalize-file-buffer-names):
Split the `newbuffile' arg into `base' and `dirname'.
Reuse old uniquify-items to avoid recomputing their base&dirname.
(uniquify-buffer-file-name): Only return the directory part.
(uniquify-rerationalize-w/o-cb): Don't bother reseting proposed names.
(rename-buffer): Use the `newname' arg as base.
(create-file-buffer): Split the file name into base and dirname.
2003-05-09 13:21:05 +00:00
Stefan Monnier
c3c140d6f3 (uniquify-after-kill-buffer-p): Fix misleading docstring.
(uniquify-make-item): Make `proposed' optional.
(uniquify-rationalize-file-buffer-names): Don't compute the
initial proposed name.
(uniquify-buffer-file-name): Remove dead code.
(uniquify-strip-common-suffix): New var.
(uniquify-rationalize): Always recompute initial proposed name.
Strip common suffix if requested.
2003-05-08 19:39:32 +00:00
Stefan Monnier
ad599c1193 (uniquify-rationalize-file-buffer-names):
Don't uniquify if there is no filename.
2003-05-07 21:56:43 +00:00
Stefan Monnier
518e35e6d1 (uniquify-rationalize): New fun. Store the fix-list in uniquify-managed.
(uniquify-rationalize-file-buffer-names): Use it and make the args
non-optional (i.e. don't support "re-rationalize all" any more).
(uniquify-rerationalize-w/o-cb): New fun.
(uniquify-maybe-rerationalize-w/o-cb): Use it to rerationalize
immediately and only the relevant buffers.
Merged from uniquify-delay-rationalize-file-buffer-names and
uniquify-delayed-rationalize-file-buffer-names.
(kill-buffer-hook, rename-buffer): Use it.
2003-05-07 16:03:14 +00:00
Stefan Monnier
bf0e40d484 (uniquify-item, uniquify-get-proposed-name)
(uniquify-rationalize-conflicting-sublist): Rename filename -> dirname.
2003-05-07 15:53:08 +00:00
Stefan Monnier
6b09e9c8da (uniquify-managed): New var.
(uniquify-rationalize-file-buffer-names, rename-buffer): Use it and set
it to prevent accidental renaming of unrelated buffers.
(uniquify-delay-rationalize-file-buffer-names): Use it to avoid
the cost of uniquify when killing unrelated buffers.
2003-05-06 14:29:39 +00:00
Stefan Monnier
54547ff5bf (uniquify-buffer-name-style, uniquify-after-kill-buffer-p)
(uniquify-ask-about-buffer-names-p, uniquify-ignore-buffers-re)
(uniquify-min-dir-content, uniquify-separator, uniquify-trailing-separator-p):
Remove redundant group specification.
(uniquify-file-name-nondirectory): Delete.
(uniquify-rationalize-file-buffer-names): Simplify.
Use directory names as `filename' component of uniquify-item.
(uniquify-get-proposed-name): Adjust now that `filename' does not
include `base'.
2003-05-05 16:55:38 +00:00
Stefan Monnier
df05087018 Move provide to end of file.
(uniquify-ref-base, uniquify-ref-filename, uniquify-ref-buffer)
(uniquify-ref-proposed, uniquify-set-proposed): Remove.
(uniquify-item): New struct.  Update users of uniquify-ref-*.
(uniquify-get-proposed-name, uniquify-rationalize-a-list):
Make `depth' optional.
(uniquify-non-file-buffer-names): Remove.
(uniquify-rationalize-file-buffer-names): Don't set it up.
Use uniquify-make-item and don't pass the now-optional depth.
(uniquify-rationalize-conflicting-sublist): Check the new buffer
name directly instead of relying on uniquify-non-file-buffer-names.
(uniquify-rename-buffer): Use with-current-buffer and pass
the `unique' arg to rename-buffer.
2003-05-04 21:30:25 +00:00
Richard M. Stallman
1f9d00ca8a (uniquify-ignore-buffers-re): Change default to match some Gnus buffers. 2003-05-03 13:51:00 +00:00
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