]> 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 fb67487f32b388d5ce2b4502fb39983513b626c0..3619d499419fd413b3ab8e33bd84928d69aed4f8 100644 (file)
@@ -1,7 +1,6 @@
-;;; 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, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1995-1997, 2001-2012 Free Software Foundation, Inc.
 
 ;; Author: Dick King <king@reasoning.com>
 ;; Maintainer: FSF
@@ -84,7 +83,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;;; User-visible variables
 
@@ -175,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)))
@@ -341,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