changeset 63409:457c6356af08

(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.
author Lute Kamstra <lute@gnu.org>
date Tue, 14 Jun 2005 12:02:42 +0000
parents feca8cc40862
children 37dd5dc2f5ae
files lisp/recentf.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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))))