]> git.eshelyaron.com Git - emacs.git/commitdiff
(uniquify-managed): Pacify byte compiler.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 27 Oct 2007 17:11:45 +0000 (17:11 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 27 Oct 2007 17:11:45 +0000 (17:11 +0000)
(desktop-buffer-info): If the buffer name is managed by uniquify,
save the base name, not the uniquified one.
(desktop-create-buffer): Allow `rename-buffer' to generate a new
name in case of conflict.

lisp/ChangeLog
lisp/desktop.el

index b8bb5f4ed82092a6b11437ec201c07da7e0e622e..0f68b6cafbb61705268c1c69404d3eccc7cfc7af 100644 (file)
@@ -1,3 +1,11 @@
+2007-10-27  Juanma Barranquero  <lekktu@gmail.com>
+
+       * desktop.el (uniquify-managed): Pacify byte compiler.
+       (desktop-buffer-info): If the buffer name is managed by uniquify,
+       save the base name, not the uniquified one.
+       (desktop-create-buffer): Allow `rename-buffer' to generate a new
+       name in case of conflict.
+
 2007-10-26  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/bytecomp.el (byte-compile-warnings): Autoload the
index 0fa38ed3c91ccb294f990949975b2415917ecb5a..1530238ee1730206c6982a99f8769e39edf0fc95 100644 (file)
 
 ;;; Code:
 
+(defvar uniquify-managed)
+
 (defvar desktop-file-version "206"
   "Version number of desktop file format.
 Written into the desktop file and used at desktop read to provide
@@ -653,7 +655,9 @@ is nil, ask the user where to save the desktop."
   (list
    ;; basic information
    (desktop-file-name (buffer-file-name) desktop-dirname)
-   (buffer-name)
+   (if (bound-and-true-p uniquify-managed)
+       (uniquify-item-base (car uniquify-managed))
+     (buffer-name))
    major-mode
    ;; minor modes
    (let (ret)
@@ -1149,7 +1153,7 @@ directory DIRNAME."
           (setq desktop-first-buffer result))
         (set-buffer result)
         (unless (equal (buffer-name) desktop-buffer-name)
-          (rename-buffer desktop-buffer-name))
+          (rename-buffer desktop-buffer-name t))
         ;; minor modes
         (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible
                (auto-fill-mode 1))