diff options
| author | Jimmy Aguilar Mena | 2020-09-15 13:19:13 +0200 |
|---|---|---|
| committer | Jimmy Aguilar Mena | 2020-09-15 13:19:13 +0200 |
| commit | 4409ef6deade193058ad74f80c41eb72265645d0 (patch) | |
| tree | 7d79481aa12256ae0ffcbce8f5bf5af2aa72da27 | |
| parent | 5a19bd834ef8d33716b65cbf2c0ca93b3aa9c618 (diff) | |
| download | emacs-4409ef6deade193058ad74f80c41eb72265645d0.tar.gz emacs-4409ef6deade193058ad74f80c41eb72265645d0.zip | |
Document use of uniquify-buffer-name-style as a function.feature/uniquify-as-function
| -rw-r--r-- | doc/emacs/buffers.texi | 11 | ||||
| -rw-r--r-- | etc/NEWS | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 89ed470c055..aad91207151 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 | |||
| 697 | @code{uniquify-buffer-name-style} is set to @code{nil}, the buffer | 697 | @code{uniquify-buffer-name-style} is set to @code{nil}, the buffer |
| 698 | names simply get @samp{<2>}, @samp{<3>}, etc.@: appended. | 698 | names simply get @samp{<2>}, @samp{<3>}, etc.@: appended. |
| 699 | 699 | ||
| 700 | The value of @code{uniquify-buffer-name-style} can be set to a | ||
| 701 | customized function with two mandatory arguments @var{base} and | ||
| 702 | @var{extra-strings} where @var{base} is a string and | ||
| 703 | @var{extra-strings} is a list of strings. For example the current | ||
| 704 | implementation for @code{post-forward-angle-brackets} could be: | ||
| 705 | |||
| 706 | @example | ||
| 707 | (defun my-post-forward-angle-brackets (base extra-string) | ||
| 708 | (concat base \"<\" (mapconcat 'identity extra-string \"/\") \">\")) | ||
| 709 | @end example | ||
| 710 | |||
| 700 | Which rule to follow for putting the directory names in the buffer | 711 | Which rule to follow for putting the directory names in the buffer |
| 701 | name is not very important if you are going to @emph{look} at the | 712 | name is not very important if you are going to @emph{look} at the |
| 702 | buffer names before you type one. But as an experienced user, if you | 713 | buffer names before you type one. But as an experienced user, if you |
| @@ -1425,6 +1425,12 @@ truncating precision field, such as "%.2a". | |||
| 1425 | This can be used to parse RGB color specs in several formats and | 1425 | This can be used to parse RGB color specs in several formats and |
| 1426 | convert them to a list '(R G B)' of primary color values. | 1426 | convert them to a list '(R G B)' of primary color values. |
| 1427 | 1427 | ||
| 1428 | --- | ||
| 1429 | ** Variable 'uniquify-buffer-name-style' can now be a function. | ||
| 1430 | This variable can be one of the predefined styles or a function to | ||
| 1431 | personalize the uniquified buffer name. | ||
| 1432 | |||
| 1433 | |||
| 1428 | 1434 | ||
| 1429 | * Changes in Emacs 28.1 on Non-Free Operating Systems | 1435 | * Changes in Emacs 28.1 on Non-Free Operating Systems |
| 1430 | 1436 | ||