* lisp/recentf.el
@ 2005-06-13 12:12 Lute Kamstra
0 siblings, 0 replies; 4+ messages in thread
From: Lute Kamstra @ 2005-06-13 12:12 UTC (permalink / raw)
Does someone see a problem with this change?
Lute.
2005-06-13 Lute Kamstra <lute@gnu.org>
* recentf.el (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.
Index: lisp/recentf.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/recentf.el,v
retrieving revision 1.37
diff -c -r1.37 recentf.el
*** lisp/recentf.el 31 May 2005 04:19:10 -0000 1.37
--- lisp/recentf.el 13 Jun 2005 12:09:26 -0000
***************
*** 923,931 ****
\\{recentf-dialog-mode-map}"
(interactive)
(setq major-mode 'recentf-dialog-mode)
(setq mode-name "recentf-dialog")
! (use-local-map recentf-dialog-mode-map))
\f
;;; Hooks
;;
--- 923,933 ----
\\{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)
! (run-mode-hooks 'recentf-dialog-mode-hook))
\f
;;; Hooks
;;
***************
*** 1002,1008 ****
(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)
--- 1004,1009 ----
***************
*** 1101,1107 ****
(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)
--- 1102,1107 ----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: lisp/recentf.el
@ 2005-06-13 13:35 David PONCE
2005-06-13 13:52 ` lisp/recentf.el Lute Kamstra
0 siblings, 1 reply; 4+ messages in thread
From: David PONCE @ 2005-06-13 13:35 UTC (permalink / raw)
Cc: emacs-devel
Hi,
> Does someone see a problem with this change?
[...]
This is a good idea, however I think the call to `recentf-dialog-mode'
should be moved before to setup the widgets because they might use
local variables.
Sincerely,
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: lisp/recentf.el
2005-06-13 13:35 lisp/recentf.el David PONCE
@ 2005-06-13 13:52 ` Lute Kamstra
0 siblings, 0 replies; 4+ messages in thread
From: Lute Kamstra @ 2005-06-13 13:52 UTC (permalink / raw)
Cc: emacs-devel
Hi David,
>> Does someone see a problem with this change?
>
> This is a good idea, however I think the call to `recentf-dialog-mode'
> should be moved before to setup the widgets because they might use
> local variables.
Like this?
Lute.
Index: lisp/recentf.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/recentf.el,v
retrieving revision 1.37
diff -c -r1.37 recentf.el
*** lisp/recentf.el 31 May 2005 04:19:10 -0000 1.37
--- lisp/recentf.el 13 Jun 2005 13:49:20 -0000
***************
*** 923,931 ****
\\{recentf-dialog-mode-map}"
(interactive)
(setq major-mode 'recentf-dialog-mode)
(setq mode-name "recentf-dialog")
! (use-local-map recentf-dialog-mode-map))
\f
;;; Hooks
;;
--- 923,933 ----
\\{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)
! (run-mode-hooks 'recentf-dialog-mode-hook))
\f
;;; Hooks
;;
***************
*** 1002,1014 ****
(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)))
(setq recentf-edit-selected-items nil)
;; Insert the dialog header
(widget-insert
--- 1004,1016 ----
(get-buffer-create (format "*%s - Edit list*" recentf-menu-title))
(switch-to-buffer (current-buffer))
;; Cleanup buffer
(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,1051 ****
'push-button
:notify 'recentf-cancel-dialog
"Cancel")
- (recentf-dialog-mode)
(widget-setup)
(goto-char (point-min))))
--- 1047,1052 ----
***************
*** 1101,1113 ****
(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)))
;; 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" )
--- 1102,1114 ----
(with-current-buffer (get-buffer-create buffer-name)
(switch-to-buffer (current-buffer))
;; Cleanup buffer
(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,1129 ****
'push-button
:notify 'recentf-cancel-dialog
"Cancel")
- (recentf-dialog-mode)
(widget-setup)
(goto-char (point-min))))
--- 1124,1129 ----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: lisp/recentf.el
@ 2005-06-13 14:18 David PONCE
0 siblings, 0 replies; 4+ messages in thread
From: David PONCE @ 2005-06-13 14:18 UTC (permalink / raw)
Cc: emacs-devel
Hi Lute,
>>>Does someone see a problem with this change?
>>
>>This is a good idea, however I think the call to `recentf-dialog-mode'
>>should be moved before to setup the widgets because they might use
>>local variables.
>
>
> Like this?
Yes. Thank you very much.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-06-13 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-13 14:18 lisp/recentf.el David PONCE
-- strict thread matches above, loose matches on Subject: below --
2005-06-13 13:35 lisp/recentf.el David PONCE
2005-06-13 13:52 ` lisp/recentf.el Lute Kamstra
2005-06-13 12:12 lisp/recentf.el Lute Kamstra
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.