[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use .emacs.d in savehist.el

From: Stefan Monnier
Subject: Use .emacs.d in savehist.el
Date: Mon, 24 Oct 2005 11:58:50 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Any objection to the patch below?


Index: lisp/savehist.el
RCS file: /cvsroot/emacs/emacs/lisp/savehist.el,v
retrieving revision 1.7
diff -u -r1.7 savehist.el
--- lisp/savehist.el    22 Oct 2005 17:45:50 -0000      1.7
+++ lisp/savehist.el    24 Oct 2005 15:55:38 -0000
@@ -110,7 +73,13 @@
   :type '(repeat (symbol :tag "Variable"))
   :group 'savehist)
-(defcustom savehist-file "~/.emacs-history"
+(defcustom savehist-file
+  (cond
+   ;; Backward compatibility with previous versions of savehist.
+   ((file-exists-p "~/.emacs-history") "~/.emacs-history")
+   ((and (not (featurep 'xemacs)) (file-directory-p "~/.emacs.d/"))
+    "~/.emacs.d/history")
+   (t "~/.emacs-history"))
-  "*File name to save minibuffer history to.
+  "File name to save minibuffer history to.
 The minibuffer history is a series of Lisp expressions, which should be
 loaded using `savehist-load' from your .emacs.  See `savehist-load' for

reply via email to

[Prev in Thread] Current Thread [Next in Thread]