]> code.delx.au - gnu-emacs/blobdiff - lisp/uniquify.el
* files.el (parse-colon-path): Return nil for empty path elements.
[gnu-emacs] / lisp / uniquify.el
index 27093042efe6cedf2c1329a840e2c3e6d4d3872d..3619d499419fd413b3ab8e33bd84928d69aed4f8 100644 (file)
@@ -1,12 +1,12 @@
-;;; uniquify.el --- unique buffer names dependent on file name
+;;; uniquify.el --- unique buffer names dependent on file name -*- lexical-binding: t -*-
 
-;; Copyright (C) 1989, 1995, 1996, 1997, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1995-1997, 2001-2012 Free Software Foundation, Inc.
 
 ;; Author: Dick King <king@reasoning.com>
 ;; Maintainer: FSF
 ;; Keywords: files
 ;; Created: 15 May 86
+;; Package: emacs
 
 ;; This file is part of GNU Emacs.
 
@@ -83,7 +83,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;;; User-visible variables
 
@@ -174,7 +174,7 @@ contains the name of the directory which the buffer is visiting.")
 ;;; Utilities
 
 ;; uniquify-fix-list data structure
-(defstruct (uniquify-item
+(cl-defstruct (uniquify-item
            (:constructor nil) (:copier nil)
            (:constructor uniquify-make-item
             (base dirname buffer &optional proposed)))
@@ -340,7 +340,7 @@ in `uniquify-list-buffers-directory-modes', otherwise returns nil."
 
 (defun uniquify-get-proposed-name (base dirname &optional depth)
   (unless depth (setq depth uniquify-min-dir-content))
-  (assert (equal (directory-file-name dirname) dirname))  ;No trailing slash.
+  (cl-assert (equal (directory-file-name dirname) dirname)) ;No trailing slash.
 
   ;; Distinguish directories by adding extra separator.
   (if (and uniquify-trailing-separator-p
@@ -507,5 +507,4 @@ For use on `kill-buffer-hook'."
 
 (provide 'uniquify)
 
-;; arch-tag: e763faa3-56c9-4903-8eb8-26e1c45a0065
 ;;; uniquify.el ends here