From: Juanma Barranquero Date: Sat, 27 Oct 2007 17:11:45 +0000 (+0000) Subject: (uniquify-managed): Pacify byte compiler. X-Git-Tag: emacs-pretest-22.1.90~496 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93c5a976a01b25f96bb135086d8fcd3a869b3fb9;p=emacs.git (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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8bb5f4ed82..0f68b6cafbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2007-10-27 Juanma Barranquero + + * 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 * emacs-lisp/bytecomp.el (byte-compile-warnings): Autoload the diff --git a/lisp/desktop.el b/lisp/desktop.el index 0fa38ed3c91..1530238ee17 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -135,6 +135,8 @@ ;;; 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))