The library uniquify overrides Emacs’ default mechanism for making buffer names unique (using suffixes like
<3> etc.) with a more sensible behaviour which use parts of the file names to make the buffer names distinguishable.
For instance, buffers visiting “/u/mernst/tmp/Makefile" and "/usr/projects/zaphod/Makefile” would be named “Makefile|tmp” and “Makefile|zaphod”, respectively (instead of “Makefile” and “Makefile<2>”). Other buffer name styles are also available. To enable this,
(require 'uniquify) then customize uniquify-buffer-name-style. (Run M-x customize-option)
Note that the uniquify functions provided with Emacs,
‘uniquify-rationalize-file-buffer-names’, deals with the problem of uniqueness of buffer names. It has nothing to do with the problem of removing identical adjacent lines in a given buffer. See DuplicateLines if you want a command which mimics the uniq utility found on Unix systems.