# HG changeset patch # User Lute Kamstra # Date 1118750562 0 # Node ID 457c6356af080e5327085c9e194ed49abfc1fb6d # Parent feca8cc408620f49911e5cdc541163b8f0cfbae1 (recentf-dialog-mode): Use kill-all-local-variables and run-mode-hooks. (recentf-edit-list, recentf-open-files): Don't call kill-all-local-variables directly. diff -r feca8cc40862 -r 457c6356af08 lisp/recentf.el --- a/lisp/recentf.el Tue Jun 14 12:00:50 2005 +0000 +++ b/lisp/recentf.el Tue Jun 14 12:02:42 2005 +0000 @@ -923,9 +923,11 @@ \\{recentf-dialog-mode-map}" (interactive) + (kill-all-local-variables) (setq major-mode 'recentf-dialog-mode) (setq mode-name "recentf-dialog") - (use-local-map recentf-dialog-mode-map)) + (use-local-map recentf-dialog-mode-map) + (run-mode-hooks 'recentf-dialog-mode-hook)) ;;; Hooks ;; @@ -1002,13 +1004,13 @@ (get-buffer-create (format "*%s - Edit list*" recentf-menu-title)) (switch-to-buffer (current-buffer)) ;; Cleanup buffer - (kill-all-local-variables) (let ((inhibit-read-only t) (ol (overlay-lists))) (erase-buffer) ;; Delete all the overlays. (mapc 'delete-overlay (car ol)) (mapc 'delete-overlay (cdr ol))) + (recentf-dialog-mode) (setq recentf-edit-selected-items nil) ;; Insert the dialog header (widget-insert @@ -1045,7 +1047,6 @@ 'push-button :notify 'recentf-cancel-dialog "Cancel") - (recentf-dialog-mode) (widget-setup) (goto-char (point-min)))) @@ -1101,13 +1102,13 @@ (with-current-buffer (get-buffer-create buffer-name) (switch-to-buffer (current-buffer)) ;; Cleanup buffer - (kill-all-local-variables) (let ((inhibit-read-only t) (ol (overlay-lists))) (erase-buffer) ;; Delete all the overlays. (mapc 'delete-overlay (car ol)) (mapc 'delete-overlay (cdr ol))) + (recentf-dialog-mode) ;; Insert the dialog header (widget-insert "Click on a file to open it. ") (widget-insert "Click on Cancel or type \"q\" to quit.\n\n" ) @@ -1123,7 +1124,6 @@ 'push-button :notify 'recentf-cancel-dialog "Cancel") - (recentf-dialog-mode) (widget-setup) (goto-char (point-min))))