emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/uniquify-as-function 4409ef6 2/2: Document use of uniquify-buffe


From: Jimmy Aguilar Mena
Subject: feature/uniquify-as-function 4409ef6 2/2: Document use of uniquify-buffer-name-style as a function.
Date: Tue, 15 Sep 2020 07:28:41 -0400 (EDT)

branch: feature/uniquify-as-function
commit 4409ef6deade193058ad74f80c41eb72265645d0
Author: Jimmy Aguilar Mena <spacibba@aol.com>
Commit: Jimmy Aguilar Mena <spacibba@aol.com>

    Document use of uniquify-buffer-name-style as a function.
---
 doc/emacs/buffers.texi | 11 +++++++++++
 etc/NEWS               |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index 89ed470..aad9120 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -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 mandatory 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
diff --git a/etc/NEWS b/etc/NEWS
index 4076630..2928fd9 100644
--- 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.
+
+
 
 * Changes in Emacs 28.1 on Non-Free Operating Systems
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]