summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-03-11 22:08:21 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-03-11 22:08:21 -0400
commit940e5099142a1bb60e76ae2cbd1f47244cb2eb44 (patch)
tree31e8ce32a3bc7f2de7040584db2faab8f35436e3
parentcc72580827719a5012d4ac703c09f92e721f61de (diff)
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.
-rw-r--r--etc/NEWS20
-rw-r--r--lisp/ChangeLog17
-rw-r--r--lisp/calendar/timeclock.el2
-rw-r--r--lisp/calendar/todo-mode.el6
-rw-r--r--lisp/emulation/vip.el2
-rw-r--r--lisp/emulation/viper-cmd.el6
-rw-r--r--lisp/emulation/viper.el2
-rw-r--r--lisp/ido.el3
-rw-r--r--lisp/international/kkc.el2
-rw-r--r--lisp/net/quickurl.el3
-rw-r--r--lisp/progmodes/idlwave.el4
-rw-r--r--lisp/ps-bdf.el7
-rw-r--r--lisp/saveplace.el2
-rw-r--r--lisp/shadowfile.el10
-rw-r--r--lisp/strokes.el2
-rw-r--r--lisp/textmodes/remember.el2
-rw-r--r--lisp/type-break.el6
17 files changed, 65 insertions, 31 deletions
diff --git a/etc/NEWS b/etc/NEWS
index f7b986f6bf..a4691f7f18 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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-*.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e24b7198f5..a1a75d2b5a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,20 @@
+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).
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index a872e86dcf..70d064143d 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -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)
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index fdbcb04c9d..c109ecefb7 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -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.
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index e086f26e8a..ce131b854f 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -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
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 3813c304de..d0c0a4b401 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -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)
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index df419420bd..7f432cdc14 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -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'.")
diff --git a/lisp/ido.el b/lisp/ido.el
index 066d8276af..589f44175e 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -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'.
diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el
index 03576442ed..a7d3ac5d01 100644
--- a/lisp/international/kkc.el
+++ b/lisp/international/kkc.el
@@ -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'.
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index 1de9feb134..1e05d8db33 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -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)
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index ab65933416..aeaf1acb2a 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -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)
diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el
index 832d1cf55b..98dd2800b7 100644
--- a/lisp/ps-bdf.el
+++ b/lisp/ps-bdf.el
@@ -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
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index baa6b794fc..ef2f5469e2 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -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)
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index d10ea99afb..ec6e6e7ff1 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -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")
diff --git a/lisp/strokes.el b/lisp/strokes.el
index 5acd0dc012..2c3c3bc6dd 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -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)
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index eeb04ef250..16b9962740 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -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)
diff --git a/lisp/type-break.el b/lisp/type-break.el
index 212ac392e0..3ddf2e2d20 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -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.