unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lute Kamstra <Lute.Kamstra.lists@xs4all.nl>
Cc: emacs-devel@gnu.org
Subject: Re: lisp/recentf.el
Date: Mon, 13 Jun 2005 15:52:07 +0200	[thread overview]
Message-ID: <87vf4ie54o.fsf@xs4all.nl> (raw)
In-Reply-To: <25526367.1118669753655.JavaMail.www@wwinf1534> (David PONCE's message of "Mon, 13 Jun 2005 15:35:53 +0200 (CEST)")

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 ----

  reply	other threads:[~2005-06-13 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-13 13:35 lisp/recentf.el David PONCE
2005-06-13 13:52 ` Lute Kamstra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-13 14:18 lisp/recentf.el David PONCE
2005-06-13 12:12 lisp/recentf.el Lute Kamstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vf4ie54o.fsf@xs4all.nl \
    --to=lute.kamstra.lists@xs4all.nl \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).