diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2007-10-27 17:11:45 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2007-10-27 17:11:45 +0000 |
commit | 93c5a976a01b25f96bb135086d8fcd3a869b3fb9 (patch) | |
tree | 082489b1214fa2538c921e6327eda51249e46267 /lisp/desktop.el | |
parent | e4a0f843e28a6146739cf8bd8c768b4abb8f3c98 (diff) | |
download | emacs-93c5a976a01b25f96bb135086d8fcd3a869b3fb9.tar.gz |
(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.
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r-- | lisp/desktop.el | 8 |
1 files changed, 6 insertions, 2 deletions
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)) |