aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2007-10-27 17:11:45 +0000
committerJuanma Barranquero2007-10-27 17:11:45 +0000
commit93c5a976a01b25f96bb135086d8fcd3a869b3fb9 (patch)
tree082489b1214fa2538c921e6327eda51249e46267
parente4a0f843e28a6146739cf8bd8c768b4abb8f3c98 (diff)
downloademacs-93c5a976a01b25f96bb135086d8fcd3a869b3fb9.tar.gz
emacs-93c5a976a01b25f96bb135086d8fcd3a869b3fb9.zip
(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.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/desktop.el8
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b8bb5f4ed82..0f68b6cafbb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12007-10-27 Juanma Barranquero <lekktu@gmail.com>
2
3 * desktop.el (uniquify-managed): Pacify byte compiler.
4 (desktop-buffer-info): If the buffer name is managed by uniquify,
5 save the base name, not the uniquified one.
6 (desktop-create-buffer): Allow `rename-buffer' to generate a new
7 name in case of conflict.
8
12007-10-26 Glenn Morris <rgm@gnu.org> 92007-10-26 Glenn Morris <rgm@gnu.org>
2 10
3 * emacs-lisp/bytecomp.el (byte-compile-warnings): Autoload the 11 * 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 @@
135 135
136;;; Code: 136;;; Code:
137 137
138(defvar uniquify-managed)
139
138(defvar desktop-file-version "206" 140(defvar desktop-file-version "206"
139 "Version number of desktop file format. 141 "Version number of desktop file format.
140Written into the desktop file and used at desktop read to provide 142Written 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."
653 (list 655 (list
654 ;; basic information 656 ;; basic information
655 (desktop-file-name (buffer-file-name) desktop-dirname) 657 (desktop-file-name (buffer-file-name) desktop-dirname)
656 (buffer-name) 658 (if (bound-and-true-p uniquify-managed)
659 (uniquify-item-base (car uniquify-managed))
660 (buffer-name))
657 major-mode 661 major-mode
658 ;; minor modes 662 ;; minor modes
659 (let (ret) 663 (let (ret)
@@ -1149,7 +1153,7 @@ directory DIRNAME."
1149 (setq desktop-first-buffer result)) 1153 (setq desktop-first-buffer result))
1150 (set-buffer result) 1154 (set-buffer result)
1151 (unless (equal (buffer-name) desktop-buffer-name) 1155 (unless (equal (buffer-name) desktop-buffer-name)
1152 (rename-buffer desktop-buffer-name)) 1156 (rename-buffer desktop-buffer-name t))
1153 ;; minor modes 1157 ;; minor modes
1154 (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible 1158 (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible
1155 (auto-fill-mode 1)) 1159 (auto-fill-mode 1))