Commit 940e5099 authored by Stefan Monnier's avatar Stefan Monnier

Use locate-user-emacs-file.

* lisp/type-break.el (type-break-file-name):
* lisp/textmodes/remember.el (remember-data-file):
* lisp/strokes.el (strokes-file):
* lisp/shadowfile.el (shadow-initialize):
* lisp/saveplace.el (save-place-file):
* lisp/ps-bdf.el (bdf-cache-file):
* lisp/progmodes/idlwave.el (idlwave-config-directory):
* lisp/net/quickurl.el (quickurl-url-file):
* lisp/international/kkc.el (kkc-init-file-name):
* lisp/ido.el (ido-save-directory-list-file):
* lisp/emulation/viper.el (viper-custom-file-name):
* lisp/emulation/vip.el (vip-startup-file):
* lisp/calendar/todo-mode.el (todo-file-do, todo-file-done, todo-file-top):
* lisp/calendar/timeclock.el (timeclock-file): Use locate-user-emacs-file.
parent cc725808
......@@ -85,7 +85,25 @@ Eg View mode, etc.
* Changes in Specialized Modes and Packages in Emacs 24.4
** Recentf looks for ~/.emacs.d/recentf additionally to ~/.recentf.
** More packages look for ~/.emacs.d/<foo> additionally to ~/.<foo>.
Affected files:
~/.emacs.d/timelog replaces ~/.timelog
~/.emacs.d/todo-do replaces ~/.todo-do
~/.emacs.d/todo-done replaces ~/.todo-done
~/.emacs.d/todo-top replaces ~/.todo-top
~/.emacs.d/vip replaces ~/.vip
~/.emacs.d/viper replaces ~/.viper
~/.emacs.d/ido.last replaces ~/.ido.last
~/.emacs.d/kkcrc replaces ~/.kkcrc
~/.emacs.d/quickurls replaces ~/.quickurls
~/.emacs.d/idlwave replaces ~/.idlwave
~/.emacs.d/bdfcache.el replaces ~/.bdfcache.el
~/.emacs.d/places replaces ~/.emacs-places
~/.emacs.d/shadows replaces ~/.shadows
~/.emacs.d/shadow_todo replaces ~/.shadow_todo
~/.emacs.d/strokes replaces ~/.strokes
~/.emacs.d/notes replaces ~/.notes
~/.emacs.d/type-break replaces ~/.type-break
** Delphi mode is now called OPascal mode.
*** All delphi-* variables and functions have been renamed to opascal-*.
......
2013-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
* type-break.el (type-break-file-name):
* textmodes/remember.el (remember-data-file):
* strokes.el (strokes-file):
* shadowfile.el (shadow-initialize):
* saveplace.el (save-place-file):
* ps-bdf.el (bdf-cache-file):
* progmodes/idlwave.el (idlwave-config-directory):
* net/quickurl.el (quickurl-url-file):
* international/kkc.el (kkc-init-file-name):
* ido.el (ido-save-directory-list-file):
* emulation/viper.el (viper-custom-file-name):
* emulation/vip.el (vip-startup-file):
* calendar/todo-mode.el (todo-file-do, todo-file-done, todo-file-top):
* calendar/timeclock.el (timeclock-file): Use locate-user-emacs-file.
2013-03-12 Paul Eggert <eggert@cs.ucla.edu>
Switch encodings of tutorials, thai-word to UTF-8 (Bug#13880).
......
......@@ -81,7 +81,7 @@
;;; User Variables:
(defcustom timeclock-file (convert-standard-filename "~/.timelog")
(defcustom timeclock-file (locate-user-emacs-file "timelog" ".timelog")
"The file used to store timeclock data in."
:type 'file
:group 'timeclock)
......
......@@ -281,11 +281,11 @@ show and mark todo entries for today, but may slow down processing of
the diary file somewhat."
:type 'string
:group 'todo)
(defcustom todo-file-do (convert-standard-filename "~/.todo-do")
(defcustom todo-file-do (locate-user-emacs-file "todo-do" ".todo-do")
"TODO mode list file."
:type 'file
:group 'todo)
(defcustom todo-file-done (convert-standard-filename "~/.todo-done")
(defcustom todo-file-done (locate-user-emacs-file "todo-done" ".todo-done")
"TODO mode archive file."
:type 'file
:group 'todo)
......@@ -315,7 +315,7 @@ window."
:group 'todo)
(defvar todo-edit-buffer " *TODO Edit*"
"TODO Edit buffer name.")
(defcustom todo-file-top (convert-standard-filename "~/.todo-top")
(defcustom todo-file-top (locate-user-emacs-file "todo-top" ".todo-top")
"TODO mode top priorities file.
Not in TODO format, but diary compatible.
......
......@@ -159,7 +159,7 @@ If nil then it is bound to `delete-backward-char'."
(defvar vip-inhibit-startup-message nil)
(defvar vip-startup-file (convert-standard-filename "~/.vip")
(defvar vip-startup-file (locate-user-emacs-file "vip" ".vip")
"Filename used as startup file for vip.")
;; key bindings
......
......@@ -1009,9 +1009,9 @@ as a Meta key and any number of multiple escapes are allowed."
(inhibit-quit t))
(if (viper-ESC-event-p event)
(progn
;; Some versions of Emacs (eg., 22.50.8 have a bug, which makes even
;; a single ESC into ;; a fast keyseq. To guard against this, we
;; added a check if there are other events as well. Keep the next
;; Some versions of Emacs (eg., 22.50.8 (?)) have a bug, which makes
;; even a single ESC into a fast keyseq. To guard against this, we
;; added a check if there are other events as well. Keep the next
;; line for the next time the bug reappears, so that will remember to
;; report it.
;;(if (and (viper-fast-keysequence-p) unread-command-events)
......
......@@ -313,7 +313,7 @@
(require 'viper-keym)
;; better be defined before Viper custom group.
(defvar viper-custom-file-name (convert-standard-filename "~/.viper")
(defvar viper-custom-file-name (locate-user-emacs-file "viper" ".viper")
"Viper customization file.
If set by the user, this must be done _before_ Viper is loaded in `~/.emacs'.")
......
......@@ -927,7 +927,8 @@ ido is running. Copied from `icomplete-minibuffer-setup-hook'."
:type 'hook
:group 'ido)
(defcustom ido-save-directory-list-file (convert-standard-filename "~/.ido.last")
(defcustom ido-save-directory-list-file
(locate-user-emacs-file "ido.last" ".ido.last")
"File in which the ido state is saved between invocations.
Variables stored are: `ido-last-directory-list', `ido-work-directory-list',
`ido-work-file-list', and `ido-dir-file-cache'.
......
......@@ -40,7 +40,7 @@
"String denoting KKC input method.
This string is shown at mode line when users are in KKC mode.")
(defvar kkc-init-file-name (convert-standard-filename "~/.kkcrc")
(defvar kkc-init-file-name (locate-user-emacs-file "kkcrc" ".kkcrc")
"Name of a file which contains user's initial setup code for KKC.")
;; A flag to control a file specified by `kkc-init-file-name'.
......
......@@ -94,7 +94,8 @@
:group 'abbrev
:prefix "quickurl-")
(defcustom quickurl-url-file (convert-standard-filename "~/.quickurls")
(defcustom quickurl-url-file
(locate-user-emacs-file "quickurls" ".quickurls")
"File that contains the URL list."
:type 'file
:group 'quickurl)
......
......@@ -27,7 +27,7 @@
;;; Commentary:
;; IDLWAVE enables feature-rich development and interaction with IDL,
;; the Interactive Data Language. It provides a compelling,
;; the Interactive Data Language. It provides a compelling,
;; full-featured alternative to the IDLDE development environment
;; bundled with IDL.
......@@ -447,7 +447,7 @@ value of `!DIR'. See also `idlwave-library-path'."
;; Configuration files
(defcustom idlwave-config-directory
(convert-standard-filename "~/.idlwave")
(locate-user-emacs-file "idlwave" ".idlwave")
"Directory for configuration files and user-library catalog."
:group 'idlwave-routine-info
:type 'file)
......
......@@ -91,12 +91,7 @@ If BDFNAME doesn't exist, return nil."
(insert-file-contents bdfname)
buf))))
(defvar bdf-cache-file (if (eq system-type 'ms-dos)
;; convert-standard-filename doesn't
;; guarantee that the .el extension will be
;; preserved.
"~/_bdfcache.el"
(convert-standard-filename "~/.bdfcache.el"))
(defvar bdf-cache-file (locate-user-emacs-file "bdfcache.el" ".bdfcache.el")
"Name of cache file which contains information of `BDF' font files.")
(defvar bdf-cache nil
......
......@@ -68,7 +68,7 @@ following code in your init file:
(make-variable-buffer-local 'save-place)
(defcustom save-place-file (convert-standard-filename "~/.emacs-places")
(defcustom save-place-file (locate-user-emacs-file "places" ".emacs-places")
"Name of the file that records `save-place-alist' value."
:type 'file
:group 'save-place)
......
......@@ -651,7 +651,7 @@ Return t unless files were locked; then return nil."
(beep)
(sit-for 3)
nil)
(save-excursion
(save-current-buffer
(when shadow-info-file
(set-buffer (setq shadow-info-buffer
(find-file-noselect shadow-info-file)))
......@@ -683,7 +683,7 @@ Also clear `shadow-hashtable', since when there are new shadows
defined, the old hashtable info is invalid."
(shadow-invalidate-hashtable)
(if shadow-info-file
(save-excursion
(save-current-buffer
(if (not shadow-info-buffer)
(setq shadow-info-buffer (find-file-noselect shadow-info-file)))
(set-buffer shadow-info-buffer)
......@@ -802,11 +802,13 @@ look for files that have been changed and need to be copied to other systems."
(file-name-as-directory (shadow-expand-file-name "~"))))
(if (null shadow-info-file)
(setq shadow-info-file
(shadow-expand-file-name (convert-standard-filename "~/.shadows"))))
;; FIXME: Move defaults to their defcustom.
(shadow-expand-file-name
(locate-user-emacs-file "shadows" ".shadows"))))
(if (null shadow-todo-file)
(setq shadow-todo-file
(shadow-expand-file-name
(convert-standard-filename "~/.shadow_todo"))))
(locate-user-emacs-file "shadow_todo" ".shadow_todo"))))
(if (not (shadow-read-files))
(progn
(message "Shadowfile information files not found - aborting")
......
......@@ -260,7 +260,7 @@ WARNING: Changing the value of this variable will gravely affect the
:type 'integer
:group 'strokes)
(defcustom strokes-file (convert-standard-filename "~/.strokes")
(defcustom strokes-file (locate-user-emacs-file "strokes" ".strokes")
"File containing saved strokes for Strokes mode (default is ~/.strokes)."
:type 'file
:group 'strokes)
......
......@@ -380,7 +380,7 @@ Subject: %s\n\n"
;; Remembering to plain files
(defcustom remember-data-file (convert-standard-filename "~/.notes")
(defcustom remember-data-file (locate-user-emacs-file "notes" ".notes")
"The file in which to store unprocessed data."
:type 'file
:group 'remember)
......
......@@ -204,11 +204,11 @@ key is pressed."
:type 'boolean
:group 'type-break)
(defcustom type-break-file-name (convert-standard-filename "~/.type-break")
(defcustom type-break-file-name
(locate-user-emacs-file "type-break" ".type-break")
"Name of file used to save state across sessions.
If this is nil, no data will be saved across sessions."
:type 'file
:group 'type-break)
:type 'file)
(defvar type-break-post-command-hook '(type-break-check)
"Hook run indirectly by `post-command-hook' for typing break functions.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment