Mercurial > emacs
changeset 91788:14206a515e37
(clone-indirect-buffer-hook): New hook.
(clone-indirect-buffer): Run it.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 12 Feb 2008 02:25:10 +0000 |
parents | 457a4ba95667 |
children | 0048d198c131 |
files | etc/NEWS lisp/ChangeLog lisp/simple.el |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/NEWS Tue Feb 12 01:24:20 2008 +0000 +++ b/etc/NEWS Tue Feb 12 02:25:10 2008 +0000 @@ -482,6 +482,7 @@ * Lisp Changes in Emacs 23.1 +** clone-indirect-buffer now runs the clone-indirect-buffer-hook. ** `beginning-of-defun-function' now takes one argument, the count given to `beginning-of-defun'.
--- a/lisp/ChangeLog Tue Feb 12 01:24:20 2008 +0000 +++ b/lisp/ChangeLog Tue Feb 12 02:25:10 2008 +0000 @@ -1,3 +1,8 @@ +2008-02-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * simple.el (clone-indirect-buffer-hook): New hook. + (clone-indirect-buffer): Run it. + 2008-02-11 Daiki Ueno <ueno@unixuser.org> * epa.el (epa-menu-mode): Merge into epa-mode. @@ -5,8 +10,8 @@ "Encryption/Decryption". * epa-dired.el: Define a new minor-mode epa-dired-mode for dired. - (epa-dired-mode-map): Renamed from epa-dired-map. - (epa-global-dired-mode): Renamed the global minor mode. + (epa-dired-mode-map): Rename from epa-dired-map. + (epa-global-dired-mode): Rename the global minor mode. 2008-02-11 Drew Adams <drew.adams@oracle.com>
--- a/lisp/simple.el Tue Feb 12 01:24:20 2008 +0000 +++ b/lisp/simple.el Tue Feb 12 02:25:10 2008 +0000 @@ -5547,6 +5547,9 @@ (defvar clone-buffer-hook nil "Normal hook to run in the new buffer at the end of `clone-buffer'.") +(defvar clone-indirect-buffer-hook nil + "Normal hook to run in the new buffer at the end of `clone-indirect-buffer'.") + (defun clone-process (process &optional newname) "Create a twin copy of PROCESS. If NEWNAME is nil, it defaults to PROCESS' name; @@ -5692,6 +5695,8 @@ (setq newname (substring newname 0 (match-beginning 0)))) (let* ((name (generate-new-buffer-name newname)) (buffer (make-indirect-buffer (current-buffer) name t))) + (with-current-buffer buffer + (run-hooks 'clone-indirect-buffer-hook)) (when display-flag (pop-to-buffer buffer norecord)) buffer))