X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e61d39cddfd015032a6419ce75c36ecdf1e9fe9f..2f67f8a145af8f185f644b1d094a03895a124ef1:/lisp/recentf.el diff --git a/lisp/recentf.el b/lisp/recentf.el index 636110f41d..dc9489752f 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1,6 +1,6 @@ ;;; recentf.el --- setup a menu of recently opened files -;; Copyright (C) 1999-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999-2016 Free Software Foundation, Inc. ;; Author: David Ponce ;; Created: July 19 1999 @@ -69,9 +69,10 @@ See the command `recentf-save-list'." :group 'recentf :type 'integer) -(defcustom recentf-save-file (convert-standard-filename "~/.recentf") +(defcustom recentf-save-file (locate-user-emacs-file "recentf" ".recentf") "File to save the recent list into." :group 'recentf + :version "24.4" :type 'file :initialize 'custom-initialize-default :set (lambda (symbol value) @@ -293,7 +294,7 @@ They are successively passed a file name to transform it." (function :tag "Other function"))))) (defcustom recentf-show-file-shortcuts-flag t - "Whether to show ``[N]'' for the Nth item up to 10. + "Whether to show \"[N]\" for the Nth item up to 10. If non-nil, `recentf-open-files' will show labels for keys that can be used as shortcuts to open the Nth file." :group 'recentf @@ -780,7 +781,7 @@ Filenames are relative to the `default-directory'." ) "List of rules used by `recentf-arrange-by-rule' to build sub-menus. A rule is a pair (SUB-MENU-TITLE . MATCHER). SUB-MENU-TITLE is the -displayed title of the sub-menu where a '%d' `format' pattern is +displayed title of the sub-menu where a `%d' `format' pattern is replaced by the number of items in the sub-menu. MATCHER is a regexp or a list of regexps. Items matching one of the regular expressions in MATCHER are added to the corresponding sub-menu. @@ -797,7 +798,7 @@ may have been modified to match another rule." "Title of the `recentf-arrange-by-rule' sub-menu. This is for the menu where items that don't match any `recentf-arrange-rules' are displayed. If nil these items are -displayed in the main recent files menu. A '%d' `format' pattern in +displayed in the main recent files menu. A `%d' `format' pattern in the title is replaced by the number of items in the sub-menu." :group 'recentf-filters :type '(choice (const :tag "Main menu" nil) @@ -1063,7 +1064,6 @@ Go to the beginning of buffer if not found." (define-key km "q" 'recentf-cancel-dialog) (define-key km "n" 'next-line) (define-key km "p" 'previous-line) - (define-key km [follow-link] "\C-m") km) "Keymap used in recentf dialogs.") @@ -1186,6 +1186,9 @@ IGNORE other arguments." :format "%[%t\n%]" :help-echo ,(concat "Open " (cdr menu-element)) :action recentf-open-files-action + ;; Override the (problematic) follow-link property of the + ;; `link' widget (bug#22434). + :follow-link nil ,(cdr menu-element)))) (defun recentf-open-files-items (files) @@ -1223,7 +1226,7 @@ use for the dialog. It defaults to \"*`recentf-menu-title'*\"." ", or type the corresponding digit key," "") " to open it.\n" - "Click on Cancel or type `q' to cancel.\n") + (format-message "Click on Cancel or type `q' to cancel.\n")) ;; Use a L&F that looks like the recentf menu. (tree-widget-set-theme "folder") (apply 'widget-create @@ -1280,7 +1283,8 @@ Write data into the file specified by `recentf-save-file'." (with-temp-buffer (erase-buffer) (set-buffer-file-coding-system recentf-save-file-coding-system) - (insert (format recentf-save-file-header (current-time-string))) + (insert (format-message recentf-save-file-header + (current-time-string))) (recentf-dump-variable 'recentf-list recentf-max-saved-items) (recentf-dump-variable 'recentf-filter-changer-current) (insert "\n \n;; Local Variables:\n"