;;; Commentary:
;; Emacs's standard method for making buffer names unique adds <2>, <3>,
-;; etc. to the end of (all but one of) the buffers. This file replaces
+;; etc.. to the end of (all but one of) the buffers. This file replaces
;; that behavior, for buffers visiting files and dired buffers, with a
;; uniquification that adds parts of the file name until the buffer names
;; are unique. For instance, buffers visiting /u/mernst/tmp/Makefile and
(defcustom uniquify-buffer-name-style nil
- "*If non-nil, buffer names are uniquified with parts of directory name.
+ "If non-nil, buffer names are uniquified with parts of directory name.
The value determines the buffer name style and is one of `forward',
`reverse', `post-forward', or `post-forward-angle-brackets'.
For example, files `/foo/bar/mumble/name' and `/baz/quux/mumble/name'
reverse name\\mumble\\bar name\\mumble\\quux
post-forward name|bar/mumble name|quux/mumble
post-forward-angle-brackets name<bar/mumble> name<quux/mumble>
- nil name name<2>"
+ nil name name<2>
+Of course, the \"mumble\" part may be stripped as well, depending on the setting
+of `uniquify-strip-common-suffix'."
:type '(radio (const forward)
(const reverse)
(const post-forward)
:group 'uniquify)
(defcustom uniquify-ask-about-buffer-names-p nil
- "*If non-nil, permit user to choose names for buffers with same base file.
+ "If non-nil, permit user to choose names for buffers with same base file.
If the user chooses to name a buffer, uniquification is preempted and no
other buffer names are changed."
:type 'boolean
;; The default value matches certain Gnus buffers.
(defcustom uniquify-ignore-buffers-re nil
- "*Regular expression matching buffer names that should not be uniquified.
+ "Regular expression matching buffer names that should not be uniquified.
For instance, set this to \"^draft-[0-9]+$\" to avoid having uniquify rename
draft buffers even if `uniquify-after-kill-buffer-p' is non-nil and the
visited file name isn't the same as that of the buffer."
:group 'uniquify)
(defcustom uniquify-min-dir-content 0
- "*Minimum number of directory name components included in buffer name."
+ "Minimum number of directory name components included in buffer name."
:type 'integer
:group 'uniquify)
(defcustom uniquify-separator nil
- "*String separator for buffer name components.
+ "String separator for buffer name components.
When `uniquify-buffer-name-style' is `post-forward', separates
base file name from directory part in buffer names (default \"|\").
When `uniquify-buffer-name-style' is `reverse', separates all
:group 'uniquify)
(defcustom uniquify-trailing-separator-p nil
- "*If non-nil, add a file name separator to dired buffer names.
+ "If non-nil, add a file name separator to dired buffer names.
If `uniquify-buffer-name-style' is `forward', add the separator at the end;
if it is `reverse', add the separator at the beginning; otherwise, this
variable is ignored."
(directory-file-name filename))))))))
(defun uniquify-rerationalize-w/o-cb (fix-list)
- "Re-rationalize the buffers in FIX-LIST, but ignoring current-buffer."
+ "Re-rationalize the buffers in FIX-LIST, but ignoring `current-buffer'."
(let ((new-fix-list nil))
(dolist (item fix-list)
(let ((buf (uniquify-item-buffer item)))