]> git.eshelyaron.com Git - emacs.git/commitdiff
Document use of uniquify-buffer-name-style as a function.
authorJimmy Aguilar Mena <spacibba@aol.com>
Tue, 15 Sep 2020 11:19:13 +0000 (13:19 +0200)
committerJimmy Aguilar Mena <spacibba@aol.com>
Tue, 15 Sep 2020 14:12:54 +0000 (16:12 +0200)
doc/emacs/buffers.texi
etc/NEWS

index 89ed470c05565fcb2ffedefff68a1bd677b58894..537c653608512b5a04633f8cb229039c3478b99a 100644 (file)
@@ -697,6 +697,17 @@ forward order after the file name, as in @samp{file|top/middle}.  If
 @code{uniquify-buffer-name-style} is set to @code{nil}, the buffer
 names simply get @samp{<2>}, @samp{<3>}, etc.@: appended.
 
+  The value of @code{uniquify-buffer-name-style} can be set to a
+customized function with two arguments @var{base} and
+@var{extra-strings} where @var{base} is a string and
+@var{extra-strings} is a list of strings.  For example the current
+implementation for @code{post-forward-angle-brackets} could be:
+
+@example
+(defun my-post-forward-angle-brackets (base extra-string)
+  (concat base \"<\" (mapconcat #'identity extra-string \"/\") \">\"))
+@end example
+
   Which rule to follow for putting the directory names in the buffer
 name is not very important if you are going to @emph{look} at the
 buffer names before you type one.  But as an experienced user, if you
index 4076630bf22c275c5c5663d8c3e0005a01cec217..2928fd9d97022c47f33e33bfe46fb7c49e7241a9 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1425,6 +1425,12 @@ truncating precision field, such as "%.2a".
 This can be used to parse RGB color specs in several formats and
 convert them to a list '(R G B)' of primary color values.
 
+---
+** Variable 'uniquify-buffer-name-style' can now be a function.
+This variable can be one of the predefined styles or a function to
+personalize the uniquified buffer name.
+
+
 \f
 * Changes in Emacs 28.1 on Non-Free Operating Systems