aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2007-10-30 23:28:12 +0000
committerMiles Bader2007-10-30 23:28:12 +0000
commitba69b876ac836a88877dab99e6fc2352dd36c855 (patch)
treeea26f4dfdee15465752767ec150b509aae48f52e
parent904fac674eb51808091bed8f7c608745e0dfc0b8 (diff)
parent93c5a976a01b25f96bb135086d8fcd3a869b3fb9 (diff)
downloademacs-ba69b876ac836a88877dab99e6fc2352dd36c855.tar.gz
emacs-ba69b876ac836a88877dab99e6fc2352dd36c855.zip
Merge from emacs--rel--22
Patches applied: * emacs--rel--22 (patch 138-139) - Update from CVS Revision: emacs@sv.gnu.org/emacs--devo--0--patch-914
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/desktop.el8
-rw-r--r--lisp/uniquify.el12
3 files changed, 17 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e5ace8aae86..8b10517db2e 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-30 Stefan Monnier <monnier@iro.umontreal.ca> 92007-10-30 Stefan Monnier <monnier@iro.umontreal.ca>
2 10
3 * doc-view.el: Use expand-file-name rather than concat. 11 * doc-view.el: Use expand-file-name rather than concat.
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 040688492a4..4707904b28b 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
@@ -654,7 +656,9 @@ is nil, ask the user where to save the desktop."
654 (list 656 (list
655 ;; basic information 657 ;; basic information
656 (desktop-file-name (buffer-file-name) desktop-dirname) 658 (desktop-file-name (buffer-file-name) desktop-dirname)
657 (buffer-name) 659 (if (bound-and-true-p uniquify-managed)
660 (uniquify-item-base (car uniquify-managed))
661 (buffer-name))
658 major-mode 662 major-mode
659 ;; minor modes 663 ;; minor modes
660 (let (ret) 664 (let (ret)
@@ -1150,7 +1154,7 @@ directory DIRNAME."
1150 (setq desktop-first-buffer result)) 1154 (setq desktop-first-buffer result))
1151 (set-buffer result) 1155 (set-buffer result)
1152 (unless (equal (buffer-name) desktop-buffer-name) 1156 (unless (equal (buffer-name) desktop-buffer-name)
1153 (rename-buffer desktop-buffer-name)) 1157 (rename-buffer desktop-buffer-name t))
1154 ;; minor modes 1158 ;; minor modes
1155 (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible 1159 (cond ((equal '(t) desktop-buffer-minor-modes) ; backwards compatible
1156 (auto-fill-mode 1)) 1160 (auto-fill-mode 1))
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index 8226c65cbb9..254832ed700 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -460,15 +460,9 @@ in `uniquify-list-buffers-directory-modes', otherwise returns nil."
460 460
461;; Buffer deletion 461;; Buffer deletion
462;; Rerationalize after a buffer is killed, to reduce coinciding buffer names. 462;; Rerationalize after a buffer is killed, to reduce coinciding buffer names.
463;; This mechanism uses `kill-buffer-hook', which runs *before* deletion. 463;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so
464;; That means that the kill-buffer-hook function cannot just delete the 464;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list
465;; buffer -- it has to set something to do the rationalization *later*. 465;; ignoring the current buffer (which is going to be deleted anyway).
466;; It actually puts another function on `post-command-hook'. This other
467;; function runs the rationalization and then removes itself from the hook.
468;; Is there a better way to accomplish this?
469;; (This ought to set some global variables so the work is done only for
470;; buffers with names similar to the deleted buffer. -MDE)
471
472(defun uniquify-maybe-rerationalize-w/o-cb () 466(defun uniquify-maybe-rerationalize-w/o-cb ()
473 "Re-rationalize buffer names, ignoring current buffer. 467 "Re-rationalize buffer names, ignoring current buffer.
474For use on `kill-buffer-hook'." 468For use on `kill-buffer-hook'."