Mercurial > emacs
changeset 85807:d93ce6f797f6
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
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 30 Oct 2007 23:28:12 +0000 |
parents | 2a9d361b3986 (current diff) 82fb16d03f6f (diff) |
children | 0fca3c9fc445 |
files | lisp/ChangeLog lisp/desktop.el lisp/uniquify.el |
diffstat | 3 files changed, 17 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Oct 30 23:27:59 2007 +0000 +++ b/lisp/ChangeLog Tue Oct 30 23:28:12 2007 +0000 @@ -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-30 Stefan Monnier <monnier@iro.umontreal.ca> * doc-view.el: Use expand-file-name rather than concat.
--- a/lisp/desktop.el Tue Oct 30 23:27:59 2007 +0000 +++ b/lisp/desktop.el Tue Oct 30 23:28:12 2007 +0000 @@ -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 @@ -654,7 +656,9 @@ (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) @@ -1150,7 +1154,7 @@ (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))
--- a/lisp/uniquify.el Tue Oct 30 23:27:59 2007 +0000 +++ b/lisp/uniquify.el Tue Oct 30 23:28:12 2007 +0000 @@ -460,15 +460,9 @@ ;; Buffer deletion ;; Rerationalize after a buffer is killed, to reduce coinciding buffer names. -;; This mechanism uses `kill-buffer-hook', which runs *before* deletion. -;; That means that the kill-buffer-hook function cannot just delete the -;; buffer -- it has to set something to do the rationalization *later*. -;; It actually puts another function on `post-command-hook'. This other -;; function runs the rationalization and then removes itself from the hook. -;; Is there a better way to accomplish this? -;; (This ought to set some global variables so the work is done only for -;; buffers with names similar to the deleted buffer. -MDE) - +;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so +;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list +;; ignoring the current buffer (which is going to be deleted anyway). (defun uniquify-maybe-rerationalize-w/o-cb () "Re-rationalize buffer names, ignoring current buffer. For use on `kill-buffer-hook'."