]> code.delx.au - gnu-emacs/blobdiff - lisp/uniquify.el
* progmodes/python.el: Explain how to restore "cc-mode"-like
[gnu-emacs] / lisp / uniquify.el
index 3153e143ba3c8625c033801f50300635a4e3266c..3340f1962ded2a074478764ad73f21265046a899 100644 (file)
@@ -1,6 +1,7 @@
 ;;; uniquify.el --- unique buffer names dependent on file name -*- lexical-binding: t -*-
 
-;; Copyright (C) 1989, 1995-1997, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1995-1997, 2001-2013 Free Software Foundation,
+;; Inc.
 
 ;; Author: Dick King <king@reasoning.com>
 ;; Maintainer: FSF
@@ -83,7 +84,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
 ;;; User-visible variables
 
@@ -174,7 +175,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 +341,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